diff --git a/docker-compose.yml b/docker-compose.yml index fd2e2b5..d134590 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: depends_on: - postgres ports: - - "4504:4504" + - "443:443" working_dir: /server2 volumes: - ./server2:/server2 @@ -51,20 +51,6 @@ services: max-size: "1m" max-file: "3" - - imgparser: - build: imgparser - restart: always - ports: - - "4503:4503" - volumes: - - ./imgparser:/imgparser - working_dir: /imgparser/projectDivaImgParser - logging: - options: - max-size: "1m" - max-file: "3" - postgres: image: postgres:10.4 restart: always @@ -90,7 +76,7 @@ services: - postgres - server ports: - - "80:3000" + - "4500:3000" environment: - CHOKIDAR_USEPOLLING=true stdin_open: true @@ -135,4 +121,4 @@ services: # context: frontend # dockerfile: Dockerfile.prod # ports: -# - '3004:80' \ No newline at end of file +# - '3004:80' diff --git a/frontend/src/App.js b/frontend/src/App.js index a4622ad..a9bdd5d 100755 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -842,7 +842,7 @@ function BestPlaysPanel(p) { var [update,setUpdate] = useState(false) useEffect(()=>{ - axios.get("http://www.projectdivar.com/bestplays/"+p.username+"?fails=false&limit=5&offset=0") + axios.get("http://projectdivar.com/bestplays/"+p.username+"?fails=false&limit=5&offset=0") .then((data)=>{setBestPlays(data.data);}) },[p.profileUpdate,update,p.username]) @@ -851,7 +851,7 @@ function BestPlaysPanel(p) { {bestPlays.map((play,i)=>{return
  • })} - + @@ -948,7 +948,7 @@ function PlayData(p) {
    Individual Plays for {p.song.name} from {p.username}
    {data.map((play,i)=>)} - +
    @@ -2407,7 +2407,7 @@ function Website() { const [userSettings,setUserSettings] = useState({}) useEffect(()=>{ - axios.get("http://www.projectdivar.com/songs") + axios.get("http://.projectdivar.com/songs") .then((data)=>{ setSongs(data.data) }) diff --git a/frontend/src/setupProxy.js b/frontend/src/setupProxy.js old mode 100755 new mode 100644 index 2f81bc4..3c203c3 --- a/frontend/src/setupProxy.js +++ b/frontend/src/setupProxy.js @@ -1,501 +1,522 @@ const { createProxyMiddleware } = require('http-proxy-middleware'); -module.exports = function(app) { - /*app.use( +module.exports = function (app) { + /*app.use( "/event/query", createProxyMiddleware({ target: 'http://server:4501', changeOrigin: true, }) );*/ - app.use( - "/sigcrafting", - createProxyMiddleware({ - target: 'http://server:3001', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/class", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/class_level_data", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/class_weapon_type_data", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/weapon", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/weapon_existence_data", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/weapon_type", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/armor", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/potential", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/potential_data", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/builds", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/skill", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/skill_type", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/skill_data", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/augment", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/augment_type", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/food_mult", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/roles", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/users", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner/food", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ngsplanner", - createProxyMiddleware({ - target: 'https://server2:4504', - changeOrigin: true, - }) - ); - app.use( - "/ev", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/cans", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/eventchart", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/eventsubmit", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/eventdata", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/eventdata/t20", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/recalculatePlayerData/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/streamtop/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/streamkill/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/streamstart/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/streaminfo/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/updates/:userid", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/passImageData", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/getUserAuthData", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/streamdata/:id", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/updateuser", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/findsong/:songname", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/authenticate/authToken", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/updateRegisteredState", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/authenticate/login", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/authenticateuser", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/sendemail/register", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/sendemail/login", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/recentplays/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/plays/:username/:songname", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/song/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/ratings/:songname", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/completionreport/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songmods/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songpfccount/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songs", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/bestplays/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/image", - createProxyMiddleware({ - target: 'http://projectdivar.com:4503', - changeOrigin: true, - }) - ); - app.use( - "/upload", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/song/:songname", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/remove", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/submit", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songdiffs", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/accuracy/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/recalculatescore/:playid", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/bestplay/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/userdata/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/playcount/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songpasscount/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/songfccount/:username/:songname/:difficulty", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/rating/:username", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/users/:orderby/:sortorder", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/twitter/mentions", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); - app.use( - "/files", - createProxyMiddleware({ - target: 'http://server:4501', - changeOrigin: true, - }) - ); + app.use( + "/sigcrafting", + createProxyMiddleware({ + target: 'http://server:3001', + changeOrigin: true, + }) + ); + app.use( + "/gitea", + createProxyMiddleware({ + target: 'http://sig.projectdivar.com', + changeOrigin:false, + }) + ); + app.use( + "/ngsplanner/class", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/class_level_data", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/class_weapon_type_data", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/weapon", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/weapon_existence_data", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/weapon_type", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/armor", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/potential", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/potential_data", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/builds", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/skill", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/skill_type", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/skill_data", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/augment", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/augment_type", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/food_mult", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/roles", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/users", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner/food", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ngsplanner", + createProxyMiddleware({ + target: 'https://server2:4504', + changeOrigin: true, + }) + ); + app.use( + "/ev", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/cans", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/eventchart", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/create-event", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/event/leaderboard", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/eventsubmit", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/eventdata", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/eventdata/t20", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/recalculatePlayerData/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/streamtop/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/streamkill/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/streamstart/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/streaminfo/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/updates/:userid", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/passImageData", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/getUserAuthData", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/streamdata/:id", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/updateuser", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/findsong/:songname", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/authenticate/authToken", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/updateRegisteredState", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/authenticate/login", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/authenticateuser", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/sendemail/register", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/sendemail/login", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/recentplays/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/plays/:username/:songname", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/song/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/ratings/:songname", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/completionreport/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songmods/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songpfccount/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songs", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/bestplays/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/image", + createProxyMiddleware({ + target: 'http://projectdivar.com:4503', + changeOrigin: true, + }) + ); + app.use( + "/upload", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/song/:songname", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/remove", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/submit", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songdiffs", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/accuracy/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/recalculatescore/:playid", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/bestplay/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/userdata/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/playcount/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songpasscount/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/songfccount/:username/:songname/:difficulty", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/rating/:username", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/users/:orderby/:sortorder", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/twitter/mentions", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); + app.use( + "/files", + createProxyMiddleware({ + target: 'http://server:4501', + changeOrigin: true, + }) + ); }; diff --git a/server/.dockerignore b/server/.dockerignore new file mode 100644 index 0000000..30bc162 --- /dev/null +++ b/server/.dockerignore @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile old mode 100755 new mode 100644 index d8e6ef2..b0e4026 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,89 +1,37 @@ -FROM phusion/baseimage:bionic-1.0.0 +from node:16-alpine -CMD ["/sbin/my_init"] +RUN apk update -ENV JAVA_MAJOR_VERSION=11 +RUN apk add --no-cache \ + sudo \ + curl \ + build-base \ + g++ \ + libpng \ + libpng-dev \ + jpeg-dev \ + pango-dev \ + cairo-dev \ + giflib-dev \ + python3 -RUN mkdir -p /src/app -RUN apt-get update \ - && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ - && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache tini -ENV JAVA_VERSION jdk-11.0.8+10 +RUN apk add ffmpeg -RUN set -eux; \ - ARCH="$(dpkg --print-architecture)"; \ - case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='286c869dbaefda9b470ae71d1250fdecf9f06d8da97c0f7df9021d381d749106'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.8_10.tar.gz'; \ - ;; \ - armhf|armv7l) \ - ESUM='ffa627b2d0c6001448bb8f1f24f7c9921dad37e67637f6ed0a9a479e680a3393'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_arm_linux_hotspot_11.0.8_10.tar.gz'; \ - ;; \ - ppc64el|ppc64le) \ - ESUM='89231e1667d7cc4202d1a401497bb287d4eb12281c90c17e2570211cc4e901a3'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.8_10.tar.gz'; \ - ;; \ - s390x) \ - ESUM='dc0e715c17abcb12bedf77c638e58e67d828d3c4bf24a898f0d4b053caaeb25f'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_s390x_linux_hotspot_11.0.8_10.tar.gz'; \ - ;; \ - amd64|x86_64) \ - ESUM='98615b1b369509965a612232622d39b5cefe117d6189179cbad4dcef2ee2f4e1'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.8_10.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ - esac; \ - curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - cd /opt/java/openjdk; \ - tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ - rm -rf /tmp/openjdk.tar.gz; - -ENV JAVA_HOME=/opt/java/openjdk \ - PATH="/opt/java/openjdk/bin:$PATH" - -RUN apt-get update && \ - apt-get install -y ffmpeg && \ - apt-get clean; +RUN yarn global add nodemon -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ - apt-get update && \ - apt-get install -y yarn; +WORKDIR /src/app +COPY ./package.json ./package-lock.json /src/app/ -WORKDIR /src/app +RUN npm install COPY . /src/app -RUN yarn global add nodemon -# update -RUN apt-get update -# install curl -RUN apt-get install -y curl -# get install script and pass it to execute: -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -# and install node -RUN apt-get install -y nodejs -# confirm that it was successful -RUN node -v -# npm installs automatically -RUN npm -v +EXPOSE 3005 -ENV TINI_VERSION v0.19.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] +ENTRYPOINT ["/sbin/tini", "--"] -EXPOSE 3005 +CMD [ "nodemon", "app.js" ] -CMD [ "nodemon", "app.js" ] \ No newline at end of file diff --git a/server/Dockerfile_old b/server/Dockerfile_old new file mode 100755 index 0000000..d8e6ef2 --- /dev/null +++ b/server/Dockerfile_old @@ -0,0 +1,89 @@ +FROM phusion/baseimage:bionic-1.0.0 + +CMD ["/sbin/my_init"] + +ENV JAVA_MAJOR_VERSION=11 + +RUN mkdir -p /src/app +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV JAVA_VERSION jdk-11.0.8+10 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='286c869dbaefda9b470ae71d1250fdecf9f06d8da97c0f7df9021d381d749106'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.8_10.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='ffa627b2d0c6001448bb8f1f24f7c9921dad37e67637f6ed0a9a479e680a3393'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_arm_linux_hotspot_11.0.8_10.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='89231e1667d7cc4202d1a401497bb287d4eb12281c90c17e2570211cc4e901a3'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_ppc64le_linux_hotspot_11.0.8_10.tar.gz'; \ + ;; \ + s390x) \ + ESUM='dc0e715c17abcb12bedf77c638e58e67d828d3c4bf24a898f0d4b053caaeb25f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_s390x_linux_hotspot_11.0.8_10.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='98615b1b369509965a612232622d39b5cefe117d6189179cbad4dcef2ee2f4e1'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.8_10.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" + +RUN apt-get update && \ + apt-get install -y ffmpeg && \ + apt-get clean; + +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ + apt-get update && \ + apt-get install -y yarn; + + +WORKDIR /src/app + +COPY . /src/app + +RUN yarn global add nodemon +# update +RUN apt-get update +# install curl +RUN apt-get install -y curl +# get install script and pass it to execute: +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash +# and install node +RUN apt-get install -y nodejs +# confirm that it was successful +RUN node -v +# npm installs automatically +RUN npm -v + +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini +RUN chmod +x /tini +ENTRYPOINT ["/tini", "--"] + +EXPOSE 3005 + +CMD [ "nodemon", "app.js" ] \ No newline at end of file diff --git a/server/app.js b/server/app.js index eca86cc..ab37fa1 100755 --- a/server/app.js +++ b/server/app.js @@ -54,12 +54,8 @@ const db2 = new Pool({ port: 5432, }); -app.use((req, _, next) => { - req.db = db; - next() -}) - exports.app = app; +exports.db = db; require("./routes/d4dj-routes"); @@ -2863,9 +2859,12 @@ function Process(data, ind) { app.use( "/files", - express.static("files", { + express.static("files" +/*, + { maxAge: 86400000 * 30, - }) + }*/ +) ); /* diff --git a/server/files/JPOrbsP4S.png b/server/files/JPOrbsP4S.png new file mode 100644 index 0000000..71ec860 Binary files /dev/null and b/server/files/JPOrbsP4S.png differ diff --git a/server/files/SigTerm.txt b/server/files/SigTerm.txt new file mode 100644 index 0000000..c1eff33 Binary files /dev/null and b/server/files/SigTerm.txt differ diff --git a/server/files/leaderboard b/server/files/leaderboard new file mode 100644 index 0000000..b3eeb3b --- /dev/null +++ b/server/files/leaderboard @@ -0,0 +1 @@ +{"success":true,"message":"","data":{"leaderboard":[{"id":42,"membersId":147890,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-03-19T17:09:29.000Z","status":1,"totalPoints":328703,"rankingPoints":328703,"totalPass":24,"totalFc":16,"totalFec":13,"totalQuad":1,"totalQuint":0,"crossoverLevel":1237,"bracketLevel":2162,"footswitchLevel":1811,"jackLevel":932,"sideswitchLevel":3728,"doublestepLevel":1219,"staminaLevel":1352,"isBuddy":false,"preferences":"{\"discordId\":\"cmmf#8747\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"cmmf","sex":"Unspecified","profileImg":"https://i.imgur.com/XWuHg9J.png"},{"id":162,"membersId":49444,"dateAdded":"2023-03-18T22:26:42.000Z","lastUpdated":"2023-03-19T05:00:50.000Z","status":1,"totalPoints":312366,"rankingPoints":301681,"totalPass":48,"totalFc":17,"totalFec":15,"totalQuad":1,"totalQuint":0,"crossoverLevel":1380,"bracketLevel":1072,"footswitchLevel":1209,"jackLevel":1387,"sideswitchLevel":1021,"doublestepLevel":996,"staminaLevel":1610,"isBuddy":false,"preferences":"{\"discordId\":\"Freyja#4407\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"freyja","sex":"Female","profileImg":"https://i.ibb.co/26cb2XQ/Dbecdqk-151620b8-331a-42eb-9211-5d4798282726.jpg"},{"id":13,"membersId":7457,"dateAdded":"2023-03-18T21:48:42.000Z","lastUpdated":"2023-03-19T18:29:33.000Z","status":1,"totalPoints":301453,"rankingPoints":301453,"totalPass":12,"totalFc":7,"totalFec":36,"totalQuad":5,"totalQuint":0,"crossoverLevel":828,"bracketLevel":761,"footswitchLevel":1093,"jackLevel":1295,"sideswitchLevel":774,"doublestepLevel":1060,"staminaLevel":2101,"isBuddy":false,"preferences":"{\"discordId\":\"Bran#1685\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Krushrpants","sex":"Male","profileImg":""},{"id":48,"membersId":173699,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-03-19T05:18:55.000Z","status":1,"totalPoints":303921,"rankingPoints":269034,"totalPass":22,"totalFc":19,"totalFec":46,"totalQuad":4,"totalQuint":0,"crossoverLevel":2196,"bracketLevel":899,"footswitchLevel":1282,"jackLevel":1112,"sideswitchLevel":853,"doublestepLevel":1872,"staminaLevel":296,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"erictran0","sex":"Male","profileImg":""},{"id":302,"membersId":2026,"dateAdded":"2023-03-19T04:32:57.000Z","lastUpdated":"2023-03-19T09:28:57.000Z","status":1,"totalPoints":228371,"rankingPoints":228371,"totalPass":45,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":543,"bracketLevel":1233,"footswitchLevel":964,"jackLevel":749,"sideswitchLevel":407,"doublestepLevel":688,"staminaLevel":935,"isBuddy":false,"preferences":"{\"discordId\":\"dxultimate#6390\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"BarX","sex":"Male","profileImg":""},{"id":187,"membersId":7737,"dateAdded":"2023-03-18T22:53:48.000Z","lastUpdated":"2023-03-19T18:31:05.000Z","status":1,"totalPoints":219448,"rankingPoints":219448,"totalPass":26,"totalFc":8,"totalFec":29,"totalQuad":3,"totalQuint":0,"crossoverLevel":877,"bracketLevel":936,"footswitchLevel":1364,"jackLevel":922,"sideswitchLevel":1068,"doublestepLevel":1091,"staminaLevel":622,"isBuddy":false,"preferences":"{\"discordId\":\"LemmingOnTheRun#7482\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DF.CaptainBlack","sex":"Male","profileImg":""},{"id":161,"membersId":128535,"dateAdded":"2023-03-18T22:25:38.000Z","lastUpdated":"2023-03-19T06:40:58.000Z","status":1,"totalPoints":201827,"rankingPoints":201827,"totalPass":23,"totalFc":8,"totalFec":12,"totalQuad":3,"totalQuint":0,"crossoverLevel":768,"bracketLevel":881,"footswitchLevel":869,"jackLevel":249,"sideswitchLevel":551,"doublestepLevel":819,"staminaLevel":1134,"isBuddy":false,"preferences":"{\"discordId\":\"Ritz#7358\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ritz","sex":"Male","profileImg":"https://i.imgur.com/iwmsWIc.png"},{"id":12,"membersId":133006,"dateAdded":"2023-03-18T21:48:36.000Z","lastUpdated":"2023-03-19T01:14:04.000Z","status":1,"totalPoints":197711,"rankingPoints":197711,"totalPass":0,"totalFc":5,"totalFec":21,"totalQuad":4,"totalQuint":0,"crossoverLevel":527,"bracketLevel":1474,"footswitchLevel":1086,"jackLevel":722,"sideswitchLevel":964,"doublestepLevel":920,"staminaLevel":906,"isBuddy":false,"preferences":"{\"discordId\":\"ChanceR#2908\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chance R.","sex":"Male","profileImg":""},{"id":116,"membersId":7385,"dateAdded":"2023-03-18T21:56:54.000Z","lastUpdated":"2023-03-19T01:40:34.000Z","status":1,"totalPoints":191652,"rankingPoints":191652,"totalPass":12,"totalFc":7,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":54,"bracketLevel":75,"footswitchLevel":50,"jackLevel":172,"sideswitchLevel":0,"doublestepLevel":23,"staminaLevel":2868,"isBuddy":false,"preferences":"{\"discordId\":\"RainbowXynn#3637\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Xynn","sex":"Male","profileImg":"https://i.imgur.com/mbdst0K.jpg"},{"id":98,"membersId":7843,"dateAdded":"2023-03-18T21:52:50.000Z","lastUpdated":"2023-03-19T03:41:37.000Z","status":1,"totalPoints":174810,"rankingPoints":174810,"totalPass":4,"totalFc":3,"totalFec":17,"totalQuad":12,"totalQuint":0,"crossoverLevel":776,"bracketLevel":708,"footswitchLevel":912,"jackLevel":322,"sideswitchLevel":720,"doublestepLevel":470,"staminaLevel":342,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kigha","sex":"Female","profileImg":""},{"id":175,"membersId":66431,"dateAdded":"2023-03-18T22:38:00.000Z","lastUpdated":"2023-03-19T08:54:55.000Z","status":1,"totalPoints":169611,"rankingPoints":169611,"totalPass":8,"totalFc":5,"totalFec":16,"totalQuad":15,"totalQuint":0,"crossoverLevel":1164,"bracketLevel":964,"footswitchLevel":909,"jackLevel":707,"sideswitchLevel":520,"doublestepLevel":1125,"staminaLevel":168,"isBuddy":false,"preferences":"{\"discordId\":\"Berserker#2387\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Berserker","sex":"Male","profileImg":"https://i.imgur.com/QPfP2Mp.png"},{"id":190,"membersId":129254,"dateAdded":"2023-03-18T22:58:13.000Z","lastUpdated":"2023-03-19T02:50:04.000Z","status":1,"totalPoints":169279,"rankingPoints":169279,"totalPass":28,"totalFc":7,"totalFec":7,"totalQuad":1,"totalQuint":0,"crossoverLevel":802,"bracketLevel":437,"footswitchLevel":677,"jackLevel":379,"sideswitchLevel":514,"doublestepLevel":267,"staminaLevel":494,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ddrneel","sex":"Male","profileImg":""},{"id":40,"membersId":128698,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-03-19T01:47:26.000Z","status":1,"totalPoints":161373,"rankingPoints":161373,"totalPass":19,"totalFc":19,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":710,"bracketLevel":898,"footswitchLevel":906,"jackLevel":751,"sideswitchLevel":1395,"doublestepLevel":1017,"staminaLevel":443,"isBuddy":false,"preferences":"{\"discordId\":\"Exschwasion#5968\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Exschwasion","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/210350948055384064/957716217093820446/b.png"},{"id":26,"membersId":173788,"dateAdded":"2023-03-18T21:48:53.000Z","lastUpdated":"2023-03-19T18:28:48.000Z","status":1,"totalPoints":160169,"rankingPoints":160169,"totalPass":31,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":633,"bracketLevel":768,"footswitchLevel":1525,"jackLevel":341,"sideswitchLevel":906,"doublestepLevel":1000,"staminaLevel":422,"isBuddy":false,"preferences":"{\"discordId\":\"Jace#9339\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JaceITG","sex":"Male","profileImg":""},{"id":110,"membersId":173359,"dateAdded":"2023-03-18T21:54:58.000Z","lastUpdated":"2023-03-19T01:52:49.000Z","status":1,"totalPoints":156167,"rankingPoints":156167,"totalPass":16,"totalFc":12,"totalFec":23,"totalQuad":8,"totalQuint":0,"crossoverLevel":926,"bracketLevel":705,"footswitchLevel":837,"jackLevel":639,"sideswitchLevel":170,"doublestepLevel":684,"staminaLevel":372,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xancara","sex":"Male","profileImg":""},{"id":216,"membersId":133806,"dateAdded":"2023-03-19T00:10:53.000Z","lastUpdated":"2023-03-19T04:31:04.000Z","status":1,"totalPoints":155169,"rankingPoints":155169,"totalPass":20,"totalFc":8,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":880,"bracketLevel":725,"footswitchLevel":614,"jackLevel":727,"sideswitchLevel":304,"doublestepLevel":359,"staminaLevel":311,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PUYO","sex":"Unspecified","profileImg":"https://live.staticflickr.com/65535/51260131445_d6c068ca6e_m.jpg"},{"id":33,"membersId":61697,"dateAdded":"2023-03-18T21:48:57.000Z","lastUpdated":"2023-03-19T04:09:26.000Z","status":1,"totalPoints":154635,"rankingPoints":154635,"totalPass":22,"totalFc":10,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":943,"bracketLevel":735,"footswitchLevel":959,"jackLevel":665,"sideswitchLevel":343,"doublestepLevel":1192,"staminaLevel":302,"isBuddy":false,"preferences":"{\"discordId\":\"Blizzrdball#3098\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Blizzrdball","sex":"Male","profileImg":"https://i.imgur.com/wgt2mm0.png"},{"id":254,"membersId":173047,"dateAdded":"2023-03-19T01:29:15.000Z","lastUpdated":"2023-03-19T18:23:45.000Z","status":1,"totalPoints":150983,"rankingPoints":150983,"totalPass":10,"totalFc":7,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":750,"bracketLevel":789,"footswitchLevel":981,"jackLevel":612,"sideswitchLevel":1024,"doublestepLevel":850,"staminaLevel":348,"isBuddy":false,"preferences":"{\"discordId\":\"nvanleerdrums#8936\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nvanleerdrums","sex":"Male","profileImg":"https://i.imgur.com/wA4Bxoy.jpg"},{"id":57,"membersId":58407,"dateAdded":"2023-03-18T21:49:19.000Z","lastUpdated":"2023-03-19T06:00:33.000Z","status":1,"totalPoints":147367,"rankingPoints":147367,"totalPass":13,"totalFc":0,"totalFec":13,"totalQuad":7,"totalQuint":0,"crossoverLevel":481,"bracketLevel":1109,"footswitchLevel":765,"jackLevel":363,"sideswitchLevel":101,"doublestepLevel":1000,"staminaLevel":420,"isBuddy":false,"preferences":"{\"discordId\":\"pochoitg#4891\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pocho","sex":"Male","profileImg":"https://c.tenor.com/qFiVMJ7kDGwAAAAM/catjam.gif"},{"id":114,"membersId":173653,"dateAdded":"2023-03-18T21:56:22.000Z","lastUpdated":"2023-03-19T18:28:00.000Z","status":1,"totalPoints":145315,"rankingPoints":145315,"totalPass":25,"totalFc":9,"totalFec":10,"totalQuad":1,"totalQuint":0,"crossoverLevel":851,"bracketLevel":341,"footswitchLevel":948,"jackLevel":332,"sideswitchLevel":354,"doublestepLevel":1030,"staminaLevel":203,"isBuddy":false,"preferences":"{\"discordId\":\"valgrind#2281\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"valgrind","sex":"Unspecified","profileImg":""},{"id":109,"membersId":175125,"dateAdded":"2023-03-18T21:54:52.000Z","lastUpdated":"2023-03-19T18:18:49.000Z","status":1,"totalPoints":145191,"rankingPoints":145191,"totalPass":6,"totalFc":8,"totalFec":9,"totalQuad":10,"totalQuint":0,"crossoverLevel":1044,"bracketLevel":403,"footswitchLevel":893,"jackLevel":267,"sideswitchLevel":1248,"doublestepLevel":607,"staminaLevel":386,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mixmasta","sex":"Male","profileImg":""},{"id":105,"membersId":168067,"dateAdded":"2023-03-18T21:53:38.000Z","lastUpdated":"2023-03-19T16:41:31.000Z","status":1,"totalPoints":175497,"rankingPoints":144849,"totalPass":41,"totalFc":56,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1825,"bracketLevel":310,"footswitchLevel":835,"jackLevel":335,"sideswitchLevel":394,"doublestepLevel":1177,"staminaLevel":41,"isBuddy":false,"preferences":"{\"discordId\":\"BreakfastPM#2615\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BreakfastPM","sex":"Male","profileImg":"https://i.ibb.co/xhdGjnY/Avatar-Small.jpg"},{"id":52,"membersId":165504,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T18:29:41.000Z","status":1,"totalPoints":143537,"rankingPoints":143537,"totalPass":42,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":626,"bracketLevel":754,"footswitchLevel":697,"jackLevel":1291,"sideswitchLevel":1045,"doublestepLevel":893,"staminaLevel":502,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"_Temeraire","sex":"Unspecified","profileImg":""},{"id":43,"membersId":6284,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-18T23:43:24.000Z","status":1,"totalPoints":143147,"rankingPoints":143147,"totalPass":2,"totalFc":9,"totalFec":9,"totalQuad":5,"totalQuint":0,"crossoverLevel":584,"bracketLevel":578,"footswitchLevel":661,"jackLevel":346,"sideswitchLevel":421,"doublestepLevel":619,"staminaLevel":365,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Twix","sex":"Male","profileImg":""},{"id":231,"membersId":175374,"dateAdded":"2023-03-19T00:35:10.000Z","lastUpdated":"2023-03-19T17:28:13.000Z","status":1,"totalPoints":142416,"rankingPoints":142416,"totalPass":21,"totalFc":8,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":531,"bracketLevel":618,"footswitchLevel":688,"jackLevel":742,"sideswitchLevel":943,"doublestepLevel":639,"staminaLevel":467,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LordLui","sex":"Unspecified","profileImg":""},{"id":352,"membersId":146716,"dateAdded":"2023-03-19T14:35:19.000Z","lastUpdated":"2023-03-19T18:05:31.000Z","status":1,"totalPoints":141857,"rankingPoints":141857,"totalPass":6,"totalFc":7,"totalFec":3,"totalQuad":9,"totalQuint":0,"crossoverLevel":736,"bracketLevel":1047,"footswitchLevel":994,"jackLevel":312,"sideswitchLevel":1087,"doublestepLevel":470,"staminaLevel":319,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TadofTony","sex":"Male","profileImg":""},{"id":78,"membersId":174707,"dateAdded":"2023-03-18T21:50:22.000Z","lastUpdated":"2023-03-19T18:28:55.000Z","status":1,"totalPoints":141234,"rankingPoints":141234,"totalPass":28,"totalFc":32,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1185,"bracketLevel":411,"footswitchLevel":795,"jackLevel":216,"sideswitchLevel":232,"doublestepLevel":956,"staminaLevel":123,"isBuddy":false,"preferences":"{\"discordId\":\"antifun#6584\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"antifun","sex":"Unspecified","profileImg":"https://i.imgur.com/YkgPNB2.png"},{"id":16,"membersId":174632,"dateAdded":"2023-03-18T21:48:45.000Z","lastUpdated":"2023-03-19T04:43:03.000Z","status":1,"totalPoints":140768,"rankingPoints":140768,"totalPass":34,"totalFc":15,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":977,"bracketLevel":484,"footswitchLevel":773,"jackLevel":714,"sideswitchLevel":810,"doublestepLevel":1018,"staminaLevel":172,"isBuddy":false,"preferences":"{\"discordId\":\"177013#8525\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SunkissEnjoyer","sex":"Unspecified","profileImg":"https://i.imgur.com/2YNygb4.png"},{"id":25,"membersId":172893,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-03-19T01:54:21.000Z","status":1,"totalPoints":132885,"rankingPoints":132885,"totalPass":19,"totalFc":6,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":577,"bracketLevel":1036,"footswitchLevel":910,"jackLevel":628,"sideswitchLevel":345,"doublestepLevel":731,"staminaLevel":391,"isBuddy":false,"preferences":"{\"discordId\":\"Smalls#9101\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Smalls","sex":"Male","profileImg":"https://i.imgur.com/RDuvnsC.jpg"},{"id":76,"membersId":87476,"dateAdded":"2023-03-18T21:50:19.000Z","lastUpdated":"2023-03-19T18:29:15.000Z","status":1,"totalPoints":127372,"rankingPoints":127372,"totalPass":2,"totalFc":7,"totalFec":6,"totalQuad":8,"totalQuint":1,"crossoverLevel":604,"bracketLevel":809,"footswitchLevel":704,"jackLevel":239,"sideswitchLevel":811,"doublestepLevel":452,"staminaLevel":405,"isBuddy":false,"preferences":"{\"discordId\":\"dimo#0420\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dimo","sex":"Male","profileImg":"https://imgur.com/4T9VibU.png"},{"id":29,"membersId":35701,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-19T15:11:25.000Z","status":1,"totalPoints":125323,"rankingPoints":125323,"totalPass":8,"totalFc":2,"totalFec":10,"totalQuad":11,"totalQuint":0,"crossoverLevel":628,"bracketLevel":422,"footswitchLevel":601,"jackLevel":298,"sideswitchLevel":433,"doublestepLevel":559,"staminaLevel":398,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lolipo","sex":"Female","profileImg":"https://imgur.com/VEubW0D.jpg"},{"id":65,"membersId":173296,"dateAdded":"2023-03-18T21:49:51.000Z","lastUpdated":"2023-03-19T06:31:56.000Z","status":1,"totalPoints":115713,"rankingPoints":115713,"totalPass":17,"totalFc":4,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":359,"bracketLevel":822,"footswitchLevel":584,"jackLevel":367,"sideswitchLevel":167,"doublestepLevel":397,"staminaLevel":452,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"IcyCold","sex":"Male","profileImg":""},{"id":89,"membersId":66785,"dateAdded":"2023-03-18T21:51:12.000Z","lastUpdated":"2023-03-19T18:20:55.000Z","status":1,"totalPoints":115284,"rankingPoints":115284,"totalPass":15,"totalFc":4,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":625,"bracketLevel":781,"footswitchLevel":518,"jackLevel":376,"sideswitchLevel":101,"doublestepLevel":606,"staminaLevel":306,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ralph Caffery","sex":"Male","profileImg":""},{"id":217,"membersId":37977,"dateAdded":"2023-03-19T00:11:23.000Z","lastUpdated":"2023-03-19T04:48:00.000Z","status":1,"totalPoints":112061,"rankingPoints":112061,"totalPass":8,"totalFc":10,"totalFec":19,"totalQuad":1,"totalQuint":0,"crossoverLevel":920,"bracketLevel":552,"footswitchLevel":519,"jackLevel":288,"sideswitchLevel":142,"doublestepLevel":418,"staminaLevel":93,"isBuddy":false,"preferences":"{\"discordId\":\"Valex#8095\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Valex","sex":"Male","profileImg":"https://i.imgur.com/OkpuTKw.jpg"},{"id":228,"membersId":66726,"dateAdded":"2023-03-19T00:32:24.000Z","lastUpdated":"2023-03-19T05:43:35.000Z","status":1,"totalPoints":111086,"rankingPoints":111086,"totalPass":14,"totalFc":14,"totalFec":9,"totalQuad":1,"totalQuint":0,"crossoverLevel":765,"bracketLevel":180,"footswitchLevel":466,"jackLevel":262,"sideswitchLevel":438,"doublestepLevel":442,"staminaLevel":143,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zeipher_Hawk","sex":"Male","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shuckle.png"},{"id":121,"membersId":173301,"dateAdded":"2023-03-18T21:58:47.000Z","lastUpdated":"2023-03-19T00:59:41.000Z","status":1,"totalPoints":111023,"rankingPoints":111023,"totalPass":15,"totalFc":4,"totalFec":2,"totalQuad":1,"totalQuint":0,"crossoverLevel":216,"bracketLevel":637,"footswitchLevel":532,"jackLevel":375,"sideswitchLevel":231,"doublestepLevel":303,"staminaLevel":662,"isBuddy":false,"preferences":"{\"discordId\":\"Chabala#4798\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chabala","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/706313433422757888/960710993426661376/20190925_213154.jpg"},{"id":70,"membersId":173636,"dateAdded":"2023-03-18T21:49:56.000Z","lastUpdated":"2023-03-19T06:45:07.000Z","status":1,"totalPoints":109601,"rankingPoints":109601,"totalPass":13,"totalFc":1,"totalFec":4,"totalQuad":8,"totalQuint":0,"crossoverLevel":606,"bracketLevel":559,"footswitchLevel":758,"jackLevel":307,"sideswitchLevel":105,"doublestepLevel":556,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":\"sarbackergaming#8250\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZSL","sex":"Male","profileImg":"https://i.imgur.com/NvPX4bC.png"},{"id":314,"membersId":165524,"dateAdded":"2023-03-19T05:33:33.000Z","lastUpdated":"2023-03-19T09:21:35.000Z","status":1,"totalPoints":107521,"rankingPoints":107521,"totalPass":21,"totalFc":5,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":538,"bracketLevel":651,"footswitchLevel":333,"jackLevel":542,"sideswitchLevel":688,"doublestepLevel":365,"staminaLevel":236,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"COLLETnm7","sex":"Male","profileImg":"https://i.gyazo.com/be29cf05362aae1c603e7f39b3b9192c.png"},{"id":126,"membersId":173876,"dateAdded":"2023-03-18T22:00:50.000Z","lastUpdated":"2023-03-19T01:09:01.000Z","status":1,"totalPoints":106325,"rankingPoints":106325,"totalPass":37,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":960,"bracketLevel":94,"footswitchLevel":419,"jackLevel":306,"sideswitchLevel":502,"doublestepLevel":637,"staminaLevel":252,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sigonasr2","sex":"Male","profileImg":"https://en.gravatar.com/userimage/3612777/b9992e90331c1fa71a3479f5b3d02b41.png"},{"id":169,"membersId":127780,"dateAdded":"2023-03-18T22:33:53.000Z","lastUpdated":"2023-03-19T02:25:18.000Z","status":1,"totalPoints":105248,"rankingPoints":105248,"totalPass":25,"totalFc":5,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":240,"bracketLevel":65,"footswitchLevel":123,"jackLevel":56,"sideswitchLevel":234,"doublestepLevel":184,"staminaLevel":1269,"isBuddy":false,"preferences":"{\"discordId\":\"zoodles#2685\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Hamaon","sex":"Female","profileImg":"https://66.media.tumblr.com/a586c1c2635be3c2863b904b689d6bc6/tumblr_pvwcak806k1x3sogho4_250.png"},{"id":145,"membersId":145083,"dateAdded":"2023-03-18T22:13:54.000Z","lastUpdated":"2023-03-19T18:04:24.000Z","status":1,"totalPoints":104320,"rankingPoints":104320,"totalPass":18,"totalFc":6,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":542,"bracketLevel":313,"footswitchLevel":281,"jackLevel":398,"sideswitchLevel":485,"doublestepLevel":519,"staminaLevel":336,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LOLWUT","sex":"Male","profileImg":"https://i.imgur.com/LZQ5yoW.png"},{"id":3,"membersId":66246,"dateAdded":"2023-03-16T20:38:45.000Z","lastUpdated":"2023-03-19T05:27:05.000Z","status":1,"totalPoints":101161,"rankingPoints":101161,"totalPass":13,"totalFc":10,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":80,"bracketLevel":97,"footswitchLevel":171,"jackLevel":49,"sideswitchLevel":0,"doublestepLevel":103,"staminaLevel":1290,"isBuddy":false,"preferences":"{\"discordId\":\"Zankoku#4444\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zankoku","sex":"Male","profileImg":"http://sugoifactory.moe/things/dopparle5.png"},{"id":151,"membersId":145128,"dateAdded":"2023-03-18T22:17:00.000Z","lastUpdated":"2023-03-19T02:42:26.000Z","status":1,"totalPoints":100911,"rankingPoints":100911,"totalPass":17,"totalFc":6,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":541,"bracketLevel":288,"footswitchLevel":718,"jackLevel":231,"sideswitchLevel":497,"doublestepLevel":598,"staminaLevel":276,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"H8EVRYTHNG","sex":"Male","profileImg":""},{"id":80,"membersId":66662,"dateAdded":"2023-03-18T21:50:33.000Z","lastUpdated":"2023-03-19T12:59:49.000Z","status":1,"totalPoints":99148,"rankingPoints":99148,"totalPass":33,"totalFc":0,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":636,"bracketLevel":421,"footswitchLevel":542,"jackLevel":401,"sideswitchLevel":62,"doublestepLevel":756,"staminaLevel":59,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"itgaz","sex":"Male","profileImg":"https://media.tenor.com/images/65d3642f6d4b6cd2c0508f8b1b152f68/tenor.gif"},{"id":94,"membersId":5314,"dateAdded":"2023-03-18T21:52:01.000Z","lastUpdated":"2023-03-19T15:50:33.000Z","status":1,"totalPoints":99139,"rankingPoints":99139,"totalPass":7,"totalFc":7,"totalFec":6,"totalQuad":2,"totalQuint":0,"crossoverLevel":519,"bracketLevel":458,"footswitchLevel":426,"jackLevel":494,"sideswitchLevel":43,"doublestepLevel":358,"staminaLevel":333,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrMeatloaf","sex":"Male","profileImg":"https://i.imgur.com/Ye5e236.jpg"},{"id":268,"membersId":7886,"dateAdded":"2023-03-19T01:58:08.000Z","lastUpdated":"2023-03-19T04:31:06.000Z","status":1,"totalPoints":98787,"rankingPoints":98787,"totalPass":13,"totalFc":4,"totalFec":7,"totalQuad":1,"totalQuint":0,"crossoverLevel":403,"bracketLevel":392,"footswitchLevel":366,"jackLevel":315,"sideswitchLevel":77,"doublestepLevel":194,"staminaLevel":380,"isBuddy":false,"preferences":"{\"discordId\":\"Zarzob#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zarzob","sex":"Male","profileImg":"https://i.imgur.com/IbJlXCl.png"},{"id":233,"membersId":84583,"dateAdded":"2023-03-19T00:36:20.000Z","lastUpdated":"2023-03-19T15:37:31.000Z","status":1,"totalPoints":98753,"rankingPoints":98753,"totalPass":11,"totalFc":17,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":978,"bracketLevel":251,"footswitchLevel":409,"jackLevel":166,"sideswitchLevel":287,"doublestepLevel":749,"staminaLevel":75,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lugea","sex":"Male","profileImg":"https://i.ibb.co/SRVLdQQ/bruno.png"},{"id":140,"membersId":174935,"dateAdded":"2023-03-18T22:09:53.000Z","lastUpdated":"2023-03-19T18:29:27.000Z","status":1,"totalPoints":97602,"rankingPoints":97602,"totalPass":18,"totalFc":11,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":605,"bracketLevel":151,"footswitchLevel":405,"jackLevel":134,"sideswitchLevel":182,"doublestepLevel":817,"staminaLevel":130,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"reset_itg","sex":"Unspecified","profileImg":""},{"id":226,"membersId":130786,"dateAdded":"2023-03-19T00:25:53.000Z","lastUpdated":"2023-03-19T02:54:48.000Z","status":1,"totalPoints":95141,"rankingPoints":95141,"totalPass":29,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":448,"bracketLevel":324,"footswitchLevel":389,"jackLevel":350,"sideswitchLevel":134,"doublestepLevel":317,"staminaLevel":282,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nuki","sex":"Unspecified","profileImg":""},{"id":46,"membersId":66587,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T00:39:11.000Z","status":1,"totalPoints":90786,"rankingPoints":90786,"totalPass":20,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":428,"bracketLevel":428,"footswitchLevel":378,"jackLevel":471,"sideswitchLevel":146,"doublestepLevel":427,"staminaLevel":269,"isBuddy":false,"preferences":"{\"discordId\":\"Lotarr#0466\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lotarr","sex":"Male","profileImg":"https://i.imgur.com/Z3lMRla.png"},{"id":41,"membersId":163426,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-03-19T00:52:50.000Z","status":1,"totalPoints":89990,"rankingPoints":89990,"totalPass":25,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":475,"bracketLevel":187,"footswitchLevel":603,"jackLevel":165,"sideswitchLevel":1416,"doublestepLevel":329,"staminaLevel":229,"isBuddy":false,"preferences":"{\"discordId\":\"GWen#2607\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GWen","sex":"Male","profileImg":"https://i.imgur.com/7xdu36E.png"},{"id":63,"membersId":173182,"dateAdded":"2023-03-18T21:49:50.000Z","lastUpdated":"2023-03-18T23:43:51.000Z","status":1,"totalPoints":89771,"rankingPoints":89771,"totalPass":9,"totalFc":11,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":376,"bracketLevel":940,"footswitchLevel":521,"jackLevel":398,"sideswitchLevel":523,"doublestepLevel":344,"staminaLevel":164,"isBuddy":false,"preferences":"{\"discordId\":\"DDDAAA#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DDDAAA","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/250042733303955467/941867594590322718/fernandey.png"},{"id":135,"membersId":66778,"dateAdded":"2023-03-18T22:04:30.000Z","lastUpdated":"2023-03-19T14:41:32.000Z","status":1,"totalPoints":88930,"rankingPoints":88930,"totalPass":4,"totalFc":3,"totalFec":11,"totalQuad":17,"totalQuint":0,"crossoverLevel":746,"bracketLevel":168,"footswitchLevel":575,"jackLevel":194,"sideswitchLevel":273,"doublestepLevel":528,"staminaLevel":111,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shpadoinkle","sex":"Female","profileImg":""},{"id":193,"membersId":173050,"dateAdded":"2023-03-18T23:03:16.000Z","lastUpdated":"2023-03-19T01:42:15.000Z","status":1,"totalPoints":87542,"rankingPoints":87542,"totalPass":12,"totalFc":5,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":423,"bracketLevel":528,"footswitchLevel":443,"jackLevel":141,"sideswitchLevel":143,"doublestepLevel":334,"staminaLevel":342,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Endymion360","sex":"Male","profileImg":"https://i.imgur.com/wvZXXWE.jpg"},{"id":17,"membersId":173058,"dateAdded":"2023-03-18T21:48:46.000Z","lastUpdated":"2023-03-19T02:01:33.000Z","status":1,"totalPoints":87116,"rankingPoints":87116,"totalPass":5,"totalFc":5,"totalFec":7,"totalQuad":7,"totalQuint":0,"crossoverLevel":665,"bracketLevel":293,"footswitchLevel":349,"jackLevel":302,"sideswitchLevel":31,"doublestepLevel":459,"staminaLevel":213,"isBuddy":false,"preferences":"{\"discordId\":\"Formless#8660\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Girth Brooks","sex":"Male","profileImg":"https://i.imgur.com/6DHh2Ra.png"},{"id":10,"membersId":129740,"dateAdded":"2023-03-18T21:48:29.000Z","lastUpdated":"2023-03-19T10:44:25.000Z","status":1,"totalPoints":84095,"rankingPoints":84095,"totalPass":46,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":670,"bracketLevel":154,"footswitchLevel":419,"jackLevel":226,"sideswitchLevel":102,"doublestepLevel":437,"staminaLevel":67,"isBuddy":false,"preferences":"{\"discordId\":\"TENKO#5796\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TENKO","sex":"Unspecified","profileImg":"https://i.imgur.com/qTNKsr2.png"},{"id":55,"membersId":134219,"dateAdded":"2023-03-18T21:49:10.000Z","lastUpdated":"2023-03-19T05:10:56.000Z","status":1,"totalPoints":83393,"rankingPoints":83393,"totalPass":12,"totalFc":2,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":268,"bracketLevel":443,"footswitchLevel":414,"jackLevel":229,"sideswitchLevel":224,"doublestepLevel":138,"staminaLevel":258,"isBuddy":false,"preferences":"{\"discordId\":\"Zarinah#9770\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZarinahBBM","sex":"Female","profileImg":"https://i.ibb.co/0f7Rrg3/My-home.png"},{"id":222,"membersId":166764,"dateAdded":"2023-03-19T00:14:39.000Z","lastUpdated":"2023-03-19T01:44:22.000Z","status":1,"totalPoints":81882,"rankingPoints":81882,"totalPass":24,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":580,"bracketLevel":488,"footswitchLevel":515,"jackLevel":165,"sideswitchLevel":326,"doublestepLevel":398,"staminaLevel":208,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kadef","sex":"Male","profileImg":""},{"id":27,"membersId":154965,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-19T03:37:45.000Z","status":1,"totalPoints":79578,"rankingPoints":79578,"totalPass":17,"totalFc":5,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":670,"bracketLevel":342,"footswitchLevel":468,"jackLevel":589,"sideswitchLevel":768,"doublestepLevel":442,"staminaLevel":158,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gpop","sex":"Male","profileImg":""},{"id":139,"membersId":3306,"dateAdded":"2023-03-18T22:07:50.000Z","lastUpdated":"2023-03-19T18:29:16.000Z","status":1,"totalPoints":79184,"rankingPoints":79184,"totalPass":10,"totalFc":0,"totalFec":11,"totalQuad":2,"totalQuint":0,"crossoverLevel":414,"bracketLevel":346,"footswitchLevel":368,"jackLevel":403,"sideswitchLevel":0,"doublestepLevel":460,"staminaLevel":91,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ElPapaCosmico","sex":"Male","profileImg":"https://i.pinimg.com/236x/3e/01/73/3e0173d36ceed20727f4724b71d2961e--rilakkuma-kitty.jpg"},{"id":173,"membersId":66558,"dateAdded":"2023-03-18T22:36:44.000Z","lastUpdated":"2023-03-19T02:30:38.000Z","status":1,"totalPoints":79109,"rankingPoints":79109,"totalPass":12,"totalFc":8,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":312,"bracketLevel":121,"footswitchLevel":386,"jackLevel":179,"sideswitchLevel":940,"doublestepLevel":150,"staminaLevel":559,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xiaowuc1","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/680561230892630067/990419215724974080/sukuna.jpg"},{"id":340,"membersId":66753,"dateAdded":"2023-03-19T11:56:50.000Z","lastUpdated":"2023-03-19T16:32:16.000Z","status":1,"totalPoints":79007,"rankingPoints":79007,"totalPass":24,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":359,"bracketLevel":412,"footswitchLevel":266,"jackLevel":394,"sideswitchLevel":344,"doublestepLevel":363,"staminaLevel":247,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PkGam","sex":"Male","profileImg":"https://i.ibb.co/RDMrkmb/pkgam-icon-250.png"},{"id":127,"membersId":171721,"dateAdded":"2023-03-18T22:01:35.000Z","lastUpdated":"2023-03-19T18:27:15.000Z","status":1,"totalPoints":78597,"rankingPoints":78597,"totalPass":9,"totalFc":2,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":278,"bracketLevel":368,"footswitchLevel":293,"jackLevel":168,"sideswitchLevel":290,"doublestepLevel":367,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Higgy","sex":"Male","profileImg":""},{"id":49,"membersId":172895,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-03-19T02:57:43.000Z","status":1,"totalPoints":77242,"rankingPoints":77242,"totalPass":19,"totalFc":17,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":698,"bracketLevel":286,"footswitchLevel":277,"jackLevel":298,"sideswitchLevel":135,"doublestepLevel":271,"staminaLevel":31,"isBuddy":false,"preferences":"{\"discordId\":\"Sekii#8008\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sekiirei","sex":"Female","profileImg":"https://i.gyazo.com/a0e21eb4239c5139544515656668c7c5.png"},{"id":148,"membersId":135061,"dateAdded":"2023-03-18T22:14:07.000Z","lastUpdated":"2023-03-19T01:55:53.000Z","status":1,"totalPoints":76834,"rankingPoints":76834,"totalPass":18,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":66,"bracketLevel":190,"footswitchLevel":126,"jackLevel":114,"sideswitchLevel":0,"doublestepLevel":42,"staminaLevel":759,"isBuddy":false,"preferences":"{\"discordId\":\"airplane#8871\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"airplane","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/749406224365387837/987950518754238505/195-00.png"},{"id":34,"membersId":62987,"dateAdded":"2023-03-18T21:48:58.000Z","lastUpdated":"2023-03-18T23:39:37.000Z","status":1,"totalPoints":73647,"rankingPoints":73647,"totalPass":1,"totalFc":3,"totalFec":5,"totalQuad":7,"totalQuint":0,"crossoverLevel":286,"bracketLevel":449,"footswitchLevel":343,"jackLevel":220,"sideswitchLevel":307,"doublestepLevel":435,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iamsimo4life","sex":"Male","profileImg":"https://i.postimg.cc/wjfwxj6Q/iris-3.jpg"},{"id":36,"membersId":127813,"dateAdded":"2023-03-18T21:48:59.000Z","lastUpdated":"2023-03-19T04:05:22.000Z","status":1,"totalPoints":70850,"rankingPoints":70850,"totalPass":10,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":283,"bracketLevel":546,"footswitchLevel":486,"jackLevel":273,"sideswitchLevel":486,"doublestepLevel":192,"staminaLevel":115,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RakkiiCB","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/924755977067171940/986492744136556554/Untitled-1.png"},{"id":53,"membersId":173267,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T02:02:33.000Z","status":1,"totalPoints":69984,"rankingPoints":69984,"totalPass":8,"totalFc":4,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":317,"bracketLevel":327,"footswitchLevel":468,"jackLevel":515,"sideswitchLevel":115,"doublestepLevel":596,"staminaLevel":92,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CERiNG","sex":"Unspecified","profileImg":"https://i.imgur.com/7XZZDsY.png"},{"id":185,"membersId":256,"dateAdded":"2023-03-18T22:49:44.000Z","lastUpdated":"2023-03-19T17:05:44.000Z","status":1,"totalPoints":69877,"rankingPoints":69877,"totalPass":12,"totalFc":6,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":406,"bracketLevel":173,"footswitchLevel":193,"jackLevel":206,"sideswitchLevel":82,"doublestepLevel":266,"staminaLevel":145,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DanPeriod","sex":"Male","profileImg":"https://i.ibb.co/2Sh9tbx/danderpborder.png"},{"id":6,"membersId":4362,"dateAdded":"2023-03-17T05:35:44.000Z","lastUpdated":"2023-03-19T18:26:15.000Z","status":1,"totalPoints":69363,"rankingPoints":69363,"totalPass":3,"totalFc":0,"totalFec":8,"totalQuad":7,"totalQuint":0,"crossoverLevel":428,"bracketLevel":315,"footswitchLevel":552,"jackLevel":79,"sideswitchLevel":69,"doublestepLevel":115,"staminaLevel":82,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VKIM","sex":"Male","profileImg":""},{"id":37,"membersId":173251,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-03-19T03:48:05.000Z","status":1,"totalPoints":68401,"rankingPoints":68401,"totalPass":17,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":347,"bracketLevel":335,"footswitchLevel":519,"jackLevel":465,"sideswitchLevel":164,"doublestepLevel":421,"staminaLevel":145,"isBuddy":false,"preferences":"{\"discordId\":\"sorae#7138\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sorae","sex":"Unspecified","profileImg":"https://i.imgur.com/cJEaR4t.png"},{"id":356,"membersId":173228,"dateAdded":"2023-03-19T15:33:53.000Z","lastUpdated":"2023-03-19T17:07:56.000Z","status":1,"totalPoints":68104,"rankingPoints":68104,"totalPass":15,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":456,"bracketLevel":213,"footswitchLevel":419,"jackLevel":315,"sideswitchLevel":208,"doublestepLevel":254,"staminaLevel":61,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"warriorddr","sex":"Male","profileImg":""},{"id":85,"membersId":174617,"dateAdded":"2023-03-18T21:50:59.000Z","lastUpdated":"2023-03-19T00:52:54.000Z","status":1,"totalPoints":68081,"rankingPoints":68081,"totalPass":9,"totalFc":9,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":427,"bracketLevel":147,"footswitchLevel":350,"jackLevel":252,"sideswitchLevel":245,"doublestepLevel":501,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ForkySpoon","sex":"Male","profileImg":""},{"id":279,"membersId":75846,"dateAdded":"2023-03-19T02:46:25.000Z","lastUpdated":"2023-03-19T05:02:57.000Z","status":1,"totalPoints":66768,"rankingPoints":66768,"totalPass":13,"totalFc":16,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":448,"bracketLevel":62,"footswitchLevel":187,"jackLevel":143,"sideswitchLevel":0,"doublestepLevel":279,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rarily","sex":"Female","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shaymin-land.png"},{"id":249,"membersId":173305,"dateAdded":"2023-03-19T01:12:08.000Z","lastUpdated":"2023-03-19T18:29:00.000Z","status":1,"totalPoints":66662,"rankingPoints":66662,"totalPass":10,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":267,"bracketLevel":189,"footswitchLevel":391,"jackLevel":194,"sideswitchLevel":390,"doublestepLevel":349,"staminaLevel":232,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maxximus","sex":"Male","profileImg":"https://tinypic.host/images/2022/07/23/20220722_2041002.jpg"},{"id":54,"membersId":128890,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T01:17:48.000Z","status":1,"totalPoints":66283,"rankingPoints":66283,"totalPass":12,"totalFc":7,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":694,"bracketLevel":121,"footswitchLevel":332,"jackLevel":172,"sideswitchLevel":286,"doublestepLevel":667,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Coneja","sex":"Female","profileImg":"https://i.imgur.com/7OyrT96.png"},{"id":347,"membersId":134767,"dateAdded":"2023-03-19T13:30:42.000Z","lastUpdated":"2023-03-19T16:15:13.000Z","status":1,"totalPoints":66185,"rankingPoints":66185,"totalPass":21,"totalFc":21,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":762,"bracketLevel":178,"footswitchLevel":273,"jackLevel":101,"sideswitchLevel":0,"doublestepLevel":512,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NaoHikari","sex":"Male","profileImg":"https://i.imgur.com/vuu78zs.png"},{"id":21,"membersId":128047,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-03-19T01:55:22.000Z","status":1,"totalPoints":65535,"rankingPoints":65535,"totalPass":4,"totalFc":1,"totalFec":9,"totalQuad":1,"totalQuint":0,"crossoverLevel":431,"bracketLevel":508,"footswitchLevel":448,"jackLevel":415,"sideswitchLevel":194,"doublestepLevel":421,"staminaLevel":171,"isBuddy":false,"preferences":"{\"discordId\":\"tak#7483\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Talkion","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/598009719453384716/990351215835627560/tak200.png"},{"id":124,"membersId":128002,"dateAdded":"2023-03-18T21:59:44.000Z","lastUpdated":"2023-03-18T23:53:47.000Z","status":1,"totalPoints":64871,"rankingPoints":64871,"totalPass":1,"totalFc":8,"totalFec":8,"totalQuad":6,"totalQuint":0,"crossoverLevel":604,"bracketLevel":249,"footswitchLevel":259,"jackLevel":254,"sideswitchLevel":444,"doublestepLevel":425,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MoistBruh","sex":"Male","profileImg":"https://i.pinimg.com/originals/49/d6/ca/49d6caf0bd9760b8d709fe8193b413df.jpg"},{"id":73,"membersId":76562,"dateAdded":"2023-03-18T21:50:10.000Z","lastUpdated":"2023-03-19T15:58:28.000Z","status":1,"totalPoints":64457,"rankingPoints":64457,"totalPass":11,"totalFc":8,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":470,"bracketLevel":256,"footswitchLevel":272,"jackLevel":181,"sideswitchLevel":244,"doublestepLevel":401,"staminaLevel":99,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"robin_","sex":"Male","profileImg":""},{"id":125,"membersId":147886,"dateAdded":"2023-03-18T22:00:45.000Z","lastUpdated":"2023-03-19T00:54:39.000Z","status":1,"totalPoints":61870,"rankingPoints":61870,"totalPass":2,"totalFc":8,"totalFec":2,"totalQuad":1,"totalQuint":0,"crossoverLevel":238,"bracketLevel":248,"footswitchLevel":352,"jackLevel":323,"sideswitchLevel":256,"doublestepLevel":378,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Slowest","sex":"Unspecified","profileImg":""},{"id":371,"membersId":173145,"dateAdded":"2023-03-19T17:02:51.000Z","lastUpdated":"2023-03-19T18:28:55.000Z","status":1,"totalPoints":58256,"rankingPoints":58256,"totalPass":8,"totalFc":6,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":300,"bracketLevel":243,"footswitchLevel":218,"jackLevel":139,"sideswitchLevel":113,"doublestepLevel":371,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"miklowcic","sex":"Male","profileImg":"https://i.imgur.com/CXKK11f.jpg"},{"id":61,"membersId":174010,"dateAdded":"2023-03-18T21:49:40.000Z","lastUpdated":"2023-03-19T12:45:12.000Z","status":1,"totalPoints":56943,"rankingPoints":56943,"totalPass":24,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":398,"bracketLevel":52,"footswitchLevel":207,"jackLevel":143,"sideswitchLevel":20,"doublestepLevel":257,"staminaLevel":60,"isBuddy":false,"preferences":"{\"discordId\":\"zibson#4140\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"zibson","sex":"Unspecified","profileImg":""},{"id":90,"membersId":66443,"dateAdded":"2023-03-18T21:51:24.000Z","lastUpdated":"2023-03-19T00:51:53.000Z","status":1,"totalPoints":54891,"rankingPoints":54891,"totalPass":6,"totalFc":3,"totalFec":13,"totalQuad":1,"totalQuint":0,"crossoverLevel":535,"bracketLevel":72,"footswitchLevel":312,"jackLevel":126,"sideswitchLevel":115,"doublestepLevel":561,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"limitin","sex":"Male","profileImg":""},{"id":246,"membersId":173137,"dateAdded":"2023-03-19T01:00:25.000Z","lastUpdated":"2023-03-19T10:12:00.000Z","status":1,"totalPoints":53813,"rankingPoints":53813,"totalPass":5,"totalFc":5,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":489,"bracketLevel":241,"footswitchLevel":233,"jackLevel":271,"sideswitchLevel":22,"doublestepLevel":238,"staminaLevel":132,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Floms","sex":"Male","profileImg":""},{"id":330,"membersId":173319,"dateAdded":"2023-03-19T10:01:20.000Z","lastUpdated":"2023-03-19T17:49:06.000Z","status":1,"totalPoints":53490,"rankingPoints":53490,"totalPass":15,"totalFc":5,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":349,"bracketLevel":223,"footswitchLevel":392,"jackLevel":161,"sideswitchLevel":477,"doublestepLevel":111,"staminaLevel":52,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"D0omsday","sex":"Male","profileImg":""},{"id":113,"membersId":4819,"dateAdded":"2023-03-18T21:55:29.000Z","lastUpdated":"2023-03-19T13:18:03.000Z","status":1,"totalPoints":53357,"rankingPoints":53357,"totalPass":11,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":512,"bracketLevel":96,"footswitchLevel":349,"jackLevel":82,"sideswitchLevel":234,"doublestepLevel":188,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Renbrandt","sex":"Male","profileImg":"https://i.imgur.com/WPPQI0D.png"},{"id":247,"membersId":173037,"dateAdded":"2023-03-19T01:06:17.000Z","lastUpdated":"2023-03-19T04:22:59.000Z","status":1,"totalPoints":52991,"rankingPoints":52991,"totalPass":4,"totalFc":0,"totalFec":9,"totalQuad":5,"totalQuint":0,"crossoverLevel":296,"bracketLevel":458,"footswitchLevel":276,"jackLevel":138,"sideswitchLevel":60,"doublestepLevel":327,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fanatik25","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/415354956346949632/2b58a95153add52b12d7cfa6ed6a565a.png"},{"id":355,"membersId":173142,"dateAdded":"2023-03-19T15:16:09.000Z","lastUpdated":"2023-03-19T16:19:13.000Z","status":1,"totalPoints":52933,"rankingPoints":52933,"totalPass":6,"totalFc":1,"totalFec":3,"totalQuad":1,"totalQuint":0,"crossoverLevel":181,"bracketLevel":235,"footswitchLevel":171,"jackLevel":44,"sideswitchLevel":44,"doublestepLevel":184,"staminaLevel":200,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yung ButtCoin","sex":"Male","profileImg":""},{"id":97,"membersId":173118,"dateAdded":"2023-03-18T21:52:44.000Z","lastUpdated":"2023-03-19T18:21:52.000Z","status":1,"totalPoints":52754,"rankingPoints":52754,"totalPass":4,"totalFc":4,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":499,"bracketLevel":198,"footswitchLevel":445,"jackLevel":39,"sideswitchLevel":123,"doublestepLevel":414,"staminaLevel":93,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HellKiteChaos","sex":"Male","profileImg":"https://i.imgur.com/ebA93n3.png"},{"id":11,"membersId":173184,"dateAdded":"2023-03-18T21:48:30.000Z","lastUpdated":"2023-03-19T02:57:44.000Z","status":1,"totalPoints":51546,"rankingPoints":51546,"totalPass":30,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":358,"bracketLevel":100,"footswitchLevel":275,"jackLevel":100,"sideswitchLevel":61,"doublestepLevel":336,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":\"Maybell Eigenhart (& co.) 🌻#4859\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maybell Eigenhart","sex":"Female","profileImg":"https://i.imgur.com/uZKJzLL.png"},{"id":274,"membersId":142757,"dateAdded":"2023-03-19T02:31:13.000Z","lastUpdated":"2023-03-19T06:41:52.000Z","status":1,"totalPoints":47324,"rankingPoints":47324,"totalPass":18,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":221,"footswitchLevel":195,"jackLevel":125,"sideswitchLevel":112,"doublestepLevel":128,"staminaLevel":154,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rudeshadow","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/957781689067769917/957783160312193085/kronii_avatar.png"},{"id":158,"membersId":4290,"dateAdded":"2023-03-18T22:23:23.000Z","lastUpdated":"2023-03-19T17:05:03.000Z","status":1,"totalPoints":47290,"rankingPoints":47290,"totalPass":12,"totalFc":7,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":334,"bracketLevel":161,"footswitchLevel":202,"jackLevel":135,"sideswitchLevel":239,"doublestepLevel":148,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ROBIJO","sex":"Male","profileImg":""},{"id":150,"membersId":173105,"dateAdded":"2023-03-18T22:15:52.000Z","lastUpdated":"2023-03-19T04:57:18.000Z","status":1,"totalPoints":45876,"rankingPoints":45876,"totalPass":7,"totalFc":8,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":296,"bracketLevel":139,"footswitchLevel":289,"jackLevel":220,"sideswitchLevel":152,"doublestepLevel":514,"staminaLevel":29,"isBuddy":false,"preferences":"{\"discordId\":\"Losermanwins#0088\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TheManwich","sex":"Male","profileImg":"https://i.imgur.com/yeHbdpC.png"},{"id":351,"membersId":173315,"dateAdded":"2023-03-19T14:23:32.000Z","lastUpdated":"2023-03-19T16:28:56.000Z","status":1,"totalPoints":44907,"rankingPoints":44907,"totalPass":18,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":268,"bracketLevel":425,"footswitchLevel":302,"jackLevel":147,"sideswitchLevel":104,"doublestepLevel":205,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"vintogigue","sex":"Unspecified","profileImg":""},{"id":294,"membersId":345,"dateAdded":"2023-03-19T03:45:05.000Z","lastUpdated":"2023-03-19T05:43:59.000Z","status":1,"totalPoints":43463,"rankingPoints":43463,"totalPass":6,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":236,"bracketLevel":166,"footswitchLevel":207,"jackLevel":87,"sideswitchLevel":61,"doublestepLevel":48,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kaze","sex":"Male","profileImg":""},{"id":248,"membersId":175368,"dateAdded":"2023-03-19T01:07:36.000Z","lastUpdated":"2023-03-19T04:02:39.000Z","status":1,"totalPoints":42739,"rankingPoints":42739,"totalPass":10,"totalFc":5,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":436,"bracketLevel":58,"footswitchLevel":128,"jackLevel":4,"sideswitchLevel":21,"doublestepLevel":212,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KINDLADY","sex":"Unspecified","profileImg":"https://www.simpleimageresizer.com/_uploads/photos/af86e21c/IMG_3911_250x250.jpg"},{"id":86,"membersId":76988,"dateAdded":"2023-03-18T21:51:01.000Z","lastUpdated":"2023-03-19T18:30:14.000Z","status":1,"totalPoints":41418,"rankingPoints":41418,"totalPass":11,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":316,"bracketLevel":206,"footswitchLevel":259,"jackLevel":132,"sideswitchLevel":343,"doublestepLevel":217,"staminaLevel":76,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"1ug1a","sex":"Unspecified","profileImg":"https://media.discordapp.net/attachments/615272349335420968/850073257960931388/hm_icon_Custom_2.png"},{"id":257,"membersId":173285,"dateAdded":"2023-03-19T01:39:17.000Z","lastUpdated":"2023-03-19T03:58:21.000Z","status":1,"totalPoints":41330,"rankingPoints":41330,"totalPass":8,"totalFc":2,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":195,"bracketLevel":66,"footswitchLevel":92,"jackLevel":76,"sideswitchLevel":79,"doublestepLevel":172,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pogjamie","sex":"Unspecified","profileImg":"https://i.imgur.com/Gc1UYNf.png"},{"id":156,"membersId":3761,"dateAdded":"2023-03-18T22:21:55.000Z","lastUpdated":"2023-03-18T23:35:24.000Z","status":1,"totalPoints":39077,"rankingPoints":39077,"totalPass":1,"totalFc":3,"totalFec":1,"totalQuad":3,"totalQuint":0,"crossoverLevel":185,"bracketLevel":349,"footswitchLevel":202,"jackLevel":57,"sideswitchLevel":0,"doublestepLevel":219,"staminaLevel":27,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BBLON","sex":"Male","profileImg":"https://i.imgur.com/u3fOa37.png"},{"id":235,"membersId":174904,"dateAdded":"2023-03-19T00:43:20.000Z","lastUpdated":"2023-03-19T02:16:40.000Z","status":1,"totalPoints":38609,"rankingPoints":38609,"totalPass":9,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":226,"bracketLevel":113,"footswitchLevel":124,"jackLevel":136,"sideswitchLevel":87,"doublestepLevel":94,"staminaLevel":179,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Choden","sex":"Unspecified","profileImg":""},{"id":100,"membersId":175227,"dateAdded":"2023-03-18T21:53:20.000Z","lastUpdated":"2023-03-19T00:18:41.000Z","status":1,"totalPoints":36441,"rankingPoints":36441,"totalPass":8,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":177,"bracketLevel":89,"footswitchLevel":151,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":233,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yoonjelly","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/940655461886206012/1082481090436022282/pfp_250x250.png"},{"id":259,"membersId":133783,"dateAdded":"2023-03-19T01:40:35.000Z","lastUpdated":"2023-03-19T18:03:31.000Z","status":1,"totalPoints":35127,"rankingPoints":35127,"totalPass":6,"totalFc":3,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":343,"bracketLevel":69,"footswitchLevel":180,"jackLevel":73,"sideswitchLevel":0,"doublestepLevel":100,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Viper","sex":"Female","profileImg":"https://i.imgur.com/riy3PxR.png"},{"id":45,"membersId":175355,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T18:30:57.000Z","status":1,"totalPoints":35028,"rankingPoints":35028,"totalPass":10,"totalFc":7,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":540,"bracketLevel":34,"footswitchLevel":92,"jackLevel":27,"sideswitchLevel":0,"doublestepLevel":237,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"RootReducer#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RootReducer","sex":"Male","profileImg":""},{"id":214,"membersId":160185,"dateAdded":"2023-03-18T23:56:42.000Z","lastUpdated":"2023-03-19T01:05:50.000Z","status":1,"totalPoints":33327,"rankingPoints":33327,"totalPass":7,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":250,"bracketLevel":116,"footswitchLevel":87,"jackLevel":66,"sideswitchLevel":92,"doublestepLevel":222,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nichard","sex":"Male","profileImg":""},{"id":83,"membersId":136928,"dateAdded":"2023-03-18T21:50:47.000Z","lastUpdated":"2023-03-18T23:00:48.000Z","status":1,"totalPoints":33245,"rankingPoints":33245,"totalPass":7,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":276,"bracketLevel":205,"footswitchLevel":184,"jackLevel":113,"sideswitchLevel":0,"doublestepLevel":331,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Daikyi","sex":"Male","profileImg":"https://puu.sh/J6z9c/a9edbb3013.png"},{"id":323,"membersId":1932,"dateAdded":"2023-03-19T07:13:42.000Z","lastUpdated":"2023-03-19T08:28:12.000Z","status":1,"totalPoints":32916,"rankingPoints":32916,"totalPass":13,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":63,"footswitchLevel":52,"jackLevel":36,"sideswitchLevel":0,"doublestepLevel":183,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"flip","sex":"Male","profileImg":"https://i.imgur.com/hNWIhQX.png"},{"id":77,"membersId":173043,"dateAdded":"2023-03-18T21:50:20.000Z","lastUpdated":"2023-03-19T18:28:36.000Z","status":1,"totalPoints":32761,"rankingPoints":32761,"totalPass":1,"totalFc":4,"totalFec":6,"totalQuad":1,"totalQuint":0,"crossoverLevel":275,"bracketLevel":118,"footswitchLevel":144,"jackLevel":147,"sideswitchLevel":83,"doublestepLevel":335,"staminaLevel":41,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XjojoX99","sex":"Male","profileImg":""},{"id":2,"membersId":65671,"dateAdded":"2023-03-15T03:01:39.000Z","lastUpdated":"2023-03-19T03:17:02.000Z","status":1,"totalPoints":32227,"rankingPoints":32227,"totalPass":2,"totalFc":0,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":182,"bracketLevel":120,"footswitchLevel":78,"jackLevel":5,"sideswitchLevel":0,"doublestepLevel":276,"staminaLevel":42,"isBuddy":false,"preferences":"{\"discordId\":\"Vincent#4923\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VincentITG","sex":"Male","profileImg":"https://i.imgur.com/ijai2iI.png"},{"id":272,"membersId":173223,"dateAdded":"2023-03-19T02:28:47.000Z","lastUpdated":"2023-03-19T07:22:45.000Z","status":1,"totalPoints":31784,"rankingPoints":31784,"totalPass":10,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":310,"bracketLevel":70,"footswitchLevel":233,"jackLevel":45,"sideswitchLevel":0,"doublestepLevel":422,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Koso","sex":"Male","profileImg":"https://i.imgur.com/Vy3wGll.png"},{"id":118,"membersId":174634,"dateAdded":"2023-03-18T21:57:42.000Z","lastUpdated":"2023-03-18T23:24:41.000Z","status":1,"totalPoints":31379,"rankingPoints":31379,"totalPass":11,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":145,"bracketLevel":211,"footswitchLevel":235,"jackLevel":126,"sideswitchLevel":93,"doublestepLevel":293,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sapphron","sex":"Male","profileImg":""},{"id":365,"membersId":165752,"dateAdded":"2023-03-19T16:22:47.000Z","lastUpdated":"2023-03-19T18:31:19.000Z","status":1,"totalPoints":30839,"rankingPoints":30839,"totalPass":8,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":276,"bracketLevel":97,"footswitchLevel":173,"jackLevel":39,"sideswitchLevel":41,"doublestepLevel":184,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zui","sex":"Male","profileImg":"https://i.ibb.co/nwG0Yb1/aaegt.png"},{"id":115,"membersId":62430,"dateAdded":"2023-03-18T21:56:35.000Z","lastUpdated":"2023-03-19T15:45:40.000Z","status":1,"totalPoints":30345,"rankingPoints":30345,"totalPass":4,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":115,"bracketLevel":201,"footswitchLevel":152,"jackLevel":75,"sideswitchLevel":46,"doublestepLevel":93,"staminaLevel":97,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ManeMan08","sex":"Male","profileImg":"https://i.imgur.com/Gq7wyHQ.png"},{"id":170,"membersId":134773,"dateAdded":"2023-03-18T22:35:27.000Z","lastUpdated":"2023-03-19T04:14:36.000Z","status":1,"totalPoints":29848,"rankingPoints":29848,"totalPass":3,"totalFc":14,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":346,"bracketLevel":11,"footswitchLevel":156,"jackLevel":14,"sideswitchLevel":260,"doublestepLevel":90,"staminaLevel":61,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dlim","sex":"Male","profileImg":"https://i.imgur.com/JcxLonM.png"},{"id":101,"membersId":6314,"dateAdded":"2023-03-18T21:53:24.000Z","lastUpdated":"2023-03-19T02:46:59.000Z","status":1,"totalPoints":29660,"rankingPoints":29660,"totalPass":4,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":65,"bracketLevel":201,"footswitchLevel":250,"jackLevel":38,"sideswitchLevel":39,"doublestepLevel":88,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Franksoua","sex":"Male","profileImg":"https://media.discordapp.net/attachments/274289525314945024/857105532452077608/unknown.png"},{"id":144,"membersId":2380,"dateAdded":"2023-03-18T22:12:42.000Z","lastUpdated":"2023-03-19T00:50:28.000Z","status":1,"totalPoints":28371,"rankingPoints":28371,"totalPass":5,"totalFc":0,"totalFec":3,"totalQuad":3,"totalQuint":0,"crossoverLevel":158,"bracketLevel":250,"footswitchLevel":203,"jackLevel":105,"sideswitchLevel":0,"doublestepLevel":18,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PinkDad","sex":"Male","profileImg":"https://i.imgur.com/MP3H9bu.jpg"},{"id":67,"membersId":165906,"dateAdded":"2023-03-18T21:49:54.000Z","lastUpdated":"2023-03-19T15:09:10.000Z","status":1,"totalPoints":27932,"rankingPoints":27932,"totalPass":21,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":293,"bracketLevel":119,"footswitchLevel":127,"jackLevel":48,"sideswitchLevel":25,"doublestepLevel":146,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":\"joshhead#5985\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"joshhead","sex":"Unspecified","profileImg":""},{"id":359,"membersId":174873,"dateAdded":"2023-03-19T15:50:29.000Z","lastUpdated":"2023-03-19T17:00:43.000Z","status":1,"totalPoints":26735,"rankingPoints":26735,"totalPass":6,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":75,"bracketLevel":207,"footswitchLevel":275,"jackLevel":203,"sideswitchLevel":130,"doublestepLevel":171,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"undrscore","sex":"Male","profileImg":"https://i.imgur.com/EOG7g9B.png"},{"id":307,"membersId":174829,"dateAdded":"2023-03-19T04:58:16.000Z","lastUpdated":"2023-03-19T10:44:47.000Z","status":1,"totalPoints":26430,"rankingPoints":26430,"totalPass":6,"totalFc":5,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":414,"bracketLevel":52,"footswitchLevel":153,"jackLevel":36,"sideswitchLevel":17,"doublestepLevel":49,"staminaLevel":16,"isBuddy":false,"preferences":"{\"discordId\":\"Oscar#9001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pogscar","sex":"Male","profileImg":""},{"id":225,"membersId":66661,"dateAdded":"2023-03-19T00:24:59.000Z","lastUpdated":"2023-03-19T01:18:41.000Z","status":1,"totalPoints":25409,"rankingPoints":25409,"totalPass":4,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":56,"bracketLevel":139,"footswitchLevel":125,"jackLevel":14,"sideswitchLevel":201,"doublestepLevel":25,"staminaLevel":60,"isBuddy":false,"preferences":"{\"discordId\":\"Cairo'Nairo#0673\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"jeshusha1","sex":"Male","profileImg":"https://i.imgur.com/Jg5gtfR.png"},{"id":146,"membersId":66627,"dateAdded":"2023-03-18T22:14:05.000Z","lastUpdated":"2023-03-19T18:28:23.000Z","status":1,"totalPoints":24880,"rankingPoints":24880,"totalPass":0,"totalFc":1,"totalFec":7,"totalQuad":12,"totalQuint":0,"crossoverLevel":496,"bracketLevel":12,"footswitchLevel":67,"jackLevel":34,"sideswitchLevel":0,"doublestepLevel":185,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stardust","sex":"Male","profileImg":""},{"id":9,"membersId":173420,"dateAdded":"2023-03-18T21:48:27.000Z","lastUpdated":"2023-03-19T02:10:50.000Z","status":1,"totalPoints":23791,"rankingPoints":23791,"totalPass":10,"totalFc":27,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":398,"bracketLevel":24,"footswitchLevel":131,"jackLevel":19,"sideswitchLevel":0,"doublestepLevel":120,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Martin#6291\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"slowunsteady","sex":"Unspecified","profileImg":"https://i.imgur.com/7VkeuP9.png"},{"id":157,"membersId":42011,"dateAdded":"2023-03-18T22:22:10.000Z","lastUpdated":"2023-03-19T17:34:07.000Z","status":1,"totalPoints":21798,"rankingPoints":21798,"totalPass":12,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":162,"bracketLevel":28,"footswitchLevel":139,"jackLevel":12,"sideswitchLevel":109,"doublestepLevel":79,"staminaLevel":26,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zlew","sex":"Male","profileImg":"https://i.imgur.com/THdpsEY.png"},{"id":283,"membersId":66610,"dateAdded":"2023-03-19T02:58:26.000Z","lastUpdated":"2023-03-19T03:45:41.000Z","status":1,"totalPoints":21201,"rankingPoints":21201,"totalPass":6,"totalFc":2,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":182,"bracketLevel":158,"footswitchLevel":83,"jackLevel":81,"sideswitchLevel":0,"doublestepLevel":31,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FabSab44","sex":"Female","profileImg":"https://i.ibb.co/pJB1krQ/spike4-4.jpg"},{"id":285,"membersId":124527,"dateAdded":"2023-03-19T03:05:57.000Z","lastUpdated":"2023-03-19T16:51:30.000Z","status":1,"totalPoints":20738,"rankingPoints":20738,"totalPass":1,"totalFc":4,"totalFec":6,"totalQuad":6,"totalQuint":0,"crossoverLevel":471,"bracketLevel":12,"footswitchLevel":67,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":185,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Silver Fox","sex":"Male","profileImg":"https://i.imgur.com/qb0irJQ.png"},{"id":95,"membersId":175276,"dateAdded":"2023-03-18T21:52:31.000Z","lastUpdated":"2023-03-18T22:25:22.000Z","status":1,"totalPoints":19770,"rankingPoints":19770,"totalPass":2,"totalFc":1,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":89,"bracketLevel":1,"footswitchLevel":44,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":59,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"teekmn","sex":"Unspecified","profileImg":"https://cdn-live.warthunder.com/uploads/9c/ba20ec0674301f31323c1790d35c030fe45ab0/1415940983851.jpg"},{"id":309,"membersId":173298,"dateAdded":"2023-03-19T05:12:27.000Z","lastUpdated":"2023-03-19T06:00:09.000Z","status":1,"totalPoints":18827,"rankingPoints":18827,"totalPass":9,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":238,"bracketLevel":72,"footswitchLevel":112,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":141,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JuiKuen","sex":"Male","profileImg":""},{"id":299,"membersId":173861,"dateAdded":"2023-03-19T04:11:48.000Z","lastUpdated":"2023-03-19T05:52:30.000Z","status":1,"totalPoints":18796,"rankingPoints":18796,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":88,"bracketLevel":73,"footswitchLevel":165,"jackLevel":108,"sideswitchLevel":243,"doublestepLevel":90,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hidden","sex":"Unspecified","profileImg":""},{"id":239,"membersId":127868,"dateAdded":"2023-03-19T00:45:46.000Z","lastUpdated":"2023-03-19T05:23:54.000Z","status":1,"totalPoints":18685,"rankingPoints":18685,"totalPass":7,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":317,"bracketLevel":10,"footswitchLevel":65,"jackLevel":14,"sideswitchLevel":0,"doublestepLevel":20,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"chroma","sex":"Female","profileImg":""},{"id":44,"membersId":173683,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T03:41:57.000Z","status":1,"totalPoints":18673,"rankingPoints":18673,"totalPass":8,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":342,"bracketLevel":27,"footswitchLevel":73,"jackLevel":36,"sideswitchLevel":78,"doublestepLevel":133,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TakuMii","sex":"Male","profileImg":"https://avatars.akamai.steamstatic.com/24803bdf9d1ac613cc536d28d0e72d48101d63a7_full.jpg"},{"id":237,"membersId":165884,"dateAdded":"2023-03-19T00:45:18.000Z","lastUpdated":"2023-03-19T01:39:48.000Z","status":1,"totalPoints":18613,"rankingPoints":18613,"totalPass":4,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":130,"bracketLevel":99,"footswitchLevel":105,"jackLevel":33,"sideswitchLevel":44,"doublestepLevel":120,"staminaLevel":44,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aldarole","sex":"Male","profileImg":"https://sportslogohistory.com/wp-content/uploads/2017/12/new_york_knicks_1947-1964.png"},{"id":317,"membersId":165605,"dateAdded":"2023-03-19T06:40:42.000Z","lastUpdated":"2023-03-19T09:45:51.000Z","status":1,"totalPoints":18600,"rankingPoints":18600,"totalPass":2,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":39,"bracketLevel":51,"footswitchLevel":150,"jackLevel":0,"sideswitchLevel":65,"doublestepLevel":85,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Freis","sex":"Male","profileImg":""},{"id":22,"membersId":173546,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-03-19T11:15:32.000Z","status":1,"totalPoints":17027,"rankingPoints":17027,"totalPass":9,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":166,"bracketLevel":60,"footswitchLevel":153,"jackLevel":62,"sideswitchLevel":0,"doublestepLevel":182,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":\"Piols#6625\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Piols","sex":"Male","profileImg":""},{"id":210,"membersId":127797,"dateAdded":"2023-03-18T23:45:55.000Z","lastUpdated":"2023-03-19T03:24:58.000Z","status":1,"totalPoints":16607,"rankingPoints":16607,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":50,"bracketLevel":76,"footswitchLevel":160,"jackLevel":29,"sideswitchLevel":16,"doublestepLevel":40,"staminaLevel":65,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dancingmaractus","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/704364807155089498/952378600886272020/maractus.png"},{"id":321,"membersId":175218,"dateAdded":"2023-03-19T07:08:13.000Z","lastUpdated":"2023-03-19T18:30:33.000Z","status":1,"totalPoints":15754,"rankingPoints":15754,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":113,"bracketLevel":14,"footswitchLevel":10,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":117,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zivie87","sex":"Male","profileImg":""},{"id":62,"membersId":165750,"dateAdded":"2023-03-18T21:49:46.000Z","lastUpdated":"2023-03-19T12:29:39.000Z","status":1,"totalPoints":14800,"rankingPoints":14800,"totalPass":12,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":15,"footswitchLevel":111,"jackLevel":13,"sideswitchLevel":0,"doublestepLevel":129,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mayflower","sex":"Unspecified","profileImg":"https://mayf.pink/files/groove.jpg"},{"id":241,"membersId":172941,"dateAdded":"2023-03-19T00:49:32.000Z","lastUpdated":"2023-03-19T01:58:17.000Z","status":1,"totalPoints":14386,"rankingPoints":14386,"totalPass":5,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":97,"bracketLevel":86,"footswitchLevel":93,"jackLevel":6,"sideswitchLevel":27,"doublestepLevel":141,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Bag Man","sex":"Male","profileImg":"https://remywiki.com/images/thumb/d/d4/Bag.png/200px-Bag.png"},{"id":28,"membersId":77862,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-18T22:04:22.000Z","status":1,"totalPoints":14328,"rankingPoints":14328,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":11,"bracketLevel":193,"footswitchLevel":105,"jackLevel":92,"sideswitchLevel":0,"doublestepLevel":170,"staminaLevel":46,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JeffreyATW","sex":"Male","profileImg":"https://jeffreyatw.com/static/images/atw-tfti-250.png"},{"id":350,"membersId":130553,"dateAdded":"2023-03-19T14:13:28.000Z","lastUpdated":"2023-03-19T18:29:11.000Z","status":1,"totalPoints":14181,"rankingPoints":14181,"totalPass":3,"totalFc":3,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":297,"bracketLevel":11,"footswitchLevel":56,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":84,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NinjaNabi","sex":"Female","profileImg":"https://i.ibb.co/ykdXrTt/nabiderpwithborder.png"},{"id":5,"membersId":173384,"dateAdded":"2023-03-16T21:50:13.000Z","lastUpdated":"2023-03-19T00:11:03.000Z","status":1,"totalPoints":13906,"rankingPoints":13906,"totalPass":0,"totalFc":2,"totalFec":1,"totalQuad":3,"totalQuint":0,"crossoverLevel":188,"bracketLevel":4,"footswitchLevel":22,"jackLevel":64,"sideswitchLevel":0,"doublestepLevel":53,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hiten","sex":"Male","profileImg":"https://i.imgur.com/TRRmDiz.png"},{"id":180,"membersId":128724,"dateAdded":"2023-03-18T22:43:47.000Z","lastUpdated":"2023-03-19T00:25:28.000Z","status":1,"totalPoints":12932,"rankingPoints":12932,"totalPass":3,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":33,"bracketLevel":150,"footswitchLevel":73,"jackLevel":125,"sideswitchLevel":0,"doublestepLevel":11,"staminaLevel":35,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LFK","sex":"Unspecified","profileImg":"https://i.imgur.com/mCnGAVc.png"},{"id":281,"membersId":175376,"dateAdded":"2023-03-19T02:50:59.000Z","lastUpdated":"2023-03-19T03:41:58.000Z","status":1,"totalPoints":12090,"rankingPoints":12090,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":219,"bracketLevel":9,"footswitchLevel":26,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":14,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bxrru","sex":"Unspecified","profileImg":""},{"id":60,"membersId":173320,"dateAdded":"2023-03-18T21:49:36.000Z","lastUpdated":"2023-03-19T07:01:46.000Z","status":1,"totalPoints":11957,"rankingPoints":11957,"totalPass":1,"totalFc":2,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":152,"bracketLevel":0,"footswitchLevel":17,"jackLevel":10,"sideswitchLevel":0,"doublestepLevel":209,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"L4viR","sex":"Male","profileImg":""},{"id":51,"membersId":4062,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T15:29:33.000Z","status":1,"totalPoints":11810,"rankingPoints":11810,"totalPass":2,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":77,"bracketLevel":16,"footswitchLevel":37,"jackLevel":212,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PkRynker","sex":"Male","profileImg":""},{"id":96,"membersId":173453,"dateAdded":"2023-03-18T21:52:39.000Z","lastUpdated":"2023-03-19T18:28:19.000Z","status":1,"totalPoints":11415,"rankingPoints":11415,"totalPass":2,"totalFc":6,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":304,"bracketLevel":9,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":32,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kikoia","sex":"Female","profileImg":"https://i.imgur.com/KCsbDb7.png"},{"id":91,"membersId":173007,"dateAdded":"2023-03-18T21:51:29.000Z","lastUpdated":"2023-03-18T23:02:57.000Z","status":1,"totalPoints":11048,"rankingPoints":11048,"totalPass":0,"totalFc":0,"totalFec":6,"totalQuad":3,"totalQuint":0,"crossoverLevel":262,"bracketLevel":12,"footswitchLevel":38,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":84,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"kodensa#3582\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"kodensa","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/902652921890611254/1086771021857697812/a.jpg"},{"id":261,"membersId":175353,"dateAdded":"2023-03-19T01:45:09.000Z","lastUpdated":"2023-03-19T02:24:01.000Z","status":1,"totalPoints":10617,"rankingPoints":10617,"totalPass":16,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":178,"bracketLevel":0,"footswitchLevel":21,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":18,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"meecheezink","sex":"Female","profileImg":""},{"id":197,"membersId":165854,"dateAdded":"2023-03-18T23:08:53.000Z","lastUpdated":"2023-03-19T00:20:53.000Z","status":1,"totalPoints":9764,"rankingPoints":9764,"totalPass":9,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":181,"bracketLevel":6,"footswitchLevel":38,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":3,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nazrininator","sex":"Male","profileImg":""},{"id":251,"membersId":175221,"dateAdded":"2023-03-19T01:23:20.000Z","lastUpdated":"2023-03-19T10:47:06.000Z","status":1,"totalPoints":9180,"rankingPoints":9180,"totalPass":16,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":192,"bracketLevel":5,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":59,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"atticusgg","sex":"Unspecified","profileImg":""},{"id":75,"membersId":173399,"dateAdded":"2023-03-18T21:50:18.000Z","lastUpdated":"2023-03-19T00:35:46.000Z","status":1,"totalPoints":8950,"rankingPoints":8950,"totalPass":1,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":169,"bracketLevel":0,"footswitchLevel":23,"jackLevel":41,"sideswitchLevel":0,"doublestepLevel":67,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DJEmbrace","sex":"Unspecified","profileImg":""},{"id":195,"membersId":75729,"dateAdded":"2023-03-18T23:05:34.000Z","lastUpdated":"2023-03-19T16:26:45.000Z","status":1,"totalPoints":8917,"rankingPoints":8917,"totalPass":14,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":115,"bracketLevel":0,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":54,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"help","sex":"Male","profileImg":"https://i.imgur.com/AKnOujq.jpg"},{"id":192,"membersId":127823,"dateAdded":"2023-03-18T23:02:21.000Z","lastUpdated":"2023-03-19T02:20:39.000Z","status":1,"totalPoints":8118,"rankingPoints":8118,"totalPass":3,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":82,"bracketLevel":2,"footswitchLevel":52,"jackLevel":26,"sideswitchLevel":0,"doublestepLevel":7,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":\"Fresca#7450\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JONBUDDY","sex":"Male","profileImg":"https://i.imgur.com/7K4gyoz.png"},{"id":59,"membersId":173651,"dateAdded":"2023-03-18T21:49:33.000Z","lastUpdated":"2023-03-19T17:23:29.000Z","status":1,"totalPoints":7251,"rankingPoints":7251,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":26,"bracketLevel":0,"footswitchLevel":44,"jackLevel":41,"sideswitchLevel":0,"doublestepLevel":70,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zydra","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/750387080932229212/977307823811747880/250250zy.png"},{"id":47,"membersId":174173,"dateAdded":"2023-03-18T21:49:03.000Z","lastUpdated":"2023-03-19T18:18:50.000Z","status":1,"totalPoints":6916,"rankingPoints":6916,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":35,"bracketLevel":0,"footswitchLevel":62,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lillyvideogames","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/910836877647577109/1087038719334289550/aoko-pfp-smol.png"},{"id":168,"membersId":163585,"dateAdded":"2023-03-18T22:32:25.000Z","lastUpdated":"2023-03-19T00:30:19.000Z","status":1,"totalPoints":6879,"rankingPoints":6879,"totalPass":0,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":41,"bracketLevel":0,"footswitchLevel":97,"jackLevel":40,"sideswitchLevel":0,"doublestepLevel":39,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MegaSphere","sex":"Male","profileImg":"https://i.imgur.com/p34Ni8n.png"},{"id":322,"membersId":124751,"dateAdded":"2023-03-19T07:13:03.000Z","lastUpdated":"2023-03-19T08:56:43.000Z","status":1,"totalPoints":6077,"rankingPoints":6077,"totalPass":1,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":113,"bracketLevel":0,"footswitchLevel":15,"jackLevel":0,"sideswitchLevel":21,"doublestepLevel":35,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dashark","sex":"Male","profileImg":"https://i.imgur.com/GDN5TxQ.jpg"},{"id":134,"membersId":75805,"dateAdded":"2023-03-18T22:04:19.000Z","lastUpdated":"2023-03-19T18:30:22.000Z","status":1,"totalPoints":5666,"rankingPoints":5666,"totalPass":1,"totalFc":1,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":169,"bracketLevel":11,"footswitchLevel":28,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Accioskullar","sex":"Male","profileImg":""},{"id":374,"membersId":174568,"dateAdded":"2023-03-19T17:22:09.000Z","lastUpdated":"2023-03-19T18:29:13.000Z","status":1,"totalPoints":5587,"rankingPoints":5587,"totalPass":1,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":81,"bracketLevel":0,"footswitchLevel":33,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":3,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JellySlosh","sex":"Male","profileImg":""},{"id":316,"membersId":175383,"dateAdded":"2023-03-19T06:19:29.000Z","lastUpdated":"2023-03-19T08:28:52.000Z","status":1,"totalPoints":5480,"rankingPoints":5480,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":105,"bracketLevel":12,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":23,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DenryuRider","sex":"Male","profileImg":""},{"id":342,"membersId":175360,"dateAdded":"2023-03-19T12:13:12.000Z","lastUpdated":"2023-03-19T14:45:49.000Z","status":1,"totalPoints":5200,"rankingPoints":5200,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":20,"bracketLevel":0,"footswitchLevel":68,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Goode","sex":"Male","profileImg":""},{"id":306,"membersId":175382,"dateAdded":"2023-03-19T04:43:52.000Z","lastUpdated":"2023-03-19T05:22:16.000Z","status":1,"totalPoints":4615,"rankingPoints":4615,"totalPass":2,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":32,"bracketLevel":0,"footswitchLevel":3,"jackLevel":31,"sideswitchLevel":0,"doublestepLevel":31,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KATERINA","sex":"Female","profileImg":""},{"id":172,"membersId":173110,"dateAdded":"2023-03-18T22:35:55.000Z","lastUpdated":"2023-03-18T22:55:38.000Z","status":1,"totalPoints":4436,"rankingPoints":4436,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":2,"totalQuint":0,"crossoverLevel":59,"bracketLevel":0,"footswitchLevel":4,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":26,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shane_ITG_","sex":"Unspecified","profileImg":"https://i.imgur.com/px8JzPD.png"},{"id":244,"membersId":109985,"dateAdded":"2023-03-19T00:54:29.000Z","lastUpdated":"2023-03-19T18:04:39.000Z","status":1,"totalPoints":4423,"rankingPoints":4423,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":104,"bracketLevel":5,"footswitchLevel":14,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"soler98012","sex":"Unspecified","profileImg":""},{"id":104,"membersId":2600,"dateAdded":"2023-03-18T21:53:35.000Z","lastUpdated":"2023-03-18T22:13:23.000Z","status":1,"totalPoints":4342,"rankingPoints":4342,"totalPass":1,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":110,"bracketLevel":12,"footswitchLevel":55,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DRON","sex":"Male","profileImg":"https://i.imgur.com/ezVfWhH.png"},{"id":280,"membersId":173125,"dateAdded":"2023-03-19T02:48:37.000Z","lastUpdated":"2023-03-19T04:00:12.000Z","status":1,"totalPoints":4033,"rankingPoints":4033,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":3,"totalQuint":0,"crossoverLevel":122,"bracketLevel":12,"footswitchLevel":30,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MajorOfMusic","sex":"Male","profileImg":""},{"id":369,"membersId":66714,"dateAdded":"2023-03-19T16:37:55.000Z","lastUpdated":"2023-03-19T17:17:42.000Z","status":1,"totalPoints":4019,"rankingPoints":4019,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":76,"bracketLevel":0,"footswitchLevel":6,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":41,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lunal3blanc","sex":"Female","profileImg":""},{"id":318,"membersId":127775,"dateAdded":"2023-03-19T06:41:30.000Z","lastUpdated":"2023-03-19T08:14:17.000Z","status":1,"totalPoints":3772,"rankingPoints":3772,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":31,"bracketLevel":1,"footswitchLevel":0,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nv","sex":"Male","profileImg":"https://i.imgur.com/4z5tNia.png"},{"id":242,"membersId":7558,"dateAdded":"2023-03-19T00:50:18.000Z","lastUpdated":"2023-03-19T18:29:48.000Z","status":1,"totalPoints":3501,"rankingPoints":3501,"totalPass":0,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":88,"bracketLevel":0,"footswitchLevel":26,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PanStyle","sex":"Male","profileImg":""},{"id":245,"membersId":169204,"dateAdded":"2023-03-19T00:58:23.000Z","lastUpdated":"2023-03-19T04:01:43.000Z","status":1,"totalPoints":3226,"rankingPoints":3226,"totalPass":0,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":0,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"takatzu48","sex":"Male","profileImg":""},{"id":143,"membersId":66673,"dateAdded":"2023-03-18T22:10:43.000Z","lastUpdated":"2023-03-18T23:34:09.000Z","status":1,"totalPoints":3059,"rankingPoints":3059,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":9,"bracketLevel":0,"footswitchLevel":12,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":114,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Chief Skittles#1789\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"ChiefSkittles","sex":"Male","profileImg":"https://i.imgur.com/s5sMjf4.png"},{"id":218,"membersId":165796,"dateAdded":"2023-03-19T00:11:42.000Z","lastUpdated":"2023-03-19T04:00:31.000Z","status":1,"totalPoints":2927,"rankingPoints":2927,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":14,"bracketLevel":0,"footswitchLevel":39,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Caji123","sex":"Male","profileImg":""},{"id":71,"membersId":173056,"dateAdded":"2023-03-18T21:50:00.000Z","lastUpdated":"2023-03-18T23:00:38.000Z","status":1,"totalPoints":2909,"rankingPoints":2909,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":80,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":67,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Braeden","sex":"Male","profileImg":""},{"id":224,"membersId":173438,"dateAdded":"2023-03-19T00:18:20.000Z","lastUpdated":"2023-03-19T01:26:31.000Z","status":1,"totalPoints":2599,"rankingPoints":2599,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":1,"totalQuint":0,"crossoverLevel":120,"bracketLevel":12,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nauebp","sex":"Male","profileImg":""},{"id":368,"membersId":175389,"dateAdded":"2023-03-19T16:33:48.000Z","lastUpdated":"2023-03-19T18:16:52.000Z","status":1,"totalPoints":2555,"rankingPoints":2555,"totalPass":0,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":102,"bracketLevel":0,"footswitchLevel":8,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"patj","sex":"Male","profileImg":""},{"id":179,"membersId":175367,"dateAdded":"2023-03-18T22:41:58.000Z","lastUpdated":"2023-03-19T01:50:09.000Z","status":1,"totalPoints":2296,"rankingPoints":2296,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":48,"bracketLevel":0,"footswitchLevel":18,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rufus","sex":"Male","profileImg":""},{"id":8,"membersId":167028,"dateAdded":"2023-03-18T21:48:25.000Z","lastUpdated":"2023-03-19T02:53:13.000Z","status":1,"totalPoints":1761,"rankingPoints":1761,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":81,"bracketLevel":8,"footswitchLevel":21,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"eightbitderp","sex":"Male","profileImg":"https://i.imgur.com/YAKidX4.png"},{"id":378,"membersId":175058,"dateAdded":"2023-03-19T17:30:42.000Z","lastUpdated":"2023-03-19T17:50:10.000Z","status":1,"totalPoints":1381,"rankingPoints":1381,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1,"bracketLevel":2,"footswitchLevel":6,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nino","sex":"Male","profileImg":"https://i.ibb.co/bQHGCm5/Avatar.png"},{"id":386,"membersId":982,"dateAdded":"2023-03-19T17:50:20.000Z","lastUpdated":"2023-03-19T18:22:33.000Z","status":1,"totalPoints":1338,"rankingPoints":1338,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":1,"totalQuint":0,"crossoverLevel":62,"bracketLevel":12,"footswitchLevel":25,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"andy457","sex":"Male","profileImg":""},{"id":133,"membersId":173658,"dateAdded":"2023-03-18T22:03:54.000Z","lastUpdated":"2023-03-18T22:14:23.000Z","status":1,"totalPoints":1332,"rankingPoints":1332,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":45,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"false_parallax","sex":"Female","profileImg":""},{"id":24,"membersId":163331,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-03-18T21:52:51.000Z","status":1,"totalPoints":1083,"rankingPoints":1083,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":6,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":74,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Azirixx","sex":"Male","profileImg":"https://i.ibb.co/pKqM0s4/azi-Cool-GS.png"},{"id":232,"membersId":2910,"dateAdded":"2023-03-19T00:35:39.000Z","lastUpdated":"2023-03-19T18:20:59.000Z","status":1,"totalPoints":1044,"rankingPoints":1044,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":25,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vagabond","sex":"Male","profileImg":"https://www.personality-database.com/profile_images/152769.png"},{"id":377,"membersId":173589,"dateAdded":"2023-03-19T17:30:07.000Z","lastUpdated":"2023-03-19T18:20:05.000Z","status":1,"totalPoints":1028,"rankingPoints":1028,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":7,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bader","sex":"Male","profileImg":""},{"id":74,"membersId":173087,"dateAdded":"2023-03-18T21:50:14.000Z","lastUpdated":"2023-03-18T23:03:11.000Z","status":1,"totalPoints":959,"rankingPoints":959,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":44,"bracketLevel":8,"footswitchLevel":18,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gr00txD","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1026379676476956672/rxMbgeMF_400x400.jpg"},{"id":84,"membersId":129655,"dateAdded":"2023-03-18T21:50:54.000Z","lastUpdated":"2023-03-18T22:59:28.000Z","status":1,"totalPoints":902,"rankingPoints":902,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":41,"bracketLevel":0,"footswitchLevel":3,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hunter","sex":"Male","profileImg":"https://i.imgur.com/H2aLLZ3.png"},{"id":131,"membersId":173502,"dateAdded":"2023-03-18T22:03:14.000Z","lastUpdated":"2023-03-19T01:03:02.000Z","status":1,"totalPoints":890,"rankingPoints":890,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":41,"bracketLevel":0,"footswitchLevel":3,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Salsa","sex":"Female","profileImg":""},{"id":264,"membersId":175371,"dateAdded":"2023-03-19T01:47:19.000Z","lastUpdated":"2023-03-19T01:50:10.000Z","status":1,"totalPoints":587,"rankingPoints":587,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1,"bracketLevel":0,"footswitchLevel":10,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cool Brick","sex":"Male","profileImg":""}],"rivalMembersIds":[]}} \ No newline at end of file diff --git a/server/files/leaderboardinfo b/server/files/leaderboardinfo new file mode 100644 index 0000000..b227124 --- /dev/null +++ b/server/files/leaderboardinfo @@ -0,0 +1 @@ +{"success":true,"message":"","data":{"leaderboard":[{"id":320,"membersId":1062,"dateAdded":"2023-03-19T07:01:01.000Z","lastUpdated":"2023-05-05T00:00:05.000Z","status":1,"totalPoints":1397742,"rankingPoints":584699,"totalPass":21,"totalFc":10,"totalFec":71,"totalQuad":124,"totalQuint":16,"crossoverLevel":5302,"bracketLevel":6879,"footswitchLevel":5878,"jackLevel":6449,"sideswitchLevel":6935,"doublestepLevel":6024,"staminaLevel":6351,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iamchris4life","sex":"Male","profileImg":""},{"id":398,"membersId":2643,"dateAdded":"2023-03-19T19:02:10.000Z","lastUpdated":"2023-04-29T21:01:06.000Z","status":1,"totalPoints":1580636,"rankingPoints":575990,"totalPass":47,"totalFc":16,"totalFec":131,"totalQuad":85,"totalQuint":2,"crossoverLevel":6315,"bracketLevel":7821,"footswitchLevel":6860,"jackLevel":7448,"sideswitchLevel":7132,"doublestepLevel":6996,"staminaLevel":6971,"isBuddy":false,"preferences":"{\"discordId\":\"ChunkChunka#1023\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chunka","sex":"Male","profileImg":""},{"id":167,"membersId":935,"dateAdded":"2023-03-18T22:30:49.000Z","lastUpdated":"2023-05-06T14:36:45.000Z","status":1,"totalPoints":1352777,"rankingPoints":574898,"totalPass":64,"totalFc":25,"totalFec":103,"totalQuad":38,"totalQuint":0,"crossoverLevel":4734,"bracketLevel":6563,"footswitchLevel":5447,"jackLevel":5667,"sideswitchLevel":6785,"doublestepLevel":5371,"staminaLevel":6810,"isBuddy":false,"preferences":"{\"discordId\":\"Maxx#7891\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maxx-Storm","sex":"Male","profileImg":""},{"id":76,"membersId":87476,"dateAdded":"2023-03-18T21:50:19.000Z","lastUpdated":"2023-05-06T01:35:41.000Z","status":1,"totalPoints":2070149,"rankingPoints":565163,"totalPass":52,"totalFc":52,"totalFec":68,"totalQuad":212,"totalQuint":29,"crossoverLevel":9549,"bracketLevel":9411,"footswitchLevel":9468,"jackLevel":9420,"sideswitchLevel":9684,"doublestepLevel":9529,"staminaLevel":7447,"isBuddy":true,"preferences":"{\"discordId\":\"dimo#0420\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"quintin tarandimo","sex":"Male","profileImg":"https://imgur.com/4T9VibU.png"},{"id":12,"membersId":133006,"dateAdded":"2023-03-18T21:48:36.000Z","lastUpdated":"2023-05-06T02:22:54.000Z","status":1,"totalPoints":1896671,"rankingPoints":564258,"totalPass":9,"totalFc":70,"totalFec":258,"totalQuad":53,"totalQuint":1,"crossoverLevel":8582,"bracketLevel":8449,"footswitchLevel":8421,"jackLevel":8876,"sideswitchLevel":8555,"doublestepLevel":8861,"staminaLevel":8136,"isBuddy":true,"preferences":"{\"discordId\":\"ChanceR#2908\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chance R.","sex":"Male","profileImg":""},{"id":43,"membersId":6284,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-05-04T22:26:52.000Z","status":1,"totalPoints":1564644,"rankingPoints":559273,"totalPass":84,"totalFc":36,"totalFec":97,"totalQuad":61,"totalQuint":0,"crossoverLevel":6353,"bracketLevel":7742,"footswitchLevel":7256,"jackLevel":7879,"sideswitchLevel":8300,"doublestepLevel":6862,"staminaLevel":6083,"isBuddy":false,"preferences":"{\"discordId\":\"leoncbrunson#1079\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Twix","sex":"Male","profileImg":""},{"id":51,"membersId":4062,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-05-06T02:45:58.000Z","status":1,"totalPoints":1430143,"rankingPoints":557140,"totalPass":88,"totalFc":50,"totalFec":101,"totalQuad":38,"totalQuint":0,"crossoverLevel":5017,"bracketLevel":7191,"footswitchLevel":6278,"jackLevel":7273,"sideswitchLevel":7102,"doublestepLevel":5525,"staminaLevel":7087,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rynker","sex":"Male","profileImg":""},{"id":352,"membersId":146716,"dateAdded":"2023-03-19T14:35:19.000Z","lastUpdated":"2023-04-23T22:58:02.000Z","status":1,"totalPoints":1437977,"rankingPoints":542605,"totalPass":92,"totalFc":44,"totalFec":71,"totalQuad":54,"totalQuint":0,"crossoverLevel":6009,"bracketLevel":8000,"footswitchLevel":7439,"jackLevel":7320,"sideswitchLevel":8271,"doublestepLevel":6947,"staminaLevel":4566,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mitt Romney","sex":"Male","profileImg":""},{"id":42,"membersId":147890,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-05-06T18:09:27.000Z","status":1,"totalPoints":1829495,"rankingPoints":533487,"totalPass":184,"totalFc":78,"totalFec":137,"totalQuad":9,"totalQuint":0,"crossoverLevel":8477,"bracketLevel":8823,"footswitchLevel":8740,"jackLevel":8431,"sideswitchLevel":8844,"doublestepLevel":8659,"staminaLevel":6344,"isBuddy":true,"preferences":"{\"discordId\":\"cmmf#8747\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Matt Silver","sex":"Unspecified","profileImg":"https://i.imgur.com/XWuHg9J.png"},{"id":6,"membersId":4362,"dateAdded":"2023-03-17T05:35:44.000Z","lastUpdated":"2023-05-06T19:52:44.000Z","status":1,"totalPoints":1490023,"rankingPoints":531953,"totalPass":117,"totalFc":44,"totalFec":54,"totalQuad":68,"totalQuint":10,"crossoverLevel":5992,"bracketLevel":7354,"footswitchLevel":6715,"jackLevel":7104,"sideswitchLevel":7569,"doublestepLevel":6837,"staminaLevel":6105,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TLotRP by J.R.R. Talkion","sex":"Male","profileImg":"https://i.imgur.com/szMNZZr.jpg"},{"id":21,"membersId":128047,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-05-07T01:54:15.000Z","status":1,"totalPoints":1624106,"rankingPoints":523870,"totalPass":97,"totalFc":61,"totalFec":120,"totalQuad":40,"totalQuint":0,"crossoverLevel":7580,"bracketLevel":8213,"footswitchLevel":8144,"jackLevel":8246,"sideswitchLevel":8720,"doublestepLevel":8148,"staminaLevel":4529,"isBuddy":false,"preferences":"{\"discordId\":\"tak#7483\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rynken","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/598009719453384716/990351215835627560/tak200.png"},{"id":57,"membersId":58407,"dateAdded":"2023-03-18T21:49:19.000Z","lastUpdated":"2023-05-04T17:58:49.000Z","status":1,"totalPoints":1572684,"rankingPoints":523465,"totalPass":142,"totalFc":47,"totalFec":60,"totalQuad":74,"totalQuint":0,"crossoverLevel":6598,"bracketLevel":7299,"footswitchLevel":6872,"jackLevel":6381,"sideswitchLevel":7068,"doublestepLevel":6771,"staminaLevel":6982,"isBuddy":false,"preferences":"{\"discordId\":\"pochoitg#4891\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pocho","sex":"Male","profileImg":"https://c.tenor.com/qFiVMJ7kDGwAAAAM/catjam.gif"},{"id":34,"membersId":62987,"dateAdded":"2023-03-18T21:48:58.000Z","lastUpdated":"2023-05-06T23:48:59.000Z","status":1,"totalPoints":1783975,"rankingPoints":514118,"totalPass":126,"totalFc":57,"totalFec":109,"totalQuad":101,"totalQuint":16,"crossoverLevel":8591,"bracketLevel":8468,"footswitchLevel":8651,"jackLevel":8553,"sideswitchLevel":9003,"doublestepLevel":8365,"staminaLevel":5447,"isBuddy":false,"preferences":"{\"discordId\":\"sighmoe#5684\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jimmy Butler","sex":"Male","profileImg":"https://i.postimg.cc/wjfwxj6Q/iris-3.jpg"},{"id":161,"membersId":128535,"dateAdded":"2023-03-18T22:25:38.000Z","lastUpdated":"2023-05-06T04:07:08.000Z","status":1,"totalPoints":1864251,"rankingPoints":513023,"totalPass":166,"totalFc":68,"totalFec":153,"totalQuad":17,"totalQuint":0,"crossoverLevel":8726,"bracketLevel":8334,"footswitchLevel":8558,"jackLevel":8366,"sideswitchLevel":8897,"doublestepLevel":8675,"staminaLevel":6769,"isBuddy":false,"preferences":"{\"discordId\":\"Ritz#7358\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ritz","sex":"Male","profileImg":"https://i.imgur.com/iwmsWIc.png"},{"id":29,"membersId":35701,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-05-05T22:48:04.000Z","status":1,"totalPoints":1507812,"rankingPoints":511501,"totalPass":156,"totalFc":24,"totalFec":79,"totalQuad":60,"totalQuint":3,"crossoverLevel":6921,"bracketLevel":6890,"footswitchLevel":7082,"jackLevel":5705,"sideswitchLevel":7974,"doublestepLevel":6747,"staminaLevel":5424,"isBuddy":false,"preferences":"{\"discordId\":\"lolipo#2695\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lolipo","sex":"Female","profileImg":"https://imgur.com/VEubW0D.jpg"},{"id":13,"membersId":7457,"dateAdded":"2023-03-18T21:48:42.000Z","lastUpdated":"2023-05-06T22:18:28.000Z","status":1,"totalPoints":1113626,"rankingPoints":510601,"totalPass":85,"totalFc":43,"totalFec":73,"totalQuad":6,"totalQuint":0,"crossoverLevel":3565,"bracketLevel":5029,"footswitchLevel":4071,"jackLevel":5652,"sideswitchLevel":2977,"doublestepLevel":4220,"staminaLevel":6715,"isBuddy":false,"preferences":"{\"discordId\":\"Bran#1685\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Krushrpants","sex":"Male","profileImg":""},{"id":101,"membersId":6314,"dateAdded":"2023-03-18T21:53:24.000Z","lastUpdated":"2023-05-06T04:25:11.000Z","status":1,"totalPoints":1228788,"rankingPoints":502987,"totalPass":136,"totalFc":53,"totalFec":49,"totalQuad":19,"totalQuint":0,"crossoverLevel":4591,"bracketLevel":6022,"footswitchLevel":5105,"jackLevel":6166,"sideswitchLevel":4550,"doublestepLevel":5332,"staminaLevel":5104,"isBuddy":false,"preferences":"{\"discordId\":\"frankoice#5517\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Franksoua","sex":"Male","profileImg":"https://media.discordapp.net/attachments/274289525314945024/857105532452077608/unknown.png"},{"id":622,"membersId":8181,"dateAdded":"2023-03-21T22:41:00.000Z","lastUpdated":"2023-04-28T03:30:18.000Z","status":1,"totalPoints":919176,"rankingPoints":501523,"totalPass":54,"totalFc":38,"totalFec":65,"totalQuad":13,"totalQuint":0,"crossoverLevel":3129,"bracketLevel":4758,"footswitchLevel":4954,"jackLevel":3151,"sideswitchLevel":3910,"doublestepLevel":4324,"staminaLevel":2778,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"baraka","sex":"Male","profileImg":""},{"id":116,"membersId":7385,"dateAdded":"2023-03-18T21:56:54.000Z","lastUpdated":"2023-05-04T00:11:22.000Z","status":1,"totalPoints":1907211,"rankingPoints":500691,"totalPass":152,"totalFc":84,"totalFec":158,"totalQuad":54,"totalQuint":0,"crossoverLevel":8669,"bracketLevel":8493,"footswitchLevel":8632,"jackLevel":8401,"sideswitchLevel":8802,"doublestepLevel":8628,"staminaLevel":8028,"isBuddy":true,"preferences":"{\"discordId\":\"RainbowXynn#3637\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Xynn","sex":"Male","profileImg":"https://i.imgur.com/mbdst0K.jpg"},{"id":187,"membersId":7737,"dateAdded":"2023-03-18T22:53:48.000Z","lastUpdated":"2023-05-02T02:53:01.000Z","status":1,"totalPoints":1458010,"rankingPoints":500130,"totalPass":153,"totalFc":84,"totalFec":71,"totalQuad":3,"totalQuint":0,"crossoverLevel":5398,"bracketLevel":7160,"footswitchLevel":6701,"jackLevel":7126,"sideswitchLevel":7534,"doublestepLevel":6156,"staminaLevel":6647,"isBuddy":true,"preferences":"{\"discordId\":\"LemmingOnTheRun#7482\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DF.LemmingOnTheRun","sex":"Male","profileImg":""},{"id":48,"membersId":173699,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-05-06T21:15:36.000Z","status":1,"totalPoints":1425728,"rankingPoints":495765,"totalPass":137,"totalFc":91,"totalFec":108,"totalQuad":10,"totalQuint":0,"crossoverLevel":6345,"bracketLevel":7109,"footswitchLevel":6750,"jackLevel":6098,"sideswitchLevel":6824,"doublestepLevel":6453,"staminaLevel":6391,"isBuddy":true,"preferences":"{\"discordId\":\"[7] Disco Pop\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"erictran0","sex":"Male","profileImg":""},{"id":278,"membersId":172977,"dateAdded":"2023-03-19T02:42:39.000Z","lastUpdated":"2023-05-06T23:31:07.000Z","status":1,"totalPoints":1195081,"rankingPoints":491970,"totalPass":90,"totalFc":38,"totalFec":59,"totalQuad":35,"totalQuint":0,"crossoverLevel":4715,"bracketLevel":5823,"footswitchLevel":5739,"jackLevel":6651,"sideswitchLevel":6977,"doublestepLevel":5433,"staminaLevel":5069,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"marqqq","sex":"Male","profileImg":""},{"id":121,"membersId":173301,"dateAdded":"2023-03-18T21:58:47.000Z","lastUpdated":"2023-05-05T22:09:10.000Z","status":1,"totalPoints":1426524,"rankingPoints":491844,"totalPass":143,"totalFc":82,"totalFec":71,"totalQuad":11,"totalQuint":0,"crossoverLevel":5725,"bracketLevel":6801,"footswitchLevel":6179,"jackLevel":6166,"sideswitchLevel":6791,"doublestepLevel":6507,"staminaLevel":6195,"isBuddy":false,"preferences":"{\"discordId\":\"Chabala#4798\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chabala","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/706313433422757888/960710993426661376/20190925_213154.jpg"},{"id":240,"membersId":30618,"dateAdded":"2023-03-19T00:45:49.000Z","lastUpdated":"2023-05-06T18:36:54.000Z","status":1,"totalPoints":1042912,"rankingPoints":489897,"totalPass":67,"totalFc":50,"totalFec":57,"totalQuad":19,"totalQuint":0,"crossoverLevel":3755,"bracketLevel":3805,"footswitchLevel":4626,"jackLevel":5368,"sideswitchLevel":6745,"doublestepLevel":4604,"staminaLevel":3956,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"D4RK","sex":"Male","profileImg":""},{"id":2,"membersId":65671,"dateAdded":"2023-03-15T03:01:39.000Z","lastUpdated":"2023-05-06T22:57:32.000Z","status":1,"totalPoints":1606620,"rankingPoints":487916,"totalPass":147,"totalFc":64,"totalFec":92,"totalQuad":29,"totalQuint":0,"crossoverLevel":7248,"bracketLevel":7476,"footswitchLevel":7303,"jackLevel":7595,"sideswitchLevel":8030,"doublestepLevel":7461,"staminaLevel":5228,"isBuddy":true,"preferences":"{\"discordId\":\"Vincent#4923\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VincentITG","sex":"Male","profileImg":"https://i.imgur.com/ijai2iI.png"},{"id":479,"membersId":3610,"dateAdded":"2023-03-20T04:49:47.000Z","lastUpdated":"2023-05-04T04:09:54.000Z","status":1,"totalPoints":1447442,"rankingPoints":486307,"totalPass":169,"totalFc":59,"totalFec":50,"totalQuad":18,"totalQuint":0,"crossoverLevel":5570,"bracketLevel":6666,"footswitchLevel":6042,"jackLevel":6792,"sideswitchLevel":6301,"doublestepLevel":6124,"staminaLevel":6064,"isBuddy":false,"preferences":"{\"discordId\":\"leishen#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LEISHEN.","sex":"Unspecified","profileImg":"https://i.imgur.com/2IxlcLr.png"},{"id":254,"membersId":173047,"dateAdded":"2023-03-19T01:29:15.000Z","lastUpdated":"2023-05-04T02:50:03.000Z","status":1,"totalPoints":1313445,"rankingPoints":485262,"totalPass":138,"totalFc":58,"totalFec":73,"totalQuad":7,"totalQuint":0,"crossoverLevel":5784,"bracketLevel":7062,"footswitchLevel":6739,"jackLevel":7056,"sideswitchLevel":7179,"doublestepLevel":6558,"staminaLevel":4433,"isBuddy":true,"preferences":"{\"discordId\":\"nvanleerdrums#8936\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nvanleerdrums","sex":"Male","profileImg":"https://i.imgur.com/wA4Bxoy.jpg"},{"id":287,"membersId":66352,"dateAdded":"2023-03-19T03:16:34.000Z","lastUpdated":"2023-05-06T01:16:01.000Z","status":1,"totalPoints":1487468,"rankingPoints":484800,"totalPass":167,"totalFc":47,"totalFec":68,"totalQuad":11,"totalQuint":0,"crossoverLevel":5763,"bracketLevel":6871,"footswitchLevel":6626,"jackLevel":6411,"sideswitchLevel":5476,"doublestepLevel":7031,"staminaLevel":5677,"isBuddy":false,"preferences":"{\"discordId\":\"Zae#9916\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ChatITG","sex":"Male","profileImg":""},{"id":98,"membersId":7843,"dateAdded":"2023-03-18T21:52:50.000Z","lastUpdated":"2023-04-18T03:54:20.000Z","status":1,"totalPoints":975515,"rankingPoints":484029,"totalPass":91,"totalFc":15,"totalFec":45,"totalQuad":43,"totalQuint":1,"crossoverLevel":3736,"bracketLevel":3145,"footswitchLevel":4355,"jackLevel":4910,"sideswitchLevel":6163,"doublestepLevel":3903,"staminaLevel":5045,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kigha","sex":"Female","profileImg":""},{"id":632,"membersId":6118,"dateAdded":"2023-03-22T02:06:56.000Z","lastUpdated":"2023-05-06T04:40:52.000Z","status":1,"totalPoints":1201319,"rankingPoints":482185,"totalPass":124,"totalFc":56,"totalFec":44,"totalQuad":30,"totalQuint":0,"crossoverLevel":5012,"bracketLevel":5817,"footswitchLevel":5809,"jackLevel":5037,"sideswitchLevel":6456,"doublestepLevel":5526,"staminaLevel":4815,"isBuddy":false,"preferences":"{\"discordId\":\"Yoney#7189\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Keekee","sex":"Male","profileImg":"https://i.imgur.com/X0Z7sty.png"},{"id":215,"membersId":4306,"dateAdded":"2023-03-19T00:05:12.000Z","lastUpdated":"2023-05-07T04:08:52.000Z","status":1,"totalPoints":1044493,"rankingPoints":481449,"totalPass":62,"totalFc":20,"totalFec":66,"totalQuad":53,"totalQuint":4,"crossoverLevel":4556,"bracketLevel":4068,"footswitchLevel":4745,"jackLevel":2970,"sideswitchLevel":3732,"doublestepLevel":4967,"staminaLevel":3319,"isBuddy":false,"preferences":"{\"discordId\":\"FLASHitude#0077\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"FLASHitude","sex":"Male","profileImg":""},{"id":494,"membersId":4989,"dateAdded":"2023-03-20T14:06:43.000Z","lastUpdated":"2023-05-04T19:59:11.000Z","status":1,"totalPoints":1217670,"rankingPoints":475963,"totalPass":98,"totalFc":42,"totalFec":81,"totalQuad":36,"totalQuint":0,"crossoverLevel":5561,"bracketLevel":5735,"footswitchLevel":5655,"jackLevel":4849,"sideswitchLevel":6817,"doublestepLevel":6064,"staminaLevel":4125,"isBuddy":false,"preferences":"{\"discordId\":\"NinjafarOh#4894\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jafar","sex":"Male","profileImg":"https://i.imgur.com/oljwk7w.jpg"},{"id":270,"membersId":173210,"dateAdded":"2023-03-19T02:08:33.000Z","lastUpdated":"2023-05-05T01:55:20.000Z","status":1,"totalPoints":962245,"rankingPoints":469908,"totalPass":84,"totalFc":35,"totalFec":52,"totalQuad":8,"totalQuint":0,"crossoverLevel":2654,"bracketLevel":3538,"footswitchLevel":4038,"jackLevel":5184,"sideswitchLevel":3922,"doublestepLevel":3331,"staminaLevel":4427,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SebaZzZz","sex":"Male","profileImg":""},{"id":109,"membersId":175125,"dateAdded":"2023-03-18T21:54:52.000Z","lastUpdated":"2023-05-06T19:59:06.000Z","status":1,"totalPoints":1384447,"rankingPoints":469286,"totalPass":112,"totalFc":84,"totalFec":52,"totalQuad":31,"totalQuint":0,"crossoverLevel":5971,"bracketLevel":6425,"footswitchLevel":6620,"jackLevel":6558,"sideswitchLevel":7069,"doublestepLevel":6502,"staminaLevel":4670,"isBuddy":false,"preferences":"{\"discordId\":\"mixmasta#3733\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mixmasta","sex":"Male","profileImg":""},{"id":433,"membersId":129083,"dateAdded":"2023-03-19T22:25:32.000Z","lastUpdated":"2023-05-04T17:39:12.000Z","status":1,"totalPoints":1007915,"rankingPoints":468855,"totalPass":111,"totalFc":49,"totalFec":44,"totalQuad":0,"totalQuint":0,"crossoverLevel":3395,"bracketLevel":5489,"footswitchLevel":4679,"jackLevel":2962,"sideswitchLevel":3169,"doublestepLevel":4818,"staminaLevel":4273,"isBuddy":false,"preferences":"{\"discordId\":\"Cyx#4614\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Cyx","sex":"Male","profileImg":"https://www.serebii.net/swordshield/pokemon/831.png"},{"id":124,"membersId":128002,"dateAdded":"2023-03-18T21:59:44.000Z","lastUpdated":"2023-05-04T05:04:42.000Z","status":1,"totalPoints":1493020,"rankingPoints":465468,"totalPass":169,"totalFc":71,"totalFec":63,"totalQuad":13,"totalQuint":0,"crossoverLevel":6317,"bracketLevel":7440,"footswitchLevel":7080,"jackLevel":7119,"sideswitchLevel":7938,"doublestepLevel":6790,"staminaLevel":5092,"isBuddy":true,"preferences":"{\"discordId\":\"MoistBruh#4304\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BrotherMoist","sex":"Male","profileImg":"https://i.pinimg.com/originals/49/d6/ca/49d6caf0bd9760b8d709fe8193b413df.jpg"},{"id":408,"membersId":77690,"dateAdded":"2023-03-19T19:52:50.000Z","lastUpdated":"2023-05-05T21:41:01.000Z","status":1,"totalPoints":1319694,"rankingPoints":464698,"totalPass":150,"totalFc":57,"totalFec":75,"totalQuad":17,"totalQuint":0,"crossoverLevel":5876,"bracketLevel":6505,"footswitchLevel":6100,"jackLevel":6435,"sideswitchLevel":6437,"doublestepLevel":6331,"staminaLevel":4151,"isBuddy":true,"preferences":"{\"discordId\":\"AkemiTCG#0268\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Griever","sex":"Male","profileImg":""},{"id":317,"membersId":165605,"dateAdded":"2023-03-19T06:40:42.000Z","lastUpdated":"2023-05-06T11:25:07.000Z","status":1,"totalPoints":1102545,"rankingPoints":464185,"totalPass":135,"totalFc":29,"totalFec":48,"totalQuad":13,"totalQuint":0,"crossoverLevel":4890,"bracketLevel":5858,"footswitchLevel":5493,"jackLevel":4915,"sideswitchLevel":6897,"doublestepLevel":5291,"staminaLevel":3738,"isBuddy":false,"preferences":"{\"discordId\":\"Freis#2663\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Freis","sex":"Male","profileImg":"https://i.ibb.co/vhDs7Gv/rsz-yysanbim-400x400.jpg"},{"id":762,"membersId":4102,"dateAdded":"2023-03-25T02:12:29.000Z","lastUpdated":"2023-05-07T01:30:43.000Z","status":1,"totalPoints":1136635,"rankingPoints":461989,"totalPass":104,"totalFc":39,"totalFec":72,"totalQuad":14,"totalQuint":0,"crossoverLevel":4860,"bracketLevel":4368,"footswitchLevel":4889,"jackLevel":5567,"sideswitchLevel":4414,"doublestepLevel":6080,"staminaLevel":3485,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Paranoia Boi","sex":"Male","profileImg":""},{"id":672,"membersId":175234,"dateAdded":"2023-03-22T22:34:49.000Z","lastUpdated":"2023-05-06T19:00:59.000Z","status":1,"totalPoints":1260373,"rankingPoints":461849,"totalPass":160,"totalFc":57,"totalFec":31,"totalQuad":3,"totalQuint":0,"crossoverLevel":4102,"bracketLevel":6571,"footswitchLevel":6067,"jackLevel":4353,"sideswitchLevel":6606,"doublestepLevel":5365,"staminaLevel":5097,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"R3N3","sex":"Male","profileImg":""},{"id":168,"membersId":163585,"dateAdded":"2023-03-18T22:32:25.000Z","lastUpdated":"2023-04-23T20:30:02.000Z","status":1,"totalPoints":1077262,"rankingPoints":460486,"totalPass":135,"totalFc":49,"totalFec":56,"totalQuad":11,"totalQuint":0,"crossoverLevel":4073,"bracketLevel":5267,"footswitchLevel":4339,"jackLevel":5142,"sideswitchLevel":4772,"doublestepLevel":4439,"staminaLevel":6332,"isBuddy":false,"preferences":"{\"discordId\":\"MegaSphere#3753\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MegaSphere","sex":"Male","profileImg":"https://i.imgur.com/p34Ni8n.png"},{"id":620,"membersId":36049,"dateAdded":"2023-03-21T22:07:22.000Z","lastUpdated":"2023-04-22T22:39:44.000Z","status":1,"totalPoints":688218,"rankingPoints":458782,"totalPass":46,"totalFc":18,"totalFec":38,"totalQuad":28,"totalQuint":1,"crossoverLevel":3243,"bracketLevel":2336,"footswitchLevel":2978,"jackLevel":2123,"sideswitchLevel":3232,"doublestepLevel":2822,"staminaLevel":2044,"isBuddy":false,"preferences":"{\"discordId\":\"Sudzi781#9768\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sudzi781","sex":"Male","profileImg":""},{"id":366,"membersId":4730,"dateAdded":"2023-03-19T16:26:31.000Z","lastUpdated":"2023-05-06T02:53:47.000Z","status":1,"totalPoints":1044642,"rankingPoints":458668,"totalPass":141,"totalFc":15,"totalFec":29,"totalQuad":20,"totalQuint":0,"crossoverLevel":3144,"bracketLevel":4873,"footswitchLevel":4305,"jackLevel":3023,"sideswitchLevel":3397,"doublestepLevel":4595,"staminaLevel":4666,"isBuddy":false,"preferences":"{\"discordId\":\"Darkstar#7543\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Darkstar","sex":"Male","profileImg":""},{"id":183,"membersId":66647,"dateAdded":"2023-03-18T22:47:55.000Z","lastUpdated":"2023-05-06T01:38:02.000Z","status":1,"totalPoints":1499096,"rankingPoints":457624,"totalPass":211,"totalFc":57,"totalFec":87,"totalQuad":5,"totalQuint":0,"crossoverLevel":7389,"bracketLevel":5085,"footswitchLevel":6386,"jackLevel":6098,"sideswitchLevel":6736,"doublestepLevel":6425,"staminaLevel":5913,"isBuddy":false,"preferences":"{\"discordId\":\"Yani#7658\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yani","sex":"Male","profileImg":"https://i.ibb.co/ZHqXpxB/Pride-kitty-250x250.png"},{"id":184,"membersId":44806,"dateAdded":"2023-03-18T22:48:42.000Z","lastUpdated":"2023-05-06T20:41:52.000Z","status":1,"totalPoints":1177455,"rankingPoints":454560,"totalPass":179,"totalFc":22,"totalFec":40,"totalQuad":14,"totalQuint":0,"crossoverLevel":5350,"bracketLevel":6092,"footswitchLevel":5723,"jackLevel":6061,"sideswitchLevel":5625,"doublestepLevel":6000,"staminaLevel":2998,"isBuddy":false,"preferences":"{\"discordId\":\"Captain Carbon#8473\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dick Kickem","sex":"Male","profileImg":"https://avatars.akamai.steamstatic.com/bdbbc5dce4f051d7c19cc0570416d82274777f43_full.jpg"},{"id":81,"membersId":165733,"dateAdded":"2023-03-18T21:50:44.000Z","lastUpdated":"2023-05-03T06:43:17.000Z","status":1,"totalPoints":1323054,"rankingPoints":451868,"totalPass":160,"totalFc":55,"totalFec":62,"totalQuad":17,"totalQuint":0,"crossoverLevel":5397,"bracketLevel":6069,"footswitchLevel":5964,"jackLevel":5370,"sideswitchLevel":5798,"doublestepLevel":5859,"staminaLevel":5881,"isBuddy":false,"preferences":"{\"discordId\":\"Squeens#7493\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Squeens","sex":"Male","profileImg":"https://i.ibb.co/KxZMTP9/bruh.png"},{"id":127,"membersId":171721,"dateAdded":"2023-03-18T22:01:35.000Z","lastUpdated":"2023-05-06T15:26:14.000Z","status":1,"totalPoints":1283360,"rankingPoints":447941,"totalPass":149,"totalFc":38,"totalFec":70,"totalQuad":10,"totalQuint":0,"crossoverLevel":5289,"bracketLevel":4410,"footswitchLevel":5420,"jackLevel":6472,"sideswitchLevel":5968,"doublestepLevel":5805,"staminaLevel":5005,"isBuddy":false,"preferences":"{\"discordId\":\"Higgy300#6970\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Higgy","sex":"Male","profileImg":""},{"id":466,"membersId":8349,"dateAdded":"2023-03-20T02:27:26.000Z","lastUpdated":"2023-05-07T06:52:56.000Z","status":1,"totalPoints":1023612,"rankingPoints":443958,"totalPass":151,"totalFc":26,"totalFec":29,"totalQuad":0,"totalQuint":0,"crossoverLevel":4020,"bracketLevel":5199,"footswitchLevel":4622,"jackLevel":4997,"sideswitchLevel":5778,"doublestepLevel":4950,"staminaLevel":3877,"isBuddy":false,"preferences":"{\"discordId\":\"Janus5k#0821\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Janus5k","sex":"Male","profileImg":"https://cdn.discordapp.com/emojis/376731874573287428.png"},{"id":735,"membersId":6069,"dateAdded":"2023-03-24T17:05:36.000Z","lastUpdated":"2023-05-06T10:55:36.000Z","status":1,"totalPoints":980817,"rankingPoints":443505,"totalPass":95,"totalFc":36,"totalFec":73,"totalQuad":9,"totalQuint":0,"crossoverLevel":3228,"bracketLevel":5656,"footswitchLevel":4801,"jackLevel":2963,"sideswitchLevel":3216,"doublestepLevel":4941,"staminaLevel":4112,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NBCrescendo","sex":"Male","profileImg":"https://i.imgur.com/PttodhM.png"},{"id":175,"membersId":66431,"dateAdded":"2023-03-18T22:38:00.000Z","lastUpdated":"2023-05-06T19:13:42.000Z","status":1,"totalPoints":1333423,"rankingPoints":441474,"totalPass":103,"totalFc":52,"totalFec":68,"totalQuad":93,"totalQuint":2,"crossoverLevel":7143,"bracketLevel":6193,"footswitchLevel":6540,"jackLevel":5163,"sideswitchLevel":6218,"doublestepLevel":6627,"staminaLevel":2951,"isBuddy":false,"preferences":"{\"discordId\":\"Berserker#2387\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Berserker","sex":"Male","profileImg":"https://i.imgur.com/QPfP2Mp.png"},{"id":581,"membersId":6289,"dateAdded":"2023-03-21T04:37:55.000Z","lastUpdated":"2023-05-03T14:01:18.000Z","status":1,"totalPoints":1526509,"rankingPoints":438897,"totalPass":148,"totalFc":96,"totalFec":108,"totalQuad":5,"totalQuint":0,"crossoverLevel":7554,"bracketLevel":7175,"footswitchLevel":7428,"jackLevel":7257,"sideswitchLevel":6900,"doublestepLevel":7524,"staminaLevel":3895,"isBuddy":false,"preferences":"{\"discordId\":\"Adaridan#6453\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Adaridan","sex":"Male","profileImg":""},{"id":357,"membersId":175167,"dateAdded":"2023-03-19T15:35:17.000Z","lastUpdated":"2023-05-01T22:27:42.000Z","status":1,"totalPoints":689179,"rankingPoints":437772,"totalPass":65,"totalFc":33,"totalFec":31,"totalQuad":8,"totalQuint":0,"crossoverLevel":2312,"bracketLevel":3015,"footswitchLevel":3071,"jackLevel":1574,"sideswitchLevel":2180,"doublestepLevel":2738,"staminaLevel":3194,"isBuddy":false,"preferences":"{\"discordId\":\"killuastep#4046\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"killuastep","sex":"Unspecified","profileImg":"https://i.imgur.com/6RlYaxc.png"},{"id":4,"membersId":66784,"dateAdded":"2023-03-16T20:55:06.000Z","lastUpdated":"2023-05-04T21:19:48.000Z","status":1,"totalPoints":1075778,"rankingPoints":434904,"totalPass":115,"totalFc":3,"totalFec":39,"totalQuad":105,"totalQuint":2,"crossoverLevel":5867,"bracketLevel":5678,"footswitchLevel":5628,"jackLevel":3452,"sideswitchLevel":6475,"doublestepLevel":5925,"staminaLevel":1870,"isBuddy":false,"preferences":"{\"discordId\":\"TommyDoesntMiss#3265\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TommyDoesntMiss","sex":"Male","profileImg":"https://i.imgur.com/cHGZBz5.jpg"},{"id":245,"membersId":169204,"dateAdded":"2023-03-19T00:58:23.000Z","lastUpdated":"2023-05-06T04:57:35.000Z","status":1,"totalPoints":870839,"rankingPoints":434622,"totalPass":114,"totalFc":42,"totalFec":26,"totalQuad":0,"totalQuint":0,"crossoverLevel":2562,"bracketLevel":4917,"footswitchLevel":3864,"jackLevel":4788,"sideswitchLevel":3008,"doublestepLevel":3800,"staminaLevel":4322,"isBuddy":false,"preferences":"{\"discordId\":\"mako#2931\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"takatzu48","sex":"Male","profileImg":""},{"id":308,"membersId":241,"dateAdded":"2023-03-19T05:12:21.000Z","lastUpdated":"2023-04-30T05:16:02.000Z","status":1,"totalPoints":1542032,"rankingPoints":430490,"totalPass":211,"totalFc":91,"totalFec":101,"totalQuad":6,"totalQuint":0,"crossoverLevel":8027,"bracketLevel":7036,"footswitchLevel":7330,"jackLevel":7315,"sideswitchLevel":7746,"doublestepLevel":7537,"staminaLevel":3855,"isBuddy":false,"preferences":"{\"discordId\":\"Eleftheria#2716\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Eleftheria","sex":"Male","profileImg":"https://i.imgur.com/Bq3TtwU.png"},{"id":17,"membersId":173058,"dateAdded":"2023-03-18T21:48:46.000Z","lastUpdated":"2023-05-04T20:51:39.000Z","status":1,"totalPoints":1450747,"rankingPoints":430305,"totalPass":159,"totalFc":34,"totalFec":56,"totalQuad":101,"totalQuint":0,"crossoverLevel":7595,"bracketLevel":6292,"footswitchLevel":6791,"jackLevel":7171,"sideswitchLevel":6517,"doublestepLevel":7220,"staminaLevel":3870,"isBuddy":false,"preferences":"{\"discordId\":\"Formless#8660\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Girth Brooks","sex":"Male","profileImg":"https://i.imgur.com/6DHh2Ra.png"},{"id":104,"membersId":2600,"dateAdded":"2023-03-18T21:53:35.000Z","lastUpdated":"2023-05-05T23:35:58.000Z","status":1,"totalPoints":1390268,"rankingPoints":428378,"totalPass":193,"totalFc":69,"totalFec":42,"totalQuad":6,"totalQuint":0,"crossoverLevel":6474,"bracketLevel":6684,"footswitchLevel":6870,"jackLevel":6966,"sideswitchLevel":7558,"doublestepLevel":6686,"staminaLevel":4026,"isBuddy":false,"preferences":"{\"discordId\":\"A Real Dog#3825\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DRON","sex":"Male","profileImg":"https://i.imgur.com/ezVfWhH.png"},{"id":207,"membersId":66532,"dateAdded":"2023-03-18T23:41:41.000Z","lastUpdated":"2023-05-05T03:06:39.000Z","status":1,"totalPoints":820951,"rankingPoints":427514,"totalPass":82,"totalFc":64,"totalFec":33,"totalQuad":4,"totalQuint":0,"crossoverLevel":3754,"bracketLevel":3911,"footswitchLevel":3898,"jackLevel":3486,"sideswitchLevel":4126,"doublestepLevel":4013,"staminaLevel":2364,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Alex C. Rock","sex":"Male","profileImg":""},{"id":112,"membersId":5362,"dateAdded":"2023-03-18T21:55:20.000Z","lastUpdated":"2023-05-03T23:45:47.000Z","status":1,"totalPoints":1368204,"rankingPoints":426177,"totalPass":154,"totalFc":52,"totalFec":105,"totalQuad":24,"totalQuint":0,"crossoverLevel":7141,"bracketLevel":6452,"footswitchLevel":7109,"jackLevel":6035,"sideswitchLevel":6871,"doublestepLevel":7005,"staminaLevel":3077,"isBuddy":false,"preferences":"{\"discordId\":\"Halogen-#2605\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Halogen-","sex":"Male","profileImg":"https://i.imgur.com/3hpYn84.jpg"},{"id":896,"membersId":127939,"dateAdded":"2023-03-29T07:47:01.000Z","lastUpdated":"2023-05-06T07:21:44.000Z","status":1,"totalPoints":817944,"rankingPoints":425853,"totalPass":91,"totalFc":29,"totalFec":55,"totalQuad":0,"totalQuint":0,"crossoverLevel":3277,"bracketLevel":4901,"footswitchLevel":4075,"jackLevel":4217,"sideswitchLevel":4046,"doublestepLevel":4399,"staminaLevel":2979,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"in","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/479797320419115029/987922197295276042/revuestarlightpfps.png"},{"id":65,"membersId":173296,"dateAdded":"2023-03-18T21:49:51.000Z","lastUpdated":"2023-05-03T03:59:08.000Z","status":1,"totalPoints":1401056,"rankingPoints":421766,"totalPass":185,"totalFc":108,"totalFec":81,"totalQuad":1,"totalQuint":0,"crossoverLevel":6262,"bracketLevel":6366,"footswitchLevel":6218,"jackLevel":6218,"sideswitchLevel":6558,"doublestepLevel":6533,"staminaLevel":5424,"isBuddy":false,"preferences":"{\"discordId\":\"Icy#9253\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"IcyCold","sex":"Male","profileImg":"https://i.ibb.co/T2nN016/5143b8640817d8f48120b4c0ec913556726e495e-full.jpg"},{"id":77,"membersId":173043,"dateAdded":"2023-03-18T21:50:20.000Z","lastUpdated":"2023-05-05T02:44:24.000Z","status":1,"totalPoints":1109261,"rankingPoints":421712,"totalPass":124,"totalFc":45,"totalFec":67,"totalQuad":24,"totalQuint":0,"crossoverLevel":5722,"bracketLevel":5682,"footswitchLevel":5554,"jackLevel":3692,"sideswitchLevel":6869,"doublestepLevel":5056,"staminaLevel":3310,"isBuddy":false,"preferences":"{\"discordId\":\"XjojoX99#2048\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XjojoX","sex":"Male","profileImg":"https://i.imgur.com/ufkIJAl.png"},{"id":303,"membersId":143647,"dateAdded":"2023-03-19T04:33:51.000Z","lastUpdated":"2023-05-07T02:40:43.000Z","status":1,"totalPoints":1546525,"rankingPoints":421545,"totalPass":200,"totalFc":50,"totalFec":126,"totalQuad":9,"totalQuint":0,"crossoverLevel":7816,"bracketLevel":6594,"footswitchLevel":7240,"jackLevel":7201,"sideswitchLevel":7412,"doublestepLevel":7429,"staminaLevel":4187,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gulu","sex":"Male","profileImg":""},{"id":644,"membersId":169031,"dateAdded":"2023-03-22T05:44:28.000Z","lastUpdated":"2023-05-07T03:49:48.000Z","status":1,"totalPoints":1157912,"rankingPoints":420821,"totalPass":141,"totalFc":61,"totalFec":77,"totalQuad":15,"totalQuint":0,"crossoverLevel":5878,"bracketLevel":4487,"footswitchLevel":5561,"jackLevel":3923,"sideswitchLevel":5417,"doublestepLevel":5368,"staminaLevel":3699,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"!_Stepen_co_! :v","sex":"Male","profileImg":""},{"id":674,"membersId":175350,"dateAdded":"2023-03-22T22:58:36.000Z","lastUpdated":"2023-05-05T21:03:30.000Z","status":1,"totalPoints":687479,"rankingPoints":419458,"totalPass":55,"totalFc":37,"totalFec":46,"totalQuad":3,"totalQuint":0,"crossoverLevel":3131,"bracketLevel":2962,"footswitchLevel":3848,"jackLevel":1706,"sideswitchLevel":3534,"doublestepLevel":3165,"staminaLevel":1742,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ChickenTendies","sex":"Unspecified","profileImg":""},{"id":814,"membersId":7550,"dateAdded":"2023-03-26T02:39:01.000Z","lastUpdated":"2023-05-07T00:16:46.000Z","status":1,"totalPoints":999662,"rankingPoints":417059,"totalPass":121,"totalFc":55,"totalFec":43,"totalQuad":16,"totalQuint":0,"crossoverLevel":4328,"bracketLevel":2952,"footswitchLevel":3601,"jackLevel":2608,"sideswitchLevel":2710,"doublestepLevel":4460,"staminaLevel":4790,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mrCLICKman","sex":"Male","profileImg":""},{"id":549,"membersId":6261,"dateAdded":"2023-03-20T22:09:02.000Z","lastUpdated":"2023-05-06T01:29:56.000Z","status":1,"totalPoints":952104,"rankingPoints":414393,"totalPass":104,"totalFc":45,"totalFec":49,"totalQuad":13,"totalQuint":0,"crossoverLevel":4062,"bracketLevel":3171,"footswitchLevel":4428,"jackLevel":3278,"sideswitchLevel":5401,"doublestepLevel":3912,"staminaLevel":3690,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shi0-X","sex":"Male","profileImg":"https://i.giphy.com/media/okLCopqw6ElCDnIhuS/200w.gif"},{"id":108,"membersId":173215,"dateAdded":"2023-03-18T21:54:27.000Z","lastUpdated":"2023-04-30T18:38:12.000Z","status":1,"totalPoints":813706,"rankingPoints":413370,"totalPass":140,"totalFc":19,"totalFec":22,"totalQuad":4,"totalQuint":0,"crossoverLevel":3162,"bracketLevel":3723,"footswitchLevel":3417,"jackLevel":3736,"sideswitchLevel":2337,"doublestepLevel":3666,"staminaLevel":2964,"isBuddy":false,"preferences":"{\"discordId\":\"bogo#3604\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bogo","sex":"Unspecified","profileImg":""},{"id":1187,"membersId":175354,"dateAdded":"2023-04-22T17:11:12.000Z","lastUpdated":"2023-05-06T19:05:56.000Z","status":1,"totalPoints":566256,"rankingPoints":412474,"totalPass":33,"totalFc":29,"totalFec":45,"totalQuad":8,"totalQuint":0,"crossoverLevel":2739,"bracketLevel":2043,"footswitchLevel":3295,"jackLevel":1677,"sideswitchLevel":3390,"doublestepLevel":2919,"staminaLevel":1220,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Bud Light Enjoyer","sex":"Female","profileImg":""},{"id":217,"membersId":37977,"dateAdded":"2023-03-19T00:11:23.000Z","lastUpdated":"2023-05-04T23:38:10.000Z","status":1,"totalPoints":1478500,"rankingPoints":411746,"totalPass":158,"totalFc":110,"totalFec":103,"totalQuad":3,"totalQuint":0,"crossoverLevel":7598,"bracketLevel":6925,"footswitchLevel":7111,"jackLevel":6788,"sideswitchLevel":7278,"doublestepLevel":7301,"staminaLevel":3916,"isBuddy":false,"preferences":"{\"discordId\":\"Valex#8095\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Valex","sex":"Male","profileImg":"https://i.imgur.com/OkpuTKw.jpg"},{"id":238,"membersId":2114,"dateAdded":"2023-03-19T00:45:45.000Z","lastUpdated":"2023-05-04T22:02:10.000Z","status":1,"totalPoints":661431,"rankingPoints":410940,"totalPass":118,"totalFc":16,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":2282,"bracketLevel":3110,"footswitchLevel":3174,"jackLevel":2277,"sideswitchLevel":3956,"doublestepLevel":2599,"staminaLevel":2669,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Beremy","sex":"Male","profileImg":"https://pa1.narvii.com/5988/15ecd73be90b2c8f267921821e0cb0c566615e93_128.gif"},{"id":395,"membersId":165743,"dateAdded":"2023-03-19T18:49:14.000Z","lastUpdated":"2023-05-05T02:20:33.000Z","status":1,"totalPoints":1248750,"rankingPoints":410909,"totalPass":179,"totalFc":67,"totalFec":43,"totalQuad":2,"totalQuint":0,"crossoverLevel":6043,"bracketLevel":5637,"footswitchLevel":6253,"jackLevel":6412,"sideswitchLevel":6406,"doublestepLevel":6256,"staminaLevel":3299,"isBuddy":true,"preferences":"{\"discordId\":\"trescal#1752\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"trescal","sex":"Male","profileImg":"https://i.imgur.com/x08ICKt.png"},{"id":94,"membersId":5314,"dateAdded":"2023-03-18T21:52:01.000Z","lastUpdated":"2023-05-06T14:01:28.000Z","status":1,"totalPoints":1308790,"rankingPoints":410816,"totalPass":148,"totalFc":69,"totalFec":65,"totalQuad":13,"totalQuint":0,"crossoverLevel":5961,"bracketLevel":6014,"footswitchLevel":6148,"jackLevel":6558,"sideswitchLevel":6279,"doublestepLevel":6289,"staminaLevel":3710,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrMeatloaf","sex":"Male","profileImg":"https://i.imgur.com/Ye5e236.jpg"},{"id":53,"membersId":173267,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-05-06T04:03:08.000Z","status":1,"totalPoints":1307242,"rankingPoints":409702,"totalPass":179,"totalFc":54,"totalFec":91,"totalQuad":7,"totalQuint":0,"crossoverLevel":6326,"bracketLevel":6227,"footswitchLevel":6403,"jackLevel":6110,"sideswitchLevel":5255,"doublestepLevel":6828,"staminaLevel":3404,"isBuddy":false,"preferences":"{\"discordId\":\"CERiNG#0282\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CERiNG","sex":"Unspecified","profileImg":"https://i.imgur.com/7XZZDsY.png"},{"id":135,"membersId":66778,"dateAdded":"2023-03-18T22:04:30.000Z","lastUpdated":"2023-05-06T15:33:59.000Z","status":1,"totalPoints":930865,"rankingPoints":407995,"totalPass":75,"totalFc":35,"totalFec":40,"totalQuad":88,"totalQuint":2,"crossoverLevel":5369,"bracketLevel":3029,"footswitchLevel":4628,"jackLevel":2165,"sideswitchLevel":4507,"doublestepLevel":4452,"staminaLevel":2324,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shpadoinkle","sex":"Female","profileImg":""},{"id":432,"membersId":132471,"dateAdded":"2023-03-19T22:19:42.000Z","lastUpdated":"2023-04-30T11:11:35.000Z","status":1,"totalPoints":1311207,"rankingPoints":407114,"totalPass":218,"totalFc":50,"totalFec":35,"totalQuad":0,"totalQuint":0,"crossoverLevel":5138,"bracketLevel":6295,"footswitchLevel":6061,"jackLevel":5368,"sideswitchLevel":6052,"doublestepLevel":5641,"staminaLevel":5073,"isBuddy":false,"preferences":"{\"discordId\":\"neyoru#3460\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"neyoru","sex":"Male","profileImg":""},{"id":23,"membersId":132528,"dateAdded":"2023-03-18T21:48:51.000Z","lastUpdated":"2023-05-02T03:32:21.000Z","status":1,"totalPoints":1359396,"rankingPoints":406704,"totalPass":201,"totalFc":52,"totalFec":100,"totalQuad":1,"totalQuint":0,"crossoverLevel":7110,"bracketLevel":6556,"footswitchLevel":6737,"jackLevel":6714,"sideswitchLevel":6800,"doublestepLevel":6740,"staminaLevel":3224,"isBuddy":false,"preferences":"{\"discordId\":\"palace#6947\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"palacebeast","sex":"Male","profileImg":"https://i.imgur.com/1i4BqR0.png"},{"id":280,"membersId":173125,"dateAdded":"2023-03-19T02:48:37.000Z","lastUpdated":"2023-05-04T22:38:56.000Z","status":1,"totalPoints":918933,"rankingPoints":405569,"totalPass":54,"totalFc":37,"totalFec":63,"totalQuad":88,"totalQuint":0,"crossoverLevel":5549,"bracketLevel":3382,"footswitchLevel":4641,"jackLevel":2937,"sideswitchLevel":4208,"doublestepLevel":4940,"staminaLevel":1728,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lux Aurumque","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/798031312349823030/1088961762730201168/flying.png"},{"id":268,"membersId":7886,"dateAdded":"2023-03-19T01:58:08.000Z","lastUpdated":"2023-04-30T07:27:01.000Z","status":1,"totalPoints":1596006,"rankingPoints":404851,"totalPass":236,"totalFc":59,"totalFec":107,"totalQuad":18,"totalQuint":0,"crossoverLevel":7658,"bracketLevel":7062,"footswitchLevel":7208,"jackLevel":6868,"sideswitchLevel":7250,"doublestepLevel":7566,"staminaLevel":5317,"isBuddy":true,"preferences":"{\"discordId\":\"Zarzob#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zarzob","sex":"Male","profileImg":"https://i.imgur.com/IbJlXCl.png"},{"id":125,"membersId":147886,"dateAdded":"2023-03-18T22:00:45.000Z","lastUpdated":"2023-04-23T03:05:19.000Z","status":1,"totalPoints":708408,"rankingPoints":404843,"totalPass":76,"totalFc":54,"totalFec":29,"totalQuad":7,"totalQuint":0,"crossoverLevel":2795,"bracketLevel":2475,"footswitchLevel":2967,"jackLevel":2233,"sideswitchLevel":2759,"doublestepLevel":2980,"staminaLevel":2671,"isBuddy":false,"preferences":"{\"discordId\":\"slowest#6798\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Slowest","sex":"Unspecified","profileImg":""},{"id":143,"membersId":66673,"dateAdded":"2023-03-18T22:10:43.000Z","lastUpdated":"2023-05-06T16:10:16.000Z","status":1,"totalPoints":647814,"rankingPoints":403488,"totalPass":90,"totalFc":24,"totalFec":25,"totalQuad":1,"totalQuint":0,"crossoverLevel":2106,"bracketLevel":2453,"footswitchLevel":2549,"jackLevel":3403,"sideswitchLevel":3288,"doublestepLevel":2345,"staminaLevel":2755,"isBuddy":false,"preferences":"{\"discordId\":\"Chief Skittles#1789\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"ChiefSkittles","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/916109510790221886/1091130185371353118/pfp.png"},{"id":196,"membersId":35405,"dateAdded":"2023-03-18T23:05:54.000Z","lastUpdated":"2023-05-06T07:00:55.000Z","status":1,"totalPoints":1023911,"rankingPoints":403235,"totalPass":32,"totalFc":78,"totalFec":90,"totalQuad":58,"totalQuint":10,"crossoverLevel":6485,"bracketLevel":4040,"footswitchLevel":5160,"jackLevel":4430,"sideswitchLevel":5279,"doublestepLevel":5465,"staminaLevel":1968,"isBuddy":false,"preferences":"{\"discordId\":\"KIO#0133\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VERTEX KIO","sex":"Male","profileImg":"https://i.postimg.cc/DfWZGz2w/ITL.jpg"},{"id":156,"membersId":3761,"dateAdded":"2023-03-18T22:21:55.000Z","lastUpdated":"2023-05-05T23:27:46.000Z","status":1,"totalPoints":582407,"rankingPoints":403136,"totalPass":44,"totalFc":14,"totalFec":33,"totalQuad":39,"totalQuint":1,"crossoverLevel":2931,"bracketLevel":3776,"footswitchLevel":3802,"jackLevel":1681,"sideswitchLevel":3179,"doublestepLevel":4187,"staminaLevel":845,"isBuddy":false,"preferences":"{\"discordId\":\"BB-LON#0282\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BBLON","sex":"Male","profileImg":"https://i.imgur.com/u3fOa37.png"},{"id":948,"membersId":6703,"dateAdded":"2023-04-01T07:31:33.000Z","lastUpdated":"2023-04-29T09:37:31.000Z","status":1,"totalPoints":810817,"rankingPoints":402697,"totalPass":96,"totalFc":30,"totalFec":39,"totalQuad":9,"totalQuint":0,"crossoverLevel":3464,"bracketLevel":3150,"footswitchLevel":3903,"jackLevel":2124,"sideswitchLevel":3208,"doublestepLevel":3724,"staminaLevel":2190,"isBuddy":false,"preferences":"{\"discordId\":\"Mekki#5095\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mekki","sex":"Female","profileImg":"https://i.imgur.com/nXMHnlM.jpg"},{"id":416,"membersId":170950,"dateAdded":"2023-03-19T20:30:17.000Z","lastUpdated":"2023-05-06T22:40:11.000Z","status":1,"totalPoints":1241877,"rankingPoints":402061,"totalPass":166,"totalFc":67,"totalFec":59,"totalQuad":8,"totalQuint":0,"crossoverLevel":6308,"bracketLevel":5662,"footswitchLevel":6440,"jackLevel":6457,"sideswitchLevel":7067,"doublestepLevel":6681,"staminaLevel":2967,"isBuddy":false,"preferences":"{\"discordId\":\"oknap#5399\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"oknap","sex":"Male","profileImg":""},{"id":336,"membersId":33573,"dateAdded":"2023-03-19T11:05:08.000Z","lastUpdated":"2023-05-06T23:36:52.000Z","status":1,"totalPoints":1455018,"rankingPoints":401703,"totalPass":175,"totalFc":46,"totalFec":97,"totalQuad":47,"totalQuint":0,"crossoverLevel":7563,"bracketLevel":5879,"footswitchLevel":6550,"jackLevel":6599,"sideswitchLevel":6478,"doublestepLevel":7139,"staminaLevel":4052,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"anisakis","sex":"Male","profileImg":""},{"id":363,"membersId":280,"dateAdded":"2023-03-19T16:13:09.000Z","lastUpdated":"2023-05-07T03:10:07.000Z","status":1,"totalPoints":1453386,"rankingPoints":400304,"totalPass":186,"totalFc":34,"totalFec":52,"totalQuad":91,"totalQuint":0,"crossoverLevel":7817,"bracketLevel":6086,"footswitchLevel":6697,"jackLevel":6799,"sideswitchLevel":7139,"doublestepLevel":7300,"staminaLevel":3623,"isBuddy":false,"preferences":"{\"discordId\":\"Faker13#9399\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Faker13","sex":"Male","profileImg":"https://i.imgur.com/krDDjC3.jpg"},{"id":371,"membersId":173145,"dateAdded":"2023-03-19T17:02:51.000Z","lastUpdated":"2023-04-27T00:09:49.000Z","status":1,"totalPoints":1493472,"rankingPoints":399354,"totalPass":234,"totalFc":53,"totalFec":91,"totalQuad":4,"totalQuint":0,"crossoverLevel":7717,"bracketLevel":6861,"footswitchLevel":7229,"jackLevel":6643,"sideswitchLevel":7371,"doublestepLevel":7461,"staminaLevel":3808,"isBuddy":false,"preferences":"{\"discordId\":\"miklowcic#0416\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"miklowcic","sex":"Male","profileImg":"https://i.imgur.com/CXKK11f.jpg"},{"id":110,"membersId":173359,"dateAdded":"2023-03-18T21:54:58.000Z","lastUpdated":"2023-05-04T22:45:52.000Z","status":1,"totalPoints":1511662,"rankingPoints":395953,"totalPass":187,"totalFc":103,"totalFec":92,"totalQuad":23,"totalQuint":0,"crossoverLevel":7522,"bracketLevel":6606,"footswitchLevel":6860,"jackLevel":7143,"sideswitchLevel":6237,"doublestepLevel":7378,"staminaLevel":4558,"isBuddy":false,"preferences":"{\"discordId\":\"phixious#5640\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xancara","sex":"Male","profileImg":""},{"id":427,"membersId":62,"dateAdded":"2023-03-19T21:42:25.000Z","lastUpdated":"2023-05-05T03:07:20.000Z","status":1,"totalPoints":900345,"rankingPoints":394614,"totalPass":134,"totalFc":43,"totalFec":19,"totalQuad":3,"totalQuint":0,"crossoverLevel":3038,"bracketLevel":3691,"footswitchLevel":4118,"jackLevel":4760,"sideswitchLevel":3606,"doublestepLevel":4000,"staminaLevel":3676,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JJK","sex":"Male","profileImg":"https://i.ibb.co/fCcH4Jx/jjk.png"},{"id":213,"membersId":4021,"dateAdded":"2023-03-18T23:54:13.000Z","lastUpdated":"2023-05-06T16:26:48.000Z","status":1,"totalPoints":1098059,"rankingPoints":394421,"totalPass":155,"totalFc":38,"totalFec":66,"totalQuad":17,"totalQuint":0,"crossoverLevel":5601,"bracketLevel":5677,"footswitchLevel":5623,"jackLevel":4741,"sideswitchLevel":5351,"doublestepLevel":5249,"staminaLevel":2505,"isBuddy":false,"preferences":"{\"discordId\":\"Highflyer#2114\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Highflyer","sex":"Male","profileImg":"https://media.discordapp.net/attachments/759754788505255937/852307537805967420/highfl10pogAC.png"},{"id":162,"membersId":49444,"dateAdded":"2023-03-18T22:26:42.000Z","lastUpdated":"2023-05-04T22:18:44.000Z","status":1,"totalPoints":1136406,"rankingPoints":394036,"totalPass":186,"totalFc":69,"totalFec":44,"totalQuad":1,"totalQuint":0,"crossoverLevel":4938,"bracketLevel":4097,"footswitchLevel":4527,"jackLevel":5354,"sideswitchLevel":4542,"doublestepLevel":4735,"staminaLevel":4651,"isBuddy":false,"preferences":"{\"discordId\":\"Freyja#4407\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"freyja","sex":"Female","profileImg":"https://i.ibb.co/26cb2XQ/Dbecdqk-151620b8-331a-42eb-9211-5d4798282726.jpg"},{"id":139,"membersId":3306,"dateAdded":"2023-03-18T22:07:50.000Z","lastUpdated":"2023-05-06T02:25:15.000Z","status":1,"totalPoints":683703,"rankingPoints":393983,"totalPass":87,"totalFc":12,"totalFec":55,"totalQuad":10,"totalQuint":0,"crossoverLevel":2523,"bracketLevel":2562,"footswitchLevel":2821,"jackLevel":2102,"sideswitchLevel":1535,"doublestepLevel":2903,"staminaLevel":2087,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ElPapaCosmico","sex":"Male","profileImg":"https://i.pinimg.com/236x/3e/01/73/3e0173d36ceed20727f4724b71d2961e--rilakkuma-kitty.jpg"},{"id":319,"membersId":173419,"dateAdded":"2023-03-19T06:43:39.000Z","lastUpdated":"2023-04-27T07:27:41.000Z","status":1,"totalPoints":1030163,"rankingPoints":393828,"totalPass":177,"totalFc":38,"totalFec":24,"totalQuad":2,"totalQuint":0,"crossoverLevel":4498,"bracketLevel":4189,"footswitchLevel":4464,"jackLevel":4876,"sideswitchLevel":4667,"doublestepLevel":4551,"staminaLevel":3767,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Desklamp","sex":"Male","profileImg":""},{"id":548,"membersId":128704,"dateAdded":"2023-03-20T22:05:59.000Z","lastUpdated":"2023-05-06T22:03:11.000Z","status":1,"totalPoints":1413936,"rankingPoints":392614,"totalPass":197,"totalFc":138,"totalFec":55,"totalQuad":0,"totalQuint":0,"crossoverLevel":7105,"bracketLevel":6665,"footswitchLevel":6753,"jackLevel":5859,"sideswitchLevel":6756,"doublestepLevel":7019,"staminaLevel":3884,"isBuddy":false,"preferences":"{\"discordId\":\"wrsw#0132\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"wrsw","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/955883714523594834/1088447719426760785/gs.png"},{"id":117,"membersId":173409,"dateAdded":"2023-03-18T21:57:22.000Z","lastUpdated":"2023-05-07T00:50:08.000Z","status":1,"totalPoints":1355293,"rankingPoints":392370,"totalPass":234,"totalFc":73,"totalFec":33,"totalQuad":9,"totalQuint":0,"crossoverLevel":6622,"bracketLevel":6005,"footswitchLevel":6185,"jackLevel":6377,"sideswitchLevel":7207,"doublestepLevel":6481,"staminaLevel":4163,"isBuddy":false,"preferences":"{\"discordId\":\"FuriousD#6477\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Furious_Dan","sex":"Male","profileImg":"https://i.ibb.co/2Mm9bgM/kos-transparent-small.png"},{"id":639,"membersId":77372,"dateAdded":"2023-03-22T04:25:50.000Z","lastUpdated":"2023-05-05T03:23:07.000Z","status":1,"totalPoints":867395,"rankingPoints":392025,"totalPass":180,"totalFc":22,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":3372,"bracketLevel":4929,"footswitchLevel":4168,"jackLevel":4960,"sideswitchLevel":4966,"doublestepLevel":4257,"staminaLevel":2900,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"aeubanks","sex":"Unspecified","profileImg":""},{"id":718,"membersId":173119,"dateAdded":"2023-03-24T01:56:51.000Z","lastUpdated":"2023-05-07T03:02:42.000Z","status":1,"totalPoints":932261,"rankingPoints":390664,"totalPass":127,"totalFc":51,"totalFec":44,"totalQuad":2,"totalQuint":0,"crossoverLevel":3943,"bracketLevel":4421,"footswitchLevel":4340,"jackLevel":3493,"sideswitchLevel":4404,"doublestepLevel":4651,"staminaLevel":2886,"isBuddy":false,"preferences":"{\"discordId\":\"Kenji#8255\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rui Hachimura","sex":"Male","profileImg":""},{"id":304,"membersId":165777,"dateAdded":"2023-03-19T04:37:17.000Z","lastUpdated":"2023-05-07T03:36:00.000Z","status":1,"totalPoints":1085521,"rankingPoints":390505,"totalPass":179,"totalFc":48,"totalFec":37,"totalQuad":1,"totalQuint":0,"crossoverLevel":5005,"bracketLevel":4790,"footswitchLevel":4912,"jackLevel":5850,"sideswitchLevel":4985,"doublestepLevel":5315,"staminaLevel":3253,"isBuddy":false,"preferences":"{\"discordId\":\"Meatyguy#5343\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Meatyguy","sex":"Male","profileImg":"https://www.flashflashrevolution.com/vbz/customavatars/avatar1035057_10.gif"},{"id":728,"membersId":173441,"dateAdded":"2023-03-24T12:42:25.000Z","lastUpdated":"2023-05-07T03:06:30.000Z","status":1,"totalPoints":1156954,"rankingPoints":390284,"totalPass":179,"totalFc":53,"totalFec":40,"totalQuad":39,"totalQuint":1,"crossoverLevel":5970,"bracketLevel":4940,"footswitchLevel":5546,"jackLevel":3740,"sideswitchLevel":5201,"doublestepLevel":5502,"staminaLevel":2923,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Esteban_Bayona","sex":"Male","profileImg":"https://i.postimg.cc/6Qp1xZrP/Dise-o-sin-t-tulo.jpg"},{"id":102,"membersId":1087,"dateAdded":"2023-03-18T21:53:27.000Z","lastUpdated":"2023-04-24T02:12:47.000Z","status":1,"totalPoints":588566,"rankingPoints":390169,"totalPass":123,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2220,"bracketLevel":2744,"footswitchLevel":2278,"jackLevel":3663,"sideswitchLevel":2662,"doublestepLevel":2771,"staminaLevel":2647,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CLINTBEASTWOOD","sex":"Male","profileImg":"https://i.imgur.com/y6NtHkN.png"},{"id":282,"membersId":167704,"dateAdded":"2023-03-19T02:56:02.000Z","lastUpdated":"2023-05-06T01:02:37.000Z","status":1,"totalPoints":986595,"rankingPoints":389873,"totalPass":89,"totalFc":55,"totalFec":67,"totalQuad":52,"totalQuint":0,"crossoverLevel":5846,"bracketLevel":3076,"footswitchLevel":4609,"jackLevel":3208,"sideswitchLevel":5093,"doublestepLevel":4916,"staminaLevel":2223,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MegamanFknX","sex":"Male","profileImg":"https://i1.sndcdn.com/artworks-H4Rkyy5HygqBFyzQ-XbLumA-t240x240.jpg"},{"id":28,"membersId":77862,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-05-07T00:41:56.000Z","status":1,"totalPoints":1146389,"rankingPoints":389779,"totalPass":185,"totalFc":63,"totalFec":33,"totalQuad":2,"totalQuint":0,"crossoverLevel":4442,"bracketLevel":5561,"footswitchLevel":5582,"jackLevel":5632,"sideswitchLevel":4661,"doublestepLevel":5631,"staminaLevel":3416,"isBuddy":false,"preferences":"{\"discordId\":\"JeffreyATW#8645\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JeffreyATW","sex":"Male","profileImg":"https://jeffreyatw.com/static/images/profile-wink-250.png"},{"id":216,"membersId":133806,"dateAdded":"2023-03-19T00:10:53.000Z","lastUpdated":"2023-05-07T03:47:30.000Z","status":1,"totalPoints":1250891,"rankingPoints":389639,"totalPass":172,"totalFc":71,"totalFec":97,"totalQuad":2,"totalQuint":0,"crossoverLevel":6500,"bracketLevel":4794,"footswitchLevel":6066,"jackLevel":5670,"sideswitchLevel":6824,"doublestepLevel":6272,"staminaLevel":3074,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PUYO","sex":"Unspecified","profileImg":"https://live.staticflickr.com/65535/51260131445_d6c068ca6e_m.jpg"},{"id":70,"membersId":173636,"dateAdded":"2023-03-18T21:49:56.000Z","lastUpdated":"2023-05-05T04:29:37.000Z","status":1,"totalPoints":650673,"rankingPoints":388002,"totalPass":69,"totalFc":10,"totalFec":35,"totalQuad":48,"totalQuint":0,"crossoverLevel":3649,"bracketLevel":1987,"footswitchLevel":3070,"jackLevel":1963,"sideswitchLevel":2531,"doublestepLevel":3346,"staminaLevel":1429,"isBuddy":false,"preferences":"{\"discordId\":\"sarbackergaming#8250\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZSL","sex":"Male","profileImg":"https://i.imgur.com/NvPX4bC.png"},{"id":976,"membersId":471,"dateAdded":"2023-04-02T19:21:59.000Z","lastUpdated":"2023-04-25T00:00:45.000Z","status":1,"totalPoints":696487,"rankingPoints":387585,"totalPass":70,"totalFc":44,"totalFec":34,"totalQuad":17,"totalQuint":0,"crossoverLevel":3017,"bracketLevel":1789,"footswitchLevel":2398,"jackLevel":4094,"sideswitchLevel":2430,"doublestepLevel":2899,"staminaLevel":2603,"isBuddy":false,"preferences":"{\"discordId\":\"kay0ss#6339\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kay0ss","sex":"Male","profileImg":""},{"id":63,"membersId":173182,"dateAdded":"2023-03-18T21:49:50.000Z","lastUpdated":"2023-04-27T14:32:54.000Z","status":1,"totalPoints":1279445,"rankingPoints":385954,"totalPass":193,"totalFc":124,"totalFec":38,"totalQuad":0,"totalQuint":0,"crossoverLevel":6831,"bracketLevel":6145,"footswitchLevel":6525,"jackLevel":4816,"sideswitchLevel":6858,"doublestepLevel":6493,"staminaLevel":3058,"isBuddy":false,"preferences":"{\"discordId\":\"DDDAAA#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DDDAAA","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/250042733303955467/941867594590322718/fernandey.png"},{"id":89,"membersId":66785,"dateAdded":"2023-03-18T21:51:12.000Z","lastUpdated":"2023-05-06T01:00:17.000Z","status":1,"totalPoints":1059311,"rankingPoints":385116,"totalPass":137,"totalFc":53,"totalFec":97,"totalQuad":0,"totalQuint":0,"crossoverLevel":5596,"bracketLevel":4275,"footswitchLevel":5372,"jackLevel":3492,"sideswitchLevel":4427,"doublestepLevel":5716,"staminaLevel":2361,"isBuddy":false,"preferences":"{\"discordId\":\"Ralph#6196\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ralph Caffery","sex":"Male","profileImg":""},{"id":857,"membersId":172954,"dateAdded":"2023-03-27T20:00:21.000Z","lastUpdated":"2023-05-06T00:19:03.000Z","status":1,"totalPoints":948686,"rankingPoints":384622,"totalPass":59,"totalFc":71,"totalFec":110,"totalQuad":19,"totalQuint":0,"crossoverLevel":5884,"bracketLevel":3404,"footswitchLevel":4831,"jackLevel":3646,"sideswitchLevel":4836,"doublestepLevel":4981,"staminaLevel":1873,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"copas","sex":"Male","profileImg":""},{"id":382,"membersId":3778,"dateAdded":"2023-03-19T17:38:41.000Z","lastUpdated":"2023-05-05T06:49:07.000Z","status":1,"totalPoints":730334,"rankingPoints":382522,"totalPass":69,"totalFc":41,"totalFec":73,"totalQuad":5,"totalQuint":0,"crossoverLevel":4444,"bracketLevel":2530,"footswitchLevel":3742,"jackLevel":1733,"sideswitchLevel":3740,"doublestepLevel":4310,"staminaLevel":1483,"isBuddy":false,"preferences":"{\"discordId\":\"s!cK b0y#7276\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Andisheh","sex":"Male","profileImg":""},{"id":401,"membersId":132280,"dateAdded":"2023-03-19T19:14:00.000Z","lastUpdated":"2023-05-04T00:52:22.000Z","status":1,"totalPoints":752673,"rankingPoints":382144,"totalPass":121,"totalFc":42,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":3228,"bracketLevel":4313,"footswitchLevel":3680,"jackLevel":3935,"sideswitchLevel":4020,"doublestepLevel":3582,"staminaLevel":2367,"isBuddy":false,"preferences":"{\"discordId\":\"Fingy#7439\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Fingy","sex":"Male","profileImg":""},{"id":25,"membersId":172893,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-05-07T00:54:10.000Z","status":1,"totalPoints":1343667,"rankingPoints":380609,"totalPass":189,"totalFc":101,"totalFec":69,"totalQuad":0,"totalQuint":0,"crossoverLevel":5888,"bracketLevel":6183,"footswitchLevel":6248,"jackLevel":6407,"sideswitchLevel":5501,"doublestepLevel":6246,"staminaLevel":4313,"isBuddy":false,"preferences":"{\"discordId\":\"Smalls#9101\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Smalls","sex":"Male","profileImg":"https://i.imgur.com/RDuvnsC.jpg"},{"id":55,"membersId":134219,"dateAdded":"2023-03-18T21:49:10.000Z","lastUpdated":"2023-05-05T04:31:17.000Z","status":1,"totalPoints":867474,"rankingPoints":380112,"totalPass":125,"totalFc":24,"totalFec":46,"totalQuad":17,"totalQuint":0,"crossoverLevel":4101,"bracketLevel":4278,"footswitchLevel":4224,"jackLevel":2659,"sideswitchLevel":3261,"doublestepLevel":3848,"staminaLevel":1874,"isBuddy":false,"preferences":"{\"discordId\":\"Zarinah#9770\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZarinahBBM","sex":"Female","profileImg":"https://i.ibb.co/0f7Rrg3/My-home.png"},{"id":258,"membersId":173291,"dateAdded":"2023-03-19T01:39:56.000Z","lastUpdated":"2023-05-05T15:04:05.000Z","status":1,"totalPoints":467173,"rankingPoints":379591,"totalPass":58,"totalFc":27,"totalFec":26,"totalQuad":1,"totalQuint":0,"crossoverLevel":1631,"bracketLevel":1775,"footswitchLevel":2229,"jackLevel":1382,"sideswitchLevel":1315,"doublestepLevel":1836,"staminaLevel":1974,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Daz4","sex":"Unspecified","profileImg":""},{"id":556,"membersId":82300,"dateAdded":"2023-03-20T23:03:06.000Z","lastUpdated":"2023-05-05T00:31:00.000Z","status":1,"totalPoints":784524,"rankingPoints":378968,"totalPass":89,"totalFc":25,"totalFec":78,"totalQuad":26,"totalQuint":0,"crossoverLevel":4805,"bracketLevel":3139,"footswitchLevel":4394,"jackLevel":2671,"sideswitchLevel":4903,"doublestepLevel":4603,"staminaLevel":1615,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"itsjusowl","sex":"Male","profileImg":""},{"id":1,"membersId":50287,"dateAdded":"2023-03-15T03:01:38.000Z","lastUpdated":"2023-04-29T03:14:34.000Z","status":1,"totalPoints":949910,"rankingPoints":378662,"totalPass":146,"totalFc":38,"totalFec":51,"totalQuad":10,"totalQuint":0,"crossoverLevel":4600,"bracketLevel":3715,"footswitchLevel":4297,"jackLevel":4479,"sideswitchLevel":4865,"doublestepLevel":4227,"staminaLevel":3354,"isBuddy":true,"preferences":"{\"discordId\":\"teejusb#1921\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"teejusb","sex":"Male","profileImg":"https://i.imgur.com/thVD6Fe.png"},{"id":399,"membersId":7693,"dateAdded":"2023-03-19T19:03:23.000Z","lastUpdated":"2023-04-15T23:09:18.000Z","status":1,"totalPoints":381346,"rankingPoints":378337,"totalPass":27,"totalFc":19,"totalFec":23,"totalQuad":7,"totalQuint":0,"crossoverLevel":1395,"bracketLevel":1746,"footswitchLevel":1772,"jackLevel":608,"sideswitchLevel":1144,"doublestepLevel":1748,"staminaLevel":1416,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"El_Tarma","sex":"Male","profileImg":""},{"id":36,"membersId":127813,"dateAdded":"2023-03-18T21:48:59.000Z","lastUpdated":"2023-05-07T05:55:07.000Z","status":1,"totalPoints":872409,"rankingPoints":377390,"totalPass":114,"totalFc":54,"totalFec":42,"totalQuad":0,"totalQuint":0,"crossoverLevel":3844,"bracketLevel":5149,"footswitchLevel":4580,"jackLevel":3840,"sideswitchLevel":4953,"doublestepLevel":4776,"staminaLevel":2070,"isBuddy":false,"preferences":"{\"discordId\":\"RakkiiCB#3661\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RakkiiCB","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/924755977067171940/986492744136556554/Untitled-1.png"},{"id":193,"membersId":173050,"dateAdded":"2023-03-18T23:03:16.000Z","lastUpdated":"2023-05-05T00:03:12.000Z","status":1,"totalPoints":853339,"rankingPoints":377000,"totalPass":132,"totalFc":51,"totalFec":23,"totalQuad":4,"totalQuint":0,"crossoverLevel":3478,"bracketLevel":3533,"footswitchLevel":3992,"jackLevel":2396,"sideswitchLevel":4308,"doublestepLevel":3018,"staminaLevel":3621,"isBuddy":false,"preferences":"{\"discordId\":\"Endymion48#5825\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"EndymionCL","sex":"Male","profileImg":"https://i.imgur.com/wvZXXWE.jpg"},{"id":256,"membersId":163474,"dateAdded":"2023-03-19T01:37:47.000Z","lastUpdated":"2023-04-30T10:25:07.000Z","status":1,"totalPoints":1202159,"rankingPoints":375230,"totalPass":168,"totalFc":75,"totalFec":80,"totalQuad":0,"totalQuint":0,"crossoverLevel":6614,"bracketLevel":5116,"footswitchLevel":5895,"jackLevel":4989,"sideswitchLevel":6137,"doublestepLevel":6047,"staminaLevel":2968,"isBuddy":false,"preferences":"{\"discordId\":\"babyzionov#7209\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"babyzionov","sex":"Unspecified","profileImg":""},{"id":929,"membersId":173196,"dateAdded":"2023-03-30T23:50:10.000Z","lastUpdated":"2023-05-07T02:13:35.000Z","status":1,"totalPoints":558358,"rankingPoints":375219,"totalPass":23,"totalFc":24,"totalFec":72,"totalQuad":20,"totalQuint":0,"crossoverLevel":3026,"bracketLevel":2380,"footswitchLevel":2817,"jackLevel":2816,"sideswitchLevel":2255,"doublestepLevel":2457,"staminaLevel":1150,"isBuddy":false,"preferences":"{\"discordId\":\"MIKO491#2751\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MIKO491","sex":"Male","profileImg":""},{"id":33,"membersId":61697,"dateAdded":"2023-03-18T21:48:57.000Z","lastUpdated":"2023-05-05T03:13:49.000Z","status":1,"totalPoints":861783,"rankingPoints":375176,"totalPass":128,"totalFc":42,"totalFec":56,"totalQuad":1,"totalQuint":0,"crossoverLevel":4534,"bracketLevel":3457,"footswitchLevel":4278,"jackLevel":2655,"sideswitchLevel":3608,"doublestepLevel":3749,"staminaLevel":2388,"isBuddy":false,"preferences":"{\"discordId\":\"Blizzrdball#3098\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Blizzrdball","sex":"Male","profileImg":"https://i.imgur.com/wgt2mm0.png"},{"id":140,"membersId":174935,"dateAdded":"2023-03-18T22:09:53.000Z","lastUpdated":"2023-05-04T03:53:41.000Z","status":1,"totalPoints":1299992,"rankingPoints":375005,"totalPass":221,"totalFc":81,"totalFec":38,"totalQuad":1,"totalQuint":0,"crossoverLevel":5929,"bracketLevel":4872,"footswitchLevel":5339,"jackLevel":5401,"sideswitchLevel":4252,"doublestepLevel":6273,"staminaLevel":4753,"isBuddy":false,"preferences":"{\"discordId\":\"reset#7763\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"reset_itg","sex":"Unspecified","profileImg":""},{"id":699,"membersId":66664,"dateAdded":"2023-03-23T14:43:51.000Z","lastUpdated":"2023-05-04T17:37:04.000Z","status":1,"totalPoints":1258221,"rankingPoints":374687,"totalPass":304,"totalFc":22,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":4723,"bracketLevel":5018,"footswitchLevel":5350,"jackLevel":5878,"sideswitchLevel":6069,"doublestepLevel":5222,"staminaLevel":5638,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZoG-","sex":"Male","profileImg":"https://i.imgur.com/JdcCnQ3.png"},{"id":263,"membersId":173094,"dateAdded":"2023-03-19T01:46:03.000Z","lastUpdated":"2023-05-06T17:45:29.000Z","status":1,"totalPoints":577033,"rankingPoints":374367,"totalPass":78,"totalFc":34,"totalFec":30,"totalQuad":12,"totalQuint":0,"crossoverLevel":2949,"bracketLevel":3245,"footswitchLevel":3537,"jackLevel":1268,"sideswitchLevel":3003,"doublestepLevel":2920,"staminaLevel":1145,"isBuddy":false,"preferences":"{\"discordId\":\"sk8s#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SPUGDDR","sex":"Male","profileImg":"https://imgur.com/IGpZvyr.gif"},{"id":190,"membersId":129254,"dateAdded":"2023-03-18T22:58:13.000Z","lastUpdated":"2023-04-30T22:15:12.000Z","status":1,"totalPoints":888222,"rankingPoints":371958,"totalPass":163,"totalFc":43,"totalFec":36,"totalQuad":3,"totalQuint":0,"crossoverLevel":4280,"bracketLevel":3076,"footswitchLevel":3603,"jackLevel":3965,"sideswitchLevel":3690,"doublestepLevel":3520,"staminaLevel":3430,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ddrneel","sex":"Male","profileImg":""},{"id":482,"membersId":147676,"dateAdded":"2023-03-20T05:38:15.000Z","lastUpdated":"2023-05-07T03:14:34.000Z","status":1,"totalPoints":919864,"rankingPoints":370986,"totalPass":154,"totalFc":61,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":4016,"bracketLevel":4733,"footswitchLevel":4269,"jackLevel":5263,"sideswitchLevel":4952,"doublestepLevel":4294,"staminaLevel":2437,"isBuddy":false,"preferences":"{\"discordId\":\"Eesa#8435\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Eesa","sex":"Female","profileImg":""},{"id":260,"membersId":128275,"dateAdded":"2023-03-19T01:44:30.000Z","lastUpdated":"2023-05-05T01:20:23.000Z","status":1,"totalPoints":792050,"rankingPoints":369502,"totalPass":151,"totalFc":28,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":4060,"bracketLevel":3868,"footswitchLevel":4035,"jackLevel":2553,"sideswitchLevel":5496,"doublestepLevel":4503,"staminaLevel":1656,"isBuddy":false,"preferences":"{\"discordId\":\"CarterTheQ#4442\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CarterTheQ","sex":"Male","profileImg":"https://i.imgur.com/LZmDP2t.png"},{"id":246,"membersId":173137,"dateAdded":"2023-03-19T01:00:25.000Z","lastUpdated":"2023-04-30T11:43:37.000Z","status":1,"totalPoints":922974,"rankingPoints":369191,"totalPass":115,"totalFc":51,"totalFec":79,"totalQuad":3,"totalQuint":0,"crossoverLevel":4945,"bracketLevel":3511,"footswitchLevel":4430,"jackLevel":2837,"sideswitchLevel":5281,"doublestepLevel":4134,"staminaLevel":2331,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Floms","sex":"Male","profileImg":""},{"id":26,"membersId":173788,"dateAdded":"2023-03-18T21:48:53.000Z","lastUpdated":"2023-05-06T01:06:26.000Z","status":1,"totalPoints":1015226,"rankingPoints":369073,"totalPass":219,"totalFc":30,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":3971,"bracketLevel":4759,"footswitchLevel":4787,"jackLevel":3651,"sideswitchLevel":3829,"doublestepLevel":4474,"staminaLevel":3875,"isBuddy":false,"preferences":"{\"discordId\":\"Jace#9339\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Discography Population 7","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/591703651496493088/1095063531134660740/goldstar_stretch.png"},{"id":155,"membersId":31959,"dateAdded":"2023-03-18T22:20:55.000Z","lastUpdated":"2023-05-04T03:46:10.000Z","status":1,"totalPoints":724017,"rankingPoints":367931,"totalPass":104,"totalFc":32,"totalFec":44,"totalQuad":3,"totalQuint":0,"crossoverLevel":3450,"bracketLevel":3408,"footswitchLevel":4208,"jackLevel":3438,"sideswitchLevel":4524,"doublestepLevel":4161,"staminaLevel":1704,"isBuddy":false,"preferences":"{\"discordId\":\"Dickey#7576\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dickey","sex":"Male","profileImg":"https://i.imgur.com/vT0yV77.png"},{"id":249,"membersId":173305,"dateAdded":"2023-03-19T01:12:08.000Z","lastUpdated":"2023-05-06T23:13:02.000Z","status":1,"totalPoints":750507,"rankingPoints":367786,"totalPass":123,"totalFc":51,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":2983,"bracketLevel":3200,"footswitchLevel":3500,"jackLevel":4516,"sideswitchLevel":4730,"doublestepLevel":3638,"staminaLevel":3079,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maxximus","sex":"Male","profileImg":"https://tinypic.host/images/2022/07/23/20220722_2041002.jpg"},{"id":40,"membersId":128698,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-05-04T18:31:47.000Z","status":1,"totalPoints":1113512,"rankingPoints":365971,"totalPass":182,"totalFc":88,"totalFec":36,"totalQuad":0,"totalQuint":0,"crossoverLevel":4583,"bracketLevel":5777,"footswitchLevel":5667,"jackLevel":5586,"sideswitchLevel":5785,"doublestepLevel":5452,"staminaLevel":3545,"isBuddy":false,"preferences":"{\"discordId\":\"Exschwasion#5968\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Exschwasion","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/210350948055384064/957716217093820446/b.png"},{"id":180,"membersId":128724,"dateAdded":"2023-03-18T22:43:47.000Z","lastUpdated":"2023-05-06T22:21:17.000Z","status":1,"totalPoints":806951,"rankingPoints":365163,"totalPass":154,"totalFc":34,"totalFec":26,"totalQuad":2,"totalQuint":0,"crossoverLevel":3517,"bracketLevel":3418,"footswitchLevel":3354,"jackLevel":4824,"sideswitchLevel":3595,"doublestepLevel":3557,"staminaLevel":2700,"isBuddy":false,"preferences":"{\"discordId\":\"LFK#0512\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"(11) Howie Nguyen","sex":"Unspecified","profileImg":"https://i.imgur.com/mCnGAVc.png"},{"id":314,"membersId":165524,"dateAdded":"2023-03-19T05:33:33.000Z","lastUpdated":"2023-05-06T10:34:38.000Z","status":1,"totalPoints":996418,"rankingPoints":363700,"totalPass":181,"totalFc":62,"totalFec":32,"totalQuad":0,"totalQuint":0,"crossoverLevel":4973,"bracketLevel":3561,"footswitchLevel":4263,"jackLevel":5303,"sideswitchLevel":5023,"doublestepLevel":4719,"staminaLevel":3588,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"COLLETnm7","sex":"Male","profileImg":"https://i.gyazo.com/be29cf05362aae1c603e7f39b3b9192c.png"},{"id":322,"membersId":124751,"dateAdded":"2023-03-19T07:13:03.000Z","lastUpdated":"2023-05-01T05:20:46.000Z","status":1,"totalPoints":861353,"rankingPoints":362618,"totalPass":117,"totalFc":45,"totalFec":55,"totalQuad":0,"totalQuint":0,"crossoverLevel":3470,"bracketLevel":2640,"footswitchLevel":3494,"jackLevel":3272,"sideswitchLevel":2998,"doublestepLevel":3661,"staminaLevel":3332,"isBuddy":false,"preferences":"{\"discordId\":\"dashark#9053\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"the penis monster ","sex":"Male","profileImg":"https://i.imgur.com/GDN5TxQ.jpg"},{"id":627,"membersId":139333,"dateAdded":"2023-03-22T00:40:46.000Z","lastUpdated":"2023-05-05T05:11:44.000Z","status":1,"totalPoints":955813,"rankingPoints":360813,"totalPass":156,"totalFc":36,"totalFec":52,"totalQuad":4,"totalQuint":0,"crossoverLevel":4696,"bracketLevel":4426,"footswitchLevel":4487,"jackLevel":3463,"sideswitchLevel":4676,"doublestepLevel":4737,"staminaLevel":2362,"isBuddy":false,"preferences":"{\"discordId\":\"sumikk0#2825\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sumikk0","sex":"Female","profileImg":"https://i.imgur.com/SPtxMtA.png"},{"id":386,"membersId":982,"dateAdded":"2023-03-19T17:50:20.000Z","lastUpdated":"2023-05-04T23:43:09.000Z","status":1,"totalPoints":595757,"rankingPoints":360171,"totalPass":74,"totalFc":25,"totalFec":36,"totalQuad":17,"totalQuint":0,"crossoverLevel":2954,"bracketLevel":2126,"footswitchLevel":2732,"jackLevel":1988,"sideswitchLevel":2542,"doublestepLevel":2437,"staminaLevel":1038,"isBuddy":false,"preferences":"{\"discordId\":\"andy457#9598\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"andy457","sex":"Male","profileImg":"https://i.imgur.com/QVNeoe8.png"},{"id":994,"membersId":193,"dateAdded":"2023-04-03T22:17:18.000Z","lastUpdated":"2023-05-05T00:11:00.000Z","status":1,"totalPoints":451489,"rankingPoints":357753,"totalPass":65,"totalFc":16,"totalFec":19,"totalQuad":11,"totalQuint":0,"crossoverLevel":2363,"bracketLevel":1792,"footswitchLevel":2226,"jackLevel":1197,"sideswitchLevel":1334,"doublestepLevel":2433,"staminaLevel":1048,"isBuddy":false,"preferences":"{\"discordId\":\"rogerclark#1998\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"rogerclark","sex":"Male","profileImg":""},{"id":615,"membersId":165532,"dateAdded":"2023-03-21T21:42:45.000Z","lastUpdated":"2023-05-04T05:21:59.000Z","status":1,"totalPoints":1289109,"rankingPoints":357392,"totalPass":212,"totalFc":100,"totalFec":60,"totalQuad":1,"totalQuint":0,"crossoverLevel":6591,"bracketLevel":5122,"footswitchLevel":5671,"jackLevel":5753,"sideswitchLevel":5326,"doublestepLevel":6127,"staminaLevel":4201,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DdRDan","sex":"Male","profileImg":""},{"id":538,"membersId":174758,"dateAdded":"2023-03-20T20:42:02.000Z","lastUpdated":"2023-05-06T21:05:15.000Z","status":1,"totalPoints":753628,"rankingPoints":356126,"totalPass":146,"totalFc":28,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":3410,"bracketLevel":2928,"footswitchLevel":3439,"jackLevel":2520,"sideswitchLevel":4846,"doublestepLevel":3290,"staminaLevel":2672,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Miu","sex":"Female","profileImg":"https://i.ibb.co/yR0q6Qw/foto.jpg"},{"id":367,"membersId":66554,"dateAdded":"2023-03-19T16:27:29.000Z","lastUpdated":"2023-05-07T02:25:37.000Z","status":1,"totalPoints":678499,"rankingPoints":355802,"totalPass":101,"totalFc":32,"totalFec":38,"totalQuad":5,"totalQuint":0,"crossoverLevel":2717,"bracketLevel":2472,"footswitchLevel":2957,"jackLevel":2092,"sideswitchLevel":2487,"doublestepLevel":3052,"staminaLevel":2185,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hey Bud","sex":"Male","profileImg":"https://img.ifunny.co/images/88d9f390249ceee6364a5444e9d5d339418608fa12ef05619e3864de272ed3de_1.gif"},{"id":862,"membersId":173422,"dateAdded":"2023-03-27T22:51:51.000Z","lastUpdated":"2023-05-03T02:13:51.000Z","status":1,"totalPoints":644752,"rankingPoints":355541,"totalPass":114,"totalFc":21,"totalFec":26,"totalQuad":4,"totalQuint":0,"crossoverLevel":3330,"bracketLevel":2717,"footswitchLevel":2641,"jackLevel":1907,"sideswitchLevel":3031,"doublestepLevel":2978,"staminaLevel":1596,"isBuddy":false,"preferences":"{\"discordId\":\"Sonny#0655\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sonny","sex":"Male","profileImg":""},{"id":151,"membersId":145128,"dateAdded":"2023-03-18T22:17:00.000Z","lastUpdated":"2023-05-06T20:20:02.000Z","status":1,"totalPoints":827610,"rankingPoints":354352,"totalPass":147,"totalFc":38,"totalFec":49,"totalQuad":7,"totalQuint":0,"crossoverLevel":4050,"bracketLevel":3181,"footswitchLevel":4296,"jackLevel":2585,"sideswitchLevel":4685,"doublestepLevel":3589,"staminaLevel":1991,"isBuddy":false,"preferences":"{\"discordId\":\"caffiend#4604\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"H8EVRYTHNG","sex":"Male","profileImg":""},{"id":428,"membersId":112184,"dateAdded":"2023-03-19T21:44:07.000Z","lastUpdated":"2023-05-03T21:03:11.000Z","status":1,"totalPoints":1094023,"rankingPoints":353284,"totalPass":198,"totalFc":75,"totalFec":37,"totalQuad":1,"totalQuint":0,"crossoverLevel":5150,"bracketLevel":5001,"footswitchLevel":5142,"jackLevel":4989,"sideswitchLevel":5097,"doublestepLevel":5272,"staminaLevel":2891,"isBuddy":false,"preferences":"{\"discordId\":\"thedarklordtim#6982\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tim","sex":"Male","profileImg":"https://i.ibb.co/nbDz4tS/ava.png"},{"id":147,"membersId":175365,"dateAdded":"2023-03-18T22:14:07.000Z","lastUpdated":"2023-05-05T22:38:40.000Z","status":1,"totalPoints":862460,"rankingPoints":353253,"totalPass":172,"totalFc":42,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":3819,"bracketLevel":4505,"footswitchLevel":4887,"jackLevel":4090,"sideswitchLevel":5632,"doublestepLevel":4438,"staminaLevel":2147,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"midtown","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/942950694648971294/1095118164616024084/mako_pfp_smol.png"},{"id":210,"membersId":127797,"dateAdded":"2023-03-18T23:45:55.000Z","lastUpdated":"2023-05-04T00:12:07.000Z","status":1,"totalPoints":598299,"rankingPoints":351221,"totalPass":98,"totalFc":38,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":2031,"bracketLevel":4731,"footswitchLevel":3561,"jackLevel":3720,"sideswitchLevel":2275,"doublestepLevel":3645,"staminaLevel":1508,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dancingmaractus","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/704364807155089498/952378600886272020/maractus.png"},{"id":768,"membersId":127827,"dateAdded":"2023-03-25T05:09:38.000Z","lastUpdated":"2023-05-01T14:43:16.000Z","status":1,"totalPoints":804926,"rankingPoints":348550,"totalPass":98,"totalFc":79,"totalFec":60,"totalQuad":0,"totalQuint":0,"crossoverLevel":4628,"bracketLevel":2623,"footswitchLevel":3879,"jackLevel":2880,"sideswitchLevel":3859,"doublestepLevel":3643,"staminaLevel":1981,"isBuddy":false,"preferences":"{\"discordId\":\"01010101110101001010000101001001#6471\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SPVLABS","sex":"Male","profileImg":""},{"id":338,"membersId":36569,"dateAdded":"2023-03-19T11:51:05.000Z","lastUpdated":"2023-05-06T19:14:07.000Z","status":1,"totalPoints":985469,"rankingPoints":348443,"totalPass":114,"totalFc":114,"totalFec":65,"totalQuad":0,"totalQuint":0,"crossoverLevel":5069,"bracketLevel":3315,"footswitchLevel":4381,"jackLevel":4209,"sideswitchLevel":3394,"doublestepLevel":4447,"staminaLevel":2824,"isBuddy":false,"preferences":"{\"discordId\":\"Sirex#1748\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sirex","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/1005522661826367538/bee3a5c7d1c0f08c5ee6fd7ff4c5ec5d.png"},{"id":171,"membersId":75542,"dateAdded":"2023-03-18T22:35:33.000Z","lastUpdated":"2023-05-05T07:52:34.000Z","status":1,"totalPoints":509146,"rankingPoints":347551,"totalPass":117,"totalFc":13,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":2095,"bracketLevel":1894,"footswitchLevel":2255,"jackLevel":1550,"sideswitchLevel":1316,"doublestepLevel":2174,"staminaLevel":2668,"isBuddy":true,"preferences":"{\"discordId\":\"lucdar#1664\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lucdar","sex":"Male","profileImg":"https://media.discordapp.net/attachments/667070772862255134/865298278470647828/scaled_pfp.png"},{"id":115,"membersId":62430,"dateAdded":"2023-03-18T21:56:35.000Z","lastUpdated":"2023-05-06T16:26:47.000Z","status":1,"totalPoints":850673,"rankingPoints":347187,"totalPass":148,"totalFc":43,"totalFec":28,"totalQuad":2,"totalQuint":0,"crossoverLevel":4454,"bracketLevel":4738,"footswitchLevel":4613,"jackLevel":3511,"sideswitchLevel":4786,"doublestepLevel":4541,"staminaLevel":1531,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ManeMan08","sex":"Male","profileImg":"https://i.imgur.com/Gq7wyHQ.png"},{"id":3,"membersId":66246,"dateAdded":"2023-03-16T20:38:45.000Z","lastUpdated":"2023-05-07T02:04:45.000Z","status":1,"totalPoints":1330647,"rankingPoints":346563,"totalPass":242,"totalFc":97,"totalFec":39,"totalQuad":7,"totalQuint":0,"crossoverLevel":6193,"bracketLevel":5568,"footswitchLevel":5805,"jackLevel":5457,"sideswitchLevel":5346,"doublestepLevel":6089,"staminaLevel":4590,"isBuddy":true,"preferences":"{\"discordId\":\"Zankoku#4444\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Zankoku","sex":"Male","profileImg":"http://sugoifactory.moe/things/dopparle5.png"},{"id":90,"membersId":66443,"dateAdded":"2023-03-18T21:51:24.000Z","lastUpdated":"2023-05-05T04:02:09.000Z","status":1,"totalPoints":1165249,"rankingPoints":346055,"totalPass":213,"totalFc":34,"totalFec":70,"totalQuad":22,"totalQuint":0,"crossoverLevel":6547,"bracketLevel":4280,"footswitchLevel":5291,"jackLevel":5679,"sideswitchLevel":5365,"doublestepLevel":5709,"staminaLevel":2718,"isBuddy":true,"preferences":"{\"discordId\":\"limitin#6969\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"limitin","sex":"Male","profileImg":""},{"id":597,"membersId":175422,"dateAdded":"2023-03-21T15:26:07.000Z","lastUpdated":"2023-05-07T03:36:27.000Z","status":1,"totalPoints":753477,"rankingPoints":345451,"totalPass":141,"totalFc":40,"totalFec":30,"totalQuad":3,"totalQuint":0,"crossoverLevel":3000,"bracketLevel":3053,"footswitchLevel":3317,"jackLevel":2074,"sideswitchLevel":2554,"doublestepLevel":2676,"staminaLevel":2591,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pattmalka","sex":"Unspecified","profileImg":""},{"id":619,"membersId":128847,"dateAdded":"2023-03-21T22:04:20.000Z","lastUpdated":"2023-05-02T08:35:57.000Z","status":1,"totalPoints":912791,"rankingPoints":344019,"totalPass":171,"totalFc":49,"totalFec":24,"totalQuad":0,"totalQuint":0,"crossoverLevel":4708,"bracketLevel":4277,"footswitchLevel":4473,"jackLevel":4278,"sideswitchLevel":4693,"doublestepLevel":4238,"staminaLevel":2337,"isBuddy":false,"preferences":"{\"discordId\":\"LaplaceFox#0222\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LaplaceFox","sex":"Unspecified","profileImg":"https://i.imgur.com/ggvyJC3.png"},{"id":377,"membersId":173589,"dateAdded":"2023-03-19T17:30:07.000Z","lastUpdated":"2023-05-07T00:49:11.000Z","status":1,"totalPoints":857358,"rankingPoints":343447,"totalPass":166,"totalFc":29,"totalFec":41,"totalQuad":0,"totalQuint":0,"crossoverLevel":4611,"bracketLevel":3484,"footswitchLevel":4325,"jackLevel":3427,"sideswitchLevel":4050,"doublestepLevel":3962,"staminaLevel":1747,"isBuddy":false,"preferences":"{\"discordId\":\"Bader#1343\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bader","sex":"Male","profileImg":""},{"id":225,"membersId":66661,"dateAdded":"2023-03-19T00:24:59.000Z","lastUpdated":"2023-05-06T21:58:23.000Z","status":1,"totalPoints":663282,"rankingPoints":343215,"totalPass":112,"totalFc":38,"totalFec":21,"totalQuad":1,"totalQuint":0,"crossoverLevel":2081,"bracketLevel":2702,"footswitchLevel":2603,"jackLevel":1760,"sideswitchLevel":1637,"doublestepLevel":2081,"staminaLevel":3043,"isBuddy":false,"preferences":"{\"discordId\":\"Cairo'Nairo#0673\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"jeshusha1","sex":"Male","profileImg":"https://i.imgur.com/Jg5gtfR.png"},{"id":111,"membersId":354,"dateAdded":"2023-03-18T21:55:17.000Z","lastUpdated":"2023-05-04T04:13:24.000Z","status":1,"totalPoints":549799,"rankingPoints":342553,"totalPass":69,"totalFc":35,"totalFec":41,"totalQuad":6,"totalQuint":0,"crossoverLevel":3150,"bracketLevel":3039,"footswitchLevel":2683,"jackLevel":1459,"sideswitchLevel":1857,"doublestepLevel":2822,"staminaLevel":1360,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mau","sex":"Male","profileImg":"https://i.ibb.co/qkC10m7/Avatar.png"},{"id":91,"membersId":173007,"dateAdded":"2023-03-18T21:51:29.000Z","lastUpdated":"2023-04-19T04:16:10.000Z","status":1,"totalPoints":1119732,"rankingPoints":342019,"totalPass":233,"totalFc":39,"totalFec":52,"totalQuad":6,"totalQuint":0,"crossoverLevel":6229,"bracketLevel":3359,"footswitchLevel":5016,"jackLevel":5028,"sideswitchLevel":5829,"doublestepLevel":5389,"staminaLevel":3493,"isBuddy":false,"preferences":"{\"discordId\":\"kodensa#3582\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"kodensa","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/902652921890611254/1086771021857697812/a.jpg"},{"id":146,"membersId":66627,"dateAdded":"2023-03-18T22:14:05.000Z","lastUpdated":"2023-05-05T21:36:30.000Z","status":1,"totalPoints":856419,"rankingPoints":341156,"totalPass":132,"totalFc":10,"totalFec":62,"totalQuad":48,"totalQuint":0,"crossoverLevel":5386,"bracketLevel":2584,"footswitchLevel":4314,"jackLevel":4653,"sideswitchLevel":4773,"doublestepLevel":4514,"staminaLevel":1525,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stardust","sex":"Male","profileImg":""},{"id":68,"membersId":173716,"dateAdded":"2023-03-18T21:49:55.000Z","lastUpdated":"2023-05-05T18:07:45.000Z","status":1,"totalPoints":960366,"rankingPoints":340149,"totalPass":146,"totalFc":34,"totalFec":77,"totalQuad":23,"totalQuint":0,"crossoverLevel":5851,"bracketLevel":2834,"footswitchLevel":4517,"jackLevel":3263,"sideswitchLevel":5099,"doublestepLevel":4805,"staminaLevel":2529,"isBuddy":false,"preferences":"{\"discordId\":\"Andeh#8735\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Andeh","sex":"Unspecified","profileImg":"https://en.gravatar.com/userimage/210064376/fa835516b3cc4009674e2b2ba017e085.jpg"},{"id":603,"membersId":128840,"dateAdded":"2023-03-21T18:18:09.000Z","lastUpdated":"2023-05-04T22:40:05.000Z","status":1,"totalPoints":908627,"rankingPoints":338991,"totalPass":231,"totalFc":31,"totalFec":21,"totalQuad":0,"totalQuint":0,"crossoverLevel":4918,"bracketLevel":3413,"footswitchLevel":4191,"jackLevel":3182,"sideswitchLevel":3220,"doublestepLevel":4373,"staminaLevel":2107,"isBuddy":false,"preferences":"{\"discordId\":\"Inversionsx#2220\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jhennyinthecup ","sex":"Male","profileImg":""},{"id":231,"membersId":175374,"dateAdded":"2023-03-19T00:35:10.000Z","lastUpdated":"2023-03-26T03:38:15.000Z","status":1,"totalPoints":406994,"rankingPoints":338266,"totalPass":62,"totalFc":22,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":2052,"bracketLevel":1476,"footswitchLevel":2320,"jackLevel":3733,"sideswitchLevel":3871,"doublestepLevel":1720,"staminaLevel":1381,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LordLui","sex":"Unspecified","profileImg":""},{"id":441,"membersId":173334,"dateAdded":"2023-03-19T23:37:07.000Z","lastUpdated":"2023-05-07T06:39:39.000Z","status":1,"totalPoints":572629,"rankingPoints":338099,"totalPass":98,"totalFc":21,"totalFec":28,"totalQuad":0,"totalQuint":0,"crossoverLevel":2817,"bracketLevel":2286,"footswitchLevel":2647,"jackLevel":1811,"sideswitchLevel":2468,"doublestepLevel":2820,"staminaLevel":1388,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sidopolis","sex":"Male","profileImg":""},{"id":806,"membersId":4681,"dateAdded":"2023-03-25T23:13:35.000Z","lastUpdated":"2023-05-06T17:45:07.000Z","status":1,"totalPoints":1146321,"rankingPoints":337328,"totalPass":211,"totalFc":64,"totalFec":52,"totalQuad":9,"totalQuint":0,"crossoverLevel":6381,"bracketLevel":3570,"footswitchLevel":5138,"jackLevel":5473,"sideswitchLevel":5361,"doublestepLevel":5569,"staminaLevel":2973,"isBuddy":false,"preferences":"{\"discordId\":\"zexyu#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fatherhood Enjoyer","sex":"Male","profileImg":"https://i.imgur.com/P3cCABH.png"},{"id":384,"membersId":1232,"dateAdded":"2023-03-19T17:46:51.000Z","lastUpdated":"2023-05-03T00:55:58.000Z","status":1,"totalPoints":453701,"rankingPoints":336954,"totalPass":64,"totalFc":9,"totalFec":46,"totalQuad":10,"totalQuint":0,"crossoverLevel":2624,"bracketLevel":1522,"footswitchLevel":2162,"jackLevel":1172,"sideswitchLevel":2037,"doublestepLevel":2132,"staminaLevel":981,"isBuddy":false,"preferences":"{\"discordId\":\"mute#1126\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mute","sex":"Male","profileImg":"https://i.imgur.com/yWF6cdr.jpg"},{"id":686,"membersId":165856,"dateAdded":"2023-03-23T00:27:33.000Z","lastUpdated":"2023-05-05T05:02:44.000Z","status":1,"totalPoints":757310,"rankingPoints":336580,"totalPass":166,"totalFc":30,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":3340,"bracketLevel":2097,"footswitchLevel":2880,"jackLevel":2290,"sideswitchLevel":2895,"doublestepLevel":2811,"staminaLevel":2302,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"housesan","sex":"Male","profileImg":"https://i.imgur.com/AhrKz2q.png"},{"id":982,"membersId":173175,"dateAdded":"2023-04-02T22:02:55.000Z","lastUpdated":"2023-05-04T00:05:04.000Z","status":1,"totalPoints":941313,"rankingPoints":334083,"totalPass":175,"totalFc":81,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":4210,"bracketLevel":3761,"footswitchLevel":4574,"jackLevel":3237,"sideswitchLevel":3717,"doublestepLevel":5063,"staminaLevel":2303,"isBuddy":false,"preferences":"{\"discordId\":\"Fireblaster#3815\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fireblaster","sex":"Male","profileImg":""},{"id":247,"membersId":173037,"dateAdded":"2023-03-19T01:06:17.000Z","lastUpdated":"2023-05-01T02:58:28.000Z","status":1,"totalPoints":594589,"rankingPoints":333856,"totalPass":78,"totalFc":27,"totalFec":50,"totalQuad":14,"totalQuint":0,"crossoverLevel":2847,"bracketLevel":2499,"footswitchLevel":3021,"jackLevel":2036,"sideswitchLevel":2272,"doublestepLevel":3106,"staminaLevel":1100,"isBuddy":false,"preferences":"{\"discordId\":\"Fanatik25#0025\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fanatik25","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/415354956346949632/2b58a95153add52b12d7cfa6ed6a565a.png"},{"id":465,"membersId":1777,"dateAdded":"2023-03-20T02:11:18.000Z","lastUpdated":"2023-04-24T04:14:59.000Z","status":1,"totalPoints":571540,"rankingPoints":333813,"totalPass":58,"totalFc":0,"totalFec":67,"totalQuad":51,"totalQuint":0,"crossoverLevel":3320,"bracketLevel":1157,"footswitchLevel":2517,"jackLevel":1398,"sideswitchLevel":1926,"doublestepLevel":2320,"staminaLevel":1331,"isBuddy":false,"preferences":"{\"discordId\":\"brooksy#2138\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kyle ward","sex":"Male","profileImg":"https://i.imgur.com/0KGsEPa.png"},{"id":85,"membersId":174617,"dateAdded":"2023-03-18T21:50:59.000Z","lastUpdated":"2023-05-06T22:36:13.000Z","status":1,"totalPoints":653229,"rankingPoints":333734,"totalPass":116,"totalFc":37,"totalFec":25,"totalQuad":0,"totalQuint":0,"crossoverLevel":3461,"bracketLevel":3110,"footswitchLevel":3403,"jackLevel":1967,"sideswitchLevel":3973,"doublestepLevel":3032,"staminaLevel":2103,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zuchini","sex":"Male","profileImg":""},{"id":272,"membersId":173223,"dateAdded":"2023-03-19T02:28:47.000Z","lastUpdated":"2023-05-07T06:55:30.000Z","status":1,"totalPoints":754685,"rankingPoints":332278,"totalPass":142,"totalFc":32,"totalFec":40,"totalQuad":11,"totalQuint":0,"crossoverLevel":4501,"bracketLevel":3256,"footswitchLevel":3864,"jackLevel":2742,"sideswitchLevel":3065,"doublestepLevel":4023,"staminaLevel":1449,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Koso","sex":"Male","profileImg":"https://i.imgur.com/Vy3wGll.png"},{"id":114,"membersId":173653,"dateAdded":"2023-03-18T21:56:22.000Z","lastUpdated":"2023-05-01T18:09:22.000Z","status":1,"totalPoints":551000,"rankingPoints":332215,"totalPass":93,"totalFc":25,"totalFec":34,"totalQuad":1,"totalQuint":0,"crossoverLevel":2910,"bracketLevel":1676,"footswitchLevel":2861,"jackLevel":4059,"sideswitchLevel":2768,"doublestepLevel":2847,"staminaLevel":1254,"isBuddy":false,"preferences":"{\"discordId\":\"valgrind#2281\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"valgrind","sex":"Unspecified","profileImg":""},{"id":141,"membersId":132162,"dateAdded":"2023-03-18T22:10:21.000Z","lastUpdated":"2023-05-01T01:57:46.000Z","status":1,"totalPoints":1220596,"rankingPoints":332200,"totalPass":236,"totalFc":49,"totalFec":79,"totalQuad":1,"totalQuint":0,"crossoverLevel":6428,"bracketLevel":5468,"footswitchLevel":5620,"jackLevel":4996,"sideswitchLevel":5404,"doublestepLevel":5910,"staminaLevel":3108,"isBuddy":false,"preferences":"{\"discordId\":\"Arkitev#3765\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Arki","sex":"Male","profileImg":"https://i.imgur.com/VXCOGOa.png"},{"id":52,"membersId":165504,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-05-05T22:52:46.000Z","status":1,"totalPoints":662881,"rankingPoints":331208,"totalPass":161,"totalFc":18,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":2658,"bracketLevel":3410,"footswitchLevel":3281,"jackLevel":2968,"sideswitchLevel":3717,"doublestepLevel":3134,"staminaLevel":2322,"isBuddy":false,"preferences":"{\"discordId\":\"Hydreigos#5497\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"_Temeraire","sex":"Unspecified","profileImg":""},{"id":651,"membersId":75801,"dateAdded":"2023-03-22T15:14:56.000Z","lastUpdated":"2023-05-06T15:14:58.000Z","status":1,"totalPoints":826344,"rankingPoints":330938,"totalPass":164,"totalFc":56,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":3124,"bracketLevel":3404,"footswitchLevel":3871,"jackLevel":3375,"sideswitchLevel":4260,"doublestepLevel":3778,"staminaLevel":3443,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"aryla","sex":"Male","profileImg":""},{"id":37,"membersId":173251,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-05-07T03:49:03.000Z","status":1,"totalPoints":565870,"rankingPoints":329778,"totalPass":133,"totalFc":19,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":2389,"bracketLevel":3043,"footswitchLevel":3158,"jackLevel":2726,"sideswitchLevel":2912,"doublestepLevel":3233,"staminaLevel":1251,"isBuddy":false,"preferences":"{\"discordId\":\"sorae#7138\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sorae","sex":"Unspecified","profileImg":"https://i.imgur.com/cJEaR4t.png"},{"id":267,"membersId":50564,"dateAdded":"2023-03-19T01:57:43.000Z","lastUpdated":"2023-05-05T02:28:01.000Z","status":1,"totalPoints":669312,"rankingPoints":329662,"totalPass":122,"totalFc":29,"totalFec":27,"totalQuad":9,"totalQuint":0,"crossoverLevel":3014,"bracketLevel":2532,"footswitchLevel":3013,"jackLevel":2304,"sideswitchLevel":2359,"doublestepLevel":3176,"staminaLevel":1610,"isBuddy":false,"preferences":"{\"discordId\":\"GuyAllen#6784\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nate","sex":"Male","profileImg":"https://cdn-icons-png.flaticon.com/128/6854/6854468.png"},{"id":97,"membersId":173118,"dateAdded":"2023-03-18T21:52:44.000Z","lastUpdated":"2023-05-05T15:11:44.000Z","status":1,"totalPoints":782056,"rankingPoints":328775,"totalPass":115,"totalFc":53,"totalFec":73,"totalQuad":2,"totalQuint":0,"crossoverLevel":4972,"bracketLevel":3258,"footswitchLevel":4074,"jackLevel":2893,"sideswitchLevel":4072,"doublestepLevel":4647,"staminaLevel":1239,"isBuddy":false,"preferences":"{\"discordId\":\"HellKiteChaos#8559\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HellKiteChaos","sex":"Male","profileImg":"https://i.imgur.com/7f4bj4X.jpg"},{"id":84,"membersId":129655,"dateAdded":"2023-03-18T21:50:54.000Z","lastUpdated":"2023-04-27T01:00:51.000Z","status":1,"totalPoints":694237,"rankingPoints":328573,"totalPass":123,"totalFc":34,"totalFec":53,"totalQuad":4,"totalQuint":0,"crossoverLevel":3842,"bracketLevel":1877,"footswitchLevel":3490,"jackLevel":2896,"sideswitchLevel":3704,"doublestepLevel":3797,"staminaLevel":1600,"isBuddy":true,"preferences":"{\"discordId\":\"Hunter#1289\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XMOD Enjoyer","sex":"Male","profileImg":"https://i.imgur.com/H2aLLZ3.png"},{"id":524,"membersId":40013,"dateAdded":"2023-03-20T19:02:20.000Z","lastUpdated":"2023-05-05T02:50:17.000Z","status":1,"totalPoints":347611,"rankingPoints":327500,"totalPass":66,"totalFc":13,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1073,"bracketLevel":1435,"footswitchLevel":1611,"jackLevel":963,"sideswitchLevel":1200,"doublestepLevel":1206,"staminaLevel":1488,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"takumiAE86","sex":"Male","profileImg":""},{"id":285,"membersId":124527,"dateAdded":"2023-03-19T03:05:57.000Z","lastUpdated":"2023-05-04T10:23:43.000Z","status":1,"totalPoints":966368,"rankingPoints":327476,"totalPass":167,"totalFc":44,"totalFec":40,"totalQuad":41,"totalQuint":3,"crossoverLevel":5584,"bracketLevel":3600,"footswitchLevel":4718,"jackLevel":3325,"sideswitchLevel":3892,"doublestepLevel":4943,"staminaLevel":2171,"isBuddy":false,"preferences":"{\"discordId\":\"silverfox88vr#3717\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Silver Fox","sex":"Male","profileImg":"https://i.imgur.com/BfMlWOd.png"},{"id":507,"membersId":148381,"dateAdded":"2023-03-20T15:56:32.000Z","lastUpdated":"2023-05-03T19:47:05.000Z","status":1,"totalPoints":771410,"rankingPoints":326622,"totalPass":143,"totalFc":64,"totalFec":23,"totalQuad":1,"totalQuint":0,"crossoverLevel":3929,"bracketLevel":3985,"footswitchLevel":3585,"jackLevel":3874,"sideswitchLevel":3866,"doublestepLevel":3850,"staminaLevel":2056,"isBuddy":false,"preferences":"{\"discordId\":\"kidcrab#1158\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kidcrab","sex":"Male","profileImg":""},{"id":458,"membersId":175403,"dateAdded":"2023-03-20T01:43:40.000Z","lastUpdated":"2023-05-06T20:07:55.000Z","status":1,"totalPoints":645481,"rankingPoints":326538,"totalPass":117,"totalFc":10,"totalFec":70,"totalQuad":3,"totalQuint":0,"crossoverLevel":4001,"bracketLevel":1920,"footswitchLevel":2842,"jackLevel":2026,"sideswitchLevel":2139,"doublestepLevel":3687,"staminaLevel":1279,"isBuddy":false,"preferences":"{\"discordId\":\"OrangeToaster#5768\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Breebs","sex":"Male","profileImg":""},{"id":1219,"membersId":5242,"dateAdded":"2023-04-26T14:51:53.000Z","lastUpdated":"2023-05-05T08:05:28.000Z","status":1,"totalPoints":498127,"rankingPoints":325386,"totalPass":99,"totalFc":17,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":2167,"bracketLevel":1929,"footswitchLevel":2198,"jackLevel":2403,"sideswitchLevel":2724,"doublestepLevel":2130,"staminaLevel":1262,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"arx","sex":"Male","profileImg":""},{"id":228,"membersId":66726,"dateAdded":"2023-03-19T00:32:24.000Z","lastUpdated":"2023-04-30T23:38:07.000Z","status":1,"totalPoints":440432,"rankingPoints":324240,"totalPass":67,"totalFc":28,"totalFec":31,"totalQuad":1,"totalQuint":0,"crossoverLevel":2561,"bracketLevel":1930,"footswitchLevel":1682,"jackLevel":1444,"sideswitchLevel":1703,"doublestepLevel":1968,"staminaLevel":1357,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zeipher_Hawk","sex":"Male","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shuckle.png"},{"id":136,"membersId":66304,"dateAdded":"2023-03-18T22:05:57.000Z","lastUpdated":"2023-05-07T06:39:47.000Z","status":1,"totalPoints":322645,"rankingPoints":322645,"totalPass":18,"totalFc":5,"totalFec":43,"totalQuad":5,"totalQuint":0,"crossoverLevel":1519,"bracketLevel":1623,"footswitchLevel":1664,"jackLevel":1856,"sideswitchLevel":2367,"doublestepLevel":1792,"staminaLevel":497,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ATB","sex":"Male","profileImg":""},{"id":276,"membersId":4946,"dateAdded":"2023-03-19T02:40:51.000Z","lastUpdated":"2023-05-05T18:00:31.000Z","status":1,"totalPoints":1063152,"rankingPoints":321980,"totalPass":176,"totalFc":73,"totalFec":66,"totalQuad":23,"totalQuint":0,"crossoverLevel":6092,"bracketLevel":3914,"footswitchLevel":4945,"jackLevel":4424,"sideswitchLevel":5084,"doublestepLevel":5310,"staminaLevel":2597,"isBuddy":false,"preferences":"{\"discordId\":\"Lisek#7821\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lisek","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/765758657316388886/965675216690888704/fox2.png"},{"id":186,"membersId":173322,"dateAdded":"2023-03-18T22:50:14.000Z","lastUpdated":"2023-05-06T21:05:13.000Z","status":1,"totalPoints":694699,"rankingPoints":321831,"totalPass":153,"totalFc":34,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":3073,"bracketLevel":2952,"footswitchLevel":3193,"jackLevel":3149,"sideswitchLevel":2927,"doublestepLevel":3143,"staminaLevel":1802,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CK89REY","sex":"Unspecified","profileImg":""},{"id":95,"membersId":175276,"dateAdded":"2023-03-18T21:52:31.000Z","lastUpdated":"2023-05-05T23:15:59.000Z","status":1,"totalPoints":595199,"rankingPoints":320912,"totalPass":85,"totalFc":52,"totalFec":35,"totalQuad":3,"totalQuint":0,"crossoverLevel":3624,"bracketLevel":2082,"footswitchLevel":2910,"jackLevel":2405,"sideswitchLevel":2773,"doublestepLevel":2991,"staminaLevel":990,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"teekmn","sex":"Unspecified","profileImg":"https://cdn-live.warthunder.com/uploads/9c/ba20ec0674301f31323c1790d35c030fe45ab0/1415940983851.jpg"},{"id":356,"membersId":173228,"dateAdded":"2023-03-19T15:33:53.000Z","lastUpdated":"2023-05-03T15:47:14.000Z","status":1,"totalPoints":713215,"rankingPoints":320894,"totalPass":139,"totalFc":45,"totalFec":20,"totalQuad":15,"totalQuint":0,"crossoverLevel":4320,"bracketLevel":2316,"footswitchLevel":3318,"jackLevel":2721,"sideswitchLevel":3498,"doublestepLevel":3065,"staminaLevel":1849,"isBuddy":false,"preferences":"{\"discordId\":\"warriorddr#2803\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"warriorddr","sex":"Male","profileImg":"https://s6.aconvert.com/convert/p3r68-cdx67/tkjjv-evgit.jpg"},{"id":16,"membersId":174632,"dateAdded":"2023-03-18T21:48:45.000Z","lastUpdated":"2023-05-07T03:09:58.000Z","status":1,"totalPoints":756587,"rankingPoints":320595,"totalPass":152,"totalFc":72,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":3779,"bracketLevel":3809,"footswitchLevel":3962,"jackLevel":2563,"sideswitchLevel":3717,"doublestepLevel":3829,"staminaLevel":1654,"isBuddy":true,"preferences":"{\"discordId\":\"177013#8525\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SunkissEnjoyer","sex":"Unspecified","profileImg":"https://i.imgur.com/2YNygb4.png"},{"id":392,"membersId":128893,"dateAdded":"2023-03-19T18:23:36.000Z","lastUpdated":"2023-05-06T00:24:56.000Z","status":1,"totalPoints":712356,"rankingPoints":320338,"totalPass":121,"totalFc":58,"totalFec":42,"totalQuad":6,"totalQuint":0,"crossoverLevel":4826,"bracketLevel":2473,"footswitchLevel":3697,"jackLevel":2541,"sideswitchLevel":3352,"doublestepLevel":3972,"staminaLevel":929,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Quesadilla","sex":"Unspecified","profileImg":""},{"id":671,"membersId":66545,"dateAdded":"2023-03-22T22:06:43.000Z","lastUpdated":"2023-05-05T12:29:24.000Z","status":1,"totalPoints":547221,"rankingPoints":319862,"totalPass":124,"totalFc":27,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":2302,"bracketLevel":1304,"footswitchLevel":1827,"jackLevel":1295,"sideswitchLevel":1240,"doublestepLevel":2208,"staminaLevel":2742,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"skateinmars","sex":"Male","profileImg":"http://groovestats.com/SRPG3/img/relics/baguette.png"},{"id":345,"membersId":66703,"dateAdded":"2023-03-19T13:01:06.000Z","lastUpdated":"2023-04-23T15:31:33.000Z","status":1,"totalPoints":552562,"rankingPoints":318139,"totalPass":104,"totalFc":28,"totalFec":17,"totalQuad":2,"totalQuint":0,"crossoverLevel":2803,"bracketLevel":1437,"footswitchLevel":2409,"jackLevel":1807,"sideswitchLevel":2118,"doublestepLevel":2354,"staminaLevel":1669,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Alhe","sex":"Male","profileImg":""},{"id":423,"membersId":175397,"dateAdded":"2023-03-19T21:12:31.000Z","lastUpdated":"2023-05-02T23:57:14.000Z","status":1,"totalPoints":380189,"rankingPoints":316609,"totalPass":41,"totalFc":22,"totalFec":45,"totalQuad":9,"totalQuint":0,"crossoverLevel":2389,"bracketLevel":1822,"footswitchLevel":2057,"jackLevel":1305,"sideswitchLevel":919,"doublestepLevel":1950,"staminaLevel":812,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pani","sex":"Unspecified","profileImg":""},{"id":142,"membersId":175363,"dateAdded":"2023-03-18T22:10:39.000Z","lastUpdated":"2023-05-06T06:00:30.000Z","status":1,"totalPoints":593390,"rankingPoints":315605,"totalPass":93,"totalFc":41,"totalFec":29,"totalQuad":0,"totalQuint":0,"crossoverLevel":2984,"bracketLevel":2218,"footswitchLevel":3035,"jackLevel":3612,"sideswitchLevel":4126,"doublestepLevel":2841,"staminaLevel":1671,"isBuddy":false,"preferences":"{\"discordId\":\"crazy54311#0552\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Idontevenknowyou!","sex":"Male","profileImg":""},{"id":185,"membersId":256,"dateAdded":"2023-03-18T22:49:44.000Z","lastUpdated":"2023-04-22T19:36:52.000Z","status":1,"totalPoints":558037,"rankingPoints":314305,"totalPass":113,"totalFc":27,"totalFec":31,"totalQuad":0,"totalQuint":0,"crossoverLevel":2770,"bracketLevel":1613,"footswitchLevel":1875,"jackLevel":1620,"sideswitchLevel":1411,"doublestepLevel":1970,"staminaLevel":2718,"isBuddy":false,"preferences":"{\"discordId\":\"DanPeriod#0677\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DanPeriod","sex":"Male","profileImg":"https://i.ibb.co/2Sh9tbx/danderpborder.png"},{"id":1048,"membersId":170859,"dateAdded":"2023-04-07T17:03:35.000Z","lastUpdated":"2023-05-07T00:47:45.000Z","status":1,"totalPoints":786483,"rankingPoints":313411,"totalPass":128,"totalFc":81,"totalFec":58,"totalQuad":0,"totalQuint":0,"crossoverLevel":4791,"bracketLevel":3442,"footswitchLevel":4194,"jackLevel":3303,"sideswitchLevel":4508,"doublestepLevel":4498,"staminaLevel":1326,"isBuddy":false,"preferences":"{\"discordId\":\"null_expression#1367\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"a kangaroo","sex":"Unspecified","profileImg":"https://i.imgur.com/ivAQ4Kx.png"},{"id":170,"membersId":134773,"dateAdded":"2023-03-18T22:35:27.000Z","lastUpdated":"2023-05-06T03:50:38.000Z","status":1,"totalPoints":918720,"rankingPoints":311805,"totalPass":200,"totalFc":71,"totalFec":27,"totalQuad":0,"totalQuint":0,"crossoverLevel":4870,"bracketLevel":3535,"footswitchLevel":4243,"jackLevel":2952,"sideswitchLevel":4938,"doublestepLevel":4351,"staminaLevel":2827,"isBuddy":true,"preferences":"{\"discordId\":\"dlim#8705\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dlim","sex":"Male","profileImg":"https://i.imgur.com/JcxLonM.png"},{"id":152,"membersId":165653,"dateAdded":"2023-03-18T22:18:28.000Z","lastUpdated":"2023-05-03T23:34:53.000Z","status":1,"totalPoints":709146,"rankingPoints":311755,"totalPass":179,"totalFc":55,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":4051,"bracketLevel":3225,"footswitchLevel":3553,"jackLevel":3198,"sideswitchLevel":4784,"doublestepLevel":3324,"staminaLevel":1598,"isBuddy":false,"preferences":"{\"discordId\":\"dekw#9999\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dekw","sex":"Male","profileImg":""},{"id":297,"membersId":131910,"dateAdded":"2023-03-19T04:06:09.000Z","lastUpdated":"2023-05-06T03:46:05.000Z","status":1,"totalPoints":704401,"rankingPoints":311512,"totalPass":151,"totalFc":31,"totalFec":28,"totalQuad":1,"totalQuint":0,"crossoverLevel":4140,"bracketLevel":2537,"footswitchLevel":3395,"jackLevel":2781,"sideswitchLevel":3805,"doublestepLevel":3615,"staminaLevel":1502,"isBuddy":false,"preferences":"{\"discordId\":\"Slimezilla4#4735\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"slime","sex":"Male","profileImg":""},{"id":365,"membersId":165752,"dateAdded":"2023-03-19T16:22:47.000Z","lastUpdated":"2023-05-06T17:51:44.000Z","status":1,"totalPoints":680877,"rankingPoints":310787,"totalPass":131,"totalFc":66,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":3543,"bracketLevel":2335,"footswitchLevel":3319,"jackLevel":2301,"sideswitchLevel":3427,"doublestepLevel":3330,"staminaLevel":1593,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zui","sex":"Male","profileImg":"https://i.ibb.co/nwG0Yb1/aaegt.png"},{"id":24,"membersId":163331,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-04-09T21:09:04.000Z","status":1,"totalPoints":316650,"rankingPoints":310687,"totalPass":29,"totalFc":22,"totalFec":28,"totalQuad":0,"totalQuint":0,"crossoverLevel":1320,"bracketLevel":1027,"footswitchLevel":1657,"jackLevel":1551,"sideswitchLevel":2586,"doublestepLevel":1415,"staminaLevel":1041,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vivek Sharma","sex":"Male","profileImg":"https://i.ibb.co/pKqM0s4/azi-Cool-GS.png"},{"id":46,"membersId":66587,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-05-02T22:52:47.000Z","status":1,"totalPoints":566743,"rankingPoints":310572,"totalPass":118,"totalFc":53,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":2136,"bracketLevel":1873,"footswitchLevel":1916,"jackLevel":2070,"sideswitchLevel":2136,"doublestepLevel":2192,"staminaLevel":2940,"isBuddy":false,"preferences":"{\"discordId\":\"Lotarr#0466\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lotarr","sex":"Male","profileImg":"https://i.imgur.com/Z3lMRla.png"},{"id":113,"membersId":4819,"dateAdded":"2023-03-18T21:55:29.000Z","lastUpdated":"2023-04-24T09:39:07.000Z","status":1,"totalPoints":637426,"rankingPoints":310387,"totalPass":121,"totalFc":36,"totalFec":21,"totalQuad":2,"totalQuint":0,"crossoverLevel":3253,"bracketLevel":1944,"footswitchLevel":2938,"jackLevel":2601,"sideswitchLevel":2348,"doublestepLevel":3285,"staminaLevel":1698,"isBuddy":false,"preferences":"{\"discordId\":\"Renbrandt#0196\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Renbrandt","sex":"Male","profileImg":"https://i.imgur.com/WPPQI0D.png"},{"id":1054,"membersId":128260,"dateAdded":"2023-04-07T22:28:34.000Z","lastUpdated":"2023-05-02T00:27:46.000Z","status":1,"totalPoints":412508,"rankingPoints":309641,"totalPass":83,"totalFc":14,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":2340,"bracketLevel":1387,"footswitchLevel":2030,"jackLevel":1099,"sideswitchLevel":2258,"doublestepLevel":1615,"staminaLevel":937,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"nock","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1647380032074170368/Zfj0peic_200x200.jpg"},{"id":1083,"membersId":127810,"dateAdded":"2023-04-10T06:25:17.000Z","lastUpdated":"2023-04-25T04:27:41.000Z","status":1,"totalPoints":336823,"rankingPoints":308685,"totalPass":55,"totalFc":10,"totalFec":18,"totalQuad":3,"totalQuint":0,"crossoverLevel":1355,"bracketLevel":1206,"footswitchLevel":930,"jackLevel":935,"sideswitchLevel":1095,"doublestepLevel":1053,"staminaLevel":930,"isBuddy":false,"preferences":"{\"discordId\":\"BigC#2526\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BigC","sex":"Male","profileImg":"https://i.imgur.com/t7icJqv.png"},{"id":83,"membersId":136928,"dateAdded":"2023-03-18T21:50:47.000Z","lastUpdated":"2023-05-04T21:06:41.000Z","status":1,"totalPoints":547334,"rankingPoints":308203,"totalPass":81,"totalFc":42,"totalFec":62,"totalQuad":0,"totalQuint":0,"crossoverLevel":3220,"bracketLevel":2056,"footswitchLevel":2859,"jackLevel":1970,"sideswitchLevel":2742,"doublestepLevel":2834,"staminaLevel":1029,"isBuddy":false,"preferences":"{\"discordId\":\"Daikyi#9838\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Daikyi","sex":"Male","profileImg":"https://puu.sh/J6z9c/a9edbb3013.png"},{"id":368,"membersId":175389,"dateAdded":"2023-03-19T16:33:48.000Z","lastUpdated":"2023-05-06T22:41:01.000Z","status":1,"totalPoints":655649,"rankingPoints":308118,"totalPass":91,"totalFc":31,"totalFec":79,"totalQuad":11,"totalQuint":0,"crossoverLevel":4527,"bracketLevel":1538,"footswitchLevel":3235,"jackLevel":2137,"sideswitchLevel":3438,"doublestepLevel":3559,"staminaLevel":915,"isBuddy":false,"preferences":"{\"discordId\":\"patj#2109\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"patj","sex":"Male","profileImg":""},{"id":598,"membersId":3983,"dateAdded":"2023-03-21T16:37:34.000Z","lastUpdated":"2023-05-07T03:04:08.000Z","status":1,"totalPoints":786676,"rankingPoints":307924,"totalPass":126,"totalFc":72,"totalFec":62,"totalQuad":2,"totalQuint":0,"crossoverLevel":4942,"bracketLevel":2588,"footswitchLevel":3728,"jackLevel":3187,"sideswitchLevel":3985,"doublestepLevel":4303,"staminaLevel":1481,"isBuddy":false,"preferences":"{\"discordId\":\"BigYama#1895\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BigYama","sex":"Male","profileImg":""},{"id":130,"membersId":165916,"dateAdded":"2023-03-18T22:03:10.000Z","lastUpdated":"2023-05-03T01:55:59.000Z","status":1,"totalPoints":501912,"rankingPoints":307584,"totalPass":63,"totalFc":44,"totalFec":50,"totalQuad":3,"totalQuint":0,"crossoverLevel":3208,"bracketLevel":1744,"footswitchLevel":2625,"jackLevel":1965,"sideswitchLevel":2557,"doublestepLevel":2738,"staminaLevel":781,"isBuddy":false,"preferences":"{\"discordId\":\"A Minty Dragon#7236\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AMintyDragon","sex":"Male","profileImg":"https://i.imgur.com/CDhgBi0.png"},{"id":226,"membersId":130786,"dateAdded":"2023-03-19T00:25:53.000Z","lastUpdated":"2023-05-07T04:18:51.000Z","status":1,"totalPoints":567146,"rankingPoints":305843,"totalPass":146,"totalFc":14,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":2390,"bracketLevel":2273,"footswitchLevel":2474,"jackLevel":1927,"sideswitchLevel":2888,"doublestepLevel":2002,"staminaLevel":1674,"isBuddy":false,"preferences":"{\"discordId\":\"nuki#0563\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nuki","sex":"Unspecified","profileImg":""},{"id":447,"membersId":129649,"dateAdded":"2023-03-20T00:21:04.000Z","lastUpdated":"2023-05-04T22:59:50.000Z","status":1,"totalPoints":665482,"rankingPoints":305542,"totalPass":146,"totalFc":51,"totalFec":23,"totalQuad":1,"totalQuint":0,"crossoverLevel":4070,"bracketLevel":2699,"footswitchLevel":3105,"jackLevel":1884,"sideswitchLevel":3044,"doublestepLevel":3095,"staminaLevel":1405,"isBuddy":false,"preferences":"{\"discordId\":\"Haku#9599\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MY BRAND","sex":"Male","profileImg":"https://i.imgur.com/XoIlDSM.png"},{"id":1005,"membersId":149573,"dateAdded":"2023-04-04T04:12:21.000Z","lastUpdated":"2023-04-18T04:26:48.000Z","status":1,"totalPoints":305391,"rankingPoints":305391,"totalPass":59,"totalFc":9,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1364,"bracketLevel":1314,"footswitchLevel":1304,"jackLevel":985,"sideswitchLevel":1619,"doublestepLevel":1203,"staminaLevel":850,"isBuddy":false,"preferences":"{\"discordId\":\"Vixel#3853\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vixel","sex":"Female","profileImg":""},{"id":387,"membersId":173313,"dateAdded":"2023-03-19T17:53:59.000Z","lastUpdated":"2023-05-04T00:15:29.000Z","status":1,"totalPoints":368898,"rankingPoints":305348,"totalPass":44,"totalFc":19,"totalFec":37,"totalQuad":12,"totalQuint":0,"crossoverLevel":2120,"bracketLevel":1142,"footswitchLevel":1704,"jackLevel":1013,"sideswitchLevel":1300,"doublestepLevel":1685,"staminaLevel":672,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MarsBMC","sex":"Unspecified","profileImg":""},{"id":100,"membersId":175227,"dateAdded":"2023-03-18T21:53:20.000Z","lastUpdated":"2023-05-06T16:50:23.000Z","status":1,"totalPoints":724160,"rankingPoints":303831,"totalPass":178,"totalFc":37,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":2618,"bracketLevel":3014,"footswitchLevel":3358,"jackLevel":4120,"sideswitchLevel":3363,"doublestepLevel":2843,"staminaLevel":2383,"isBuddy":true,"preferences":"{\"discordId\":\"yoonjelly#8890\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yoonjelly","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/940655461886206012/1082481090436022282/pfp_250x250.png"},{"id":792,"membersId":3631,"dateAdded":"2023-03-25T18:29:46.000Z","lastUpdated":"2023-05-05T19:38:54.000Z","status":1,"totalPoints":475807,"rankingPoints":303664,"totalPass":83,"totalFc":36,"totalFec":25,"totalQuad":6,"totalQuint":0,"crossoverLevel":2812,"bracketLevel":1444,"footswitchLevel":1936,"jackLevel":1112,"sideswitchLevel":1764,"doublestepLevel":1764,"staminaLevel":1504,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Steve_V","sex":"Male","profileImg":""},{"id":73,"membersId":76562,"dateAdded":"2023-03-18T21:50:10.000Z","lastUpdated":"2023-04-16T18:26:08.000Z","status":1,"totalPoints":636972,"rankingPoints":303311,"totalPass":75,"totalFc":17,"totalFec":114,"totalQuad":4,"totalQuint":0,"crossoverLevel":4102,"bracketLevel":1968,"footswitchLevel":2923,"jackLevel":1578,"sideswitchLevel":4002,"doublestepLevel":3026,"staminaLevel":1615,"isBuddy":false,"preferences":"{\"discordId\":\"robin_#6284\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"robin_","sex":"Male","profileImg":""},{"id":237,"membersId":165884,"dateAdded":"2023-03-19T00:45:18.000Z","lastUpdated":"2023-04-28T01:44:24.000Z","status":1,"totalPoints":730012,"rankingPoints":302493,"totalPass":183,"totalFc":37,"totalFec":31,"totalQuad":0,"totalQuint":0,"crossoverLevel":3765,"bracketLevel":2701,"footswitchLevel":3523,"jackLevel":2033,"sideswitchLevel":2996,"doublestepLevel":3818,"staminaLevel":2286,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aldarole","sex":"Male","profileImg":"https://sportslogohistory.com/wp-content/uploads/2017/12/new_york_knicks_1947-1964.png"},{"id":241,"membersId":172941,"dateAdded":"2023-03-19T00:49:32.000Z","lastUpdated":"2023-04-30T01:08:16.000Z","status":1,"totalPoints":725629,"rankingPoints":302352,"totalPass":171,"totalFc":59,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":3419,"bracketLevel":3329,"footswitchLevel":3182,"jackLevel":4057,"sideswitchLevel":3594,"doublestepLevel":3420,"staminaLevel":2141,"isBuddy":true,"preferences":"{\"discordId\":\"NW360#9241\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Verified Bruh Moment","sex":"Male","profileImg":""},{"id":174,"membersId":172973,"dateAdded":"2023-03-18T22:37:17.000Z","lastUpdated":"2023-04-22T00:56:51.000Z","status":1,"totalPoints":458875,"rankingPoints":300633,"totalPass":39,"totalFc":20,"totalFec":55,"totalQuad":26,"totalQuint":0,"crossoverLevel":3516,"bracketLevel":1642,"footswitchLevel":2619,"jackLevel":2021,"sideswitchLevel":2813,"doublestepLevel":2771,"staminaLevel":393,"isBuddy":false,"preferences":"{\"discordId\":\"inglomi#8670\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"inglomi","sex":"Male","profileImg":""},{"id":579,"membersId":4940,"dateAdded":"2023-03-21T03:57:19.000Z","lastUpdated":"2023-05-02T13:21:35.000Z","status":1,"totalPoints":521075,"rankingPoints":300603,"totalPass":140,"totalFc":2,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":2720,"bracketLevel":1992,"footswitchLevel":2885,"jackLevel":2004,"sideswitchLevel":2302,"doublestepLevel":2708,"staminaLevel":990,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"hippotz","sex":"Unspecified","profileImg":""},{"id":18,"membersId":128363,"dateAdded":"2023-03-18T21:48:46.000Z","lastUpdated":"2023-05-06T02:55:15.000Z","status":1,"totalPoints":817890,"rankingPoints":300514,"totalPass":178,"totalFc":60,"totalFec":38,"totalQuad":2,"totalQuint":0,"crossoverLevel":5146,"bracketLevel":3901,"footswitchLevel":4266,"jackLevel":2828,"sideswitchLevel":4389,"doublestepLevel":4163,"staminaLevel":1469,"isBuddy":false,"preferences":"{\"discordId\":\"Kerpa#8924\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kerpa","sex":"Male","profileImg":"https://i.ibb.co/BTcfRGH/Avatar1.png"},{"id":5,"membersId":173384,"dateAdded":"2023-03-16T21:50:13.000Z","lastUpdated":"2023-05-01T03:34:59.000Z","status":1,"totalPoints":535923,"rankingPoints":300407,"totalPass":100,"totalFc":21,"totalFec":33,"totalQuad":7,"totalQuint":0,"crossoverLevel":3117,"bracketLevel":1546,"footswitchLevel":1980,"jackLevel":1384,"sideswitchLevel":2197,"doublestepLevel":2481,"staminaLevel":1156,"isBuddy":false,"preferences":"{\"discordId\":\"hitentrivedi#9252\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hiten","sex":"Male","profileImg":"https://i.imgur.com/TRRmDiz.png"},{"id":547,"membersId":175413,"dateAdded":"2023-03-20T22:02:41.000Z","lastUpdated":"2023-04-28T22:36:30.000Z","status":1,"totalPoints":488983,"rankingPoints":300352,"totalPass":85,"totalFc":27,"totalFec":38,"totalQuad":5,"totalQuint":0,"crossoverLevel":3235,"bracketLevel":1148,"footswitchLevel":1900,"jackLevel":1293,"sideswitchLevel":1935,"doublestepLevel":1994,"staminaLevel":839,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PQQP","sex":"Unspecified","profileImg":""},{"id":145,"membersId":145083,"dateAdded":"2023-03-18T22:13:54.000Z","lastUpdated":"2023-05-06T01:59:06.000Z","status":1,"totalPoints":389975,"rankingPoints":300121,"totalPass":77,"totalFc":23,"totalFec":16,"totalQuad":1,"totalQuint":0,"crossoverLevel":1933,"bracketLevel":1534,"footswitchLevel":1475,"jackLevel":1396,"sideswitchLevel":1706,"doublestepLevel":1554,"staminaLevel":909,"isBuddy":false,"preferences":"{\"discordId\":\"LOLWUT??#8503\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LOLWUT","sex":"Male","profileImg":"https://i.imgur.com/LZQ5yoW.png"},{"id":253,"membersId":175378,"dateAdded":"2023-03-19T01:29:04.000Z","lastUpdated":"2023-05-04T22:11:54.000Z","status":1,"totalPoints":769466,"rankingPoints":300112,"totalPass":211,"totalFc":25,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":3928,"bracketLevel":3197,"footswitchLevel":3753,"jackLevel":3445,"sideswitchLevel":4217,"doublestepLevel":4169,"staminaLevel":1675,"isBuddy":false,"preferences":"{\"discordId\":\"Fursty1896#9072\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fursty1896","sex":"Male","profileImg":""},{"id":541,"membersId":173335,"dateAdded":"2023-03-20T21:00:53.000Z","lastUpdated":"2023-05-01T16:56:44.000Z","status":1,"totalPoints":302717,"rankingPoints":298328,"totalPass":34,"totalFc":11,"totalFec":22,"totalQuad":13,"totalQuint":0,"crossoverLevel":1464,"bracketLevel":1007,"footswitchLevel":1799,"jackLevel":921,"sideswitchLevel":1667,"doublestepLevel":1525,"staminaLevel":760,"isBuddy":false,"preferences":"{\"discordId\":\"VV#6611\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VvITL","sex":"Female","profileImg":""},{"id":144,"membersId":2380,"dateAdded":"2023-03-18T22:12:42.000Z","lastUpdated":"2023-05-07T00:01:37.000Z","status":1,"totalPoints":550602,"rankingPoints":295728,"totalPass":119,"totalFc":28,"totalFec":21,"totalQuad":10,"totalQuint":0,"crossoverLevel":2443,"bracketLevel":3328,"footswitchLevel":2919,"jackLevel":1942,"sideswitchLevel":1989,"doublestepLevel":2567,"staminaLevel":912,"isBuddy":false,"preferences":"{\"discordId\":\"PinkDad#7882\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PinkDad","sex":"Male","profileImg":"https://i.imgur.com/MP3H9bu.jpg"},{"id":512,"membersId":2836,"dateAdded":"2023-03-20T17:21:26.000Z","lastUpdated":"2023-05-06T19:57:24.000Z","status":1,"totalPoints":688395,"rankingPoints":295131,"totalPass":126,"totalFc":35,"totalFec":41,"totalQuad":27,"totalQuint":0,"crossoverLevel":4695,"bracketLevel":2014,"footswitchLevel":3253,"jackLevel":2161,"sideswitchLevel":2805,"doublestepLevel":3669,"staminaLevel":1073,"isBuddy":false,"preferences":"{\"discordId\":\"Hina Hanta#4339\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pushmataha","sex":"Male","profileImg":""},{"id":732,"membersId":175479,"dateAdded":"2023-03-24T16:17:30.000Z","lastUpdated":"2023-04-27T23:13:33.000Z","status":1,"totalPoints":426923,"rankingPoints":291637,"totalPass":72,"totalFc":24,"totalFec":48,"totalQuad":6,"totalQuint":0,"crossoverLevel":3594,"bracketLevel":946,"footswitchLevel":1900,"jackLevel":1122,"sideswitchLevel":1623,"doublestepLevel":2255,"staminaLevel":653,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ranatalus","sex":"Unspecified","profileImg":""},{"id":491,"membersId":80039,"dateAdded":"2023-03-20T12:55:17.000Z","lastUpdated":"2023-05-05T19:25:11.000Z","status":1,"totalPoints":530863,"rankingPoints":290543,"totalPass":133,"totalFc":17,"totalFec":19,"totalQuad":1,"totalQuint":0,"crossoverLevel":2754,"bracketLevel":1150,"footswitchLevel":2041,"jackLevel":1953,"sideswitchLevel":2515,"doublestepLevel":2161,"staminaLevel":1489,"isBuddy":false,"preferences":"{\"discordId\":\"zae#9916\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zaelyx","sex":"Female","profileImg":"https://i.imgur.com/Y5QcXJk.png"},{"id":661,"membersId":175448,"dateAdded":"2023-03-22T18:07:20.000Z","lastUpdated":"2023-05-03T17:04:07.000Z","status":1,"totalPoints":526168,"rankingPoints":290377,"totalPass":81,"totalFc":11,"totalFec":58,"totalQuad":27,"totalQuint":0,"crossoverLevel":3673,"bracketLevel":1496,"footswitchLevel":2506,"jackLevel":1460,"sideswitchLevel":1793,"doublestepLevel":2967,"staminaLevel":772,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CLK","sex":"Female","profileImg":""},{"id":45,"membersId":175355,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-05-06T21:26:27.000Z","status":1,"totalPoints":858744,"rankingPoints":290351,"totalPass":217,"totalFc":41,"totalFec":39,"totalQuad":0,"totalQuint":0,"crossoverLevel":5070,"bracketLevel":2999,"footswitchLevel":4018,"jackLevel":3689,"sideswitchLevel":4122,"doublestepLevel":4297,"staminaLevel":1797,"isBuddy":false,"preferences":"{\"discordId\":\"RootReducer#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RootReducer","sex":"Male","profileImg":""},{"id":472,"membersId":8482,"dateAdded":"2023-03-20T03:08:42.000Z","lastUpdated":"2023-05-02T03:17:00.000Z","status":1,"totalPoints":483939,"rankingPoints":289682,"totalPass":90,"totalFc":35,"totalFec":26,"totalQuad":2,"totalQuint":0,"crossoverLevel":2683,"bracketLevel":1660,"footswitchLevel":2064,"jackLevel":2026,"sideswitchLevel":1671,"doublestepLevel":2491,"staminaLevel":1567,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ddrulox","sex":"Male","profileImg":"https://media.tenor.com/PflbJ_OCFxQAAAAM/frog-pepe-the-frog.gif"},{"id":262,"membersId":173355,"dateAdded":"2023-03-19T01:45:54.000Z","lastUpdated":"2023-05-07T05:42:45.000Z","status":1,"totalPoints":463334,"rankingPoints":289014,"totalPass":49,"totalFc":27,"totalFec":63,"totalQuad":20,"totalQuint":0,"crossoverLevel":3248,"bracketLevel":1443,"footswitchLevel":2517,"jackLevel":1033,"sideswitchLevel":1548,"doublestepLevel":2654,"staminaLevel":619,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"wolfxalienware","sex":"Male","profileImg":""},{"id":886,"membersId":175568,"dateAdded":"2023-03-29T01:13:14.000Z","lastUpdated":"2023-04-28T19:24:21.000Z","status":1,"totalPoints":450677,"rankingPoints":288654,"totalPass":81,"totalFc":23,"totalFec":31,"totalQuad":4,"totalQuint":0,"crossoverLevel":2509,"bracketLevel":1973,"footswitchLevel":2404,"jackLevel":1322,"sideswitchLevel":2612,"doublestepLevel":2329,"staminaLevel":847,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chris Benoit","sex":"Male","profileImg":""},{"id":60,"membersId":173320,"dateAdded":"2023-03-18T21:49:36.000Z","lastUpdated":"2023-05-06T23:52:50.000Z","status":1,"totalPoints":498573,"rankingPoints":287844,"totalPass":34,"totalFc":46,"totalFec":66,"totalQuad":22,"totalQuint":0,"crossoverLevel":3650,"bracketLevel":1596,"footswitchLevel":2824,"jackLevel":1246,"sideswitchLevel":2006,"doublestepLevel":3407,"staminaLevel":596,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"L4viR","sex":"Male","profileImg":""},{"id":1050,"membersId":175755,"dateAdded":"2023-04-07T19:19:01.000Z","lastUpdated":"2023-04-26T18:00:15.000Z","status":1,"totalPoints":354921,"rankingPoints":286193,"totalPass":52,"totalFc":23,"totalFec":44,"totalQuad":1,"totalQuint":0,"crossoverLevel":2271,"bracketLevel":1215,"footswitchLevel":1459,"jackLevel":947,"sideswitchLevel":885,"doublestepLevel":1590,"staminaLevel":986,"isBuddy":false,"preferences":"{\"discordId\":\"Joako\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Joako","sex":"Male","profileImg":""},{"id":515,"membersId":118191,"dateAdded":"2023-03-20T17:56:43.000Z","lastUpdated":"2023-05-06T18:29:53.000Z","status":1,"totalPoints":797723,"rankingPoints":286025,"totalPass":196,"totalFc":56,"totalFec":25,"totalQuad":0,"totalQuint":0,"crossoverLevel":4960,"bracketLevel":3211,"footswitchLevel":3999,"jackLevel":3359,"sideswitchLevel":4071,"doublestepLevel":4313,"staminaLevel":1492,"isBuddy":false,"preferences":"{\"discordId\":\"Zeo#0210\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Zeo","sex":"Male","profileImg":""},{"id":462,"membersId":173423,"dateAdded":"2023-03-20T01:58:40.000Z","lastUpdated":"2023-05-03T02:42:14.000Z","status":1,"totalPoints":469534,"rankingPoints":284790,"totalPass":78,"totalFc":39,"totalFec":42,"totalQuad":5,"totalQuint":0,"crossoverLevel":3103,"bracketLevel":1793,"footswitchLevel":2184,"jackLevel":1271,"sideswitchLevel":1540,"doublestepLevel":2958,"staminaLevel":628,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lilo Landa","sex":"Female","profileImg":""},{"id":381,"membersId":7632,"dateAdded":"2023-03-19T17:37:42.000Z","lastUpdated":"2023-05-06T00:50:54.000Z","status":1,"totalPoints":388144,"rankingPoints":284325,"totalPass":39,"totalFc":39,"totalFec":48,"totalQuad":7,"totalQuint":0,"crossoverLevel":2355,"bracketLevel":1561,"footswitchLevel":1926,"jackLevel":574,"sideswitchLevel":825,"doublestepLevel":2024,"staminaLevel":449,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"freddy15204","sex":"Male","profileImg":""},{"id":302,"membersId":2026,"dateAdded":"2023-03-19T04:32:57.000Z","lastUpdated":"2023-04-24T06:23:10.000Z","status":1,"totalPoints":283573,"rankingPoints":283573,"totalPass":56,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":739,"bracketLevel":1643,"footswitchLevel":1159,"jackLevel":835,"sideswitchLevel":595,"doublestepLevel":995,"staminaLevel":1094,"isBuddy":false,"preferences":"{\"discordId\":\"dxultimate#6390\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"BarX","sex":"Male","profileImg":""},{"id":340,"membersId":66753,"dateAdded":"2023-03-19T11:56:50.000Z","lastUpdated":"2023-04-26T23:53:20.000Z","status":1,"totalPoints":605098,"rankingPoints":283344,"totalPass":197,"totalFc":22,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":2506,"bracketLevel":1782,"footswitchLevel":2106,"jackLevel":1926,"sideswitchLevel":1176,"doublestepLevel":2742,"staminaLevel":3295,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PkGam","sex":"Male","profileImg":"https://i.ibb.co/RDMrkmb/pkgam-icon-250.png"},{"id":149,"membersId":163899,"dateAdded":"2023-03-18T22:15:12.000Z","lastUpdated":"2023-04-30T18:01:54.000Z","status":1,"totalPoints":347381,"rankingPoints":283151,"totalPass":75,"totalFc":16,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1311,"bracketLevel":1373,"footswitchLevel":1599,"jackLevel":1073,"sideswitchLevel":895,"doublestepLevel":965,"staminaLevel":893,"isBuddy":false,"preferences":"{\"discordId\":\"Tidek#4112\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Tidek","sex":"Male","profileImg":""},{"id":80,"membersId":66662,"dateAdded":"2023-03-18T21:50:33.000Z","lastUpdated":"2023-04-19T18:15:51.000Z","status":1,"totalPoints":415324,"rankingPoints":283141,"totalPass":95,"totalFc":0,"totalFec":44,"totalQuad":3,"totalQuint":0,"crossoverLevel":2050,"bracketLevel":1453,"footswitchLevel":1981,"jackLevel":939,"sideswitchLevel":500,"doublestepLevel":2277,"staminaLevel":1443,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"itgaz","sex":"Male","profileImg":"https://media.tenor.com/images/65d3642f6d4b6cd2c0508f8b1b152f68/tenor.gif"},{"id":527,"membersId":173316,"dateAdded":"2023-03-20T19:15:36.000Z","lastUpdated":"2023-04-26T02:16:31.000Z","status":1,"totalPoints":665280,"rankingPoints":281267,"totalPass":134,"totalFc":68,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":4054,"bracketLevel":2241,"footswitchLevel":3542,"jackLevel":2778,"sideswitchLevel":4036,"doublestepLevel":3580,"staminaLevel":1147,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"putham","sex":"Unspecified","profileImg":""},{"id":450,"membersId":174818,"dateAdded":"2023-03-20T00:50:13.000Z","lastUpdated":"2023-05-06T00:01:22.000Z","status":1,"totalPoints":383403,"rankingPoints":281201,"totalPass":101,"totalFc":10,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1790,"bracketLevel":1498,"footswitchLevel":1813,"jackLevel":1340,"sideswitchLevel":1691,"doublestepLevel":1504,"staminaLevel":901,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"eedeeq","sex":"Unspecified","profileImg":""},{"id":697,"membersId":134656,"dateAdded":"2023-03-23T12:09:51.000Z","lastUpdated":"2023-05-04T23:50:15.000Z","status":1,"totalPoints":683358,"rankingPoints":278757,"totalPass":142,"totalFc":75,"totalFec":27,"totalQuad":0,"totalQuint":0,"crossoverLevel":4434,"bracketLevel":2140,"footswitchLevel":3342,"jackLevel":2621,"sideswitchLevel":3425,"doublestepLevel":3490,"staminaLevel":1101,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NDGO","sex":"Male","profileImg":"https://www.greenfoot.org/photo_attachments/0000/0415/ddr_left_arrow.png"},{"id":344,"membersId":7858,"dateAdded":"2023-03-19T12:26:20.000Z","lastUpdated":"2023-04-28T19:24:23.000Z","status":1,"totalPoints":601620,"rankingPoints":277875,"totalPass":121,"totalFc":37,"totalFec":59,"totalQuad":0,"totalQuint":0,"crossoverLevel":4080,"bracketLevel":1820,"footswitchLevel":2858,"jackLevel":2286,"sideswitchLevel":2736,"doublestepLevel":3173,"staminaLevel":936,"isBuddy":false,"preferences":"{\"discordId\":\"Mithos#0844\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HegemonMithos","sex":"Male","profileImg":""},{"id":41,"membersId":163426,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-05-04T22:54:59.000Z","status":1,"totalPoints":637219,"rankingPoints":277687,"totalPass":161,"totalFc":39,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":3626,"bracketLevel":2449,"footswitchLevel":3385,"jackLevel":2699,"sideswitchLevel":3590,"doublestepLevel":3526,"staminaLevel":1032,"isBuddy":false,"preferences":"{\"discordId\":\"GWen#2607\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GWen","sex":"Male","profileImg":"https://i.imgur.com/7xdu36E.png"},{"id":353,"membersId":145105,"dateAdded":"2023-03-19T14:55:07.000Z","lastUpdated":"2023-05-05T20:47:18.000Z","status":1,"totalPoints":806096,"rankingPoints":275480,"totalPass":200,"totalFc":72,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":4875,"bracketLevel":2582,"footswitchLevel":3914,"jackLevel":3253,"sideswitchLevel":4141,"doublestepLevel":4036,"staminaLevel":1851,"isBuddy":false,"preferences":"{\"discordId\":\"trueblue410#0146\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"trueblue410","sex":"Male","profileImg":""},{"id":325,"membersId":7106,"dateAdded":"2023-03-19T08:34:52.000Z","lastUpdated":"2023-05-05T00:41:01.000Z","status":1,"totalPoints":392811,"rankingPoints":274198,"totalPass":45,"totalFc":16,"totalFec":24,"totalQuad":48,"totalQuint":7,"crossoverLevel":3188,"bracketLevel":1024,"footswitchLevel":1849,"jackLevel":1161,"sideswitchLevel":883,"doublestepLevel":2345,"staminaLevel":546,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AngelR4vE","sex":"Male","profileImg":"https://i.imgur.com/VtIFlKK.png"},{"id":173,"membersId":66558,"dateAdded":"2023-03-18T22:36:44.000Z","lastUpdated":"2023-05-05T23:43:49.000Z","status":1,"totalPoints":550500,"rankingPoints":273243,"totalPass":90,"totalFc":69,"totalFec":43,"totalQuad":1,"totalQuint":0,"crossoverLevel":3871,"bracketLevel":1720,"footswitchLevel":2490,"jackLevel":2076,"sideswitchLevel":3378,"doublestepLevel":3218,"staminaLevel":1334,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xiaowuc1","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/680561230892630067/990419215724974080/sukuna.jpg"},{"id":470,"membersId":129553,"dateAdded":"2023-03-20T02:58:23.000Z","lastUpdated":"2023-05-06T16:52:02.000Z","status":1,"totalPoints":323880,"rankingPoints":271116,"totalPass":70,"totalFc":18,"totalFec":11,"totalQuad":1,"totalQuint":0,"crossoverLevel":1829,"bracketLevel":1260,"footswitchLevel":1288,"jackLevel":628,"sideswitchLevel":823,"doublestepLevel":1896,"staminaLevel":420,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Navi02U","sex":"Male","profileImg":"https://i.ibb.co/FVwySFq/Navi-gs.png"},{"id":537,"membersId":66226,"dateAdded":"2023-03-20T20:31:33.000Z","lastUpdated":"2023-04-30T18:31:12.000Z","status":1,"totalPoints":270779,"rankingPoints":270779,"totalPass":47,"totalFc":18,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1305,"bracketLevel":944,"footswitchLevel":1185,"jackLevel":875,"sideswitchLevel":744,"doublestepLevel":1342,"staminaLevel":447,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"C-lynn","sex":"Female","profileImg":"https://i.imgur.com/A6bPSwm.png"},{"id":1140,"membersId":66727,"dateAdded":"2023-04-16T06:01:30.000Z","lastUpdated":"2023-05-05T05:09:07.000Z","status":1,"totalPoints":270763,"rankingPoints":270763,"totalPass":25,"totalFc":17,"totalFec":14,"totalQuad":6,"totalQuint":0,"crossoverLevel":1189,"bracketLevel":1182,"footswitchLevel":1001,"jackLevel":550,"sideswitchLevel":1003,"doublestepLevel":994,"staminaLevel":771,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HISA","sex":"Male","profileImg":""},{"id":78,"membersId":174707,"dateAdded":"2023-03-18T21:50:22.000Z","lastUpdated":"2023-05-06T17:13:27.000Z","status":1,"totalPoints":751942,"rankingPoints":270413,"totalPass":141,"totalFc":92,"totalFec":44,"totalQuad":0,"totalQuint":0,"crossoverLevel":4591,"bracketLevel":2923,"footswitchLevel":3769,"jackLevel":2938,"sideswitchLevel":3827,"doublestepLevel":3862,"staminaLevel":1361,"isBuddy":false,"preferences":"{\"discordId\":\"antifun#6584\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"antifun","sex":"Unspecified","profileImg":"https://i.imgur.com/YkgPNB2.png"},{"id":513,"membersId":6791,"dateAdded":"2023-03-20T17:47:47.000Z","lastUpdated":"2023-05-06T14:13:19.000Z","status":1,"totalPoints":373731,"rankingPoints":270195,"totalPass":79,"totalFc":15,"totalFec":32,"totalQuad":1,"totalQuint":0,"crossoverLevel":2337,"bracketLevel":1136,"footswitchLevel":1713,"jackLevel":1586,"sideswitchLevel":1621,"doublestepLevel":1674,"staminaLevel":1008,"isBuddy":false,"preferences":"{\"discordId\":\"Catzoo#9899\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Catz","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1200168036/sqi6mi3.png"},{"id":120,"membersId":173369,"dateAdded":"2023-03-18T21:58:05.000Z","lastUpdated":"2023-05-06T02:42:13.000Z","status":1,"totalPoints":806471,"rankingPoints":269189,"totalPass":230,"totalFc":58,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":4580,"bracketLevel":3052,"footswitchLevel":3834,"jackLevel":2899,"sideswitchLevel":3922,"doublestepLevel":3995,"staminaLevel":1887,"isBuddy":false,"preferences":"{\"discordId\":\"LuckJury#3580\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LuckJury","sex":"Male","profileImg":"https://pm1.narvii.com/6118/5f0476f592d86d4d106e6f5b07c240d181e8e358_128.jpg"},{"id":347,"membersId":134767,"dateAdded":"2023-03-19T13:30:42.000Z","lastUpdated":"2023-04-22T06:30:15.000Z","status":1,"totalPoints":657406,"rankingPoints":268864,"totalPass":187,"totalFc":42,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":4352,"bracketLevel":2166,"footswitchLevel":3377,"jackLevel":2292,"sideswitchLevel":3385,"doublestepLevel":3423,"staminaLevel":1231,"isBuddy":false,"preferences":"{\"discordId\":\"Naota#8416\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NaoHikari","sex":"Male","profileImg":"https://i.imgur.com/vuu78zs.png"},{"id":274,"membersId":142757,"dateAdded":"2023-03-19T02:31:13.000Z","lastUpdated":"2023-05-07T05:29:24.000Z","status":1,"totalPoints":355109,"rankingPoints":268807,"totalPass":121,"totalFc":8,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1279,"bracketLevel":1136,"footswitchLevel":1258,"jackLevel":2104,"sideswitchLevel":2296,"doublestepLevel":1172,"staminaLevel":1947,"isBuddy":false,"preferences":"{\"discordId\":\"Rudeshadow#9012\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Rudeshadow","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/957781689067769917/957783160312193085/kronii_avatar.png"},{"id":27,"membersId":154965,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-04-25T03:36:20.000Z","status":1,"totalPoints":353064,"rankingPoints":268415,"totalPass":79,"totalFc":18,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":2256,"bracketLevel":1887,"footswitchLevel":2023,"jackLevel":2435,"sideswitchLevel":2565,"doublestepLevel":1650,"staminaLevel":804,"isBuddy":false,"preferences":"{\"discordId\":\"Gpop#2759\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gpop","sex":"Male","profileImg":""},{"id":719,"membersId":134350,"dateAdded":"2023-03-24T02:08:45.000Z","lastUpdated":"2023-05-05T02:29:02.000Z","status":1,"totalPoints":478209,"rankingPoints":266475,"totalPass":122,"totalFc":27,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":2899,"bracketLevel":1630,"footswitchLevel":2387,"jackLevel":1751,"sideswitchLevel":2380,"doublestepLevel":2188,"staminaLevel":687,"isBuddy":false,"preferences":"{\"discordId\":\"Kaos#2155\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kaosddr","sex":"Male","profileImg":"https://live.staticflickr.com/65535/51218554758_5a3c461722_m.jpg"},{"id":105,"membersId":168067,"dateAdded":"2023-03-18T21:53:38.000Z","lastUpdated":"2023-05-06T13:03:52.000Z","status":1,"totalPoints":872773,"rankingPoints":265925,"totalPass":166,"totalFc":109,"totalFec":47,"totalQuad":0,"totalQuint":0,"crossoverLevel":4900,"bracketLevel":3862,"footswitchLevel":4271,"jackLevel":3063,"sideswitchLevel":4118,"doublestepLevel":4390,"staminaLevel":1733,"isBuddy":true,"preferences":"{\"discordId\":\"BreakfastPM#2615\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BreakfastPM","sex":"Male","profileImg":"https://i.ibb.co/xhdGjnY/Avatar-Small.jpg"},{"id":714,"membersId":173124,"dateAdded":"2023-03-24T00:46:07.000Z","lastUpdated":"2023-05-05T03:13:51.000Z","status":1,"totalPoints":413220,"rankingPoints":265445,"totalPass":110,"totalFc":39,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":2040,"bracketLevel":1506,"footswitchLevel":2218,"jackLevel":1098,"sideswitchLevel":1911,"doublestepLevel":1915,"staminaLevel":1078,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Frantalicious","sex":"Male","profileImg":""},{"id":259,"membersId":133783,"dateAdded":"2023-03-19T01:40:35.000Z","lastUpdated":"2023-04-28T16:48:57.000Z","status":1,"totalPoints":345509,"rankingPoints":265119,"totalPass":52,"totalFc":14,"totalFec":39,"totalQuad":5,"totalQuint":0,"crossoverLevel":2450,"bracketLevel":967,"footswitchLevel":1901,"jackLevel":944,"sideswitchLevel":1211,"doublestepLevel":2056,"staminaLevel":292,"isBuddy":false,"preferences":"{\"discordId\":\"Viper#7633\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Viper","sex":"Female","profileImg":"https://i.imgur.com/riy3PxR.png"},{"id":107,"membersId":165841,"dateAdded":"2023-03-18T21:54:25.000Z","lastUpdated":"2023-05-06T20:47:44.000Z","status":1,"totalPoints":340745,"rankingPoints":264103,"totalPass":86,"totalFc":22,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":1586,"bracketLevel":2002,"footswitchLevel":2004,"jackLevel":1226,"sideswitchLevel":1634,"doublestepLevel":2402,"staminaLevel":628,"isBuddy":false,"preferences":"{\"discordId\":\"mangoafterdawn#0901\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mangoafterdawn","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/624856529568399372/850869659774484510/profile.png"},{"id":1112,"membersId":173971,"dateAdded":"2023-04-13T00:46:45.000Z","lastUpdated":"2023-05-05T01:11:12.000Z","status":1,"totalPoints":264085,"rankingPoints":264085,"totalPass":44,"totalFc":23,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":949,"bracketLevel":683,"footswitchLevel":1026,"jackLevel":699,"sideswitchLevel":1115,"doublestepLevel":735,"staminaLevel":973,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yog sothoth","sex":"Male","profileImg":""},{"id":574,"membersId":172958,"dateAdded":"2023-03-21T02:48:37.000Z","lastUpdated":"2023-05-07T05:20:48.000Z","status":1,"totalPoints":642695,"rankingPoints":263807,"totalPass":180,"totalFc":48,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":3397,"bracketLevel":2240,"footswitchLevel":3007,"jackLevel":2535,"sideswitchLevel":3325,"doublestepLevel":3098,"staminaLevel":1924,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"!_Stapen_ca_! :v","sex":"Female","profileImg":""},{"id":785,"membersId":77437,"dateAdded":"2023-03-25T16:00:44.000Z","lastUpdated":"2023-05-06T16:03:41.000Z","status":1,"totalPoints":551928,"rankingPoints":263551,"totalPass":184,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1951,"bracketLevel":1578,"footswitchLevel":1990,"jackLevel":1279,"sideswitchLevel":2553,"doublestepLevel":1873,"staminaLevel":3111,"isBuddy":false,"preferences":"{\"discordId\":\"hk#4898\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"hk","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/363047905893810176/b2b8f3ab362a84338646577a473ee518.png"},{"id":577,"membersId":175418,"dateAdded":"2023-03-21T03:41:36.000Z","lastUpdated":"2023-05-01T18:20:36.000Z","status":1,"totalPoints":618570,"rankingPoints":263399,"totalPass":137,"totalFc":51,"totalFec":44,"totalQuad":0,"totalQuint":0,"crossoverLevel":3998,"bracketLevel":1843,"footswitchLevel":2775,"jackLevel":2440,"sideswitchLevel":2798,"doublestepLevel":3325,"staminaLevel":1204,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LaReinaDelSur","sex":"Unspecified","profileImg":"https://tinypic.host/images/2023/04/04/IMG_2597.th.gif"},{"id":332,"membersId":1090,"dateAdded":"2023-03-19T10:10:36.000Z","lastUpdated":"2023-05-06T14:15:12.000Z","status":1,"totalPoints":301195,"rankingPoints":263337,"totalPass":80,"totalFc":9,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1638,"bracketLevel":1055,"footswitchLevel":1335,"jackLevel":1847,"sideswitchLevel":1716,"doublestepLevel":1282,"staminaLevel":594,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jester","sex":"Male","profileImg":""},{"id":612,"membersId":66666,"dateAdded":"2023-03-21T20:25:32.000Z","lastUpdated":"2023-04-21T21:29:36.000Z","status":1,"totalPoints":365125,"rankingPoints":263301,"totalPass":80,"totalFc":29,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":2387,"bracketLevel":1667,"footswitchLevel":1956,"jackLevel":1367,"sideswitchLevel":1534,"doublestepLevel":1971,"staminaLevel":618,"isBuddy":false,"preferences":"{\"discordId\":\"gato de plastico#1093\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gatodeplastico","sex":"Male","profileImg":"https://i.imgur.com/bRLmquj.png"},{"id":877,"membersId":164145,"dateAdded":"2023-03-28T19:10:11.000Z","lastUpdated":"2023-05-05T21:09:06.000Z","status":1,"totalPoints":408649,"rankingPoints":263262,"totalPass":72,"totalFc":34,"totalFec":23,"totalQuad":3,"totalQuint":0,"crossoverLevel":2721,"bracketLevel":1079,"footswitchLevel":2053,"jackLevel":1351,"sideswitchLevel":2014,"doublestepLevel":2197,"staminaLevel":744,"isBuddy":false,"preferences":"{\"discordId\":\"Koizumi Chineko#9043\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Koizumi Chineko","sex":"Male","profileImg":"https://puu.sh/IZLO1/9c900b9234.jpg"},{"id":169,"membersId":127780,"dateAdded":"2023-03-18T22:33:53.000Z","lastUpdated":"2023-05-03T22:21:26.000Z","status":1,"totalPoints":338925,"rankingPoints":262460,"totalPass":89,"totalFc":18,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1208,"bracketLevel":574,"footswitchLevel":629,"jackLevel":760,"sideswitchLevel":234,"doublestepLevel":897,"staminaLevel":2693,"isBuddy":false,"preferences":"{\"discordId\":\"zoodles#2685\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Hamaon","sex":"Female","profileImg":"https://66.media.tumblr.com/a586c1c2635be3c2863b904b689d6bc6/tumblr_pvwcak806k1x3sogho4_250.png"},{"id":235,"membersId":174904,"dateAdded":"2023-03-19T00:43:20.000Z","lastUpdated":"2023-05-07T04:16:35.000Z","status":1,"totalPoints":410596,"rankingPoints":262256,"totalPass":112,"totalFc":21,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1893,"bracketLevel":1659,"footswitchLevel":1969,"jackLevel":1422,"sideswitchLevel":2162,"doublestepLevel":1751,"staminaLevel":1135,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Choden","sex":"Unspecified","profileImg":""},{"id":222,"membersId":166764,"dateAdded":"2023-03-19T00:14:39.000Z","lastUpdated":"2023-04-21T23:12:54.000Z","status":1,"totalPoints":344658,"rankingPoints":262072,"totalPass":91,"totalFc":18,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1875,"bracketLevel":1435,"footswitchLevel":1776,"jackLevel":1257,"sideswitchLevel":1263,"doublestepLevel":1822,"staminaLevel":601,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kadef","sex":"Male","profileImg":""},{"id":455,"membersId":170806,"dateAdded":"2023-03-20T01:25:45.000Z","lastUpdated":"2023-04-09T21:42:10.000Z","status":1,"totalPoints":297685,"rankingPoints":262065,"totalPass":66,"totalFc":18,"totalFec":21,"totalQuad":1,"totalQuint":0,"crossoverLevel":1670,"bracketLevel":795,"footswitchLevel":1226,"jackLevel":800,"sideswitchLevel":1017,"doublestepLevel":1424,"staminaLevel":587,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yokamaa","sex":"Male","profileImg":"https://i.kym-cdn.com/photos/images/masonry/000/722/117/6ae.jpg"},{"id":134,"membersId":75805,"dateAdded":"2023-03-18T22:04:19.000Z","lastUpdated":"2023-05-01T23:56:37.000Z","status":1,"totalPoints":504673,"rankingPoints":262023,"totalPass":107,"totalFc":56,"totalFec":29,"totalQuad":1,"totalQuint":0,"crossoverLevel":3470,"bracketLevel":1675,"footswitchLevel":2339,"jackLevel":2080,"sideswitchLevel":2507,"doublestepLevel":2758,"staminaLevel":784,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Accioskullar","sex":"Male","profileImg":""},{"id":397,"membersId":173603,"dateAdded":"2023-03-19T18:58:21.000Z","lastUpdated":"2023-05-04T00:17:36.000Z","status":1,"totalPoints":374798,"rankingPoints":260982,"totalPass":50,"totalFc":32,"totalFec":51,"totalQuad":5,"totalQuint":0,"crossoverLevel":2854,"bracketLevel":1131,"footswitchLevel":2042,"jackLevel":1180,"sideswitchLevel":2149,"doublestepLevel":2478,"staminaLevel":309,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stru","sex":"Male","profileImg":""},{"id":211,"membersId":175154,"dateAdded":"2023-03-18T23:47:03.000Z","lastUpdated":"2023-04-23T22:52:02.000Z","status":1,"totalPoints":350825,"rankingPoints":260708,"totalPass":95,"totalFc":14,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1681,"bracketLevel":1300,"footswitchLevel":1785,"jackLevel":1061,"sideswitchLevel":1450,"doublestepLevel":1363,"staminaLevel":745,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sonja","sex":"Female","profileImg":""},{"id":160,"membersId":175005,"dateAdded":"2023-03-18T22:24:36.000Z","lastUpdated":"2023-05-04T04:04:41.000Z","status":1,"totalPoints":438351,"rankingPoints":260222,"totalPass":106,"totalFc":40,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2230,"bracketLevel":2246,"footswitchLevel":2519,"jackLevel":1511,"sideswitchLevel":1918,"doublestepLevel":2108,"staminaLevel":662,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ricky","sex":"Male","profileImg":"https://i.imgur.com/xIjkLql.png"},{"id":189,"membersId":173373,"dateAdded":"2023-03-18T22:58:03.000Z","lastUpdated":"2023-05-06T23:44:47.000Z","status":1,"totalPoints":322557,"rankingPoints":258796,"totalPass":64,"totalFc":23,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1908,"bracketLevel":1165,"footswitchLevel":1719,"jackLevel":695,"sideswitchLevel":1228,"doublestepLevel":1850,"staminaLevel":482,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shmeagle!","sex":"Male","profileImg":""},{"id":991,"membersId":172864,"dateAdded":"2023-04-03T19:16:38.000Z","lastUpdated":"2023-05-03T14:11:21.000Z","status":1,"totalPoints":371306,"rankingPoints":258715,"totalPass":108,"totalFc":13,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1460,"bracketLevel":1659,"footswitchLevel":1867,"jackLevel":1116,"sideswitchLevel":1356,"doublestepLevel":1372,"staminaLevel":1187,"isBuddy":false,"preferences":"{\"discordId\":\"Aryan#6366\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"1Aryan","sex":"Male","profileImg":""},{"id":689,"membersId":173415,"dateAdded":"2023-03-23T00:49:32.000Z","lastUpdated":"2023-05-04T01:58:13.000Z","status":1,"totalPoints":265857,"rankingPoints":257638,"totalPass":64,"totalFc":11,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1261,"bracketLevel":1114,"footswitchLevel":1359,"jackLevel":956,"sideswitchLevel":1464,"doublestepLevel":1085,"staminaLevel":667,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Moosey","sex":"Unspecified","profileImg":"https://i.imgur.com/fZkE9Ld.png"},{"id":312,"membersId":165835,"dateAdded":"2023-03-19T05:32:57.000Z","lastUpdated":"2023-03-28T23:45:53.000Z","status":1,"totalPoints":274815,"rankingPoints":257470,"totalPass":58,"totalFc":26,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":664,"bracketLevel":691,"footswitchLevel":821,"jackLevel":890,"sideswitchLevel":293,"doublestepLevel":944,"staminaLevel":2095,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"callmisoko","sex":"Male","profileImg":"https://i.imgur.com/leaiZbb.jpg"},{"id":554,"membersId":175415,"dateAdded":"2023-03-20T22:35:18.000Z","lastUpdated":"2023-04-25T20:55:49.000Z","status":1,"totalPoints":545624,"rankingPoints":257381,"totalPass":162,"totalFc":30,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":3054,"bracketLevel":2128,"footswitchLevel":2331,"jackLevel":1562,"sideswitchLevel":2420,"doublestepLevel":2685,"staminaLevel":1343,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ODengals","sex":"Male","profileImg":""},{"id":288,"membersId":173461,"dateAdded":"2023-03-19T03:22:40.000Z","lastUpdated":"2023-05-04T22:17:00.000Z","status":1,"totalPoints":476964,"rankingPoints":256858,"totalPass":136,"totalFc":26,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":2693,"bracketLevel":1542,"footswitchLevel":2278,"jackLevel":1781,"sideswitchLevel":3058,"doublestepLevel":2065,"staminaLevel":989,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Treklock","sex":"Male","profileImg":""},{"id":298,"membersId":128187,"dateAdded":"2023-03-19T04:11:00.000Z","lastUpdated":"2023-05-04T23:59:24.000Z","status":1,"totalPoints":337051,"rankingPoints":256482,"totalPass":89,"totalFc":25,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":1962,"bracketLevel":1157,"footswitchLevel":1856,"jackLevel":1885,"sideswitchLevel":1025,"doublestepLevel":1649,"staminaLevel":893,"isBuddy":false,"preferences":"{\"discordId\":\"Lumi#0420\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lumi","sex":"Male","profileImg":"https://i.imgur.com/4hsL5s8.png"},{"id":453,"membersId":173333,"dateAdded":"2023-03-20T01:02:37.000Z","lastUpdated":"2023-05-07T05:57:10.000Z","status":1,"totalPoints":324442,"rankingPoints":255835,"totalPass":69,"totalFc":32,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1241,"bracketLevel":1073,"footswitchLevel":1193,"jackLevel":1039,"sideswitchLevel":985,"doublestepLevel":1258,"staminaLevel":866,"isBuddy":false,"preferences":"{\"discordId\":\"Pasget#5973\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pasgetti","sex":"Male","profileImg":""},{"id":269,"membersId":66720,"dateAdded":"2023-03-19T02:02:17.000Z","lastUpdated":"2023-05-03T22:20:16.000Z","status":1,"totalPoints":344319,"rankingPoints":254118,"totalPass":33,"totalFc":45,"totalFec":41,"totalQuad":5,"totalQuint":0,"crossoverLevel":2090,"bracketLevel":949,"footswitchLevel":1437,"jackLevel":1214,"sideswitchLevel":800,"doublestepLevel":1779,"staminaLevel":874,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dotso","sex":"Male","profileImg":"https://em-content.zobj.net/source/skype/289/check-mark_2714-fe0f.png"},{"id":523,"membersId":173554,"dateAdded":"2023-03-20T18:59:06.000Z","lastUpdated":"2023-05-05T22:19:55.000Z","status":1,"totalPoints":549363,"rankingPoints":253578,"totalPass":121,"totalFc":42,"totalFec":46,"totalQuad":0,"totalQuint":0,"crossoverLevel":3890,"bracketLevel":1841,"footswitchLevel":2634,"jackLevel":2400,"sideswitchLevel":2315,"doublestepLevel":3378,"staminaLevel":576,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SailorMoonElite","sex":"Male","profileImg":""},{"id":424,"membersId":127988,"dateAdded":"2023-03-19T21:15:10.000Z","lastUpdated":"2023-05-05T01:32:23.000Z","status":1,"totalPoints":301373,"rankingPoints":253564,"totalPass":87,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1346,"bracketLevel":1251,"footswitchLevel":1453,"jackLevel":1333,"sideswitchLevel":1057,"doublestepLevel":1620,"staminaLevel":662,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DJNidra","sex":"Male","profileImg":""},{"id":205,"membersId":175171,"dateAdded":"2023-03-18T23:29:37.000Z","lastUpdated":"2023-04-10T21:08:09.000Z","status":1,"totalPoints":457970,"rankingPoints":252500,"totalPass":108,"totalFc":20,"totalFec":40,"totalQuad":6,"totalQuint":0,"crossoverLevel":3661,"bracketLevel":1411,"footswitchLevel":2179,"jackLevel":1632,"sideswitchLevel":1626,"doublestepLevel":2875,"staminaLevel":401,"isBuddy":false,"preferences":"{\"discordId\":\"SenPi#0341\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SenPi","sex":"Male","profileImg":"https://i.imgur.com/L3J7vj6.png"},{"id":963,"membersId":173430,"dateAdded":"2023-04-01T22:09:34.000Z","lastUpdated":"2023-04-23T23:59:31.000Z","status":1,"totalPoints":283438,"rankingPoints":252265,"totalPass":75,"totalFc":16,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1487,"bracketLevel":1063,"footswitchLevel":1278,"jackLevel":1247,"sideswitchLevel":939,"doublestepLevel":1224,"staminaLevel":679,"isBuddy":false,"preferences":"{\"discordId\":\"ahchurro111#5851\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ahchurro111","sex":"Male","profileImg":""},{"id":843,"membersId":173943,"dateAdded":"2023-03-26T22:41:59.000Z","lastUpdated":"2023-05-05T21:46:33.000Z","status":1,"totalPoints":251809,"rankingPoints":251809,"totalPass":62,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":599,"bracketLevel":486,"footswitchLevel":809,"jackLevel":646,"sideswitchLevel":424,"doublestepLevel":720,"staminaLevel":2127,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HINATA-TCOL","sex":"Female","profileImg":""},{"id":415,"membersId":135314,"dateAdded":"2023-03-19T20:15:52.000Z","lastUpdated":"2023-05-03T23:36:35.000Z","status":1,"totalPoints":288456,"rankingPoints":251032,"totalPass":57,"totalFc":14,"totalFec":30,"totalQuad":1,"totalQuint":0,"crossoverLevel":1947,"bracketLevel":1132,"footswitchLevel":1410,"jackLevel":697,"sideswitchLevel":464,"doublestepLevel":1703,"staminaLevel":386,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gumbygum","sex":"Male","profileImg":""},{"id":273,"membersId":173300,"dateAdded":"2023-03-19T02:31:03.000Z","lastUpdated":"2023-04-18T07:33:31.000Z","status":1,"totalPoints":300151,"rankingPoints":250918,"totalPass":65,"totalFc":35,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1478,"bracketLevel":2172,"footswitchLevel":1760,"jackLevel":1199,"sideswitchLevel":976,"doublestepLevel":1946,"staminaLevel":494,"isBuddy":false,"preferences":"{\"discordId\":\"Tetaes#8357\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Tetaes","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/233076125968891917/1093542085048684636/image.png"},{"id":461,"membersId":175292,"dateAdded":"2023-03-20T01:56:14.000Z","lastUpdated":"2023-05-03T07:18:47.000Z","status":1,"totalPoints":372164,"rankingPoints":250398,"totalPass":106,"totalFc":16,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":2373,"bracketLevel":817,"footswitchLevel":1587,"jackLevel":2835,"sideswitchLevel":1105,"doublestepLevel":2069,"staminaLevel":473,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Thotful","sex":"Male","profileImg":""},{"id":878,"membersId":175075,"dateAdded":"2023-03-28T19:35:43.000Z","lastUpdated":"2023-05-02T20:55:35.000Z","status":1,"totalPoints":452341,"rankingPoints":249070,"totalPass":92,"totalFc":14,"totalFec":59,"totalQuad":9,"totalQuint":0,"crossoverLevel":3704,"bracketLevel":1303,"footswitchLevel":2234,"jackLevel":1582,"sideswitchLevel":2085,"doublestepLevel":2987,"staminaLevel":358,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BigKnees","sex":"Male","profileImg":""},{"id":54,"membersId":128890,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-05-04T00:43:43.000Z","status":1,"totalPoints":531632,"rankingPoints":248708,"totalPass":134,"totalFc":34,"totalFec":30,"totalQuad":0,"totalQuint":0,"crossoverLevel":3411,"bracketLevel":2062,"footswitchLevel":2775,"jackLevel":1826,"sideswitchLevel":2830,"doublestepLevel":3061,"staminaLevel":664,"isBuddy":false,"preferences":"{\"discordId\":\"Coneja | Alexa#1449\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Coneja","sex":"Female","profileImg":"https://i.imgur.com/7OyrT96.png"},{"id":530,"membersId":173722,"dateAdded":"2023-03-20T19:27:08.000Z","lastUpdated":"2023-05-03T01:34:00.000Z","status":1,"totalPoints":549397,"rankingPoints":246678,"totalPass":137,"totalFc":61,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":3722,"bracketLevel":2021,"footswitchLevel":2664,"jackLevel":2036,"sideswitchLevel":2847,"doublestepLevel":2805,"staminaLevel":707,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jennergy","sex":"Female","profileImg":""},{"id":214,"membersId":160185,"dateAdded":"2023-03-18T23:56:42.000Z","lastUpdated":"2023-04-19T00:11:21.000Z","status":1,"totalPoints":266486,"rankingPoints":245822,"totalPass":59,"totalFc":14,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":1544,"bracketLevel":505,"footswitchLevel":738,"jackLevel":872,"sideswitchLevel":826,"doublestepLevel":1268,"staminaLevel":688,"isBuddy":false,"preferences":"{\"discordId\":\"NICHARD#5675\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nichard","sex":"Male","profileImg":""},{"id":407,"membersId":173559,"dateAdded":"2023-03-19T19:50:49.000Z","lastUpdated":"2023-04-25T19:14:29.000Z","status":1,"totalPoints":397850,"rankingPoints":243265,"totalPass":92,"totalFc":26,"totalFec":35,"totalQuad":0,"totalQuint":0,"crossoverLevel":2281,"bracketLevel":1133,"footswitchLevel":1720,"jackLevel":1122,"sideswitchLevel":2328,"doublestepLevel":1851,"staminaLevel":1183,"isBuddy":false,"preferences":"{\"discordId\":\"Beta#3921\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Beta","sex":"Female","profileImg":""},{"id":922,"membersId":173312,"dateAdded":"2023-03-30T16:19:22.000Z","lastUpdated":"2023-05-03T20:33:03.000Z","status":1,"totalPoints":448686,"rankingPoints":242913,"totalPass":154,"totalFc":14,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":2643,"bracketLevel":1809,"footswitchLevel":2400,"jackLevel":1977,"sideswitchLevel":2482,"doublestepLevel":2735,"staminaLevel":837,"isBuddy":false,"preferences":"{\"discordId\":\"DRILLBOT#4679\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"drillbot","sex":"Male","profileImg":"https://i.imgur.com/fwW1o6V.png"},{"id":573,"membersId":66553,"dateAdded":"2023-03-21T02:24:45.000Z","lastUpdated":"2023-04-25T01:48:55.000Z","status":1,"totalPoints":246934,"rankingPoints":242177,"totalPass":44,"totalFc":30,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1392,"bracketLevel":996,"footswitchLevel":1206,"jackLevel":676,"sideswitchLevel":940,"doublestepLevel":1657,"staminaLevel":417,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aura","sex":"Unspecified","profileImg":""},{"id":396,"membersId":23,"dateAdded":"2023-03-19T18:50:29.000Z","lastUpdated":"2023-05-03T22:57:00.000Z","status":1,"totalPoints":365778,"rankingPoints":242142,"totalPass":97,"totalFc":24,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":2053,"bracketLevel":1098,"footswitchLevel":1434,"jackLevel":1429,"sideswitchLevel":728,"doublestepLevel":1983,"staminaLevel":753,"isBuddy":false,"preferences":"{\"discordId\":\"ninjafetus#9131\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ninjafetus","sex":"Male","profileImg":""},{"id":257,"membersId":173285,"dateAdded":"2023-03-19T01:39:17.000Z","lastUpdated":"2023-05-06T01:24:57.000Z","status":1,"totalPoints":241355,"rankingPoints":241355,"totalPass":54,"totalFc":10,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1213,"bracketLevel":463,"footswitchLevel":1146,"jackLevel":681,"sideswitchLevel":1300,"doublestepLevel":695,"staminaLevel":470,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lumpky","sex":"Unspecified","profileImg":"https://i.imgur.com/Gc1UYNf.png"},{"id":355,"membersId":173142,"dateAdded":"2023-03-19T15:16:09.000Z","lastUpdated":"2023-03-31T02:20:21.000Z","status":1,"totalPoints":239605,"rankingPoints":239605,"totalPass":40,"totalFc":3,"totalFec":10,"totalQuad":4,"totalQuint":0,"crossoverLevel":1280,"bracketLevel":907,"footswitchLevel":1067,"jackLevel":601,"sideswitchLevel":968,"doublestepLevel":1331,"staminaLevel":484,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yung ButtCoin","sex":"Male","profileImg":""},{"id":688,"membersId":173351,"dateAdded":"2023-03-23T00:44:55.000Z","lastUpdated":"2023-04-24T06:40:15.000Z","status":1,"totalPoints":343199,"rankingPoints":237594,"totalPass":52,"totalFc":27,"totalFec":55,"totalQuad":4,"totalQuint":0,"crossoverLevel":2940,"bracketLevel":951,"footswitchLevel":1657,"jackLevel":972,"sideswitchLevel":689,"doublestepLevel":2439,"staminaLevel":184,"isBuddy":false,"preferences":"{\"discordId\":\"Hamlette#3816\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hamlette","sex":"Unspecified","profileImg":""},{"id":1096,"membersId":162988,"dateAdded":"2023-04-11T14:01:48.000Z","lastUpdated":"2023-04-20T00:47:01.000Z","status":1,"totalPoints":380949,"rankingPoints":237356,"totalPass":115,"totalFc":34,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":2324,"bracketLevel":1248,"footswitchLevel":1853,"jackLevel":1399,"sideswitchLevel":1920,"doublestepLevel":2366,"staminaLevel":602,"isBuddy":false,"preferences":"{\"discordId\":\"BootsMegamix#0352\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BootsMegamix","sex":"Male","profileImg":""},{"id":405,"membersId":5589,"dateAdded":"2023-03-19T19:47:22.000Z","lastUpdated":"2023-04-29T20:06:19.000Z","status":1,"totalPoints":283148,"rankingPoints":236575,"totalPass":53,"totalFc":37,"totalFec":17,"totalQuad":1,"totalQuint":0,"crossoverLevel":2327,"bracketLevel":715,"footswitchLevel":1145,"jackLevel":1103,"sideswitchLevel":845,"doublestepLevel":1604,"staminaLevel":362,"isBuddy":false,"preferences":"{\"discordId\":\"DJ_MHT#7619\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"djMHT","sex":"Male","profileImg":"https://i.imgur.com/6AVUI0u.jpg"},{"id":563,"membersId":173445,"dateAdded":"2023-03-20T23:45:12.000Z","lastUpdated":"2023-05-04T01:33:30.000Z","status":1,"totalPoints":295152,"rankingPoints":236111,"totalPass":65,"totalFc":24,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":1966,"bracketLevel":686,"footswitchLevel":1341,"jackLevel":1001,"sideswitchLevel":1213,"doublestepLevel":1648,"staminaLevel":414,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jiajiabinks","sex":"Unspecified","profileImg":""},{"id":868,"membersId":78677,"dateAdded":"2023-03-28T01:41:21.000Z","lastUpdated":"2023-05-06T23:06:15.000Z","status":1,"totalPoints":362233,"rankingPoints":234646,"totalPass":111,"totalFc":21,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1843,"bracketLevel":879,"footswitchLevel":1304,"jackLevel":1159,"sideswitchLevel":964,"doublestepLevel":1931,"staminaLevel":1421,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"plasmaaa","sex":"Female","profileImg":"https://i.imgur.com/6ZqVvks.jpg"},{"id":243,"membersId":175377,"dateAdded":"2023-03-19T00:51:58.000Z","lastUpdated":"2023-05-01T06:17:14.000Z","status":1,"totalPoints":297490,"rankingPoints":234116,"totalPass":41,"totalFc":2,"totalFec":40,"totalQuad":33,"totalQuint":0,"crossoverLevel":2696,"bracketLevel":656,"footswitchLevel":1551,"jackLevel":989,"sideswitchLevel":1248,"doublestepLevel":1739,"staminaLevel":155,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Datwood","sex":"Male","profileImg":""},{"id":350,"membersId":130553,"dateAdded":"2023-03-19T14:13:28.000Z","lastUpdated":"2023-04-17T23:24:31.000Z","status":1,"totalPoints":448437,"rankingPoints":232217,"totalPass":139,"totalFc":20,"totalFec":24,"totalQuad":0,"totalQuint":0,"crossoverLevel":2791,"bracketLevel":1198,"footswitchLevel":1977,"jackLevel":1711,"sideswitchLevel":2013,"doublestepLevel":2284,"staminaLevel":1112,"isBuddy":false,"preferences":"{\"discordId\":\"Nabi#3897\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NinjaNabi","sex":"Unspecified","profileImg":"https://i.ibb.co/ykdXrTt/nabiderpwithborder.png"},{"id":521,"membersId":173375,"dateAdded":"2023-03-20T18:38:13.000Z","lastUpdated":"2023-05-07T05:45:38.000Z","status":1,"totalPoints":382998,"rankingPoints":231487,"totalPass":95,"totalFc":14,"totalFec":49,"totalQuad":0,"totalQuint":0,"crossoverLevel":2808,"bracketLevel":1250,"footswitchLevel":1780,"jackLevel":1048,"sideswitchLevel":1439,"doublestepLevel":2017,"staminaLevel":461,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"luna2108","sex":"Female","profileImg":""},{"id":138,"membersId":132111,"dateAdded":"2023-03-18T22:07:14.000Z","lastUpdated":"2023-05-04T17:59:11.000Z","status":1,"totalPoints":370534,"rankingPoints":230735,"totalPass":104,"totalFc":31,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":1964,"bracketLevel":1154,"footswitchLevel":1757,"jackLevel":1169,"sideswitchLevel":2343,"doublestepLevel":1673,"staminaLevel":782,"isBuddy":false,"preferences":"{\"discordId\":\"Axor#3890\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Axor","sex":"Male","profileImg":"https://public.573573573.xyz/avatar-axor-250-gs-v1.png"},{"id":1105,"membersId":66234,"dateAdded":"2023-04-12T08:47:55.000Z","lastUpdated":"2023-04-30T10:53:08.000Z","status":1,"totalPoints":360965,"rankingPoints":230665,"totalPass":107,"totalFc":26,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":2379,"bracketLevel":1328,"footswitchLevel":1898,"jackLevel":1601,"sideswitchLevel":1905,"doublestepLevel":2006,"staminaLevel":475,"isBuddy":false,"preferences":"{\"discordId\":\"corcaroli#6682\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"aweaver","sex":"Unspecified","profileImg":""},{"id":126,"membersId":173876,"dateAdded":"2023-03-18T22:00:50.000Z","lastUpdated":"2023-03-24T19:10:18.000Z","status":1,"totalPoints":335398,"rankingPoints":229155,"totalPass":108,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1883,"bracketLevel":906,"footswitchLevel":1348,"jackLevel":1198,"sideswitchLevel":1383,"doublestepLevel":1481,"staminaLevel":895,"isBuddy":false,"preferences":"{\"discordId\":\"sigonasr2#7782\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sigonasr2","sex":"Male","profileImg":"https://en.gravatar.com/userimage/3612777/b9992e90331c1fa71a3479f5b3d02b41.png"},{"id":607,"membersId":172971,"dateAdded":"2023-03-21T20:00:27.000Z","lastUpdated":"2023-05-06T14:18:17.000Z","status":1,"totalPoints":321669,"rankingPoints":229092,"totalPass":90,"totalFc":30,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1386,"bracketLevel":1556,"footswitchLevel":1864,"jackLevel":1161,"sideswitchLevel":1795,"doublestepLevel":1119,"staminaLevel":893,"isBuddy":false,"preferences":"{\"discordId\":\"Ravelan#8373\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ravelan","sex":"Male","profileImg":""},{"id":1069,"membersId":175772,"dateAdded":"2023-04-09T10:56:41.000Z","lastUpdated":"2023-05-05T15:35:19.000Z","status":1,"totalPoints":437058,"rankingPoints":229021,"totalPass":132,"totalFc":39,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":3048,"bracketLevel":872,"footswitchLevel":1933,"jackLevel":1520,"sideswitchLevel":1669,"doublestepLevel":2311,"staminaLevel":612,"isBuddy":false,"preferences":"{\"discordId\":\"djfipu#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"djfipu","sex":"Male","profileImg":"https://i.imgur.com/VplwzxX.png"},{"id":279,"membersId":75846,"dateAdded":"2023-03-19T02:46:25.000Z","lastUpdated":"2023-05-06T23:08:00.000Z","status":1,"totalPoints":421456,"rankingPoints":228878,"totalPass":110,"totalFc":28,"totalFec":34,"totalQuad":0,"totalQuint":0,"crossoverLevel":2597,"bracketLevel":1157,"footswitchLevel":1644,"jackLevel":966,"sideswitchLevel":1857,"doublestepLevel":1903,"staminaLevel":763,"isBuddy":false,"preferences":"{\"discordId\":\"rarily#5911\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rarily","sex":"Female","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shaymin-land.png"},{"id":223,"membersId":37863,"dateAdded":"2023-03-19T00:15:36.000Z","lastUpdated":"2023-05-05T20:31:31.000Z","status":1,"totalPoints":267678,"rankingPoints":228606,"totalPass":47,"totalFc":43,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1678,"bracketLevel":823,"footswitchLevel":1281,"jackLevel":1195,"sideswitchLevel":2093,"doublestepLevel":1213,"staminaLevel":300,"isBuddy":false,"preferences":"{\"discordId\":\"TaroNuke#4012\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TaroNuke","sex":"Male","profileImg":""},{"id":9,"membersId":173420,"dateAdded":"2023-03-18T21:48:27.000Z","lastUpdated":"2023-05-06T23:46:40.000Z","status":1,"totalPoints":603525,"rankingPoints":227426,"totalPass":156,"totalFc":94,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":3837,"bracketLevel":1592,"footswitchLevel":2766,"jackLevel":2327,"sideswitchLevel":3067,"doublestepLevel":3106,"staminaLevel":1097,"isBuddy":false,"preferences":"{\"discordId\":\"Martin#6291\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"slowunsteady","sex":"Unspecified","profileImg":"https://i.imgur.com/7VkeuP9.png"},{"id":15,"membersId":118539,"dateAdded":"2023-03-18T21:48:44.000Z","lastUpdated":"2023-05-04T00:17:45.000Z","status":1,"totalPoints":267667,"rankingPoints":227356,"totalPass":67,"totalFc":25,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1560,"bracketLevel":1073,"footswitchLevel":1377,"jackLevel":886,"sideswitchLevel":1198,"doublestepLevel":923,"staminaLevel":425,"isBuddy":false,"preferences":"{\"discordId\":\"fastboy#1312\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"fastboy","sex":"Unspecified","profileImg":""},{"id":463,"membersId":175285,"dateAdded":"2023-03-20T02:00:58.000Z","lastUpdated":"2023-05-03T07:35:21.000Z","status":1,"totalPoints":264023,"rankingPoints":227310,"totalPass":73,"totalFc":13,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1835,"bracketLevel":747,"footswitchLevel":1234,"jackLevel":523,"sideswitchLevel":678,"doublestepLevel":1148,"staminaLevel":327,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"hitswi","sex":"Female","profileImg":"https://pbs.twimg.com/profile_images/1628895416921260032/3VRl4sQ__200x200.jpg"},{"id":543,"membersId":66732,"dateAdded":"2023-03-20T21:09:10.000Z","lastUpdated":"2023-05-05T23:19:40.000Z","status":1,"totalPoints":333754,"rankingPoints":226997,"totalPass":92,"totalFc":29,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":1947,"bracketLevel":1221,"footswitchLevel":1545,"jackLevel":1258,"sideswitchLevel":859,"doublestepLevel":2114,"staminaLevel":612,"isBuddy":false,"preferences":"{\"discordId\":\"Cxxxx#1478\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cxxxx","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/770511307966775306/773400266266902598/Cxxxx_Avatar.png"},{"id":323,"membersId":1932,"dateAdded":"2023-03-19T07:13:42.000Z","lastUpdated":"2023-04-28T09:12:56.000Z","status":1,"totalPoints":296894,"rankingPoints":225435,"totalPass":126,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1333,"bracketLevel":1054,"footswitchLevel":1444,"jackLevel":1053,"sideswitchLevel":1322,"doublestepLevel":1539,"staminaLevel":745,"isBuddy":false,"preferences":"{\"discordId\":\"flip314#2079\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"flip","sex":"Male","profileImg":"https://i.imgur.com/hNWIhQX.png"},{"id":665,"membersId":172949,"dateAdded":"2023-03-22T18:42:16.000Z","lastUpdated":"2023-05-05T11:51:17.000Z","status":1,"totalPoints":285997,"rankingPoints":225313,"totalPass":1,"totalFc":8,"totalFec":94,"totalQuad":14,"totalQuint":0,"crossoverLevel":2693,"bracketLevel":605,"footswitchLevel":1500,"jackLevel":529,"sideswitchLevel":939,"doublestepLevel":1601,"staminaLevel":156,"isBuddy":false,"preferences":"{\"discordId\":\"topet2k12001#5211\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"topet","sex":"Male","profileImg":""},{"id":224,"membersId":173438,"dateAdded":"2023-03-19T00:18:20.000Z","lastUpdated":"2023-05-06T22:49:48.000Z","status":1,"totalPoints":286214,"rankingPoints":225293,"totalPass":45,"totalFc":34,"totalFec":30,"totalQuad":2,"totalQuint":0,"crossoverLevel":2643,"bracketLevel":708,"footswitchLevel":1375,"jackLevel":697,"sideswitchLevel":792,"doublestepLevel":2131,"staminaLevel":165,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nauebp","sex":"Male","profileImg":""},{"id":379,"membersId":173336,"dateAdded":"2023-03-19T17:32:41.000Z","lastUpdated":"2023-05-05T00:19:25.000Z","status":1,"totalPoints":345428,"rankingPoints":225178,"totalPass":75,"totalFc":55,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":2890,"bracketLevel":1116,"footswitchLevel":1679,"jackLevel":1120,"sideswitchLevel":1267,"doublestepLevel":2303,"staminaLevel":284,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"stevesef","sex":"Unspecified","profileImg":""},{"id":431,"membersId":173130,"dateAdded":"2023-03-19T22:17:07.000Z","lastUpdated":"2023-05-05T04:52:22.000Z","status":1,"totalPoints":230370,"rankingPoints":223400,"totalPass":49,"totalFc":14,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":1267,"bracketLevel":983,"footswitchLevel":1267,"jackLevel":562,"sideswitchLevel":1008,"doublestepLevel":1746,"staminaLevel":443,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cheeze","sex":"Male","profileImg":""},{"id":542,"membersId":173366,"dateAdded":"2023-03-20T21:05:41.000Z","lastUpdated":"2023-04-17T23:41:04.000Z","status":1,"totalPoints":225625,"rankingPoints":221688,"totalPass":56,"totalFc":13,"totalFec":8,"totalQuad":4,"totalQuint":0,"crossoverLevel":1335,"bracketLevel":976,"footswitchLevel":1077,"jackLevel":1036,"sideswitchLevel":347,"doublestepLevel":1512,"staminaLevel":378,"isBuddy":false,"preferences":"{\"discordId\":\"cardmaster#3399\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Popplio","sex":"Unspecified","profileImg":""},{"id":154,"membersId":173304,"dateAdded":"2023-03-18T22:20:46.000Z","lastUpdated":"2023-05-06T16:22:31.000Z","status":1,"totalPoints":221481,"rankingPoints":221481,"totalPass":25,"totalFc":27,"totalFec":23,"totalQuad":0,"totalQuint":0,"crossoverLevel":1648,"bracketLevel":306,"footswitchLevel":809,"jackLevel":472,"sideswitchLevel":580,"doublestepLevel":1372,"staminaLevel":288,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"teri","sex":"Unspecified","profileImg":"https://i.gyazo.com/92492b24d72a216b1150f8328e74e053.gif"},{"id":505,"membersId":173104,"dateAdded":"2023-03-20T15:50:34.000Z","lastUpdated":"2023-04-20T01:53:10.000Z","status":1,"totalPoints":245944,"rankingPoints":221387,"totalPass":30,"totalFc":11,"totalFec":47,"totalQuad":8,"totalQuint":0,"crossoverLevel":2222,"bracketLevel":647,"footswitchLevel":1257,"jackLevel":570,"sideswitchLevel":593,"doublestepLevel":1440,"staminaLevel":249,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TaymanND","sex":"Unspecified","profileImg":""},{"id":457,"membersId":72041,"dateAdded":"2023-03-20T01:38:01.000Z","lastUpdated":"2023-05-04T23:31:31.000Z","status":1,"totalPoints":431309,"rankingPoints":221224,"totalPass":190,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2137,"bracketLevel":1393,"footswitchLevel":1657,"jackLevel":1572,"sideswitchLevel":1471,"doublestepLevel":1997,"staminaLevel":1677,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DerpyPengu","sex":"Male","profileImg":""},{"id":1068,"membersId":175197,"dateAdded":"2023-04-09T05:50:00.000Z","lastUpdated":"2023-05-04T05:12:08.000Z","status":1,"totalPoints":267131,"rankingPoints":219454,"totalPass":79,"totalFc":13,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":1501,"bracketLevel":842,"footswitchLevel":1318,"jackLevel":816,"sideswitchLevel":878,"doublestepLevel":1611,"staminaLevel":387,"isBuddy":false,"preferences":"{\"discordId\":\"rickytickytavy#8081\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"Derk","sex":"Unspecified","profileImg":""},{"id":202,"membersId":134389,"dateAdded":"2023-03-18T23:17:46.000Z","lastUpdated":"2023-04-27T02:21:53.000Z","status":1,"totalPoints":352541,"rankingPoints":219263,"totalPass":116,"totalFc":24,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":2146,"bracketLevel":1097,"footswitchLevel":1596,"jackLevel":892,"sideswitchLevel":1402,"doublestepLevel":1811,"staminaLevel":567,"isBuddy":false,"preferences":"{\"discordId\":\"mewmiu123#6969\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"angelXboy","sex":"Unspecified","profileImg":""},{"id":585,"membersId":173064,"dateAdded":"2023-03-21T06:50:33.000Z","lastUpdated":"2023-05-07T02:48:58.000Z","status":1,"totalPoints":419751,"rankingPoints":218794,"totalPass":124,"totalFc":57,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":3028,"bracketLevel":1399,"footswitchLevel":2135,"jackLevel":1392,"sideswitchLevel":1514,"doublestepLevel":2267,"staminaLevel":449,"isBuddy":false,"preferences":"{\"discordId\":\"bobapup#8084\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"bobayubi","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/835358703766339644/1087957298871291904/1.png"},{"id":480,"membersId":81056,"dateAdded":"2023-03-20T04:50:23.000Z","lastUpdated":"2023-04-29T00:11:49.000Z","status":1,"totalPoints":240055,"rankingPoints":218100,"totalPass":20,"totalFc":18,"totalFec":29,"totalQuad":27,"totalQuint":0,"crossoverLevel":2014,"bracketLevel":715,"footswitchLevel":1168,"jackLevel":699,"sideswitchLevel":314,"doublestepLevel":1734,"staminaLevel":251,"isBuddy":false,"preferences":"{\"discordId\":\"Twans#2480\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Twans","sex":"Male","profileImg":""},{"id":488,"membersId":173629,"dateAdded":"2023-03-20T11:24:43.000Z","lastUpdated":"2023-05-05T11:06:21.000Z","status":1,"totalPoints":255804,"rankingPoints":217495,"totalPass":46,"totalFc":48,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1942,"bracketLevel":820,"footswitchLevel":1207,"jackLevel":821,"sideswitchLevel":967,"doublestepLevel":1466,"staminaLevel":317,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RamoDavi","sex":"Male","profileImg":""},{"id":636,"membersId":173391,"dateAdded":"2023-03-22T04:01:56.000Z","lastUpdated":"2023-05-06T19:46:37.000Z","status":1,"totalPoints":384660,"rankingPoints":217169,"totalPass":153,"totalFc":14,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2138,"bracketLevel":1303,"footswitchLevel":1736,"jackLevel":1613,"sideswitchLevel":1418,"doublestepLevel":1948,"staminaLevel":837,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CompleteYoshi","sex":"Male","profileImg":"https://i.imgur.com/0tpcBsy.png"},{"id":38,"membersId":76052,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-05-05T01:05:32.000Z","status":1,"totalPoints":412951,"rankingPoints":217111,"totalPass":122,"totalFc":42,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":3042,"bracketLevel":1242,"footswitchLevel":1870,"jackLevel":1419,"sideswitchLevel":1550,"doublestepLevel":2578,"staminaLevel":577,"isBuddy":false,"preferences":"{\"discordId\":\"MrTwinkles#1706\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrTwinkles","sex":"Male","profileImg":"https://i.imgur.com/yNDAybO.jpg"},{"id":321,"membersId":175218,"dateAdded":"2023-03-19T07:08:13.000Z","lastUpdated":"2023-03-25T22:00:58.000Z","status":1,"totalPoints":277742,"rankingPoints":216772,"totalPass":99,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1444,"bracketLevel":1101,"footswitchLevel":1255,"jackLevel":864,"sideswitchLevel":1548,"doublestepLevel":1463,"staminaLevel":630,"isBuddy":false,"preferences":"{\"discordId\":\"Zivie#2560\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zivie87","sex":"Male","profileImg":""},{"id":693,"membersId":173013,"dateAdded":"2023-03-23T02:36:34.000Z","lastUpdated":"2023-05-02T21:40:52.000Z","status":1,"totalPoints":216327,"rankingPoints":216327,"totalPass":38,"totalFc":7,"totalFec":12,"totalQuad":10,"totalQuint":0,"crossoverLevel":1247,"bracketLevel":885,"footswitchLevel":1405,"jackLevel":402,"sideswitchLevel":1404,"doublestepLevel":1111,"staminaLevel":479,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"J13Rstyle","sex":"Unspecified","profileImg":""},{"id":1178,"membersId":175938,"dateAdded":"2023-04-21T17:11:09.000Z","lastUpdated":"2023-05-06T16:23:36.000Z","status":1,"totalPoints":263986,"rankingPoints":215905,"totalPass":45,"totalFc":43,"totalFec":25,"totalQuad":0,"totalQuint":0,"crossoverLevel":2052,"bracketLevel":1121,"footswitchLevel":1714,"jackLevel":749,"sideswitchLevel":1039,"doublestepLevel":1777,"staminaLevel":371,"isBuddy":false,"preferences":"{\"discordId\":\"Primo Victorian#9502\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PrimoVictorian","sex":"Male","profileImg":""},{"id":593,"membersId":73458,"dateAdded":"2023-03-21T14:39:54.000Z","lastUpdated":"2023-05-04T01:42:09.000Z","status":1,"totalPoints":251303,"rankingPoints":215623,"totalPass":82,"totalFc":11,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1070,"bracketLevel":655,"footswitchLevel":1259,"jackLevel":527,"sideswitchLevel":816,"doublestepLevel":1238,"staminaLevel":1313,"isBuddy":false,"preferences":"{\"discordId\":\"Cozy#8123\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cozy","sex":"Male","profileImg":"https://i.imgur.com/Ss71VnP.jpg"},{"id":590,"membersId":173571,"dateAdded":"2023-03-21T11:52:52.000Z","lastUpdated":"2023-04-10T07:33:54.000Z","status":1,"totalPoints":275209,"rankingPoints":215332,"totalPass":57,"totalFc":17,"totalFec":46,"totalQuad":0,"totalQuint":0,"crossoverLevel":2231,"bracketLevel":684,"footswitchLevel":1191,"jackLevel":622,"sideswitchLevel":681,"doublestepLevel":1863,"staminaLevel":226,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KyokiShinsa","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/986205476356251649/988552408953155605/kyokilogo.png"},{"id":409,"membersId":173350,"dateAdded":"2023-03-19T20:01:52.000Z","lastUpdated":"2023-04-09T00:09:30.000Z","status":1,"totalPoints":354957,"rankingPoints":213918,"totalPass":89,"totalFc":18,"totalFec":41,"totalQuad":7,"totalQuint":0,"crossoverLevel":2972,"bracketLevel":922,"footswitchLevel":1734,"jackLevel":1120,"sideswitchLevel":900,"doublestepLevel":2234,"staminaLevel":290,"isBuddy":false,"preferences":"{\"discordId\":\"Dayani#1798\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dayani","sex":"Female","profileImg":""},{"id":440,"membersId":76910,"dateAdded":"2023-03-19T23:32:12.000Z","lastUpdated":"2023-05-05T22:46:19.000Z","status":1,"totalPoints":283971,"rankingPoints":213901,"totalPass":94,"totalFc":21,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":2384,"bracketLevel":865,"footswitchLevel":1424,"jackLevel":881,"sideswitchLevel":797,"doublestepLevel":1984,"staminaLevel":214,"isBuddy":false,"preferences":"{\"discordId\":\"din#0495\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"din","sex":"Male","profileImg":""},{"id":599,"membersId":173067,"dateAdded":"2023-03-21T17:21:39.000Z","lastUpdated":"2023-05-06T03:45:11.000Z","status":1,"totalPoints":248773,"rankingPoints":213783,"totalPass":37,"totalFc":18,"totalFec":26,"totalQuad":24,"totalQuint":0,"crossoverLevel":2253,"bracketLevel":383,"footswitchLevel":1025,"jackLevel":490,"sideswitchLevel":643,"doublestepLevel":1447,"staminaLevel":171,"isBuddy":false,"preferences":"{\"discordId\":\"PinkDino#0188\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pink Dino","sex":"Male","profileImg":""},{"id":909,"membersId":173621,"dateAdded":"2023-03-29T22:28:39.000Z","lastUpdated":"2023-05-05T00:49:03.000Z","status":1,"totalPoints":213516,"rankingPoints":213516,"totalPass":50,"totalFc":16,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":1252,"bracketLevel":428,"footswitchLevel":778,"jackLevel":813,"sideswitchLevel":665,"doublestepLevel":1206,"staminaLevel":461,"isBuddy":false,"preferences":"{\"discordId\":\"Baderbandit#0444\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zbader","sex":"Male","profileImg":""},{"id":1064,"membersId":168218,"dateAdded":"2023-04-08T21:58:41.000Z","lastUpdated":"2023-05-04T04:53:32.000Z","status":1,"totalPoints":251141,"rankingPoints":210994,"totalPass":76,"totalFc":22,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1776,"bracketLevel":276,"footswitchLevel":1255,"jackLevel":555,"sideswitchLevel":1256,"doublestepLevel":1021,"staminaLevel":404,"isBuddy":false,"preferences":"{\"discordId\":\"tiff tiff#1919\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gudetama","sex":"Unspecified","profileImg":""},{"id":685,"membersId":175453,"dateAdded":"2023-03-23T00:23:58.000Z","lastUpdated":"2023-03-30T00:58:24.000Z","status":1,"totalPoints":210683,"rankingPoints":210683,"totalPass":31,"totalFc":7,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":661,"bracketLevel":1329,"footswitchLevel":895,"jackLevel":631,"sideswitchLevel":462,"doublestepLevel":733,"staminaLevel":821,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Another48","sex":"Male","profileImg":""},{"id":502,"membersId":167276,"dateAdded":"2023-03-20T15:22:04.000Z","lastUpdated":"2023-05-03T19:21:15.000Z","status":1,"totalPoints":250810,"rankingPoints":210673,"totalPass":92,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1261,"bracketLevel":548,"footswitchLevel":910,"jackLevel":1016,"sideswitchLevel":886,"doublestepLevel":731,"staminaLevel":607,"isBuddy":false,"preferences":"{\"discordId\":\"Kroly#4140\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"Ayaka","sex":"Male","profileImg":"https://puu.sh/HVN1P/30f6829f72.png"},{"id":987,"membersId":75962,"dateAdded":"2023-04-03T05:06:58.000Z","lastUpdated":"2023-05-03T05:00:31.000Z","status":1,"totalPoints":210602,"rankingPoints":210602,"totalPass":42,"totalFc":4,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":888,"bracketLevel":567,"footswitchLevel":829,"jackLevel":619,"sideswitchLevel":538,"doublestepLevel":757,"staminaLevel":430,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jerryjurr","sex":"Male","profileImg":""},{"id":157,"membersId":42011,"dateAdded":"2023-03-18T22:22:10.000Z","lastUpdated":"2023-05-02T16:45:55.000Z","status":1,"totalPoints":307957,"rankingPoints":210270,"totalPass":100,"totalFc":38,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":2029,"bracketLevel":869,"footswitchLevel":1705,"jackLevel":1112,"sideswitchLevel":638,"doublestepLevel":1748,"staminaLevel":347,"isBuddy":false,"preferences":"{\"discordId\":\"Mr. Mary#1679\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zlew","sex":"Male","profileImg":"https://i.imgur.com/THdpsEY.png"},{"id":30,"membersId":173356,"dateAdded":"2023-03-18T21:48:55.000Z","lastUpdated":"2023-05-06T19:09:28.000Z","status":1,"totalPoints":476498,"rankingPoints":208630,"totalPass":161,"totalFc":65,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":3136,"bracketLevel":1412,"footswitchLevel":2281,"jackLevel":1665,"sideswitchLevel":2632,"doublestepLevel":2589,"staminaLevel":605,"isBuddy":false,"preferences":"{\"discordId\":\"NowhereDanceClub#8375\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NOWHERE Dance Club","sex":"Male","profileImg":"https://i.ibb.co/R9xYwmd/groovestats-pfp2.png"},{"id":504,"membersId":98817,"dateAdded":"2023-03-20T15:48:47.000Z","lastUpdated":"2023-05-03T20:22:29.000Z","status":1,"totalPoints":207917,"rankingPoints":207917,"totalPass":11,"totalFc":13,"totalFec":19,"totalQuad":4,"totalQuint":0,"crossoverLevel":1073,"bracketLevel":696,"footswitchLevel":918,"jackLevel":1219,"sideswitchLevel":674,"doublestepLevel":1749,"staminaLevel":392,"isBuddy":false,"preferences":"{\"discordId\":\"miligram#0055\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"miligram","sex":"Male","profileImg":"https://i.imgur.com/j2xKUJo.jpg"},{"id":1145,"membersId":3203,"dateAdded":"2023-04-16T22:24:17.000Z","lastUpdated":"2023-05-06T02:24:25.000Z","status":1,"totalPoints":229057,"rankingPoints":207447,"totalPass":40,"totalFc":17,"totalFec":36,"totalQuad":1,"totalQuint":0,"crossoverLevel":1803,"bracketLevel":510,"footswitchLevel":1433,"jackLevel":414,"sideswitchLevel":1067,"doublestepLevel":1101,"staminaLevel":194,"isBuddy":false,"preferences":"{\"discordId\":\"typobox#0045\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"typobox","sex":"Male","profileImg":""},{"id":1132,"membersId":173306,"dateAdded":"2023-04-15T21:05:41.000Z","lastUpdated":"2023-05-01T18:52:39.000Z","status":1,"totalPoints":232947,"rankingPoints":207367,"totalPass":76,"totalFc":12,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1291,"bracketLevel":773,"footswitchLevel":1242,"jackLevel":576,"sideswitchLevel":938,"doublestepLevel":1092,"staminaLevel":308,"isBuddy":false,"preferences":"{\"discordId\":\"ibu#8058\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ibuprofen","sex":"Male","profileImg":"https://i.imgur.com/VKeK4od.png"},{"id":380,"membersId":173317,"dateAdded":"2023-03-19T17:36:37.000Z","lastUpdated":"2023-05-01T23:01:53.000Z","status":1,"totalPoints":206286,"rankingPoints":206286,"totalPass":26,"totalFc":10,"totalFec":15,"totalQuad":7,"totalQuint":0,"crossoverLevel":1288,"bracketLevel":667,"footswitchLevel":1211,"jackLevel":304,"sideswitchLevel":1074,"doublestepLevel":1062,"staminaLevel":268,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CopperPuppy","sex":"Male","profileImg":""},{"id":694,"membersId":66487,"dateAdded":"2023-03-23T02:40:03.000Z","lastUpdated":"2023-04-30T15:46:17.000Z","status":1,"totalPoints":230856,"rankingPoints":206228,"totalPass":66,"totalFc":26,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":1698,"bracketLevel":719,"footswitchLevel":974,"jackLevel":444,"sideswitchLevel":755,"doublestepLevel":1276,"staminaLevel":399,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dominick.dechristofaro","sex":"Male","profileImg":""},{"id":50,"membersId":34196,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-04-01T21:38:15.000Z","status":1,"totalPoints":205717,"rankingPoints":205717,"totalPass":17,"totalFc":22,"totalFec":17,"totalQuad":0,"totalQuint":0,"crossoverLevel":716,"bracketLevel":622,"footswitchLevel":702,"jackLevel":1166,"sideswitchLevel":130,"doublestepLevel":917,"staminaLevel":352,"isBuddy":false,"preferences":"{\"discordId\":\"Telperion#4649\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bit.ly/scobility-ITL2023","sex":"Male","profileImg":"https://i.imgur.com/HdfcfoV.png"},{"id":630,"membersId":173612,"dateAdded":"2023-03-22T01:10:43.000Z","lastUpdated":"2023-05-01T02:37:03.000Z","status":1,"totalPoints":205674,"rankingPoints":205674,"totalPass":26,"totalFc":13,"totalFec":6,"totalQuad":1,"totalQuint":0,"crossoverLevel":1177,"bracketLevel":704,"footswitchLevel":862,"jackLevel":375,"sideswitchLevel":1210,"doublestepLevel":680,"staminaLevel":431,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"speny","sex":"Unspecified","profileImg":""},{"id":499,"membersId":175051,"dateAdded":"2023-03-20T14:44:21.000Z","lastUpdated":"2023-04-24T13:05:44.000Z","status":1,"totalPoints":329675,"rankingPoints":202705,"totalPass":90,"totalFc":64,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":2597,"bracketLevel":1052,"footswitchLevel":1612,"jackLevel":1095,"sideswitchLevel":1193,"doublestepLevel":2081,"staminaLevel":296,"isBuddy":false,"preferences":"{\"discordId\":\"PSYQUO#8377\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"psyquo","sex":"Unspecified","profileImg":""},{"id":481,"membersId":173825,"dateAdded":"2023-03-20T05:06:21.000Z","lastUpdated":"2023-05-03T03:00:36.000Z","status":1,"totalPoints":314787,"rankingPoints":202682,"totalPass":91,"totalFc":32,"totalFec":24,"totalQuad":1,"totalQuint":0,"crossoverLevel":2376,"bracketLevel":646,"footswitchLevel":1486,"jackLevel":887,"sideswitchLevel":695,"doublestepLevel":1658,"staminaLevel":313,"isBuddy":false,"preferences":"{\"discordId\":\"Zenius#6583\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xxzeniusxx","sex":"Male","profileImg":""},{"id":291,"membersId":52996,"dateAdded":"2023-03-19T03:35:48.000Z","lastUpdated":"2023-04-18T02:46:11.000Z","status":1,"totalPoints":201242,"rankingPoints":201242,"totalPass":46,"totalFc":16,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":807,"bracketLevel":210,"footswitchLevel":421,"jackLevel":633,"sideswitchLevel":545,"doublestepLevel":638,"staminaLevel":1324,"isBuddy":false,"preferences":"{\"discordId\":\"Paige#7414\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Paige","sex":"Female","profileImg":"https://www.moonkitty.net/sailor-moon-character-guide-sailor-jupiter.jpg"},{"id":99,"membersId":132032,"dateAdded":"2023-03-18T21:53:08.000Z","lastUpdated":"2023-04-06T13:30:19.000Z","status":1,"totalPoints":204934,"rankingPoints":200921,"totalPass":58,"totalFc":18,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":968,"bracketLevel":718,"footswitchLevel":1079,"jackLevel":490,"sideswitchLevel":569,"doublestepLevel":1051,"staminaLevel":982,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tommoda","sex":"Male","profileImg":"https://iili.io/MJfrjn.png"},{"id":677,"membersId":174191,"dateAdded":"2023-03-22T23:10:36.000Z","lastUpdated":"2023-05-02T00:31:12.000Z","status":1,"totalPoints":262740,"rankingPoints":200661,"totalPass":74,"totalFc":31,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1758,"bracketLevel":952,"footswitchLevel":1464,"jackLevel":1166,"sideswitchLevel":872,"doublestepLevel":1436,"staminaLevel":244,"isBuddy":false,"preferences":"{\"discordId\":\"Dautri#4857\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dautri","sex":"Male","profileImg":""},{"id":394,"membersId":175356,"dateAdded":"2023-03-19T18:41:02.000Z","lastUpdated":"2023-04-27T00:55:13.000Z","status":1,"totalPoints":243273,"rankingPoints":200156,"totalPass":33,"totalFc":24,"totalFec":52,"totalQuad":0,"totalQuint":0,"crossoverLevel":2348,"bracketLevel":583,"footswitchLevel":1231,"jackLevel":658,"sideswitchLevel":675,"doublestepLevel":1553,"staminaLevel":183,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SnowStorm","sex":"Male","profileImg":""},{"id":536,"membersId":173260,"dateAdded":"2023-03-20T19:50:27.000Z","lastUpdated":"2023-05-05T01:04:50.000Z","status":1,"totalPoints":215939,"rankingPoints":200124,"totalPass":64,"totalFc":13,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":821,"bracketLevel":908,"footswitchLevel":937,"jackLevel":968,"sideswitchLevel":661,"doublestepLevel":1268,"staminaLevel":226,"isBuddy":false,"preferences":"{\"discordId\":\"mr._peabody#0600\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Peabody!","sex":"Male","profileImg":""},{"id":61,"membersId":174010,"dateAdded":"2023-03-18T21:49:40.000Z","lastUpdated":"2023-05-05T14:03:00.000Z","status":1,"totalPoints":327067,"rankingPoints":199656,"totalPass":128,"totalFc":23,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":2485,"bracketLevel":473,"footswitchLevel":1503,"jackLevel":1068,"sideswitchLevel":1073,"doublestepLevel":1960,"staminaLevel":367,"isBuddy":false,"preferences":"{\"discordId\":\"zibson#4140\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"zibson","sex":"Male","profileImg":""},{"id":876,"membersId":66721,"dateAdded":"2023-03-28T18:45:27.000Z","lastUpdated":"2023-04-29T12:02:38.000Z","status":1,"totalPoints":198752,"rankingPoints":198752,"totalPass":53,"totalFc":7,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":791,"bracketLevel":333,"footswitchLevel":735,"jackLevel":947,"sideswitchLevel":307,"doublestepLevel":446,"staminaLevel":551,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ryany0","sex":"Male","profileImg":""},{"id":123,"membersId":173068,"dateAdded":"2023-03-18T21:59:33.000Z","lastUpdated":"2023-05-04T00:43:31.000Z","status":1,"totalPoints":324625,"rankingPoints":198350,"totalPass":97,"totalFc":46,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":2323,"bracketLevel":921,"footswitchLevel":1667,"jackLevel":1027,"sideswitchLevel":1934,"doublestepLevel":1820,"staminaLevel":429,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gyzarus","sex":"Male","profileImg":"https://i.imgur.com/EjRFziQ.png"},{"id":219,"membersId":173474,"dateAdded":"2023-03-19T00:11:42.000Z","lastUpdated":"2023-04-30T23:25:54.000Z","status":1,"totalPoints":201912,"rankingPoints":198223,"totalPass":55,"totalFc":19,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":1162,"bracketLevel":473,"footswitchLevel":932,"jackLevel":549,"sideswitchLevel":628,"doublestepLevel":1029,"staminaLevel":443,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Wenn","sex":"Female","profileImg":""},{"id":1103,"membersId":174029,"dateAdded":"2023-04-12T06:31:01.000Z","lastUpdated":"2023-05-01T09:12:08.000Z","status":1,"totalPoints":248120,"rankingPoints":197510,"totalPass":44,"totalFc":34,"totalFec":34,"totalQuad":1,"totalQuint":0,"crossoverLevel":2518,"bracketLevel":472,"footswitchLevel":1127,"jackLevel":444,"sideswitchLevel":561,"doublestepLevel":1631,"staminaLevel":111,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SAN REMO","sex":"Male","profileImg":""},{"id":901,"membersId":174909,"dateAdded":"2023-03-29T15:34:26.000Z","lastUpdated":"2023-05-02T01:20:29.000Z","status":1,"totalPoints":214592,"rankingPoints":196616,"totalPass":69,"totalFc":15,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1429,"bracketLevel":59,"footswitchLevel":829,"jackLevel":806,"sideswitchLevel":782,"doublestepLevel":1396,"staminaLevel":264,"isBuddy":false,"preferences":"{\"discordId\":\"over_loadcode#5428\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"olc","sex":"Male","profileImg":"https://i.imgur.com/BK4MPT8.png"},{"id":425,"membersId":173077,"dateAdded":"2023-03-19T21:17:32.000Z","lastUpdated":"2023-05-04T00:41:34.000Z","status":1,"totalPoints":271374,"rankingPoints":195939,"totalPass":69,"totalFc":18,"totalFec":39,"totalQuad":0,"totalQuint":0,"crossoverLevel":2012,"bracketLevel":775,"footswitchLevel":1268,"jackLevel":660,"sideswitchLevel":866,"doublestepLevel":1490,"staminaLevel":236,"isBuddy":false,"preferences":"{\"discordId\":\"Layna Grey#0539\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"STARLONG","sex":"Female","profileImg":""},{"id":695,"membersId":4887,"dateAdded":"2023-03-23T04:57:13.000Z","lastUpdated":"2023-04-26T13:15:56.000Z","status":1,"totalPoints":195899,"rankingPoints":195899,"totalPass":50,"totalFc":11,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1059,"bracketLevel":756,"footswitchLevel":976,"jackLevel":546,"sideswitchLevel":591,"doublestepLevel":1332,"staminaLevel":321,"isBuddy":false,"preferences":"{\"discordId\":\"JayNeko#5497\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JayNeko","sex":"Male","profileImg":""},{"id":351,"membersId":173315,"dateAdded":"2023-03-19T14:23:32.000Z","lastUpdated":"2023-04-30T20:56:43.000Z","status":1,"totalPoints":308508,"rankingPoints":194580,"totalPass":131,"totalFc":20,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1638,"bracketLevel":1157,"footswitchLevel":1533,"jackLevel":898,"sideswitchLevel":1170,"doublestepLevel":1366,"staminaLevel":490,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"vintogigue","sex":"Unspecified","profileImg":""},{"id":793,"membersId":175518,"dateAdded":"2023-03-25T18:36:12.000Z","lastUpdated":"2023-04-30T19:15:18.000Z","status":1,"totalPoints":193994,"rankingPoints":193994,"totalPass":61,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1155,"bracketLevel":865,"footswitchLevel":1230,"jackLevel":665,"sideswitchLevel":1227,"doublestepLevel":822,"staminaLevel":345,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ProjectileComet","sex":"Unspecified","profileImg":""},{"id":713,"membersId":175467,"dateAdded":"2023-03-24T00:37:21.000Z","lastUpdated":"2023-05-06T04:10:08.000Z","status":1,"totalPoints":193801,"rankingPoints":193801,"totalPass":40,"totalFc":9,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":817,"bracketLevel":931,"footswitchLevel":878,"jackLevel":574,"sideswitchLevel":536,"doublestepLevel":945,"staminaLevel":378,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bles48","sex":"Male","profileImg":""},{"id":1254,"membersId":175904,"dateAdded":"2023-04-30T16:14:21.000Z","lastUpdated":"2023-05-06T17:58:11.000Z","status":1,"totalPoints":193652,"rankingPoints":193652,"totalPass":40,"totalFc":16,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1393,"bracketLevel":435,"footswitchLevel":476,"jackLevel":507,"sideswitchLevel":490,"doublestepLevel":1154,"staminaLevel":413,"isBuddy":false,"preferences":"{\"discordId\":\"Matthew (LIGHTW8)#0378\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LIGHTW8","sex":"Male","profileImg":""},{"id":1200,"membersId":173427,"dateAdded":"2023-04-23T21:17:11.000Z","lastUpdated":"2023-05-01T15:06:59.000Z","status":1,"totalPoints":212797,"rankingPoints":192895,"totalPass":43,"totalFc":32,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":1737,"bracketLevel":229,"footswitchLevel":1049,"jackLevel":529,"sideswitchLevel":1018,"doublestepLevel":1464,"staminaLevel":168,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mingeh","sex":"Male","profileImg":""},{"id":827,"membersId":175512,"dateAdded":"2023-03-26T18:45:31.000Z","lastUpdated":"2023-05-06T23:59:33.000Z","status":1,"totalPoints":346061,"rankingPoints":192635,"totalPass":115,"totalFc":42,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":2773,"bracketLevel":828,"footswitchLevel":1496,"jackLevel":1136,"sideswitchLevel":968,"doublestepLevel":2182,"staminaLevel":397,"isBuddy":false,"preferences":"{\"discordId\":\"Galvanix#7170\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"X!!","sex":"Unspecified","profileImg":""},{"id":795,"membersId":175519,"dateAdded":"2023-03-25T19:00:31.000Z","lastUpdated":"2023-05-06T22:25:51.000Z","status":1,"totalPoints":210120,"rankingPoints":192170,"totalPass":72,"totalFc":13,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1376,"bracketLevel":735,"footswitchLevel":1018,"jackLevel":865,"sideswitchLevel":757,"doublestepLevel":1002,"staminaLevel":190,"isBuddy":false,"preferences":"{\"discordId\":\"rustbelt#2311\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BigDoomsday","sex":"Unspecified","profileImg":""},{"id":69,"membersId":173053,"dateAdded":"2023-03-18T21:49:56.000Z","lastUpdated":"2023-05-06T11:40:15.000Z","status":1,"totalPoints":298331,"rankingPoints":191957,"totalPass":101,"totalFc":39,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":2558,"bracketLevel":581,"footswitchLevel":1359,"jackLevel":849,"sideswitchLevel":783,"doublestepLevel":2076,"staminaLevel":199,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"andr","sex":"Male","profileImg":"https://i.imgur.com/WBR07HP.png"},{"id":158,"membersId":4290,"dateAdded":"2023-03-18T22:23:23.000Z","lastUpdated":"2023-05-01T15:07:36.000Z","status":1,"totalPoints":202384,"rankingPoints":191725,"totalPass":54,"totalFc":20,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":1370,"bracketLevel":729,"footswitchLevel":857,"jackLevel":582,"sideswitchLevel":658,"doublestepLevel":1033,"staminaLevel":215,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ROBIJO","sex":"Male","profileImg":""},{"id":559,"membersId":174280,"dateAdded":"2023-03-20T23:22:08.000Z","lastUpdated":"2023-05-03T04:07:16.000Z","status":1,"totalPoints":232763,"rankingPoints":190843,"totalPass":91,"totalFc":10,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1517,"bracketLevel":587,"footswitchLevel":1068,"jackLevel":544,"sideswitchLevel":1162,"doublestepLevel":1341,"staminaLevel":264,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Falty No Bar","sex":"Male","profileImg":""},{"id":483,"membersId":175406,"dateAdded":"2023-03-20T06:56:09.000Z","lastUpdated":"2023-05-06T08:32:53.000Z","status":1,"totalPoints":409425,"rankingPoints":189975,"totalPass":137,"totalFc":75,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":2781,"bracketLevel":1343,"footswitchLevel":1893,"jackLevel":1491,"sideswitchLevel":1450,"doublestepLevel":2100,"staminaLevel":551,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HeavyModeYT","sex":"Male","profileImg":""},{"id":582,"membersId":173411,"dateAdded":"2023-03-21T05:14:41.000Z","lastUpdated":"2023-05-04T04:25:55.000Z","status":1,"totalPoints":189333,"rankingPoints":189333,"totalPass":49,"totalFc":11,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":1099,"bracketLevel":559,"footswitchLevel":1003,"jackLevel":450,"sideswitchLevel":666,"doublestepLevel":773,"staminaLevel":416,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ladymolii","sex":"Female","profileImg":"https://i.imgur.com/MIhkyHn.png"},{"id":855,"membersId":162522,"dateAdded":"2023-03-27T14:48:45.000Z","lastUpdated":"2023-05-04T13:21:00.000Z","status":1,"totalPoints":296386,"rankingPoints":189142,"totalPass":153,"totalFc":11,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1830,"bracketLevel":687,"footswitchLevel":1211,"jackLevel":958,"sideswitchLevel":598,"doublestepLevel":1300,"staminaLevel":638,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XFN","sex":"Male","profileImg":""},{"id":315,"membersId":108801,"dateAdded":"2023-03-19T05:34:28.000Z","lastUpdated":"2023-05-06T19:13:19.000Z","status":1,"totalPoints":189062,"rankingPoints":189062,"totalPass":61,"totalFc":9,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":923,"bracketLevel":700,"footswitchLevel":850,"jackLevel":796,"sideswitchLevel":883,"doublestepLevel":755,"staminaLevel":463,"isBuddy":false,"preferences":"{\"discordId\":\"Mango#3286\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mango","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/186564849986306049/730111105170407584/bubblecat.png"},{"id":802,"membersId":175522,"dateAdded":"2023-03-25T22:52:00.000Z","lastUpdated":"2023-05-06T23:59:03.000Z","status":1,"totalPoints":266048,"rankingPoints":188964,"totalPass":96,"totalFc":26,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":2117,"bracketLevel":671,"footswitchLevel":1325,"jackLevel":938,"sideswitchLevel":1044,"doublestepLevel":1641,"staminaLevel":217,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jagc","sex":"Female","profileImg":""},{"id":358,"membersId":103169,"dateAdded":"2023-03-19T15:41:02.000Z","lastUpdated":"2023-05-05T03:34:56.000Z","status":1,"totalPoints":214161,"rankingPoints":188552,"totalPass":35,"totalFc":26,"totalFec":37,"totalQuad":1,"totalQuint":0,"crossoverLevel":1862,"bracketLevel":603,"footswitchLevel":1054,"jackLevel":708,"sideswitchLevel":378,"doublestepLevel":1456,"staminaLevel":148,"isBuddy":false,"preferences":"{\"discordId\":\"thomas_grover#1727\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nabulator","sex":"Unspecified","profileImg":"https://nabulator.com/favicon.png"},{"id":177,"membersId":173476,"dateAdded":"2023-03-18T22:40:35.000Z","lastUpdated":"2023-05-07T04:34:28.000Z","status":1,"totalPoints":382659,"rankingPoints":187544,"totalPass":166,"totalFc":37,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":2504,"bracketLevel":1089,"footswitchLevel":1719,"jackLevel":1303,"sideswitchLevel":1404,"doublestepLevel":1957,"staminaLevel":697,"isBuddy":false,"preferences":"{\"discordId\":\"Hewhoamareismyself#9711\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Hewhoamareismyself","sex":"Male","profileImg":"https://i.imgur.com/n135fGw.png"},{"id":31,"membersId":75808,"dateAdded":"2023-03-18T21:48:56.000Z","lastUpdated":"2023-05-05T21:07:52.000Z","status":1,"totalPoints":272936,"rankingPoints":187508,"totalPass":109,"totalFc":12,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1828,"bracketLevel":983,"footswitchLevel":1448,"jackLevel":1037,"sideswitchLevel":1138,"doublestepLevel":1825,"staminaLevel":289,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"plight","sex":"Unspecified","profileImg":"https://media.discordapp.net/attachments/735878663643463731/957330508684091412/11.png"},{"id":758,"membersId":175166,"dateAdded":"2023-03-25T01:43:59.000Z","lastUpdated":"2023-04-13T23:34:55.000Z","status":1,"totalPoints":232400,"rankingPoints":187101,"totalPass":80,"totalFc":23,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1921,"bracketLevel":568,"footswitchLevel":978,"jackLevel":492,"sideswitchLevel":747,"doublestepLevel":1432,"staminaLevel":150,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sydia","sex":"Unspecified","profileImg":""},{"id":658,"membersId":75719,"dateAdded":"2023-03-22T17:04:17.000Z","lastUpdated":"2023-05-03T17:53:16.000Z","status":1,"totalPoints":218634,"rankingPoints":186144,"totalPass":86,"totalFc":12,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":950,"bracketLevel":605,"footswitchLevel":916,"jackLevel":457,"sideswitchLevel":561,"doublestepLevel":925,"staminaLevel":1189,"isBuddy":false,"preferences":"{\"discordId\":\"hegza#4088\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"hegza","sex":"Unspecified","profileImg":""},{"id":1021,"membersId":175703,"dateAdded":"2023-04-05T05:47:24.000Z","lastUpdated":"2023-05-01T20:40:26.000Z","status":1,"totalPoints":185657,"rankingPoints":185657,"totalPass":26,"totalFc":15,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":771,"bracketLevel":1273,"footswitchLevel":1078,"jackLevel":592,"sideswitchLevel":486,"doublestepLevel":919,"staminaLevel":533,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"p0x","sex":"Unspecified","profileImg":""},{"id":362,"membersId":175388,"dateAdded":"2023-03-19T16:07:48.000Z","lastUpdated":"2023-05-05T20:57:09.000Z","status":1,"totalPoints":253278,"rankingPoints":183890,"totalPass":65,"totalFc":27,"totalFec":32,"totalQuad":0,"totalQuint":0,"crossoverLevel":2335,"bracketLevel":373,"footswitchLevel":762,"jackLevel":843,"sideswitchLevel":591,"doublestepLevel":1512,"staminaLevel":253,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Landius","sex":"Male","profileImg":""},{"id":657,"membersId":173817,"dateAdded":"2023-03-22T17:04:09.000Z","lastUpdated":"2023-05-06T17:09:01.000Z","status":1,"totalPoints":356673,"rankingPoints":183414,"totalPass":180,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1970,"bracketLevel":1043,"footswitchLevel":1497,"jackLevel":1251,"sideswitchLevel":1376,"doublestepLevel":1468,"staminaLevel":1037,"isBuddy":false,"preferences":"{\"discordId\":\"Hasse#6805\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hasse","sex":"Unspecified","profileImg":""},{"id":1227,"membersId":75742,"dateAdded":"2023-04-27T03:04:30.000Z","lastUpdated":"2023-05-05T07:53:13.000Z","status":1,"totalPoints":204498,"rankingPoints":180680,"totalPass":53,"totalFc":31,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":1594,"bracketLevel":416,"footswitchLevel":797,"jackLevel":455,"sideswitchLevel":761,"doublestepLevel":1041,"staminaLevel":140,"isBuddy":false,"preferences":"{\"discordId\":\"Zepherino#4766\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Zepherino","sex":"Male","profileImg":""},{"id":248,"membersId":175368,"dateAdded":"2023-03-19T01:07:36.000Z","lastUpdated":"2023-04-30T04:03:39.000Z","status":1,"totalPoints":180021,"rankingPoints":180021,"totalPass":44,"totalFc":10,"totalFec":19,"totalQuad":1,"totalQuint":0,"crossoverLevel":1335,"bracketLevel":368,"footswitchLevel":804,"jackLevel":383,"sideswitchLevel":435,"doublestepLevel":997,"staminaLevel":76,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KINDLADY","sex":"Unspecified","profileImg":""},{"id":659,"membersId":1981,"dateAdded":"2023-03-22T17:36:56.000Z","lastUpdated":"2023-04-19T03:27:46.000Z","status":1,"totalPoints":232224,"rankingPoints":179880,"totalPass":88,"totalFc":15,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":1856,"bracketLevel":484,"footswitchLevel":952,"jackLevel":689,"sideswitchLevel":485,"doublestepLevel":1285,"staminaLevel":259,"isBuddy":false,"preferences":"{\"discordId\":\"GospelEXE#1989\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"GospelEXE","sex":"Male","profileImg":""},{"id":887,"membersId":175572,"dateAdded":"2023-03-29T01:17:19.000Z","lastUpdated":"2023-04-21T22:15:59.000Z","status":1,"totalPoints":179560,"rankingPoints":179560,"totalPass":26,"totalFc":11,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":1176,"bracketLevel":428,"footswitchLevel":437,"jackLevel":723,"sideswitchLevel":522,"doublestepLevel":943,"staminaLevel":249,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"rkataoka","sex":"Unspecified","profileImg":""},{"id":602,"membersId":173081,"dateAdded":"2023-03-21T18:07:44.000Z","lastUpdated":"2023-05-04T20:18:03.000Z","status":1,"totalPoints":178769,"rankingPoints":178769,"totalPass":40,"totalFc":7,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":986,"bracketLevel":774,"footswitchLevel":854,"jackLevel":766,"sideswitchLevel":330,"doublestepLevel":863,"staminaLevel":487,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sessu","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/278701244216901633/5f87f703a96dcb66c2fe513031c4b1ad.jpg"},{"id":552,"membersId":174972,"dateAdded":"2023-03-20T22:27:07.000Z","lastUpdated":"2023-05-02T03:43:11.000Z","status":1,"totalPoints":178686,"rankingPoints":178686,"totalPass":46,"totalFc":19,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":971,"bracketLevel":551,"footswitchLevel":648,"jackLevel":218,"sideswitchLevel":559,"doublestepLevel":1086,"staminaLevel":629,"isBuddy":true,"preferences":"{\"discordId\":\"AlexCilantro#5506\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AlexCilantro","sex":"Male","profileImg":""},{"id":776,"membersId":55445,"dateAdded":"2023-03-25T12:52:56.000Z","lastUpdated":"2023-05-04T18:56:07.000Z","status":1,"totalPoints":226993,"rankingPoints":178592,"totalPass":65,"totalFc":54,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1734,"bracketLevel":486,"footswitchLevel":964,"jackLevel":706,"sideswitchLevel":652,"doublestepLevel":1147,"staminaLevel":581,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NekoMithos","sex":"Unspecified","profileImg":"https://i.gyazo.com/a4d5a11d1b56019297a7c655d78b6cde.png"},{"id":218,"membersId":165796,"dateAdded":"2023-03-19T00:11:42.000Z","lastUpdated":"2023-05-05T23:08:16.000Z","status":1,"totalPoints":178044,"rankingPoints":178044,"totalPass":12,"totalFc":4,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":231,"bracketLevel":534,"footswitchLevel":477,"jackLevel":252,"sideswitchLevel":355,"doublestepLevel":176,"staminaLevel":1927,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Caji123","sex":"Male","profileImg":""},{"id":445,"membersId":173907,"dateAdded":"2023-03-20T00:07:09.000Z","lastUpdated":"2023-05-06T23:59:04.000Z","status":1,"totalPoints":258535,"rankingPoints":177926,"totalPass":103,"totalFc":28,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":2237,"bracketLevel":678,"footswitchLevel":1290,"jackLevel":848,"sideswitchLevel":959,"doublestepLevel":1520,"staminaLevel":175,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Tuto","sex":"Male","profileImg":""},{"id":517,"membersId":78689,"dateAdded":"2023-03-20T18:18:42.000Z","lastUpdated":"2023-05-02T00:29:45.000Z","status":1,"totalPoints":177547,"rankingPoints":177547,"totalPass":15,"totalFc":9,"totalFec":26,"totalQuad":8,"totalQuint":0,"crossoverLevel":1123,"bracketLevel":680,"footswitchLevel":664,"jackLevel":432,"sideswitchLevel":509,"doublestepLevel":1537,"staminaLevel":190,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Darkuo ","sex":"Male","profileImg":""},{"id":62,"membersId":165750,"dateAdded":"2023-03-18T21:49:46.000Z","lastUpdated":"2023-05-03T19:37:37.000Z","status":1,"totalPoints":346624,"rankingPoints":176856,"totalPass":171,"totalFc":13,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":2333,"bracketLevel":1148,"footswitchLevel":1756,"jackLevel":1301,"sideswitchLevel":1703,"doublestepLevel":1881,"staminaLevel":429,"isBuddy":false,"preferences":"{\"discordId\":\"Mayflower#4000\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Sex","sex":"Unspecified","profileImg":"https://mayf.pink/image.png"},{"id":847,"membersId":175544,"dateAdded":"2023-03-27T00:20:39.000Z","lastUpdated":"2023-04-24T01:43:45.000Z","status":1,"totalPoints":175595,"rankingPoints":175595,"totalPass":27,"totalFc":13,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":977,"bracketLevel":432,"footswitchLevel":899,"jackLevel":1043,"sideswitchLevel":1121,"doublestepLevel":755,"staminaLevel":393,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"piguy314159","sex":"Male","profileImg":""},{"id":560,"membersId":66704,"dateAdded":"2023-03-20T23:26:21.000Z","lastUpdated":"2023-04-25T23:46:43.000Z","status":1,"totalPoints":175575,"rankingPoints":175575,"totalPass":22,"totalFc":7,"totalFec":9,"totalQuad":2,"totalQuint":0,"crossoverLevel":775,"bracketLevel":549,"footswitchLevel":981,"jackLevel":385,"sideswitchLevel":1049,"doublestepLevel":953,"staminaLevel":377,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FideLin","sex":"Male","profileImg":""},{"id":1052,"membersId":175757,"dateAdded":"2023-04-07T20:32:01.000Z","lastUpdated":"2023-05-06T22:33:02.000Z","status":1,"totalPoints":173991,"rankingPoints":173991,"totalPass":36,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":562,"bracketLevel":716,"footswitchLevel":732,"jackLevel":429,"sideswitchLevel":549,"doublestepLevel":803,"staminaLevel":731,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kriss","sex":"Male","profileImg":""},{"id":568,"membersId":175417,"dateAdded":"2023-03-21T01:05:21.000Z","lastUpdated":"2023-05-06T01:34:52.000Z","status":1,"totalPoints":292113,"rankingPoints":173885,"totalPass":156,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2065,"bracketLevel":722,"footswitchLevel":1337,"jackLevel":1061,"sideswitchLevel":829,"doublestepLevel":1583,"staminaLevel":374,"isBuddy":false,"preferences":"{\"discordId\":\"Sexy Mustard#5987\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sexymustard","sex":"Male","profileImg":"https://i.imgur.com/s3XUfaH.png"},{"id":86,"membersId":76988,"dateAdded":"2023-03-18T21:51:01.000Z","lastUpdated":"2023-04-22T19:39:06.000Z","status":1,"totalPoints":173855,"rankingPoints":173855,"totalPass":48,"totalFc":14,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1152,"bracketLevel":757,"footswitchLevel":1278,"jackLevel":731,"sideswitchLevel":1667,"doublestepLevel":907,"staminaLevel":286,"isBuddy":false,"preferences":"{\"discordId\":\"lugi#4362\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"1ug1a","sex":"Unspecified","profileImg":"https://media.discordapp.net/attachments/615272349335420968/850073257960931388/hm_icon_Custom_2.png"},{"id":159,"membersId":134541,"dateAdded":"2023-03-18T22:24:02.000Z","lastUpdated":"2023-04-20T00:15:10.000Z","status":1,"totalPoints":187056,"rankingPoints":173677,"totalPass":68,"totalFc":23,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1320,"bracketLevel":609,"footswitchLevel":977,"jackLevel":633,"sideswitchLevel":1078,"doublestepLevel":811,"staminaLevel":166,"isBuddy":false,"preferences":"{\"discordId\":\"DJPandaga#9320\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DJPandaga","sex":"Male","profileImg":"https://i.imgur.com/UOYlyEB.png"},{"id":72,"membersId":160,"dateAdded":"2023-03-18T21:50:08.000Z","lastUpdated":"2023-05-02T04:23:22.000Z","status":1,"totalPoints":212965,"rankingPoints":172484,"totalPass":85,"totalFc":21,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1439,"bracketLevel":554,"footswitchLevel":1022,"jackLevel":650,"sideswitchLevel":512,"doublestepLevel":1335,"staminaLevel":143,"isBuddy":false,"preferences":"{\"discordId\":\"Dexor#0747\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dexor","sex":"Male","profileImg":""},{"id":313,"membersId":173150,"dateAdded":"2023-03-19T05:33:32.000Z","lastUpdated":"2023-05-04T00:46:01.000Z","status":1,"totalPoints":269556,"rankingPoints":172186,"totalPass":143,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1865,"bracketLevel":402,"footswitchLevel":1129,"jackLevel":878,"sideswitchLevel":1130,"doublestepLevel":1469,"staminaLevel":459,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sage of flowers","sex":"Unspecified","profileImg":"https://media.discordapp.net/attachments/1002155956639109143/1086980785908760706/gs.png"},{"id":1073,"membersId":135709,"dateAdded":"2023-04-09T19:40:59.000Z","lastUpdated":"2023-05-02T05:18:27.000Z","status":1,"totalPoints":238391,"rankingPoints":171531,"totalPass":51,"totalFc":82,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1780,"bracketLevel":737,"footswitchLevel":1035,"jackLevel":664,"sideswitchLevel":581,"doublestepLevel":1422,"staminaLevel":226,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sbuxsurg","sex":"Male","profileImg":""},{"id":456,"membersId":175283,"dateAdded":"2023-03-20T01:35:39.000Z","lastUpdated":"2023-04-29T04:18:38.000Z","status":1,"totalPoints":180173,"rankingPoints":171372,"totalPass":27,"totalFc":21,"totalFec":45,"totalQuad":1,"totalQuint":0,"crossoverLevel":1437,"bracketLevel":426,"footswitchLevel":795,"jackLevel":911,"sideswitchLevel":660,"doublestepLevel":1123,"staminaLevel":161,"isBuddy":false,"preferences":"{\"discordId\":\"ArrowsmithBA3!#0907\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ArrowsmithWordWizardBA3","sex":"Male","profileImg":""},{"id":525,"membersId":3090,"dateAdded":"2023-03-20T19:13:43.000Z","lastUpdated":"2023-04-21T01:51:42.000Z","status":1,"totalPoints":187308,"rankingPoints":170859,"totalPass":27,"totalFc":22,"totalFec":38,"totalQuad":3,"totalQuint":0,"crossoverLevel":2076,"bracketLevel":216,"footswitchLevel":696,"jackLevel":388,"sideswitchLevel":149,"doublestepLevel":1119,"staminaLevel":38,"isBuddy":false,"preferences":"{\"discordId\":\"m0n0lyth#6936\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HF230","sex":"Male","profileImg":""},{"id":903,"membersId":175565,"dateAdded":"2023-03-29T18:57:34.000Z","lastUpdated":"2023-05-07T04:48:10.000Z","status":1,"totalPoints":230872,"rankingPoints":170643,"totalPass":80,"totalFc":54,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1852,"bracketLevel":592,"footswitchLevel":950,"jackLevel":773,"sideswitchLevel":628,"doublestepLevel":1568,"staminaLevel":267,"isBuddy":false,"preferences":"{\"discordId\":\"QTurtle#1482\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"QTurtle","sex":"Female","profileImg":""},{"id":306,"membersId":175382,"dateAdded":"2023-03-19T04:43:52.000Z","lastUpdated":"2023-05-01T22:51:46.000Z","status":1,"totalPoints":187673,"rankingPoints":170268,"totalPass":55,"totalFc":29,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1536,"bracketLevel":395,"footswitchLevel":863,"jackLevel":407,"sideswitchLevel":172,"doublestepLevel":928,"staminaLevel":243,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"UPI","sex":"Female","profileImg":""},{"id":1009,"membersId":175697,"dateAdded":"2023-04-04T16:57:28.000Z","lastUpdated":"2023-05-06T17:39:43.000Z","status":1,"totalPoints":208804,"rankingPoints":169859,"totalPass":74,"totalFc":36,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":1673,"bracketLevel":467,"footswitchLevel":827,"jackLevel":337,"sideswitchLevel":176,"doublestepLevel":1341,"staminaLevel":240,"isBuddy":false,"preferences":"{\"discordId\":\"F10W#5769\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"F10W","sex":"Male","profileImg":""},{"id":1107,"membersId":173467,"dateAdded":"2023-04-12T18:51:44.000Z","lastUpdated":"2023-04-28T22:41:12.000Z","status":1,"totalPoints":169859,"rankingPoints":169859,"totalPass":61,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":961,"bracketLevel":206,"footswitchLevel":912,"jackLevel":897,"sideswitchLevel":410,"doublestepLevel":1090,"staminaLevel":225,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Okepa Makoi","sex":"Unspecified","profileImg":""},{"id":11,"membersId":173184,"dateAdded":"2023-03-18T21:48:30.000Z","lastUpdated":"2023-05-06T21:05:42.000Z","status":1,"totalPoints":200613,"rankingPoints":169556,"totalPass":96,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1089,"bracketLevel":469,"footswitchLevel":1051,"jackLevel":929,"sideswitchLevel":591,"doublestepLevel":1202,"staminaLevel":365,"isBuddy":false,"preferences":"{\"discordId\":\"Maybell Eigenhart (& co.) 🌻#4859\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maybell Eigenhart","sex":"Female","profileImg":"https://i.imgur.com/uZKJzLL.png"},{"id":519,"membersId":6555,"dateAdded":"2023-03-20T18:31:37.000Z","lastUpdated":"2023-03-23T00:38:20.000Z","status":1,"totalPoints":169255,"rankingPoints":169255,"totalPass":45,"totalFc":3,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1024,"bracketLevel":504,"footswitchLevel":898,"jackLevel":375,"sideswitchLevel":685,"doublestepLevel":911,"staminaLevel":169,"isBuddy":false,"preferences":"{\"discordId\":\"werdwerdus#2020\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"werdwerdus","sex":"Male","profileImg":""},{"id":176,"membersId":94669,"dateAdded":"2023-03-18T22:38:33.000Z","lastUpdated":"2023-05-01T01:34:34.000Z","status":1,"totalPoints":168994,"rankingPoints":168994,"totalPass":22,"totalFc":3,"totalFec":12,"totalQuad":11,"totalQuint":0,"crossoverLevel":867,"bracketLevel":603,"footswitchLevel":894,"jackLevel":176,"sideswitchLevel":406,"doublestepLevel":1012,"staminaLevel":252,"isBuddy":false,"preferences":"{\"discordId\":\"pimentaw#3615\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pimentaw","sex":"Male","profileImg":""},{"id":1168,"membersId":175905,"dateAdded":"2023-04-19T22:07:06.000Z","lastUpdated":"2023-05-06T00:34:28.000Z","status":1,"totalPoints":168412,"rankingPoints":168412,"totalPass":29,"totalFc":15,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":962,"bracketLevel":390,"footswitchLevel":802,"jackLevel":858,"sideswitchLevel":1021,"doublestepLevel":797,"staminaLevel":343,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ultrabosh64","sex":"Male","profileImg":""},{"id":824,"membersId":175537,"dateAdded":"2023-03-26T16:23:37.000Z","lastUpdated":"2023-04-23T17:29:44.000Z","status":1,"totalPoints":178144,"rankingPoints":168302,"totalPass":62,"totalFc":21,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1304,"bracketLevel":274,"footswitchLevel":726,"jackLevel":671,"sideswitchLevel":301,"doublestepLevel":1201,"staminaLevel":152,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lorena","sex":"Female","profileImg":""},{"id":575,"membersId":155296,"dateAdded":"2023-03-21T03:13:28.000Z","lastUpdated":"2023-04-22T14:58:13.000Z","status":1,"totalPoints":194562,"rankingPoints":168262,"totalPass":63,"totalFc":27,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":1611,"bracketLevel":517,"footswitchLevel":1061,"jackLevel":553,"sideswitchLevel":369,"doublestepLevel":1275,"staminaLevel":108,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lafv54","sex":"Male","profileImg":""},{"id":757,"membersId":173342,"dateAdded":"2023-03-25T01:39:43.000Z","lastUpdated":"2023-05-06T01:00:54.000Z","status":1,"totalPoints":178401,"rankingPoints":167104,"totalPass":23,"totalFc":25,"totalFec":28,"totalQuad":10,"totalQuint":0,"crossoverLevel":1894,"bracketLevel":268,"footswitchLevel":943,"jackLevel":130,"sideswitchLevel":522,"doublestepLevel":1176,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"N30S","sex":"Male","profileImg":""},{"id":96,"membersId":173453,"dateAdded":"2023-03-18T21:52:39.000Z","lastUpdated":"2023-05-05T20:08:20.000Z","status":1,"totalPoints":217201,"rankingPoints":166743,"totalPass":54,"totalFc":51,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":2128,"bracketLevel":322,"footswitchLevel":1053,"jackLevel":670,"sideswitchLevel":339,"doublestepLevel":1391,"staminaLevel":108,"isBuddy":false,"preferences":"{\"discordId\":\"Kikoia#3996\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kikoia","sex":"Female","profileImg":"https://i.imgur.com/KCsbDb7.png"},{"id":209,"membersId":174860,"dateAdded":"2023-03-18T23:43:53.000Z","lastUpdated":"2023-05-05T00:20:54.000Z","status":1,"totalPoints":331573,"rankingPoints":166432,"totalPass":159,"totalFc":37,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2384,"bracketLevel":1006,"footswitchLevel":1440,"jackLevel":1155,"sideswitchLevel":1260,"doublestepLevel":1900,"staminaLevel":375,"isBuddy":false,"preferences":"{\"discordId\":\"Adamskull#7852\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Adamskull","sex":"Male","profileImg":"https://i.imgur.com/f0Wo8t6.png"},{"id":766,"membersId":66295,"dateAdded":"2023-03-25T04:46:04.000Z","lastUpdated":"2023-04-14T23:38:49.000Z","status":1,"totalPoints":166197,"rankingPoints":166197,"totalPass":16,"totalFc":7,"totalFec":9,"totalQuad":2,"totalQuint":0,"crossoverLevel":792,"bracketLevel":770,"footswitchLevel":1048,"jackLevel":629,"sideswitchLevel":762,"doublestepLevel":929,"staminaLevel":355,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Liam","sex":"Male","profileImg":""},{"id":535,"membersId":175135,"dateAdded":"2023-03-20T19:42:56.000Z","lastUpdated":"2023-05-07T01:30:51.000Z","status":1,"totalPoints":168752,"rankingPoints":165503,"totalPass":48,"totalFc":21,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1114,"bracketLevel":312,"footswitchLevel":739,"jackLevel":379,"sideswitchLevel":492,"doublestepLevel":1050,"staminaLevel":395,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ToastyPenguin","sex":"Male","profileImg":""},{"id":712,"membersId":173179,"dateAdded":"2023-03-24T00:17:12.000Z","lastUpdated":"2023-04-23T17:29:45.000Z","status":1,"totalPoints":195690,"rankingPoints":165480,"totalPass":87,"totalFc":14,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1216,"bracketLevel":399,"footswitchLevel":855,"jackLevel":757,"sideswitchLevel":527,"doublestepLevel":1191,"staminaLevel":258,"isBuddy":false,"preferences":"{\"discordId\":\"frondal#8937\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Frondal","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/955183583037886474/1104599622640488559/pip.png"},{"id":22,"membersId":173546,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-05-06T18:22:15.000Z","status":1,"totalPoints":242761,"rankingPoints":165197,"totalPass":103,"totalFc":26,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1772,"bracketLevel":915,"footswitchLevel":1301,"jackLevel":833,"sideswitchLevel":866,"doublestepLevel":1539,"staminaLevel":284,"isBuddy":false,"preferences":"{\"discordId\":\"Piols#6625\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Piols","sex":"Male","profileImg":"https://i.imgur.com/qIFAoGo.png"},{"id":331,"membersId":75645,"dateAdded":"2023-03-19T10:06:03.000Z","lastUpdated":"2023-05-06T16:06:56.000Z","status":1,"totalPoints":163344,"rankingPoints":163344,"totalPass":25,"totalFc":13,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":848,"bracketLevel":926,"footswitchLevel":764,"jackLevel":413,"sideswitchLevel":293,"doublestepLevel":473,"staminaLevel":545,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"byron","sex":"Male","profileImg":"https://sil.fyi/content/files/dp-128.png"},{"id":861,"membersId":173097,"dateAdded":"2023-03-27T22:50:07.000Z","lastUpdated":"2023-05-06T16:23:59.000Z","status":1,"totalPoints":233159,"rankingPoints":162721,"totalPass":118,"totalFc":21,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1688,"bracketLevel":362,"footswitchLevel":960,"jackLevel":537,"sideswitchLevel":468,"doublestepLevel":1310,"staminaLevel":467,"isBuddy":false,"preferences":"{\"discordId\":\"Ambisinister#1823\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ambisinister","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/624587741448110080/CUVQMsjP_400x400.png"},{"id":621,"membersId":175430,"dateAdded":"2023-03-21T22:22:59.000Z","lastUpdated":"2023-05-06T02:10:30.000Z","status":1,"totalPoints":216341,"rankingPoints":162460,"totalPass":101,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1473,"bracketLevel":388,"footswitchLevel":781,"jackLevel":801,"sideswitchLevel":628,"doublestepLevel":1221,"staminaLevel":249,"isBuddy":false,"preferences":"{\"discordId\":\"Unpronounceable#7667\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Unpronounceable","sex":"Male","profileImg":""},{"id":419,"membersId":175268,"dateAdded":"2023-03-19T20:43:46.000Z","lastUpdated":"2023-04-30T20:23:42.000Z","status":1,"totalPoints":162147,"rankingPoints":162147,"totalPass":32,"totalFc":12,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":1091,"bracketLevel":456,"footswitchLevel":509,"jackLevel":624,"sideswitchLevel":800,"doublestepLevel":515,"staminaLevel":273,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Litter*","sex":"Unspecified","profileImg":""},{"id":722,"membersId":163400,"dateAdded":"2023-03-24T02:55:40.000Z","lastUpdated":"2023-04-30T02:59:34.000Z","status":1,"totalPoints":162103,"rankingPoints":162103,"totalPass":33,"totalFc":1,"totalFec":3,"totalQuad":2,"totalQuint":0,"crossoverLevel":447,"bracketLevel":653,"footswitchLevel":477,"jackLevel":582,"sideswitchLevel":328,"doublestepLevel":356,"staminaLevel":1131,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"t3a","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/635721838139408388/850201977832603708/Avatar-small.png"},{"id":153,"membersId":31568,"dateAdded":"2023-03-18T22:18:57.000Z","lastUpdated":"2023-05-06T22:48:17.000Z","status":1,"totalPoints":178987,"rankingPoints":162089,"totalPass":54,"totalFc":33,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":1479,"bracketLevel":510,"footswitchLevel":614,"jackLevel":275,"sideswitchLevel":232,"doublestepLevel":1309,"staminaLevel":82,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xapa","sex":"Male","profileImg":""},{"id":7,"membersId":173229,"dateAdded":"2023-03-18T21:48:21.000Z","lastUpdated":"2023-04-17T03:40:53.000Z","status":1,"totalPoints":160502,"rankingPoints":160502,"totalPass":29,"totalFc":10,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":440,"bracketLevel":1458,"footswitchLevel":868,"jackLevel":790,"sideswitchLevel":604,"doublestepLevel":993,"staminaLevel":288,"isBuddy":false,"preferences":"{\"discordId\":\"bkirz#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bkirz","sex":"Male","profileImg":""},{"id":403,"membersId":175395,"dateAdded":"2023-03-19T19:39:46.000Z","lastUpdated":"2023-04-21T20:40:17.000Z","status":1,"totalPoints":160430,"rankingPoints":160430,"totalPass":53,"totalFc":18,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1060,"bracketLevel":397,"footswitchLevel":541,"jackLevel":517,"sideswitchLevel":215,"doublestepLevel":587,"staminaLevel":373,"isBuddy":false,"preferences":"{\"discordId\":\"bap#9999\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bap","sex":"Male","profileImg":""},{"id":1066,"membersId":66688,"dateAdded":"2023-04-09T00:44:19.000Z","lastUpdated":"2023-04-21T21:46:15.000Z","status":1,"totalPoints":159469,"rankingPoints":159469,"totalPass":8,"totalFc":5,"totalFec":16,"totalQuad":2,"totalQuint":0,"crossoverLevel":418,"bracketLevel":926,"footswitchLevel":674,"jackLevel":571,"sideswitchLevel":460,"doublestepLevel":595,"staminaLevel":419,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FRNKODEV","sex":"Male","profileImg":""},{"id":808,"membersId":175525,"dateAdded":"2023-03-25T23:35:01.000Z","lastUpdated":"2023-05-05T01:06:45.000Z","status":1,"totalPoints":226707,"rankingPoints":158924,"totalPass":71,"totalFc":48,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":2109,"bracketLevel":443,"footswitchLevel":928,"jackLevel":706,"sideswitchLevel":551,"doublestepLevel":1389,"staminaLevel":133,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ohbi","sex":"Female","profileImg":""},{"id":1114,"membersId":175819,"dateAdded":"2023-04-13T01:29:33.000Z","lastUpdated":"2023-05-04T04:23:31.000Z","status":1,"totalPoints":157920,"rankingPoints":157920,"totalPass":40,"totalFc":11,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1550,"bracketLevel":351,"footswitchLevel":716,"jackLevel":344,"sideswitchLevel":1034,"doublestepLevel":1146,"staminaLevel":168,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KonnorLetterBee","sex":"Unspecified","profileImg":""},{"id":234,"membersId":175375,"dateAdded":"2023-03-19T00:39:48.000Z","lastUpdated":"2023-05-02T01:44:09.000Z","status":1,"totalPoints":156296,"rankingPoints":156296,"totalPass":55,"totalFc":6,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":926,"bracketLevel":487,"footswitchLevel":552,"jackLevel":714,"sideswitchLevel":756,"doublestepLevel":809,"staminaLevel":310,"isBuddy":false,"preferences":"{\"discordId\":\"PizzaLovers007#0931\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PizzaLovers007","sex":"Male","profileImg":""},{"id":59,"membersId":173651,"dateAdded":"2023-03-18T21:49:33.000Z","lastUpdated":"2023-04-19T15:44:22.000Z","status":1,"totalPoints":224144,"rankingPoints":156072,"totalPass":136,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1611,"bracketLevel":761,"footswitchLevel":1237,"jackLevel":574,"sideswitchLevel":933,"doublestepLevel":1148,"staminaLevel":174,"isBuddy":false,"preferences":"{\"discordId\":\"Zydra#7489\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zydra","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/750387080932229212/1088857461374595205/zy250.png"},{"id":981,"membersId":76290,"dateAdded":"2023-04-02T21:54:52.000Z","lastUpdated":"2023-05-03T21:56:57.000Z","status":1,"totalPoints":189234,"rankingPoints":155915,"totalPass":61,"totalFc":30,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1977,"bracketLevel":281,"footswitchLevel":868,"jackLevel":352,"sideswitchLevel":429,"doublestepLevel":1366,"staminaLevel":50,"isBuddy":false,"preferences":"{\"discordId\":\"KawaiiFrijole#1337\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Brat","sex":"Female","profileImg":"https://i.imgur.com/UacEahP.png"},{"id":327,"membersId":173035,"dateAdded":"2023-03-19T09:08:34.000Z","lastUpdated":"2023-04-17T20:35:19.000Z","status":1,"totalPoints":171038,"rankingPoints":155342,"totalPass":38,"totalFc":17,"totalFec":33,"totalQuad":2,"totalQuint":0,"crossoverLevel":1647,"bracketLevel":312,"footswitchLevel":813,"jackLevel":444,"sideswitchLevel":65,"doublestepLevel":1051,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jkurs","sex":"Male","profileImg":"https://i.imgur.com/ATSlqP1.png"},{"id":1253,"membersId":132158,"dateAdded":"2023-04-30T15:21:43.000Z","lastUpdated":"2023-05-04T18:12:33.000Z","status":1,"totalPoints":155836,"rankingPoints":155075,"totalPass":53,"totalFc":20,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1066,"bracketLevel":446,"footswitchLevel":759,"jackLevel":346,"sideswitchLevel":513,"doublestepLevel":870,"staminaLevel":244,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kuboxxxxx","sex":"Male","profileImg":""},{"id":964,"membersId":4793,"dateAdded":"2023-04-01T22:20:44.000Z","lastUpdated":"2023-05-07T01:11:30.000Z","status":1,"totalPoints":153444,"rankingPoints":153444,"totalPass":37,"totalFc":5,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":905,"bracketLevel":459,"footswitchLevel":548,"jackLevel":515,"sideswitchLevel":878,"doublestepLevel":624,"staminaLevel":397,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TheTruck","sex":"Male","profileImg":""},{"id":119,"membersId":173211,"dateAdded":"2023-03-18T21:57:44.000Z","lastUpdated":"2023-05-07T02:21:04.000Z","status":1,"totalPoints":243176,"rankingPoints":153146,"totalPass":112,"totalFc":40,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1909,"bracketLevel":827,"footswitchLevel":1295,"jackLevel":679,"sideswitchLevel":904,"doublestepLevel":1642,"staminaLevel":186,"isBuddy":false,"preferences":"{\"discordId\":\"som1sezhi#6695\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"som1sezhi","sex":"Unspecified","profileImg":""},{"id":860,"membersId":168269,"dateAdded":"2023-03-27T21:25:53.000Z","lastUpdated":"2023-05-03T03:38:32.000Z","status":1,"totalPoints":152250,"rankingPoints":152250,"totalPass":20,"totalFc":9,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":795,"bracketLevel":920,"footswitchLevel":790,"jackLevel":525,"sideswitchLevel":289,"doublestepLevel":631,"staminaLevel":522,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Santiii","sex":"Male","profileImg":""},{"id":772,"membersId":175501,"dateAdded":"2023-03-25T09:21:38.000Z","lastUpdated":"2023-05-02T09:10:03.000Z","status":1,"totalPoints":168716,"rankingPoints":152220,"totalPass":76,"totalFc":17,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1214,"bracketLevel":335,"footswitchLevel":856,"jackLevel":254,"sideswitchLevel":907,"doublestepLevel":896,"staminaLevel":368,"isBuddy":false,"preferences":"{\"discordId\":\"DisGuy#4461\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DisGuy","sex":"Male","profileImg":""},{"id":451,"membersId":175402,"dateAdded":"2023-03-20T00:56:09.000Z","lastUpdated":"2023-05-05T22:15:13.000Z","status":1,"totalPoints":170040,"rankingPoints":151666,"totalPass":92,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1250,"bracketLevel":286,"footswitchLevel":815,"jackLevel":402,"sideswitchLevel":408,"doublestepLevel":1120,"staminaLevel":189,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BandiCat","sex":"Unspecified","profileImg":""},{"id":526,"membersId":175032,"dateAdded":"2023-03-20T19:15:10.000Z","lastUpdated":"2023-04-27T06:35:44.000Z","status":1,"totalPoints":165894,"rankingPoints":151420,"totalPass":81,"totalFc":10,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1194,"bracketLevel":426,"footswitchLevel":618,"jackLevel":532,"sideswitchLevel":716,"doublestepLevel":1356,"staminaLevel":119,"isBuddy":false,"preferences":"{\"discordId\":\"Siren#3333\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Siren","sex":"Unspecified","profileImg":"https://s2.narvii.com/image/mcvcwod4qoi3yxmx3ybsgm4nqutpwaxx_128.jpg"},{"id":503,"membersId":173358,"dateAdded":"2023-03-20T15:33:23.000Z","lastUpdated":"2023-04-19T17:57:32.000Z","status":1,"totalPoints":177086,"rankingPoints":150060,"totalPass":79,"totalFc":21,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1323,"bracketLevel":452,"footswitchLevel":961,"jackLevel":508,"sideswitchLevel":492,"doublestepLevel":928,"staminaLevel":116,"isBuddy":false,"preferences":"{\"discordId\":\"pumpuli#0050\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pumpuli","sex":"Unspecified","profileImg":""},{"id":67,"membersId":165906,"dateAdded":"2023-03-18T21:49:54.000Z","lastUpdated":"2023-05-06T02:32:34.000Z","status":1,"totalPoints":224238,"rankingPoints":150028,"totalPass":102,"totalFc":39,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1841,"bracketLevel":691,"footswitchLevel":1017,"jackLevel":553,"sideswitchLevel":539,"doublestepLevel":1476,"staminaLevel":167,"isBuddy":false,"preferences":"{\"discordId\":\"joshhead#5985\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"joshhead","sex":"Unspecified","profileImg":""},{"id":328,"membersId":173321,"dateAdded":"2023-03-19T09:31:02.000Z","lastUpdated":"2023-05-05T14:01:51.000Z","status":1,"totalPoints":149537,"rankingPoints":149537,"totalPass":54,"totalFc":6,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1050,"bracketLevel":481,"footswitchLevel":952,"jackLevel":488,"sideswitchLevel":592,"doublestepLevel":944,"staminaLevel":101,"isBuddy":false,"preferences":"{\"discordId\":\"Peli#2519\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Peli","sex":"Male","profileImg":""},{"id":744,"membersId":175486,"dateAdded":"2023-03-24T21:16:25.000Z","lastUpdated":"2023-05-05T23:46:07.000Z","status":1,"totalPoints":148808,"rankingPoints":148808,"totalPass":36,"totalFc":6,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":835,"bracketLevel":532,"footswitchLevel":870,"jackLevel":634,"sideswitchLevel":703,"doublestepLevel":709,"staminaLevel":222,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"EDJI","sex":"Male","profileImg":""},{"id":999,"membersId":175681,"dateAdded":"2023-04-04T00:33:55.000Z","lastUpdated":"2023-05-04T03:06:53.000Z","status":1,"totalPoints":216583,"rankingPoints":146486,"totalPass":102,"totalFc":35,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1830,"bracketLevel":682,"footswitchLevel":962,"jackLevel":670,"sideswitchLevel":600,"doublestepLevel":1317,"staminaLevel":118,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"hugh_jass","sex":"Unspecified","profileImg":""},{"id":439,"membersId":66376,"dateAdded":"2023-03-19T23:20:45.000Z","lastUpdated":"2023-05-06T04:10:12.000Z","status":1,"totalPoints":146324,"rankingPoints":146324,"totalPass":33,"totalFc":14,"totalFec":17,"totalQuad":0,"totalQuint":0,"crossoverLevel":1227,"bracketLevel":394,"footswitchLevel":602,"jackLevel":443,"sideswitchLevel":189,"doublestepLevel":883,"staminaLevel":131,"isBuddy":false,"preferences":"{\"discordId\":\"Boing#3479\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Boingloing","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/948169333661937664/YJo3IahD_bigger.jpg"},{"id":528,"membersId":175147,"dateAdded":"2023-03-20T19:21:05.000Z","lastUpdated":"2023-05-06T20:16:32.000Z","status":1,"totalPoints":178734,"rankingPoints":145372,"totalPass":66,"totalFc":38,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1575,"bracketLevel":262,"footswitchLevel":687,"jackLevel":343,"sideswitchLevel":152,"doublestepLevel":1140,"staminaLevel":88,"isBuddy":false,"preferences":"{\"discordId\":\"nathan!!#1312\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"9NATH9N","sex":"Unspecified","profileImg":"https://i.imgur.com/Sz6KNoZ.jpg"},{"id":872,"membersId":173160,"dateAdded":"2023-03-28T16:16:51.000Z","lastUpdated":"2023-05-03T01:39:12.000Z","status":1,"totalPoints":145777,"rankingPoints":144825,"totalPass":68,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1059,"bracketLevel":449,"footswitchLevel":839,"jackLevel":592,"sideswitchLevel":369,"doublestepLevel":1000,"staminaLevel":139,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Decoy","sex":"Unspecified","profileImg":""},{"id":1058,"membersId":175759,"dateAdded":"2023-04-08T07:44:00.000Z","lastUpdated":"2023-05-05T20:21:37.000Z","status":1,"totalPoints":153079,"rankingPoints":144683,"totalPass":22,"totalFc":47,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1618,"bracketLevel":300,"footswitchLevel":456,"jackLevel":361,"sideswitchLevel":108,"doublestepLevel":772,"staminaLevel":83,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"barjo69","sex":"Female","profileImg":""},{"id":891,"membersId":136487,"dateAdded":"2023-03-29T03:10:40.000Z","lastUpdated":"2023-05-05T22:26:25.000Z","status":1,"totalPoints":143640,"rankingPoints":143640,"totalPass":35,"totalFc":12,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1036,"bracketLevel":317,"footswitchLevel":618,"jackLevel":370,"sideswitchLevel":279,"doublestepLevel":960,"staminaLevel":331,"isBuddy":false,"preferences":"{\"discordId\":\"mxl100#7826\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mxl100","sex":"Female","profileImg":""},{"id":1082,"membersId":175779,"dateAdded":"2023-04-10T05:45:01.000Z","lastUpdated":"2023-05-03T10:18:56.000Z","status":1,"totalPoints":153683,"rankingPoints":143503,"totalPass":44,"totalFc":32,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1509,"bracketLevel":405,"footswitchLevel":652,"jackLevel":574,"sideswitchLevel":143,"doublestepLevel":1017,"staminaLevel":73,"isBuddy":false,"preferences":"{\"discordId\":\"Avalous#0573\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Avalous","sex":"Male","profileImg":""},{"id":179,"membersId":175367,"dateAdded":"2023-03-18T22:41:58.000Z","lastUpdated":"2023-05-06T22:30:28.000Z","status":1,"totalPoints":181694,"rankingPoints":141309,"totalPass":89,"totalFc":25,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1617,"bracketLevel":472,"footswitchLevel":942,"jackLevel":449,"sideswitchLevel":473,"doublestepLevel":1079,"staminaLevel":95,"isBuddy":false,"preferences":"{\"discordId\":\"Rufus#1868\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rufus","sex":"Male","profileImg":""},{"id":148,"membersId":135061,"dateAdded":"2023-03-18T22:14:07.000Z","lastUpdated":"2023-05-07T03:43:32.000Z","status":1,"totalPoints":140804,"rankingPoints":140804,"totalPass":36,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":460,"bracketLevel":275,"footswitchLevel":324,"jackLevel":658,"sideswitchLevel":130,"doublestepLevel":285,"staminaLevel":977,"isBuddy":false,"preferences":"{\"discordId\":\"airplane#8871\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"airplane","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/749406224365387837/987950518754238505/195-00.png"},{"id":49,"membersId":172895,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-04-03T02:44:31.000Z","status":1,"totalPoints":143759,"rankingPoints":140402,"totalPass":36,"totalFc":32,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":1398,"bracketLevel":391,"footswitchLevel":644,"jackLevel":373,"sideswitchLevel":166,"doublestepLevel":768,"staminaLevel":57,"isBuddy":false,"preferences":"{\"discordId\":\"Sekii#8008\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sekiirei","sex":"Female","profileImg":"https://i.gyazo.com/a0e21eb4239c5139544515656668c7c5.png"},{"id":182,"membersId":170939,"dateAdded":"2023-03-18T22:45:33.000Z","lastUpdated":"2023-04-26T03:59:41.000Z","status":1,"totalPoints":167278,"rankingPoints":139982,"totalPass":43,"totalFc":38,"totalFec":21,"totalQuad":0,"totalQuint":0,"crossoverLevel":1685,"bracketLevel":165,"footswitchLevel":488,"jackLevel":435,"sideswitchLevel":95,"doublestepLevel":958,"staminaLevel":58,"isBuddy":false,"preferences":"{\"discordId\":\"Cephiros#0039\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cephiros","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/900262872448376862/1087119220686463066/avt.png"},{"id":907,"membersId":175589,"dateAdded":"2023-03-29T21:19:00.000Z","lastUpdated":"2023-05-05T19:17:12.000Z","status":1,"totalPoints":167433,"rankingPoints":139538,"totalPass":89,"totalFc":17,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1527,"bracketLevel":168,"footswitchLevel":652,"jackLevel":519,"sideswitchLevel":291,"doublestepLevel":982,"staminaLevel":166,"isBuddy":false,"preferences":"{\"discordId\":\"crabigail#2824\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"crabigail","sex":"Female","profileImg":""},{"id":915,"membersId":172919,"dateAdded":"2023-03-30T02:10:52.000Z","lastUpdated":"2023-04-16T04:33:16.000Z","status":1,"totalPoints":139482,"rankingPoints":139482,"totalPass":21,"totalFc":12,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":574,"bracketLevel":888,"footswitchLevel":895,"jackLevel":446,"sideswitchLevel":894,"doublestepLevel":734,"staminaLevel":339,"isBuddy":false,"preferences":"{\"discordId\":\"yocto#2125\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yocto","sex":"Male","profileImg":""},{"id":760,"membersId":175493,"dateAdded":"2023-03-25T01:55:33.000Z","lastUpdated":"2023-05-06T03:25:02.000Z","status":1,"totalPoints":138441,"rankingPoints":138441,"totalPass":40,"totalFc":14,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":878,"bracketLevel":359,"footswitchLevel":540,"jackLevel":287,"sideswitchLevel":282,"doublestepLevel":505,"staminaLevel":624,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MONO_COL","sex":"Male","profileImg":""},{"id":650,"membersId":1138,"dateAdded":"2023-03-22T14:02:53.000Z","lastUpdated":"2023-04-01T23:34:09.000Z","status":1,"totalPoints":137580,"rankingPoints":137580,"totalPass":24,"totalFc":18,"totalFec":20,"totalQuad":6,"totalQuint":0,"crossoverLevel":1409,"bracketLevel":116,"footswitchLevel":492,"jackLevel":301,"sideswitchLevel":123,"doublestepLevel":957,"staminaLevel":95,"isBuddy":false,"preferences":"{\"discordId\":\"Rawkus#5465\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RawkusX","sex":"Unspecified","profileImg":""},{"id":56,"membersId":143816,"dateAdded":"2023-03-18T21:49:10.000Z","lastUpdated":"2023-04-14T23:48:51.000Z","status":1,"totalPoints":136970,"rankingPoints":136970,"totalPass":17,"totalFc":10,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":894,"bracketLevel":407,"footswitchLevel":784,"jackLevel":486,"sideswitchLevel":448,"doublestepLevel":1011,"staminaLevel":84,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Oda","sex":"Male","profileImg":"https://i.ibb.co/5RXqF8g/konmairo.png"},{"id":1012,"membersId":165832,"dateAdded":"2023-04-04T20:17:33.000Z","lastUpdated":"2023-05-04T16:43:42.000Z","status":1,"totalPoints":136629,"rankingPoints":136629,"totalPass":25,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":372,"bracketLevel":817,"footswitchLevel":627,"jackLevel":318,"sideswitchLevel":369,"doublestepLevel":575,"staminaLevel":656,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yeyeito","sex":"Male","profileImg":""},{"id":807,"membersId":31275,"dateAdded":"2023-03-25T23:16:02.000Z","lastUpdated":"2023-05-04T04:10:22.000Z","status":1,"totalPoints":166433,"rankingPoints":136348,"totalPass":90,"totalFc":16,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1526,"bracketLevel":281,"footswitchLevel":816,"jackLevel":528,"sideswitchLevel":395,"doublestepLevel":1119,"staminaLevel":76,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"latiosruby","sex":"Female","profileImg":"https://i256.photobucket.com/albums/hh182/ayameyokomi/Anime%20Icons/Tsubasa%20Icons%203/200_16.png"},{"id":751,"membersId":4391,"dateAdded":"2023-03-24T23:52:12.000Z","lastUpdated":"2023-04-01T00:29:53.000Z","status":1,"totalPoints":159990,"rankingPoints":136286,"totalPass":73,"totalFc":28,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1376,"bracketLevel":292,"footswitchLevel":817,"jackLevel":256,"sideswitchLevel":525,"doublestepLevel":994,"staminaLevel":66,"isBuddy":false,"preferences":"{\"discordId\":\"The Real Akuma#8639\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rilakkumaboy","sex":"Male","profileImg":""},{"id":198,"membersId":173195,"dateAdded":"2023-03-18T23:11:26.000Z","lastUpdated":"2023-04-27T22:47:15.000Z","status":1,"totalPoints":135223,"rankingPoints":135223,"totalPass":36,"totalFc":10,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":505,"bracketLevel":632,"footswitchLevel":933,"jackLevel":394,"sideswitchLevel":563,"doublestepLevel":832,"staminaLevel":294,"isBuddy":false,"preferences":"{\"discordId\":\"Atehortua#8487\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"Atehortua","sex":"Male","profileImg":""},{"id":493,"membersId":170954,"dateAdded":"2023-03-20T13:44:47.000Z","lastUpdated":"2023-04-23T22:08:36.000Z","status":1,"totalPoints":143771,"rankingPoints":135195,"totalPass":67,"totalFc":17,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1240,"bracketLevel":211,"footswitchLevel":795,"jackLevel":398,"sideswitchLevel":70,"doublestepLevel":916,"staminaLevel":74,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cheerio","sex":"Male","profileImg":"https://i.imgur.com/w07ClD7.png"},{"id":221,"membersId":5843,"dateAdded":"2023-03-19T00:13:34.000Z","lastUpdated":"2023-03-26T00:50:49.000Z","status":1,"totalPoints":135004,"rankingPoints":135004,"totalPass":18,"totalFc":5,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":394,"bracketLevel":304,"footswitchLevel":417,"jackLevel":159,"sideswitchLevel":12,"doublestepLevel":569,"staminaLevel":665,"isBuddy":false,"preferences":"{\"discordId\":\"Nebel#5263\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Nebel","sex":"Male","profileImg":"https://i.ibb.co/4fTVcyf/Capture2.png"},{"id":10,"membersId":129740,"dateAdded":"2023-03-18T21:48:29.000Z","lastUpdated":"2023-04-07T00:53:22.000Z","status":1,"totalPoints":143798,"rankingPoints":134888,"totalPass":79,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1119,"bracketLevel":343,"footswitchLevel":640,"jackLevel":316,"sideswitchLevel":365,"doublestepLevel":672,"staminaLevel":112,"isBuddy":false,"preferences":"{\"discordId\":\"Tenko#0028\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TENKO","sex":"Unspecified","profileImg":"https://i.imgur.com/qTNKsr2.png"},{"id":916,"membersId":94283,"dateAdded":"2023-03-30T06:05:11.000Z","lastUpdated":"2023-04-29T16:32:47.000Z","status":1,"totalPoints":134454,"rankingPoints":134454,"totalPass":36,"totalFc":27,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1088,"bracketLevel":330,"footswitchLevel":840,"jackLevel":344,"sideswitchLevel":653,"doublestepLevel":939,"staminaLevel":156,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Snil4","sex":"Male","profileImg":"https://i.postimg.cc/g0LhmhDW/smileycup1.gif"},{"id":850,"membersId":173242,"dateAdded":"2023-03-27T03:35:50.000Z","lastUpdated":"2023-05-06T22:50:11.000Z","status":1,"totalPoints":134161,"rankingPoints":134161,"totalPass":24,"totalFc":12,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":825,"bracketLevel":487,"footswitchLevel":743,"jackLevel":343,"sideswitchLevel":770,"doublestepLevel":767,"staminaLevel":238,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"cscathysun","sex":"Female","profileImg":""},{"id":106,"membersId":173297,"dateAdded":"2023-03-18T21:53:38.000Z","lastUpdated":"2023-05-04T04:50:25.000Z","status":1,"totalPoints":139930,"rankingPoints":133630,"totalPass":72,"totalFc":23,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":1429,"bracketLevel":268,"footswitchLevel":771,"jackLevel":455,"sideswitchLevel":464,"doublestepLevel":1036,"staminaLevel":79,"isBuddy":false,"preferences":"{\"discordId\":\"BrotherMojo#5469\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BrotherMojo","sex":"Male","profileImg":""},{"id":1008,"membersId":129604,"dateAdded":"2023-04-04T16:33:20.000Z","lastUpdated":"2023-04-28T02:16:27.000Z","status":1,"totalPoints":133419,"rankingPoints":133419,"totalPass":45,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":770,"bracketLevel":553,"footswitchLevel":534,"jackLevel":291,"sideswitchLevel":511,"doublestepLevel":532,"staminaLevel":238,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hiloshi","sex":"Male","profileImg":"https://i.imgur.com/i6rFhgJ.jpg"},{"id":421,"membersId":173521,"dateAdded":"2023-03-19T21:03:52.000Z","lastUpdated":"2023-05-06T19:25:17.000Z","status":1,"totalPoints":143877,"rankingPoints":133170,"totalPass":45,"totalFc":42,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1021,"bracketLevel":364,"footswitchLevel":818,"jackLevel":293,"sideswitchLevel":177,"doublestepLevel":664,"staminaLevel":226,"isBuddy":false,"preferences":"{\"discordId\":\"Mallow#1472\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mallow","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/234174794055155714/1097687149807157308/itlavatar.jpg"},{"id":572,"membersId":173240,"dateAdded":"2023-03-21T02:07:42.000Z","lastUpdated":"2023-03-31T22:12:44.000Z","status":1,"totalPoints":132212,"rankingPoints":132212,"totalPass":38,"totalFc":4,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":986,"bracketLevel":537,"footswitchLevel":533,"jackLevel":488,"sideswitchLevel":171,"doublestepLevel":1009,"staminaLevel":119,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xdank","sex":"Male","profileImg":""},{"id":1102,"membersId":76913,"dateAdded":"2023-04-12T04:41:41.000Z","lastUpdated":"2023-05-03T04:59:33.000Z","status":1,"totalPoints":131020,"rankingPoints":131020,"totalPass":38,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":461,"bracketLevel":608,"footswitchLevel":485,"jackLevel":748,"sideswitchLevel":366,"doublestepLevel":396,"staminaLevel":395,"isBuddy":false,"preferences":"{\"discordId\":\"Narwhal Prime#2189\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Narwhal Prime","sex":"Male","profileImg":"https://a.ppy.sh/2134234?1367899479.png"},{"id":829,"membersId":173363,"dateAdded":"2023-03-26T18:54:23.000Z","lastUpdated":"2023-04-26T03:06:20.000Z","status":1,"totalPoints":130807,"rankingPoints":130807,"totalPass":35,"totalFc":9,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":931,"bracketLevel":162,"footswitchLevel":732,"jackLevel":594,"sideswitchLevel":521,"doublestepLevel":729,"staminaLevel":201,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RuanTheDonPianta","sex":"Male","profileImg":""},{"id":299,"membersId":173861,"dateAdded":"2023-03-19T04:11:48.000Z","lastUpdated":"2023-05-01T01:04:25.000Z","status":1,"totalPoints":130221,"rankingPoints":130221,"totalPass":41,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":609,"bracketLevel":479,"footswitchLevel":628,"jackLevel":441,"sideswitchLevel":462,"doublestepLevel":728,"staminaLevel":280,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hidden","sex":"Unspecified","profileImg":""},{"id":990,"membersId":168699,"dateAdded":"2023-04-03T18:48:45.000Z","lastUpdated":"2023-04-10T03:04:04.000Z","status":1,"totalPoints":130191,"rankingPoints":130191,"totalPass":21,"totalFc":8,"totalFec":7,"totalQuad":3,"totalQuint":0,"crossoverLevel":647,"bracketLevel":470,"footswitchLevel":406,"jackLevel":465,"sideswitchLevel":645,"doublestepLevel":282,"staminaLevel":385,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"lizzzzzy","sex":"Female","profileImg":""},{"id":911,"membersId":175593,"dateAdded":"2023-03-29T23:32:50.000Z","lastUpdated":"2023-05-01T02:07:55.000Z","status":1,"totalPoints":176000,"rankingPoints":129624,"totalPass":95,"totalFc":30,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1658,"bracketLevel":285,"footswitchLevel":754,"jackLevel":537,"sideswitchLevel":541,"doublestepLevel":1144,"staminaLevel":98,"isBuddy":false,"preferences":"{\"discordId\":\"Chaparral (Chap)#5283\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ChaparralCoyote","sex":"Unspecified","profileImg":""},{"id":251,"membersId":175221,"dateAdded":"2023-03-19T01:23:20.000Z","lastUpdated":"2023-05-02T03:31:43.000Z","status":1,"totalPoints":183140,"rankingPoints":129144,"totalPass":129,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1558,"bracketLevel":339,"footswitchLevel":862,"jackLevel":499,"sideswitchLevel":524,"doublestepLevel":1046,"staminaLevel":149,"isBuddy":false,"preferences":"{\"discordId\":\"Atticus#8543\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"atticusgg","sex":"Unspecified","profileImg":"https://i.ibb.co/NrrstWY/xztz0ggb50c51.png"},{"id":208,"membersId":175373,"dateAdded":"2023-03-18T23:42:19.000Z","lastUpdated":"2023-05-05T00:34:16.000Z","status":1,"totalPoints":159154,"rankingPoints":128578,"totalPass":81,"totalFc":23,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":1407,"bracketLevel":224,"footswitchLevel":591,"jackLevel":331,"sideswitchLevel":188,"doublestepLevel":842,"staminaLevel":88,"isBuddy":false,"preferences":"{\"discordId\":\"Kasemei#2570\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kasemei","sex":"Female","profileImg":""},{"id":617,"membersId":173207,"dateAdded":"2023-03-21T22:01:50.000Z","lastUpdated":"2023-05-01T21:45:23.000Z","status":1,"totalPoints":128216,"rankingPoints":128216,"totalPass":46,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":714,"bracketLevel":531,"footswitchLevel":822,"jackLevel":333,"sideswitchLevel":557,"doublestepLevel":685,"staminaLevel":188,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kyroke","sex":"Male","profileImg":""},{"id":199,"membersId":173071,"dateAdded":"2023-03-18T23:14:49.000Z","lastUpdated":"2023-04-28T01:19:13.000Z","status":1,"totalPoints":127951,"rankingPoints":127951,"totalPass":26,"totalFc":12,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":685,"bracketLevel":301,"footswitchLevel":689,"jackLevel":486,"sideswitchLevel":236,"doublestepLevel":507,"staminaLevel":169,"isBuddy":false,"preferences":"{\"discordId\":\"mustanginexile#6034\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mustanginexile","sex":"Unspecified","profileImg":""},{"id":118,"membersId":174634,"dateAdded":"2023-03-18T21:57:42.000Z","lastUpdated":"2023-05-02T20:27:35.000Z","status":1,"totalPoints":126855,"rankingPoints":126855,"totalPass":54,"totalFc":19,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":933,"bracketLevel":536,"footswitchLevel":657,"jackLevel":333,"sideswitchLevel":169,"doublestepLevel":929,"staminaLevel":80,"isBuddy":false,"preferences":"{\"discordId\":\"Sapphron#2557\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sapphron","sex":"Male","profileImg":""},{"id":971,"membersId":173955,"dateAdded":"2023-04-02T09:28:07.000Z","lastUpdated":"2023-04-17T20:16:18.000Z","status":1,"totalPoints":126369,"rankingPoints":126369,"totalPass":47,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":960,"bracketLevel":241,"footswitchLevel":629,"jackLevel":333,"sideswitchLevel":302,"doublestepLevel":718,"staminaLevel":181,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Raazar","sex":"Unspecified","profileImg":""},{"id":131,"membersId":173502,"dateAdded":"2023-03-18T22:03:14.000Z","lastUpdated":"2023-04-06T21:27:13.000Z","status":1,"totalPoints":127036,"rankingPoints":126283,"totalPass":32,"totalFc":19,"totalFec":25,"totalQuad":0,"totalQuint":0,"crossoverLevel":1247,"bracketLevel":206,"footswitchLevel":357,"jackLevel":460,"sideswitchLevel":20,"doublestepLevel":781,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":\"MaryCherry#1831\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Salsa","sex":"Female","profileImg":"https://i.imgur.com/ClXUaBx.jpg"},{"id":947,"membersId":2323,"dateAdded":"2023-04-01T04:46:27.000Z","lastUpdated":"2023-04-16T02:23:55.000Z","status":1,"totalPoints":126072,"rankingPoints":126072,"totalPass":29,"totalFc":13,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":1186,"bracketLevel":170,"footswitchLevel":513,"jackLevel":384,"sideswitchLevel":463,"doublestepLevel":887,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dark Orochi","sex":"Male","profileImg":""},{"id":1026,"membersId":173370,"dateAdded":"2023-04-05T22:06:43.000Z","lastUpdated":"2023-05-03T22:54:27.000Z","status":1,"totalPoints":125920,"rankingPoints":125920,"totalPass":58,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":643,"bracketLevel":295,"footswitchLevel":676,"jackLevel":346,"sideswitchLevel":707,"doublestepLevel":577,"staminaLevel":157,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"rom_step","sex":"Male","profileImg":""},{"id":1022,"membersId":175709,"dateAdded":"2023-04-05T11:09:07.000Z","lastUpdated":"2023-05-03T15:00:41.000Z","status":1,"totalPoints":125650,"rankingPoints":125650,"totalPass":50,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":875,"bracketLevel":353,"footswitchLevel":560,"jackLevel":363,"sideswitchLevel":786,"doublestepLevel":412,"staminaLevel":121,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mavy","sex":"Female","profileImg":""},{"id":1123,"membersId":564,"dateAdded":"2023-04-14T18:06:34.000Z","lastUpdated":"2023-04-23T21:49:56.000Z","status":1,"totalPoints":125063,"rankingPoints":125063,"totalPass":26,"totalFc":9,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":521,"bracketLevel":640,"footswitchLevel":476,"jackLevel":416,"sideswitchLevel":345,"doublestepLevel":469,"staminaLevel":426,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DaggettOnTwitch","sex":"Male","profileImg":"https://i.ibb.co/VvQB0M1/D9x7b-EWU8-AAn-Il-R-200x200.jpg"},{"id":678,"membersId":174213,"dateAdded":"2023-03-22T23:13:57.000Z","lastUpdated":"2023-05-02T00:46:39.000Z","status":1,"totalPoints":124330,"rankingPoints":124330,"totalPass":42,"totalFc":6,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":860,"bracketLevel":379,"footswitchLevel":430,"jackLevel":630,"sideswitchLevel":468,"doublestepLevel":429,"staminaLevel":128,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"wooffull","sex":"Unspecified","profileImg":""},{"id":418,"membersId":12,"dateAdded":"2023-03-19T20:38:23.000Z","lastUpdated":"2023-04-22T16:03:32.000Z","status":1,"totalPoints":123169,"rankingPoints":123169,"totalPass":22,"totalFc":5,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":444,"bracketLevel":641,"footswitchLevel":452,"jackLevel":326,"sideswitchLevel":108,"doublestepLevel":403,"staminaLevel":282,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"zxevik","sex":"Male","profileImg":"https://i.ibb.co/dmcMgks/HLD.png"},{"id":509,"membersId":165792,"dateAdded":"2023-03-20T16:30:14.000Z","lastUpdated":"2023-04-27T15:10:07.000Z","status":1,"totalPoints":122341,"rankingPoints":122341,"totalPass":9,"totalFc":9,"totalFec":16,"totalQuad":9,"totalQuint":0,"crossoverLevel":800,"bracketLevel":474,"footswitchLevel":505,"jackLevel":423,"sideswitchLevel":96,"doublestepLevel":659,"staminaLevel":130,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fierra","sex":"Female","profileImg":"https://i.ibb.co/vmcKPXY/image.png"},{"id":1287,"membersId":173163,"dateAdded":"2023-05-04T23:39:33.000Z","lastUpdated":"2023-05-05T03:24:08.000Z","status":1,"totalPoints":121601,"rankingPoints":121601,"totalPass":24,"totalFc":2,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":570,"bracketLevel":462,"footswitchLevel":339,"jackLevel":446,"sideswitchLevel":204,"doublestepLevel":676,"staminaLevel":290,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CelAnima","sex":"Male","profileImg":""},{"id":271,"membersId":173549,"dateAdded":"2023-03-19T02:08:59.000Z","lastUpdated":"2023-05-07T05:13:39.000Z","status":1,"totalPoints":121027,"rankingPoints":121027,"totalPass":17,"totalFc":6,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":420,"bracketLevel":830,"footswitchLevel":570,"jackLevel":482,"sideswitchLevel":217,"doublestepLevel":820,"staminaLevel":329,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"svhavok","sex":"Unspecified","profileImg":""},{"id":1184,"membersId":175551,"dateAdded":"2023-04-22T09:51:23.000Z","lastUpdated":"2023-05-04T09:36:52.000Z","status":1,"totalPoints":119566,"rankingPoints":119566,"totalPass":46,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":956,"bracketLevel":217,"footswitchLevel":615,"jackLevel":321,"sideswitchLevel":466,"doublestepLevel":520,"staminaLevel":121,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"P*SERUM","sex":"Male","profileImg":""},{"id":1234,"membersId":176026,"dateAdded":"2023-04-27T14:27:27.000Z","lastUpdated":"2023-05-04T00:05:50.000Z","status":1,"totalPoints":119547,"rankingPoints":119547,"totalPass":23,"totalFc":4,"totalFec":12,"totalQuad":1,"totalQuint":0,"crossoverLevel":902,"bracketLevel":185,"footswitchLevel":395,"jackLevel":468,"sideswitchLevel":707,"doublestepLevel":445,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"blazincalf","sex":"Male","profileImg":""},{"id":801,"membersId":175510,"dateAdded":"2023-03-25T22:24:48.000Z","lastUpdated":"2023-05-05T17:43:23.000Z","status":1,"totalPoints":119329,"rankingPoints":119329,"totalPass":36,"totalFc":16,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":615,"bracketLevel":235,"footswitchLevel":592,"jackLevel":349,"sideswitchLevel":370,"doublestepLevel":633,"staminaLevel":175,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Killerkid451 ","sex":"Unspecified","profileImg":""},{"id":681,"membersId":3016,"dateAdded":"2023-03-22T23:19:48.000Z","lastUpdated":"2023-04-23T00:05:16.000Z","status":1,"totalPoints":119241,"rankingPoints":119241,"totalPass":31,"totalFc":10,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":1269,"bracketLevel":373,"footswitchLevel":821,"jackLevel":244,"sideswitchLevel":1366,"doublestepLevel":373,"staminaLevel":83,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TehDerek","sex":"Male","profileImg":""},{"id":675,"membersId":173144,"dateAdded":"2023-03-22T22:59:05.000Z","lastUpdated":"2023-03-24T01:38:07.000Z","status":1,"totalPoints":118877,"rankingPoints":118877,"totalPass":24,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":568,"bracketLevel":706,"footswitchLevel":704,"jackLevel":527,"sideswitchLevel":659,"doublestepLevel":647,"staminaLevel":279,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gonekim116","sex":"Male","profileImg":""},{"id":544,"membersId":175411,"dateAdded":"2023-03-20T21:09:41.000Z","lastUpdated":"2023-04-17T17:16:47.000Z","status":1,"totalPoints":118780,"rankingPoints":118780,"totalPass":11,"totalFc":6,"totalFec":19,"totalQuad":2,"totalQuint":0,"crossoverLevel":1108,"bracketLevel":109,"footswitchLevel":396,"jackLevel":262,"sideswitchLevel":712,"doublestepLevel":832,"staminaLevel":162,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Azelas","sex":"Unspecified","profileImg":""},{"id":1245,"membersId":176044,"dateAdded":"2023-04-29T06:09:53.000Z","lastUpdated":"2023-05-04T08:43:30.000Z","status":1,"totalPoints":118716,"rankingPoints":118716,"totalPass":25,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":633,"bracketLevel":606,"footswitchLevel":547,"jackLevel":451,"sideswitchLevel":146,"doublestepLevel":566,"staminaLevel":362,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"5.TWELVE","sex":"Male","profileImg":""},{"id":264,"membersId":175371,"dateAdded":"2023-03-19T01:47:19.000Z","lastUpdated":"2023-05-06T22:27:13.000Z","status":1,"totalPoints":143412,"rankingPoints":118587,"totalPass":102,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1108,"bracketLevel":527,"footswitchLevel":707,"jackLevel":390,"sideswitchLevel":364,"doublestepLevel":749,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cool Brick","sex":"Male","profileImg":""},{"id":1250,"membersId":174400,"dateAdded":"2023-04-29T21:37:51.000Z","lastUpdated":"2023-04-30T18:50:07.000Z","status":1,"totalPoints":117718,"rankingPoints":117718,"totalPass":15,"totalFc":7,"totalFec":16,"totalQuad":2,"totalQuint":0,"crossoverLevel":948,"bracketLevel":187,"footswitchLevel":673,"jackLevel":269,"sideswitchLevel":905,"doublestepLevel":840,"staminaLevel":83,"isBuddy":false,"preferences":"{\"discordId\":\"turbo#0679\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Turbo","sex":"Unspecified","profileImg":""},{"id":634,"membersId":165784,"dateAdded":"2023-03-22T02:27:01.000Z","lastUpdated":"2023-05-02T00:55:35.000Z","status":1,"totalPoints":117583,"rankingPoints":117583,"totalPass":43,"totalFc":14,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":723,"bracketLevel":63,"footswitchLevel":462,"jackLevel":391,"sideswitchLevel":225,"doublestepLevel":850,"staminaLevel":235,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"cloverwolf","sex":"Male","profileImg":""},{"id":454,"membersId":174444,"dateAdded":"2023-03-20T01:16:46.000Z","lastUpdated":"2023-04-25T04:50:49.000Z","status":1,"totalPoints":117582,"rankingPoints":117582,"totalPass":43,"totalFc":19,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1041,"bracketLevel":601,"footswitchLevel":604,"jackLevel":332,"sideswitchLevel":595,"doublestepLevel":551,"staminaLevel":131,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"max101","sex":"Male","profileImg":"https://i.quotev.com/n4s6mygastga.jpg"},{"id":880,"membersId":175567,"dateAdded":"2023-03-28T22:05:01.000Z","lastUpdated":"2023-05-04T23:33:06.000Z","status":1,"totalPoints":117564,"rankingPoints":117564,"totalPass":39,"totalFc":21,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":1019,"bracketLevel":67,"footswitchLevel":360,"jackLevel":64,"sideswitchLevel":0,"doublestepLevel":832,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"chelly","sex":"Unspecified","profileImg":""},{"id":330,"membersId":173319,"dateAdded":"2023-03-19T10:01:20.000Z","lastUpdated":"2023-04-12T14:12:35.000Z","status":1,"totalPoints":116879,"rankingPoints":116879,"totalPass":24,"totalFc":18,"totalFec":17,"totalQuad":0,"totalQuint":0,"crossoverLevel":808,"bracketLevel":472,"footswitchLevel":706,"jackLevel":267,"sideswitchLevel":544,"doublestepLevel":309,"staminaLevel":190,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"D0omsday","sex":"Male","profileImg":""},{"id":720,"membersId":173789,"dateAdded":"2023-03-24T02:23:31.000Z","lastUpdated":"2023-05-07T03:08:36.000Z","status":1,"totalPoints":116549,"rankingPoints":116549,"totalPass":33,"totalFc":22,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":996,"bracketLevel":441,"footswitchLevel":646,"jackLevel":290,"sideswitchLevel":357,"doublestepLevel":822,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lazerlord","sex":"Male","profileImg":""},{"id":1226,"membersId":132065,"dateAdded":"2023-04-27T02:16:51.000Z","lastUpdated":"2023-05-07T00:06:50.000Z","status":1,"totalPoints":116315,"rankingPoints":116315,"totalPass":39,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":420,"bracketLevel":284,"footswitchLevel":479,"jackLevel":295,"sideswitchLevel":361,"doublestepLevel":369,"staminaLevel":587,"isBuddy":false,"preferences":"{\"discordId\":\"Amoo#2681\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Amoo","sex":"Unspecified","profileImg":"https://i.imgur.com/0iitjNE.png"},{"id":562,"membersId":174966,"dateAdded":"2023-03-20T23:41:37.000Z","lastUpdated":"2023-05-07T00:20:06.000Z","status":1,"totalPoints":131385,"rankingPoints":116294,"totalPass":72,"totalFc":24,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1251,"bracketLevel":250,"footswitchLevel":606,"jackLevel":237,"sideswitchLevel":189,"doublestepLevel":842,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ImTootToot","sex":"Unspecified","profileImg":""},{"id":774,"membersId":77168,"dateAdded":"2023-03-25T09:50:05.000Z","lastUpdated":"2023-04-20T18:45:31.000Z","status":1,"totalPoints":115891,"rankingPoints":115891,"totalPass":45,"totalFc":6,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":682,"bracketLevel":293,"footswitchLevel":603,"jackLevel":304,"sideswitchLevel":284,"doublestepLevel":728,"staminaLevel":165,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Electromuis","sex":"Unspecified","profileImg":""},{"id":1017,"membersId":149151,"dateAdded":"2023-04-05T02:01:05.000Z","lastUpdated":"2023-04-23T02:22:51.000Z","status":1,"totalPoints":115724,"rankingPoints":115724,"totalPass":29,"totalFc":17,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":614,"bracketLevel":217,"footswitchLevel":483,"jackLevel":412,"sideswitchLevel":174,"doublestepLevel":771,"staminaLevel":60,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jmf","sex":"Male","profileImg":""},{"id":150,"membersId":173105,"dateAdded":"2023-03-18T22:15:52.000Z","lastUpdated":"2023-03-26T00:42:59.000Z","status":1,"totalPoints":115155,"rankingPoints":115155,"totalPass":24,"totalFc":15,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":534,"bracketLevel":263,"footswitchLevel":548,"jackLevel":407,"sideswitchLevel":515,"doublestepLevel":679,"staminaLevel":303,"isBuddy":false,"preferences":"{\"discordId\":\"Losermanwins#0088\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TheManwich","sex":"Male","profileImg":"https://i.imgur.com/yeHbdpC.png"},{"id":727,"membersId":173513,"dateAdded":"2023-03-24T11:16:20.000Z","lastUpdated":"2023-05-05T11:25:47.000Z","status":1,"totalPoints":114991,"rankingPoints":114991,"totalPass":47,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":963,"bracketLevel":202,"footswitchLevel":398,"jackLevel":275,"sideswitchLevel":326,"doublestepLevel":701,"staminaLevel":80,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Juci","sex":"Male","profileImg":""},{"id":230,"membersId":174967,"dateAdded":"2023-03-19T00:34:44.000Z","lastUpdated":"2023-03-26T21:03:39.000Z","status":1,"totalPoints":114053,"rankingPoints":114053,"totalPass":26,"totalFc":0,"totalFec":7,"totalQuad":1,"totalQuint":0,"crossoverLevel":814,"bracketLevel":294,"footswitchLevel":628,"jackLevel":48,"sideswitchLevel":170,"doublestepLevel":758,"staminaLevel":74,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lumen","sex":"Female","profileImg":""},{"id":233,"membersId":84583,"dateAdded":"2023-03-19T00:36:20.000Z","lastUpdated":"2023-03-24T13:30:46.000Z","status":1,"totalPoints":113964,"rankingPoints":113964,"totalPass":14,"totalFc":19,"totalFec":20,"totalQuad":0,"totalQuint":0,"crossoverLevel":1090,"bracketLevel":258,"footswitchLevel":447,"jackLevel":166,"sideswitchLevel":287,"doublestepLevel":762,"staminaLevel":80,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lugea","sex":"Male","profileImg":"https://i.ibb.co/SRVLdQQ/bruno.png"},{"id":364,"membersId":174975,"dateAdded":"2023-03-19T16:16:27.000Z","lastUpdated":"2023-04-06T02:45:31.000Z","status":1,"totalPoints":113866,"rankingPoints":113866,"totalPass":23,"totalFc":45,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":1291,"bracketLevel":252,"footswitchLevel":543,"jackLevel":219,"sideswitchLevel":0,"doublestepLevel":661,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Painsley","sex":"Unspecified","profileImg":"https://i.imgur.com/5lXbBj9.png"},{"id":518,"membersId":128280,"dateAdded":"2023-03-20T18:24:06.000Z","lastUpdated":"2023-05-05T18:59:12.000Z","status":1,"totalPoints":112955,"rankingPoints":112955,"totalPass":0,"totalFc":0,"totalFec":40,"totalQuad":22,"totalQuint":0,"crossoverLevel":1370,"bracketLevel":231,"footswitchLevel":493,"jackLevel":198,"sideswitchLevel":0,"doublestepLevel":742,"staminaLevel":7,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GreatDameCygnus","sex":"Female","profileImg":"https://i.ibb.co/JQjnCN6/icon2.jpg"},{"id":250,"membersId":173253,"dateAdded":"2023-03-19T01:13:50.000Z","lastUpdated":"2023-04-29T19:36:13.000Z","status":1,"totalPoints":112771,"rankingPoints":112771,"totalPass":45,"totalFc":30,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":884,"bracketLevel":288,"footswitchLevel":590,"jackLevel":330,"sideswitchLevel":189,"doublestepLevel":494,"staminaLevel":184,"isBuddy":false,"preferences":"{\"discordId\":\"tossu#1056\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"NinuKinuski","sex":"Unspecified","profileImg":"https://i.imgur.com/cIkwVzI.png"},{"id":390,"membersId":66699,"dateAdded":"2023-03-19T18:11:51.000Z","lastUpdated":"2023-05-02T23:44:23.000Z","status":1,"totalPoints":112351,"rankingPoints":112351,"totalPass":12,"totalFc":16,"totalFec":21,"totalQuad":2,"totalQuint":0,"crossoverLevel":1161,"bracketLevel":129,"footswitchLevel":513,"jackLevel":223,"sideswitchLevel":101,"doublestepLevel":981,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xopher","sex":"Male","profileImg":""},{"id":496,"membersId":66362,"dateAdded":"2023-03-20T14:24:01.000Z","lastUpdated":"2023-03-23T00:55:17.000Z","status":1,"totalPoints":110933,"rankingPoints":110933,"totalPass":29,"totalFc":20,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":1129,"bracketLevel":358,"footswitchLevel":481,"jackLevel":263,"sideswitchLevel":415,"doublestepLevel":843,"staminaLevel":26,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"centripital","sex":"Male","profileImg":""},{"id":75,"membersId":173399,"dateAdded":"2023-03-18T21:50:18.000Z","lastUpdated":"2023-05-06T16:27:38.000Z","status":1,"totalPoints":123783,"rankingPoints":110838,"totalPass":34,"totalFc":53,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1318,"bracketLevel":151,"footswitchLevel":535,"jackLevel":350,"sideswitchLevel":36,"doublestepLevel":732,"staminaLevel":33,"isBuddy":false,"preferences":"{\"discordId\":\"DJEmbrace#0963\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DJEmbrace","sex":"Male","profileImg":""},{"id":1018,"membersId":79,"dateAdded":"2023-04-05T02:27:11.000Z","lastUpdated":"2023-04-23T01:33:26.000Z","status":1,"totalPoints":110551,"rankingPoints":110551,"totalPass":11,"totalFc":5,"totalFec":12,"totalQuad":2,"totalQuint":0,"crossoverLevel":581,"bracketLevel":457,"footswitchLevel":822,"jackLevel":476,"sideswitchLevel":308,"doublestepLevel":663,"staminaLevel":187,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bluechows","sex":"Male","profileImg":""},{"id":900,"membersId":175584,"dateAdded":"2023-03-29T15:13:55.000Z","lastUpdated":"2023-05-06T17:02:16.000Z","status":1,"totalPoints":123719,"rankingPoints":110109,"totalPass":92,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1091,"bracketLevel":178,"footswitchLevel":533,"jackLevel":362,"sideswitchLevel":365,"doublestepLevel":711,"staminaLevel":110,"isBuddy":false,"preferences":"{\"discordId\":\"MegaGiganium#4235\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vexi","sex":"Male","profileImg":""},{"id":467,"membersId":175369,"dateAdded":"2023-03-20T02:40:58.000Z","lastUpdated":"2023-04-22T02:50:03.000Z","status":1,"totalPoints":123060,"rankingPoints":109900,"totalPass":71,"totalFc":24,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1152,"bracketLevel":264,"footswitchLevel":667,"jackLevel":252,"sideswitchLevel":295,"doublestepLevel":883,"staminaLevel":37,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JAFUS","sex":"Male","profileImg":""},{"id":434,"membersId":175400,"dateAdded":"2023-03-19T22:27:47.000Z","lastUpdated":"2023-04-08T17:08:53.000Z","status":1,"totalPoints":128025,"rankingPoints":109670,"totalPass":87,"totalFc":11,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1286,"bracketLevel":251,"footswitchLevel":522,"jackLevel":266,"sideswitchLevel":88,"doublestepLevel":811,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"formi no bar","sex":"Male","profileImg":""},{"id":704,"membersId":75728,"dateAdded":"2023-03-23T17:10:53.000Z","lastUpdated":"2023-04-26T17:35:29.000Z","status":1,"totalPoints":113163,"rankingPoints":108321,"totalPass":75,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":957,"bracketLevel":255,"footswitchLevel":417,"jackLevel":210,"sideswitchLevel":164,"doublestepLevel":708,"staminaLevel":88,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yaniel","sex":"Male","profileImg":""},{"id":596,"membersId":173428,"dateAdded":"2023-03-21T15:23:05.000Z","lastUpdated":"2023-03-23T18:51:30.000Z","status":1,"totalPoints":107515,"rankingPoints":107515,"totalPass":17,"totalFc":16,"totalFec":21,"totalQuad":2,"totalQuint":0,"crossoverLevel":1307,"bracketLevel":171,"footswitchLevel":318,"jackLevel":191,"sideswitchLevel":35,"doublestepLevel":919,"staminaLevel":52,"isBuddy":false,"preferences":"{\"discordId\":\"Bennooo#3250\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Beniplex","sex":"Male","profileImg":"https://i.imgur.com/cD4ScwL.png"},{"id":1239,"membersId":128330,"dateAdded":"2023-04-28T01:19:22.000Z","lastUpdated":"2023-04-28T22:21:20.000Z","status":1,"totalPoints":106101,"rankingPoints":106101,"totalPass":23,"totalFc":3,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":581,"bracketLevel":324,"footswitchLevel":411,"jackLevel":672,"sideswitchLevel":318,"doublestepLevel":512,"staminaLevel":119,"isBuddy":false,"preferences":"{\"discordId\":\"eggy#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"goodbye","sex":"Female","profileImg":""},{"id":192,"membersId":127823,"dateAdded":"2023-03-18T23:02:21.000Z","lastUpdated":"2023-04-16T05:06:55.000Z","status":1,"totalPoints":105937,"rankingPoints":105937,"totalPass":28,"totalFc":11,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":481,"bracketLevel":297,"footswitchLevel":382,"jackLevel":436,"sideswitchLevel":97,"doublestepLevel":827,"staminaLevel":107,"isBuddy":false,"preferences":"{\"discordId\":\"Fresca#7450\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JONBUDDY","sex":"Male","profileImg":"https://i.imgur.com/7K4gyoz.png"},{"id":706,"membersId":174970,"dateAdded":"2023-03-23T20:18:32.000Z","lastUpdated":"2023-04-30T18:40:50.000Z","status":1,"totalPoints":121288,"rankingPoints":105229,"totalPass":74,"totalFc":25,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1232,"bracketLevel":181,"footswitchLevel":570,"jackLevel":211,"sideswitchLevel":44,"doublestepLevel":803,"staminaLevel":32,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Maryushi3","sex":"Male","profileImg":"https://mary.moe/wp-content/uploads/2023/04/blue-eye-250.png"},{"id":985,"membersId":174161,"dateAdded":"2023-04-03T00:45:10.000Z","lastUpdated":"2023-05-01T02:26:23.000Z","status":1,"totalPoints":104812,"rankingPoints":104812,"totalPass":32,"totalFc":27,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":958,"bracketLevel":121,"footswitchLevel":399,"jackLevel":100,"sideswitchLevel":0,"doublestepLevel":726,"staminaLevel":65,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Xidi","sex":"Male","profileImg":""},{"id":729,"membersId":5080,"dateAdded":"2023-03-24T15:38:36.000Z","lastUpdated":"2023-05-06T23:37:09.000Z","status":1,"totalPoints":104194,"rankingPoints":104194,"totalPass":20,"totalFc":5,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":526,"bracketLevel":162,"footswitchLevel":221,"jackLevel":458,"sideswitchLevel":72,"doublestepLevel":654,"staminaLevel":109,"isBuddy":false,"preferences":"{\"discordId\":\"JohnDesire#4837\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JohnDesire","sex":"Male","profileImg":""},{"id":334,"membersId":173808,"dateAdded":"2023-03-19T10:26:00.000Z","lastUpdated":"2023-04-22T22:02:30.000Z","status":1,"totalPoints":104192,"rankingPoints":104192,"totalPass":50,"totalFc":11,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1021,"bracketLevel":63,"footswitchLevel":459,"jackLevel":393,"sideswitchLevel":415,"doublestepLevel":591,"staminaLevel":73,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Madkurre","sex":"Male","profileImg":""},{"id":1129,"membersId":151195,"dateAdded":"2023-04-15T17:50:11.000Z","lastUpdated":"2023-04-23T21:05:22.000Z","status":1,"totalPoints":103000,"rankingPoints":103000,"totalPass":49,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":415,"bracketLevel":64,"footswitchLevel":238,"jackLevel":167,"sideswitchLevel":330,"doublestepLevel":433,"staminaLevel":384,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TheMusserO","sex":"Male","profileImg":""},{"id":690,"membersId":128892,"dateAdded":"2023-03-23T01:12:35.000Z","lastUpdated":"2023-04-11T19:28:34.000Z","status":1,"totalPoints":102472,"rankingPoints":102472,"totalPass":42,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":853,"bracketLevel":235,"footswitchLevel":470,"jackLevel":424,"sideswitchLevel":458,"doublestepLevel":669,"staminaLevel":84,"isBuddy":false,"preferences":"{\"discordId\":\"ZOM#3752\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZOM","sex":"Male","profileImg":""},{"id":194,"membersId":7791,"dateAdded":"2023-03-18T23:05:14.000Z","lastUpdated":"2023-05-04T19:08:13.000Z","status":1,"totalPoints":101233,"rankingPoints":101233,"totalPass":32,"totalFc":13,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":373,"bracketLevel":368,"footswitchLevel":352,"jackLevel":186,"sideswitchLevel":331,"doublestepLevel":350,"staminaLevel":359,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CinnamonPie","sex":"Male","profileImg":""},{"id":446,"membersId":173183,"dateAdded":"2023-03-20T00:12:43.000Z","lastUpdated":"2023-03-27T01:12:23.000Z","status":1,"totalPoints":101051,"rankingPoints":101051,"totalPass":30,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":561,"bracketLevel":295,"footswitchLevel":453,"jackLevel":311,"sideswitchLevel":389,"doublestepLevel":640,"staminaLevel":190,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"rilegoat","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/1065639827845959690/1087164516313354310/the_riley.png"},{"id":934,"membersId":155530,"dateAdded":"2023-03-31T02:42:16.000Z","lastUpdated":"2023-04-21T03:33:55.000Z","status":1,"totalPoints":100966,"rankingPoints":100966,"totalPass":28,"totalFc":16,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":637,"bracketLevel":492,"footswitchLevel":392,"jackLevel":339,"sideswitchLevel":429,"doublestepLevel":335,"staminaLevel":165,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"San19","sex":"Male","profileImg":""},{"id":846,"membersId":75618,"dateAdded":"2023-03-27T00:10:20.000Z","lastUpdated":"2023-04-25T23:22:30.000Z","status":1,"totalPoints":100849,"rankingPoints":100849,"totalPass":12,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":298,"bracketLevel":435,"footswitchLevel":542,"jackLevel":312,"sideswitchLevel":581,"doublestepLevel":420,"staminaLevel":430,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kev!","sex":"Male","profileImg":""},{"id":821,"membersId":132059,"dateAdded":"2023-03-26T12:54:50.000Z","lastUpdated":"2023-04-22T16:53:33.000Z","status":1,"totalPoints":100729,"rankingPoints":100729,"totalPass":60,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1067,"bracketLevel":123,"footswitchLevel":417,"jackLevel":333,"sideswitchLevel":170,"doublestepLevel":823,"staminaLevel":64,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"IzzyLockhardt","sex":"Female","profileImg":""},{"id":967,"membersId":175632,"dateAdded":"2023-04-02T00:48:37.000Z","lastUpdated":"2023-05-01T23:09:53.000Z","status":1,"totalPoints":100690,"rankingPoints":100690,"totalPass":43,"totalFc":22,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":883,"bracketLevel":218,"footswitchLevel":515,"jackLevel":219,"sideswitchLevel":275,"doublestepLevel":816,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"emiess48","sex":"Unspecified","profileImg":""},{"id":261,"membersId":175353,"dateAdded":"2023-03-19T01:45:09.000Z","lastUpdated":"2023-04-26T23:31:18.000Z","status":1,"totalPoints":113097,"rankingPoints":100342,"totalPass":87,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1217,"bracketLevel":119,"footswitchLevel":366,"jackLevel":200,"sideswitchLevel":234,"doublestepLevel":679,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"meecheezink","sex":"Female","profileImg":""},{"id":1185,"membersId":173746,"dateAdded":"2023-04-22T12:19:06.000Z","lastUpdated":"2023-05-04T00:15:20.000Z","status":1,"totalPoints":100087,"rankingPoints":100087,"totalPass":50,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":796,"bracketLevel":148,"footswitchLevel":523,"jackLevel":295,"sideswitchLevel":154,"doublestepLevel":677,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HenL","sex":"Male","profileImg":""},{"id":783,"membersId":175495,"dateAdded":"2023-03-25T15:34:59.000Z","lastUpdated":"2023-03-25T20:58:10.000Z","status":1,"totalPoints":99370,"rankingPoints":99370,"totalPass":19,"totalFc":5,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":787,"bracketLevel":325,"footswitchLevel":449,"jackLevel":141,"sideswitchLevel":477,"doublestepLevel":228,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MisterGuy_","sex":"Male","profileImg":""},{"id":797,"membersId":167992,"dateAdded":"2023-03-25T19:55:11.000Z","lastUpdated":"2023-05-06T01:29:38.000Z","status":1,"totalPoints":97995,"rankingPoints":97995,"totalPass":24,"totalFc":15,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":718,"bracketLevel":248,"footswitchLevel":454,"jackLevel":153,"sideswitchLevel":373,"doublestepLevel":515,"staminaLevel":126,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SanHelbert","sex":"Male","profileImg":""},{"id":283,"membersId":66610,"dateAdded":"2023-03-19T02:58:26.000Z","lastUpdated":"2023-05-04T13:59:35.000Z","status":1,"totalPoints":97890,"rankingPoints":97890,"totalPass":26,"totalFc":6,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":684,"bracketLevel":290,"footswitchLevel":384,"jackLevel":460,"sideswitchLevel":221,"doublestepLevel":426,"staminaLevel":126,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FabSab44","sex":"Female","profileImg":"https://i.ibb.co/pJB1krQ/spike4-4.jpg"},{"id":290,"membersId":174092,"dateAdded":"2023-03-19T03:31:38.000Z","lastUpdated":"2023-05-06T20:21:26.000Z","status":1,"totalPoints":97609,"rankingPoints":97609,"totalPass":24,"totalFc":14,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":701,"bracketLevel":337,"footswitchLevel":343,"jackLevel":231,"sideswitchLevel":517,"doublestepLevel":400,"staminaLevel":146,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sabidesu","sex":"Unspecified","profileImg":"https://i.imgur.com/JH1aEQ2.png"},{"id":1142,"membersId":173446,"dateAdded":"2023-04-16T17:26:20.000Z","lastUpdated":"2023-04-29T18:17:55.000Z","status":1,"totalPoints":95420,"rankingPoints":94847,"totalPass":50,"totalFc":24,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":1103,"bracketLevel":190,"footswitchLevel":489,"jackLevel":167,"sideswitchLevel":0,"doublestepLevel":655,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cadrin","sex":"Male","profileImg":""},{"id":866,"membersId":66717,"dateAdded":"2023-03-28T00:59:26.000Z","lastUpdated":"2023-05-02T03:43:13.000Z","status":1,"totalPoints":94430,"rankingPoints":94430,"totalPass":13,"totalFc":5,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":337,"bracketLevel":82,"footswitchLevel":134,"jackLevel":173,"sideswitchLevel":57,"doublestepLevel":492,"staminaLevel":568,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AXB","sex":"Unspecified","profileImg":""},{"id":882,"membersId":168599,"dateAdded":"2023-03-28T22:22:40.000Z","lastUpdated":"2023-04-06T22:45:54.000Z","status":1,"totalPoints":93548,"rankingPoints":93548,"totalPass":25,"totalFc":23,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":924,"bracketLevel":98,"footswitchLevel":447,"jackLevel":297,"sideswitchLevel":63,"doublestepLevel":888,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PARTY MAN X","sex":"Male","profileImg":""},{"id":811,"membersId":165640,"dateAdded":"2023-03-26T01:49:42.000Z","lastUpdated":"2023-04-16T07:24:25.000Z","status":1,"totalPoints":93096,"rankingPoints":93096,"totalPass":31,"totalFc":3,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":697,"bracketLevel":126,"footswitchLevel":497,"jackLevel":285,"sideswitchLevel":372,"doublestepLevel":622,"staminaLevel":74,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bibbzzu","sex":"Unspecified","profileImg":""},{"id":724,"membersId":175473,"dateAdded":"2023-03-24T03:12:38.000Z","lastUpdated":"2023-04-28T04:00:05.000Z","status":1,"totalPoints":101118,"rankingPoints":91293,"totalPass":91,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":964,"bracketLevel":205,"footswitchLevel":403,"jackLevel":165,"sideswitchLevel":115,"doublestepLevel":735,"staminaLevel":19,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"quartz","sex":"Female","profileImg":""},{"id":410,"membersId":127796,"dateAdded":"2023-03-19T20:05:58.000Z","lastUpdated":"2023-04-22T04:21:06.000Z","status":1,"totalPoints":91138,"rankingPoints":91138,"totalPass":42,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":658,"bracketLevel":276,"footswitchLevel":327,"jackLevel":215,"sideswitchLevel":547,"doublestepLevel":312,"staminaLevel":140,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"scientificRex","sex":"Female","profileImg":""},{"id":1182,"membersId":175943,"dateAdded":"2023-04-22T00:45:54.000Z","lastUpdated":"2023-05-06T18:26:15.000Z","status":1,"totalPoints":90939,"rankingPoints":90939,"totalPass":30,"totalFc":5,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":635,"bracketLevel":182,"footswitchLevel":389,"jackLevel":397,"sideswitchLevel":51,"doublestepLevel":382,"staminaLevel":129,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Puddi","sex":"Male","profileImg":"https://i.imgur.com/amUeoKz.png"},{"id":383,"membersId":175393,"dateAdded":"2023-03-19T17:46:49.000Z","lastUpdated":"2023-05-03T18:51:14.000Z","status":1,"totalPoints":97344,"rankingPoints":90512,"totalPass":65,"totalFc":21,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1096,"bracketLevel":104,"footswitchLevel":289,"jackLevel":113,"sideswitchLevel":19,"doublestepLevel":554,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"henna2","sex":"Female","profileImg":""},{"id":195,"membersId":75729,"dateAdded":"2023-03-18T23:05:34.000Z","lastUpdated":"2023-03-26T21:07:40.000Z","status":1,"totalPoints":95698,"rankingPoints":90429,"totalPass":84,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":910,"bracketLevel":145,"footswitchLevel":393,"jackLevel":145,"sideswitchLevel":0,"doublestepLevel":687,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"help","sex":"Male","profileImg":"https://i.imgur.com/AKnOujq.jpg"},{"id":569,"membersId":4036,"dateAdded":"2023-03-21T01:09:12.000Z","lastUpdated":"2023-03-25T21:17:53.000Z","status":1,"totalPoints":89133,"rankingPoints":89133,"totalPass":11,"totalFc":9,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1089,"bracketLevel":174,"footswitchLevel":422,"jackLevel":212,"sideswitchLevel":1594,"doublestepLevel":351,"staminaLevel":248,"isBuddy":false,"preferences":"{\"discordId\":\"Spootaloo#4562\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Spooty","sex":"Male","profileImg":"https://i.imgur.com/iOUDtBl.png"},{"id":360,"membersId":173497,"dateAdded":"2023-03-19T15:57:03.000Z","lastUpdated":"2023-05-06T20:19:28.000Z","status":1,"totalPoints":88675,"rankingPoints":88675,"totalPass":15,"totalFc":17,"totalFec":23,"totalQuad":1,"totalQuint":0,"crossoverLevel":1085,"bracketLevel":36,"footswitchLevel":315,"jackLevel":198,"sideswitchLevel":63,"doublestepLevel":440,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"newtim","sex":"Unspecified","profileImg":""},{"id":435,"membersId":148688,"dateAdded":"2023-03-19T22:29:32.000Z","lastUpdated":"2023-05-05T03:53:06.000Z","status":1,"totalPoints":88400,"rankingPoints":88400,"totalPass":0,"totalFc":2,"totalFec":12,"totalQuad":13,"totalQuint":0,"crossoverLevel":792,"bracketLevel":6,"footswitchLevel":170,"jackLevel":99,"sideswitchLevel":335,"doublestepLevel":213,"staminaLevel":149,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Magmar","sex":"Male","profileImg":"https://www.serebii.net/swordshield/pokemon/126.png"},{"id":164,"membersId":173016,"dateAdded":"2023-03-18T22:29:31.000Z","lastUpdated":"2023-04-15T17:35:15.000Z","status":1,"totalPoints":91281,"rankingPoints":88388,"totalPass":75,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":859,"bracketLevel":169,"footswitchLevel":367,"jackLevel":145,"sideswitchLevel":31,"doublestepLevel":600,"staminaLevel":23,"isBuddy":false,"preferences":"{\"discordId\":\"omgukk#6953\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"omgukk","sex":"Unspecified","profileImg":"https://i.ibb.co/TqvJY9m/GS-Avatar.png"},{"id":444,"membersId":174814,"dateAdded":"2023-03-19T23:49:58.000Z","lastUpdated":"2023-05-01T16:54:02.000Z","status":1,"totalPoints":88313,"rankingPoints":88313,"totalPass":42,"totalFc":11,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":840,"bracketLevel":248,"footswitchLevel":477,"jackLevel":164,"sideswitchLevel":339,"doublestepLevel":415,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"autumn!!","sex":"Female","profileImg":""},{"id":1150,"membersId":175877,"dateAdded":"2023-04-17T22:24:05.000Z","lastUpdated":"2023-05-05T22:24:03.000Z","status":1,"totalPoints":90946,"rankingPoints":87864,"totalPass":62,"totalFc":18,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1013,"bracketLevel":114,"footswitchLevel":345,"jackLevel":139,"sideswitchLevel":0,"doublestepLevel":550,"staminaLevel":25,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"holepigeon","sex":"Unspecified","profileImg":""},{"id":510,"membersId":91184,"dateAdded":"2023-03-20T16:38:28.000Z","lastUpdated":"2023-05-05T17:01:13.000Z","status":1,"totalPoints":87304,"rankingPoints":87304,"totalPass":33,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":403,"bracketLevel":296,"footswitchLevel":393,"jackLevel":305,"sideswitchLevel":488,"doublestepLevel":253,"staminaLevel":324,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Roujo","sex":"Male","profileImg":"https://landing.toepi.moe/img/roujo_avatar.png"},{"id":653,"membersId":175443,"dateAdded":"2023-03-22T16:24:45.000Z","lastUpdated":"2023-04-24T17:17:13.000Z","status":1,"totalPoints":87172,"rankingPoints":87172,"totalPass":45,"totalFc":22,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":1108,"bracketLevel":173,"footswitchLevel":293,"jackLevel":132,"sideswitchLevel":14,"doublestepLevel":509,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MayMay","sex":"Female","profileImg":"https://i.postimg.cc/kXdCtLcN/c8dde011-d3b0-4042-a41a-c52f77aee30d-1.jpg"},{"id":937,"membersId":173194,"dateAdded":"2023-03-31T16:10:43.000Z","lastUpdated":"2023-04-08T21:01:54.000Z","status":1,"totalPoints":86713,"rankingPoints":86713,"totalPass":8,"totalFc":3,"totalFec":8,"totalQuad":2,"totalQuint":0,"crossoverLevel":527,"bracketLevel":409,"footswitchLevel":541,"jackLevel":441,"sideswitchLevel":266,"doublestepLevel":421,"staminaLevel":202,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cowboy Tony (NO BAR)","sex":"Male","profileImg":""},{"id":426,"membersId":1,"dateAdded":"2023-03-19T21:34:16.000Z","lastUpdated":"2023-05-07T03:56:20.000Z","status":1,"totalPoints":86581,"rankingPoints":86581,"totalPass":15,"totalFc":4,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":438,"bracketLevel":323,"footswitchLevel":440,"jackLevel":294,"sideswitchLevel":310,"doublestepLevel":237,"staminaLevel":146,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"asfl.ChezMiX","sex":"Male","profileImg":""},{"id":343,"membersId":131549,"dateAdded":"2023-03-19T12:18:11.000Z","lastUpdated":"2023-04-29T14:13:01.000Z","status":1,"totalPoints":86043,"rankingPoints":86043,"totalPass":44,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":536,"bracketLevel":184,"footswitchLevel":433,"jackLevel":193,"sideswitchLevel":54,"doublestepLevel":570,"staminaLevel":96,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Thumbsy","sex":"Unspecified","profileImg":"https://i.imgur.com/CkQ6JlH.jpg"},{"id":412,"membersId":165900,"dateAdded":"2023-03-19T20:09:06.000Z","lastUpdated":"2023-04-26T22:36:43.000Z","status":1,"totalPoints":85911,"rankingPoints":85911,"totalPass":43,"totalFc":32,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":997,"bracketLevel":127,"footswitchLevel":291,"jackLevel":148,"sideswitchLevel":0,"doublestepLevel":531,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":\"RatherBe#3282\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RatherBe","sex":"Female","profileImg":"https://en.gravatar.com/userimage/6513490/59450bc0fe5a2e007ab5d8e98f241e5e.png"},{"id":402,"membersId":129324,"dateAdded":"2023-03-19T19:33:30.000Z","lastUpdated":"2023-04-08T19:46:14.000Z","status":1,"totalPoints":85870,"rankingPoints":85870,"totalPass":10,"totalFc":6,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":354,"bracketLevel":238,"footswitchLevel":243,"jackLevel":397,"sideswitchLevel":195,"doublestepLevel":206,"staminaLevel":175,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DarwynHyena","sex":"Male","profileImg":"https://i.imgur.com/Fg7ku48.png"},{"id":522,"membersId":74441,"dateAdded":"2023-03-20T18:48:40.000Z","lastUpdated":"2023-05-06T03:18:29.000Z","status":1,"totalPoints":85699,"rankingPoints":85699,"totalPass":13,"totalFc":4,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":384,"bracketLevel":433,"footswitchLevel":452,"jackLevel":310,"sideswitchLevel":529,"doublestepLevel":448,"staminaLevel":156,"isBuddy":false,"preferences":"{\"discordId\":\"Crash Cringle#0001\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"CrashCringle12","sex":"Male","profileImg":""},{"id":787,"membersId":175516,"dateAdded":"2023-03-25T17:20:53.000Z","lastUpdated":"2023-05-01T13:01:55.000Z","status":1,"totalPoints":88986,"rankingPoints":84900,"totalPass":64,"totalFc":18,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1003,"bracketLevel":102,"footswitchLevel":238,"jackLevel":136,"sideswitchLevel":35,"doublestepLevel":499,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":\"joonamo#3988\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"joonamo","sex":"Unspecified","profileImg":"https://raw.githubusercontent.com/joonamo/joonamodotcom/main/public/android-chrome-192x192.png"},{"id":1169,"membersId":172953,"dateAdded":"2023-04-20T00:29:24.000Z","lastUpdated":"2023-04-26T23:28:06.000Z","status":1,"totalPoints":84422,"rankingPoints":84422,"totalPass":10,"totalFc":4,"totalFec":7,"totalQuad":4,"totalQuint":0,"crossoverLevel":715,"bracketLevel":319,"footswitchLevel":356,"jackLevel":252,"sideswitchLevel":310,"doublestepLevel":741,"staminaLevel":112,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JEN86","sex":"Male","profileImg":""},{"id":1190,"membersId":113748,"dateAdded":"2023-04-22T22:38:52.000Z","lastUpdated":"2023-04-28T02:23:18.000Z","status":1,"totalPoints":84339,"rankingPoints":84339,"totalPass":20,"totalFc":7,"totalFec":3,"totalQuad":1,"totalQuint":0,"crossoverLevel":549,"bracketLevel":323,"footswitchLevel":368,"jackLevel":82,"sideswitchLevel":123,"doublestepLevel":432,"staminaLevel":228,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XEPH3R","sex":"Male","profileImg":""},{"id":1072,"membersId":175774,"dateAdded":"2023-04-09T19:27:54.000Z","lastUpdated":"2023-04-11T03:39:54.000Z","status":1,"totalPoints":84295,"rankingPoints":84295,"totalPass":53,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":663,"bracketLevel":221,"footswitchLevel":437,"jackLevel":156,"sideswitchLevel":110,"doublestepLevel":514,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ismaess48","sex":"Unspecified","profileImg":""},{"id":1043,"membersId":175743,"dateAdded":"2023-04-07T05:39:07.000Z","lastUpdated":"2023-04-28T23:07:59.000Z","status":1,"totalPoints":83332,"rankingPoints":83332,"totalPass":21,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":471,"bracketLevel":318,"footswitchLevel":528,"jackLevel":332,"sideswitchLevel":275,"doublestepLevel":232,"staminaLevel":153,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DC.MAX-TCOL","sex":"Male","profileImg":""},{"id":796,"membersId":173661,"dateAdded":"2023-03-25T19:07:26.000Z","lastUpdated":"2023-04-30T19:45:58.000Z","status":1,"totalPoints":83328,"rankingPoints":83328,"totalPass":36,"totalFc":20,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":718,"bracketLevel":273,"footswitchLevel":377,"jackLevel":353,"sideswitchLevel":230,"doublestepLevel":452,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":\"flow#6577\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"volt20","sex":"Unspecified","profileImg":""},{"id":1094,"membersId":66472,"dateAdded":"2023-04-11T13:34:43.000Z","lastUpdated":"2023-04-30T14:19:22.000Z","status":1,"totalPoints":82888,"rankingPoints":82888,"totalPass":6,"totalFc":7,"totalFec":16,"totalQuad":9,"totalQuint":0,"crossoverLevel":984,"bracketLevel":140,"footswitchLevel":339,"jackLevel":141,"sideswitchLevel":115,"doublestepLevel":457,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Silke","sex":"Female","profileImg":""},{"id":32,"membersId":46750,"dateAdded":"2023-03-18T21:48:57.000Z","lastUpdated":"2023-03-25T23:30:03.000Z","status":1,"totalPoints":82746,"rankingPoints":82746,"totalPass":10,"totalFc":4,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":504,"bracketLevel":334,"footswitchLevel":497,"jackLevel":225,"sideswitchLevel":1370,"doublestepLevel":482,"staminaLevel":228,"isBuddy":false,"preferences":"{\"discordId\":\"ashastral#9999\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ashastral","sex":"Unspecified","profileImg":"https://i.imgur.com/It0uRbP.jpg"},{"id":422,"membersId":173277,"dateAdded":"2023-03-19T21:10:01.000Z","lastUpdated":"2023-03-20T01:25:09.000Z","status":1,"totalPoints":82472,"rankingPoints":82472,"totalPass":30,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":595,"bracketLevel":394,"footswitchLevel":456,"jackLevel":493,"sideswitchLevel":132,"doublestepLevel":769,"staminaLevel":62,"isBuddy":false,"preferences":"{\"discordId\":\"cg505#0922\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"cg505","sex":"Unspecified","profileImg":""},{"id":449,"membersId":173637,"dateAdded":"2023-03-20T00:41:10.000Z","lastUpdated":"2023-05-06T01:23:12.000Z","status":1,"totalPoints":82327,"rankingPoints":82327,"totalPass":38,"totalFc":15,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":744,"bracketLevel":197,"footswitchLevel":511,"jackLevel":292,"sideswitchLevel":117,"doublestepLevel":609,"staminaLevel":49,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"hlp","sex":"Unspecified","profileImg":"https://i.imgur.com/MxgHjJL.png"},{"id":715,"membersId":127930,"dateAdded":"2023-03-24T01:04:24.000Z","lastUpdated":"2023-04-22T21:39:02.000Z","status":1,"totalPoints":81758,"rankingPoints":81758,"totalPass":14,"totalFc":15,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":998,"bracketLevel":174,"footswitchLevel":405,"jackLevel":64,"sideswitchLevel":225,"doublestepLevel":729,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Astriferous","sex":"Female","profileImg":"https://i.ibb.co/Rh1ZrTM/Picrew1.jpg"},{"id":1108,"membersId":2009,"dateAdded":"2023-04-12T22:17:04.000Z","lastUpdated":"2023-05-03T03:54:52.000Z","status":1,"totalPoints":81591,"rankingPoints":81591,"totalPass":40,"totalFc":10,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":617,"bracketLevel":218,"footswitchLevel":343,"jackLevel":206,"sideswitchLevel":209,"doublestepLevel":476,"staminaLevel":50,"isBuddy":false,"preferences":"{\"discordId\":\"Mixt#8662\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"(TG) TW!X","sex":"Male","profileImg":""},{"id":1062,"membersId":175347,"dateAdded":"2023-04-08T17:08:58.000Z","lastUpdated":"2023-04-08T20:18:22.000Z","status":1,"totalPoints":80811,"rankingPoints":80811,"totalPass":19,"totalFc":1,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":514,"bracketLevel":306,"footswitchLevel":317,"jackLevel":72,"sideswitchLevel":580,"doublestepLevel":275,"staminaLevel":181,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dmtechno","sex":"Unspecified","profileImg":""},{"id":484,"membersId":173550,"dateAdded":"2023-03-20T08:06:42.000Z","lastUpdated":"2023-04-27T02:12:32.000Z","status":1,"totalPoints":81070,"rankingPoints":80501,"totalPass":63,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":930,"bracketLevel":118,"footswitchLevel":387,"jackLevel":149,"sideswitchLevel":19,"doublestepLevel":505,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"twored","sex":"Male","profileImg":""},{"id":469,"membersId":5591,"dateAdded":"2023-03-20T02:55:52.000Z","lastUpdated":"2023-04-29T19:59:08.000Z","status":1,"totalPoints":80394,"rankingPoints":80394,"totalPass":26,"totalFc":18,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":927,"bracketLevel":165,"footswitchLevel":329,"jackLevel":113,"sideswitchLevel":0,"doublestepLevel":578,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":\"Adam Ortiz#7487\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ortiz","sex":"Male","profileImg":"https://i.imgur.com/a5cT6Ek.png"},{"id":972,"membersId":175275,"dateAdded":"2023-04-02T12:22:08.000Z","lastUpdated":"2023-05-05T11:37:24.000Z","status":1,"totalPoints":86854,"rankingPoints":80187,"totalPass":88,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":844,"bracketLevel":93,"footswitchLevel":278,"jackLevel":136,"sideswitchLevel":14,"doublestepLevel":527,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aisumi","sex":"Unspecified","profileImg":""},{"id":815,"membersId":175529,"dateAdded":"2023-03-26T03:39:11.000Z","lastUpdated":"2023-04-30T05:05:58.000Z","status":1,"totalPoints":79947,"rankingPoints":79947,"totalPass":18,"totalFc":12,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":412,"bracketLevel":245,"footswitchLevel":447,"jackLevel":247,"sideswitchLevel":455,"doublestepLevel":559,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"toibo.bi","sex":"Unspecified","profileImg":""},{"id":601,"membersId":175425,"dateAdded":"2023-03-21T17:59:58.000Z","lastUpdated":"2023-03-31T20:02:14.000Z","status":1,"totalPoints":79565,"rankingPoints":79565,"totalPass":10,"totalFc":4,"totalFec":2,"totalQuad":6,"totalQuint":0,"crossoverLevel":611,"bracketLevel":308,"footswitchLevel":479,"jackLevel":231,"sideswitchLevel":413,"doublestepLevel":228,"staminaLevel":38,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SMX Stan","sex":"Unspecified","profileImg":""},{"id":1157,"membersId":175887,"dateAdded":"2023-04-18T21:04:49.000Z","lastUpdated":"2023-04-29T23:53:51.000Z","status":1,"totalPoints":79306,"rankingPoints":79306,"totalPass":19,"totalFc":6,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":670,"bracketLevel":41,"footswitchLevel":231,"jackLevel":347,"sideswitchLevel":71,"doublestepLevel":712,"staminaLevel":47,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"M1L4","sex":"Male","profileImg":""},{"id":924,"membersId":175608,"dateAdded":"2023-03-30T17:18:08.000Z","lastUpdated":"2023-04-01T20:06:07.000Z","status":1,"totalPoints":77923,"rankingPoints":77923,"totalPass":20,"totalFc":4,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":374,"bracketLevel":263,"footswitchLevel":330,"jackLevel":70,"sideswitchLevel":332,"doublestepLevel":146,"staminaLevel":159,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GospelEXEBar","sex":"Unspecified","profileImg":""},{"id":284,"membersId":6027,"dateAdded":"2023-03-19T03:03:14.000Z","lastUpdated":"2023-04-01T20:59:39.000Z","status":1,"totalPoints":77895,"rankingPoints":77895,"totalPass":39,"totalFc":22,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":763,"bracketLevel":182,"footswitchLevel":394,"jackLevel":148,"sideswitchLevel":0,"doublestepLevel":543,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"b4mv","sex":"Male","profileImg":""},{"id":307,"membersId":174829,"dateAdded":"2023-03-19T04:58:16.000Z","lastUpdated":"2023-03-22T10:59:19.000Z","status":1,"totalPoints":77489,"rankingPoints":77489,"totalPass":18,"totalFc":13,"totalFec":18,"totalQuad":0,"totalQuint":0,"crossoverLevel":879,"bracketLevel":136,"footswitchLevel":277,"jackLevel":179,"sideswitchLevel":121,"doublestepLevel":735,"staminaLevel":57,"isBuddy":false,"preferences":"{\"discordId\":\"Oscar#9001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pogscar","sex":"Male","profileImg":""},{"id":580,"membersId":5727,"dateAdded":"2023-03-21T04:05:06.000Z","lastUpdated":"2023-04-13T05:11:36.000Z","status":1,"totalPoints":77253,"rankingPoints":77253,"totalPass":12,"totalFc":21,"totalFec":24,"totalQuad":0,"totalQuint":0,"crossoverLevel":956,"bracketLevel":144,"footswitchLevel":263,"jackLevel":98,"sideswitchLevel":0,"doublestepLevel":555,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pangolin","sex":"Female","profileImg":""},{"id":770,"membersId":173752,"dateAdded":"2023-03-25T07:05:58.000Z","lastUpdated":"2023-05-02T00:03:14.000Z","status":1,"totalPoints":77222,"rankingPoints":77222,"totalPass":50,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":756,"bracketLevel":194,"footswitchLevel":355,"jackLevel":104,"sideswitchLevel":78,"doublestepLevel":349,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mikerob","sex":"Male","profileImg":""},{"id":691,"membersId":173396,"dateAdded":"2023-03-23T01:31:52.000Z","lastUpdated":"2023-04-13T16:27:14.000Z","status":1,"totalPoints":77197,"rankingPoints":77197,"totalPass":11,"totalFc":6,"totalFec":13,"totalQuad":6,"totalQuint":0,"crossoverLevel":870,"bracketLevel":162,"footswitchLevel":381,"jackLevel":121,"sideswitchLevel":295,"doublestepLevel":588,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":\"pauliwrath#5917\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pauliwrath","sex":"Male","profileImg":"https://img.rankedboost.com/wp-content/uploads/2020/06/Poliwrath-Pokemon-Sword-and-Shield.png"},{"id":973,"membersId":175661,"dateAdded":"2023-04-02T14:41:46.000Z","lastUpdated":"2023-04-22T22:25:56.000Z","status":1,"totalPoints":77052,"rankingPoints":77052,"totalPass":31,"totalFc":17,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":726,"bracketLevel":97,"footswitchLevel":228,"jackLevel":147,"sideswitchLevel":187,"doublestepLevel":532,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZZUnlimited","sex":"Male","profileImg":"https://s2.narvii.com/image/7egsb4ibhzoeeychp63amnd6rvo226c3_128.jpg"},{"id":1191,"membersId":175950,"dateAdded":"2023-04-23T01:52:41.000Z","lastUpdated":"2023-04-23T04:30:45.000Z","status":1,"totalPoints":76741,"rankingPoints":76741,"totalPass":24,"totalFc":4,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":576,"bracketLevel":184,"footswitchLevel":387,"jackLevel":161,"sideswitchLevel":191,"doublestepLevel":509,"staminaLevel":52,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fredo","sex":"Male","profileImg":""},{"id":103,"membersId":173303,"dateAdded":"2023-03-18T21:53:31.000Z","lastUpdated":"2023-05-06T20:00:18.000Z","status":1,"totalPoints":75888,"rankingPoints":75888,"totalPass":61,"totalFc":10,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":868,"bracketLevel":88,"footswitchLevel":312,"jackLevel":106,"sideswitchLevel":0,"doublestepLevel":505,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":\"Avaloneum#4115\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Avaloneum","sex":"Female","profileImg":""},{"id":485,"membersId":175407,"dateAdded":"2023-03-20T08:57:40.000Z","lastUpdated":"2023-05-06T08:52:37.000Z","status":1,"totalPoints":75830,"rankingPoints":75830,"totalPass":60,"totalFc":11,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":832,"bracketLevel":151,"footswitchLevel":253,"jackLevel":110,"sideswitchLevel":0,"doublestepLevel":529,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":\"Ninomae Nimo (一ニモ)#0158\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nimocchi","sex":"Unspecified","profileImg":""},{"id":546,"membersId":174955,"dateAdded":"2023-03-20T21:49:22.000Z","lastUpdated":"2023-04-03T17:07:35.000Z","status":1,"totalPoints":75416,"rankingPoints":75416,"totalPass":48,"totalFc":19,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":731,"bracketLevel":109,"footswitchLevel":286,"jackLevel":130,"sideswitchLevel":0,"doublestepLevel":659,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ucoa","sex":"Unspecified","profileImg":""},{"id":628,"membersId":127790,"dateAdded":"2023-03-22T00:55:20.000Z","lastUpdated":"2023-04-05T17:50:37.000Z","status":1,"totalPoints":75015,"rankingPoints":75015,"totalPass":12,"totalFc":5,"totalFec":17,"totalQuad":0,"totalQuint":0,"crossoverLevel":651,"bracketLevel":107,"footswitchLevel":225,"jackLevel":241,"sideswitchLevel":31,"doublestepLevel":549,"staminaLevel":37,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"emcat","sex":"Female","profileImg":"https://66.media.tumblr.com/96e64398d029e21502402b070fecda43/tumblr_pvwcak806k1x3sogho3_250.png"},{"id":888,"membersId":173710,"dateAdded":"2023-03-29T01:51:13.000Z","lastUpdated":"2023-05-02T03:40:35.000Z","status":1,"totalPoints":74802,"rankingPoints":74802,"totalPass":29,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":668,"bracketLevel":366,"footswitchLevel":403,"jackLevel":337,"sideswitchLevel":83,"doublestepLevel":549,"staminaLevel":45,"isBuddy":false,"preferences":"{\"discordId\":\"gentu#3606\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gentu","sex":"Male","profileImg":""},{"id":742,"membersId":173434,"dateAdded":"2023-03-24T20:53:22.000Z","lastUpdated":"2023-03-25T20:01:38.000Z","status":1,"totalPoints":74503,"rankingPoints":74503,"totalPass":5,"totalFc":1,"totalFec":6,"totalQuad":6,"totalQuint":0,"crossoverLevel":369,"bracketLevel":354,"footswitchLevel":415,"jackLevel":386,"sideswitchLevel":44,"doublestepLevel":281,"staminaLevel":176,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NickTrioxin","sex":"Unspecified","profileImg":""},{"id":592,"membersId":80607,"dateAdded":"2023-03-21T12:43:11.000Z","lastUpdated":"2023-04-30T11:13:57.000Z","status":1,"totalPoints":73964,"rankingPoints":73964,"totalPass":27,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":382,"bracketLevel":303,"footswitchLevel":359,"jackLevel":168,"sideswitchLevel":171,"doublestepLevel":253,"staminaLevel":233,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stefe","sex":"Male","profileImg":""},{"id":1251,"membersId":5207,"dateAdded":"2023-04-30T02:46:42.000Z","lastUpdated":"2023-04-30T04:20:32.000Z","status":1,"totalPoints":73945,"rankingPoints":73945,"totalPass":14,"totalFc":7,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":549,"bracketLevel":145,"footswitchLevel":329,"jackLevel":74,"sideswitchLevel":455,"doublestepLevel":640,"staminaLevel":113,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kanji666","sex":"Male","profileImg":""},{"id":66,"membersId":46152,"dateAdded":"2023-03-18T21:49:51.000Z","lastUpdated":"2023-04-23T21:31:37.000Z","status":1,"totalPoints":72784,"rankingPoints":72784,"totalPass":3,"totalFc":3,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":447,"bracketLevel":97,"footswitchLevel":452,"jackLevel":337,"sideswitchLevel":309,"doublestepLevel":585,"staminaLevel":110,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gerald","sex":"Male","profileImg":"https://i.ibb.co/mh1BK4G/Screenshot-20220526-161726-319-2.png"},{"id":604,"membersId":174237,"dateAdded":"2023-03-21T18:50:34.000Z","lastUpdated":"2023-05-05T19:09:34.000Z","status":1,"totalPoints":72506,"rankingPoints":72506,"totalPass":55,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":858,"bracketLevel":114,"footswitchLevel":299,"jackLevel":89,"sideswitchLevel":18,"doublestepLevel":393,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"Reina#9841\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Reina0111","sex":"Female","profileImg":"https://i.imgur.com/XnSpwDi.png"},{"id":840,"membersId":173400,"dateAdded":"2023-03-26T22:18:28.000Z","lastUpdated":"2023-05-02T01:13:43.000Z","status":1,"totalPoints":72447,"rankingPoints":72447,"totalPass":52,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":584,"bracketLevel":81,"footswitchLevel":270,"jackLevel":167,"sideswitchLevel":230,"doublestepLevel":381,"staminaLevel":21,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fblthp","sex":"Female","profileImg":""},{"id":200,"membersId":170802,"dateAdded":"2023-03-18T23:16:43.000Z","lastUpdated":"2023-05-04T15:12:44.000Z","status":1,"totalPoints":71636,"rankingPoints":71636,"totalPass":20,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":501,"bracketLevel":376,"footswitchLevel":346,"jackLevel":187,"sideswitchLevel":975,"doublestepLevel":323,"staminaLevel":136,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PerfectTaste","sex":"Male","profileImg":""},{"id":1262,"membersId":172689,"dateAdded":"2023-05-01T14:42:41.000Z","lastUpdated":"2023-05-04T16:39:53.000Z","status":1,"totalPoints":71535,"rankingPoints":71535,"totalPass":27,"totalFc":20,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":709,"bracketLevel":93,"footswitchLevel":369,"jackLevel":249,"sideswitchLevel":160,"doublestepLevel":754,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":\"Yuiko#3000\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yuiko","sex":"Unspecified","profileImg":""},{"id":884,"membersId":1481,"dateAdded":"2023-03-28T22:52:20.000Z","lastUpdated":"2023-04-05T23:09:20.000Z","status":1,"totalPoints":71025,"rankingPoints":71025,"totalPass":22,"totalFc":12,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":754,"bracketLevel":8,"footswitchLevel":373,"jackLevel":141,"sideswitchLevel":85,"doublestepLevel":763,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kimalaka","sex":"Female","profileImg":""},{"id":487,"membersId":174207,"dateAdded":"2023-03-20T11:17:19.000Z","lastUpdated":"2023-05-04T15:47:15.000Z","status":1,"totalPoints":70797,"rankingPoints":70797,"totalPass":39,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":710,"bracketLevel":109,"footswitchLevel":451,"jackLevel":201,"sideswitchLevel":225,"doublestepLevel":447,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":\"Meta-link#4622\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Meta-link","sex":"Male","profileImg":"https://i.ibb.co/hBrnH4B/tux-200.png"},{"id":935,"membersId":7107,"dateAdded":"2023-03-31T02:42:18.000Z","lastUpdated":"2023-04-23T23:28:53.000Z","status":1,"totalPoints":70531,"rankingPoints":70531,"totalPass":12,"totalFc":10,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":528,"bracketLevel":120,"footswitchLevel":323,"jackLevel":222,"sideswitchLevel":64,"doublestepLevel":337,"staminaLevel":57,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"yyr","sex":"Male","profileImg":""},{"id":459,"membersId":8157,"dateAdded":"2023-03-20T01:48:31.000Z","lastUpdated":"2023-04-29T00:26:50.000Z","status":1,"totalPoints":70364,"rankingPoints":70364,"totalPass":0,"totalFc":3,"totalFec":11,"totalQuad":3,"totalQuint":0,"crossoverLevel":465,"bracketLevel":178,"footswitchLevel":496,"jackLevel":85,"sideswitchLevel":173,"doublestepLevel":388,"staminaLevel":159,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BONG","sex":"Male","profileImg":""},{"id":1170,"membersId":175912,"dateAdded":"2023-04-20T07:12:40.000Z","lastUpdated":"2023-05-01T00:13:06.000Z","status":1,"totalPoints":69961,"rankingPoints":69961,"totalPass":19,"totalFc":2,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":375,"bracketLevel":158,"footswitchLevel":269,"jackLevel":90,"sideswitchLevel":315,"doublestepLevel":258,"staminaLevel":106,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mr3dimensional","sex":"Unspecified","profileImg":""},{"id":178,"membersId":173564,"dateAdded":"2023-03-18T22:41:11.000Z","lastUpdated":"2023-04-07T00:55:47.000Z","status":1,"totalPoints":69805,"rankingPoints":69805,"totalPass":30,"totalFc":27,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":670,"bracketLevel":100,"footswitchLevel":254,"jackLevel":116,"sideswitchLevel":215,"doublestepLevel":467,"staminaLevel":14,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AppleDew","sex":"Female","profileImg":"https://i.imgur.com/BJSw0iW.jpg"},{"id":388,"membersId":175384,"dateAdded":"2023-03-19T17:54:04.000Z","lastUpdated":"2023-03-30T14:30:26.000Z","status":1,"totalPoints":68689,"rankingPoints":68689,"totalPass":33,"totalFc":21,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":750,"bracketLevel":22,"footswitchLevel":268,"jackLevel":253,"sideswitchLevel":88,"doublestepLevel":565,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":\"HeySora#4033\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HeySora","sex":"Female","profileImg":"https://www.heysora.net/img/Sora250.png"},{"id":625,"membersId":44927,"dateAdded":"2023-03-21T23:45:18.000Z","lastUpdated":"2023-05-04T01:09:29.000Z","status":1,"totalPoints":68146,"rankingPoints":68146,"totalPass":4,"totalFc":1,"totalFec":12,"totalQuad":3,"totalQuint":0,"crossoverLevel":487,"bracketLevel":74,"footswitchLevel":393,"jackLevel":37,"sideswitchLevel":605,"doublestepLevel":248,"staminaLevel":46,"isBuddy":true,"preferences":"{\"discordId\":\"Loak#7662\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Loak","sex":"Male","profileImg":"https://i.imgur.com/xQ4Er5B.jpg"},{"id":1125,"membersId":173463,"dateAdded":"2023-04-15T05:10:04.000Z","lastUpdated":"2023-04-25T09:15:25.000Z","status":1,"totalPoints":66100,"rankingPoints":66100,"totalPass":1,"totalFc":3,"totalFec":8,"totalQuad":6,"totalQuint":0,"crossoverLevel":399,"bracketLevel":196,"footswitchLevel":374,"jackLevel":170,"sideswitchLevel":284,"doublestepLevel":270,"staminaLevel":74,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Roscoe","sex":"Male","profileImg":""},{"id":532,"membersId":173360,"dateAdded":"2023-03-20T19:34:27.000Z","lastUpdated":"2023-05-02T22:40:50.000Z","status":1,"totalPoints":66025,"rankingPoints":66025,"totalPass":42,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":639,"bracketLevel":26,"footswitchLevel":260,"jackLevel":165,"sideswitchLevel":61,"doublestepLevel":274,"staminaLevel":37,"isBuddy":false,"preferences":"{\"discordId\":\"dyne322#6039\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dyne322","sex":"Male","profileImg":""},{"id":511,"membersId":136228,"dateAdded":"2023-03-20T16:55:43.000Z","lastUpdated":"2023-04-07T01:59:30.000Z","status":1,"totalPoints":65754,"rankingPoints":65754,"totalPass":35,"totalFc":10,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":627,"bracketLevel":58,"footswitchLevel":379,"jackLevel":145,"sideswitchLevel":46,"doublestepLevel":440,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":\"SawBo#7089\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"SawBo","sex":"Unspecified","profileImg":""},{"id":137,"membersId":173279,"dateAdded":"2023-03-18T22:06:27.000Z","lastUpdated":"2023-04-03T22:27:21.000Z","status":1,"totalPoints":65548,"rankingPoints":65548,"totalPass":52,"totalFc":14,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":778,"bracketLevel":117,"footswitchLevel":265,"jackLevel":127,"sideswitchLevel":0,"doublestepLevel":368,"staminaLevel":7,"isBuddy":false,"preferences":"{\"discordId\":\"KitGamer#5023\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"KitGamer","sex":"Male","profileImg":""},{"id":944,"membersId":175630,"dateAdded":"2023-04-01T01:06:04.000Z","lastUpdated":"2023-04-29T01:09:45.000Z","status":1,"totalPoints":64709,"rankingPoints":64709,"totalPass":20,"totalFc":12,"totalFec":10,"totalQuad":2,"totalQuint":0,"crossoverLevel":794,"bracketLevel":247,"footswitchLevel":324,"jackLevel":43,"sideswitchLevel":33,"doublestepLevel":524,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Frosebas","sex":"Unspecified","profileImg":""},{"id":293,"membersId":75622,"dateAdded":"2023-03-19T03:44:04.000Z","lastUpdated":"2023-04-13T00:41:56.000Z","status":1,"totalPoints":64632,"rankingPoints":64632,"totalPass":57,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":763,"bracketLevel":112,"footswitchLevel":215,"jackLevel":99,"sideswitchLevel":0,"doublestepLevel":369,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FuriousDCSL","sex":"Unspecified","profileImg":""},{"id":958,"membersId":132053,"dateAdded":"2023-04-01T18:45:50.000Z","lastUpdated":"2023-04-15T04:29:13.000Z","status":1,"totalPoints":64595,"rankingPoints":64595,"totalPass":23,"totalFc":13,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":619,"bracketLevel":143,"footswitchLevel":146,"jackLevel":120,"sideswitchLevel":58,"doublestepLevel":366,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pball0010","sex":"Male","profileImg":""},{"id":1283,"membersId":35619,"dateAdded":"2023-05-03T22:06:07.000Z","lastUpdated":"2023-05-05T21:15:07.000Z","status":1,"totalPoints":63975,"rankingPoints":63975,"totalPass":8,"totalFc":4,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":437,"bracketLevel":137,"footswitchLevel":300,"jackLevel":310,"sideswitchLevel":40,"doublestepLevel":480,"staminaLevel":88,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nico","sex":"Unspecified","profileImg":"https://i.imgur.com/d0GKcl7.png"},{"id":983,"membersId":175667,"dateAdded":"2023-04-02T22:39:06.000Z","lastUpdated":"2023-04-29T02:23:29.000Z","status":1,"totalPoints":63504,"rankingPoints":63504,"totalPass":27,"totalFc":10,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":676,"bracketLevel":192,"footswitchLevel":336,"jackLevel":220,"sideswitchLevel":67,"doublestepLevel":546,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"psychodellic","sex":"Male","profileImg":""},{"id":635,"membersId":77316,"dateAdded":"2023-03-22T02:58:10.000Z","lastUpdated":"2023-04-29T17:20:18.000Z","status":1,"totalPoints":63293,"rankingPoints":63293,"totalPass":11,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":449,"bracketLevel":213,"footswitchLevel":262,"jackLevel":112,"sideswitchLevel":142,"doublestepLevel":537,"staminaLevel":174,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AMBONES","sex":"Female","profileImg":"https://i.imgur.com/YDwuAgA.jpg"},{"id":378,"membersId":175058,"dateAdded":"2023-03-19T17:30:42.000Z","lastUpdated":"2023-04-22T11:09:55.000Z","status":1,"totalPoints":62150,"rankingPoints":62150,"totalPass":41,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":550,"bracketLevel":217,"footswitchLevel":319,"jackLevel":170,"sideswitchLevel":244,"doublestepLevel":307,"staminaLevel":67,"isBuddy":false,"preferences":"{\"discordId\":\"ImTonyOfficial#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Antocc94","sex":"Male","profileImg":""},{"id":400,"membersId":66708,"dateAdded":"2023-03-19T19:11:55.000Z","lastUpdated":"2023-04-23T02:22:50.000Z","status":1,"totalPoints":61550,"rankingPoints":61550,"totalPass":22,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":306,"bracketLevel":146,"footswitchLevel":342,"jackLevel":269,"sideswitchLevel":105,"doublestepLevel":212,"staminaLevel":89,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NNNNNN","sex":"Male","profileImg":""},{"id":172,"membersId":173110,"dateAdded":"2023-03-18T22:35:55.000Z","lastUpdated":"2023-04-11T20:19:54.000Z","status":1,"totalPoints":61119,"rankingPoints":61119,"totalPass":3,"totalFc":0,"totalFec":6,"totalQuad":6,"totalQuint":0,"crossoverLevel":323,"bracketLevel":285,"footswitchLevel":464,"jackLevel":22,"sideswitchLevel":366,"doublestepLevel":131,"staminaLevel":91,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shane_ITG_","sex":"Male","profileImg":"https://i.imgur.com/0kFu4Vz.png"},{"id":1051,"membersId":174901,"dateAdded":"2023-04-07T20:11:46.000Z","lastUpdated":"2023-05-02T23:34:39.000Z","status":1,"totalPoints":60739,"rankingPoints":60739,"totalPass":6,"totalFc":1,"totalFec":12,"totalQuad":1,"totalQuint":0,"crossoverLevel":371,"bracketLevel":8,"footswitchLevel":162,"jackLevel":208,"sideswitchLevel":0,"doublestepLevel":319,"staminaLevel":58,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DanielsanX4A","sex":"Male","profileImg":"https://i.imgur.com/Tux177gm.jpg"},{"id":239,"membersId":127868,"dateAdded":"2023-03-19T00:45:46.000Z","lastUpdated":"2023-04-27T04:38:57.000Z","status":1,"totalPoints":60454,"rankingPoints":60454,"totalPass":15,"totalFc":21,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":789,"bracketLevel":140,"footswitchLevel":173,"jackLevel":46,"sideswitchLevel":0,"doublestepLevel":261,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"chroma","sex":"Female","profileImg":""},{"id":750,"membersId":173126,"dateAdded":"2023-03-24T23:33:32.000Z","lastUpdated":"2023-04-25T02:23:25.000Z","status":1,"totalPoints":60341,"rankingPoints":60341,"totalPass":44,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":653,"bracketLevel":79,"footswitchLevel":183,"jackLevel":90,"sideswitchLevel":0,"doublestepLevel":320,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"thepaperkat","sex":"Female","profileImg":""},{"id":1000,"membersId":4991,"dateAdded":"2023-04-04T00:44:17.000Z","lastUpdated":"2023-04-07T22:54:29.000Z","status":1,"totalPoints":60300,"rankingPoints":60300,"totalPass":8,"totalFc":4,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":253,"bracketLevel":397,"footswitchLevel":386,"jackLevel":218,"sideswitchLevel":263,"doublestepLevel":348,"staminaLevel":80,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Luvbun","sex":"Male","profileImg":""},{"id":1218,"membersId":92293,"dateAdded":"2023-04-26T07:56:08.000Z","lastUpdated":"2023-05-06T18:45:55.000Z","status":1,"totalPoints":60161,"rankingPoints":60161,"totalPass":19,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":459,"bracketLevel":126,"footswitchLevel":342,"jackLevel":312,"sideswitchLevel":188,"doublestepLevel":412,"staminaLevel":66,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TaikiHarada","sex":"Male","profileImg":"https://64.media.tumblr.com/7e2a5c32f83e62238a045b2f61c1f74b/tumblr_puefbfYsDt1x3ur5no2_250.png"},{"id":684,"membersId":173544,"dateAdded":"2023-03-22T23:56:00.000Z","lastUpdated":"2023-05-02T03:20:26.000Z","status":1,"totalPoints":59334,"rankingPoints":59334,"totalPass":34,"totalFc":15,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":755,"bracketLevel":100,"footswitchLevel":161,"jackLevel":26,"sideswitchLevel":0,"doublestepLevel":302,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ali_magica","sex":"Female","profileImg":""},{"id":734,"membersId":146112,"dateAdded":"2023-03-24T17:02:48.000Z","lastUpdated":"2023-04-21T02:05:53.000Z","status":1,"totalPoints":59287,"rankingPoints":59287,"totalPass":10,"totalFc":17,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":742,"bracketLevel":31,"footswitchLevel":279,"jackLevel":43,"sideswitchLevel":18,"doublestepLevel":390,"staminaLevel":32,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Eddie_J","sex":"Male","profileImg":""},{"id":1032,"membersId":175728,"dateAdded":"2023-04-06T03:16:31.000Z","lastUpdated":"2023-04-06T05:04:28.000Z","status":1,"totalPoints":58264,"rankingPoints":58264,"totalPass":11,"totalFc":9,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":440,"bracketLevel":29,"footswitchLevel":327,"jackLevel":96,"sideswitchLevel":136,"doublestepLevel":587,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"saiga12","sex":"Unspecified","profileImg":""},{"id":414,"membersId":4057,"dateAdded":"2023-03-19T20:15:13.000Z","lastUpdated":"2023-03-31T00:05:12.000Z","status":1,"totalPoints":58182,"rankingPoints":58182,"totalPass":16,"totalFc":9,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":527,"bracketLevel":202,"footswitchLevel":387,"jackLevel":131,"sideswitchLevel":152,"doublestepLevel":329,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"luda","sex":"Male","profileImg":""},{"id":561,"membersId":35282,"dateAdded":"2023-03-20T23:38:17.000Z","lastUpdated":"2023-03-30T05:44:08.000Z","status":1,"totalPoints":57954,"rankingPoints":57954,"totalPass":23,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":724,"bracketLevel":234,"footswitchLevel":290,"jackLevel":29,"sideswitchLevel":0,"doublestepLevel":221,"staminaLevel":38,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kailaria","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/1087878708007809114/1087878969073877082/pfp.png"},{"id":354,"membersId":172903,"dateAdded":"2023-03-19T15:15:34.000Z","lastUpdated":"2023-03-24T11:13:17.000Z","status":1,"totalPoints":56882,"rankingPoints":56882,"totalPass":15,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":457,"bracketLevel":66,"footswitchLevel":131,"jackLevel":68,"sideswitchLevel":222,"doublestepLevel":142,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"richtr8","sex":"Unspecified","profileImg":"https://i.imgur.com/iY7URQR.png"},{"id":1243,"membersId":173272,"dateAdded":"2023-04-28T20:05:50.000Z","lastUpdated":"2023-05-06T11:43:54.000Z","status":1,"totalPoints":56831,"rankingPoints":56831,"totalPass":39,"totalFc":10,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":655,"bracketLevel":56,"footswitchLevel":199,"jackLevel":140,"sideswitchLevel":0,"doublestepLevel":337,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CobaltSunshine","sex":"Female","profileImg":""},{"id":404,"membersId":174614,"dateAdded":"2023-03-19T19:43:23.000Z","lastUpdated":"2023-05-04T03:56:51.000Z","status":1,"totalPoints":56726,"rankingPoints":56726,"totalPass":15,"totalFc":16,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":541,"bracketLevel":184,"footswitchLevel":238,"jackLevel":174,"sideswitchLevel":0,"doublestepLevel":425,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":\"Lolzep#5723\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lolzep","sex":"Male","profileImg":"https://images2.imgbox.com/4f/82/9jG1iU0v_o.png"},{"id":918,"membersId":4384,"dateAdded":"2023-03-30T09:50:11.000Z","lastUpdated":"2023-04-05T16:21:59.000Z","status":1,"totalPoints":56269,"rankingPoints":56269,"totalPass":34,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":625,"bracketLevel":21,"footswitchLevel":148,"jackLevel":125,"sideswitchLevel":0,"doublestepLevel":439,"staminaLevel":17,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Obi2","sex":"Male","profileImg":""},{"id":687,"membersId":1851,"dateAdded":"2023-03-23T00:42:06.000Z","lastUpdated":"2023-05-06T01:18:43.000Z","status":1,"totalPoints":56206,"rankingPoints":56206,"totalPass":3,"totalFc":20,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":632,"bracketLevel":88,"footswitchLevel":294,"jackLevel":49,"sideswitchLevel":0,"doublestepLevel":264,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":\"EVOriginal#1337\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"EVOriginal","sex":"Male","profileImg":""},{"id":79,"membersId":173719,"dateAdded":"2023-03-18T21:50:28.000Z","lastUpdated":"2023-04-27T23:46:16.000Z","status":1,"totalPoints":55535,"rankingPoints":55535,"totalPass":50,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":669,"bracketLevel":22,"footswitchLevel":192,"jackLevel":106,"sideswitchLevel":0,"doublestepLevel":407,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"Kraite#9145\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kraite","sex":"Male","profileImg":""},{"id":746,"membersId":175488,"dateAdded":"2023-03-24T22:09:16.000Z","lastUpdated":"2023-03-24T23:26:10.000Z","status":1,"totalPoints":55421,"rankingPoints":55421,"totalPass":9,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":138,"bracketLevel":277,"footswitchLevel":389,"jackLevel":105,"sideswitchLevel":206,"doublestepLevel":287,"staminaLevel":307,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"POOH!","sex":"Male","profileImg":""},{"id":531,"membersId":163632,"dateAdded":"2023-03-20T19:30:24.000Z","lastUpdated":"2023-05-01T17:29:19.000Z","status":1,"totalPoints":55086,"rankingPoints":55086,"totalPass":15,"totalFc":34,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":599,"bracketLevel":131,"footswitchLevel":207,"jackLevel":100,"sideswitchLevel":62,"doublestepLevel":228,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Zap","sex":"Male","profileImg":"https://i.imgur.com/p5WFvYr.gif"},{"id":800,"membersId":173221,"dateAdded":"2023-03-25T21:48:53.000Z","lastUpdated":"2023-04-29T03:51:57.000Z","status":1,"totalPoints":54918,"rankingPoints":54918,"totalPass":49,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":556,"bracketLevel":59,"footswitchLevel":259,"jackLevel":61,"sideswitchLevel":40,"doublestepLevel":456,"staminaLevel":19,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"martinbirch","sex":"Unspecified","profileImg":""},{"id":44,"membersId":173683,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-05-06T17:38:05.000Z","status":1,"totalPoints":54704,"rankingPoints":54704,"totalPass":13,"totalFc":17,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":637,"bracketLevel":53,"footswitchLevel":233,"jackLevel":85,"sideswitchLevel":78,"doublestepLevel":335,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":\"TakuMii#6266\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"TakuMii","sex":"Male","profileImg":"https://avatars.akamai.steamstatic.com/24803bdf9d1ac613cc536d28d0e72d48101d63a7_full.jpg"},{"id":819,"membersId":175533,"dateAdded":"2023-03-26T10:43:49.000Z","lastUpdated":"2023-04-28T22:50:39.000Z","status":1,"totalPoints":54702,"rankingPoints":54702,"totalPass":18,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":473,"bracketLevel":40,"footswitchLevel":280,"jackLevel":84,"sideswitchLevel":0,"doublestepLevel":516,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Qoyote","sex":"Unspecified","profileImg":""},{"id":1155,"membersId":175886,"dateAdded":"2023-04-18T17:25:38.000Z","lastUpdated":"2023-05-05T02:16:14.000Z","status":1,"totalPoints":54687,"rankingPoints":54687,"totalPass":18,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":346,"bracketLevel":18,"footswitchLevel":103,"jackLevel":235,"sideswitchLevel":182,"doublestepLevel":190,"staminaLevel":123,"isBuddy":false,"preferences":"{\"discordId\":\"OzuRisa(〃ω〃)#5211\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ozurisa1803","sex":"Male","profileImg":""},{"id":289,"membersId":173308,"dateAdded":"2023-03-19T03:31:36.000Z","lastUpdated":"2023-04-15T16:01:32.000Z","status":1,"totalPoints":54600,"rankingPoints":54600,"totalPass":25,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":497,"bracketLevel":8,"footswitchLevel":170,"jackLevel":104,"sideswitchLevel":29,"doublestepLevel":234,"staminaLevel":44,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"soriin_k","sex":"Male","profileImg":""},{"id":47,"membersId":174173,"dateAdded":"2023-03-18T21:49:03.000Z","lastUpdated":"2023-05-06T23:29:08.000Z","status":1,"totalPoints":54386,"rankingPoints":54386,"totalPass":54,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":570,"bracketLevel":103,"footswitchLevel":199,"jackLevel":68,"sideswitchLevel":0,"doublestepLevel":327,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lillyvideogames","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/910836877647577109/1087038719334289550/aoko-pfp-smol.png"},{"id":1147,"membersId":175862,"dateAdded":"2023-04-17T02:11:05.000Z","lastUpdated":"2023-04-26T02:01:49.000Z","status":1,"totalPoints":54058,"rankingPoints":54058,"totalPass":16,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":255,"bracketLevel":144,"footswitchLevel":337,"jackLevel":43,"sideswitchLevel":51,"doublestepLevel":592,"staminaLevel":31,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"alexadhahn","sex":"Unspecified","profileImg":""},{"id":545,"membersId":173070,"dateAdded":"2023-03-20T21:38:17.000Z","lastUpdated":"2023-04-25T21:26:18.000Z","status":1,"totalPoints":53735,"rankingPoints":53735,"totalPass":7,"totalFc":2,"totalFec":16,"totalQuad":3,"totalQuint":0,"crossoverLevel":408,"bracketLevel":115,"footswitchLevel":295,"jackLevel":190,"sideswitchLevel":0,"doublestepLevel":391,"staminaLevel":32,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Brick Davis","sex":"Unspecified","profileImg":""},{"id":335,"membersId":78188,"dateAdded":"2023-03-19T11:03:00.000Z","lastUpdated":"2023-04-19T20:37:58.000Z","status":1,"totalPoints":53593,"rankingPoints":53593,"totalPass":16,"totalFc":13,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":660,"bracketLevel":106,"footswitchLevel":217,"jackLevel":113,"sideswitchLevel":0,"doublestepLevel":262,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"samross","sex":"Male","profileImg":""},{"id":910,"membersId":5557,"dateAdded":"2023-03-29T23:32:06.000Z","lastUpdated":"2023-05-05T00:32:09.000Z","status":1,"totalPoints":52943,"rankingPoints":52943,"totalPass":17,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":470,"bracketLevel":13,"footswitchLevel":261,"jackLevel":220,"sideswitchLevel":0,"doublestepLevel":273,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kommisar","sex":"Male","profileImg":""},{"id":1166,"membersId":173797,"dateAdded":"2023-04-19T16:34:27.000Z","lastUpdated":"2023-04-19T19:11:31.000Z","status":1,"totalPoints":52886,"rankingPoints":52886,"totalPass":32,"totalFc":12,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":578,"bracketLevel":142,"footswitchLevel":277,"jackLevel":121,"sideswitchLevel":0,"doublestepLevel":374,"staminaLevel":5,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Suolainen","sex":"Male","profileImg":""},{"id":1217,"membersId":176005,"dateAdded":"2023-04-26T06:12:39.000Z","lastUpdated":"2023-04-30T06:14:11.000Z","status":1,"totalPoints":52778,"rankingPoints":52778,"totalPass":15,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":294,"bracketLevel":247,"footswitchLevel":404,"jackLevel":357,"sideswitchLevel":150,"doublestepLevel":294,"staminaLevel":111,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TawkSick","sex":"Unspecified","profileImg":""},{"id":197,"membersId":165854,"dateAdded":"2023-03-18T23:08:53.000Z","lastUpdated":"2023-05-04T19:37:27.000Z","status":1,"totalPoints":52508,"rankingPoints":52508,"totalPass":36,"totalFc":11,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":598,"bracketLevel":108,"footswitchLevel":180,"jackLevel":163,"sideswitchLevel":15,"doublestepLevel":210,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":\"Advanced495#1657\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"Nazrininator","sex":"Male","profileImg":""},{"id":889,"membersId":175335,"dateAdded":"2023-03-29T01:56:32.000Z","lastUpdated":"2023-05-02T02:48:40.000Z","status":1,"totalPoints":52446,"rankingPoints":52446,"totalPass":9,"totalFc":13,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":519,"bracketLevel":118,"footswitchLevel":201,"jackLevel":110,"sideswitchLevel":0,"doublestepLevel":277,"staminaLevel":46,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Milosita ","sex":"Unspecified","profileImg":""},{"id":589,"membersId":4056,"dateAdded":"2023-03-21T11:43:37.000Z","lastUpdated":"2023-05-04T12:24:30.000Z","status":1,"totalPoints":52435,"rankingPoints":52435,"totalPass":10,"totalFc":7,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":525,"bracketLevel":104,"footswitchLevel":311,"jackLevel":31,"sideswitchLevel":119,"doublestepLevel":252,"staminaLevel":64,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PRO.Gemi","sex":"Male","profileImg":"https://gemi.nn.fi/gem-groovestats.png"},{"id":489,"membersId":508,"dateAdded":"2023-03-20T12:10:20.000Z","lastUpdated":"2023-03-25T09:54:03.000Z","status":1,"totalPoints":52280,"rankingPoints":52280,"totalPass":7,"totalFc":8,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":545,"bracketLevel":43,"footswitchLevel":139,"jackLevel":72,"sideswitchLevel":76,"doublestepLevel":185,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"camsta4","sex":"Male","profileImg":""},{"id":309,"membersId":173298,"dateAdded":"2023-03-19T05:12:27.000Z","lastUpdated":"2023-03-24T20:14:43.000Z","status":1,"totalPoints":52252,"rankingPoints":52252,"totalPass":21,"totalFc":6,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":584,"bracketLevel":196,"footswitchLevel":328,"jackLevel":49,"sideswitchLevel":119,"doublestepLevel":231,"staminaLevel":36,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JuiKuen","sex":"Male","profileImg":""},{"id":1034,"membersId":173872,"dateAdded":"2023-04-06T05:00:54.000Z","lastUpdated":"2023-04-24T23:09:49.000Z","status":1,"totalPoints":52151,"rankingPoints":52151,"totalPass":8,"totalFc":3,"totalFec":6,"totalQuad":1,"totalQuint":0,"crossoverLevel":323,"bracketLevel":183,"footswitchLevel":284,"jackLevel":152,"sideswitchLevel":369,"doublestepLevel":280,"staminaLevel":49,"isBuddy":false,"preferences":"{\"discordId\":\"Panaman#1526\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Panaman","sex":"Male","profileImg":"https://i.imgur.com/cAjFamM.png"},{"id":583,"membersId":66508,"dateAdded":"2023-03-21T05:29:21.000Z","lastUpdated":"2023-05-05T14:29:45.000Z","status":1,"totalPoints":51886,"rankingPoints":51886,"totalPass":8,"totalFc":9,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":282,"bracketLevel":214,"footswitchLevel":200,"jackLevel":343,"sideswitchLevel":0,"doublestepLevel":260,"staminaLevel":72,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Horsey","sex":"Male","profileImg":"https://i.imgur.com/BeSsap3.png"},{"id":739,"membersId":3378,"dateAdded":"2023-03-24T18:13:51.000Z","lastUpdated":"2023-03-27T16:33:57.000Z","status":1,"totalPoints":51022,"rankingPoints":51022,"totalPass":14,"totalFc":20,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":662,"bracketLevel":32,"footswitchLevel":202,"jackLevel":65,"sideswitchLevel":220,"doublestepLevel":322,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":\"stsung#1564\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"STsung","sex":"Male","profileImg":""},{"id":923,"membersId":175607,"dateAdded":"2023-03-30T16:51:59.000Z","lastUpdated":"2023-05-03T19:55:02.000Z","status":1,"totalPoints":50662,"rankingPoints":50662,"totalPass":53,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":534,"bracketLevel":106,"footswitchLevel":187,"jackLevel":69,"sideswitchLevel":0,"doublestepLevel":351,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"seroTONEin","sex":"Unspecified","profileImg":""},{"id":1100,"membersId":175808,"dateAdded":"2023-04-12T02:22:18.000Z","lastUpdated":"2023-04-25T21:20:26.000Z","status":1,"totalPoints":50427,"rankingPoints":50427,"totalPass":55,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":613,"bracketLevel":46,"footswitchLevel":185,"jackLevel":87,"sideswitchLevel":0,"doublestepLevel":314,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"arkkeeper","sex":"Male","profileImg":""},{"id":540,"membersId":127793,"dateAdded":"2023-03-20T20:58:22.000Z","lastUpdated":"2023-04-29T17:49:25.000Z","status":1,"totalPoints":50102,"rankingPoints":50102,"totalPass":13,"totalFc":4,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":570,"bracketLevel":82,"footswitchLevel":198,"jackLevel":123,"sideswitchLevel":22,"doublestepLevel":355,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jv","sex":"Male","profileImg":""},{"id":820,"membersId":539,"dateAdded":"2023-03-26T12:16:32.000Z","lastUpdated":"2023-04-11T17:04:31.000Z","status":1,"totalPoints":50046,"rankingPoints":50046,"totalPass":5,"totalFc":10,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":713,"bracketLevel":127,"footswitchLevel":66,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":212,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dancefreak","sex":"Male","profileImg":""},{"id":326,"membersId":113250,"dateAdded":"2023-03-19T08:54:16.000Z","lastUpdated":"2023-04-07T14:27:52.000Z","status":1,"totalPoints":49733,"rankingPoints":49733,"totalPass":3,"totalFc":8,"totalFec":5,"totalQuad":2,"totalQuint":0,"crossoverLevel":418,"bracketLevel":75,"footswitchLevel":109,"jackLevel":156,"sideswitchLevel":11,"doublestepLevel":207,"staminaLevel":140,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RAN.S","sex":"Male","profileImg":"https://i.gyazo.com/083e50397982da4ae42c4546a84b32bc.jpg"},{"id":655,"membersId":175445,"dateAdded":"2023-03-22T16:38:37.000Z","lastUpdated":"2023-04-29T23:05:17.000Z","status":1,"totalPoints":49180,"rankingPoints":49180,"totalPass":55,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":547,"bracketLevel":96,"footswitchLevel":162,"jackLevel":62,"sideswitchLevel":0,"doublestepLevel":355,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"sirmoses#6056\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"sirmoses","sex":"Male","profileImg":""},{"id":1274,"membersId":176074,"dateAdded":"2023-05-02T15:15:47.000Z","lastUpdated":"2023-05-06T18:36:11.000Z","status":1,"totalPoints":49012,"rankingPoints":49012,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":15,"totalQuint":0,"crossoverLevel":516,"bracketLevel":19,"footswitchLevel":319,"jackLevel":82,"sideswitchLevel":92,"doublestepLevel":195,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Juicebinge","sex":"Male","profileImg":""},{"id":666,"membersId":163926,"dateAdded":"2023-03-22T19:35:10.000Z","lastUpdated":"2023-04-22T14:53:48.000Z","status":1,"totalPoints":48970,"rankingPoints":48970,"totalPass":9,"totalFc":3,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":393,"bracketLevel":197,"footswitchLevel":325,"jackLevel":187,"sideswitchLevel":0,"doublestepLevel":78,"staminaLevel":49,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"42","sex":"Male","profileImg":""},{"id":864,"membersId":173560,"dateAdded":"2023-03-27T23:51:28.000Z","lastUpdated":"2023-04-20T19:36:22.000Z","status":1,"totalPoints":47814,"rankingPoints":47814,"totalPass":17,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":500,"bracketLevel":132,"footswitchLevel":98,"jackLevel":279,"sideswitchLevel":0,"doublestepLevel":292,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"slybat","sex":"Unspecified","profileImg":""},{"id":571,"membersId":173349,"dateAdded":"2023-03-21T01:35:23.000Z","lastUpdated":"2023-04-01T02:27:14.000Z","status":1,"totalPoints":47535,"rankingPoints":47535,"totalPass":36,"totalFc":6,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":501,"bracketLevel":117,"footswitchLevel":157,"jackLevel":120,"sideswitchLevel":0,"doublestepLevel":420,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DragonDelgar","sex":"Male","profileImg":""},{"id":778,"membersId":174857,"dateAdded":"2023-03-25T13:00:36.000Z","lastUpdated":"2023-05-06T17:47:21.000Z","status":1,"totalPoints":47227,"rankingPoints":47227,"totalPass":5,"totalFc":3,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":188,"bracketLevel":243,"footswitchLevel":195,"jackLevel":298,"sideswitchLevel":0,"doublestepLevel":368,"staminaLevel":88,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Naraku","sex":"Male","profileImg":""},{"id":927,"membersId":173666,"dateAdded":"2023-03-30T20:48:11.000Z","lastUpdated":"2023-04-06T02:56:24.000Z","status":1,"totalPoints":47092,"rankingPoints":47092,"totalPass":14,"totalFc":2,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":298,"bracketLevel":135,"footswitchLevel":291,"jackLevel":122,"sideswitchLevel":85,"doublestepLevel":478,"staminaLevel":58,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SHIBE","sex":"Male","profileImg":""},{"id":342,"membersId":175360,"dateAdded":"2023-03-19T12:13:12.000Z","lastUpdated":"2023-05-06T15:09:19.000Z","status":1,"totalPoints":46358,"rankingPoints":46358,"totalPass":48,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":472,"bracketLevel":110,"footswitchLevel":156,"jackLevel":20,"sideswitchLevel":0,"doublestepLevel":152,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Goode","sex":"Male","profileImg":""},{"id":1265,"membersId":66741,"dateAdded":"2023-05-01T16:38:45.000Z","lastUpdated":"2023-05-01T20:01:15.000Z","status":1,"totalPoints":46272,"rankingPoints":46272,"totalPass":17,"totalFc":21,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":604,"bracketLevel":68,"footswitchLevel":227,"jackLevel":60,"sideswitchLevel":0,"doublestepLevel":371,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Snowball","sex":"Male","profileImg":""},{"id":682,"membersId":165759,"dateAdded":"2023-03-22T23:29:45.000Z","lastUpdated":"2023-03-28T01:34:13.000Z","status":1,"totalPoints":45964,"rankingPoints":45964,"totalPass":13,"totalFc":10,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":472,"bracketLevel":73,"footswitchLevel":288,"jackLevel":57,"sideswitchLevel":223,"doublestepLevel":206,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":\"triad.duskbreaker#6641\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dusk","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1469849755102633990/uZeP1cio_200x200.jpg"},{"id":242,"membersId":7558,"dateAdded":"2023-03-19T00:50:18.000Z","lastUpdated":"2023-04-20T17:38:03.000Z","status":1,"totalPoints":45695,"rankingPoints":45695,"totalPass":9,"totalFc":8,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":371,"bracketLevel":1,"footswitchLevel":193,"jackLevel":212,"sideswitchLevel":0,"doublestepLevel":263,"staminaLevel":45,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PanStyle","sex":"Male","profileImg":""},{"id":649,"membersId":134276,"dateAdded":"2023-03-22T13:43:05.000Z","lastUpdated":"2023-03-22T19:02:38.000Z","status":1,"totalPoints":45198,"rankingPoints":45198,"totalPass":16,"totalFc":5,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":485,"bracketLevel":110,"footswitchLevel":390,"jackLevel":138,"sideswitchLevel":271,"doublestepLevel":380,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"wermi","sex":"Female","profileImg":"https://i.imgur.com/0cnUevN.png"},{"id":558,"membersId":173516,"dateAdded":"2023-03-20T23:22:04.000Z","lastUpdated":"2023-05-05T03:58:17.000Z","status":1,"totalPoints":45035,"rankingPoints":45035,"totalPass":6,"totalFc":0,"totalFec":10,"totalQuad":2,"totalQuint":0,"crossoverLevel":350,"bracketLevel":123,"footswitchLevel":104,"jackLevel":51,"sideswitchLevel":336,"doublestepLevel":168,"staminaLevel":8,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CernaML","sex":"Male","profileImg":""},{"id":912,"membersId":175592,"dateAdded":"2023-03-29T23:34:21.000Z","lastUpdated":"2023-04-05T05:04:10.000Z","status":1,"totalPoints":44998,"rankingPoints":44998,"totalPass":12,"totalFc":11,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":432,"bracketLevel":110,"footswitchLevel":128,"jackLevel":24,"sideswitchLevel":0,"doublestepLevel":417,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Piles-chan","sex":"Unspecified","profileImg":""},{"id":743,"membersId":175485,"dateAdded":"2023-03-24T21:02:48.000Z","lastUpdated":"2023-04-01T20:38:31.000Z","status":1,"totalPoints":44326,"rankingPoints":44326,"totalPass":52,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":543,"bracketLevel":96,"footswitchLevel":171,"jackLevel":90,"sideswitchLevel":0,"doublestepLevel":182,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MeesterMyst","sex":"Male","profileImg":""},{"id":618,"membersId":175426,"dateAdded":"2023-03-21T22:02:04.000Z","lastUpdated":"2023-04-22T20:58:40.000Z","status":1,"totalPoints":44066,"rankingPoints":44066,"totalPass":14,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":244,"bracketLevel":121,"footswitchLevel":254,"jackLevel":120,"sideswitchLevel":66,"doublestepLevel":174,"staminaLevel":112,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Xtina","sex":"Female","profileImg":""},{"id":476,"membersId":127865,"dateAdded":"2023-03-20T04:28:16.000Z","lastUpdated":"2023-03-20T06:42:05.000Z","status":1,"totalPoints":43551,"rankingPoints":43551,"totalPass":9,"totalFc":3,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":317,"bracketLevel":59,"footswitchLevel":158,"jackLevel":196,"sideswitchLevel":21,"doublestepLevel":130,"staminaLevel":25,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"asellus","sex":"Female","profileImg":"https://i.pinimg.com/236x/0a/f6/ab/0af6abf198404ad70016beb9aa4ae12d.jpg"},{"id":741,"membersId":142618,"dateAdded":"2023-03-24T20:00:18.000Z","lastUpdated":"2023-04-22T18:08:12.000Z","status":1,"totalPoints":43493,"rankingPoints":43493,"totalPass":2,"totalFc":17,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":578,"bracketLevel":38,"footswitchLevel":207,"jackLevel":28,"sideswitchLevel":0,"doublestepLevel":252,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cronoxx","sex":"Male","profileImg":""},{"id":294,"membersId":345,"dateAdded":"2023-03-19T03:45:05.000Z","lastUpdated":"2023-03-19T05:43:59.000Z","status":1,"totalPoints":43463,"rankingPoints":43463,"totalPass":6,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":236,"bracketLevel":166,"footswitchLevel":207,"jackLevel":87,"sideswitchLevel":61,"doublestepLevel":48,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kaze","sex":"Male","profileImg":""},{"id":993,"membersId":174917,"dateAdded":"2023-04-03T22:05:57.000Z","lastUpdated":"2023-05-07T00:03:21.000Z","status":1,"totalPoints":43382,"rankingPoints":43382,"totalPass":15,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":447,"bracketLevel":112,"footswitchLevel":117,"jackLevel":37,"sideswitchLevel":113,"doublestepLevel":180,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Henny","sex":"Unspecified","profileImg":""},{"id":1133,"membersId":175849,"dateAdded":"2023-04-15T21:24:52.000Z","lastUpdated":"2023-05-01T00:03:08.000Z","status":1,"totalPoints":43326,"rankingPoints":43326,"totalPass":11,"totalFc":6,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":418,"bracketLevel":6,"footswitchLevel":124,"jackLevel":5,"sideswitchLevel":0,"doublestepLevel":158,"staminaLevel":16,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sakura69","sex":"Female","profileImg":""},{"id":436,"membersId":175272,"dateAdded":"2023-03-19T22:32:49.000Z","lastUpdated":"2023-04-16T22:44:18.000Z","status":1,"totalPoints":43117,"rankingPoints":43117,"totalPass":9,"totalFc":19,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":589,"bracketLevel":47,"footswitchLevel":243,"jackLevel":55,"sideswitchLevel":100,"doublestepLevel":171,"staminaLevel":14,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"niccalis","sex":"Male","profileImg":""},{"id":943,"membersId":175631,"dateAdded":"2023-04-01T01:01:08.000Z","lastUpdated":"2023-04-23T02:52:53.000Z","status":1,"totalPoints":43099,"rankingPoints":43099,"totalPass":23,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":325,"bracketLevel":183,"footswitchLevel":112,"jackLevel":130,"sideswitchLevel":144,"doublestepLevel":247,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SmileyOuO","sex":"Unspecified","profileImg":""},{"id":8,"membersId":167028,"dateAdded":"2023-03-18T21:48:25.000Z","lastUpdated":"2023-05-03T00:34:27.000Z","status":1,"totalPoints":42586,"rankingPoints":42586,"totalPass":33,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":396,"bracketLevel":101,"footswitchLevel":223,"jackLevel":75,"sideswitchLevel":276,"doublestepLevel":245,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"eightbitderp","sex":"Male","profileImg":"https://i.imgur.com/YAKidX4.png"},{"id":281,"membersId":175376,"dateAdded":"2023-03-19T02:50:59.000Z","lastUpdated":"2023-04-09T06:34:40.000Z","status":1,"totalPoints":42142,"rankingPoints":42142,"totalPass":19,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":408,"bracketLevel":144,"footswitchLevel":278,"jackLevel":159,"sideswitchLevel":0,"doublestepLevel":170,"staminaLevel":25,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bxrru","sex":"Male","profileImg":""},{"id":495,"membersId":26,"dateAdded":"2023-03-20T14:22:38.000Z","lastUpdated":"2023-05-06T18:22:10.000Z","status":1,"totalPoints":41866,"rankingPoints":41866,"totalPass":4,"totalFc":2,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":497,"bracketLevel":202,"footswitchLevel":249,"jackLevel":129,"sideswitchLevel":111,"doublestepLevel":240,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"devilzukin","sex":"Male","profileImg":""},{"id":721,"membersId":173414,"dateAdded":"2023-03-24T02:25:44.000Z","lastUpdated":"2023-03-31T02:39:03.000Z","status":1,"totalPoints":41555,"rankingPoints":41555,"totalPass":32,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":504,"bracketLevel":84,"footswitchLevel":121,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":270,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AxelSparkster","sex":"Unspecified","profileImg":""},{"id":311,"membersId":172887,"dateAdded":"2023-03-19T05:24:23.000Z","lastUpdated":"2023-04-04T09:58:57.000Z","status":1,"totalPoints":41401,"rankingPoints":41401,"totalPass":11,"totalFc":6,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":462,"bracketLevel":15,"footswitchLevel":169,"jackLevel":59,"sideswitchLevel":0,"doublestepLevel":397,"staminaLevel":18,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kashy","sex":"Male","profileImg":""},{"id":788,"membersId":127812,"dateAdded":"2023-03-25T17:42:35.000Z","lastUpdated":"2023-03-25T22:00:41.000Z","status":1,"totalPoints":40024,"rankingPoints":40024,"totalPass":3,"totalFc":23,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":537,"bracketLevel":83,"footswitchLevel":84,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":254,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"MrCreteture#8426\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrCrete","sex":"Male","profileImg":""},{"id":1130,"membersId":173326,"dateAdded":"2023-04-15T19:49:59.000Z","lastUpdated":"2023-04-15T23:22:35.000Z","status":1,"totalPoints":39538,"rankingPoints":39538,"totalPass":13,"totalFc":2,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":571,"bracketLevel":61,"footswitchLevel":196,"jackLevel":127,"sideswitchLevel":59,"doublestepLevel":373,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Arroyo!!","sex":"Unspecified","profileImg":""},{"id":232,"membersId":2910,"dateAdded":"2023-03-19T00:35:39.000Z","lastUpdated":"2023-04-10T00:25:32.000Z","status":1,"totalPoints":38896,"rankingPoints":38896,"totalPass":1,"totalFc":9,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":237,"bracketLevel":18,"footswitchLevel":79,"jackLevel":59,"sideswitchLevel":0,"doublestepLevel":144,"staminaLevel":230,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vagabond","sex":"Male","profileImg":"https://www.personality-database.com/profile_images/152769.png"},{"id":624,"membersId":75812,"dateAdded":"2023-03-21T23:44:06.000Z","lastUpdated":"2023-04-21T01:32:25.000Z","status":1,"totalPoints":38826,"rankingPoints":38826,"totalPass":13,"totalFc":9,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":249,"bracketLevel":76,"footswitchLevel":202,"jackLevel":39,"sideswitchLevel":0,"doublestepLevel":159,"staminaLevel":23,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mastamaxx","sex":"Male","profileImg":""},{"id":616,"membersId":175428,"dateAdded":"2023-03-21T21:49:38.000Z","lastUpdated":"2023-04-02T15:06:37.000Z","status":1,"totalPoints":38688,"rankingPoints":38688,"totalPass":11,"totalFc":3,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":315,"bracketLevel":361,"footswitchLevel":221,"jackLevel":333,"sideswitchLevel":116,"doublestepLevel":542,"staminaLevel":56,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DinkusITC","sex":"Male","profileImg":""},{"id":1162,"membersId":175890,"dateAdded":"2023-04-19T02:29:44.000Z","lastUpdated":"2023-05-06T18:54:07.000Z","status":1,"totalPoints":38408,"rankingPoints":38408,"totalPass":48,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":466,"bracketLevel":20,"footswitchLevel":121,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":246,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mapwithtable","sex":"Female","profileImg":""},{"id":717,"membersId":66799,"dateAdded":"2023-03-24T01:44:02.000Z","lastUpdated":"2023-04-21T01:51:59.000Z","status":1,"totalPoints":38295,"rankingPoints":38295,"totalPass":4,"totalFc":14,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":264,"bracketLevel":67,"footswitchLevel":280,"jackLevel":241,"sideswitchLevel":280,"doublestepLevel":280,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BradyRyan","sex":"Male","profileImg":"https://ih1.redbubble.net/image.1177750170.9059/flat,128x,075,f-pad,128x128,f8f8f8.jpg"},{"id":1215,"membersId":173587,"dateAdded":"2023-04-25T21:32:56.000Z","lastUpdated":"2023-05-06T01:54:00.000Z","status":1,"totalPoints":38093,"rankingPoints":38093,"totalPass":12,"totalFc":14,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":440,"bracketLevel":86,"footswitchLevel":121,"jackLevel":103,"sideswitchLevel":0,"doublestepLevel":427,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sorryari","sex":"Female","profileImg":""},{"id":71,"membersId":173056,"dateAdded":"2023-03-18T21:50:00.000Z","lastUpdated":"2023-05-07T00:44:57.000Z","status":1,"totalPoints":37341,"rankingPoints":37341,"totalPass":40,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":600,"bracketLevel":21,"footswitchLevel":98,"jackLevel":22,"sideswitchLevel":0,"doublestepLevel":151,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Braeden","sex":"Male","profileImg":""},{"id":1149,"membersId":175873,"dateAdded":"2023-04-17T19:06:18.000Z","lastUpdated":"2023-04-22T06:20:50.000Z","status":1,"totalPoints":37270,"rankingPoints":37270,"totalPass":4,"totalFc":1,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":205,"bracketLevel":127,"footswitchLevel":133,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":213,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":\"D D R ⬅⬇⬆➡#0076\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ddrisawesome","sex":"Unspecified","profileImg":""},{"id":1065,"membersId":175769,"dateAdded":"2023-04-08T23:45:01.000Z","lastUpdated":"2023-04-11T03:15:28.000Z","status":1,"totalPoints":37237,"rankingPoints":37237,"totalPass":16,"totalFc":10,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":425,"bracketLevel":149,"footswitchLevel":189,"jackLevel":101,"sideswitchLevel":61,"doublestepLevel":380,"staminaLevel":47,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MattyG","sex":"Male","profileImg":""},{"id":638,"membersId":175370,"dateAdded":"2023-03-22T04:25:45.000Z","lastUpdated":"2023-04-29T00:42:23.000Z","status":1,"totalPoints":36705,"rankingPoints":36705,"totalPass":32,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":432,"bracketLevel":118,"footswitchLevel":199,"jackLevel":84,"sideswitchLevel":0,"doublestepLevel":225,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"trido2","sex":"Male","profileImg":""},{"id":629,"membersId":173759,"dateAdded":"2023-03-22T00:55:40.000Z","lastUpdated":"2023-03-28T04:36:52.000Z","status":1,"totalPoints":36520,"rankingPoints":36520,"totalPass":9,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":270,"bracketLevel":82,"footswitchLevel":122,"jackLevel":131,"sideswitchLevel":127,"doublestepLevel":191,"staminaLevel":77,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kaps","sex":"Male","profileImg":"https://res.cloudinary.com/daipcre3m/image/upload/v1679447081/20230321_174436_250x250_nn6em1.jpg"},{"id":359,"membersId":174873,"dateAdded":"2023-03-19T15:50:29.000Z","lastUpdated":"2023-03-28T00:55:58.000Z","status":1,"totalPoints":36292,"rankingPoints":36292,"totalPass":8,"totalFc":1,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":205,"bracketLevel":343,"footswitchLevel":356,"jackLevel":317,"sideswitchLevel":130,"doublestepLevel":177,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"undrscore","sex":"Male","profileImg":"https://i.imgur.com/EOG7g9B.png"},{"id":255,"membersId":66670,"dateAdded":"2023-03-19T01:30:40.000Z","lastUpdated":"2023-03-20T08:18:05.000Z","status":1,"totalPoints":35711,"rankingPoints":35711,"totalPass":7,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":72,"bracketLevel":149,"footswitchLevel":184,"jackLevel":166,"sideswitchLevel":38,"doublestepLevel":170,"staminaLevel":66,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Staphf","sex":"Unspecified","profileImg":"https://i.ibb.co/0tqcYJ7/TLFGS.png"},{"id":490,"membersId":144942,"dateAdded":"2023-03-20T12:31:10.000Z","lastUpdated":"2023-05-02T15:14:41.000Z","status":1,"totalPoints":35469,"rankingPoints":35469,"totalPass":12,"totalFc":0,"totalFec":2,"totalQuad":1,"totalQuint":0,"crossoverLevel":255,"bracketLevel":51,"footswitchLevel":103,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":14,"staminaLevel":179,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"itg_Kage","sex":"Male","profileImg":""},{"id":1131,"membersId":6059,"dateAdded":"2023-04-15T19:50:10.000Z","lastUpdated":"2023-04-16T00:42:27.000Z","status":1,"totalPoints":35379,"rankingPoints":35379,"totalPass":6,"totalFc":3,"totalFec":6,"totalQuad":1,"totalQuint":0,"crossoverLevel":459,"bracketLevel":13,"footswitchLevel":221,"jackLevel":26,"sideswitchLevel":0,"doublestepLevel":352,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Will_MaxX","sex":"Male","profileImg":""},{"id":498,"membersId":66777,"dateAdded":"2023-03-20T14:39:26.000Z","lastUpdated":"2023-04-16T12:11:33.000Z","status":1,"totalPoints":35340,"rankingPoints":35340,"totalPass":15,"totalFc":16,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":569,"bracketLevel":41,"footswitchLevel":156,"jackLevel":55,"sideswitchLevel":0,"doublestepLevel":414,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"beeabay","sex":"Female","profileImg":"https://i.imgur.com/m4gVZIE.jpg"},{"id":1151,"membersId":175878,"dateAdded":"2023-04-17T23:12:52.000Z","lastUpdated":"2023-04-30T02:15:34.000Z","status":1,"totalPoints":35192,"rankingPoints":35192,"totalPass":7,"totalFc":5,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":222,"bracketLevel":124,"footswitchLevel":210,"jackLevel":102,"sideswitchLevel":106,"doublestepLevel":131,"staminaLevel":98,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jqtran","sex":"Male","profileImg":""},{"id":591,"membersId":66772,"dateAdded":"2023-03-21T12:36:51.000Z","lastUpdated":"2023-04-18T13:44:05.000Z","status":1,"totalPoints":35188,"rankingPoints":35188,"totalPass":12,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":199,"bracketLevel":120,"footswitchLevel":101,"jackLevel":122,"sideswitchLevel":13,"doublestepLevel":196,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"djlunatix","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1445787478191796226/3D8tVoCA_400x400.jpg"},{"id":1122,"membersId":175521,"dateAdded":"2023-04-14T13:47:20.000Z","lastUpdated":"2023-05-04T18:21:19.000Z","status":1,"totalPoints":35058,"rankingPoints":35058,"totalPass":40,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":350,"bracketLevel":23,"footswitchLevel":142,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":118,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zaluzja","sex":"Male","profileImg":""},{"id":565,"membersId":174863,"dateAdded":"2023-03-21T00:14:18.000Z","lastUpdated":"2023-04-05T00:24:06.000Z","status":1,"totalPoints":35046,"rankingPoints":35046,"totalPass":20,"totalFc":12,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":337,"bracketLevel":69,"footswitchLevel":72,"jackLevel":56,"sideswitchLevel":15,"doublestepLevel":281,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tappy","sex":"Unspecified","profileImg":""},{"id":895,"membersId":50387,"dateAdded":"2023-03-29T05:20:10.000Z","lastUpdated":"2023-04-22T21:05:07.000Z","status":1,"totalPoints":35031,"rankingPoints":35031,"totalPass":2,"totalFc":0,"totalFec":4,"totalQuad":10,"totalQuint":0,"crossoverLevel":473,"bracketLevel":23,"footswitchLevel":164,"jackLevel":63,"sideswitchLevel":0,"doublestepLevel":339,"staminaLevel":25,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AndyBurnsITG","sex":"Male","profileImg":""},{"id":781,"membersId":173515,"dateAdded":"2023-03-25T15:10:54.000Z","lastUpdated":"2023-04-16T16:58:15.000Z","status":1,"totalPoints":34912,"rankingPoints":34912,"totalPass":7,"totalFc":1,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":306,"bracketLevel":64,"footswitchLevel":434,"jackLevel":12,"sideswitchLevel":206,"doublestepLevel":280,"staminaLevel":68,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dando","sex":"Male","profileImg":""},{"id":892,"membersId":5023,"dateAdded":"2023-03-29T03:44:50.000Z","lastUpdated":"2023-04-03T08:54:31.000Z","status":1,"totalPoints":34208,"rankingPoints":34208,"totalPass":1,"totalFc":1,"totalFec":11,"totalQuad":0,"totalQuint":0,"crossoverLevel":256,"bracketLevel":17,"footswitchLevel":106,"jackLevel":272,"sideswitchLevel":0,"doublestepLevel":429,"staminaLevel":32,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SteveReen","sex":"Male","profileImg":"https://media.discordapp.net/attachments/663447581359210499/991228398670200902/robert.png"},{"id":626,"membersId":3116,"dateAdded":"2023-03-22T00:22:00.000Z","lastUpdated":"2023-03-22T02:51:44.000Z","status":1,"totalPoints":34035,"rankingPoints":34035,"totalPass":5,"totalFc":0,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":161,"bracketLevel":135,"footswitchLevel":68,"jackLevel":6,"sideswitchLevel":57,"doublestepLevel":89,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PenguinMessiah","sex":"Male","profileImg":""},{"id":1090,"membersId":175793,"dateAdded":"2023-04-11T01:28:04.000Z","lastUpdated":"2023-05-01T01:54:46.000Z","status":1,"totalPoints":33963,"rankingPoints":33963,"totalPass":12,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":102,"bracketLevel":205,"footswitchLevel":224,"jackLevel":177,"sideswitchLevel":147,"doublestepLevel":166,"staminaLevel":39,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chicken Okabe","sex":"Unspecified","profileImg":""},{"id":996,"membersId":165801,"dateAdded":"2023-04-03T22:58:49.000Z","lastUpdated":"2023-04-03T23:59:43.000Z","status":1,"totalPoints":33342,"rankingPoints":33342,"totalPass":8,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":202,"bracketLevel":196,"footswitchLevel":161,"jackLevel":60,"sideswitchLevel":208,"doublestepLevel":115,"staminaLevel":54,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Powdaboi","sex":"Male","profileImg":""},{"id":586,"membersId":175199,"dateAdded":"2023-03-21T07:37:03.000Z","lastUpdated":"2023-04-15T21:22:21.000Z","status":1,"totalPoints":33261,"rankingPoints":33261,"totalPass":37,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":231,"bracketLevel":90,"footswitchLevel":117,"jackLevel":63,"sideswitchLevel":0,"doublestepLevel":303,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"Gh0zt#4709\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gh0zt","sex":"Male","profileImg":""},{"id":874,"membersId":175563,"dateAdded":"2023-03-28T17:39:39.000Z","lastUpdated":"2023-03-28T18:27:22.000Z","status":1,"totalPoints":33040,"rankingPoints":33040,"totalPass":8,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":350,"bracketLevel":0,"footswitchLevel":82,"jackLevel":113,"sideswitchLevel":253,"doublestepLevel":48,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Blackrainer","sex":"Male","profileImg":""},{"id":769,"membersId":173418,"dateAdded":"2023-03-25T05:21:43.000Z","lastUpdated":"2023-04-22T20:02:55.000Z","status":1,"totalPoints":32995,"rankingPoints":32995,"totalPass":14,"totalFc":1,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":302,"bracketLevel":14,"footswitchLevel":51,"jackLevel":3,"sideswitchLevel":260,"doublestepLevel":186,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aetherspike","sex":"Male","profileImg":""},{"id":373,"membersId":172592,"dateAdded":"2023-03-19T17:14:02.000Z","lastUpdated":"2023-04-23T15:33:01.000Z","status":1,"totalPoints":32811,"rankingPoints":32811,"totalPass":11,"totalFc":2,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":356,"bracketLevel":138,"footswitchLevel":85,"jackLevel":0,"sideswitchLevel":20,"doublestepLevel":78,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jck!!","sex":"Male","profileImg":""},{"id":464,"membersId":3240,"dateAdded":"2023-03-20T02:07:11.000Z","lastUpdated":"2023-03-30T15:33:26.000Z","status":1,"totalPoints":32746,"rankingPoints":32746,"totalPass":8,"totalFc":11,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":382,"bracketLevel":1,"footswitchLevel":43,"jackLevel":66,"sideswitchLevel":22,"doublestepLevel":262,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":\"AlienSix#2007\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AlienSix","sex":"Male","profileImg":""},{"id":87,"membersId":165806,"dateAdded":"2023-03-18T21:51:03.000Z","lastUpdated":"2023-04-07T19:31:24.000Z","status":1,"totalPoints":32671,"rankingPoints":32671,"totalPass":33,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":429,"bracketLevel":115,"footswitchLevel":115,"jackLevel":45,"sideswitchLevel":0,"doublestepLevel":167,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Ky_Dash#1011\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ky_Dash","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/152438051614752768/1087150988248490099/image.png"},{"id":939,"membersId":174097,"dateAdded":"2023-03-31T17:29:10.000Z","lastUpdated":"2023-05-04T07:20:34.000Z","status":1,"totalPoints":32671,"rankingPoints":32671,"totalPass":8,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":159,"bracketLevel":201,"footswitchLevel":199,"jackLevel":126,"sideswitchLevel":41,"doublestepLevel":215,"staminaLevel":29,"isBuddy":false,"preferences":"{\"discordId\":\"Yisus#6906\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yisuszzz","sex":"Male","profileImg":""},{"id":961,"membersId":173805,"dateAdded":"2023-04-01T20:41:08.000Z","lastUpdated":"2023-04-30T20:23:23.000Z","status":1,"totalPoints":32607,"rankingPoints":32607,"totalPass":5,"totalFc":9,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":319,"bracketLevel":9,"footswitchLevel":205,"jackLevel":130,"sideswitchLevel":331,"doublestepLevel":303,"staminaLevel":7,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ThereGoesMySanity","sex":"Male","profileImg":""},{"id":930,"membersId":175614,"dateAdded":"2023-03-30T23:55:44.000Z","lastUpdated":"2023-04-24T00:43:59.000Z","status":1,"totalPoints":32322,"rankingPoints":32322,"totalPass":19,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":457,"bracketLevel":86,"footswitchLevel":98,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":102,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lula","sex":"Female","profileImg":""},{"id":956,"membersId":173264,"dateAdded":"2023-04-01T16:46:09.000Z","lastUpdated":"2023-04-29T19:49:54.000Z","status":1,"totalPoints":32244,"rankingPoints":32244,"totalPass":24,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":265,"bracketLevel":5,"footswitchLevel":107,"jackLevel":62,"sideswitchLevel":0,"doublestepLevel":202,"staminaLevel":5,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jemihon","sex":"Male","profileImg":""},{"id":733,"membersId":173816,"dateAdded":"2023-03-24T16:46:07.000Z","lastUpdated":"2023-04-30T16:03:08.000Z","status":1,"totalPoints":32007,"rankingPoints":32007,"totalPass":38,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":474,"bracketLevel":21,"footswitchLevel":89,"jackLevel":37,"sideswitchLevel":0,"doublestepLevel":132,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Niuq","sex":"Male","profileImg":""},{"id":1084,"membersId":175784,"dateAdded":"2023-04-10T09:21:13.000Z","lastUpdated":"2023-04-30T17:58:00.000Z","status":1,"totalPoints":31584,"rankingPoints":31584,"totalPass":22,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":385,"bracketLevel":10,"footswitchLevel":180,"jackLevel":34,"sideswitchLevel":0,"doublestepLevel":289,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"beqa","sex":"Unspecified","profileImg":""},{"id":163,"membersId":173148,"dateAdded":"2023-03-18T22:27:47.000Z","lastUpdated":"2023-03-28T02:36:15.000Z","status":1,"totalPoints":31576,"rankingPoints":31576,"totalPass":2,"totalFc":4,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":450,"bracketLevel":66,"footswitchLevel":70,"jackLevel":45,"sideswitchLevel":0,"doublestepLevel":273,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LT","sex":"Unspecified","profileImg":""},{"id":420,"membersId":175396,"dateAdded":"2023-03-19T21:02:35.000Z","lastUpdated":"2023-03-20T17:49:25.000Z","status":1,"totalPoints":31224,"rankingPoints":31224,"totalPass":14,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":255,"bracketLevel":65,"footswitchLevel":100,"jackLevel":42,"sideswitchLevel":0,"doublestepLevel":158,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Himolaeski Homer","sex":"Unspecified","profileImg":"https://i.imgur.com/4QWmleO.jpg"},{"id":759,"membersId":173775,"dateAdded":"2023-03-25T01:53:16.000Z","lastUpdated":"2023-04-24T00:11:12.000Z","status":1,"totalPoints":31120,"rankingPoints":31120,"totalPass":17,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":398,"bracketLevel":72,"footswitchLevel":37,"jackLevel":144,"sideswitchLevel":0,"doublestepLevel":61,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":\"GDimples#4902\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dimples","sex":"Unspecified","profileImg":""},{"id":1137,"membersId":173339,"dateAdded":"2023-04-16T04:53:53.000Z","lastUpdated":"2023-04-24T23:53:08.000Z","status":1,"totalPoints":30855,"rankingPoints":30855,"totalPass":25,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":304,"bracketLevel":39,"footswitchLevel":110,"jackLevel":40,"sideswitchLevel":41,"doublestepLevel":145,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nomstaiters","sex":"Male","profileImg":""},{"id":1098,"membersId":165755,"dateAdded":"2023-04-11T23:57:45.000Z","lastUpdated":"2023-04-25T22:47:08.000Z","status":1,"totalPoints":30829,"rankingPoints":30829,"totalPass":4,"totalFc":1,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":223,"bracketLevel":5,"footswitchLevel":105,"jackLevel":55,"sideswitchLevel":0,"doublestepLevel":133,"staminaLevel":72,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SleepyDragon","sex":"Male","profileImg":""},{"id":1224,"membersId":173711,"dateAdded":"2023-04-27T00:02:21.000Z","lastUpdated":"2023-04-29T01:45:29.000Z","status":1,"totalPoints":30726,"rankingPoints":30726,"totalPass":37,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":392,"bracketLevel":48,"footswitchLevel":145,"jackLevel":22,"sideswitchLevel":0,"doublestepLevel":253,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pymodule","sex":"Male","profileImg":"https://retroachievements.org/UserPic/Pymodule.png"},{"id":275,"membersId":173133,"dateAdded":"2023-03-19T02:38:14.000Z","lastUpdated":"2023-04-08T00:19:37.000Z","status":1,"totalPoints":30713,"rankingPoints":30713,"totalPass":2,"totalFc":1,"totalFec":7,"totalQuad":3,"totalQuint":0,"crossoverLevel":295,"bracketLevel":130,"footswitchLevel":144,"jackLevel":25,"sideswitchLevel":0,"doublestepLevel":323,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JoeWhitt","sex":"Male","profileImg":""},{"id":828,"membersId":174123,"dateAdded":"2023-03-26T18:53:08.000Z","lastUpdated":"2023-04-18T20:45:28.000Z","status":1,"totalPoints":30494,"rankingPoints":30494,"totalPass":9,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":143,"bracketLevel":32,"footswitchLevel":221,"jackLevel":206,"sideswitchLevel":0,"doublestepLevel":192,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ketsakura","sex":"Male","profileImg":""},{"id":798,"membersId":173609,"dateAdded":"2023-03-25T20:02:32.000Z","lastUpdated":"2023-05-01T02:24:49.000Z","status":1,"totalPoints":30493,"rankingPoints":30493,"totalPass":31,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":426,"bracketLevel":46,"footswitchLevel":110,"jackLevel":40,"sideswitchLevel":0,"doublestepLevel":234,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"quat#8515\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"quaternary","sex":"Unspecified","profileImg":"https://i.imgur.com/lUh5MJz.png"},{"id":1088,"membersId":73473,"dateAdded":"2023-04-10T20:18:29.000Z","lastUpdated":"2023-04-24T12:30:34.000Z","status":1,"totalPoints":30345,"rankingPoints":30345,"totalPass":16,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":366,"bracketLevel":10,"footswitchLevel":112,"jackLevel":53,"sideswitchLevel":59,"doublestepLevel":177,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Robbumon","sex":"Male","profileImg":"https://rhythmandpixels.files.wordpress.com/2021/06/rob_groovestats2.png"},{"id":613,"membersId":175427,"dateAdded":"2023-03-21T21:22:59.000Z","lastUpdated":"2023-03-26T18:43:13.000Z","status":1,"totalPoints":30262,"rankingPoints":30262,"totalPass":11,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":195,"bracketLevel":14,"footswitchLevel":141,"jackLevel":99,"sideswitchLevel":0,"doublestepLevel":276,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"derpjosh","sex":"Male","profileImg":""},{"id":374,"membersId":174568,"dateAdded":"2023-03-19T17:22:09.000Z","lastUpdated":"2023-03-20T21:49:08.000Z","status":1,"totalPoints":30061,"rankingPoints":30061,"totalPass":5,"totalFc":0,"totalFec":7,"totalQuad":2,"totalQuint":0,"crossoverLevel":335,"bracketLevel":58,"footswitchLevel":316,"jackLevel":39,"sideswitchLevel":248,"doublestepLevel":196,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JellySlosh","sex":"Male","profileImg":""},{"id":39,"membersId":172899,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-04-15T08:53:55.000Z","status":1,"totalPoints":30007,"rankingPoints":30007,"totalPass":3,"totalFc":4,"totalFec":14,"totalQuad":0,"totalQuint":0,"crossoverLevel":500,"bracketLevel":15,"footswitchLevel":191,"jackLevel":78,"sideswitchLevel":0,"doublestepLevel":83,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"amaiiberry#5750\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"amaiiberry","sex":"Unspecified","profileImg":"https://i.imgur.com/rrJCKY0.png"},{"id":133,"membersId":173658,"dateAdded":"2023-03-18T22:03:54.000Z","lastUpdated":"2023-05-02T20:54:49.000Z","status":1,"totalPoints":29529,"rankingPoints":29529,"totalPass":29,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":337,"bracketLevel":6,"footswitchLevel":73,"jackLevel":42,"sideswitchLevel":0,"doublestepLevel":123,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"false_parallax","sex":"Female","profileImg":""},{"id":1232,"membersId":173844,"dateAdded":"2023-04-27T07:39:51.000Z","lastUpdated":"2023-05-01T15:49:11.000Z","status":1,"totalPoints":29459,"rankingPoints":29459,"totalPass":8,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":84,"bracketLevel":189,"footswitchLevel":184,"jackLevel":257,"sideswitchLevel":77,"doublestepLevel":104,"staminaLevel":64,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kralde","sex":"Unspecified","profileImg":"https://i.ibb.co/TkHKvT6/Screenshot-20220627-132554-Gallery-250x300.jpg"},{"id":1264,"membersId":7721,"dateAdded":"2023-05-01T16:00:06.000Z","lastUpdated":"2023-05-05T17:34:22.000Z","status":1,"totalPoints":28977,"rankingPoints":28977,"totalPass":9,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":274,"bracketLevel":30,"footswitchLevel":128,"jackLevel":54,"sideswitchLevel":144,"doublestepLevel":234,"staminaLevel":37,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"AzleKayn","sex":"Male","profileImg":""},{"id":361,"membersId":173001,"dateAdded":"2023-03-19T16:00:58.000Z","lastUpdated":"2023-04-16T20:21:41.000Z","status":1,"totalPoints":28837,"rankingPoints":28837,"totalPass":9,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":267,"bracketLevel":46,"footswitchLevel":236,"jackLevel":138,"sideswitchLevel":63,"doublestepLevel":259,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Foxxo","sex":"Male","profileImg":"https://i.ibb.co/Sry6tbY/Bi-Foxxo-Icon-Small.png"},{"id":1193,"membersId":175952,"dateAdded":"2023-04-23T01:53:22.000Z","lastUpdated":"2023-05-07T05:08:05.000Z","status":1,"totalPoints":28705,"rankingPoints":28705,"totalPass":36,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":348,"bracketLevel":105,"footswitchLevel":139,"jackLevel":37,"sideswitchLevel":0,"doublestepLevel":121,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"zylviij","sex":"Male","profileImg":""},{"id":1076,"membersId":7652,"dateAdded":"2023-04-09T22:03:02.000Z","lastUpdated":"2023-05-01T02:01:20.000Z","status":1,"totalPoints":28698,"rankingPoints":28698,"totalPass":5,"totalFc":8,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":361,"bracketLevel":67,"footswitchLevel":227,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":158,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"C_Drek","sex":"Male","profileImg":""},{"id":1117,"membersId":173866,"dateAdded":"2023-04-13T23:14:05.000Z","lastUpdated":"2023-04-27T00:10:14.000Z","status":1,"totalPoints":28258,"rankingPoints":28258,"totalPass":28,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":373,"bracketLevel":23,"footswitchLevel":128,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":154,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"scott","sex":"Male","profileImg":"https://ih1.redbubble.net/image.1380875521.4410/flat,128x,075,f-pad,128x128,f8f8f8.jpg"},{"id":805,"membersId":175524,"dateAdded":"2023-03-25T23:01:13.000Z","lastUpdated":"2023-04-01T22:41:52.000Z","status":1,"totalPoints":28147,"rankingPoints":28147,"totalPass":17,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":303,"bracketLevel":127,"footswitchLevel":137,"jackLevel":49,"sideswitchLevel":0,"doublestepLevel":170,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"G4to","sex":"Male","profileImg":""},{"id":826,"membersId":173265,"dateAdded":"2023-03-26T17:45:29.000Z","lastUpdated":"2023-03-26T22:44:25.000Z","status":1,"totalPoints":27781,"rankingPoints":27781,"totalPass":13,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":216,"bracketLevel":19,"footswitchLevel":186,"jackLevel":95,"sideswitchLevel":44,"doublestepLevel":210,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":\"nazu#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nazu","sex":"Female","profileImg":"https://i.ibb.co/YW8QZRg/20230326-155414.png"},{"id":703,"membersId":173385,"dateAdded":"2023-03-23T16:57:45.000Z","lastUpdated":"2023-04-13T04:03:59.000Z","status":1,"totalPoints":27580,"rankingPoints":27580,"totalPass":6,"totalFc":10,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":591,"bracketLevel":28,"footswitchLevel":170,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":157,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nifterific","sex":"Male","profileImg":"https://i.imgur.com/U5vOil3.jpg"},{"id":668,"membersId":173413,"dateAdded":"2023-03-22T20:48:11.000Z","lastUpdated":"2023-05-04T02:39:19.000Z","status":1,"totalPoints":27509,"rankingPoints":27509,"totalPass":1,"totalFc":4,"totalFec":6,"totalQuad":9,"totalQuint":0,"crossoverLevel":388,"bracketLevel":35,"footswitchLevel":56,"jackLevel":28,"sideswitchLevel":0,"doublestepLevel":130,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FRCO","sex":"Male","profileImg":""},{"id":244,"membersId":109985,"dateAdded":"2023-03-19T00:54:29.000Z","lastUpdated":"2023-05-03T16:33:12.000Z","status":1,"totalPoints":27354,"rankingPoints":27354,"totalPass":31,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":319,"bracketLevel":95,"footswitchLevel":55,"jackLevel":19,"sideswitchLevel":0,"doublestepLevel":102,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"soler#8089\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"soler98012","sex":"Unspecified","profileImg":""},{"id":1075,"membersId":175729,"dateAdded":"2023-04-09T20:33:33.000Z","lastUpdated":"2023-05-05T01:43:32.000Z","status":1,"totalPoints":27009,"rankingPoints":27009,"totalPass":13,"totalFc":16,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":420,"bracketLevel":26,"footswitchLevel":120,"jackLevel":21,"sideswitchLevel":0,"doublestepLevel":180,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"UserError","sex":"Unspecified","profileImg":""},{"id":1206,"membersId":173541,"dateAdded":"2023-04-24T14:37:55.000Z","lastUpdated":"2023-05-05T00:12:52.000Z","status":1,"totalPoints":26808,"rankingPoints":26808,"totalPass":4,"totalFc":5,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":213,"bracketLevel":54,"footswitchLevel":170,"jackLevel":72,"sideswitchLevel":0,"doublestepLevel":129,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LPCrossOver","sex":"Male","profileImg":""},{"id":683,"membersId":6601,"dateAdded":"2023-03-22T23:43:53.000Z","lastUpdated":"2023-05-04T23:42:00.000Z","status":1,"totalPoints":26709,"rankingPoints":26709,"totalPass":6,"totalFc":7,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":257,"bracketLevel":47,"footswitchLevel":81,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":92,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"old man Blazing","sex":"Unspecified","profileImg":""},{"id":848,"membersId":173695,"dateAdded":"2023-03-27T00:22:45.000Z","lastUpdated":"2023-05-06T01:52:50.000Z","status":1,"totalPoints":26664,"rankingPoints":26664,"totalPass":38,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":327,"bracketLevel":18,"footswitchLevel":66,"jackLevel":33,"sideswitchLevel":0,"doublestepLevel":108,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Rhiannonak#9589\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"rhiannonak","sex":"Female","profileImg":""},{"id":181,"membersId":66634,"dateAdded":"2023-03-18T22:44:38.000Z","lastUpdated":"2023-04-22T18:43:38.000Z","status":1,"totalPoints":26562,"rankingPoints":26562,"totalPass":22,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":297,"bracketLevel":8,"footswitchLevel":114,"jackLevel":89,"sideswitchLevel":0,"doublestepLevel":273,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":\"Catoxis#2010\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Catoxis","sex":"Male","profileImg":"https://a.furaffinity.net/1577638531/akkeresu.gif"},{"id":206,"membersId":1300,"dateAdded":"2023-03-18T23:31:35.000Z","lastUpdated":"2023-04-13T01:49:09.000Z","status":1,"totalPoints":26470,"rankingPoints":26470,"totalPass":1,"totalFc":6,"totalFec":11,"totalQuad":7,"totalQuint":0,"crossoverLevel":500,"bracketLevel":12,"footswitchLevel":87,"jackLevel":33,"sideswitchLevel":0,"doublestepLevel":182,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iamBGS","sex":"Male","profileImg":""},{"id":452,"membersId":173307,"dateAdded":"2023-03-20T01:00:33.000Z","lastUpdated":"2023-03-25T02:14:42.000Z","status":1,"totalPoints":26381,"rankingPoints":26381,"totalPass":17,"totalFc":13,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":267,"bracketLevel":17,"footswitchLevel":113,"jackLevel":23,"sideswitchLevel":0,"doublestepLevel":109,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yaksa","sex":"Male","profileImg":""},{"id":1004,"membersId":175685,"dateAdded":"2023-04-04T02:18:15.000Z","lastUpdated":"2023-04-04T05:11:37.000Z","status":1,"totalPoints":26370,"rankingPoints":26370,"totalPass":9,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":213,"bracketLevel":20,"footswitchLevel":210,"jackLevel":54,"sideswitchLevel":0,"doublestepLevel":306,"staminaLevel":29,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MicMac","sex":"Male","profileImg":""},{"id":533,"membersId":175410,"dateAdded":"2023-03-20T19:40:59.000Z","lastUpdated":"2023-04-26T00:35:12.000Z","status":1,"totalPoints":26348,"rankingPoints":26348,"totalPass":39,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":302,"bracketLevel":19,"footswitchLevel":114,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":89,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ObsidianSkin","sex":"Male","profileImg":""},{"id":754,"membersId":56430,"dateAdded":"2023-03-25T01:07:58.000Z","lastUpdated":"2023-03-26T19:43:09.000Z","status":1,"totalPoints":26264,"rankingPoints":26264,"totalPass":25,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":397,"bracketLevel":25,"footswitchLevel":115,"jackLevel":38,"sideswitchLevel":0,"doublestepLevel":173,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"thefreemansbackup","sex":"Female","profileImg":""},{"id":702,"membersId":4393,"dateAdded":"2023-03-23T16:34:41.000Z","lastUpdated":"2023-04-10T20:46:27.000Z","status":1,"totalPoints":26009,"rankingPoints":26009,"totalPass":1,"totalFc":0,"totalFec":1,"totalQuad":6,"totalQuint":0,"crossoverLevel":242,"bracketLevel":9,"footswitchLevel":53,"jackLevel":5,"sideswitchLevel":34,"doublestepLevel":32,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Juggles","sex":"Male","profileImg":""},{"id":845,"membersId":172891,"dateAdded":"2023-03-26T23:39:54.000Z","lastUpdated":"2023-04-10T18:53:05.000Z","status":1,"totalPoints":25783,"rankingPoints":25783,"totalPass":31,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":339,"bracketLevel":42,"footswitchLevel":113,"jackLevel":60,"sideswitchLevel":0,"doublestepLevel":213,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"OT#1337\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"partybus","sex":"Male","profileImg":""},{"id":1172,"membersId":2722,"dateAdded":"2023-04-20T19:19:32.000Z","lastUpdated":"2023-04-20T20:04:00.000Z","status":1,"totalPoints":25725,"rankingPoints":25725,"totalPass":9,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":203,"bracketLevel":37,"footswitchLevel":191,"jackLevel":141,"sideswitchLevel":30,"doublestepLevel":117,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kiko","sex":"Male","profileImg":""},{"id":989,"membersId":30901,"dateAdded":"2023-04-03T15:18:59.000Z","lastUpdated":"2023-05-04T16:38:52.000Z","status":1,"totalPoints":25623,"rankingPoints":25623,"totalPass":11,"totalFc":4,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":323,"bracketLevel":23,"footswitchLevel":173,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":265,"staminaLevel":18,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Quanto","sex":"Male","profileImg":"https://ih1.redbubble.net/image.1069379279.2745/flat,128x128,075,f-pad,128x128,f8f8f8.u2.jpg"},{"id":648,"membersId":175441,"dateAdded":"2023-03-22T10:56:50.000Z","lastUpdated":"2023-05-03T19:07:33.000Z","status":1,"totalPoints":25597,"rankingPoints":25597,"totalPass":37,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":304,"bracketLevel":18,"footswitchLevel":124,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":129,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MetAteM","sex":"Unspecified","profileImg":""},{"id":865,"membersId":66813,"dateAdded":"2023-03-28T00:01:19.000Z","lastUpdated":"2023-04-02T16:59:18.000Z","status":1,"totalPoints":25503,"rankingPoints":25503,"totalPass":17,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":388,"bracketLevel":0,"footswitchLevel":56,"jackLevel":48,"sideswitchLevel":18,"doublestepLevel":144,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MCThammer","sex":"Female","profileImg":""},{"id":771,"membersId":147944,"dateAdded":"2023-03-25T07:53:50.000Z","lastUpdated":"2023-03-26T06:24:40.000Z","status":1,"totalPoints":25432,"rankingPoints":25432,"totalPass":13,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":266,"bracketLevel":61,"footswitchLevel":93,"jackLevel":46,"sideswitchLevel":0,"doublestepLevel":106,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Frky","sex":"Male","profileImg":"https://pbs.twimg.com/media/ETxijpkXgAAdNWc.png"},{"id":1071,"membersId":173514,"dateAdded":"2023-04-09T18:14:16.000Z","lastUpdated":"2023-04-18T01:55:48.000Z","status":1,"totalPoints":25387,"rankingPoints":25387,"totalPass":6,"totalFc":4,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":324,"bracketLevel":42,"footswitchLevel":118,"jackLevel":80,"sideswitchLevel":0,"doublestepLevel":370,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":\"Eijiken#8811\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Eijiken","sex":"Male","profileImg":""},{"id":1003,"membersId":175682,"dateAdded":"2023-04-04T01:53:08.000Z","lastUpdated":"2023-04-29T01:01:01.000Z","status":1,"totalPoints":25121,"rankingPoints":25121,"totalPass":14,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":273,"bracketLevel":5,"footswitchLevel":106,"jackLevel":28,"sideswitchLevel":11,"doublestepLevel":114,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MochiCake","sex":"Female","profileImg":""},{"id":1152,"membersId":132060,"dateAdded":"2023-04-17T23:53:44.000Z","lastUpdated":"2023-05-03T23:24:08.000Z","status":1,"totalPoints":25102,"rankingPoints":25102,"totalPass":15,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":321,"bracketLevel":20,"footswitchLevel":120,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":201,"staminaLevel":17,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KuraiGekkou","sex":"Unspecified","profileImg":""},{"id":1120,"membersId":175832,"dateAdded":"2023-04-14T03:19:47.000Z","lastUpdated":"2023-04-19T05:31:49.000Z","status":1,"totalPoints":24923,"rankingPoints":24923,"totalPass":27,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":358,"bracketLevel":37,"footswitchLevel":124,"jackLevel":44,"sideswitchLevel":0,"doublestepLevel":210,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"CHI_XU","sex":"Unspecified","profileImg":"https://i.imgur.com/9de3TCB.jpg"},{"id":316,"membersId":175383,"dateAdded":"2023-03-19T06:19:29.000Z","lastUpdated":"2023-03-28T10:17:31.000Z","status":1,"totalPoints":24747,"rankingPoints":24747,"totalPass":29,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":404,"bracketLevel":18,"footswitchLevel":125,"jackLevel":17,"sideswitchLevel":0,"doublestepLevel":204,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DenryuRider","sex":"Male","profileImg":""},{"id":842,"membersId":175545,"dateAdded":"2023-03-26T22:37:58.000Z","lastUpdated":"2023-04-17T04:12:54.000Z","status":1,"totalPoints":24690,"rankingPoints":24690,"totalPass":30,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":297,"bracketLevel":24,"footswitchLevel":90,"jackLevel":37,"sideswitchLevel":0,"doublestepLevel":123,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CHAOTICA","sex":"Unspecified","profileImg":""},{"id":473,"membersId":173429,"dateAdded":"2023-03-20T03:18:31.000Z","lastUpdated":"2023-04-19T15:44:53.000Z","status":1,"totalPoints":24592,"rankingPoints":24592,"totalPass":35,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":312,"bracketLevel":91,"footswitchLevel":98,"jackLevel":53,"sideswitchLevel":0,"doublestepLevel":173,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cob","sex":"Male","profileImg":""},{"id":1228,"membersId":75724,"dateAdded":"2023-04-27T03:08:24.000Z","lastUpdated":"2023-05-03T19:05:19.000Z","status":1,"totalPoints":24581,"rankingPoints":24581,"totalPass":8,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":125,"bracketLevel":54,"footswitchLevel":102,"jackLevel":62,"sideswitchLevel":20,"doublestepLevel":198,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SleepBAAA","sex":"Unspecified","profileImg":""},{"id":707,"membersId":173157,"dateAdded":"2023-03-23T20:54:08.000Z","lastUpdated":"2023-04-20T23:29:53.000Z","status":1,"totalPoints":24575,"rankingPoints":24575,"totalPass":12,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":121,"bracketLevel":30,"footswitchLevel":175,"jackLevel":9,"sideswitchLevel":24,"doublestepLevel":145,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Whipplash","sex":"Male","profileImg":"https://images2.imgbox.com/69/64/ETzL6mH2_o.png"},{"id":1167,"membersId":75738,"dateAdded":"2023-04-19T21:07:04.000Z","lastUpdated":"2023-04-22T15:26:22.000Z","status":1,"totalPoints":24510,"rankingPoints":24510,"totalPass":4,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":210,"bracketLevel":103,"footswitchLevel":161,"jackLevel":26,"sideswitchLevel":16,"doublestepLevel":31,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"andkaseywaslike","sex":"Male","profileImg":"https://pbs.twimg.com/media/EYzOVJ3XkAAEXp9.jpg"},{"id":756,"membersId":173519,"dateAdded":"2023-03-25T01:20:17.000Z","lastUpdated":"2023-03-25T02:05:55.000Z","status":1,"totalPoints":24494,"rankingPoints":24494,"totalPass":8,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":176,"bracketLevel":104,"footswitchLevel":89,"jackLevel":175,"sideswitchLevel":12,"doublestepLevel":199,"staminaLevel":42,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"oggvaldo","sex":"Male","profileImg":""},{"id":852,"membersId":113020,"dateAdded":"2023-03-27T04:57:20.000Z","lastUpdated":"2023-04-05T21:19:38.000Z","status":1,"totalPoints":24488,"rankingPoints":24488,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":40,"bracketLevel":117,"footswitchLevel":63,"jackLevel":27,"sideswitchLevel":0,"doublestepLevel":78,"staminaLevel":198,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"K.Jones","sex":"Male","profileImg":""},{"id":1031,"membersId":173479,"dateAdded":"2023-04-06T02:16:16.000Z","lastUpdated":"2023-05-01T02:22:30.000Z","status":1,"totalPoints":24380,"rankingPoints":24380,"totalPass":17,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":395,"bracketLevel":46,"footswitchLevel":111,"jackLevel":49,"sideswitchLevel":0,"doublestepLevel":144,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lililotta","sex":"Female","profileImg":""},{"id":1205,"membersId":175975,"dateAdded":"2023-04-24T14:34:08.000Z","lastUpdated":"2023-05-03T02:12:30.000Z","status":1,"totalPoints":23875,"rankingPoints":23875,"totalPass":14,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":377,"bracketLevel":34,"footswitchLevel":88,"jackLevel":24,"sideswitchLevel":0,"doublestepLevel":264,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":\"HeeroJay#4670\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HeeroJay","sex":"Unspecified","profileImg":""},{"id":752,"membersId":175474,"dateAdded":"2023-03-24T23:56:06.000Z","lastUpdated":"2023-05-03T02:36:42.000Z","status":1,"totalPoints":23783,"rankingPoints":23783,"totalPass":6,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":226,"bracketLevel":24,"footswitchLevel":170,"jackLevel":70,"sideswitchLevel":92,"doublestepLevel":88,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pyon","sex":"Unspecified","profileImg":""},{"id":1044,"membersId":164014,"dateAdded":"2023-04-07T07:41:53.000Z","lastUpdated":"2023-05-07T00:49:49.000Z","status":1,"totalPoints":23768,"rankingPoints":23768,"totalPass":7,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":420,"bracketLevel":10,"footswitchLevel":77,"jackLevel":30,"sideswitchLevel":0,"doublestepLevel":153,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dogessa","sex":"Male","profileImg":"https://i.postimg.cc/pXbN9wbQ/i-Veg-J35-xfjlfu.gif"},{"id":765,"membersId":174241,"dateAdded":"2023-03-25T04:04:16.000Z","lastUpdated":"2023-04-29T04:52:33.000Z","status":1,"totalPoints":23656,"rankingPoints":23656,"totalPass":8,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":251,"bracketLevel":58,"footswitchLevel":49,"jackLevel":26,"sideswitchLevel":0,"doublestepLevel":176,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HellsingKo","sex":"Unspecified","profileImg":""},{"id":696,"membersId":175458,"dateAdded":"2023-03-23T12:06:25.000Z","lastUpdated":"2023-05-03T12:37:31.000Z","status":1,"totalPoints":23614,"rankingPoints":23614,"totalPass":18,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":302,"bracketLevel":16,"footswitchLevel":44,"jackLevel":37,"sideswitchLevel":58,"doublestepLevel":108,"staminaLevel":7,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"little_blake","sex":"Unspecified","profileImg":""},{"id":1174,"membersId":127815,"dateAdded":"2023-04-21T01:49:38.000Z","lastUpdated":"2023-04-21T06:44:26.000Z","status":1,"totalPoints":23508,"rankingPoints":23508,"totalPass":0,"totalFc":0,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":137,"bracketLevel":86,"footswitchLevel":87,"jackLevel":67,"sideswitchLevel":81,"doublestepLevel":155,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Corgi","sex":"Female","profileImg":""},{"id":698,"membersId":1979,"dateAdded":"2023-03-23T13:22:03.000Z","lastUpdated":"2023-04-26T17:11:02.000Z","status":1,"totalPoints":22987,"rankingPoints":22987,"totalPass":7,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":286,"bracketLevel":122,"footswitchLevel":164,"jackLevel":63,"sideswitchLevel":211,"doublestepLevel":110,"staminaLevel":11,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"(OZA)","sex":"Male","profileImg":"https://i.postimg.cc/mgbFFC0c/AVATAR-OZA-groovestats.png"},{"id":1030,"membersId":175686,"dateAdded":"2023-04-06T02:12:06.000Z","lastUpdated":"2023-04-06T04:09:38.000Z","status":1,"totalPoints":22865,"rankingPoints":22865,"totalPass":32,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":338,"bracketLevel":44,"footswitchLevel":87,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":143,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iCherry7","sex":"Female","profileImg":""},{"id":851,"membersId":66457,"dateAdded":"2023-03-27T04:36:15.000Z","lastUpdated":"2023-04-21T03:33:56.000Z","status":1,"totalPoints":22430,"rankingPoints":22430,"totalPass":14,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":225,"bracketLevel":83,"footswitchLevel":118,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":154,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"igr2","sex":"Unspecified","profileImg":""},{"id":680,"membersId":174249,"dateAdded":"2023-03-22T23:18:33.000Z","lastUpdated":"2023-04-23T18:33:39.000Z","status":1,"totalPoints":22062,"rankingPoints":22062,"totalPass":25,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":372,"bracketLevel":19,"footswitchLevel":118,"jackLevel":38,"sideswitchLevel":0,"doublestepLevel":118,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Raikachan","sex":"Female","profileImg":""},{"id":1196,"membersId":173977,"dateAdded":"2023-04-23T15:51:43.000Z","lastUpdated":"2023-05-06T22:14:14.000Z","status":1,"totalPoints":21252,"rankingPoints":21252,"totalPass":7,"totalFc":5,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":275,"bracketLevel":3,"footswitchLevel":57,"jackLevel":20,"sideswitchLevel":0,"doublestepLevel":82,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dany_Denisse","sex":"Unspecified","profileImg":""},{"id":1223,"membersId":176015,"dateAdded":"2023-04-26T22:08:54.000Z","lastUpdated":"2023-04-27T00:09:44.000Z","status":1,"totalPoints":20991,"rankingPoints":20991,"totalPass":19,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":258,"bracketLevel":16,"footswitchLevel":44,"jackLevel":25,"sideswitchLevel":0,"doublestepLevel":21,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"YonaW","sex":"Unspecified","profileImg":""},{"id":809,"membersId":173432,"dateAdded":"2023-03-25T23:59:42.000Z","lastUpdated":"2023-04-05T05:24:43.000Z","status":1,"totalPoints":20872,"rankingPoints":20872,"totalPass":15,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":256,"bracketLevel":34,"footswitchLevel":132,"jackLevel":59,"sideswitchLevel":0,"doublestepLevel":70,"staminaLevel":7,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"expcake","sex":"Unspecified","profileImg":"https://i.imgur.com/nDzrMjH.png"},{"id":1271,"membersId":132115,"dateAdded":"2023-05-02T08:41:48.000Z","lastUpdated":"2023-05-02T10:01:14.000Z","status":1,"totalPoints":20573,"rankingPoints":20573,"totalPass":5,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":127,"bracketLevel":44,"footswitchLevel":97,"jackLevel":22,"sideswitchLevel":69,"doublestepLevel":62,"staminaLevel":14,"isBuddy":false,"preferences":"{\"discordId\":\"#6984\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"$YOHAN$","sex":"Male","profileImg":""},{"id":608,"membersId":175416,"dateAdded":"2023-03-21T20:19:47.000Z","lastUpdated":"2023-03-21T23:12:55.000Z","status":1,"totalPoints":20427,"rankingPoints":20427,"totalPass":7,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":197,"bracketLevel":0,"footswitchLevel":82,"jackLevel":25,"sideswitchLevel":0,"doublestepLevel":74,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stepman Designs","sex":"Unspecified","profileImg":""},{"id":670,"membersId":172905,"dateAdded":"2023-03-22T21:21:41.000Z","lastUpdated":"2023-04-26T00:53:02.000Z","status":1,"totalPoints":20402,"rankingPoints":20402,"totalPass":17,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":345,"bracketLevel":9,"footswitchLevel":88,"jackLevel":51,"sideswitchLevel":15,"doublestepLevel":141,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"weaselriot","sex":"Unspecified","profileImg":""},{"id":296,"membersId":173374,"dateAdded":"2023-03-19T04:03:36.000Z","lastUpdated":"2023-04-03T03:48:05.000Z","status":1,"totalPoints":19577,"rankingPoints":19577,"totalPass":23,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":346,"bracketLevel":9,"footswitchLevel":45,"jackLevel":46,"sideswitchLevel":0,"doublestepLevel":109,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TwoAi","sex":"Unspecified","profileImg":""},{"id":767,"membersId":175087,"dateAdded":"2023-03-25T05:04:38.000Z","lastUpdated":"2023-05-03T01:30:34.000Z","status":1,"totalPoints":19541,"rankingPoints":19541,"totalPass":6,"totalFc":1,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":294,"bracketLevel":12,"footswitchLevel":101,"jackLevel":0,"sideswitchLevel":20,"doublestepLevel":35,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"L!AM","sex":"Male","profileImg":""},{"id":931,"membersId":173206,"dateAdded":"2023-03-31T02:12:38.000Z","lastUpdated":"2023-05-07T03:44:46.000Z","status":1,"totalPoints":19521,"rankingPoints":19521,"totalPass":2,"totalFc":5,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":193,"bracketLevel":21,"footswitchLevel":78,"jackLevel":57,"sideswitchLevel":62,"doublestepLevel":274,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ApexAzimuth","sex":"Male","profileImg":"https://i.imgur.com/5ZMjuWm.jpg"},{"id":942,"membersId":128742,"dateAdded":"2023-03-31T23:37:22.000Z","lastUpdated":"2023-05-04T04:29:23.000Z","status":1,"totalPoints":19397,"rankingPoints":19397,"totalPass":3,"totalFc":5,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":431,"bracketLevel":11,"footswitchLevel":61,"jackLevel":29,"sideswitchLevel":0,"doublestepLevel":168,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"gabbyjay","sex":"Male","profileImg":""},{"id":516,"membersId":66551,"dateAdded":"2023-03-20T17:56:45.000Z","lastUpdated":"2023-04-10T01:02:55.000Z","status":1,"totalPoints":19373,"rankingPoints":19373,"totalPass":2,"totalFc":3,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":167,"bracketLevel":20,"footswitchLevel":128,"jackLevel":6,"sideswitchLevel":0,"doublestepLevel":152,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TopherK","sex":"Unspecified","profileImg":"https://i.imgur.com/UZJkEwB.jpg"},{"id":881,"membersId":173465,"dateAdded":"2023-03-28T22:11:36.000Z","lastUpdated":"2023-05-07T02:35:22.000Z","status":1,"totalPoints":19357,"rankingPoints":19357,"totalPass":0,"totalFc":0,"totalFec":8,"totalQuad":4,"totalQuint":0,"crossoverLevel":340,"bracketLevel":11,"footswitchLevel":36,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":137,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nick PNW","sex":"Male","profileImg":""},{"id":945,"membersId":128319,"dateAdded":"2023-04-01T01:51:51.000Z","lastUpdated":"2023-04-07T01:56:51.000Z","status":1,"totalPoints":19096,"rankingPoints":19096,"totalPass":1,"totalFc":7,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":176,"bracketLevel":7,"footswitchLevel":20,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":12,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tertu","sex":"Unspecified","profileImg":""},{"id":132,"membersId":172955,"dateAdded":"2023-03-18T22:03:30.000Z","lastUpdated":"2023-04-09T23:17:01.000Z","status":1,"totalPoints":18931,"rankingPoints":18931,"totalPass":5,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":62,"bracketLevel":73,"footswitchLevel":109,"jackLevel":8,"sideswitchLevel":88,"doublestepLevel":185,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ottrp0p","sex":"Unspecified","profileImg":""},{"id":372,"membersId":173171,"dateAdded":"2023-03-19T17:10:44.000Z","lastUpdated":"2023-04-16T12:11:34.000Z","status":1,"totalPoints":18791,"rankingPoints":18791,"totalPass":26,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":312,"bracketLevel":7,"footswitchLevel":50,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":220,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TIZZ","sex":"Female","profileImg":""},{"id":333,"membersId":82526,"dateAdded":"2023-03-19T10:24:40.000Z","lastUpdated":"2023-03-29T18:24:43.000Z","status":1,"totalPoints":18605,"rankingPoints":18605,"totalPass":15,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":168,"bracketLevel":86,"footswitchLevel":120,"jackLevel":5,"sideswitchLevel":0,"doublestepLevel":111,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"natano","sex":"Male","profileImg":"https://www.natano.net/static/img/covatar-small.png"},{"id":501,"membersId":173777,"dateAdded":"2023-03-20T15:03:28.000Z","lastUpdated":"2023-04-22T21:17:21.000Z","status":1,"totalPoints":18399,"rankingPoints":18399,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":43,"bracketLevel":47,"footswitchLevel":61,"jackLevel":31,"sideswitchLevel":44,"doublestepLevel":261,"staminaLevel":85,"isBuddy":true,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DeathofaStar","sex":"Female","profileImg":""},{"id":1192,"membersId":175949,"dateAdded":"2023-04-23T01:52:45.000Z","lastUpdated":"2023-04-23T03:09:56.000Z","status":1,"totalPoints":18119,"rankingPoints":18119,"totalPass":4,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":91,"bracketLevel":3,"footswitchLevel":84,"jackLevel":3,"sideswitchLevel":19,"doublestepLevel":120,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mpal","sex":"Female","profileImg":""},{"id":965,"membersId":175653,"dateAdded":"2023-04-01T22:39:26.000Z","lastUpdated":"2023-04-01T23:30:59.000Z","status":1,"totalPoints":18116,"rankingPoints":18116,"totalPass":6,"totalFc":1,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":258,"bracketLevel":5,"footswitchLevel":71,"jackLevel":34,"sideswitchLevel":0,"doublestepLevel":241,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kurplode","sex":"Male","profileImg":""},{"id":1045,"membersId":168898,"dateAdded":"2023-04-07T15:08:21.000Z","lastUpdated":"2023-04-24T21:53:21.000Z","status":1,"totalPoints":17941,"rankingPoints":17941,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":179,"bracketLevel":0,"footswitchLevel":27,"jackLevel":174,"sideswitchLevel":41,"doublestepLevel":66,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KomboKrusher","sex":"Unspecified","profileImg":""},{"id":623,"membersId":175431,"dateAdded":"2023-03-21T22:58:31.000Z","lastUpdated":"2023-04-01T20:24:45.000Z","status":1,"totalPoints":17831,"rankingPoints":17831,"totalPass":11,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":179,"bracketLevel":12,"footswitchLevel":44,"jackLevel":7,"sideswitchLevel":0,"doublestepLevel":76,"staminaLevel":19,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Konfine","sex":"Male","profileImg":""},{"id":977,"membersId":173459,"dateAdded":"2023-04-02T20:22:11.000Z","lastUpdated":"2023-04-05T23:38:21.000Z","status":1,"totalPoints":17757,"rankingPoints":17757,"totalPass":19,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":212,"bracketLevel":0,"footswitchLevel":85,"jackLevel":25,"sideswitchLevel":0,"doublestepLevel":149,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jediknite","sex":"Unspecified","profileImg":""},{"id":1263,"membersId":174789,"dateAdded":"2023-05-01T14:50:03.000Z","lastUpdated":"2023-05-03T17:18:24.000Z","status":1,"totalPoints":17751,"rankingPoints":17751,"totalPass":24,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":261,"bracketLevel":9,"footswitchLevel":68,"jackLevel":20,"sideswitchLevel":0,"doublestepLevel":81,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Raiyoku","sex":"Male","profileImg":""},{"id":853,"membersId":173682,"dateAdded":"2023-03-27T12:20:10.000Z","lastUpdated":"2023-04-01T10:51:50.000Z","status":1,"totalPoints":17272,"rankingPoints":17272,"totalPass":29,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":275,"bracketLevel":15,"footswitchLevel":43,"jackLevel":14,"sideswitchLevel":0,"doublestepLevel":116,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"norek","sex":"Male","profileImg":""},{"id":1248,"membersId":174525,"dateAdded":"2023-04-29T14:52:14.000Z","lastUpdated":"2023-05-02T16:38:51.000Z","status":1,"totalPoints":17259,"rankingPoints":17259,"totalPass":26,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":171,"bracketLevel":64,"footswitchLevel":37,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":49,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Kapsel#3436\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kapsel","sex":"Male","profileImg":""},{"id":838,"membersId":31240,"dateAdded":"2023-03-26T21:55:22.000Z","lastUpdated":"2023-04-11T12:21:50.000Z","status":1,"totalPoints":17200,"rankingPoints":17200,"totalPass":7,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":224,"bracketLevel":9,"footswitchLevel":52,"jackLevel":25,"sideswitchLevel":0,"doublestepLevel":96,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":\"Tuhka#2298\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Tuhka","sex":"Female","profileImg":""},{"id":1053,"membersId":128794,"dateAdded":"2023-04-07T20:57:36.000Z","lastUpdated":"2023-05-01T01:45:48.000Z","status":1,"totalPoints":17126,"rankingPoints":17126,"totalPass":5,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":151,"bracketLevel":123,"footswitchLevel":101,"jackLevel":64,"sideswitchLevel":0,"doublestepLevel":3,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Misuc","sex":"Unspecified","profileImg":""},{"id":1141,"membersId":175858,"dateAdded":"2023-04-16T17:09:42.000Z","lastUpdated":"2023-04-28T16:40:29.000Z","status":1,"totalPoints":17064,"rankingPoints":17064,"totalPass":8,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":126,"bracketLevel":15,"footswitchLevel":105,"jackLevel":74,"sideswitchLevel":109,"doublestepLevel":101,"staminaLevel":49,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LikeAFunnerName","sex":"Male","profileImg":""},{"id":393,"membersId":144973,"dateAdded":"2023-03-19T18:24:54.000Z","lastUpdated":"2023-03-26T03:14:02.000Z","status":1,"totalPoints":16990,"rankingPoints":16990,"totalPass":10,"totalFc":4,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":295,"bracketLevel":21,"footswitchLevel":54,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":148,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"maboesanman","sex":"Male","profileImg":"https://avatars.cloudflare.steamstatic.com/e3211adf5b56e94930380da3ebfe000adfbad09b_full.jpg"},{"id":959,"membersId":173089,"dateAdded":"2023-04-01T19:42:49.000Z","lastUpdated":"2023-04-02T15:58:51.000Z","status":1,"totalPoints":16801,"rankingPoints":16801,"totalPass":9,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":353,"bracketLevel":27,"footswitchLevel":86,"jackLevel":38,"sideswitchLevel":24,"doublestepLevel":50,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stycky.keys","sex":"Male","profileImg":""},{"id":369,"membersId":66714,"dateAdded":"2023-03-19T16:37:55.000Z","lastUpdated":"2023-03-22T16:13:23.000Z","status":1,"totalPoints":16746,"rankingPoints":16746,"totalPass":22,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":220,"bracketLevel":2,"footswitchLevel":51,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":91,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lunal3blanc","sex":"Female","profileImg":""},{"id":1015,"membersId":173386,"dateAdded":"2023-04-05T00:22:19.000Z","lastUpdated":"2023-04-28T21:51:08.000Z","status":1,"totalPoints":16680,"rankingPoints":16680,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":11,"totalQuint":1,"crossoverLevel":285,"bracketLevel":34,"footswitchLevel":68,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":140,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"WAY2022","sex":"Unspecified","profileImg":""},{"id":310,"membersId":149574,"dateAdded":"2023-03-19T05:23:41.000Z","lastUpdated":"2023-05-06T16:13:10.000Z","status":1,"totalPoints":16012,"rankingPoints":16012,"totalPass":1,"totalFc":1,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":279,"bracketLevel":0,"footswitchLevel":20,"jackLevel":51,"sideswitchLevel":0,"doublestepLevel":117,"staminaLevel":18,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kayzero","sex":"Male","profileImg":""},{"id":986,"membersId":172946,"dateAdded":"2023-04-03T02:10:44.000Z","lastUpdated":"2023-04-14T01:21:03.000Z","status":1,"totalPoints":15920,"rankingPoints":15920,"totalPass":6,"totalFc":6,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":249,"bracketLevel":78,"footswitchLevel":38,"jackLevel":80,"sideswitchLevel":0,"doublestepLevel":134,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"NYOOOOOM#6969\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NYOOOOOM","sex":"Male","profileImg":"http://www.simpleimageresizer.com/_uploads/photos/ee3cd65a/a0601157265_10_250x300.jpg"},{"id":725,"membersId":175475,"dateAdded":"2023-03-24T04:52:59.000Z","lastUpdated":"2023-05-02T05:56:12.000Z","status":1,"totalPoints":15880,"rankingPoints":15880,"totalPass":10,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":131,"bracketLevel":4,"footswitchLevel":54,"jackLevel":70,"sideswitchLevel":0,"doublestepLevel":145,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jabronski","sex":"Unspecified","profileImg":""},{"id":203,"membersId":175372,"dateAdded":"2023-03-18T23:27:50.000Z","lastUpdated":"2023-04-08T17:55:03.000Z","status":1,"totalPoints":15659,"rankingPoints":15659,"totalPass":20,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":94,"bracketLevel":13,"footswitchLevel":27,"jackLevel":20,"sideswitchLevel":0,"doublestepLevel":80,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FrankieFusion22","sex":"Unspecified","profileImg":""},{"id":777,"membersId":173664,"dateAdded":"2023-03-25T12:57:53.000Z","lastUpdated":"2023-04-07T18:14:38.000Z","status":1,"totalPoints":15421,"rankingPoints":15421,"totalPass":11,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":122,"bracketLevel":27,"footswitchLevel":23,"jackLevel":61,"sideswitchLevel":17,"doublestepLevel":93,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":\"Blurry#9480\",\"decentsEnabled\":false,\"wayOffsEnabled\":true}","name":"BlurryLuvsYou","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/635646459915665437/978618782392135730/smallblurry2.png"},{"id":782,"membersId":175513,"dateAdded":"2023-03-25T15:24:00.000Z","lastUpdated":"2023-04-15T18:52:29.000Z","status":1,"totalPoints":15232,"rankingPoints":15232,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":37,"bracketLevel":146,"footswitchLevel":222,"jackLevel":9,"sideswitchLevel":198,"doublestepLevel":51,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maru96","sex":"Male","profileImg":""},{"id":646,"membersId":174977,"dateAdded":"2023-03-22T08:17:22.000Z","lastUpdated":"2023-04-13T06:40:17.000Z","status":1,"totalPoints":15098,"rankingPoints":15098,"totalPass":25,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":239,"bracketLevel":5,"footswitchLevel":87,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":82,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Dlim DD#6668\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"DlimDhady","sex":"Male","profileImg":""},{"id":14,"membersId":114726,"dateAdded":"2023-03-18T21:48:42.000Z","lastUpdated":"2023-04-18T23:10:51.000Z","status":1,"totalPoints":15087,"rankingPoints":15087,"totalPass":6,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":89,"bracketLevel":167,"footswitchLevel":56,"jackLevel":54,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Scrypts","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/803518235437039676/958164594587742248/e.png"},{"id":570,"membersId":130783,"dateAdded":"2023-03-21T01:21:28.000Z","lastUpdated":"2023-05-05T01:15:03.000Z","status":1,"totalPoints":15072,"rankingPoints":15072,"totalPass":8,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":129,"bracketLevel":15,"footswitchLevel":70,"jackLevel":43,"sideswitchLevel":0,"doublestepLevel":38,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mld","sex":"Female","profileImg":""},{"id":833,"membersId":175543,"dateAdded":"2023-03-26T20:31:36.000Z","lastUpdated":"2023-03-26T21:09:50.000Z","status":1,"totalPoints":14936,"rankingPoints":14936,"totalPass":7,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":200,"bracketLevel":11,"footswitchLevel":29,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":36,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"joaoalex","sex":"Male","profileImg":""},{"id":974,"membersId":173480,"dateAdded":"2023-04-02T18:49:24.000Z","lastUpdated":"2023-04-02T19:13:18.000Z","status":1,"totalPoints":14826,"rankingPoints":14826,"totalPass":6,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":89,"bracketLevel":9,"footswitchLevel":98,"jackLevel":50,"sideswitchLevel":55,"doublestepLevel":92,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"robotmeadows","sex":"Unspecified","profileImg":""},{"id":375,"membersId":173439,"dateAdded":"2023-03-19T17:22:36.000Z","lastUpdated":"2023-04-24T23:34:48.000Z","status":1,"totalPoints":14798,"rankingPoints":14798,"totalPass":10,"totalFc":10,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":198,"bracketLevel":1,"footswitchLevel":17,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":36,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"danizom813","sex":"Female","profileImg":""},{"id":764,"membersId":175494,"dateAdded":"2023-03-25T03:22:03.000Z","lastUpdated":"2023-04-30T03:24:31.000Z","status":1,"totalPoints":14757,"rankingPoints":14757,"totalPass":13,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":221,"bracketLevel":9,"footswitchLevel":57,"jackLevel":10,"sideswitchLevel":0,"doublestepLevel":224,"staminaLevel":5,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KekDubber","sex":"Unspecified","profileImg":""},{"id":997,"membersId":129524,"dateAdded":"2023-04-03T23:23:19.000Z","lastUpdated":"2023-04-04T02:10:38.000Z","status":1,"totalPoints":14714,"rankingPoints":14714,"totalPass":11,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":167,"bracketLevel":6,"footswitchLevel":32,"jackLevel":9,"sideswitchLevel":0,"doublestepLevel":103,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"la0n114#2753\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"L*A0N","sex":"Male","profileImg":"https://tinypic.host/images/2023/04/04/ProfilePic-2.png"},{"id":893,"membersId":175437,"dateAdded":"2023-03-29T04:27:37.000Z","lastUpdated":"2023-04-07T01:57:26.000Z","status":1,"totalPoints":14297,"rankingPoints":14297,"totalPass":21,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":92,"bracketLevel":67,"footswitchLevel":36,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":31,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tehfyre","sex":"Male","profileImg":""},{"id":773,"membersId":127887,"dateAdded":"2023-03-25T09:39:29.000Z","lastUpdated":"2023-03-30T10:45:10.000Z","status":1,"totalPoints":14292,"rankingPoints":14292,"totalPass":15,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":161,"bracketLevel":64,"footswitchLevel":120,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":48,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jenx","sex":"Female","profileImg":"https://www.amarion.net/misc/dawn250x300.png"},{"id":839,"membersId":175450,"dateAdded":"2023-03-26T22:04:42.000Z","lastUpdated":"2023-04-07T22:23:22.000Z","status":1,"totalPoints":14254,"rankingPoints":14254,"totalPass":5,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":174,"bracketLevel":91,"footswitchLevel":46,"jackLevel":7,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":21,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ArchOwL","sex":"Male","profileImg":""},{"id":836,"membersId":175541,"dateAdded":"2023-03-26T21:10:36.000Z","lastUpdated":"2023-03-26T22:44:23.000Z","status":1,"totalPoints":14072,"rankingPoints":14072,"totalPass":6,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":79,"bracketLevel":16,"footswitchLevel":106,"jackLevel":86,"sideswitchLevel":40,"doublestepLevel":50,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BOT","sex":"Male","profileImg":""},{"id":1267,"membersId":176065,"dateAdded":"2023-05-02T00:46:33.000Z","lastUpdated":"2023-05-02T01:08:29.000Z","status":1,"totalPoints":13921,"rankingPoints":13921,"totalPass":3,"totalFc":1,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":71,"bracketLevel":63,"footswitchLevel":53,"jackLevel":52,"sideswitchLevel":0,"doublestepLevel":64,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yennimiau","sex":"Female","profileImg":""},{"id":413,"membersId":173972,"dateAdded":"2023-03-19T20:12:16.000Z","lastUpdated":"2023-05-02T18:49:59.000Z","status":1,"totalPoints":13737,"rankingPoints":13737,"totalPass":16,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":81,"bracketLevel":0,"footswitchLevel":25,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":69,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"George#2464\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"G O O C H","sex":"Male","profileImg":""},{"id":834,"membersId":135228,"dateAdded":"2023-03-26T20:55:50.000Z","lastUpdated":"2023-04-02T23:24:21.000Z","status":1,"totalPoints":13676,"rankingPoints":13676,"totalPass":2,"totalFc":1,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":128,"bracketLevel":27,"footswitchLevel":41,"jackLevel":23,"sideswitchLevel":0,"doublestepLevel":153,"staminaLevel":5,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"hintz","sex":"Unspecified","profileImg":""},{"id":642,"membersId":173638,"dateAdded":"2023-03-22T05:25:27.000Z","lastUpdated":"2023-04-23T08:01:14.000Z","status":1,"totalPoints":13674,"rankingPoints":13674,"totalPass":23,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":168,"bracketLevel":14,"footswitchLevel":45,"jackLevel":2,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"markspen","sex":"Unspecified","profileImg":""},{"id":1183,"membersId":175944,"dateAdded":"2023-04-22T02:17:44.000Z","lastUpdated":"2023-05-04T18:57:04.000Z","status":1,"totalPoints":13421,"rankingPoints":13421,"totalPass":12,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":168,"bracketLevel":6,"footswitchLevel":59,"jackLevel":76,"sideswitchLevel":0,"doublestepLevel":57,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SaturnZeroOne","sex":"Male","profileImg":""},{"id":812,"membersId":66190,"dateAdded":"2023-03-26T01:57:45.000Z","lastUpdated":"2023-03-26T03:21:49.000Z","status":1,"totalPoints":13193,"rankingPoints":13193,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":91,"bracketLevel":15,"footswitchLevel":31,"jackLevel":10,"sideswitchLevel":0,"doublestepLevel":51,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mtgmackid","sex":"Male","profileImg":""},{"id":1113,"membersId":173579,"dateAdded":"2023-04-13T01:24:47.000Z","lastUpdated":"2023-04-27T01:58:32.000Z","status":1,"totalPoints":13113,"rankingPoints":13113,"totalPass":18,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":132,"bracketLevel":1,"footswitchLevel":46,"jackLevel":20,"sideswitchLevel":0,"doublestepLevel":121,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Burtor","sex":"Unspecified","profileImg":""},{"id":837,"membersId":173958,"dateAdded":"2023-03-26T21:54:56.000Z","lastUpdated":"2023-04-12T02:10:20.000Z","status":1,"totalPoints":13071,"rankingPoints":13071,"totalPass":13,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":189,"bracketLevel":6,"footswitchLevel":41,"jackLevel":23,"sideswitchLevel":0,"doublestepLevel":27,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":\"Mawntee#6969\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Mawntee","sex":"Male","profileImg":"https://i.imgur.com/HrTjwA6.png"},{"id":349,"membersId":173857,"dateAdded":"2023-03-19T14:03:54.000Z","lastUpdated":"2023-03-26T17:38:31.000Z","status":1,"totalPoints":12964,"rankingPoints":12964,"totalPass":22,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":248,"bracketLevel":5,"footswitchLevel":36,"jackLevel":14,"sideswitchLevel":0,"doublestepLevel":77,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Jocab","sex":"Unspecified","profileImg":""},{"id":978,"membersId":173794,"dateAdded":"2023-04-02T20:23:23.000Z","lastUpdated":"2023-04-10T22:44:11.000Z","status":1,"totalPoints":12949,"rankingPoints":12949,"totalPass":6,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":221,"bracketLevel":9,"footswitchLevel":63,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":73,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Locoyokopoco","sex":"Unspecified","profileImg":"https://i.imgur.com/dmGWuaX.png"},{"id":928,"membersId":641,"dateAdded":"2023-03-30T21:54:35.000Z","lastUpdated":"2023-04-26T19:37:53.000Z","status":1,"totalPoints":12938,"rankingPoints":12938,"totalPass":0,"totalFc":0,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":153,"bracketLevel":12,"footswitchLevel":27,"jackLevel":17,"sideswitchLevel":0,"doublestepLevel":36,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"Tiza#0054\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"IHYD.Tiza","sex":"Male","profileImg":""},{"id":74,"membersId":173087,"dateAdded":"2023-03-18T21:50:14.000Z","lastUpdated":"2023-03-30T01:58:08.000Z","status":1,"totalPoints":12877,"rankingPoints":12877,"totalPass":5,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":110,"bracketLevel":49,"footswitchLevel":46,"jackLevel":14,"sideswitchLevel":48,"doublestepLevel":85,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":\"Gr00txD #1399\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gr00txD","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1026379676476956672/rxMbgeMF_400x400.jpg"},{"id":305,"membersId":172888,"dateAdded":"2023-03-19T04:41:02.000Z","lastUpdated":"2023-03-21T01:10:13.000Z","status":1,"totalPoints":12814,"rankingPoints":12814,"totalPass":8,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":253,"bracketLevel":9,"footswitchLevel":111,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":162,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ipie4fun","sex":"Male","profileImg":"https://www.betterredteam.com/the_funny.jpg"},{"id":1280,"membersId":175789,"dateAdded":"2023-05-03T16:06:16.000Z","lastUpdated":"2023-05-06T13:44:40.000Z","status":1,"totalPoints":12771,"rankingPoints":12771,"totalPass":18,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":155,"bracketLevel":0,"footswitchLevel":69,"jackLevel":36,"sideswitchLevel":0,"doublestepLevel":57,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mehu.","sex":"Unspecified","profileImg":""},{"id":1221,"membersId":173471,"dateAdded":"2023-04-26T21:59:47.000Z","lastUpdated":"2023-04-26T23:47:22.000Z","status":1,"totalPoints":12763,"rankingPoints":12763,"totalPass":8,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":202,"bracketLevel":1,"footswitchLevel":34,"jackLevel":31,"sideswitchLevel":0,"doublestepLevel":11,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Soul","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/392199949183483904/961855277903257610/pikayom2.png"},{"id":1085,"membersId":111763,"dateAdded":"2023-04-10T12:27:01.000Z","lastUpdated":"2023-04-29T17:05:11.000Z","status":1,"totalPoints":12722,"rankingPoints":12722,"totalPass":4,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":58,"bracketLevel":2,"footswitchLevel":23,"jackLevel":7,"sideswitchLevel":0,"doublestepLevel":88,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"Kaede#2180\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Kaede","sex":"Unspecified","profileImg":""},{"id":835,"membersId":175527,"dateAdded":"2023-03-26T21:09:48.000Z","lastUpdated":"2023-03-26T22:58:09.000Z","status":1,"totalPoints":12585,"rankingPoints":12585,"totalPass":6,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":118,"bracketLevel":13,"footswitchLevel":10,"jackLevel":3,"sideswitchLevel":33,"doublestepLevel":75,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"stowwww","sex":"Male","profileImg":""},{"id":1159,"membersId":175888,"dateAdded":"2023-04-18T22:08:32.000Z","lastUpdated":"2023-04-18T23:34:10.000Z","status":1,"totalPoints":12503,"rankingPoints":12503,"totalPass":6,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":209,"bracketLevel":11,"footswitchLevel":41,"jackLevel":7,"sideswitchLevel":0,"doublestepLevel":9,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrFOO","sex":"Male","profileImg":""},{"id":1019,"membersId":175595,"dateAdded":"2023-04-05T03:40:17.000Z","lastUpdated":"2023-04-12T23:41:35.000Z","status":1,"totalPoints":12417,"rankingPoints":12417,"totalPass":5,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":83,"bracketLevel":0,"footswitchLevel":79,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aestivalia","sex":"Male","profileImg":"https://www.koolbadges.co.uk/images/thumbnails/scotland-flag-badge-200x200.jpg"},{"id":471,"membersId":66765,"dateAdded":"2023-03-20T02:59:27.000Z","lastUpdated":"2023-03-22T21:07:12.000Z","status":1,"totalPoints":12397,"rankingPoints":12397,"totalPass":6,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":178,"bracketLevel":15,"footswitchLevel":47,"jackLevel":21,"sideswitchLevel":0,"doublestepLevel":49,"staminaLevel":25,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nato","sex":"Unspecified","profileImg":""},{"id":995,"membersId":175679,"dateAdded":"2023-04-03T22:23:56.000Z","lastUpdated":"2023-05-06T02:06:59.000Z","status":1,"totalPoints":12319,"rankingPoints":12319,"totalPass":20,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":188,"bracketLevel":10,"footswitchLevel":20,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":64,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nk29","sex":"Female","profileImg":""},{"id":301,"membersId":173340,"dateAdded":"2023-03-19T04:17:09.000Z","lastUpdated":"2023-04-30T16:10:41.000Z","status":1,"totalPoints":12233,"rankingPoints":12233,"totalPass":3,"totalFc":3,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":48,"bracketLevel":17,"footswitchLevel":52,"jackLevel":23,"sideswitchLevel":0,"doublestepLevel":150,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zekkty","sex":"Male","profileImg":"https://i.postimg.cc/NfHgpqP7/groovestat.jpg"},{"id":508,"membersId":173481,"dateAdded":"2023-03-20T16:19:07.000Z","lastUpdated":"2023-03-26T19:59:11.000Z","status":1,"totalPoints":12200,"rankingPoints":12200,"totalPass":17,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":248,"bracketLevel":0,"footswitchLevel":23,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":96,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CedricSM","sex":"Male","profileImg":""},{"id":894,"membersId":76690,"dateAdded":"2023-03-29T04:38:58.000Z","lastUpdated":"2023-03-29T19:04:47.000Z","status":1,"totalPoints":12162,"rankingPoints":12162,"totalPass":3,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":87,"bracketLevel":14,"footswitchLevel":27,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":74,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"OtakuBot","sex":"Male","profileImg":""},{"id":988,"membersId":175669,"dateAdded":"2023-04-03T08:01:52.000Z","lastUpdated":"2023-04-22T19:23:05.000Z","status":1,"totalPoints":12057,"rankingPoints":12057,"totalPass":12,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":105,"bracketLevel":23,"footswitchLevel":21,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":59,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"HayThyAi#4331\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HayThyAi","sex":"Male","profileImg":""},{"id":663,"membersId":165529,"dateAdded":"2023-03-22T18:22:47.000Z","lastUpdated":"2023-04-05T19:28:07.000Z","status":1,"totalPoints":11862,"rankingPoints":11862,"totalPass":10,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":271,"bracketLevel":9,"footswitchLevel":42,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":82,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"arsnova#9523\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"ArsNova","sex":"Male","profileImg":"https://i.ibb.co/G7sH7cd/discord-avatar.png"},{"id":869,"membersId":175557,"dateAdded":"2023-03-28T02:36:39.000Z","lastUpdated":"2023-03-28T04:38:17.000Z","status":1,"totalPoints":11776,"rankingPoints":11776,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":102,"bracketLevel":0,"footswitchLevel":5,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":64,"staminaLevel":14,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MattyX6","sex":"Unspecified","profileImg":""},{"id":1213,"membersId":175997,"dateAdded":"2023-04-25T16:10:04.000Z","lastUpdated":"2023-05-03T23:09:51.000Z","status":1,"totalPoints":11344,"rankingPoints":11344,"totalPass":1,"totalFc":4,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":301,"bracketLevel":11,"footswitchLevel":135,"jackLevel":39,"sideswitchLevel":0,"doublestepLevel":69,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":\"UNKWN#3200\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"UnknwnMelody","sex":"Male","profileImg":""},{"id":614,"membersId":175380,"dateAdded":"2023-03-21T21:42:29.000Z","lastUpdated":"2023-04-07T23:04:35.000Z","status":1,"totalPoints":11288,"rankingPoints":11288,"totalPass":4,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":111,"bracketLevel":34,"footswitchLevel":52,"jackLevel":0,"sideswitchLevel":79,"doublestepLevel":23,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iTeoSpazzatura","sex":"Male","profileImg":""},{"id":468,"membersId":173751,"dateAdded":"2023-03-20T02:47:05.000Z","lastUpdated":"2023-04-04T09:36:54.000Z","status":1,"totalPoints":11173,"rankingPoints":11173,"totalPass":4,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":175,"bracketLevel":3,"footswitchLevel":28,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ptcht","sex":"Female","profileImg":""},{"id":841,"membersId":174652,"dateAdded":"2023-03-26T22:19:23.000Z","lastUpdated":"2023-03-31T04:16:07.000Z","status":1,"totalPoints":11012,"rankingPoints":11012,"totalPass":2,"totalFc":1,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":145,"bracketLevel":41,"footswitchLevel":39,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":39,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DEVLZUKN","sex":"Male","profileImg":""},{"id":711,"membersId":173618,"dateAdded":"2023-03-24T00:11:12.000Z","lastUpdated":"2023-03-31T02:07:30.000Z","status":1,"totalPoints":10938,"rankingPoints":10938,"totalPass":12,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":104,"bracketLevel":0,"footswitchLevel":37,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":160,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Competingsnail","sex":"Unspecified","profileImg":""},{"id":960,"membersId":174956,"dateAdded":"2023-04-01T19:47:21.000Z","lastUpdated":"2023-04-30T19:11:43.000Z","status":1,"totalPoints":10809,"rankingPoints":10809,"totalPass":15,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":179,"bracketLevel":0,"footswitchLevel":20,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":90,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Bryan1","sex":"Male","profileImg":""},{"id":551,"membersId":172932,"dateAdded":"2023-03-20T22:25:56.000Z","lastUpdated":"2023-04-18T23:04:18.000Z","status":1,"totalPoints":10488,"rankingPoints":10488,"totalPass":6,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":217,"bracketLevel":7,"footswitchLevel":29,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":65,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zergh","sex":"Unspecified","profileImg":""},{"id":753,"membersId":173347,"dateAdded":"2023-03-25T00:57:04.000Z","lastUpdated":"2023-04-05T00:28:12.000Z","status":1,"totalPoints":10449,"rankingPoints":10449,"totalPass":19,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":142,"bracketLevel":10,"footswitchLevel":28,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":44,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rooney","sex":"Unspecified","profileImg":""},{"id":1036,"membersId":174299,"dateAdded":"2023-04-06T19:28:30.000Z","lastUpdated":"2023-04-14T22:28:57.000Z","status":1,"totalPoints":10377,"rankingPoints":10377,"totalPass":13,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":106,"bracketLevel":12,"footswitchLevel":16,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":29,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kappajog","sex":"Unspecified","profileImg":""},{"id":584,"membersId":174446,"dateAdded":"2023-03-21T05:41:02.000Z","lastUpdated":"2023-03-22T03:14:08.000Z","status":1,"totalPoints":9951,"rankingPoints":9951,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":113,"bracketLevel":0,"footswitchLevel":18,"jackLevel":22,"sideswitchLevel":0,"doublestepLevel":79,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Grieviious","sex":"Unspecified","profileImg":"https://avatars.akamai.steamstatic.com/953ddb7f95e54c08281c1f60c20c247ee7fa747b_full.jpg"},{"id":1158,"membersId":175851,"dateAdded":"2023-04-18T21:07:26.000Z","lastUpdated":"2023-05-07T04:48:08.000Z","status":1,"totalPoints":9951,"rankingPoints":9951,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":114,"bracketLevel":2,"footswitchLevel":23,"jackLevel":48,"sideswitchLevel":17,"doublestepLevel":59,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Puke","sex":"Unspecified","profileImg":""},{"id":1037,"membersId":175741,"dateAdded":"2023-04-06T21:46:31.000Z","lastUpdated":"2023-04-18T01:37:59.000Z","status":1,"totalPoints":9753,"rankingPoints":9753,"totalPass":7,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":143,"bracketLevel":1,"footswitchLevel":63,"jackLevel":56,"sideswitchLevel":0,"doublestepLevel":183,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"vvdUnderscore","sex":"Unspecified","profileImg":"https://pbs.twimg.com/profile_images/1642109031392346113/0nHQ67lA_400x400.jpg"},{"id":346,"membersId":173052,"dateAdded":"2023-03-19T13:12:20.000Z","lastUpdated":"2023-03-26T15:42:42.000Z","status":1,"totalPoints":9709,"rankingPoints":9709,"totalPass":5,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":130,"bracketLevel":32,"footswitchLevel":127,"jackLevel":69,"sideswitchLevel":0,"doublestepLevel":106,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CrispyDave","sex":"Male","profileImg":""},{"id":337,"membersId":163910,"dateAdded":"2023-03-19T11:43:37.000Z","lastUpdated":"2023-04-04T10:25:59.000Z","status":1,"totalPoints":9682,"rankingPoints":9682,"totalPass":4,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":112,"bracketLevel":0,"footswitchLevel":5,"jackLevel":72,"sideswitchLevel":0,"doublestepLevel":143,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"The_Break","sex":"Male","profileImg":""},{"id":1281,"membersId":176098,"dateAdded":"2023-05-03T18:24:04.000Z","lastUpdated":"2023-05-04T21:18:54.000Z","status":1,"totalPoints":9580,"rankingPoints":9580,"totalPass":5,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":170,"bracketLevel":7,"footswitchLevel":39,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":56,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GODDISH","sex":"Male","profileImg":""},{"id":406,"membersId":172970,"dateAdded":"2023-03-19T19:48:25.000Z","lastUpdated":"2023-03-23T19:51:18.000Z","status":1,"totalPoints":9527,"rankingPoints":9527,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":46,"bracketLevel":77,"footswitchLevel":42,"jackLevel":154,"sideswitchLevel":0,"doublestepLevel":72,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fake Flake","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/928412540113928195/928422224870924298/FLAKE_ON_LSD.png"},{"id":676,"membersId":165925,"dateAdded":"2023-03-22T23:01:39.000Z","lastUpdated":"2023-04-20T22:14:14.000Z","status":1,"totalPoints":9396,"rankingPoints":9396,"totalPass":2,"totalFc":2,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":217,"bracketLevel":10,"footswitchLevel":31,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":84,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Snow Latte","sex":"Unspecified","profileImg":""},{"id":220,"membersId":173107,"dateAdded":"2023-03-19T00:12:33.000Z","lastUpdated":"2023-04-29T00:20:09.000Z","status":1,"totalPoints":9392,"rankingPoints":9392,"totalPass":1,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":155,"bracketLevel":10,"footswitchLevel":24,"jackLevel":5,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kibazuka","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/443643281109155842/916142398323707954/sf-kiba-av.png"},{"id":1023,"membersId":128906,"dateAdded":"2023-04-05T17:07:03.000Z","lastUpdated":"2023-04-06T09:59:21.000Z","status":1,"totalPoints":9340,"rankingPoints":9340,"totalPass":5,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":133,"bracketLevel":27,"footswitchLevel":79,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":58,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chrizux","sex":"Female","profileImg":""},{"id":1278,"membersId":66687,"dateAdded":"2023-05-02T21:11:56.000Z","lastUpdated":"2023-05-05T18:05:19.000Z","status":1,"totalPoints":9143,"rankingPoints":9143,"totalPass":1,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":44,"bracketLevel":2,"footswitchLevel":30,"jackLevel":7,"sideswitchLevel":0,"doublestepLevel":3,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PinoITG","sex":"Male","profileImg":""},{"id":832,"membersId":174925,"dateAdded":"2023-03-26T20:28:39.000Z","lastUpdated":"2023-04-02T00:58:50.000Z","status":1,"totalPoints":8993,"rankingPoints":8993,"totalPass":2,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":109,"bracketLevel":0,"footswitchLevel":4,"jackLevel":0,"sideswitchLevel":14,"doublestepLevel":32,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kdwavour","sex":"Female","profileImg":""},{"id":534,"membersId":173149,"dateAdded":"2023-03-20T19:42:15.000Z","lastUpdated":"2023-04-06T14:48:10.000Z","status":1,"totalPoints":8779,"rankingPoints":8779,"totalPass":8,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":84,"bracketLevel":34,"footswitchLevel":33,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":107,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rya","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/1008463740783558689/1087462211389227038/image.png"},{"id":1057,"membersId":33185,"dateAdded":"2023-04-08T03:46:03.000Z","lastUpdated":"2023-04-16T04:06:59.000Z","status":1,"totalPoints":8696,"rankingPoints":8696,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":1,"totalQuint":0,"crossoverLevel":88,"bracketLevel":22,"footswitchLevel":105,"jackLevel":0,"sideswitchLevel":27,"doublestepLevel":45,"staminaLevel":19,"isBuddy":false,"preferences":"{\"discordId\":\"Majinn-Ty#3362\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Tyty","sex":"Male","profileImg":""},{"id":1055,"membersId":175761,"dateAdded":"2023-04-08T01:46:04.000Z","lastUpdated":"2023-04-08T02:28:54.000Z","status":1,"totalPoints":8609,"rankingPoints":8609,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":49,"bracketLevel":48,"footswitchLevel":30,"jackLevel":32,"sideswitchLevel":0,"doublestepLevel":150,"staminaLevel":5,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Starlight ","sex":"Male","profileImg":""},{"id":919,"membersId":75763,"dateAdded":"2023-03-30T11:23:12.000Z","lastUpdated":"2023-04-05T12:33:22.000Z","status":1,"totalPoints":8576,"rankingPoints":8576,"totalPass":4,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":99,"bracketLevel":3,"footswitchLevel":12,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":68,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Smanki","sex":"Female","profileImg":"https://pp.userapi.com/c854224/v854224275/5113b/eCUIROBiNwc.jpg"},{"id":1273,"membersId":176072,"dateAdded":"2023-05-02T14:23:33.000Z","lastUpdated":"2023-05-02T16:42:05.000Z","status":1,"totalPoints":8368,"rankingPoints":8368,"totalPass":11,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":97,"bracketLevel":0,"footswitchLevel":20,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":85,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bAnAn","sex":"Male","profileImg":""},{"id":1293,"membersId":142358,"dateAdded":"2023-05-06T00:10:43.000Z","lastUpdated":"2023-05-06T00:52:26.000Z","status":1,"totalPoints":8347,"rankingPoints":8347,"totalPass":4,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":23,"bracketLevel":33,"footswitchLevel":8,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":64,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aoba","sex":"Male","profileImg":"https://i.ibb.co/QdL3NLg/2.png"},{"id":609,"membersId":174533,"dateAdded":"2023-03-21T20:21:24.000Z","lastUpdated":"2023-05-05T18:17:24.000Z","status":1,"totalPoints":8030,"rankingPoints":8030,"totalPass":14,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":131,"bracketLevel":5,"footswitchLevel":34,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lika","sex":"Female","profileImg":""},{"id":940,"membersId":175626,"dateAdded":"2023-03-31T20:32:40.000Z","lastUpdated":"2023-03-31T22:48:04.000Z","status":1,"totalPoints":7782,"rankingPoints":7782,"totalPass":11,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":156,"bracketLevel":5,"footswitchLevel":36,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":80,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Khaoskid663","sex":"Unspecified","profileImg":""},{"id":292,"membersId":4400,"dateAdded":"2023-03-19T03:41:56.000Z","lastUpdated":"2023-03-21T01:18:41.000Z","status":1,"totalPoints":7719,"rankingPoints":7719,"totalPass":0,"totalFc":1,"totalFec":0,"totalQuad":3,"totalQuint":0,"crossoverLevel":88,"bracketLevel":0,"footswitchLevel":4,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":25,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"titandude21","sex":"Male","profileImg":""},{"id":813,"membersId":483,"dateAdded":"2023-03-26T02:35:50.000Z","lastUpdated":"2023-04-10T01:23:35.000Z","status":1,"totalPoints":7343,"rankingPoints":7343,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":2,"bracketLevel":52,"footswitchLevel":41,"jackLevel":104,"sideswitchLevel":0,"doublestepLevel":14,"staminaLevel":28,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"UK.s34n","sex":"Male","profileImg":"https://i.imgur.com/iF6IscA.gif"},{"id":1039,"membersId":66380,"dateAdded":"2023-04-06T22:47:53.000Z","lastUpdated":"2023-04-07T03:00:37.000Z","status":1,"totalPoints":7256,"rankingPoints":7256,"totalPass":1,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":152,"bracketLevel":11,"footswitchLevel":28,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":8,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GenesisRapshodos","sex":"Male","profileImg":"https://i.imgur.com/tbj82Ap.jpg"},{"id":550,"membersId":173080,"dateAdded":"2023-03-20T22:10:00.000Z","lastUpdated":"2023-03-25T19:10:25.000Z","status":1,"totalPoints":7099,"rankingPoints":7099,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":82,"bracketLevel":0,"footswitchLevel":0,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":116,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NoxiousOtter","sex":"Unspecified","profileImg":""},{"id":1038,"membersId":72662,"dateAdded":"2023-04-06T22:47:26.000Z","lastUpdated":"2023-04-09T18:40:29.000Z","status":1,"totalPoints":7067,"rankingPoints":7067,"totalPass":8,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":48,"bracketLevel":0,"footswitchLevel":15,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":125,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Digi0127","sex":"Female","profileImg":""},{"id":1134,"membersId":175850,"dateAdded":"2023-04-15T21:37:40.000Z","lastUpdated":"2023-04-15T21:56:41.000Z","status":1,"totalPoints":6978,"rankingPoints":6978,"totalPass":2,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":45,"bracketLevel":16,"footswitchLevel":44,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":139,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mono69","sex":"Male","profileImg":""},{"id":1198,"membersId":66358,"dateAdded":"2023-04-23T17:33:29.000Z","lastUpdated":"2023-04-23T19:37:26.000Z","status":1,"totalPoints":6903,"rankingPoints":6903,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":77,"bracketLevel":0,"footswitchLevel":16,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MidnightCatto","sex":"Male","profileImg":"https://a.furaffinity.net/1563514820/midnightxenesis.gif"},{"id":975,"membersId":66760,"dateAdded":"2023-04-02T18:54:02.000Z","lastUpdated":"2023-04-08T00:23:31.000Z","status":1,"totalPoints":6870,"rankingPoints":6870,"totalPass":17,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":50,"bracketLevel":0,"footswitchLevel":21,"jackLevel":10,"sideswitchLevel":0,"doublestepLevel":32,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"implode","sex":"Male","profileImg":"https://i.imgur.com/MQM0Ayv.png"},{"id":858,"membersId":175554,"dateAdded":"2023-03-27T20:42:22.000Z","lastUpdated":"2023-05-04T05:05:37.000Z","status":1,"totalPoints":6866,"rankingPoints":6866,"totalPass":11,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":70,"bracketLevel":0,"footswitchLevel":62,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":47,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aura Irving","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/374761563732574220/1090012450474164244/groovestats.png"},{"id":1179,"membersId":173782,"dateAdded":"2023-04-21T21:23:49.000Z","lastUpdated":"2023-04-23T16:47:22.000Z","status":1,"totalPoints":6800,"rankingPoints":6800,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":26,"bracketLevel":64,"footswitchLevel":1,"jackLevel":74,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"joowon","sex":"Unspecified","profileImg":""},{"id":1027,"membersId":175723,"dateAdded":"2023-04-05T22:36:08.000Z","lastUpdated":"2023-04-20T04:56:21.000Z","status":1,"totalPoints":6751,"rankingPoints":6751,"totalPass":6,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":196,"bracketLevel":7,"footswitchLevel":84,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":91,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dnsh","sex":"Unspecified","profileImg":"https://i.imgur.com/vzGlHBW.png"},{"id":1230,"membersId":176022,"dateAdded":"2023-04-27T06:00:22.000Z","lastUpdated":"2023-04-30T21:55:18.000Z","status":1,"totalPoints":6741,"rankingPoints":6741,"totalPass":1,"totalFc":0,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":192,"bracketLevel":10,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":8,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chre","sex":"Unspecified","profileImg":""},{"id":921,"membersId":175606,"dateAdded":"2023-03-30T15:06:29.000Z","lastUpdated":"2023-05-01T13:01:56.000Z","status":1,"totalPoints":6597,"rankingPoints":6597,"totalPass":12,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":99,"bracketLevel":0,"footswitchLevel":14,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":58,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"riikka","sex":"Unspecified","profileImg":""},{"id":438,"membersId":35225,"dateAdded":"2023-03-19T23:14:26.000Z","lastUpdated":"2023-04-06T23:12:15.000Z","status":1,"totalPoints":6595,"rankingPoints":6595,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":3,"totalQuint":0,"crossoverLevel":126,"bracketLevel":0,"footswitchLevel":8,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"rickywong#0628\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"rckywong","sex":"Male","profileImg":""},{"id":870,"membersId":175558,"dateAdded":"2023-03-28T05:48:21.000Z","lastUpdated":"2023-03-28T06:37:00.000Z","status":1,"totalPoints":6577,"rankingPoints":6577,"totalPass":4,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":59,"bracketLevel":0,"footswitchLevel":87,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":84,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aerostin","sex":"Male","profileImg":""},{"id":1209,"membersId":173426,"dateAdded":"2023-04-24T23:47:23.000Z","lastUpdated":"2023-05-02T02:37:51.000Z","status":1,"totalPoints":6495,"rankingPoints":6495,"totalPass":1,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":155,"bracketLevel":10,"footswitchLevel":23,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":61,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kaberosi","sex":"Unspecified","profileImg":""},{"id":925,"membersId":175609,"dateAdded":"2023-03-30T17:53:27.000Z","lastUpdated":"2023-03-30T18:56:06.000Z","status":1,"totalPoints":6454,"rankingPoints":6454,"totalPass":4,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":108,"bracketLevel":7,"footswitchLevel":59,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SunSet","sex":"Unspecified","profileImg":""},{"id":953,"membersId":174850,"dateAdded":"2023-04-01T15:55:12.000Z","lastUpdated":"2023-04-01T16:14:52.000Z","status":1,"totalPoints":6449,"rankingPoints":6449,"totalPass":4,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":54,"bracketLevel":92,"footswitchLevel":81,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"antifun NB","sex":"Unspecified","profileImg":""},{"id":1118,"membersId":174009,"dateAdded":"2023-04-13T23:48:24.000Z","lastUpdated":"2023-04-20T00:11:41.000Z","status":1,"totalPoints":6403,"rankingPoints":6403,"totalPass":1,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":114,"bracketLevel":0,"footswitchLevel":10,"jackLevel":54,"sideswitchLevel":0,"doublestepLevel":69,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ponpar","sex":"Male","profileImg":""},{"id":810,"membersId":175526,"dateAdded":"2023-03-26T00:08:21.000Z","lastUpdated":"2023-05-04T18:58:37.000Z","status":1,"totalPoints":6106,"rankingPoints":6106,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":161,"bracketLevel":1,"footswitchLevel":7,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":28,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RFM","sex":"Male","profileImg":""},{"id":391,"membersId":172988,"dateAdded":"2023-03-19T18:16:35.000Z","lastUpdated":"2023-03-19T22:34:42.000Z","status":1,"totalPoints":5987,"rankingPoints":5987,"totalPass":5,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":137,"bracketLevel":9,"footswitchLevel":19,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":91,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"The_DJax","sex":"Unspecified","profileImg":""},{"id":1266,"membersId":76112,"dateAdded":"2023-05-01T17:56:14.000Z","lastUpdated":"2023-05-01T20:39:40.000Z","status":1,"totalPoints":5806,"rankingPoints":5806,"totalPass":5,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":126,"bracketLevel":6,"footswitchLevel":17,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":57,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Tailsray","sex":"Male","profileImg":"https://i.ibb.co/BGcyV01/OwO.jpg"},{"id":816,"membersId":175528,"dateAdded":"2023-03-26T04:03:02.000Z","lastUpdated":"2023-03-26T04:25:42.000Z","status":1,"totalPoints":5661,"rankingPoints":5661,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":121,"bracketLevel":16,"footswitchLevel":67,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Crispy","sex":"Male","profileImg":""},{"id":1257,"membersId":176055,"dateAdded":"2023-05-01T02:20:08.000Z","lastUpdated":"2023-05-06T16:52:16.000Z","status":1,"totalPoints":5600,"rankingPoints":5600,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":61,"bracketLevel":2,"footswitchLevel":2,"jackLevel":14,"sideswitchLevel":0,"doublestepLevel":61,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"namaslayer","sex":"Unspecified","profileImg":""},{"id":1049,"membersId":175754,"dateAdded":"2023-04-07T17:59:05.000Z","lastUpdated":"2023-04-15T16:46:18.000Z","status":1,"totalPoints":5295,"rankingPoints":5295,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":65,"bracketLevel":9,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Koishi","sex":"Unspecified","profileImg":""},{"id":1173,"membersId":175891,"dateAdded":"2023-04-20T21:18:51.000Z","lastUpdated":"2023-04-21T21:16:42.000Z","status":1,"totalPoints":5291,"rankingPoints":5291,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":73,"bracketLevel":1,"footswitchLevel":4,"jackLevel":3,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kurisu97","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/341061433490145280/1098074574786146324/EwuPLncW8AMbgEA.jpg"},{"id":1040,"membersId":175742,"dateAdded":"2023-04-07T00:42:23.000Z","lastUpdated":"2023-04-07T01:39:30.000Z","status":1,"totalPoints":5283,"rankingPoints":5283,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":110,"bracketLevel":0,"footswitchLevel":6,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":28,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"QueenToast","sex":"Female","profileImg":""},{"id":567,"membersId":173189,"dateAdded":"2023-03-21T00:50:51.000Z","lastUpdated":"2023-04-02T21:21:13.000Z","status":1,"totalPoints":5172,"rankingPoints":5172,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":102,"bracketLevel":11,"footswitchLevel":17,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"steviebearrrr","sex":"Unspecified","profileImg":""},{"id":867,"membersId":172939,"dateAdded":"2023-03-28T01:30:41.000Z","lastUpdated":"2023-04-16T00:09:46.000Z","status":1,"totalPoints":5099,"rankingPoints":5099,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":55,"bracketLevel":0,"footswitchLevel":12,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pedroza","sex":"Female","profileImg":""},{"id":1194,"membersId":175768,"dateAdded":"2023-04-23T14:43:08.000Z","lastUpdated":"2023-04-30T21:21:47.000Z","status":1,"totalPoints":4594,"rankingPoints":4594,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":16,"bracketLevel":0,"footswitchLevel":15,"jackLevel":42,"sideswitchLevel":0,"doublestepLevel":7,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Crucisi","sex":"Male","profileImg":""},{"id":859,"membersId":173447,"dateAdded":"2023-03-27T21:19:19.000Z","lastUpdated":"2023-03-27T22:18:03.000Z","status":1,"totalPoints":4558,"rankingPoints":4558,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":77,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kaju_Inu","sex":"Unspecified","profileImg":"https://i.imgur.com/hkbmUW2.png"},{"id":1111,"membersId":174805,"dateAdded":"2023-04-13T00:24:18.000Z","lastUpdated":"2023-04-15T14:50:40.000Z","status":1,"totalPoints":4219,"rankingPoints":4219,"totalPass":2,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":39,"bracketLevel":1,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Wiktini","sex":"Female","profileImg":""},{"id":775,"membersId":175506,"dateAdded":"2023-03-25T10:26:56.000Z","lastUpdated":"2023-04-15T20:11:09.000Z","status":1,"totalPoints":4186,"rankingPoints":4186,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":85,"bracketLevel":0,"footswitchLevel":50,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":43,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Quwertyn","sex":"Male","profileImg":""},{"id":761,"membersId":173328,"dateAdded":"2023-03-25T01:55:41.000Z","lastUpdated":"2023-04-05T22:45:38.000Z","status":1,"totalPoints":4008,"rankingPoints":4008,"totalPass":1,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":67,"bracketLevel":0,"footswitchLevel":3,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LUPIZA","sex":"Unspecified","profileImg":""},{"id":318,"membersId":127775,"dateAdded":"2023-03-19T06:41:30.000Z","lastUpdated":"2023-03-19T08:14:17.000Z","status":1,"totalPoints":3772,"rankingPoints":3772,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":31,"bracketLevel":1,"footswitchLevel":0,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nv","sex":"Male","profileImg":"https://i.imgur.com/4z5tNia.png"},{"id":610,"membersId":174544,"dateAdded":"2023-03-21T20:21:57.000Z","lastUpdated":"2023-05-05T18:05:33.000Z","status":1,"totalPoints":3697,"rankingPoints":3697,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":67,"bracketLevel":9,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ushio","sex":"Female","profileImg":""},{"id":514,"membersId":173314,"dateAdded":"2023-03-20T17:55:04.000Z","lastUpdated":"2023-05-01T18:29:25.000Z","status":1,"totalPoints":3371,"rankingPoints":3371,"totalPass":1,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":88,"bracketLevel":9,"footswitchLevel":22,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"appolose","sex":"Unspecified","profileImg":""},{"id":1275,"membersId":174524,"dateAdded":"2023-05-02T20:22:03.000Z","lastUpdated":"2023-05-06T18:58:31.000Z","status":1,"totalPoints":3191,"rankingPoints":3191,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":40,"bracketLevel":0,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nanoblender","sex":"Unspecified","profileImg":""},{"id":897,"membersId":175436,"dateAdded":"2023-03-29T10:07:48.000Z","lastUpdated":"2023-03-29T10:42:38.000Z","status":1,"totalPoints":2992,"rankingPoints":2992,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":73,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Wendy Ho Wendy Ho","sex":"Unspecified","profileImg":""},{"id":822,"membersId":66763,"dateAdded":"2023-03-26T16:09:21.000Z","lastUpdated":"2023-03-26T17:17:11.000Z","status":1,"totalPoints":2879,"rankingPoints":2879,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":23,"bracketLevel":0,"footswitchLevel":0,"jackLevel":46,"sideswitchLevel":0,"doublestepLevel":53,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Urza","sex":"Male","profileImg":"https://i.imgur.com/7Srxlqj.png"},{"id":844,"membersId":175352,"dateAdded":"2023-03-26T23:30:40.000Z","lastUpdated":"2023-03-27T00:50:00.000Z","status":1,"totalPoints":2862,"rankingPoints":2862,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":71,"bracketLevel":0,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Catra7654","sex":"Female","profileImg":"https://i.imgur.com/4bzaEGm.png"},{"id":705,"membersId":173737,"dateAdded":"2023-03-23T18:39:11.000Z","lastUpdated":"2023-03-27T20:31:41.000Z","status":1,"totalPoints":2692,"rankingPoints":2692,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":1,"totalQuint":1,"crossoverLevel":125,"bracketLevel":12,"footswitchLevel":31,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"G_r_e_g_i ","sex":"Male","profileImg":""},{"id":605,"membersId":174170,"dateAdded":"2023-03-21T18:53:28.000Z","lastUpdated":"2023-03-28T18:49:40.000Z","status":1,"totalPoints":2489,"rankingPoints":2489,"totalPass":3,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":69,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"piankejk","sex":"Female","profileImg":""},{"id":1115,"membersId":32523,"dateAdded":"2023-04-13T02:17:46.000Z","lastUpdated":"2023-04-15T01:21:55.000Z","status":1,"totalPoints":2443,"rankingPoints":2443,"totalPass":3,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":10,"bracketLevel":2,"footswitchLevel":1,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"cammi#5198\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"cammi","sex":"Unspecified","profileImg":""},{"id":1268,"membersId":176067,"dateAdded":"2023-05-02T01:03:53.000Z","lastUpdated":"2023-05-02T01:38:21.000Z","status":1,"totalPoints":2374,"rankingPoints":2374,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":45,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":10,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mars","sex":"Unspecified","profileImg":""},{"id":701,"membersId":173539,"dateAdded":"2023-03-23T15:17:16.000Z","lastUpdated":"2023-03-27T21:34:13.000Z","status":1,"totalPoints":2329,"rankingPoints":2329,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":58,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":41,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lyrycyl","sex":"Unspecified","profileImg":"https://i.imgur.com/9N7LtDS.png"},{"id":763,"membersId":76070,"dateAdded":"2023-03-25T03:20:25.000Z","lastUpdated":"2023-03-26T03:36:18.000Z","status":1,"totalPoints":2291,"rankingPoints":2291,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":20,"bracketLevel":24,"footswitchLevel":8,"jackLevel":44,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Max Forever","sex":"Male","profileImg":"https://www.flashflashrevolution.com/vbz/customavatars/avatar1716973_77.gif"},{"id":1056,"membersId":175763,"dateAdded":"2023-04-08T01:59:45.000Z","lastUpdated":"2023-04-15T00:10:02.000Z","status":1,"totalPoints":2257,"rankingPoints":2257,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":43,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lizzu","sex":"Unspecified","profileImg":""},{"id":1060,"membersId":175765,"dateAdded":"2023-04-08T12:55:04.000Z","lastUpdated":"2023-04-08T13:03:41.000Z","status":1,"totalPoints":2252,"rankingPoints":2252,"totalPass":3,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":55,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"tsubasa83_ch","sex":"Unspecified","profileImg":""},{"id":1126,"membersId":175846,"dateAdded":"2023-04-15T14:08:29.000Z","lastUpdated":"2023-04-15T14:27:20.000Z","status":1,"totalPoints":2163,"rankingPoints":2163,"totalPass":3,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":83,"bracketLevel":7,"footswitchLevel":16,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Krezcent","sex":"Male","profileImg":""},{"id":500,"membersId":66494,"dateAdded":"2023-03-20T15:00:51.000Z","lastUpdated":"2023-03-20T17:48:21.000Z","status":1,"totalPoints":1940,"rankingPoints":1940,"totalPass":3,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":44,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Alessy","sex":"Unspecified","profileImg":""},{"id":1249,"membersId":173408,"dateAdded":"2023-04-29T16:12:18.000Z","lastUpdated":"2023-04-29T17:00:09.000Z","status":1,"totalPoints":1853,"rankingPoints":1853,"totalPass":1,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":4,"bracketLevel":2,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nusa","sex":"Female","profileImg":""},{"id":1235,"membersId":133533,"dateAdded":"2023-04-27T16:26:13.000Z","lastUpdated":"2023-04-27T16:40:37.000Z","status":1,"totalPoints":1833,"rankingPoints":1833,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":31,"bracketLevel":0,"footswitchLevel":2,"jackLevel":22,"sideswitchLevel":0,"doublestepLevel":22,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"silentblackcat","sex":"Female","profileImg":""},{"id":1297,"membersId":176129,"dateAdded":"2023-05-06T14:11:48.000Z","lastUpdated":"2023-05-06T14:16:22.000Z","status":1,"totalPoints":1741,"rankingPoints":1741,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":14,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JustMoneko","sex":"Unspecified","profileImg":""},{"id":804,"membersId":175523,"dateAdded":"2023-03-25T22:55:22.000Z","lastUpdated":"2023-03-25T23:27:06.000Z","status":1,"totalPoints":1678,"rankingPoints":1678,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":26,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":28,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gig4","sex":"Female","profileImg":""},{"id":1229,"membersId":176021,"dateAdded":"2023-04-27T05:24:54.000Z","lastUpdated":"2023-04-30T22:00:48.000Z","status":1,"totalPoints":1588,"rankingPoints":1588,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":15,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"jadefengs","sex":"Female","profileImg":""},{"id":1116,"membersId":175736,"dateAdded":"2023-04-13T20:34:51.000Z","lastUpdated":"2023-04-14T12:36:22.000Z","status":1,"totalPoints":1523,"rankingPoints":1523,"totalPass":3,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":24,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RisuRisu","sex":"Unspecified","profileImg":"https://i.imgur.com/F0T2AI7.png"},{"id":204,"membersId":170672,"dateAdded":"2023-03-18T23:29:20.000Z","lastUpdated":"2023-03-26T01:58:19.000Z","status":1,"totalPoints":1521,"rankingPoints":1521,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":9,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":50,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cathadan","sex":"Male","profileImg":""},{"id":529,"membersId":46737,"dateAdded":"2023-03-20T19:24:54.000Z","lastUpdated":"2023-03-20T20:09:35.000Z","status":1,"totalPoints":1362,"rankingPoints":1362,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":63,"bracketLevel":12,"footswitchLevel":26,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dyl","sex":"Male","profileImg":""},{"id":443,"membersId":173433,"dateAdded":"2023-03-19T23:44:29.000Z","lastUpdated":"2023-03-20T04:41:22.000Z","status":1,"totalPoints":1272,"rankingPoints":1272,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":68,"bracketLevel":0,"footswitchLevel":7,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Clasko","sex":"Male","profileImg":""},{"id":58,"membersId":173341,"dateAdded":"2023-03-18T21:49:31.000Z","lastUpdated":"2023-03-19T21:32:11.000Z","status":1,"totalPoints":1214,"rankingPoints":1214,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":19,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"catcat","sex":"Female","profileImg":""},{"id":1201,"membersId":175961,"dateAdded":"2023-04-24T02:52:44.000Z","lastUpdated":"2023-04-30T19:10:48.000Z","status":1,"totalPoints":1084,"rankingPoints":1084,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":9,"bracketLevel":24,"footswitchLevel":6,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ATARAXIA","sex":"Unspecified","profileImg":""},{"id":789,"membersId":175517,"dateAdded":"2023-03-25T17:45:41.000Z","lastUpdated":"2023-03-25T19:16:14.000Z","status":1,"totalPoints":1078,"rankingPoints":1078,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":29,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maurycyt","sex":"Unspecified","profileImg":""},{"id":1127,"membersId":173599,"dateAdded":"2023-04-15T15:30:38.000Z","lastUpdated":"2023-04-15T15:48:51.000Z","status":1,"totalPoints":982,"rankingPoints":982,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":23,"bracketLevel":18,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chmurek","sex":"Unspecified","profileImg":""},{"id":920,"membersId":173376,"dateAdded":"2023-03-30T14:49:00.000Z","lastUpdated":"2023-04-06T07:28:04.000Z","status":1,"totalPoints":873,"rankingPoints":873,"totalPass":0,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":40,"bracketLevel":0,"footswitchLevel":3,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ViperDev","sex":"Female","profileImg":""},{"id":679,"membersId":175452,"dateAdded":"2023-03-22T23:16:09.000Z","lastUpdated":"2023-03-23T00:29:39.000Z","status":1,"totalPoints":812,"rankingPoints":812,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":19,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Broasty","sex":"Male","profileImg":""},{"id":1119,"membersId":175831,"dateAdded":"2023-04-14T01:57:57.000Z","lastUpdated":"2023-04-21T01:00:59.000Z","status":1,"totalPoints":609,"rankingPoints":609,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":14,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BerylVR","sex":"Unspecified","profileImg":""},{"id":949,"membersId":175640,"dateAdded":"2023-04-01T14:22:56.000Z","lastUpdated":"2023-04-01T16:06:58.000Z","status":1,"totalPoints":477,"rankingPoints":477,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":0,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BiggerJohn","sex":"Unspecified","profileImg":""},{"id":227,"membersId":4707,"dateAdded":"2023-03-19T00:27:00.000Z","lastUpdated":"2023-03-31T01:18:28.000Z","status":1,"totalPoints":0,"rankingPoints":0,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":1,"totalQuint":0,"crossoverLevel":0,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JNero","sex":"Male","profileImg":"https://i.imgur.com/cUM2c0n.png"}],"rivalMembersIds":[]}} \ No newline at end of file diff --git a/server/files/leaderboardinfo.1 b/server/files/leaderboardinfo.1 new file mode 100644 index 0000000..fcea1e1 --- /dev/null +++ b/server/files/leaderboardinfo.1 @@ -0,0 +1 @@ +{"success":true,"message":"","data":{"leaderboard":[{"id":42,"membersId":147890,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-03-19T17:09:29.000Z","status":1,"totalPoints":328703,"rankingPoints":328703,"totalPass":24,"totalFc":16,"totalFec":13,"totalQuad":1,"totalQuint":0,"crossoverLevel":1237,"bracketLevel":2162,"footswitchLevel":1811,"jackLevel":932,"sideswitchLevel":3728,"doublestepLevel":1219,"staminaLevel":1352,"isBuddy":false,"preferences":"{\"discordId\":\"cmmf#8747\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"cmmf","sex":"Unspecified","profileImg":"https://i.imgur.com/XWuHg9J.png"},{"id":13,"membersId":7457,"dateAdded":"2023-03-18T21:48:42.000Z","lastUpdated":"2023-03-19T18:36:57.000Z","status":1,"totalPoints":314511,"rankingPoints":314511,"totalPass":14,"totalFc":8,"totalFec":36,"totalQuad":5,"totalQuint":0,"crossoverLevel":894,"bracketLevel":765,"footswitchLevel":1188,"jackLevel":1421,"sideswitchLevel":1168,"doublestepLevel":1139,"staminaLevel":2103,"isBuddy":false,"preferences":"{\"discordId\":\"Bran#1685\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Krushrpants","sex":"Male","profileImg":""},{"id":162,"membersId":49444,"dateAdded":"2023-03-18T22:26:42.000Z","lastUpdated":"2023-03-19T05:00:50.000Z","status":1,"totalPoints":312366,"rankingPoints":301681,"totalPass":48,"totalFc":17,"totalFec":15,"totalQuad":1,"totalQuint":0,"crossoverLevel":1380,"bracketLevel":1072,"footswitchLevel":1209,"jackLevel":1387,"sideswitchLevel":1021,"doublestepLevel":996,"staminaLevel":1610,"isBuddy":false,"preferences":"{\"discordId\":\"Freyja#4407\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"freyja","sex":"Female","profileImg":"https://i.ibb.co/26cb2XQ/Dbecdqk-151620b8-331a-42eb-9211-5d4798282726.jpg"},{"id":48,"membersId":173699,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-03-19T05:18:55.000Z","status":1,"totalPoints":303921,"rankingPoints":269034,"totalPass":22,"totalFc":19,"totalFec":46,"totalQuad":4,"totalQuint":0,"crossoverLevel":2196,"bracketLevel":899,"footswitchLevel":1282,"jackLevel":1112,"sideswitchLevel":853,"doublestepLevel":1872,"staminaLevel":296,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"erictran0","sex":"Male","profileImg":""},{"id":302,"membersId":2026,"dateAdded":"2023-03-19T04:32:57.000Z","lastUpdated":"2023-03-19T09:28:57.000Z","status":1,"totalPoints":228371,"rankingPoints":228371,"totalPass":45,"totalFc":3,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":543,"bracketLevel":1233,"footswitchLevel":964,"jackLevel":749,"sideswitchLevel":407,"doublestepLevel":688,"staminaLevel":935,"isBuddy":false,"preferences":"{\"discordId\":\"dxultimate#6390\",\"decentsEnabled\":true,\"wayOffsEnabled\":false}","name":"BarX","sex":"Male","profileImg":""},{"id":187,"membersId":7737,"dateAdded":"2023-03-18T22:53:48.000Z","lastUpdated":"2023-03-19T18:36:34.000Z","status":1,"totalPoints":219448,"rankingPoints":219448,"totalPass":26,"totalFc":8,"totalFec":31,"totalQuad":3,"totalQuint":0,"crossoverLevel":877,"bracketLevel":936,"footswitchLevel":1364,"jackLevel":922,"sideswitchLevel":1068,"doublestepLevel":1091,"staminaLevel":622,"isBuddy":false,"preferences":"{\"discordId\":\"LemmingOnTheRun#7482\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DF.CaptainBlack","sex":"Male","profileImg":""},{"id":161,"membersId":128535,"dateAdded":"2023-03-18T22:25:38.000Z","lastUpdated":"2023-03-19T06:40:58.000Z","status":1,"totalPoints":201827,"rankingPoints":201827,"totalPass":23,"totalFc":8,"totalFec":12,"totalQuad":3,"totalQuint":0,"crossoverLevel":768,"bracketLevel":881,"footswitchLevel":869,"jackLevel":249,"sideswitchLevel":551,"doublestepLevel":819,"staminaLevel":1134,"isBuddy":false,"preferences":"{\"discordId\":\"Ritz#7358\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ritz","sex":"Male","profileImg":"https://i.imgur.com/iwmsWIc.png"},{"id":12,"membersId":133006,"dateAdded":"2023-03-18T21:48:36.000Z","lastUpdated":"2023-03-19T01:14:04.000Z","status":1,"totalPoints":197711,"rankingPoints":197711,"totalPass":0,"totalFc":5,"totalFec":21,"totalQuad":4,"totalQuint":0,"crossoverLevel":527,"bracketLevel":1474,"footswitchLevel":1086,"jackLevel":722,"sideswitchLevel":964,"doublestepLevel":920,"staminaLevel":906,"isBuddy":false,"preferences":"{\"discordId\":\"ChanceR#2908\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chance R.","sex":"Male","profileImg":""},{"id":116,"membersId":7385,"dateAdded":"2023-03-18T21:56:54.000Z","lastUpdated":"2023-03-19T01:40:34.000Z","status":1,"totalPoints":191652,"rankingPoints":191652,"totalPass":12,"totalFc":7,"totalFec":15,"totalQuad":0,"totalQuint":0,"crossoverLevel":54,"bracketLevel":75,"footswitchLevel":50,"jackLevel":172,"sideswitchLevel":0,"doublestepLevel":23,"staminaLevel":2868,"isBuddy":false,"preferences":"{\"discordId\":\"RainbowXynn#3637\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Xynn","sex":"Male","profileImg":"https://i.imgur.com/mbdst0K.jpg"},{"id":98,"membersId":7843,"dateAdded":"2023-03-18T21:52:50.000Z","lastUpdated":"2023-03-19T03:41:37.000Z","status":1,"totalPoints":174810,"rankingPoints":174810,"totalPass":4,"totalFc":3,"totalFec":17,"totalQuad":12,"totalQuint":0,"crossoverLevel":776,"bracketLevel":708,"footswitchLevel":912,"jackLevel":322,"sideswitchLevel":720,"doublestepLevel":470,"staminaLevel":342,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kigha","sex":"Female","profileImg":""},{"id":175,"membersId":66431,"dateAdded":"2023-03-18T22:38:00.000Z","lastUpdated":"2023-03-19T08:54:55.000Z","status":1,"totalPoints":169611,"rankingPoints":169611,"totalPass":8,"totalFc":5,"totalFec":16,"totalQuad":15,"totalQuint":0,"crossoverLevel":1164,"bracketLevel":964,"footswitchLevel":909,"jackLevel":707,"sideswitchLevel":520,"doublestepLevel":1125,"staminaLevel":168,"isBuddy":false,"preferences":"{\"discordId\":\"Berserker#2387\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Berserker","sex":"Male","profileImg":"https://i.imgur.com/QPfP2Mp.png"},{"id":190,"membersId":129254,"dateAdded":"2023-03-18T22:58:13.000Z","lastUpdated":"2023-03-19T02:50:04.000Z","status":1,"totalPoints":169279,"rankingPoints":169279,"totalPass":28,"totalFc":7,"totalFec":7,"totalQuad":1,"totalQuint":0,"crossoverLevel":802,"bracketLevel":437,"footswitchLevel":677,"jackLevel":379,"sideswitchLevel":514,"doublestepLevel":267,"staminaLevel":494,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ddrneel","sex":"Male","profileImg":""},{"id":26,"membersId":173788,"dateAdded":"2023-03-18T21:48:53.000Z","lastUpdated":"2023-03-19T18:34:59.000Z","status":1,"totalPoints":164484,"rankingPoints":164484,"totalPass":32,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":634,"bracketLevel":822,"footswitchLevel":1556,"jackLevel":345,"sideswitchLevel":906,"doublestepLevel":1007,"staminaLevel":447,"isBuddy":false,"preferences":"{\"discordId\":\"Jace#9339\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JaceITG","sex":"Male","profileImg":""},{"id":40,"membersId":128698,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-03-19T01:47:26.000Z","status":1,"totalPoints":161373,"rankingPoints":161373,"totalPass":19,"totalFc":19,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":710,"bracketLevel":898,"footswitchLevel":906,"jackLevel":751,"sideswitchLevel":1395,"doublestepLevel":1017,"staminaLevel":443,"isBuddy":false,"preferences":"{\"discordId\":\"Exschwasion#5968\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Exschwasion","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/210350948055384064/957716217093820446/b.png"},{"id":110,"membersId":173359,"dateAdded":"2023-03-18T21:54:58.000Z","lastUpdated":"2023-03-19T01:52:49.000Z","status":1,"totalPoints":156167,"rankingPoints":156167,"totalPass":16,"totalFc":12,"totalFec":23,"totalQuad":8,"totalQuint":0,"crossoverLevel":926,"bracketLevel":705,"footswitchLevel":837,"jackLevel":639,"sideswitchLevel":170,"doublestepLevel":684,"staminaLevel":372,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xancara","sex":"Male","profileImg":""},{"id":216,"membersId":133806,"dateAdded":"2023-03-19T00:10:53.000Z","lastUpdated":"2023-03-19T04:31:04.000Z","status":1,"totalPoints":155169,"rankingPoints":155169,"totalPass":20,"totalFc":8,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":880,"bracketLevel":725,"footswitchLevel":614,"jackLevel":727,"sideswitchLevel":304,"doublestepLevel":359,"staminaLevel":311,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PUYO","sex":"Unspecified","profileImg":"https://live.staticflickr.com/65535/51260131445_d6c068ca6e_m.jpg"},{"id":33,"membersId":61697,"dateAdded":"2023-03-18T21:48:57.000Z","lastUpdated":"2023-03-19T04:09:26.000Z","status":1,"totalPoints":154635,"rankingPoints":154635,"totalPass":22,"totalFc":10,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":943,"bracketLevel":735,"footswitchLevel":959,"jackLevel":665,"sideswitchLevel":343,"doublestepLevel":1192,"staminaLevel":302,"isBuddy":false,"preferences":"{\"discordId\":\"Blizzrdball#3098\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Blizzrdball","sex":"Male","profileImg":"https://i.imgur.com/wgt2mm0.png"},{"id":254,"membersId":173047,"dateAdded":"2023-03-19T01:29:15.000Z","lastUpdated":"2023-03-19T18:23:45.000Z","status":1,"totalPoints":150983,"rankingPoints":150983,"totalPass":10,"totalFc":7,"totalFec":14,"totalQuad":1,"totalQuint":0,"crossoverLevel":750,"bracketLevel":789,"footswitchLevel":981,"jackLevel":612,"sideswitchLevel":1024,"doublestepLevel":850,"staminaLevel":348,"isBuddy":false,"preferences":"{\"discordId\":\"nvanleerdrums#8936\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nvanleerdrums","sex":"Male","profileImg":"https://i.imgur.com/wA4Bxoy.jpg"},{"id":109,"membersId":175125,"dateAdded":"2023-03-18T21:54:52.000Z","lastUpdated":"2023-03-19T18:33:12.000Z","status":1,"totalPoints":150432,"rankingPoints":150432,"totalPass":6,"totalFc":8,"totalFec":10,"totalQuad":10,"totalQuint":0,"crossoverLevel":1065,"bracketLevel":403,"footswitchLevel":928,"jackLevel":267,"sideswitchLevel":1416,"doublestepLevel":619,"staminaLevel":426,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mixmasta","sex":"Male","profileImg":""},{"id":114,"membersId":173653,"dateAdded":"2023-03-18T21:56:22.000Z","lastUpdated":"2023-03-19T18:32:12.000Z","status":1,"totalPoints":149133,"rankingPoints":149133,"totalPass":26,"totalFc":9,"totalFec":10,"totalQuad":1,"totalQuint":0,"crossoverLevel":851,"bracketLevel":341,"footswitchLevel":948,"jackLevel":332,"sideswitchLevel":354,"doublestepLevel":1030,"staminaLevel":203,"isBuddy":false,"preferences":"{\"discordId\":\"valgrind#2281\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"valgrind","sex":"Unspecified","profileImg":""},{"id":52,"membersId":165504,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T18:35:39.000Z","status":1,"totalPoints":147997,"rankingPoints":147997,"totalPass":44,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":626,"bracketLevel":767,"footswitchLevel":763,"jackLevel":1291,"sideswitchLevel":1045,"doublestepLevel":903,"staminaLevel":504,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"_Temeraire","sex":"Unspecified","profileImg":""},{"id":57,"membersId":58407,"dateAdded":"2023-03-18T21:49:19.000Z","lastUpdated":"2023-03-19T06:00:33.000Z","status":1,"totalPoints":147367,"rankingPoints":147367,"totalPass":13,"totalFc":0,"totalFec":13,"totalQuad":7,"totalQuint":0,"crossoverLevel":481,"bracketLevel":1109,"footswitchLevel":765,"jackLevel":363,"sideswitchLevel":101,"doublestepLevel":1000,"staminaLevel":420,"isBuddy":false,"preferences":"{\"discordId\":\"pochoitg#4891\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Pocho","sex":"Male","profileImg":"https://c.tenor.com/qFiVMJ7kDGwAAAAM/catjam.gif"},{"id":78,"membersId":174707,"dateAdded":"2023-03-18T21:50:22.000Z","lastUpdated":"2023-03-19T18:37:56.000Z","status":1,"totalPoints":146880,"rankingPoints":146880,"totalPass":29,"totalFc":33,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":1224,"bracketLevel":412,"footswitchLevel":802,"jackLevel":216,"sideswitchLevel":232,"doublestepLevel":956,"staminaLevel":139,"isBuddy":false,"preferences":"{\"discordId\":\"antifun#6584\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"antifun","sex":"Unspecified","profileImg":"https://i.imgur.com/YkgPNB2.png"},{"id":105,"membersId":168067,"dateAdded":"2023-03-18T21:53:38.000Z","lastUpdated":"2023-03-19T16:41:31.000Z","status":1,"totalPoints":175497,"rankingPoints":144849,"totalPass":41,"totalFc":56,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":1825,"bracketLevel":310,"footswitchLevel":835,"jackLevel":335,"sideswitchLevel":394,"doublestepLevel":1177,"staminaLevel":41,"isBuddy":false,"preferences":"{\"discordId\":\"BreakfastPM#2615\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BreakfastPM","sex":"Male","profileImg":"https://i.ibb.co/xhdGjnY/Avatar-Small.jpg"},{"id":43,"membersId":6284,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-18T23:43:24.000Z","status":1,"totalPoints":143147,"rankingPoints":143147,"totalPass":2,"totalFc":9,"totalFec":9,"totalQuad":5,"totalQuint":0,"crossoverLevel":584,"bracketLevel":578,"footswitchLevel":661,"jackLevel":346,"sideswitchLevel":421,"doublestepLevel":619,"staminaLevel":365,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Twix","sex":"Male","profileImg":""},{"id":231,"membersId":175374,"dateAdded":"2023-03-19T00:35:10.000Z","lastUpdated":"2023-03-19T17:28:13.000Z","status":1,"totalPoints":142416,"rankingPoints":142416,"totalPass":21,"totalFc":8,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":531,"bracketLevel":618,"footswitchLevel":688,"jackLevel":742,"sideswitchLevel":943,"doublestepLevel":639,"staminaLevel":467,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LordLui","sex":"Unspecified","profileImg":""},{"id":352,"membersId":146716,"dateAdded":"2023-03-19T14:35:19.000Z","lastUpdated":"2023-03-19T18:05:31.000Z","status":1,"totalPoints":141857,"rankingPoints":141857,"totalPass":6,"totalFc":7,"totalFec":3,"totalQuad":9,"totalQuint":0,"crossoverLevel":736,"bracketLevel":1047,"footswitchLevel":994,"jackLevel":312,"sideswitchLevel":1087,"doublestepLevel":470,"staminaLevel":319,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TadofTony","sex":"Male","profileImg":""},{"id":16,"membersId":174632,"dateAdded":"2023-03-18T21:48:45.000Z","lastUpdated":"2023-03-19T04:43:03.000Z","status":1,"totalPoints":140768,"rankingPoints":140768,"totalPass":34,"totalFc":15,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":977,"bracketLevel":484,"footswitchLevel":773,"jackLevel":714,"sideswitchLevel":810,"doublestepLevel":1018,"staminaLevel":172,"isBuddy":false,"preferences":"{\"discordId\":\"177013#8525\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"SunkissEnjoyer","sex":"Unspecified","profileImg":"https://i.imgur.com/2YNygb4.png"},{"id":25,"membersId":172893,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-03-19T01:54:21.000Z","status":1,"totalPoints":132885,"rankingPoints":132885,"totalPass":19,"totalFc":6,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":577,"bracketLevel":1036,"footswitchLevel":910,"jackLevel":628,"sideswitchLevel":345,"doublestepLevel":731,"staminaLevel":391,"isBuddy":false,"preferences":"{\"discordId\":\"Smalls#9101\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Smalls","sex":"Male","profileImg":"https://i.imgur.com/RDuvnsC.jpg"},{"id":76,"membersId":87476,"dateAdded":"2023-03-18T21:50:19.000Z","lastUpdated":"2023-03-19T18:37:18.000Z","status":1,"totalPoints":131085,"rankingPoints":131085,"totalPass":2,"totalFc":7,"totalFec":6,"totalQuad":10,"totalQuint":1,"crossoverLevel":679,"bracketLevel":861,"footswitchLevel":716,"jackLevel":239,"sideswitchLevel":811,"doublestepLevel":485,"staminaLevel":405,"isBuddy":false,"preferences":"{\"discordId\":\"dimo#0420\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dimo","sex":"Male","profileImg":"https://imgur.com/4T9VibU.png"},{"id":29,"membersId":35701,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-19T15:11:25.000Z","status":1,"totalPoints":125323,"rankingPoints":125323,"totalPass":8,"totalFc":2,"totalFec":10,"totalQuad":11,"totalQuint":0,"crossoverLevel":628,"bracketLevel":422,"footswitchLevel":601,"jackLevel":298,"sideswitchLevel":433,"doublestepLevel":559,"staminaLevel":398,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lolipo","sex":"Female","profileImg":"https://imgur.com/VEubW0D.jpg"},{"id":65,"membersId":173296,"dateAdded":"2023-03-18T21:49:51.000Z","lastUpdated":"2023-03-19T06:31:56.000Z","status":1,"totalPoints":115713,"rankingPoints":115713,"totalPass":17,"totalFc":4,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":359,"bracketLevel":822,"footswitchLevel":584,"jackLevel":367,"sideswitchLevel":167,"doublestepLevel":397,"staminaLevel":452,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"IcyCold","sex":"Male","profileImg":""},{"id":89,"membersId":66785,"dateAdded":"2023-03-18T21:51:12.000Z","lastUpdated":"2023-03-19T18:20:55.000Z","status":1,"totalPoints":115284,"rankingPoints":115284,"totalPass":15,"totalFc":4,"totalFec":13,"totalQuad":0,"totalQuint":0,"crossoverLevel":625,"bracketLevel":781,"footswitchLevel":518,"jackLevel":376,"sideswitchLevel":101,"doublestepLevel":606,"staminaLevel":306,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Ralph Caffery","sex":"Male","profileImg":""},{"id":217,"membersId":37977,"dateAdded":"2023-03-19T00:11:23.000Z","lastUpdated":"2023-03-19T04:48:00.000Z","status":1,"totalPoints":112061,"rankingPoints":112061,"totalPass":8,"totalFc":10,"totalFec":19,"totalQuad":1,"totalQuint":0,"crossoverLevel":920,"bracketLevel":552,"footswitchLevel":519,"jackLevel":288,"sideswitchLevel":142,"doublestepLevel":418,"staminaLevel":93,"isBuddy":false,"preferences":"{\"discordId\":\"Valex#8095\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Valex","sex":"Male","profileImg":"https://i.imgur.com/OkpuTKw.jpg"},{"id":228,"membersId":66726,"dateAdded":"2023-03-19T00:32:24.000Z","lastUpdated":"2023-03-19T05:43:35.000Z","status":1,"totalPoints":111086,"rankingPoints":111086,"totalPass":14,"totalFc":14,"totalFec":9,"totalQuad":1,"totalQuint":0,"crossoverLevel":765,"bracketLevel":180,"footswitchLevel":466,"jackLevel":262,"sideswitchLevel":438,"doublestepLevel":442,"staminaLevel":143,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zeipher_Hawk","sex":"Male","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shuckle.png"},{"id":121,"membersId":173301,"dateAdded":"2023-03-18T21:58:47.000Z","lastUpdated":"2023-03-19T00:59:41.000Z","status":1,"totalPoints":111023,"rankingPoints":111023,"totalPass":15,"totalFc":4,"totalFec":2,"totalQuad":1,"totalQuint":0,"crossoverLevel":216,"bracketLevel":637,"footswitchLevel":532,"jackLevel":375,"sideswitchLevel":231,"doublestepLevel":303,"staminaLevel":662,"isBuddy":false,"preferences":"{\"discordId\":\"Chabala#4798\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Chabala","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/706313433422757888/960710993426661376/20190925_213154.jpg"},{"id":70,"membersId":173636,"dateAdded":"2023-03-18T21:49:56.000Z","lastUpdated":"2023-03-19T06:45:07.000Z","status":1,"totalPoints":109601,"rankingPoints":109601,"totalPass":13,"totalFc":1,"totalFec":4,"totalQuad":8,"totalQuint":0,"crossoverLevel":606,"bracketLevel":559,"footswitchLevel":758,"jackLevel":307,"sideswitchLevel":105,"doublestepLevel":556,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":\"sarbackergaming#8250\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZSL","sex":"Male","profileImg":"https://i.imgur.com/NvPX4bC.png"},{"id":314,"membersId":165524,"dateAdded":"2023-03-19T05:33:33.000Z","lastUpdated":"2023-03-19T09:21:35.000Z","status":1,"totalPoints":107521,"rankingPoints":107521,"totalPass":21,"totalFc":5,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":538,"bracketLevel":651,"footswitchLevel":333,"jackLevel":542,"sideswitchLevel":688,"doublestepLevel":365,"staminaLevel":236,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"COLLETnm7","sex":"Male","profileImg":"https://i.gyazo.com/be29cf05362aae1c603e7f39b3b9192c.png"},{"id":126,"membersId":173876,"dateAdded":"2023-03-18T22:00:50.000Z","lastUpdated":"2023-03-19T01:09:01.000Z","status":1,"totalPoints":106325,"rankingPoints":106325,"totalPass":37,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":960,"bracketLevel":94,"footswitchLevel":419,"jackLevel":306,"sideswitchLevel":502,"doublestepLevel":637,"staminaLevel":252,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sigonasr2","sex":"Male","profileImg":"https://en.gravatar.com/userimage/3612777/b9992e90331c1fa71a3479f5b3d02b41.png"},{"id":140,"membersId":174935,"dateAdded":"2023-03-18T22:09:53.000Z","lastUpdated":"2023-03-19T18:37:46.000Z","status":1,"totalPoints":105521,"rankingPoints":105521,"totalPass":20,"totalFc":11,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":622,"bracketLevel":156,"footswitchLevel":456,"jackLevel":144,"sideswitchLevel":182,"doublestepLevel":819,"staminaLevel":198,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"reset_itg","sex":"Unspecified","profileImg":""},{"id":169,"membersId":127780,"dateAdded":"2023-03-18T22:33:53.000Z","lastUpdated":"2023-03-19T02:25:18.000Z","status":1,"totalPoints":105248,"rankingPoints":105248,"totalPass":25,"totalFc":5,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":240,"bracketLevel":65,"footswitchLevel":123,"jackLevel":56,"sideswitchLevel":234,"doublestepLevel":184,"staminaLevel":1269,"isBuddy":false,"preferences":"{\"discordId\":\"zoodles#2685\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"Hamaon","sex":"Female","profileImg":"https://66.media.tumblr.com/a586c1c2635be3c2863b904b689d6bc6/tumblr_pvwcak806k1x3sogho4_250.png"},{"id":145,"membersId":145083,"dateAdded":"2023-03-18T22:13:54.000Z","lastUpdated":"2023-03-19T18:04:24.000Z","status":1,"totalPoints":104320,"rankingPoints":104320,"totalPass":18,"totalFc":6,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":542,"bracketLevel":313,"footswitchLevel":281,"jackLevel":398,"sideswitchLevel":485,"doublestepLevel":519,"staminaLevel":336,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LOLWUT","sex":"Male","profileImg":"https://i.imgur.com/LZQ5yoW.png"},{"id":3,"membersId":66246,"dateAdded":"2023-03-16T20:38:45.000Z","lastUpdated":"2023-03-19T05:27:05.000Z","status":1,"totalPoints":101161,"rankingPoints":101161,"totalPass":13,"totalFc":10,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":80,"bracketLevel":97,"footswitchLevel":171,"jackLevel":49,"sideswitchLevel":0,"doublestepLevel":103,"staminaLevel":1290,"isBuddy":false,"preferences":"{\"discordId\":\"Zankoku#4444\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zankoku","sex":"Male","profileImg":"http://sugoifactory.moe/things/dopparle5.png"},{"id":151,"membersId":145128,"dateAdded":"2023-03-18T22:17:00.000Z","lastUpdated":"2023-03-19T02:42:26.000Z","status":1,"totalPoints":100911,"rankingPoints":100911,"totalPass":17,"totalFc":6,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":541,"bracketLevel":288,"footswitchLevel":718,"jackLevel":231,"sideswitchLevel":497,"doublestepLevel":598,"staminaLevel":276,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"H8EVRYTHNG","sex":"Male","profileImg":""},{"id":80,"membersId":66662,"dateAdded":"2023-03-18T21:50:33.000Z","lastUpdated":"2023-03-19T12:59:49.000Z","status":1,"totalPoints":99148,"rankingPoints":99148,"totalPass":33,"totalFc":0,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":636,"bracketLevel":421,"footswitchLevel":542,"jackLevel":401,"sideswitchLevel":62,"doublestepLevel":756,"staminaLevel":59,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"itgaz","sex":"Male","profileImg":"https://media.tenor.com/images/65d3642f6d4b6cd2c0508f8b1b152f68/tenor.gif"},{"id":94,"membersId":5314,"dateAdded":"2023-03-18T21:52:01.000Z","lastUpdated":"2023-03-19T15:50:33.000Z","status":1,"totalPoints":99139,"rankingPoints":99139,"totalPass":7,"totalFc":7,"totalFec":6,"totalQuad":2,"totalQuint":0,"crossoverLevel":519,"bracketLevel":458,"footswitchLevel":426,"jackLevel":494,"sideswitchLevel":43,"doublestepLevel":358,"staminaLevel":333,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MrMeatloaf","sex":"Male","profileImg":"https://i.imgur.com/Ye5e236.jpg"},{"id":268,"membersId":7886,"dateAdded":"2023-03-19T01:58:08.000Z","lastUpdated":"2023-03-19T04:31:06.000Z","status":1,"totalPoints":98787,"rankingPoints":98787,"totalPass":13,"totalFc":4,"totalFec":7,"totalQuad":1,"totalQuint":0,"crossoverLevel":403,"bracketLevel":392,"footswitchLevel":366,"jackLevel":315,"sideswitchLevel":77,"doublestepLevel":194,"staminaLevel":380,"isBuddy":false,"preferences":"{\"discordId\":\"Zarzob#0001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zarzob","sex":"Male","profileImg":"https://i.imgur.com/IbJlXCl.png"},{"id":233,"membersId":84583,"dateAdded":"2023-03-19T00:36:20.000Z","lastUpdated":"2023-03-19T15:37:31.000Z","status":1,"totalPoints":98753,"rankingPoints":98753,"totalPass":11,"totalFc":17,"totalFec":19,"totalQuad":0,"totalQuint":0,"crossoverLevel":978,"bracketLevel":251,"footswitchLevel":409,"jackLevel":166,"sideswitchLevel":287,"doublestepLevel":749,"staminaLevel":75,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lugea","sex":"Male","profileImg":"https://i.ibb.co/SRVLdQQ/bruno.png"},{"id":226,"membersId":130786,"dateAdded":"2023-03-19T00:25:53.000Z","lastUpdated":"2023-03-19T02:54:48.000Z","status":1,"totalPoints":95141,"rankingPoints":95141,"totalPass":29,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":448,"bracketLevel":324,"footswitchLevel":389,"jackLevel":350,"sideswitchLevel":134,"doublestepLevel":317,"staminaLevel":282,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nuki","sex":"Unspecified","profileImg":""},{"id":46,"membersId":66587,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T00:39:11.000Z","status":1,"totalPoints":90786,"rankingPoints":90786,"totalPass":20,"totalFc":14,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":428,"bracketLevel":428,"footswitchLevel":378,"jackLevel":471,"sideswitchLevel":146,"doublestepLevel":427,"staminaLevel":269,"isBuddy":false,"preferences":"{\"discordId\":\"Lotarr#0466\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Lotarr","sex":"Male","profileImg":"https://i.imgur.com/Z3lMRla.png"},{"id":41,"membersId":163426,"dateAdded":"2023-03-18T21:49:01.000Z","lastUpdated":"2023-03-19T00:52:50.000Z","status":1,"totalPoints":89990,"rankingPoints":89990,"totalPass":25,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":475,"bracketLevel":187,"footswitchLevel":603,"jackLevel":165,"sideswitchLevel":1416,"doublestepLevel":329,"staminaLevel":229,"isBuddy":false,"preferences":"{\"discordId\":\"GWen#2607\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"GWen","sex":"Male","profileImg":"https://i.imgur.com/7xdu36E.png"},{"id":63,"membersId":173182,"dateAdded":"2023-03-18T21:49:50.000Z","lastUpdated":"2023-03-18T23:43:51.000Z","status":1,"totalPoints":89771,"rankingPoints":89771,"totalPass":9,"totalFc":11,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":376,"bracketLevel":940,"footswitchLevel":521,"jackLevel":398,"sideswitchLevel":523,"doublestepLevel":344,"staminaLevel":164,"isBuddy":false,"preferences":"{\"discordId\":\"DDDAAA#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DDDAAA","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/250042733303955467/941867594590322718/fernandey.png"},{"id":135,"membersId":66778,"dateAdded":"2023-03-18T22:04:30.000Z","lastUpdated":"2023-03-19T14:41:32.000Z","status":1,"totalPoints":88930,"rankingPoints":88930,"totalPass":4,"totalFc":3,"totalFec":11,"totalQuad":17,"totalQuint":0,"crossoverLevel":746,"bracketLevel":168,"footswitchLevel":575,"jackLevel":194,"sideswitchLevel":273,"doublestepLevel":528,"staminaLevel":111,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shpadoinkle","sex":"Female","profileImg":""},{"id":193,"membersId":173050,"dateAdded":"2023-03-18T23:03:16.000Z","lastUpdated":"2023-03-19T01:42:15.000Z","status":1,"totalPoints":87542,"rankingPoints":87542,"totalPass":12,"totalFc":5,"totalFec":8,"totalQuad":1,"totalQuint":0,"crossoverLevel":423,"bracketLevel":528,"footswitchLevel":443,"jackLevel":141,"sideswitchLevel":143,"doublestepLevel":334,"staminaLevel":342,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Endymion360","sex":"Male","profileImg":"https://i.imgur.com/wvZXXWE.jpg"},{"id":17,"membersId":173058,"dateAdded":"2023-03-18T21:48:46.000Z","lastUpdated":"2023-03-19T02:01:33.000Z","status":1,"totalPoints":87116,"rankingPoints":87116,"totalPass":5,"totalFc":5,"totalFec":7,"totalQuad":7,"totalQuint":0,"crossoverLevel":665,"bracketLevel":293,"footswitchLevel":349,"jackLevel":302,"sideswitchLevel":31,"doublestepLevel":459,"staminaLevel":213,"isBuddy":false,"preferences":"{\"discordId\":\"Formless#8660\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Girth Brooks","sex":"Male","profileImg":"https://i.imgur.com/6DHh2Ra.png"},{"id":10,"membersId":129740,"dateAdded":"2023-03-18T21:48:29.000Z","lastUpdated":"2023-03-19T10:44:25.000Z","status":1,"totalPoints":84095,"rankingPoints":84095,"totalPass":46,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":670,"bracketLevel":154,"footswitchLevel":419,"jackLevel":226,"sideswitchLevel":102,"doublestepLevel":437,"staminaLevel":67,"isBuddy":false,"preferences":"{\"discordId\":\"TENKO#5796\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TENKO","sex":"Unspecified","profileImg":"https://i.imgur.com/qTNKsr2.png"},{"id":139,"membersId":3306,"dateAdded":"2023-03-18T22:07:50.000Z","lastUpdated":"2023-03-19T18:33:48.000Z","status":1,"totalPoints":83709,"rankingPoints":83709,"totalPass":11,"totalFc":0,"totalFec":11,"totalQuad":2,"totalQuint":0,"crossoverLevel":419,"bracketLevel":427,"footswitchLevel":405,"jackLevel":488,"sideswitchLevel":0,"doublestepLevel":471,"staminaLevel":108,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ElPapaCosmico","sex":"Male","profileImg":"https://i.pinimg.com/236x/3e/01/73/3e0173d36ceed20727f4724b71d2961e--rilakkuma-kitty.jpg"},{"id":55,"membersId":134219,"dateAdded":"2023-03-18T21:49:10.000Z","lastUpdated":"2023-03-19T05:10:56.000Z","status":1,"totalPoints":83393,"rankingPoints":83393,"totalPass":12,"totalFc":2,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":268,"bracketLevel":443,"footswitchLevel":414,"jackLevel":229,"sideswitchLevel":224,"doublestepLevel":138,"staminaLevel":258,"isBuddy":false,"preferences":"{\"discordId\":\"Zarinah#9770\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ZarinahBBM","sex":"Female","profileImg":"https://i.ibb.co/0f7Rrg3/My-home.png"},{"id":222,"membersId":166764,"dateAdded":"2023-03-19T00:14:39.000Z","lastUpdated":"2023-03-19T01:44:22.000Z","status":1,"totalPoints":81882,"rankingPoints":81882,"totalPass":24,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":580,"bracketLevel":488,"footswitchLevel":515,"jackLevel":165,"sideswitchLevel":326,"doublestepLevel":398,"staminaLevel":208,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"kadef","sex":"Male","profileImg":""},{"id":27,"membersId":154965,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-19T03:37:45.000Z","status":1,"totalPoints":79578,"rankingPoints":79578,"totalPass":17,"totalFc":5,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":670,"bracketLevel":342,"footswitchLevel":468,"jackLevel":589,"sideswitchLevel":768,"doublestepLevel":442,"staminaLevel":158,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gpop","sex":"Male","profileImg":""},{"id":173,"membersId":66558,"dateAdded":"2023-03-18T22:36:44.000Z","lastUpdated":"2023-03-19T02:30:38.000Z","status":1,"totalPoints":79109,"rankingPoints":79109,"totalPass":12,"totalFc":8,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":312,"bracketLevel":121,"footswitchLevel":386,"jackLevel":179,"sideswitchLevel":940,"doublestepLevel":150,"staminaLevel":559,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"xiaowuc1","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/680561230892630067/990419215724974080/sukuna.jpg"},{"id":340,"membersId":66753,"dateAdded":"2023-03-19T11:56:50.000Z","lastUpdated":"2023-03-19T16:32:16.000Z","status":1,"totalPoints":79007,"rankingPoints":79007,"totalPass":24,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":359,"bracketLevel":412,"footswitchLevel":266,"jackLevel":394,"sideswitchLevel":344,"doublestepLevel":363,"staminaLevel":247,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PkGam","sex":"Male","profileImg":"https://i.ibb.co/RDMrkmb/pkgam-icon-250.png"},{"id":127,"membersId":171721,"dateAdded":"2023-03-18T22:01:35.000Z","lastUpdated":"2023-03-19T18:27:15.000Z","status":1,"totalPoints":78597,"rankingPoints":78597,"totalPass":9,"totalFc":2,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":278,"bracketLevel":368,"footswitchLevel":293,"jackLevel":168,"sideswitchLevel":290,"doublestepLevel":367,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Higgy","sex":"Male","profileImg":""},{"id":49,"membersId":172895,"dateAdded":"2023-03-18T21:49:06.000Z","lastUpdated":"2023-03-19T02:57:43.000Z","status":1,"totalPoints":77242,"rankingPoints":77242,"totalPass":19,"totalFc":17,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":698,"bracketLevel":286,"footswitchLevel":277,"jackLevel":298,"sideswitchLevel":135,"doublestepLevel":271,"staminaLevel":31,"isBuddy":false,"preferences":"{\"discordId\":\"Sekii#8008\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sekiirei","sex":"Female","profileImg":"https://i.gyazo.com/a0e21eb4239c5139544515656668c7c5.png"},{"id":148,"membersId":135061,"dateAdded":"2023-03-18T22:14:07.000Z","lastUpdated":"2023-03-19T01:55:53.000Z","status":1,"totalPoints":76834,"rankingPoints":76834,"totalPass":18,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":66,"bracketLevel":190,"footswitchLevel":126,"jackLevel":114,"sideswitchLevel":0,"doublestepLevel":42,"staminaLevel":759,"isBuddy":false,"preferences":"{\"discordId\":\"airplane#8871\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"airplane","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/749406224365387837/987950518754238505/195-00.png"},{"id":34,"membersId":62987,"dateAdded":"2023-03-18T21:48:58.000Z","lastUpdated":"2023-03-18T23:39:37.000Z","status":1,"totalPoints":73647,"rankingPoints":73647,"totalPass":1,"totalFc":3,"totalFec":5,"totalQuad":7,"totalQuint":0,"crossoverLevel":286,"bracketLevel":449,"footswitchLevel":343,"jackLevel":220,"sideswitchLevel":307,"doublestepLevel":435,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"iamsimo4life","sex":"Male","profileImg":"https://i.postimg.cc/wjfwxj6Q/iris-3.jpg"},{"id":36,"membersId":127813,"dateAdded":"2023-03-18T21:48:59.000Z","lastUpdated":"2023-03-19T04:05:22.000Z","status":1,"totalPoints":70850,"rankingPoints":70850,"totalPass":10,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":283,"bracketLevel":546,"footswitchLevel":486,"jackLevel":273,"sideswitchLevel":486,"doublestepLevel":192,"staminaLevel":115,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RakkiiCB","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/924755977067171940/986492744136556554/Untitled-1.png"},{"id":53,"membersId":173267,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T02:02:33.000Z","status":1,"totalPoints":69984,"rankingPoints":69984,"totalPass":8,"totalFc":4,"totalFec":8,"totalQuad":0,"totalQuint":0,"crossoverLevel":317,"bracketLevel":327,"footswitchLevel":468,"jackLevel":515,"sideswitchLevel":115,"doublestepLevel":596,"staminaLevel":92,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"CERiNG","sex":"Unspecified","profileImg":"https://i.imgur.com/7XZZDsY.png"},{"id":185,"membersId":256,"dateAdded":"2023-03-18T22:49:44.000Z","lastUpdated":"2023-03-19T17:05:44.000Z","status":1,"totalPoints":69877,"rankingPoints":69877,"totalPass":12,"totalFc":6,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":406,"bracketLevel":173,"footswitchLevel":193,"jackLevel":206,"sideswitchLevel":82,"doublestepLevel":266,"staminaLevel":145,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DanPeriod","sex":"Male","profileImg":"https://i.ibb.co/2Sh9tbx/danderpborder.png"},{"id":6,"membersId":4362,"dateAdded":"2023-03-17T05:35:44.000Z","lastUpdated":"2023-03-19T18:26:15.000Z","status":1,"totalPoints":69363,"rankingPoints":69363,"totalPass":3,"totalFc":0,"totalFec":8,"totalQuad":7,"totalQuint":0,"crossoverLevel":428,"bracketLevel":315,"footswitchLevel":552,"jackLevel":79,"sideswitchLevel":69,"doublestepLevel":115,"staminaLevel":82,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VKIM","sex":"Male","profileImg":""},{"id":37,"membersId":173251,"dateAdded":"2023-03-18T21:49:00.000Z","lastUpdated":"2023-03-19T03:48:05.000Z","status":1,"totalPoints":68401,"rankingPoints":68401,"totalPass":17,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":347,"bracketLevel":335,"footswitchLevel":519,"jackLevel":465,"sideswitchLevel":164,"doublestepLevel":421,"staminaLevel":145,"isBuddy":false,"preferences":"{\"discordId\":\"sorae#7138\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"sorae","sex":"Unspecified","profileImg":"https://i.imgur.com/cJEaR4t.png"},{"id":356,"membersId":173228,"dateAdded":"2023-03-19T15:33:53.000Z","lastUpdated":"2023-03-19T17:07:56.000Z","status":1,"totalPoints":68104,"rankingPoints":68104,"totalPass":15,"totalFc":8,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":456,"bracketLevel":213,"footswitchLevel":419,"jackLevel":315,"sideswitchLevel":208,"doublestepLevel":254,"staminaLevel":61,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"warriorddr","sex":"Male","profileImg":""},{"id":85,"membersId":174617,"dateAdded":"2023-03-18T21:50:59.000Z","lastUpdated":"2023-03-19T00:52:54.000Z","status":1,"totalPoints":68081,"rankingPoints":68081,"totalPass":9,"totalFc":9,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":427,"bracketLevel":147,"footswitchLevel":350,"jackLevel":252,"sideswitchLevel":245,"doublestepLevel":501,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ForkySpoon","sex":"Male","profileImg":""},{"id":371,"membersId":173145,"dateAdded":"2023-03-19T17:02:51.000Z","lastUpdated":"2023-03-19T18:34:58.000Z","status":1,"totalPoints":67169,"rankingPoints":67169,"totalPass":10,"totalFc":6,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":363,"bracketLevel":252,"footswitchLevel":250,"jackLevel":152,"sideswitchLevel":113,"doublestepLevel":461,"staminaLevel":102,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"miklowcic","sex":"Male","profileImg":"https://i.imgur.com/CXKK11f.jpg"},{"id":279,"membersId":75846,"dateAdded":"2023-03-19T02:46:25.000Z","lastUpdated":"2023-03-19T05:02:57.000Z","status":1,"totalPoints":66768,"rankingPoints":66768,"totalPass":13,"totalFc":16,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":448,"bracketLevel":62,"footswitchLevel":187,"jackLevel":143,"sideswitchLevel":0,"doublestepLevel":279,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rarily","sex":"Female","profileImg":"https://img.pokemondb.net/sprites/home/shiny/1x/shaymin-land.png"},{"id":249,"membersId":173305,"dateAdded":"2023-03-19T01:12:08.000Z","lastUpdated":"2023-03-19T18:31:22.000Z","status":1,"totalPoints":66662,"rankingPoints":66662,"totalPass":10,"totalFc":4,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":267,"bracketLevel":189,"footswitchLevel":391,"jackLevel":194,"sideswitchLevel":390,"doublestepLevel":349,"staminaLevel":232,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maxximus","sex":"Male","profileImg":"https://tinypic.host/images/2022/07/23/20220722_2041002.jpg"},{"id":54,"membersId":128890,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T01:17:48.000Z","status":1,"totalPoints":66283,"rankingPoints":66283,"totalPass":12,"totalFc":7,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":694,"bracketLevel":121,"footswitchLevel":332,"jackLevel":172,"sideswitchLevel":286,"doublestepLevel":667,"staminaLevel":30,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Coneja","sex":"Female","profileImg":"https://i.imgur.com/7OyrT96.png"},{"id":347,"membersId":134767,"dateAdded":"2023-03-19T13:30:42.000Z","lastUpdated":"2023-03-19T16:15:13.000Z","status":1,"totalPoints":66185,"rankingPoints":66185,"totalPass":21,"totalFc":21,"totalFec":6,"totalQuad":0,"totalQuint":0,"crossoverLevel":762,"bracketLevel":178,"footswitchLevel":273,"jackLevel":101,"sideswitchLevel":0,"doublestepLevel":512,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NaoHikari","sex":"Male","profileImg":"https://i.imgur.com/vuu78zs.png"},{"id":21,"membersId":128047,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-03-19T01:55:22.000Z","status":1,"totalPoints":65535,"rankingPoints":65535,"totalPass":4,"totalFc":1,"totalFec":9,"totalQuad":1,"totalQuint":0,"crossoverLevel":431,"bracketLevel":508,"footswitchLevel":448,"jackLevel":415,"sideswitchLevel":194,"doublestepLevel":421,"staminaLevel":171,"isBuddy":false,"preferences":"{\"discordId\":\"tak#7483\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Talkion","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/598009719453384716/990351215835627560/tak200.png"},{"id":124,"membersId":128002,"dateAdded":"2023-03-18T21:59:44.000Z","lastUpdated":"2023-03-18T23:53:47.000Z","status":1,"totalPoints":64871,"rankingPoints":64871,"totalPass":1,"totalFc":8,"totalFec":8,"totalQuad":6,"totalQuint":0,"crossoverLevel":604,"bracketLevel":249,"footswitchLevel":259,"jackLevel":254,"sideswitchLevel":444,"doublestepLevel":425,"staminaLevel":70,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MoistBruh","sex":"Male","profileImg":"https://i.pinimg.com/originals/49/d6/ca/49d6caf0bd9760b8d709fe8193b413df.jpg"},{"id":73,"membersId":76562,"dateAdded":"2023-03-18T21:50:10.000Z","lastUpdated":"2023-03-19T15:58:28.000Z","status":1,"totalPoints":64457,"rankingPoints":64457,"totalPass":11,"totalFc":8,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":470,"bracketLevel":256,"footswitchLevel":272,"jackLevel":181,"sideswitchLevel":244,"doublestepLevel":401,"staminaLevel":99,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"robin_","sex":"Male","profileImg":""},{"id":125,"membersId":147886,"dateAdded":"2023-03-18T22:00:45.000Z","lastUpdated":"2023-03-19T00:54:39.000Z","status":1,"totalPoints":61870,"rankingPoints":61870,"totalPass":2,"totalFc":8,"totalFec":2,"totalQuad":1,"totalQuint":0,"crossoverLevel":238,"bracketLevel":248,"footswitchLevel":352,"jackLevel":323,"sideswitchLevel":256,"doublestepLevel":378,"staminaLevel":275,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Slowest","sex":"Unspecified","profileImg":""},{"id":61,"membersId":174010,"dateAdded":"2023-03-18T21:49:40.000Z","lastUpdated":"2023-03-19T12:45:12.000Z","status":1,"totalPoints":56943,"rankingPoints":56943,"totalPass":24,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":398,"bracketLevel":52,"footswitchLevel":207,"jackLevel":143,"sideswitchLevel":20,"doublestepLevel":257,"staminaLevel":60,"isBuddy":false,"preferences":"{\"discordId\":\"zibson#4140\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"zibson","sex":"Unspecified","profileImg":""},{"id":90,"membersId":66443,"dateAdded":"2023-03-18T21:51:24.000Z","lastUpdated":"2023-03-19T00:51:53.000Z","status":1,"totalPoints":54891,"rankingPoints":54891,"totalPass":6,"totalFc":3,"totalFec":13,"totalQuad":1,"totalQuint":0,"crossoverLevel":535,"bracketLevel":72,"footswitchLevel":312,"jackLevel":126,"sideswitchLevel":115,"doublestepLevel":561,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"limitin","sex":"Male","profileImg":""},{"id":246,"membersId":173137,"dateAdded":"2023-03-19T01:00:25.000Z","lastUpdated":"2023-03-19T10:12:00.000Z","status":1,"totalPoints":53813,"rankingPoints":53813,"totalPass":5,"totalFc":5,"totalFec":7,"totalQuad":0,"totalQuint":0,"crossoverLevel":489,"bracketLevel":241,"footswitchLevel":233,"jackLevel":271,"sideswitchLevel":22,"doublestepLevel":238,"staminaLevel":132,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Floms","sex":"Male","profileImg":""},{"id":330,"membersId":173319,"dateAdded":"2023-03-19T10:01:20.000Z","lastUpdated":"2023-03-19T17:49:06.000Z","status":1,"totalPoints":53490,"rankingPoints":53490,"totalPass":15,"totalFc":5,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":349,"bracketLevel":223,"footswitchLevel":392,"jackLevel":161,"sideswitchLevel":477,"doublestepLevel":111,"staminaLevel":52,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"D0omsday","sex":"Male","profileImg":""},{"id":113,"membersId":4819,"dateAdded":"2023-03-18T21:55:29.000Z","lastUpdated":"2023-03-19T13:18:03.000Z","status":1,"totalPoints":53357,"rankingPoints":53357,"totalPass":11,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":512,"bracketLevel":96,"footswitchLevel":349,"jackLevel":82,"sideswitchLevel":234,"doublestepLevel":188,"staminaLevel":71,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Renbrandt","sex":"Male","profileImg":"https://i.imgur.com/WPPQI0D.png"},{"id":247,"membersId":173037,"dateAdded":"2023-03-19T01:06:17.000Z","lastUpdated":"2023-03-19T04:22:59.000Z","status":1,"totalPoints":52991,"rankingPoints":52991,"totalPass":4,"totalFc":0,"totalFec":9,"totalQuad":5,"totalQuint":0,"crossoverLevel":296,"bracketLevel":458,"footswitchLevel":276,"jackLevel":138,"sideswitchLevel":60,"doublestepLevel":327,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Fanatik25","sex":"Male","profileImg":"https://cdn.discordapp.com/avatars/415354956346949632/2b58a95153add52b12d7cfa6ed6a565a.png"},{"id":355,"membersId":173142,"dateAdded":"2023-03-19T15:16:09.000Z","lastUpdated":"2023-03-19T16:19:13.000Z","status":1,"totalPoints":52933,"rankingPoints":52933,"totalPass":6,"totalFc":1,"totalFec":3,"totalQuad":1,"totalQuint":0,"crossoverLevel":181,"bracketLevel":235,"footswitchLevel":171,"jackLevel":44,"sideswitchLevel":44,"doublestepLevel":184,"staminaLevel":200,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Yung ButtCoin","sex":"Male","profileImg":""},{"id":97,"membersId":173118,"dateAdded":"2023-03-18T21:52:44.000Z","lastUpdated":"2023-03-19T18:21:52.000Z","status":1,"totalPoints":52754,"rankingPoints":52754,"totalPass":4,"totalFc":4,"totalFec":16,"totalQuad":0,"totalQuint":0,"crossoverLevel":499,"bracketLevel":198,"footswitchLevel":445,"jackLevel":39,"sideswitchLevel":123,"doublestepLevel":414,"staminaLevel":93,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"HellKiteChaos","sex":"Male","profileImg":"https://i.imgur.com/ebA93n3.png"},{"id":11,"membersId":173184,"dateAdded":"2023-03-18T21:48:30.000Z","lastUpdated":"2023-03-19T02:57:44.000Z","status":1,"totalPoints":51546,"rankingPoints":51546,"totalPass":30,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":358,"bracketLevel":100,"footswitchLevel":275,"jackLevel":100,"sideswitchLevel":61,"doublestepLevel":336,"staminaLevel":51,"isBuddy":false,"preferences":"{\"discordId\":\"Maybell Eigenhart (& co.) 🌻#4859\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Maybell Eigenhart","sex":"Female","profileImg":"https://i.imgur.com/uZKJzLL.png"},{"id":274,"membersId":142757,"dateAdded":"2023-03-19T02:31:13.000Z","lastUpdated":"2023-03-19T06:41:52.000Z","status":1,"totalPoints":47324,"rankingPoints":47324,"totalPass":18,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":221,"footswitchLevel":195,"jackLevel":125,"sideswitchLevel":112,"doublestepLevel":128,"staminaLevel":154,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rudeshadow","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/957781689067769917/957783160312193085/kronii_avatar.png"},{"id":158,"membersId":4290,"dateAdded":"2023-03-18T22:23:23.000Z","lastUpdated":"2023-03-19T17:05:03.000Z","status":1,"totalPoints":47290,"rankingPoints":47290,"totalPass":12,"totalFc":7,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":334,"bracketLevel":161,"footswitchLevel":202,"jackLevel":135,"sideswitchLevel":239,"doublestepLevel":148,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ROBIJO","sex":"Male","profileImg":""},{"id":86,"membersId":76988,"dateAdded":"2023-03-18T21:51:01.000Z","lastUpdated":"2023-03-19T18:36:49.000Z","status":1,"totalPoints":46389,"rankingPoints":46389,"totalPass":12,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":333,"bracketLevel":206,"footswitchLevel":259,"jackLevel":132,"sideswitchLevel":343,"doublestepLevel":267,"staminaLevel":76,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"1ug1a","sex":"Unspecified","profileImg":"https://media.discordapp.net/attachments/615272349335420968/850073257960931388/hm_icon_Custom_2.png"},{"id":150,"membersId":173105,"dateAdded":"2023-03-18T22:15:52.000Z","lastUpdated":"2023-03-19T04:57:18.000Z","status":1,"totalPoints":45876,"rankingPoints":45876,"totalPass":7,"totalFc":8,"totalFec":5,"totalQuad":0,"totalQuint":0,"crossoverLevel":296,"bracketLevel":139,"footswitchLevel":289,"jackLevel":220,"sideswitchLevel":152,"doublestepLevel":514,"staminaLevel":29,"isBuddy":false,"preferences":"{\"discordId\":\"Losermanwins#0088\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TheManwich","sex":"Male","profileImg":"https://i.imgur.com/yeHbdpC.png"},{"id":351,"membersId":173315,"dateAdded":"2023-03-19T14:23:32.000Z","lastUpdated":"2023-03-19T16:28:56.000Z","status":1,"totalPoints":44907,"rankingPoints":44907,"totalPass":18,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":268,"bracketLevel":425,"footswitchLevel":302,"jackLevel":147,"sideswitchLevel":104,"doublestepLevel":205,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"vintogigue","sex":"Unspecified","profileImg":""},{"id":294,"membersId":345,"dateAdded":"2023-03-19T03:45:05.000Z","lastUpdated":"2023-03-19T05:43:59.000Z","status":1,"totalPoints":43463,"rankingPoints":43463,"totalPass":6,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":236,"bracketLevel":166,"footswitchLevel":207,"jackLevel":87,"sideswitchLevel":61,"doublestepLevel":48,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kaze","sex":"Male","profileImg":""},{"id":248,"membersId":175368,"dateAdded":"2023-03-19T01:07:36.000Z","lastUpdated":"2023-03-19T04:02:39.000Z","status":1,"totalPoints":42739,"rankingPoints":42739,"totalPass":10,"totalFc":5,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":436,"bracketLevel":58,"footswitchLevel":128,"jackLevel":4,"sideswitchLevel":21,"doublestepLevel":212,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KINDLADY","sex":"Unspecified","profileImg":"https://www.simpleimageresizer.com/_uploads/photos/af86e21c/IMG_3911_250x250.jpg"},{"id":257,"membersId":173285,"dateAdded":"2023-03-19T01:39:17.000Z","lastUpdated":"2023-03-19T03:58:21.000Z","status":1,"totalPoints":41330,"rankingPoints":41330,"totalPass":8,"totalFc":2,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":195,"bracketLevel":66,"footswitchLevel":92,"jackLevel":76,"sideswitchLevel":79,"doublestepLevel":172,"staminaLevel":85,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pogjamie","sex":"Unspecified","profileImg":"https://i.imgur.com/Gc1UYNf.png"},{"id":156,"membersId":3761,"dateAdded":"2023-03-18T22:21:55.000Z","lastUpdated":"2023-03-18T23:35:24.000Z","status":1,"totalPoints":39077,"rankingPoints":39077,"totalPass":1,"totalFc":3,"totalFec":1,"totalQuad":3,"totalQuint":0,"crossoverLevel":185,"bracketLevel":349,"footswitchLevel":202,"jackLevel":57,"sideswitchLevel":0,"doublestepLevel":219,"staminaLevel":27,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"BBLON","sex":"Male","profileImg":"https://i.imgur.com/u3fOa37.png"},{"id":235,"membersId":174904,"dateAdded":"2023-03-19T00:43:20.000Z","lastUpdated":"2023-03-19T02:16:40.000Z","status":1,"totalPoints":38609,"rankingPoints":38609,"totalPass":9,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":226,"bracketLevel":113,"footswitchLevel":124,"jackLevel":136,"sideswitchLevel":87,"doublestepLevel":94,"staminaLevel":179,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Choden","sex":"Unspecified","profileImg":""},{"id":45,"membersId":175355,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T18:37:48.000Z","status":1,"totalPoints":36977,"rankingPoints":36977,"totalPass":11,"totalFc":8,"totalFec":12,"totalQuad":0,"totalQuint":0,"crossoverLevel":540,"bracketLevel":34,"footswitchLevel":153,"jackLevel":27,"sideswitchLevel":0,"doublestepLevel":237,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":\"RootReducer#5914\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"RootReducer","sex":"Male","profileImg":""},{"id":100,"membersId":175227,"dateAdded":"2023-03-18T21:53:20.000Z","lastUpdated":"2023-03-19T00:18:41.000Z","status":1,"totalPoints":36441,"rankingPoints":36441,"totalPass":8,"totalFc":7,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":177,"bracketLevel":89,"footswitchLevel":151,"jackLevel":48,"sideswitchLevel":0,"doublestepLevel":233,"staminaLevel":24,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"yoonjelly","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/940655461886206012/1082481090436022282/pfp_250x250.png"},{"id":77,"membersId":173043,"dateAdded":"2023-03-18T21:50:20.000Z","lastUpdated":"2023-03-19T18:33:25.000Z","status":1,"totalPoints":36247,"rankingPoints":36247,"totalPass":2,"totalFc":4,"totalFec":6,"totalQuad":1,"totalQuint":0,"crossoverLevel":275,"bracketLevel":118,"footswitchLevel":144,"jackLevel":147,"sideswitchLevel":83,"doublestepLevel":335,"staminaLevel":46,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"XjojoX99","sex":"Male","profileImg":""},{"id":259,"membersId":133783,"dateAdded":"2023-03-19T01:40:35.000Z","lastUpdated":"2023-03-19T18:03:31.000Z","status":1,"totalPoints":35127,"rankingPoints":35127,"totalPass":6,"totalFc":3,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":343,"bracketLevel":69,"footswitchLevel":180,"jackLevel":73,"sideswitchLevel":0,"doublestepLevel":100,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Viper","sex":"Female","profileImg":"https://i.imgur.com/riy3PxR.png"},{"id":365,"membersId":165752,"dateAdded":"2023-03-19T16:22:47.000Z","lastUpdated":"2023-03-19T18:34:02.000Z","status":1,"totalPoints":34235,"rankingPoints":34235,"totalPass":9,"totalFc":3,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":303,"bracketLevel":97,"footswitchLevel":173,"jackLevel":39,"sideswitchLevel":41,"doublestepLevel":184,"staminaLevel":15,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zui","sex":"Male","profileImg":"https://i.ibb.co/nwG0Yb1/aaegt.png"},{"id":214,"membersId":160185,"dateAdded":"2023-03-18T23:56:42.000Z","lastUpdated":"2023-03-19T01:05:50.000Z","status":1,"totalPoints":33327,"rankingPoints":33327,"totalPass":7,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":250,"bracketLevel":116,"footswitchLevel":87,"jackLevel":66,"sideswitchLevel":92,"doublestepLevel":222,"staminaLevel":22,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nichard","sex":"Male","profileImg":""},{"id":83,"membersId":136928,"dateAdded":"2023-03-18T21:50:47.000Z","lastUpdated":"2023-03-18T23:00:48.000Z","status":1,"totalPoints":33245,"rankingPoints":33245,"totalPass":7,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":276,"bracketLevel":205,"footswitchLevel":184,"jackLevel":113,"sideswitchLevel":0,"doublestepLevel":331,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Daikyi","sex":"Male","profileImg":"https://puu.sh/J6z9c/a9edbb3013.png"},{"id":323,"membersId":1932,"dateAdded":"2023-03-19T07:13:42.000Z","lastUpdated":"2023-03-19T08:28:12.000Z","status":1,"totalPoints":32916,"rankingPoints":32916,"totalPass":13,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":63,"footswitchLevel":52,"jackLevel":36,"sideswitchLevel":0,"doublestepLevel":183,"staminaLevel":163,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"flip","sex":"Male","profileImg":"https://i.imgur.com/hNWIhQX.png"},{"id":2,"membersId":65671,"dateAdded":"2023-03-15T03:01:39.000Z","lastUpdated":"2023-03-19T03:17:02.000Z","status":1,"totalPoints":32227,"rankingPoints":32227,"totalPass":2,"totalFc":0,"totalFec":5,"totalQuad":1,"totalQuint":0,"crossoverLevel":182,"bracketLevel":120,"footswitchLevel":78,"jackLevel":5,"sideswitchLevel":0,"doublestepLevel":276,"staminaLevel":42,"isBuddy":false,"preferences":"{\"discordId\":\"Vincent#4923\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"VincentITG","sex":"Male","profileImg":"https://i.imgur.com/ijai2iI.png"},{"id":272,"membersId":173223,"dateAdded":"2023-03-19T02:28:47.000Z","lastUpdated":"2023-03-19T07:22:45.000Z","status":1,"totalPoints":31784,"rankingPoints":31784,"totalPass":10,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":310,"bracketLevel":70,"footswitchLevel":233,"jackLevel":45,"sideswitchLevel":0,"doublestepLevel":422,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Koso","sex":"Male","profileImg":"https://i.imgur.com/Vy3wGll.png"},{"id":118,"membersId":174634,"dateAdded":"2023-03-18T21:57:42.000Z","lastUpdated":"2023-03-18T23:24:41.000Z","status":1,"totalPoints":31379,"rankingPoints":31379,"totalPass":11,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":145,"bracketLevel":211,"footswitchLevel":235,"jackLevel":126,"sideswitchLevel":93,"doublestepLevel":293,"staminaLevel":12,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Sapphron","sex":"Male","profileImg":""},{"id":115,"membersId":62430,"dateAdded":"2023-03-18T21:56:35.000Z","lastUpdated":"2023-03-19T15:45:40.000Z","status":1,"totalPoints":30345,"rankingPoints":30345,"totalPass":4,"totalFc":2,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":115,"bracketLevel":201,"footswitchLevel":152,"jackLevel":75,"sideswitchLevel":46,"doublestepLevel":93,"staminaLevel":97,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"ManeMan08","sex":"Male","profileImg":"https://i.imgur.com/Gq7wyHQ.png"},{"id":170,"membersId":134773,"dateAdded":"2023-03-18T22:35:27.000Z","lastUpdated":"2023-03-19T04:14:36.000Z","status":1,"totalPoints":29848,"rankingPoints":29848,"totalPass":3,"totalFc":14,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":346,"bracketLevel":11,"footswitchLevel":156,"jackLevel":14,"sideswitchLevel":260,"doublestepLevel":90,"staminaLevel":61,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dlim","sex":"Male","profileImg":"https://i.imgur.com/JcxLonM.png"},{"id":101,"membersId":6314,"dateAdded":"2023-03-18T21:53:24.000Z","lastUpdated":"2023-03-19T02:46:59.000Z","status":1,"totalPoints":29660,"rankingPoints":29660,"totalPass":4,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":65,"bracketLevel":201,"footswitchLevel":250,"jackLevel":38,"sideswitchLevel":39,"doublestepLevel":88,"staminaLevel":53,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Franksoua","sex":"Male","profileImg":"https://media.discordapp.net/attachments/274289525314945024/857105532452077608/unknown.png"},{"id":144,"membersId":2380,"dateAdded":"2023-03-18T22:12:42.000Z","lastUpdated":"2023-03-19T00:50:28.000Z","status":1,"totalPoints":28371,"rankingPoints":28371,"totalPass":5,"totalFc":0,"totalFec":3,"totalQuad":3,"totalQuint":0,"crossoverLevel":158,"bracketLevel":250,"footswitchLevel":203,"jackLevel":105,"sideswitchLevel":0,"doublestepLevel":18,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PinkDad","sex":"Male","profileImg":"https://i.imgur.com/MP3H9bu.jpg"},{"id":67,"membersId":165906,"dateAdded":"2023-03-18T21:49:54.000Z","lastUpdated":"2023-03-19T15:09:10.000Z","status":1,"totalPoints":27932,"rankingPoints":27932,"totalPass":21,"totalFc":5,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":293,"bracketLevel":119,"footswitchLevel":127,"jackLevel":48,"sideswitchLevel":25,"doublestepLevel":146,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":\"joshhead#5985\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"joshhead","sex":"Unspecified","profileImg":""},{"id":359,"membersId":174873,"dateAdded":"2023-03-19T15:50:29.000Z","lastUpdated":"2023-03-19T17:00:43.000Z","status":1,"totalPoints":26735,"rankingPoints":26735,"totalPass":6,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":75,"bracketLevel":207,"footswitchLevel":275,"jackLevel":203,"sideswitchLevel":130,"doublestepLevel":171,"staminaLevel":43,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"undrscore","sex":"Male","profileImg":"https://i.imgur.com/EOG7g9B.png"},{"id":307,"membersId":174829,"dateAdded":"2023-03-19T04:58:16.000Z","lastUpdated":"2023-03-19T10:44:47.000Z","status":1,"totalPoints":26430,"rankingPoints":26430,"totalPass":6,"totalFc":5,"totalFec":10,"totalQuad":0,"totalQuint":0,"crossoverLevel":414,"bracketLevel":52,"footswitchLevel":153,"jackLevel":36,"sideswitchLevel":17,"doublestepLevel":49,"staminaLevel":16,"isBuddy":false,"preferences":"{\"discordId\":\"Oscar#9001\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"pogscar","sex":"Male","profileImg":""},{"id":146,"membersId":66627,"dateAdded":"2023-03-18T22:14:05.000Z","lastUpdated":"2023-03-19T18:36:49.000Z","status":1,"totalPoints":26054,"rankingPoints":26054,"totalPass":1,"totalFc":1,"totalFec":7,"totalQuad":12,"totalQuint":0,"crossoverLevel":499,"bracketLevel":12,"footswitchLevel":88,"jackLevel":34,"sideswitchLevel":0,"doublestepLevel":185,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Stardust","sex":"Male","profileImg":""},{"id":225,"membersId":66661,"dateAdded":"2023-03-19T00:24:59.000Z","lastUpdated":"2023-03-19T01:18:41.000Z","status":1,"totalPoints":25409,"rankingPoints":25409,"totalPass":4,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":56,"bracketLevel":139,"footswitchLevel":125,"jackLevel":14,"sideswitchLevel":201,"doublestepLevel":25,"staminaLevel":60,"isBuddy":false,"preferences":"{\"discordId\":\"Cairo'Nairo#0673\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"jeshusha1","sex":"Male","profileImg":"https://i.imgur.com/Jg5gtfR.png"},{"id":9,"membersId":173420,"dateAdded":"2023-03-18T21:48:27.000Z","lastUpdated":"2023-03-19T02:10:50.000Z","status":1,"totalPoints":23791,"rankingPoints":23791,"totalPass":10,"totalFc":27,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":398,"bracketLevel":24,"footswitchLevel":131,"jackLevel":19,"sideswitchLevel":0,"doublestepLevel":120,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Martin#6291\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"slowunsteady","sex":"Unspecified","profileImg":"https://i.imgur.com/7VkeuP9.png"},{"id":157,"membersId":42011,"dateAdded":"2023-03-18T22:22:10.000Z","lastUpdated":"2023-03-19T17:34:07.000Z","status":1,"totalPoints":21798,"rankingPoints":21798,"totalPass":12,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":162,"bracketLevel":28,"footswitchLevel":139,"jackLevel":12,"sideswitchLevel":109,"doublestepLevel":79,"staminaLevel":26,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zlew","sex":"Male","profileImg":"https://i.imgur.com/THdpsEY.png"},{"id":283,"membersId":66610,"dateAdded":"2023-03-19T02:58:26.000Z","lastUpdated":"2023-03-19T03:45:41.000Z","status":1,"totalPoints":21201,"rankingPoints":21201,"totalPass":6,"totalFc":2,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":182,"bracketLevel":158,"footswitchLevel":83,"jackLevel":81,"sideswitchLevel":0,"doublestepLevel":31,"staminaLevel":6,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"FabSab44","sex":"Female","profileImg":"https://i.ibb.co/pJB1krQ/spike4-4.jpg"},{"id":321,"membersId":175218,"dateAdded":"2023-03-19T07:08:13.000Z","lastUpdated":"2023-03-19T18:37:18.000Z","status":1,"totalPoints":20966,"rankingPoints":20966,"totalPass":9,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":43,"footswitchLevel":47,"jackLevel":31,"sideswitchLevel":73,"doublestepLevel":125,"staminaLevel":34,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zivie87","sex":"Male","profileImg":""},{"id":285,"membersId":124527,"dateAdded":"2023-03-19T03:05:57.000Z","lastUpdated":"2023-03-19T16:51:30.000Z","status":1,"totalPoints":20738,"rankingPoints":20738,"totalPass":1,"totalFc":4,"totalFec":6,"totalQuad":6,"totalQuint":0,"crossoverLevel":471,"bracketLevel":12,"footswitchLevel":67,"jackLevel":35,"sideswitchLevel":0,"doublestepLevel":185,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Silver Fox","sex":"Male","profileImg":"https://i.imgur.com/qb0irJQ.png"},{"id":95,"membersId":175276,"dateAdded":"2023-03-18T21:52:31.000Z","lastUpdated":"2023-03-18T22:25:22.000Z","status":1,"totalPoints":19770,"rankingPoints":19770,"totalPass":2,"totalFc":1,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":89,"bracketLevel":1,"footswitchLevel":44,"jackLevel":15,"sideswitchLevel":0,"doublestepLevel":59,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"teekmn","sex":"Unspecified","profileImg":"https://cdn-live.warthunder.com/uploads/9c/ba20ec0674301f31323c1790d35c030fe45ab0/1415940983851.jpg"},{"id":309,"membersId":173298,"dateAdded":"2023-03-19T05:12:27.000Z","lastUpdated":"2023-03-19T06:00:09.000Z","status":1,"totalPoints":18827,"rankingPoints":18827,"totalPass":9,"totalFc":1,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":238,"bracketLevel":72,"footswitchLevel":112,"jackLevel":18,"sideswitchLevel":0,"doublestepLevel":141,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JuiKuen","sex":"Male","profileImg":""},{"id":299,"membersId":173861,"dateAdded":"2023-03-19T04:11:48.000Z","lastUpdated":"2023-03-19T05:52:30.000Z","status":1,"totalPoints":18796,"rankingPoints":18796,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":88,"bracketLevel":73,"footswitchLevel":165,"jackLevel":108,"sideswitchLevel":243,"doublestepLevel":90,"staminaLevel":55,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hidden","sex":"Unspecified","profileImg":""},{"id":239,"membersId":127868,"dateAdded":"2023-03-19T00:45:46.000Z","lastUpdated":"2023-03-19T05:23:54.000Z","status":1,"totalPoints":18685,"rankingPoints":18685,"totalPass":7,"totalFc":7,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":317,"bracketLevel":10,"footswitchLevel":65,"jackLevel":14,"sideswitchLevel":0,"doublestepLevel":20,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"chroma","sex":"Female","profileImg":""},{"id":44,"membersId":173683,"dateAdded":"2023-03-18T21:49:02.000Z","lastUpdated":"2023-03-19T03:41:57.000Z","status":1,"totalPoints":18673,"rankingPoints":18673,"totalPass":8,"totalFc":6,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":342,"bracketLevel":27,"footswitchLevel":73,"jackLevel":36,"sideswitchLevel":78,"doublestepLevel":133,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"TakuMii","sex":"Male","profileImg":"https://avatars.akamai.steamstatic.com/24803bdf9d1ac613cc536d28d0e72d48101d63a7_full.jpg"},{"id":237,"membersId":165884,"dateAdded":"2023-03-19T00:45:18.000Z","lastUpdated":"2023-03-19T01:39:48.000Z","status":1,"totalPoints":18613,"rankingPoints":18613,"totalPass":4,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":130,"bracketLevel":99,"footswitchLevel":105,"jackLevel":33,"sideswitchLevel":44,"doublestepLevel":120,"staminaLevel":44,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Aldarole","sex":"Male","profileImg":"https://sportslogohistory.com/wp-content/uploads/2017/12/new_york_knicks_1947-1964.png"},{"id":317,"membersId":165605,"dateAdded":"2023-03-19T06:40:42.000Z","lastUpdated":"2023-03-19T09:45:51.000Z","status":1,"totalPoints":18600,"rankingPoints":18600,"totalPass":2,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":39,"bracketLevel":51,"footswitchLevel":150,"jackLevel":0,"sideswitchLevel":65,"doublestepLevel":85,"staminaLevel":10,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Freis","sex":"Male","profileImg":""},{"id":350,"membersId":130553,"dateAdded":"2023-03-19T14:13:28.000Z","lastUpdated":"2023-03-19T18:37:47.000Z","status":1,"totalPoints":17706,"rankingPoints":17706,"totalPass":3,"totalFc":4,"totalFec":9,"totalQuad":0,"totalQuint":0,"crossoverLevel":373,"bracketLevel":11,"footswitchLevel":56,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":119,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"NinjaNabi","sex":"Female","profileImg":"https://i.ibb.co/ykdXrTt/nabiderpwithborder.png"},{"id":22,"membersId":173546,"dateAdded":"2023-03-18T21:48:49.000Z","lastUpdated":"2023-03-19T11:15:32.000Z","status":1,"totalPoints":17027,"rankingPoints":17027,"totalPass":9,"totalFc":3,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":166,"bracketLevel":60,"footswitchLevel":153,"jackLevel":62,"sideswitchLevel":0,"doublestepLevel":182,"staminaLevel":20,"isBuddy":false,"preferences":"{\"discordId\":\"Piols#6625\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Piols","sex":"Male","profileImg":""},{"id":210,"membersId":127797,"dateAdded":"2023-03-18T23:45:55.000Z","lastUpdated":"2023-03-19T03:24:58.000Z","status":1,"totalPoints":16607,"rankingPoints":16607,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":50,"bracketLevel":76,"footswitchLevel":160,"jackLevel":29,"sideswitchLevel":16,"doublestepLevel":40,"staminaLevel":65,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dancingmaractus","sex":"Male","profileImg":"https://cdn.discordapp.com/attachments/704364807155089498/952378600886272020/maractus.png"},{"id":62,"membersId":165750,"dateAdded":"2023-03-18T21:49:46.000Z","lastUpdated":"2023-03-19T12:29:39.000Z","status":1,"totalPoints":14800,"rankingPoints":14800,"totalPass":12,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":134,"bracketLevel":15,"footswitchLevel":111,"jackLevel":13,"sideswitchLevel":0,"doublestepLevel":129,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Mayflower","sex":"Unspecified","profileImg":"https://mayf.pink/files/groove.jpg"},{"id":241,"membersId":172941,"dateAdded":"2023-03-19T00:49:32.000Z","lastUpdated":"2023-03-19T01:58:17.000Z","status":1,"totalPoints":14386,"rankingPoints":14386,"totalPass":5,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":97,"bracketLevel":86,"footswitchLevel":93,"jackLevel":6,"sideswitchLevel":27,"doublestepLevel":141,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Bag Man","sex":"Male","profileImg":"https://remywiki.com/images/thumb/d/d4/Bag.png/200px-Bag.png"},{"id":28,"membersId":77862,"dateAdded":"2023-03-18T21:48:54.000Z","lastUpdated":"2023-03-18T22:04:22.000Z","status":1,"totalPoints":14328,"rankingPoints":14328,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":11,"bracketLevel":193,"footswitchLevel":105,"jackLevel":92,"sideswitchLevel":0,"doublestepLevel":170,"staminaLevel":46,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JeffreyATW","sex":"Male","profileImg":"https://jeffreyatw.com/static/images/atw-tfti-250.png"},{"id":5,"membersId":173384,"dateAdded":"2023-03-16T21:50:13.000Z","lastUpdated":"2023-03-19T00:11:03.000Z","status":1,"totalPoints":13906,"rankingPoints":13906,"totalPass":0,"totalFc":2,"totalFec":1,"totalQuad":3,"totalQuint":0,"crossoverLevel":188,"bracketLevel":4,"footswitchLevel":22,"jackLevel":64,"sideswitchLevel":0,"doublestepLevel":53,"staminaLevel":3,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hiten","sex":"Male","profileImg":"https://i.imgur.com/TRRmDiz.png"},{"id":96,"membersId":173453,"dateAdded":"2023-03-18T21:52:39.000Z","lastUpdated":"2023-03-19T18:37:53.000Z","status":1,"totalPoints":13796,"rankingPoints":13796,"totalPass":2,"totalFc":8,"totalFec":4,"totalQuad":0,"totalQuint":0,"crossoverLevel":348,"bracketLevel":12,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":32,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Kikoia","sex":"Female","profileImg":"https://i.imgur.com/KCsbDb7.png"},{"id":180,"membersId":128724,"dateAdded":"2023-03-18T22:43:47.000Z","lastUpdated":"2023-03-19T00:25:28.000Z","status":1,"totalPoints":12932,"rankingPoints":12932,"totalPass":3,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":33,"bracketLevel":150,"footswitchLevel":73,"jackLevel":125,"sideswitchLevel":0,"doublestepLevel":11,"staminaLevel":35,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"LFK","sex":"Unspecified","profileImg":"https://i.imgur.com/mCnGAVc.png"},{"id":281,"membersId":175376,"dateAdded":"2023-03-19T02:50:59.000Z","lastUpdated":"2023-03-19T03:41:58.000Z","status":1,"totalPoints":12090,"rankingPoints":12090,"totalPass":9,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":219,"bracketLevel":9,"footswitchLevel":26,"jackLevel":16,"sideswitchLevel":0,"doublestepLevel":14,"staminaLevel":8,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bxrru","sex":"Unspecified","profileImg":""},{"id":60,"membersId":173320,"dateAdded":"2023-03-18T21:49:36.000Z","lastUpdated":"2023-03-19T07:01:46.000Z","status":1,"totalPoints":11957,"rankingPoints":11957,"totalPass":1,"totalFc":2,"totalFec":4,"totalQuad":1,"totalQuint":0,"crossoverLevel":152,"bracketLevel":0,"footswitchLevel":17,"jackLevel":10,"sideswitchLevel":0,"doublestepLevel":209,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"L4viR","sex":"Male","profileImg":""},{"id":51,"membersId":4062,"dateAdded":"2023-03-18T21:49:07.000Z","lastUpdated":"2023-03-19T15:29:33.000Z","status":1,"totalPoints":11810,"rankingPoints":11810,"totalPass":2,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":77,"bracketLevel":16,"footswitchLevel":37,"jackLevel":212,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PkRynker","sex":"Male","profileImg":""},{"id":197,"membersId":165854,"dateAdded":"2023-03-18T23:08:53.000Z","lastUpdated":"2023-03-19T18:36:41.000Z","status":1,"totalPoints":11188,"rankingPoints":11188,"totalPass":11,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":202,"bracketLevel":6,"footswitchLevel":38,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":51,"staminaLevel":1,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nazrininator","sex":"Male","profileImg":""},{"id":91,"membersId":173007,"dateAdded":"2023-03-18T21:51:29.000Z","lastUpdated":"2023-03-18T23:02:57.000Z","status":1,"totalPoints":11048,"rankingPoints":11048,"totalPass":0,"totalFc":0,"totalFec":6,"totalQuad":3,"totalQuint":0,"crossoverLevel":262,"bracketLevel":12,"footswitchLevel":38,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":84,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"kodensa#3582\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"kodensa","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/902652921890611254/1086771021857697812/a.jpg"},{"id":261,"membersId":175353,"dateAdded":"2023-03-19T01:45:09.000Z","lastUpdated":"2023-03-19T02:24:01.000Z","status":1,"totalPoints":10617,"rankingPoints":10617,"totalPass":16,"totalFc":2,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":178,"bracketLevel":0,"footswitchLevel":21,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":18,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"meecheezink","sex":"Female","profileImg":""},{"id":251,"membersId":175221,"dateAdded":"2023-03-19T01:23:20.000Z","lastUpdated":"2023-03-19T10:47:06.000Z","status":1,"totalPoints":9180,"rankingPoints":9180,"totalPass":16,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":192,"bracketLevel":5,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":59,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"atticusgg","sex":"Unspecified","profileImg":""},{"id":75,"membersId":173399,"dateAdded":"2023-03-18T21:50:18.000Z","lastUpdated":"2023-03-19T00:35:46.000Z","status":1,"totalPoints":8950,"rankingPoints":8950,"totalPass":1,"totalFc":8,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":169,"bracketLevel":0,"footswitchLevel":23,"jackLevel":41,"sideswitchLevel":0,"doublestepLevel":67,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DJEmbrace","sex":"Unspecified","profileImg":""},{"id":195,"membersId":75729,"dateAdded":"2023-03-18T23:05:34.000Z","lastUpdated":"2023-03-19T16:26:45.000Z","status":1,"totalPoints":8917,"rankingPoints":8917,"totalPass":14,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":115,"bracketLevel":0,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":54,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"help","sex":"Male","profileImg":"https://i.imgur.com/AKnOujq.jpg"},{"id":192,"membersId":127823,"dateAdded":"2023-03-18T23:02:21.000Z","lastUpdated":"2023-03-19T02:20:39.000Z","status":1,"totalPoints":8118,"rankingPoints":8118,"totalPass":3,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":82,"bracketLevel":2,"footswitchLevel":52,"jackLevel":26,"sideswitchLevel":0,"doublestepLevel":7,"staminaLevel":9,"isBuddy":false,"preferences":"{\"discordId\":\"Fresca#7450\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JONBUDDY","sex":"Male","profileImg":"https://i.imgur.com/7K4gyoz.png"},{"id":59,"membersId":173651,"dateAdded":"2023-03-18T21:49:33.000Z","lastUpdated":"2023-03-19T17:23:29.000Z","status":1,"totalPoints":7251,"rankingPoints":7251,"totalPass":5,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":26,"bracketLevel":0,"footswitchLevel":44,"jackLevel":41,"sideswitchLevel":0,"doublestepLevel":70,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Zydra","sex":"Female","profileImg":"https://cdn.discordapp.com/attachments/750387080932229212/977307823811747880/250250zy.png"},{"id":47,"membersId":174173,"dateAdded":"2023-03-18T21:49:03.000Z","lastUpdated":"2023-03-19T18:18:50.000Z","status":1,"totalPoints":6916,"rankingPoints":6916,"totalPass":10,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":35,"bracketLevel":0,"footswitchLevel":62,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lillyvideogames","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/910836877647577109/1087038719334289550/aoko-pfp-smol.png"},{"id":168,"membersId":163585,"dateAdded":"2023-03-18T22:32:25.000Z","lastUpdated":"2023-03-19T00:30:19.000Z","status":1,"totalPoints":6879,"rankingPoints":6879,"totalPass":0,"totalFc":0,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":41,"bracketLevel":0,"footswitchLevel":97,"jackLevel":40,"sideswitchLevel":0,"doublestepLevel":39,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MegaSphere","sex":"Male","profileImg":"https://i.imgur.com/p34Ni8n.png"},{"id":322,"membersId":124751,"dateAdded":"2023-03-19T07:13:03.000Z","lastUpdated":"2023-03-19T08:56:43.000Z","status":1,"totalPoints":6077,"rankingPoints":6077,"totalPass":1,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":113,"bracketLevel":0,"footswitchLevel":15,"jackLevel":0,"sideswitchLevel":21,"doublestepLevel":35,"staminaLevel":13,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"dashark","sex":"Male","profileImg":"https://i.imgur.com/GDN5TxQ.jpg"},{"id":374,"membersId":174568,"dateAdded":"2023-03-19T17:22:09.000Z","lastUpdated":"2023-03-19T18:34:15.000Z","status":1,"totalPoints":5853,"rankingPoints":5853,"totalPass":1,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":84,"bracketLevel":0,"footswitchLevel":36,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":4,"staminaLevel":4,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"JellySlosh","sex":"Male","profileImg":""},{"id":134,"membersId":75805,"dateAdded":"2023-03-18T22:04:19.000Z","lastUpdated":"2023-03-19T18:36:02.000Z","status":1,"totalPoints":5701,"rankingPoints":5701,"totalPass":1,"totalFc":1,"totalFec":3,"totalQuad":0,"totalQuint":0,"crossoverLevel":170,"bracketLevel":11,"footswitchLevel":28,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Accioskullar","sex":"Male","profileImg":""},{"id":316,"membersId":175383,"dateAdded":"2023-03-19T06:19:29.000Z","lastUpdated":"2023-03-19T08:28:52.000Z","status":1,"totalPoints":5480,"rankingPoints":5480,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":105,"bracketLevel":12,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":23,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DenryuRider","sex":"Male","profileImg":""},{"id":342,"membersId":175360,"dateAdded":"2023-03-19T12:13:12.000Z","lastUpdated":"2023-03-19T14:45:49.000Z","status":1,"totalPoints":5200,"rankingPoints":5200,"totalPass":7,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":20,"bracketLevel":0,"footswitchLevel":68,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":5,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Goode","sex":"Male","profileImg":""},{"id":184,"membersId":44806,"dateAdded":"2023-03-18T22:48:42.000Z","lastUpdated":"2023-03-19T18:37:38.000Z","status":1,"totalPoints":5132,"rankingPoints":5132,"totalPass":0,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":27,"bracketLevel":0,"footswitchLevel":13,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":191,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Captain Carbon#0928\",\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Dick Kickem","sex":"Male","profileImg":"https://avatars.akamai.steamstatic.com/bdbbc5dce4f051d7c19cc0570416d82274777f43_full.jpg"},{"id":242,"membersId":7558,"dateAdded":"2023-03-19T00:50:18.000Z","lastUpdated":"2023-03-19T18:33:36.000Z","status":1,"totalPoints":5091,"rankingPoints":5091,"totalPass":0,"totalFc":4,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":88,"bracketLevel":0,"footswitchLevel":26,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":154,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"PanStyle","sex":"Male","profileImg":""},{"id":306,"membersId":175382,"dateAdded":"2023-03-19T04:43:52.000Z","lastUpdated":"2023-03-19T05:22:16.000Z","status":1,"totalPoints":4615,"rankingPoints":4615,"totalPass":2,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":32,"bracketLevel":0,"footswitchLevel":3,"jackLevel":31,"sideswitchLevel":0,"doublestepLevel":31,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"KATERINA","sex":"Female","profileImg":""},{"id":172,"membersId":173110,"dateAdded":"2023-03-18T22:35:55.000Z","lastUpdated":"2023-03-18T22:55:38.000Z","status":1,"totalPoints":4436,"rankingPoints":4436,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":2,"totalQuint":0,"crossoverLevel":59,"bracketLevel":0,"footswitchLevel":4,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":26,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Shane_ITG_","sex":"Unspecified","profileImg":"https://i.imgur.com/px8JzPD.png"},{"id":244,"membersId":109985,"dateAdded":"2023-03-19T00:54:29.000Z","lastUpdated":"2023-03-19T18:04:39.000Z","status":1,"totalPoints":4423,"rankingPoints":4423,"totalPass":6,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":104,"bracketLevel":5,"footswitchLevel":14,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"soler98012","sex":"Unspecified","profileImg":""},{"id":104,"membersId":2600,"dateAdded":"2023-03-18T21:53:35.000Z","lastUpdated":"2023-03-18T22:13:23.000Z","status":1,"totalPoints":4342,"rankingPoints":4342,"totalPass":1,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":110,"bracketLevel":12,"footswitchLevel":55,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"DRON","sex":"Male","profileImg":"https://i.imgur.com/ezVfWhH.png"},{"id":280,"membersId":173125,"dateAdded":"2023-03-19T02:48:37.000Z","lastUpdated":"2023-03-19T04:00:12.000Z","status":1,"totalPoints":4033,"rankingPoints":4033,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":3,"totalQuint":0,"crossoverLevel":122,"bracketLevel":12,"footswitchLevel":30,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"MajorOfMusic","sex":"Male","profileImg":""},{"id":369,"membersId":66714,"dateAdded":"2023-03-19T16:37:55.000Z","lastUpdated":"2023-03-19T17:17:42.000Z","status":1,"totalPoints":4019,"rankingPoints":4019,"totalPass":7,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":76,"bracketLevel":0,"footswitchLevel":6,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":41,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"lunal3blanc","sex":"Female","profileImg":""},{"id":318,"membersId":127775,"dateAdded":"2023-03-19T06:41:30.000Z","lastUpdated":"2023-03-19T08:14:17.000Z","status":1,"totalPoints":3772,"rankingPoints":3772,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":31,"bracketLevel":1,"footswitchLevel":0,"jackLevel":4,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nv","sex":"Male","profileImg":"https://i.imgur.com/4z5tNia.png"},{"id":245,"membersId":169204,"dateAdded":"2023-03-19T00:58:23.000Z","lastUpdated":"2023-03-19T04:01:43.000Z","status":1,"totalPoints":3226,"rankingPoints":3226,"totalPass":0,"totalFc":2,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":0,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"takatzu48","sex":"Male","profileImg":""},{"id":143,"membersId":66673,"dateAdded":"2023-03-18T22:10:43.000Z","lastUpdated":"2023-03-18T23:34:09.000Z","status":1,"totalPoints":3059,"rankingPoints":3059,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":9,"bracketLevel":0,"footswitchLevel":12,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":114,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":\"Chief Skittles#1789\",\"decentsEnabled\":true,\"wayOffsEnabled\":true}","name":"ChiefSkittles","sex":"Male","profileImg":"https://i.imgur.com/s5sMjf4.png"},{"id":377,"membersId":173589,"dateAdded":"2023-03-19T17:30:07.000Z","lastUpdated":"2023-03-19T18:32:53.000Z","status":1,"totalPoints":3037,"rankingPoints":3037,"totalPass":1,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":24,"bracketLevel":45,"footswitchLevel":11,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"bader","sex":"Male","profileImg":""},{"id":218,"membersId":165796,"dateAdded":"2023-03-19T00:11:42.000Z","lastUpdated":"2023-03-19T04:00:31.000Z","status":1,"totalPoints":2927,"rankingPoints":2927,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":14,"bracketLevel":0,"footswitchLevel":39,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":6,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Caji123","sex":"Male","profileImg":""},{"id":71,"membersId":173056,"dateAdded":"2023-03-18T21:50:00.000Z","lastUpdated":"2023-03-18T23:00:38.000Z","status":1,"totalPoints":2909,"rankingPoints":2909,"totalPass":4,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":80,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":67,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Braeden","sex":"Male","profileImg":""},{"id":224,"membersId":173438,"dateAdded":"2023-03-19T00:18:20.000Z","lastUpdated":"2023-03-19T01:26:31.000Z","status":1,"totalPoints":2599,"rankingPoints":2599,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":1,"totalQuint":0,"crossoverLevel":120,"bracketLevel":12,"footswitchLevel":29,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"nauebp","sex":"Male","profileImg":""},{"id":368,"membersId":175389,"dateAdded":"2023-03-19T16:33:48.000Z","lastUpdated":"2023-03-19T18:16:52.000Z","status":1,"totalPoints":2555,"rankingPoints":2555,"totalPass":0,"totalFc":0,"totalFec":2,"totalQuad":0,"totalQuint":0,"crossoverLevel":102,"bracketLevel":0,"footswitchLevel":8,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"patj","sex":"Male","profileImg":""},{"id":107,"membersId":165841,"dateAdded":"2023-03-18T21:54:25.000Z","lastUpdated":"2023-03-19T18:34:46.000Z","status":1,"totalPoints":2322,"rankingPoints":2322,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":0,"bracketLevel":0,"footswitchLevel":47,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":2,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"mangoafterdawn","sex":"Unspecified","profileImg":"https://cdn.discordapp.com/attachments/624856529568399372/850869659774484510/profile.png"},{"id":179,"membersId":175367,"dateAdded":"2023-03-18T22:41:58.000Z","lastUpdated":"2023-03-19T01:50:09.000Z","status":1,"totalPoints":2296,"rankingPoints":2296,"totalPass":2,"totalFc":1,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":48,"bracketLevel":0,"footswitchLevel":18,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Rufus","sex":"Male","profileImg":""},{"id":8,"membersId":167028,"dateAdded":"2023-03-18T21:48:25.000Z","lastUpdated":"2023-03-19T02:53:13.000Z","status":1,"totalPoints":1761,"rankingPoints":1761,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":81,"bracketLevel":8,"footswitchLevel":21,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"eightbitderp","sex":"Male","profileImg":"https://i.imgur.com/YAKidX4.png"},{"id":378,"membersId":175058,"dateAdded":"2023-03-19T17:30:42.000Z","lastUpdated":"2023-03-19T17:50:10.000Z","status":1,"totalPoints":1381,"rankingPoints":1381,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1,"bracketLevel":2,"footswitchLevel":6,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Nino","sex":"Male","profileImg":"https://i.ibb.co/bQHGCm5/Avatar.png"},{"id":386,"membersId":982,"dateAdded":"2023-03-19T17:50:20.000Z","lastUpdated":"2023-03-19T18:22:33.000Z","status":1,"totalPoints":1338,"rankingPoints":1338,"totalPass":0,"totalFc":0,"totalFec":0,"totalQuad":1,"totalQuint":0,"crossoverLevel":62,"bracketLevel":12,"footswitchLevel":25,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"andy457","sex":"Male","profileImg":""},{"id":133,"membersId":173658,"dateAdded":"2023-03-18T22:03:54.000Z","lastUpdated":"2023-03-18T22:14:23.000Z","status":1,"totalPoints":1332,"rankingPoints":1332,"totalPass":2,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":45,"bracketLevel":0,"footswitchLevel":2,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"false_parallax","sex":"Female","profileImg":""},{"id":84,"membersId":129655,"dateAdded":"2023-03-18T21:50:54.000Z","lastUpdated":"2023-03-19T18:34:37.000Z","status":1,"totalPoints":1254,"rankingPoints":1254,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":58,"bracketLevel":0,"footswitchLevel":4,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Hunter","sex":"Male","profileImg":"https://i.imgur.com/H2aLLZ3.png"},{"id":24,"membersId":163331,"dateAdded":"2023-03-18T21:48:52.000Z","lastUpdated":"2023-03-18T21:52:51.000Z","status":1,"totalPoints":1083,"rankingPoints":1083,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":6,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":74,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Azirixx","sex":"Male","profileImg":"https://i.ibb.co/pKqM0s4/azi-Cool-GS.png"},{"id":232,"membersId":2910,"dateAdded":"2023-03-19T00:35:39.000Z","lastUpdated":"2023-03-19T18:20:59.000Z","status":1,"totalPoints":1044,"rankingPoints":1044,"totalPass":0,"totalFc":0,"totalFec":1,"totalQuad":0,"totalQuint":0,"crossoverLevel":25,"bracketLevel":0,"footswitchLevel":0,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Vagabond","sex":"Male","profileImg":"https://www.personality-database.com/profile_images/152769.png"},{"id":74,"membersId":173087,"dateAdded":"2023-03-18T21:50:14.000Z","lastUpdated":"2023-03-18T23:03:11.000Z","status":1,"totalPoints":959,"rankingPoints":959,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":44,"bracketLevel":8,"footswitchLevel":18,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Gr00txD","sex":"Male","profileImg":"https://pbs.twimg.com/profile_images/1026379676476956672/rxMbgeMF_400x400.jpg"},{"id":131,"membersId":173502,"dateAdded":"2023-03-18T22:03:14.000Z","lastUpdated":"2023-03-19T01:03:02.000Z","status":1,"totalPoints":890,"rankingPoints":890,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":41,"bracketLevel":0,"footswitchLevel":3,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Salsa","sex":"Female","profileImg":""},{"id":264,"membersId":175371,"dateAdded":"2023-03-19T01:47:19.000Z","lastUpdated":"2023-03-19T01:50:10.000Z","status":1,"totalPoints":587,"rankingPoints":587,"totalPass":1,"totalFc":0,"totalFec":0,"totalQuad":0,"totalQuint":0,"crossoverLevel":1,"bracketLevel":0,"footswitchLevel":10,"jackLevel":0,"sideswitchLevel":0,"doublestepLevel":0,"staminaLevel":0,"isBuddy":false,"preferences":"{\"discordId\":null,\"decentsEnabled\":false,\"wayOffsEnabled\":false}","name":"Cool Brick","sex":"Male","profileImg":""}],"rivalMembersIds":[]}} \ No newline at end of file diff --git a/server/node_modules/assert-options/README.md b/server/node_modules/assert-options/README.md new file mode 100644 index 0000000..6319c39 --- /dev/null +++ b/server/node_modules/assert-options/README.md @@ -0,0 +1,72 @@ +# assert-options + +Smart `options` handling, with one line of code: + +* throw detailed error on invalid options +* set default values for missing options + +Strongly-typed, built with TypeScript 4.x `strict` mode, for JavaScript clients. + +[![Build Status](https://travis-ci.org/vitaly-t/assert-options.svg?branch=master)](https://travis-ci.org/vitaly-t/assert-options) +[![Coverage Status](https://coveralls.io/repos/vitaly-t/assert-options/badge.svg?branch=master)](https://coveralls.io/r/vitaly-t/assert-options?branch=master) + +## Rationale + +* Passing in invalid or misspelled option names is one of the most common errors in JavaScript. +* Assigning defaults is the most common operation for methods that take options. + +This module automates proper options handling - parsing and setting defaults where needed. + +Although this library is implemented in TypeScript, its objective is mainly to help JavaScript clients, +because TypeScript itself can handle invalid options and defaults natively. + +## Installation + +``` +$ npm i assert-options +``` + +## Usage + +```js +const { assertOptions } = require('assert-options'); + +function functionWithOptions(options) { + options = assertOptions(options, {first: 123, second: null}); + + // options is a safe object here, with all missing defaults set. +} +``` + +When default values are not needed, you can just use an array of strings: + +```js +function functionWithOptions(options) { + options = assertOptions(options, ['first', 'second']); + + // the result is exactly the same as using the following: + // options = assertOptions(options, {first: undefined, second: undefined}); + + // options is a safe object here, without defaults. +} +``` + +## API + +### `assertOptions(options, defaults) => {}` + +* When `options` is `null`/`undefined`, new `{}` is returned, applying `defaults` as specified. + +* When `options` contains an unknown property, [Error] `Option "name" is not recognized.` is thrown. + +* When a property in `options` is missing or `undefined`, its value is set from the `defaults`, +provided it is available and its value is not `undefined`. + +* When `options` is not `null`/`undefined`, it must be of type `object`, or else [TypeError] is thrown: +`Invalid "options" parameter: value`. + +* Parameter `defaults` is required, as a non-`null` object or an array of strings, or else [TypeError] +is thrown: `Invalid "defaults" parameter: value`. + +[Error]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error +[TypeError]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError diff --git a/server/node_modules/assert-options/dist/index.js b/server/node_modules/assert-options/dist/index.js new file mode 100644 index 0000000..d34ab88 --- /dev/null +++ b/server/node_modules/assert-options/dist/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function assertOptions(options, defaults) { + if (options !== null && options !== undefined && typeof options !== 'object') { + throw new TypeError('Invalid "options" parameter: ' + JSON.stringify(options)); + } + var isArray = Array.isArray(defaults); + if (!isArray && (!defaults || typeof defaults !== 'object')) { + throw new TypeError('Invalid "defaults" parameter: ' + JSON.stringify(defaults)); + } + if (options) { + for (var _i = 0, _a = Object.keys(options); _i < _a.length; _i++) { + var a = _a[_i]; + if ((isArray && defaults.indexOf(a) === -1) || (!isArray && !(a in defaults))) { + throw new Error('Option "' + a + '" is not recognized.'); + } + } + } + else { + options = {}; + } + if (!isArray) { + var defs = defaults; + for (var _b = 0, _c = Object.keys(defs); _b < _c.length; _b++) { + var d = _c[_b]; + if (options[d] === undefined && defs[d] !== undefined) { + options[d] = defs[d]; + } + } + } + return options; +} +exports.assertOptions = assertOptions; diff --git a/server/node_modules/assert-options/dist/src/index.d.ts b/server/node_modules/assert-options/dist/src/index.d.ts new file mode 100644 index 0000000..d50965c --- /dev/null +++ b/server/node_modules/assert-options/dist/src/index.d.ts @@ -0,0 +1,4 @@ +export declare type NamedValues = { + [name: string]: any; +}; +export declare function assertOptions(options: NamedValues | null | undefined, defaults: NamedValues | string[]): NamedValues; diff --git a/server/node_modules/assert-options/dist/src/index.js b/server/node_modules/assert-options/dist/src/index.js new file mode 100644 index 0000000..41d28cd --- /dev/null +++ b/server/node_modules/assert-options/dist/src/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertOptions = void 0; +function assertOptions(options, defaults) { + if (options !== null && options !== undefined && typeof options !== 'object') { + throw new TypeError('Invalid "options" parameter: ' + JSON.stringify(options)); + } + var isArray = Array.isArray(defaults); + if (!isArray && (!defaults || typeof defaults !== 'object')) { + throw new TypeError('Invalid "defaults" parameter: ' + JSON.stringify(defaults)); + } + if (options) { + for (var _i = 0, _a = Object.keys(options); _i < _a.length; _i++) { + var a = _a[_i]; + if ((isArray && defaults.indexOf(a) === -1) || (!isArray && !(a in defaults))) { + throw new Error('Option "' + a + '" is not recognized.'); + } + } + } + else { + options = {}; + } + if (!isArray) { + var defs = defaults; + for (var _b = 0, _c = Object.keys(defs); _b < _c.length; _b++) { + var d = _c[_b]; + if (options[d] === undefined && defs[d] !== undefined) { + options[d] = defs[d]; + } + } + } + return options; +} +exports.assertOptions = assertOptions; diff --git a/server/node_modules/assert-options/package.json b/server/node_modules/assert-options/package.json new file mode 100644 index 0000000..f1dd11d --- /dev/null +++ b/server/node_modules/assert-options/package.json @@ -0,0 +1,76 @@ +{ + "_from": "assert-options@0.7.0", + "_id": "assert-options@0.7.0", + "_inBundle": false, + "_integrity": "sha512-7q9uNH/Dh8gFgpIIb9ja8PJEWA5AQy3xnBC8jtKs8K/gNVCr1K6kIvlm59HUyYgvM7oEDoLzGgPcGd9FqhtXEQ==", + "_location": "/assert-options", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "assert-options@0.7.0", + "name": "assert-options", + "escapedName": "assert-options", + "rawSpec": "0.7.0", + "saveSpec": null, + "fetchSpec": "0.7.0" + }, + "_requiredBy": [ + "/pg-promise" + ], + "_resolved": "https://registry.npmjs.org/assert-options/-/assert-options-0.7.0.tgz", + "_shasum": "82c27618d9c0baa5e9da8ef607ee261a44ed6e5e", + "_spec": "assert-options@0.7.0", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise", + "author": { + "name": "Vitaly Tomilov", + "email": "vitaly.tomilov@gmail.com" + }, + "bugs": { + "url": "https://github.com/vitaly-t/assert-options/issues", + "email": "vitaly.tomilov@gmail.com" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Generic options parameter handling.", + "devDependencies": { + "@types/chai": "4.2.14", + "@types/mocha": "8.2.0", + "@types/node": "14.14.14", + "chai": "4.2.0", + "coveralls": "3.1.0", + "mocha": "8.2.1", + "mocha-lcov-reporter": "1.3.0", + "nyc": "15.1.0", + "ts-node": "9.1.1", + "tslint": "6.1.3", + "typescript": "4.1.3" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "dist/src", + "dist/index.js" + ], + "homepage": "https://github.com/vitaly-t/assert-options", + "keywords": [ + "assert", + "options" + ], + "license": "MIT", + "main": "dist/src/index.js", + "name": "assert-options", + "repository": { + "type": "git", + "url": "git+https://github.com/vitaly-t/assert-options.git" + }, + "scripts": { + "all": "tsc && npm test && npm run lint", + "lint": "tslint --fix ./src/**/*.ts ./test/**/*.ts", + "test": "nyc mocha -r ts-node/register test/**/*.spec.ts", + "travis": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "types": "dist/src/index.d.ts", + "version": "0.7.0" +} diff --git a/server/node_modules/axios/CHANGELOG.md b/server/node_modules/axios/CHANGELOG.md old mode 100755 new mode 100644 index 4affca5..6f11ac1 --- a/server/node_modules/axios/CHANGELOG.md +++ b/server/node_modules/axios/CHANGELOG.md @@ -1,5 +1,277 @@ # Changelog +### 0.21.1 (December 21, 2020) + +Fixes and Functionality: + +- Hotfix: Prevent SSRF (#3410) +- Protocol not parsed when setting proxy config from env vars (#3070) +- Updating axios in types to be lower case (#2797) +- Adding a type guard for `AxiosError` (#2949) + +Internal and Tests: + +- Remove the skipping of the `socket` http test (#3364) +- Use different socket for Win32 test (#3375) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- Daniel Lopretto +- Jason Kwok +- Jay +- Jonathan Foster +- Remco Haszing +- Xianming Zhong + +### 0.21.0 (October 23, 2020) + +Fixes and Functionality: + +- Fixing requestHeaders.Authorization ([#3287](https://github.com/axios/axios/pull/3287)) +- Fixing node types ([#3237](https://github.com/axios/axios/pull/3237)) +- Fixing axios.delete ignores config.data ([#3282](https://github.com/axios/axios/pull/3282)) +- Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" ([#3289](https://github.com/axios/axios/pull/3289)) +- Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled ([#3200](https://github.com/axios/axios/pull/3200)) + +Internal and Tests: + +- Lock travis to not use node v15 ([#3361](https://github.com/axios/axios/pull/3361)) + +Documentation: + +- Fixing simple typo, existant -> existent ([#3252](https://github.com/axios/axios/pull/3252)) +- Fixing typos ([#3309](https://github.com/axios/axios/pull/3309)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- Allan Cruz <57270969+Allanbcruz@users.noreply.github.com> +- George Cheng +- Jay +- Kevin Kirsche +- Remco Haszing +- Taemin Shin +- Tim Gates +- Xianming Zhong + +### 0.20.0 (August 20, 2020) + +Release of 0.20.0-pre as a full release with no other changes. + +### 0.20.0-pre (July 15, 2020) + +Fixes and Functionality: + +- Fixing response with utf-8 BOM can not parse to json ([#2419](https://github.com/axios/axios/pull/2419)) + - fix: remove byte order marker (UTF-8 BOM) when transform response + - fix: remove BOM only utf-8 + - test: utf-8 BOM + - fix: incorrect param name +- Refactor mergeConfig without utils.deepMerge ([#2844](https://github.com/axios/axios/pull/2844)) + - Adding failing test + - Fixing #2587 default custom config persisting + - Adding Concat keys and filter duplicates + - Fixed value from CPE + - update for review feedbacks + - no deepMerge + - only merge between plain objects + - fix rename + - always merge config by mergeConfig + - extract function mergeDeepProperties + - refactor mergeConfig with all keys, and add special logic for validateStatus + - add test for resetting headers + - add lots of tests and fix a bug + - should not inherit `data` + - use simple toString +- Fixing overwrite Blob/File type as Content-Type in browser. ([#1773](https://github.com/axios/axios/pull/1773)) +- Fixing an issue that type 'null' is not assignable to validateStatus ([#2773](https://github.com/axios/axios/pull/2773)) +- Fixing special char encoding ([#1671](https://github.com/axios/axios/pull/1671)) + - removing @ character from replacement list since it is a reserved character + - Updating buildURL test to not include the @ character + - Removing console logs +- Fixing password encoding with special characters in basic authentication ([#1492](https://github.com/axios/axios/pull/1492)) + - Fixing password encoding with special characters in basic authentication + - Adding test to check if password with non-Latin1 characters pass +- Fixing 'Network Error' in react native android ([#1487](https://github.com/axios/axios/pull/1487)) + There is a bug in react native Android platform when using get method. It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the requestData is an empty string we can set it to null as well to fix the bug. +- Fixing Cookie Helper with Asyc Components ([#1105](https://github.com/axios/axios/pull/1105)) ([#1107](https://github.com/axios/axios/pull/1107)) +- Fixing 'progressEvent' type ([#2851](https://github.com/axios/axios/pull/2851)) + - Fix 'progressEvent' type + - Update axios.ts +- Fixing getting local files (file://) failed ([#2470](https://github.com/axios/axios/pull/2470)) + - fix issue #2416, #2396 + - fix Eslint warn + - Modify judgment conditions + - add unit test + - update unit test + - update unit test +- Allow PURGE method in typings ([#2191](https://github.com/axios/axios/pull/2191)) +- Adding option to disable automatic decompression ([#2661](https://github.com/axios/axios/pull/2661)) + - Adding ability to disable auto decompression + - Updating decompress documentation in README + - Fixing test\unit\adapters\http.js lint errors + - Adding test for disabling auto decompression + - Removing changes that fixed lint errors in tests + - Removing formatting change to unit test +- Add independent `maxBodyLength` option ([#2781](https://github.com/axios/axios/pull/2781)) + - Add independent option to set the maximum size of the request body + - Remove maxBodyLength check + - Update README + - Assert for error code and message +- Adding responseEncoding to mergeConfig ([#1745](https://github.com/axios/axios/pull/1745)) +- Compatible with follow-redirect aborts the request ([#2689](https://github.com/axios/axios/pull/2689)) + - Compatible with follow-redirect aborts the request + - Use the error code +- Fix merging of params ([#2656](https://github.com/axios/axios/pull/2656)) + - Name function to avoid ESLint func-names warning + - Switch params config to merge list and update tests + - Restore testing of both false and null + - Restore test cases for keys without defaults + - Include test for non-object values that aren't false-y. +- Revert `finally` as `then` ([#2683](https://github.com/axios/axios/pull/2683)) + +Internal and Tests: + +- Fix stale bot config ([#3049](https://github.com/axios/axios/pull/3049)) + - fix stale bot config + - fix multiple lines +- Add days and change name to work ([#3035](https://github.com/axios/axios/pull/3035)) +- Update close-issues.yml ([#3031](https://github.com/axios/axios/pull/3031)) + - Update close-issues.yml + Update close message to read better 😄 + - Fix use of quotations + Use single quotes as per other .yml files + - Remove user name form message +- Add GitHub actions to close stale issues/prs ([#3029](https://github.com/axios/axios/pull/3029)) + - prepare stale actions + - update messages + - Add exempt labels and lighten up comments +- Add GitHub actions to close invalid issues ([#3022](https://github.com/axios/axios/pull/3022)) + - add close actions + - fix with checkout + - update issue templates + - add reminder + - update close message +- Add test with Node.js 12 ([#2860](https://github.com/axios/axios/pull/2860)) + - test with Node.js 12 + - test with latest +- Adding console log on sandbox server startup ([#2210](https://github.com/axios/axios/pull/2210)) + - Adding console log on sandbox server startup + - Update server.js + Add server error handling + - Update server.js + Better error message, remove retry. +- Adding tests for method `options` type definitions ([#1996](https://github.com/axios/axios/pull/1996)) + Update tests. +- Add test for redirecting with too large response ([#2695](https://github.com/axios/axios/pull/2695)) +- Fixing unit test failure in Windows OS ([#2601](https://github.com/axios/axios/pull/2601)) +- Fixing issue for HEAD method and gzipped response ([#2666](https://github.com/axios/axios/pull/2666)) +- Fix tests in browsers ([#2748](https://github.com/axios/axios/pull/2748)) +- chore: add `jsdelivr` and `unpkg` support ([#2443](https://github.com/axios/axios/pull/2443)) + +Documentation: + +- Adding support for URLSearchParams in node ([#1900](https://github.com/axios/axios/pull/1900)) + - Adding support for URLSearchParams in node + - Remove un-needed code + - Update utils.js + - Make changes as suggested +- Adding table of content (preview) ([#3050](https://github.com/axios/axios/pull/3050)) + - add toc (preview) + - remove toc in toc + Signed-off-by: Moni + - fix sublinks + - fix indentation + - remove redundant table links + - update caps and indent + - remove axios +- Replace 'blacklist' with 'blocklist' ([#3006](https://github.com/axios/axios/pull/3006)) +- docs(): Detailed config options environment. ([#2088](https://github.com/axios/axios/pull/2088)) + - docs(): Detailed config options environment. + - Update README.md +- Include axios-data-unpacker in ECOSYSTEM.md ([#2080](https://github.com/axios/axios/pull/2080)) +- Allow opening examples in Gitpod ([#1958](https://github.com/axios/axios/pull/1958)) +- Remove axios.all() and axios.spread() from Readme.md ([#2727](https://github.com/axios/axios/pull/2727)) + - remove axios.all(), axios.spread() + - replace example + - axios.all() -> Promise.all() + - axios.spread(function (acct, perms)) -> function (acct, perms) + - add deprecated mark +- Update README.md ([#2887](https://github.com/axios/axios/pull/2887)) + Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE. +- Include swagger-taxos-codegen in ECOSYSTEM.md ([#2162](https://github.com/axios/axios/pull/2162)) +- Add CDNJS version badge in README.md ([#878](https://github.com/axios/axios/pull/878)) + This badge will show the version on CDNJS! +- Documentation update to clear up ambiguity in code examples ([#2928](https://github.com/axios/axios/pull/2928)) + - Made an adjustment to the documentation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side. +- Update README.md about validateStatus ([#2912](https://github.com/axios/axios/pull/2912)) + Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500" +- Updating documentation for usage form-data ([#2805](https://github.com/axios/axios/pull/2805)) + Closes #2049 +- Fixing CHANGELOG.md issue link ([#2784](https://github.com/axios/axios/pull/2784)) +- Include axios-hooks in ECOSYSTEM.md ([#2003](https://github.com/axios/axios/pull/2003)) +- Added Response header access instructions ([#1901](https://github.com/axios/axios/pull/1901)) + - Added Response header access instructions + - Added note about using bracket notation +- Add `onUploadProgress` and `onDownloadProgress` are browser only ([#2763](https://github.com/axios/axios/pull/2763)) + Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README. +- Update ' sign to ` in proxy spec ([#2778](https://github.com/axios/axios/pull/2778)) +- Adding jsDelivr link in README ([#1110](https://github.com/axios/axios/pull/1110)) + - Adding jsDelivr link + - Add SRI + - Remove SRI + +Huge thanks to everyone who contributed to this release via code (authors listed +below) or via reviews and triaging on GitHub: + +- Alan Wang +- Alexandru Ungureanu +- Anubhav Srivastava +- Benny Neugebauer +- Cr <631807682@qq.com> +- David +- David Ko +- David Tanner +- Emily Morehouse +- Felipe Martins +- Fonger <5862369+Fonger@users.noreply.github.com> +- Frostack +- George Cheng +- grumblerchester +- Gustavo López +- hexaez <45806662+hexaez@users.noreply.github.com> +- huangzuizui +- Ian Wijma +- Jay +- jeffjing +- jennynju <46782518+jennynju@users.noreply.github.com> +- Jimmy Liao <52391190+jimmy-liao-gogoro@users.noreply.github.com> +- Jonathan Sharpe +- JounQin +- Justin Beckwith +- Kamil Posiadała <3dcreator.pl@gmail.com> +- Lukas Drgon +- marcinx +- Martti Laine +- Michał Zarach +- Moni +- Motonori Iwata <121048+iwata@users.noreply.github.com> +- Nikita Galkin +- Petr Mares +- Philippe Recto +- Remco Haszing +- rockcs1992 +- Ryan Bown +- Samina Fu +- Simone Busoli +- Spencer von der Ohe +- Sven Efftinge +- Taegyeoung Oh +- Taemin Shin +- Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com> +- Xianming Zhong +- Yasu Flores +- Zac Delventhal + ### 0.19.2 (Jan 20, 2020) - Remove unnecessary XSS check ([#2679](https://github.com/axios/axios/pull/2679)) (see ([#2646](https://github.com/axios/axios/issues/2646)) for discussion) @@ -25,7 +297,7 @@ Fixes and Functionality: - Add error toJSON example ([#2466](https://github.com/axios/axios/pull/2466)) - Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ([#2451](https://github.com/axios/axios/pull/2451)) - Fixing subdomain handling on no_proxy ([#2442](https://github.com/axios/axios/pull/2442)) -- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426] and ([#2547](https://github.com/axios/axios/pull/2547)) +- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426)) and ([#2547](https://github.com/axios/axios/pull/2547)) - Add toJSON property to AxiosError type ([#2427](https://github.com/axios/axios/pull/2427)) - Fixing socket hang up error on node side for slow response. ([#1752](https://github.com/axios/axios/pull/1752)) - Alternative syntax to send data into the body ([#2317](https://github.com/axios/axios/pull/2317)) @@ -57,7 +329,7 @@ Documentation: - Update response interceptor docs ([#2399](https://github.com/axios/axios/pull/2399)) - Update README.md ([#2504](https://github.com/axios/axios/pull/2504)) - Fix word 'sintaxe' to 'syntax' in README.md ([#2432](https://github.com/axios/axios/pull/2432)) -- upadating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256)) +- updating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256)) - Fix grammar in README.md ([#2271](https://github.com/axios/axios/pull/2271)) - Doc fixes, minor examples cleanup ([#2198](https://github.com/axios/axios/pull/2198)) @@ -110,7 +382,7 @@ New Functionality: - Add getUri method ([#1712](https://github.com/axios/axios/issues/1712)) - Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693)) -- Add toJSON to decorated Axios errors to faciliate serialization ([#1625](https://github.com/axios/axios/issues/1625)) +- Add toJSON to decorated Axios errors to facilitate serialization ([#1625](https://github.com/axios/axios/issues/1625)) - Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623)) - Typings: allow custom return types - Add option to specify character set in responses (with http adapter) diff --git a/server/node_modules/axios/LICENSE b/server/node_modules/axios/LICENSE old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/README.md b/server/node_modules/axios/README.md index 0b09254..44264f6 100755 --- a/server/node_modules/axios/README.md +++ b/server/node_modules/axios/README.md @@ -1,6 +1,7 @@ # axios [![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) +[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios) [![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios) [![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios) [![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios) @@ -9,6 +10,37 @@ [![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) Promise based HTTP client for the browser and node.js +## Table of Contents + + - [Features](#features) + - [Browser Support](#browser-support) + - [Installing](#installing) + - [Example](#example) + - [Axios API](#axios-api) + - [Request method aliases](#request-method-aliases) + - [Concurrency (Deprecated)](#concurrency-deprecated) + - [Creating an instance](#creating-an-instance) + - [Instance methods](#instance-methods) + - [Request Config](#request-config) + - [Response Schema](#response-schema) + - [Config Defaults](#config-defaults) + - [Global axios defaults](#global-axios-defaults) + - [Custom instance defaults](#custom-instance-defaults) + - [Config order of precedence](#config-order-of-precedence) + - [Interceptors](#interceptors) + - [Handling Errors](#handling-errors) + - [Cancellation](#cancellation) + - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format) + - [Browser](#browser) + - [Node.js](#nodejs) + - [Query string](#query-string) + - [Form data](#form-data) + - [Semver](#semver) + - [Promises](#promises) + - [TypeScript](#typescript) + - [Resources](#resources) + - [Credits](#credits) + - [License](#license) ## Features @@ -49,7 +81,13 @@ Using yarn: $ yarn add axios ``` -Using cdn: +Using jsDelivr CDN: + +```html + +``` + +Using unpkg CDN: ```html @@ -81,7 +119,7 @@ axios.get('/user?ID=12345') // handle error console.log(error); }) - .finally(function () { + .then(function () { // always executed }); @@ -97,7 +135,7 @@ axios.get('/user', { .catch(function (error) { console.log(error); }) - .finally(function () { + .then(function () { // always executed }); @@ -141,10 +179,11 @@ function getUserPermissions() { return axios.get('/user/12345/permissions'); } -axios.all([getUserAccount(), getUserPermissions()]) - .then(axios.spread(function (acct, perms) { - // Both requests are now complete - })); +Promise.all([getUserAccount(), getUserPermissions()]) + .then(function (results) { + const acct = results[0]; + const perm = results[1]; + }); ``` ## axios API @@ -166,7 +205,7 @@ axios({ ``` ```js -// GET request for remote image +// GET request for remote image in node.js axios({ method: 'get', url: 'http://bit.ly/2mTM3nY', @@ -200,12 +239,13 @@ For convenience aliases have been provided for all supported request methods. ###### NOTE When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. -### Concurrency +### Concurrency (Deprecated) +Please use `Promise.all` to replace the below functions. Helper functions for dealing with concurrent requests. -##### axios.all(iterable) -##### axios.spread(callback) +axios.all(iterable) +axios.spread(callback) ### Creating an instance @@ -287,7 +327,7 @@ These are the available config options for making requests. Only the `url` is re }, // `data` is the data to be sent as the request body - // Only applicable for request methods 'PUT', 'POST', and 'PATCH' + // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH' // When no `transformRequest` is set, must be of one of the following types: // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams // - Browser only: FormData, File, Blob @@ -330,7 +370,7 @@ These are the available config options for making requests. Only the `url` is re // browser only: 'blob' responseType: 'json', // default - // `responseEncoding` indicates encoding to use for decoding responses + // `responseEncoding` indicates encoding to use for decoding responses (Node.js only) // Note: Ignored for `responseType` of 'stream' or client-side requests responseEncoding: 'utf8', // default @@ -341,18 +381,23 @@ These are the available config options for making requests. Only the `url` is re xsrfHeaderName: 'X-XSRF-TOKEN', // default // `onUploadProgress` allows handling of progress events for uploads + // browser only onUploadProgress: function (progressEvent) { // Do whatever you want with the native progress event }, // `onDownloadProgress` allows handling of progress events for downloads + // browser only onDownloadProgress: function (progressEvent) { // Do whatever you want with the native progress event }, - // `maxContentLength` defines the max size of the http response content in bytes allowed + // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js maxContentLength: 2000, + // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed + maxBodyLength: 2000, + // `validateStatus` defines whether to resolve or reject the promise for a given // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` // or `undefined`), the promise will be resolved; otherwise, the promise will be @@ -377,7 +422,7 @@ These are the available config options for making requests. Only the `url` is re httpAgent: new http.Agent({ keepAlive: true }), httpsAgent: new https.Agent({ keepAlive: true }), - // 'proxy' defines the hostname and port of the proxy server. + // `proxy` defines the hostname, port, and protocol of the proxy server. // You can also define your proxy using the conventional `http_proxy` and // `https_proxy` environment variables. If you are using environment variables // for your proxy configuration, you can also define a `no_proxy` environment @@ -387,7 +432,9 @@ These are the available config options for making requests. Only the `url` is re // supplies credentials. // This will set an `Proxy-Authorization` header, overwriting any existing // `Proxy-Authorization` custom headers you have set using `headers`. + // If the proxy server uses HTTPS, then you must set the protocol to `https`. proxy: { + protocol: 'https', host: '127.0.0.1', port: 9000, auth: { @@ -399,7 +446,14 @@ These are the available config options for making requests. Only the `url` is re // `cancelToken` specifies a cancel token that can be used to cancel the request // (see Cancellation section below for details) cancelToken: new CancelToken(function (cancel) { - }) + }), + + // `decompress` indicates whether or not the response body should be decompressed + // automatically. If set to `true` will also remove the 'content-encoding' header + // from the responses objects of all decompressed responses + // - Node only (XHR cannot turn off decompression) + decompress: true // default + } ``` @@ -418,8 +472,9 @@ The response for a request contains the following information. // `statusText` is the HTTP status message from the server response statusText: 'OK', - // `headers` the headers that the server responded with - // All header names are lower cased + // `headers` the HTTP headers that the server responded with + // All header names are lower cased and can be accessed using the bracket notation. + // Example: `response.headers['content-type']` headers: {}, // `config` is the config that was provided to `axios` for the request @@ -559,7 +614,7 @@ Using the `validateStatus` config option, you can define HTTP code(s) that shoul ```js axios.get('/user/12345', { validateStatus: function (status) { - return status < 500; // Reject only if the status code is greater than or equal to 500 + return status < 500; // Resolve only if the status code is less than 500 } }) ``` @@ -664,6 +719,8 @@ axios(options); ### Node.js +#### Query string + In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows: ```js @@ -671,11 +728,45 @@ const querystring = require('querystring'); axios.post('http://something.com/', querystring.stringify({ foo: 'bar' })); ``` +or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows: + +```js +const url = require('url'); +const params = new url.URLSearchParams({ foo: 'bar' }); +axios.post('http://something.com/', params.toString()); +``` + You can also use the [`qs`](https://github.com/ljharb/qs) library. ###### NOTE The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665). +#### Form data + +In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows: + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); + +axios.post('https://example.com', form, { headers: form.getHeaders() }) +``` + +Alternatively, use an interceptor: + +```js +axios.interceptors.request.use(config => { + if (config.data instanceof FormData) { + Object.assign(config.headers, config.data.getHeaders()); + } + return config; +}); +``` + ## Semver Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes. diff --git a/server/node_modules/axios/UPGRADE_GUIDE.md b/server/node_modules/axios/UPGRADE_GUIDE.md old mode 100755 new mode 100644 index eedb049..745e804 --- a/server/node_modules/axios/UPGRADE_GUIDE.md +++ b/server/node_modules/axios/UPGRADE_GUIDE.md @@ -135,7 +135,7 @@ This will polyfill the global environment, and only needs to be done once. #### `axios.success`/`axios.error` -The `success`, and `error` aliases were deprectated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. +The `success`, and `error` aliases were deprecated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. ```js axios.get('some/url') diff --git a/server/node_modules/axios/dist/axios.js b/server/node_modules/axios/dist/axios.js old mode 100755 new mode 100644 index d9c0c71..6dd94bd --- a/server/node_modules/axios/dist/axios.js +++ b/server/node_modules/axios/dist/axios.js @@ -1,4 +1,4 @@ -/* axios v0.19.2 | (c) 2020 by Matt Zabriskie */ +/* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); @@ -110,6 +110,9 @@ return /******/ (function(modules) { // webpackBootstrap }; axios.spread = __webpack_require__(25); + // Expose isAxiosError + axios.isAxiosError = __webpack_require__(26); + module.exports = axios; // Allow use of default import syntax in TypeScript @@ -227,6 +230,21 @@ return /******/ (function(modules) { // webpackBootstrap return val !== null && typeof val === 'object'; } + /** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ + function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; + } + /** * Determine if a value is a Date * @@ -383,34 +401,12 @@ return /******/ (function(modules) { // webpackBootstrap function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { + if (isPlainObject(result[key]) && isPlainObject(val)) { result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; - } - - /** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ - function deepMerge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val); - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); } else { result[key] = val; } @@ -441,6 +437,19 @@ return /******/ (function(modules) { // webpackBootstrap return a; } + /** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ + function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; + } + module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, @@ -450,6 +459,7 @@ return /******/ (function(modules) { // webpackBootstrap isString: isString, isNumber: isNumber, isObject: isObject, + isPlainObject: isPlainObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, @@ -460,9 +470,9 @@ return /******/ (function(modules) { // webpackBootstrap isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, - deepMerge: deepMerge, extend: extend, - trim: trim + trim: trim, + stripBOM: stripBOM }; @@ -562,9 +572,10 @@ return /******/ (function(modules) { // webpackBootstrap utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { - return this.request(utils.merge(config || {}, { + return this.request(mergeConfig(config || {}, { method: method, - url: url + url: url, + data: (config || {}).data })); }; }); @@ -572,7 +583,7 @@ return /******/ (function(modules) { // webpackBootstrap utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, data, config) { - return this.request(utils.merge(config || {}, { + return this.request(mergeConfig(config || {}, { method: method, url: url, data: data @@ -593,7 +604,6 @@ return /******/ (function(modules) { // webpackBootstrap function encode(val) { return encodeURIComponent(val). - replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). @@ -920,6 +930,7 @@ return /******/ (function(modules) { // webpackBootstrap xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, + maxBodyLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; @@ -969,10 +980,11 @@ return /******/ (function(modules) { // webpackBootstrap var utils = __webpack_require__(2); var settle = __webpack_require__(13); + var cookies = __webpack_require__(16); var buildURL = __webpack_require__(5); - var buildFullPath = __webpack_require__(16); - var parseHeaders = __webpack_require__(19); - var isURLSameOrigin = __webpack_require__(20); + var buildFullPath = __webpack_require__(17); + var parseHeaders = __webpack_require__(20); + var isURLSameOrigin = __webpack_require__(21); var createError = __webpack_require__(14); module.exports = function xhrAdapter(config) { @@ -989,7 +1001,7 @@ return /******/ (function(modules) { // webpackBootstrap // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; - var password = config.auth.password || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } @@ -1070,8 +1082,6 @@ return /******/ (function(modules) { // webpackBootstrap // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(21); - // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : @@ -1137,7 +1147,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - if (requestData === undefined) { + if (!requestData) { requestData = null; } @@ -1164,7 +1174,7 @@ return /******/ (function(modules) { // webpackBootstrap */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; - if (!validateStatus || validateStatus(response.status)) { + if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( @@ -1228,7 +1238,7 @@ return /******/ (function(modules) { // webpackBootstrap error.response = response; error.isAxiosError = true; - error.toJSON = function() { + error.toJSON = function toJSON() { return { // Standard message: this.message, @@ -1256,8 +1266,67 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var isAbsoluteURL = __webpack_require__(17); - var combineURLs = __webpack_require__(18); + var utils = __webpack_require__(2); + + module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() + ); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var isAbsoluteURL = __webpack_require__(18); + var combineURLs = __webpack_require__(19); /** * Creates a new URL by combining the baseURL with the requestedURL, @@ -1277,7 +1346,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports) { 'use strict'; @@ -1297,7 +1366,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports) { 'use strict'; @@ -1317,7 +1386,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -1376,7 +1445,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -1449,65 +1518,6 @@ return /******/ (function(modules) { // webpackBootstrap ); -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() - ); - - /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { @@ -1529,59 +1539,73 @@ return /******/ (function(modules) { // webpackBootstrap config2 = config2 || {}; var config = {}; - var valueFromConfig2Keys = ['url', 'method', 'params', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy']; + var valueFromConfig2Keys = ['url', 'method', 'data']; + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; var defaultToConfig2Keys = [ - 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', - 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath' + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', + 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', + 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' ]; + var directMergeKeys = ['validateStatus']; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); + } + } utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); } }); - utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) { - if (utils.isObject(config2[prop])) { - config[prop] = utils.deepMerge(config1[prop], config2[prop]); - } else if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (utils.isObject(config1[prop])) { - config[prop] = utils.deepMerge(config1[prop]); - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; + utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); + + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); } }); - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; + utils.forEach(directMergeKeys, function merge(prop) { + if (prop in config2) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + config[prop] = getMergedValue(undefined, config1[prop]); } }); var axiosKeys = valueFromConfig2Keys .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys); + .concat(defaultToConfig2Keys) + .concat(directMergeKeys); var otherKeys = Object - .keys(config2) + .keys(config1) + .concat(Object.keys(config2)) .filter(function filterAxiosKeys(key) { return axiosKeys.indexOf(key) === -1; }); - utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); + utils.forEach(otherKeys, mergeDeepProperties); return config; }; @@ -1708,6 +1732,23 @@ return /******/ (function(modules) { // webpackBootstrap }; +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ + module.exports = function isAxiosError(payload) { + return (typeof payload === 'object') && (payload.isAxiosError === true); + }; + + /***/ }) /******/ ]) }); diff --git a/server/node_modules/axios/dist/axios.map b/server/node_modules/axios/dist/axios.map old mode 100755 new mode 100644 index 4370129..6d61f7e --- a/server/node_modules/axios/dist/axios.map +++ b/server/node_modules/axios/dist/axios.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 18e5718d1c92e108675b","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACpDA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,iCAAgC;AAChC,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvVA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC7FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;AChGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;ACnLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACxEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 18e5718d1c92e108675b","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 16\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n var defaultToConfig2Keys = [\n 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath'\n ];\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys);\n\n var otherKeys = Object\n .keys(config2)\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 0ad9e9f79033ec4fb28f","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js","webpack:///./lib/helpers/isAxiosError.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACvDA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,6BAA4B;AAC5B,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9VA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,0BAAyB;AACzB,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC9FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACrEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;ACjGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;AClLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,4BAA2B;AAC3B,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;;;;;;ACtFA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;;AAEA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0ad9e9f79033ec4fb28f","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAxiosError.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/server/node_modules/axios/dist/axios.min.js b/server/node_modules/axios/dist/axios.min.js old mode 100755 new mode 100644 index b87c0e3..fc6c8b6 --- a/server/node_modules/axios/dist/axios.min.js +++ b/server/node_modules/axios/dist/axios.min.js @@ -1,3 +1,3 @@ -/* axios v0.19.2 | (c) 2020 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(4),a=n(22),u=n(10),c=r(u);c.Axios=s,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===j.call(e)}function o(e){return"undefined"==typeof e}function i(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function s(e){return"[object ArrayBuffer]"===j.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){return"[object Date]"===j.call(e)}function l(e){return"[object File]"===j.call(e)}function h(e){return"[object Blob]"===j.call(e)}function m(e){return"[object Function]"===j.call(e)}function y(e){return p(e)&&m(e.pipe)}function g(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function v(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function w(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){u.headers[e]={}}),i.forEach(["post","put","patch"],function(e){u.headers[e]=i.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),i=n(5),s=n(16),a=n(19),u=n(20),c=n(14);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";d.Authorization="Basic "+btoa(h+":"+m)}var y=s(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?a(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:l.status,statusText:l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onabort=function(){l&&(f(c("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){f(c("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),f(c(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(21),v=(e.withCredentials||u(y))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(17),o=n(18);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(i,function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(s,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])});var a=o.concat(i).concat(s),u=Object.keys(t).filter(function(e){return a.indexOf(e)===-1});return r.forEach(u,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); +/* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),c.isAxiosError=n(26),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"undefined"==typeof e}function s(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"[object ArrayBuffer]"===R.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==R.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Date]"===R.call(e)}function h(e){return"[object File]"===R.call(e)}function m(e){return"[object Blob]"===R.call(e)}function y(e){return"[object Function]"===R.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),s=n(16),i=n(5),a=n(17),u=n(20),c=n(21),f=n(14);e.exports=function(e){return new Promise(function(t,n){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:s,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,n,i),l=null}},l.onabort=function(){l&&(n(f("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(f("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),n(e),l=null)}),p||(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(18),o=n(19);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(e[o],t[o])}t=t||{};var s={},i=["url","method","data"],a=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];r.forEach(i,function(e){r.isUndefined(t[e])||(s[e]=n(void 0,t[e]))}),r.forEach(a,o),r.forEach(u,function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(void 0,t[o])}),r.forEach(c,function(r){r in t?s[r]=n(e[r],t[r]):r in e&&(s[r]=n(void 0,e[r]))});var f=i.concat(a).concat(u).concat(c),p=Object.keys(e).concat(Object.keys(t)).filter(function(e){return f.indexOf(e)===-1});return r.forEach(p,o),s}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&e.isAxiosError===!0}}])}); //# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/server/node_modules/axios/dist/axios.min.map b/server/node_modules/axios/dist/axios.min.map old mode 100755 new mode 100644 index 82849cc..a897631 --- a/server/node_modules/axios/dist/axios.min.map +++ b/server/node_modules/axios/dist/axios.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap be8c45a40d7c235b46c5","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","mergeConfig","defaults","axios","create","instanceConfig","Cancel","CancelToken","isCancel","all","promises","Promise","spread","default","isArray","val","toString","isUndefined","isBuffer","constructor","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","Object","hasOwnProperty","merge","assignValue","arguments","deepMerge","a","b","thisArg","args","Array","apply","interceptors","InterceptorManager","response","buildURL","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","getUri","params","paramsSerializer","data","encode","encodeURIComponent","serializedParams","parts","v","toISOString","JSON","stringify","join","hashmarkIndex","indexOf","slice","handlers","use","eject","h","throwIfCancellationRequested","cancelToken","throwIfRequested","transformData","headers","transformRequest","common","adapter","transformResponse","reason","reject","fns","value","__CANCEL__","setContentTypeIfUnset","getDefaultAdapter","XMLHttpRequest","process","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","status","Accept","normalizedName","name","toUpperCase","settle","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","password","Authorization","btoa","fullPath","baseURL","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onabort","onerror","ontimeout","timeoutErrorMessage","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","send","enhanceError","message","code","error","Error","isAxiosError","toJSON","description","number","fileName","lineNumber","columnNumber","stack","isAbsoluteURL","combineURLs","requestedURL","test","relativeURL","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","userAgent","createElement","location","requestURL","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","prop","axiosKeys","otherKeys","keys","filter","executor","TypeError","resolvePromise","token","source","callback","arr"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEtDjCL,EAAAD,QAAAM,EAAA,IF4DM,SAAUL,EAAQD,EAASM,GG5DjC,YAcA,SAAAS,GAAAC,GACA,GAAAC,GAAA,GAAAC,GAAAF,GACAG,EAAAC,EAAAF,EAAAG,UAAAC,QAAAL,EAQA,OALAM,GAAAC,OAAAL,EAAAD,EAAAG,UAAAJ,GAGAM,EAAAC,OAAAL,EAAAF,GAEAE,EAtBA,GAAAI,GAAAjB,EAAA,GACAc,EAAAd,EAAA,GACAY,EAAAZ,EAAA,GACAmB,EAAAnB,EAAA,IACAoB,EAAApB,EAAA,IAsBAqB,EAAAZ,EAAAW,EAGAC,GAAAT,QAGAS,EAAAC,OAAA,SAAAC,GACA,MAAAd,GAAAU,EAAAE,EAAAD,SAAAG,KAIAF,EAAAG,OAAAxB,EAAA,IACAqB,EAAAI,YAAAzB,EAAA,IACAqB,EAAAK,SAAA1B,EAAA,GAGAqB,EAAAM,IAAA,SAAAC,GACA,MAAAC,SAAAF,IAAAC,IAEAP,EAAAS,OAAA9B,EAAA,IAEAL,EAAAD,QAAA2B,EAGA1B,EAAAD,QAAAqC,QAAAV,GHmEM,SAAU1B,EAAQD,EAASM,GIvHjC,YAgBA,SAAAgC,GAAAC,GACA,yBAAAC,EAAA7B,KAAA4B,GASA,QAAAE,GAAAF,GACA,yBAAAA,GASA,QAAAG,GAAAH,GACA,cAAAA,IAAAE,EAAAF,IAAA,OAAAA,EAAAI,cAAAF,EAAAF,EAAAI,cACA,kBAAAJ,GAAAI,YAAAD,UAAAH,EAAAI,YAAAD,SAAAH,GASA,QAAAK,GAAAL,GACA,+BAAAC,EAAA7B,KAAA4B,GASA,QAAAM,GAAAN,GACA,yBAAAO,WAAAP,YAAAO,UASA,QAAAC,GAAAR,GACA,GAAAS,EAMA,OAJAA,GADA,mBAAAC,0BAAA,OACAA,YAAAC,OAAAX,GAEA,GAAAA,EAAA,QAAAA,EAAAY,iBAAAF,aAWA,QAAAG,GAAAb,GACA,sBAAAA,GASA,QAAAc,GAAAd,GACA,sBAAAA,GASA,QAAAe,GAAAf,GACA,cAAAA,GAAA,gBAAAA,GASA,QAAAgB,GAAAhB,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAiB,GAAAjB,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAkB,GAAAlB,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAmB,GAAAnB,GACA,4BAAAC,EAAA7B,KAAA4B,GASA,QAAAoB,GAAApB,GACA,MAAAe,GAAAf,IAAAmB,EAAAnB,EAAAqB,MASA,QAAAC,GAAAtB,GACA,yBAAAuB,kBAAAvB,YAAAuB,iBASA,QAAAC,GAAAC,GACA,MAAAA,GAAAC,QAAA,WAAAA,QAAA,WAkBA,QAAAC,KACA,0BAAAC,YAAA,gBAAAA,UAAAC,SACA,iBAAAD,UAAAC,SACA,OAAAD,UAAAC,WAIA,mBAAAC,SACA,mBAAAC,WAgBA,QAAAC,GAAAC,EAAAC,GAEA,UAAAD,GAAA,mBAAAA,GAUA,GALA,gBAAAA,KAEAA,OAGAlC,EAAAkC,GAEA,OAAAE,GAAA,EAAAC,EAAAH,EAAAI,OAAmCF,EAAAC,EAAOD,IAC1CD,EAAA9D,KAAA,KAAA6D,EAAAE,KAAAF,OAIA,QAAAK,KAAAL,GACAM,OAAAzD,UAAA0D,eAAApE,KAAA6D,EAAAK,IACAJ,EAAA9D,KAAA,KAAA6D,EAAAK,KAAAL,GAuBA,QAAAQ,KAEA,QAAAC,GAAA1C,EAAAsC,GACA,gBAAA7B,GAAA6B,IAAA,gBAAAtC,GACAS,EAAA6B,GAAAG,EAAAhC,EAAA6B,GAAAtC,GAEAS,EAAA6B,GAAAtC,EAIA,OATAS,MASA0B,EAAA,EAAAC,EAAAO,UAAAN,OAAuCF,EAAAC,EAAOD,IAC9CH,EAAAW,UAAAR,GAAAO,EAEA,OAAAjC,GAWA,QAAAmC,KAEA,QAAAF,GAAA1C,EAAAsC,GACA,gBAAA7B,GAAA6B,IAAA,gBAAAtC,GACAS,EAAA6B,GAAAM,EAAAnC,EAAA6B,GAAAtC,GACK,gBAAAA,GACLS,EAAA6B,GAAAM,KAAgC5C,GAEhCS,EAAA6B,GAAAtC,EAIA,OAXAS,MAWA0B,EAAA,EAAAC,EAAAO,UAAAN,OAAuCF,EAAAC,EAAOD,IAC9CH,EAAAW,UAAAR,GAAAO,EAEA,OAAAjC,GAWA,QAAAxB,GAAA4D,EAAAC,EAAAC,GAQA,MAPAf,GAAAc,EAAA,SAAA9C,EAAAsC,GACAS,GAAA,kBAAA/C,GACA6C,EAAAP,GAAAzD,EAAAmB,EAAA+C,GAEAF,EAAAP,GAAAtC,IAGA6C,EA5TA,GAAAhE,GAAAd,EAAA,GAMAkC,EAAAsC,OAAAzD,UAAAmB,QAyTAvC,GAAAD,SACAsC,UACAM,gBACAF,WACAG,aACAE,oBACAK,WACAC,WACAC,WACAb,cACAc,SACAC,SACAC,SACAC,aACAC,WACAE,oBACAK,uBACAK,UACAS,QACAG,YACA3D,SACAuC,SJ+HM,SAAU9D,EAAQD,GKrdxB,YAEAC,GAAAD,QAAA,SAAAyE,EAAAa,GACA,kBAEA,OADAC,GAAA,GAAAC,OAAAN,UAAAN,QACAF,EAAA,EAAmBA,EAAAa,EAAAX,OAAiBF,IACpCa,EAAAb,GAAAQ,UAAAR,EAEA,OAAAD,GAAAgB,MAAAH,EAAAC,ML8dM,SAAUtF,EAAQD,EAASM,GMtejC,YAaA,SAAAY,GAAAW,GACAzB,KAAAsB,SAAAG,EACAzB,KAAAsF,cACApE,QAAA,GAAAqE,GACAC,SAAA,GAAAD,IAfA,GAAApE,GAAAjB,EAAA,GACAuF,EAAAvF,EAAA,GACAqF,EAAArF,EAAA,GACAwF,EAAAxF,EAAA,GACAmB,EAAAnB,EAAA,GAoBAY,GAAAG,UAAAC,QAAA,SAAAyE,GAGA,gBAAAA,IACAA,EAAAb,UAAA,OACAa,EAAAC,IAAAd,UAAA,IAEAa,QAGAA,EAAAtE,EAAArB,KAAAsB,SAAAqE,GAGAA,EAAAE,OACAF,EAAAE,OAAAF,EAAAE,OAAAC,cACG9F,KAAAsB,SAAAuE,OACHF,EAAAE,OAAA7F,KAAAsB,SAAAuE,OAAAC,cAEAH,EAAAE,OAAA,KAIA,IAAAE,IAAAL,EAAAM,QACAC,EAAAlE,QAAAmE,QAAAP,EAUA,KARA3F,KAAAsF,aAAApE,QAAAiD,QAAA,SAAAgC,GACAJ,EAAAK,QAAAD,EAAAE,UAAAF,EAAAG,YAGAtG,KAAAsF,aAAAE,SAAArB,QAAA,SAAAgC,GACAJ,EAAAQ,KAAAJ,EAAAE,UAAAF,EAAAG,YAGAP,EAAAvB,QACAyB,IAAAO,KAAAT,EAAAU,QAAAV,EAAAU,QAGA,OAAAR,IAGAnF,EAAAG,UAAAyF,OAAA,SAAAf,GAEA,MADAA,GAAAtE,EAAArB,KAAAsB,SAAAqE,GACAF,EAAAE,EAAAC,IAAAD,EAAAgB,OAAAhB,EAAAiB,kBAAA/C,QAAA,WAIA1C,EAAAgD,SAAA,0CAAA0B,GAEA/E,EAAAG,UAAA4E,GAAA,SAAAD,EAAAD,GACA,MAAA3F,MAAAkB,QAAAC,EAAAyD,MAAAe,OACAE,SACAD,YAKAzE,EAAAgD,SAAA,+BAAA0B,GAEA/E,EAAAG,UAAA4E,GAAA,SAAAD,EAAAiB,EAAAlB,GACA,MAAA3F,MAAAkB,QAAAC,EAAAyD,MAAAe,OACAE,SACAD,MACAiB,aAKAhH,EAAAD,QAAAkB,GN6eM,SAAUjB,EAAQD,EAASM,GO1kBjC,YAIA,SAAA4G,GAAA3E,GACA,MAAA4E,oBAAA5E,GACA0B,QAAA,aACAA,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,aAVA,GAAA1C,GAAAjB,EAAA,EAoBAL,GAAAD,QAAA,SAAAgG,EAAAe,EAAAC,GAEA,IAAAD,EACA,MAAAf,EAGA,IAAAoB,EACA,IAAAJ,EACAI,EAAAJ,EAAAD,OACG,IAAAxF,EAAAsC,kBAAAkD,GACHK,EAAAL,EAAAvE,eACG,CACH,GAAA6E,KAEA9F,GAAAgD,QAAAwC,EAAA,SAAAxE,EAAAsC,GACA,OAAAtC,GAAA,mBAAAA,KAIAhB,EAAAe,QAAAC,GACAsC,GAAA,KAEAtC,MAGAhB,EAAAgD,QAAAhC,EAAA,SAAA+E,GACA/F,EAAAgC,OAAA+D,GACAA,IAAAC,cACShG,EAAA+B,SAAAgE,KACTA,EAAAE,KAAAC,UAAAH,IAEAD,EAAAV,KAAAO,EAAArC,GAAA,IAAAqC,EAAAI,SAIAF,EAAAC,EAAAK,KAAA,KAGA,GAAAN,EAAA,CACA,GAAAO,GAAA3B,EAAA4B,QAAA,IACAD,MAAA,IACA3B,IAAA6B,MAAA,EAAAF,IAGA3B,MAAA4B,QAAA,mBAAAR,EAGA,MAAApB,KPklBM,SAAU/F,EAAQD,EAASM,GQvpBjC,YAIA,SAAAqF,KACAvF,KAAA0H,YAHA,GAAAvG,GAAAjB,EAAA,EAcAqF,GAAAtE,UAAA0G,IAAA,SAAAtB,EAAAC,GAKA,MAJAtG,MAAA0H,SAAAnB,MACAF,YACAC,aAEAtG,KAAA0H,SAAAlD,OAAA,GAQAe,EAAAtE,UAAA2G,MAAA,SAAAvH,GACAL,KAAA0H,SAAArH,KACAL,KAAA0H,SAAArH,GAAA,OAYAkF,EAAAtE,UAAAkD,QAAA,SAAAE,GACAlD,EAAAgD,QAAAnE,KAAA0H,SAAA,SAAAG,GACA,OAAAA,GACAxD,EAAAwD,MAKAhI,EAAAD,QAAA2F,GR8pBM,SAAU1F,EAAQD,EAASM,GSjtBjC,YAUA,SAAA4H,GAAAnC,GACAA,EAAAoC,aACApC,EAAAoC,YAAAC,mBAVA,GAAA7G,GAAAjB,EAAA,GACA+H,EAAA/H,EAAA,GACA0B,EAAA1B,EAAA,GACAoB,EAAApB,EAAA,GAiBAL,GAAAD,QAAA,SAAA+F,GACAmC,EAAAnC,GAGAA,EAAAuC,QAAAvC,EAAAuC,YAGAvC,EAAAkB,KAAAoB,EACAtC,EAAAkB,KACAlB,EAAAuC,QACAvC,EAAAwC,kBAIAxC,EAAAuC,QAAA/G,EAAAyD,MACAe,EAAAuC,QAAAE,WACAzC,EAAAuC,QAAAvC,EAAAE,YACAF,EAAAuC,SAGA/G,EAAAgD,SACA,qDACA,SAAA0B,SACAF,GAAAuC,QAAArC,IAIA,IAAAwC,GAAA1C,EAAA0C,SAAA/G,EAAA+G,OAEA,OAAAA,GAAA1C,GAAAa,KAAA,SAAAhB,GAUA,MATAsC,GAAAnC,GAGAH,EAAAqB,KAAAoB,EACAzC,EAAAqB,KACArB,EAAA0C,QACAvC,EAAA2C,mBAGA9C,GACG,SAAA+C,GAcH,MAbA3G,GAAA2G,KACAT,EAAAnC,GAGA4C,KAAA/C,WACA+C,EAAA/C,SAAAqB,KAAAoB,EACAM,EAAA/C,SAAAqB,KACA0B,EAAA/C,SAAA0C,QACAvC,EAAA2C,qBAKAvG,QAAAyG,OAAAD,OT0tBM,SAAU1I,EAAQD,EAASM,GUtyBjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAAiH,EAAAqB,EAAAO,GAMA,MAJAtH,GAAAgD,QAAAsE,EAAA,SAAApE,GACAwC,EAAAxC,EAAAwC,EAAAqB,KAGArB,IV8yBM,SAAUhH,EAAQD,GWh0BxB,YAEAC,GAAAD,QAAA,SAAA8I,GACA,SAAAA,MAAAC,cXw0BM,SAAU9I,EAAQD,EAASM,GY30BjC,YASA,SAAA0I,GAAAV,EAAAQ,IACAvH,EAAAkB,YAAA6F,IAAA/G,EAAAkB,YAAA6F,EAAA,mBACAA,EAAA,gBAAAQ,GAIA,QAAAG,KACA,GAAAR,EAQA,OAPA,mBAAAS,gBAEAT,EAAAnI,EAAA,IACG,mBAAA6I,UAAA,qBAAArE,OAAAzD,UAAAmB,SAAA7B,KAAAwI,WAEHV,EAAAnI,EAAA,KAEAmI,EAtBA,GAAAlH,GAAAjB,EAAA,GACA8I,EAAA9I,EAAA,IAEA+I,GACAC,eAAA,qCAqBA5H,GACA+G,QAAAQ,IAEAV,kBAAA,SAAAtB,EAAAqB,GAGA,MAFAc,GAAAd,EAAA,UACAc,EAAAd,EAAA,gBACA/G,EAAAsB,WAAAoE,IACA1F,EAAAqB,cAAAqE,IACA1F,EAAAmB,SAAAuE,IACA1F,EAAAoC,SAAAsD,IACA1F,EAAAiC,OAAAyD,IACA1F,EAAAkC,OAAAwD,GAEAA,EAEA1F,EAAAwB,kBAAAkE,GACAA,EAAA9D,OAEA5B,EAAAsC,kBAAAoD,IACA+B,EAAAV,EAAA,mDACArB,EAAAzE,YAEAjB,EAAA+B,SAAA2D,IACA+B,EAAAV,EAAA,kCACAd,KAAAC,UAAAR,IAEAA,IAGAyB,mBAAA,SAAAzB,GAEA,mBAAAA,GACA,IACAA,EAAAO,KAAA+B,MAAAtC,GACO,MAAAuC,IAEP,MAAAvC,KAOAwC,QAAA,EAEAC,eAAA,aACAC,eAAA,eAEAC,kBAAA,EAEAC,eAAA,SAAAC,GACA,MAAAA,IAAA,KAAAA,EAAA,KAIApI,GAAA4G,SACAE,QACAuB,OAAA,sCAIAxI,EAAAgD,SAAA,gCAAA0B,GACAvE,EAAA4G,QAAArC,QAGA1E,EAAAgD,SAAA,+BAAA0B,GACAvE,EAAA4G,QAAArC,GAAA1E,EAAAyD,MAAAqE,KAGApJ,EAAAD,QAAA0B,GZk1BM,SAAUzB,EAAQD,EAASM,Gal7BjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QAAA,SAAAsI,EAAA0B,GACAzI,EAAAgD,QAAA+D,EAAA,SAAAQ,EAAAmB,GACAA,IAAAD,GAAAC,EAAAC,gBAAAF,EAAAE,gBACA5B,EAAA0B,GAAAlB,QACAR,GAAA2B,Qb47BM,SAAUhK,EAAQD,EAASM,Gcp8BjC,YAEA,IAAAiB,GAAAjB,EAAA,GACA6J,EAAA7J,EAAA,IACAuF,EAAAvF,EAAA,GACA8J,EAAA9J,EAAA,IACA+J,EAAA/J,EAAA,IACAgK,EAAAhK,EAAA,IACAiK,EAAAjK,EAAA,GAEAL,GAAAD,QAAA,SAAA+F,GACA,UAAA5D,SAAA,SAAAmE,EAAAsC,GACA,GAAA4B,GAAAzE,EAAAkB,KACAwD,EAAA1E,EAAAuC,OAEA/G,GAAAsB,WAAA2H,UACAC,GAAA,eAGA,IAAAnJ,GAAA,GAAA4H,eAGA,IAAAnD,EAAA2E,KAAA,CACA,GAAAC,GAAA5E,EAAA2E,KAAAC,UAAA,GACAC,EAAA7E,EAAA2E,KAAAE,UAAA,EACAH,GAAAI,cAAA,SAAAC,KAAAH,EAAA,IAAAC,GAGA,GAAAG,GAAAX,EAAArE,EAAAiF,QAAAjF,EAAAC,IA4EA,IA3EA1E,EAAA2J,KAAAlF,EAAAE,OAAAiE,cAAArE,EAAAkF,EAAAhF,EAAAgB,OAAAhB,EAAAiB,mBAAA,GAGA1F,EAAAmI,QAAA1D,EAAA0D,QAGAnI,EAAA4J,mBAAA,WACA,GAAA5J,GAAA,IAAAA,EAAA6J,aAQA,IAAA7J,EAAAwI,QAAAxI,EAAA8J,aAAA,IAAA9J,EAAA8J,YAAAxD,QAAA,WAKA,GAAAyD,GAAA,yBAAA/J,GAAA+I,EAAA/I,EAAAgK,yBAAA,KACAC,EAAAxF,EAAAyF,cAAA,SAAAzF,EAAAyF,aAAAlK,EAAAsE,SAAAtE,EAAAmK,aACA7F,GACAqB,KAAAsE,EACAzB,OAAAxI,EAAAwI,OACA4B,WAAApK,EAAAoK,WACApD,QAAA+C,EACAtF,SACAzE,UAGA6I,GAAA7D,EAAAsC,EAAAhD,GAGAtE,EAAA,OAIAA,EAAAqK,QAAA,WACArK,IAIAsH,EAAA2B,EAAA,kBAAAxE,EAAA,eAAAzE,IAGAA,EAAA,OAIAA,EAAAsK,QAAA,WAGAhD,EAAA2B,EAAA,gBAAAxE,EAAA,KAAAzE,IAGAA,EAAA,MAIAA,EAAAuK,UAAA,WACA,GAAAC,GAAA,cAAA/F,EAAA0D,QAAA,aACA1D,GAAA+F,sBACAA,EAAA/F,EAAA+F,qBAEAlD,EAAA2B,EAAAuB,EAAA/F,EAAA,eACAzE,IAGAA,EAAA,MAMAC,EAAA2C,uBAAA,CACA,GAAA6H,GAAAzL,EAAA,IAGA0L,GAAAjG,EAAAkG,iBAAA3B,EAAAS,KAAAhF,EAAA2D,eACAqC,EAAAG,KAAAnG,EAAA2D,gBACAtD,MAEA4F,KACAvB,EAAA1E,EAAA4D,gBAAAqC,GAuBA,GAlBA,oBAAA1K,IACAC,EAAAgD,QAAAkG,EAAA,SAAAlI,EAAAsC,GACA,mBAAA2F,IAAA,iBAAA3F,EAAAqB,oBAEAuE,GAAA5F,GAGAvD,EAAA6K,iBAAAtH,EAAAtC,KAMAhB,EAAAkB,YAAAsD,EAAAkG,mBACA3K,EAAA2K,kBAAAlG,EAAAkG,iBAIAlG,EAAAyF,aACA,IACAlK,EAAAkK,aAAAzF,EAAAyF,aACO,MAAAhC,GAGP,YAAAzD,EAAAyF,aACA,KAAAhC,GAMA,kBAAAzD,GAAAqG,oBACA9K,EAAA+K,iBAAA,WAAAtG,EAAAqG,oBAIA,kBAAArG,GAAAuG,kBAAAhL,EAAAiL,QACAjL,EAAAiL,OAAAF,iBAAA,WAAAtG,EAAAuG,kBAGAvG,EAAAoC,aAEApC,EAAAoC,YAAA9B,QAAAO,KAAA,SAAA4F,GACAlL,IAIAA,EAAAmL,QACA7D,EAAA4D,GAEAlL,EAAA,QAIA8E,SAAAoE,IACAA,EAAA,MAIAlJ,EAAAoL,KAAAlC,Od68BM,SAAUvK,EAAQD,EAASM,Ge9nCjC,YAEA,IAAAiK,GAAAjK,EAAA,GASAL,GAAAD,QAAA,SAAAsG,EAAAsC,EAAAhD,GACA,GAAAiE,GAAAjE,EAAAG,OAAA8D,gBACAA,KAAAjE,EAAAkE,QACAxD,EAAAV,GAEAgD,EAAA2B,EACA,mCAAA3E,EAAAkE,OACAlE,EAAAG,OACA,KACAH,EAAAtE,QACAsE,MfwoCM,SAAU3F,EAAQD,EAASM,GgB7pCjC,YAEA,IAAAqM,GAAArM,EAAA,GAYAL,GAAAD,QAAA,SAAA4M,EAAA7G,EAAA8G,EAAAvL,EAAAsE,GACA,GAAAkH,GAAA,GAAAC,OAAAH,EACA,OAAAD,GAAAG,EAAA/G,EAAA8G,EAAAvL,EAAAsE,KhBqqCM,SAAU3F,EAAQD,GiBrrCxB,YAYAC,GAAAD,QAAA,SAAA8M,EAAA/G,EAAA8G,EAAAvL,EAAAsE,GA4BA,MA3BAkH,GAAA/G,SACA8G,IACAC,EAAAD,QAGAC,EAAAxL,UACAwL,EAAAlH,WACAkH,EAAAE,cAAA,EAEAF,EAAAG,OAAA,WACA,OAEAL,QAAAxM,KAAAwM,QACA3C,KAAA7J,KAAA6J,KAEAiD,YAAA9M,KAAA8M,YACAC,OAAA/M,KAAA+M,OAEAC,SAAAhN,KAAAgN,SACAC,WAAAjN,KAAAiN,WACAC,aAAAlN,KAAAkN,aACAC,MAAAnN,KAAAmN,MAEAxH,OAAA3F,KAAA2F,OACA8G,KAAAzM,KAAAyM,OAGAC,IjB6rCM,SAAU7M,EAAQD,EAASM,GkBruCjC,YAEA,IAAAkN,GAAAlN,EAAA,IACAmN,EAAAnN,EAAA,GAWAL,GAAAD,QAAA,SAAAgL,EAAA0C,GACA,MAAA1C,KAAAwC,EAAAE,GACAD,EAAAzC,EAAA0C,GAEAA,IlB6uCM,SAAUzN,EAAQD,GmB/vCxB,YAQAC,GAAAD,QAAA,SAAAgG,GAIA,sCAAA2H,KAAA3H,KnBuwCM,SAAU/F,EAAQD,GoBnxCxB,YASAC,GAAAD,QAAA,SAAAgL,EAAA4C,GACA,MAAAA,GACA5C,EAAA/G,QAAA,eAAA2J,EAAA3J,QAAA,WACA+G,IpB2xCM,SAAU/K,EAAQD,EAASM,GqBvyCjC,YAEA,IAAAiB,GAAAjB,EAAA,GAIAuN,GACA,6DACA,kEACA,gEACA,qCAgBA5N,GAAAD,QAAA,SAAAsI,GACA,GACAzD,GACAtC,EACAmC,EAHAoJ,IAKA,OAAAxF,IAEA/G,EAAAgD,QAAA+D,EAAAyF,MAAA,eAAAC,GAKA,GAJAtJ,EAAAsJ,EAAApG,QAAA,KACA/C,EAAAtD,EAAAwC,KAAAiK,EAAAC,OAAA,EAAAvJ,IAAAwB,cACA3D,EAAAhB,EAAAwC,KAAAiK,EAAAC,OAAAvJ,EAAA,IAEAG,EAAA,CACA,GAAAiJ,EAAAjJ,IAAAgJ,EAAAjG,QAAA/C,IAAA,EACA,MAEA,gBAAAA,EACAiJ,EAAAjJ,IAAAiJ,EAAAjJ,GAAAiJ,EAAAjJ,OAAAqJ,QAAA3L,IAEAuL,EAAAjJ,GAAAiJ,EAAAjJ,GAAAiJ,EAAAjJ,GAAA,KAAAtC,OAKAuL,GAnBiBA,IrBk0CX,SAAU7N,EAAQD,EAASM,GsBl2CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAA2C,uBAIA,WAWA,QAAAiK,GAAAnI,GACA,GAAAoI,GAAApI,CAWA,OATAqI,KAEAC,EAAAC,aAAA,OAAAH,GACAA,EAAAE,EAAAF,MAGAE,EAAAC,aAAA,OAAAH,IAIAA,KAAAE,EAAAF,KACAI,SAAAF,EAAAE,SAAAF,EAAAE,SAAAvK,QAAA,YACAwK,KAAAH,EAAAG,KACAC,OAAAJ,EAAAI,OAAAJ,EAAAI,OAAAzK,QAAA,aACA0K,KAAAL,EAAAK,KAAAL,EAAAK,KAAA1K,QAAA,YACA2K,SAAAN,EAAAM,SACAC,KAAAP,EAAAO,KACAC,SAAA,MAAAR,EAAAQ,SAAAC,OAAA,GACAT,EAAAQ,SACA,IAAAR,EAAAQ,UAhCA,GAEAE,GAFAX,EAAA,kBAAAV,KAAAxJ,UAAA8K,WACAX,EAAAhK,SAAA4K,cAAA,IA2CA,OARAF,GAAAb,EAAA9J,OAAA8K,SAAAf,MAQA,SAAAgB,GACA,GAAAtB,GAAAvM,EAAA6B,SAAAgM,GAAAjB,EAAAiB,IACA,OAAAtB,GAAAU,WAAAQ,EAAAR,UACAV,EAAAW,OAAAO,EAAAP,SAKA,WACA,kBACA,ctB42CM,SAAUxO,EAAQD,EAASM,GuB56CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAA2C,uBAGA,WACA,OACAmL,MAAA,SAAApF,EAAAnB,EAAAwG,EAAAC,EAAAC,EAAAC,GACA,GAAAC,KACAA,GAAA/I,KAAAsD,EAAA,IAAA9C,mBAAA2B,IAEAvH,EAAA8B,SAAAiM,IACAI,EAAA/I,KAAA,cAAAgJ,MAAAL,GAAAM,eAGArO,EAAA6B,SAAAmM,IACAG,EAAA/I,KAAA,QAAA4I,GAGAhO,EAAA6B,SAAAoM,IACAE,EAAA/I,KAAA,UAAA6I,GAGAC,KAAA,GACAC,EAAA/I,KAAA,UAGArC,SAAAoL,SAAAhI,KAAA,OAGAwE,KAAA,SAAAjC,GACA,GAAA4F,GAAAvL,SAAAoL,OAAAG,MAAA,GAAAC,QAAA,aAA4D7F,EAAA,aAC5D,OAAA4F,GAAAE,mBAAAF,EAAA,UAGAG,OAAA,SAAA/F,GACA7J,KAAAiP,MAAApF,EAAA,GAAA0F,KAAAM,MAAA,YAMA,WACA,OACAZ,MAAA,aACAnD,KAAA,WAA+B,aAC/B8D,OAAA,kBvBs7CM,SAAU/P,EAAQD,EAASM,GwBv+CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAAkQ,EAAAC,GAEAA,OACA,IAAApK,MAEAqK,GAAA,gCACAC,GAAA,0BACAC,GACA,0EACA,sEACA,yDACA,+DACA,wCAGA/O,GAAAgD,QAAA6L,EAAA,SAAAG,GACA,mBAAAJ,GAAAI,KACAxK,EAAAwK,GAAAJ,EAAAI,MAIAhP,EAAAgD,QAAA8L,EAAA,SAAAE,GACAhP,EAAA+B,SAAA6M,EAAAI,IACAxK,EAAAwK,GAAAhP,EAAA4D,UAAA+K,EAAAK,GAAAJ,EAAAI,IACK,mBAAAJ,GAAAI,GACLxK,EAAAwK,GAAAJ,EAAAI,GACKhP,EAAA+B,SAAA4M,EAAAK,IACLxK,EAAAwK,GAAAhP,EAAA4D,UAAA+K,EAAAK,IACK,mBAAAL,GAAAK,KACLxK,EAAAwK,GAAAL,EAAAK,MAIAhP,EAAAgD,QAAA+L,EAAA,SAAAC,GACA,mBAAAJ,GAAAI,GACAxK,EAAAwK,GAAAJ,EAAAI,GACK,mBAAAL,GAAAK,KACLxK,EAAAwK,GAAAL,EAAAK,KAIA,IAAAC,GAAAJ,EACAlC,OAAAmC,GACAnC,OAAAoC,GAEAG,EAAA3L,OACA4L,KAAAP,GACAQ,OAAA,SAAA9L,GACA,MAAA2L,GAAA5I,QAAA/C,MAAA,GAWA,OARAtD,GAAAgD,QAAAkM,EAAA,SAAAF,GACA,mBAAAJ,GAAAI,GACAxK,EAAAwK,GAAAJ,EAAAI,GACK,mBAAAL,GAAAK,KACLxK,EAAAwK,GAAAL,EAAAK,MAIAxK,IxB++CM,SAAU9F,EAAQD,GyBtjDxB,YAQA,SAAA8B,GAAA8K,GACAxM,KAAAwM,UAGA9K,EAAAT,UAAAmB,SAAA,WACA,gBAAApC,KAAAwM,QAAA,KAAAxM,KAAAwM,QAAA,KAGA9K,EAAAT,UAAA0H,YAAA,EAEA9I,EAAAD,QAAA8B,GzB6jDM,SAAU7B,EAAQD,EAASM,G0B/kDjC,YAUA,SAAAyB,GAAA6O,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACA1Q,MAAAiG,QAAA,GAAAlE,SAAA,SAAAmE,GACAwK,EAAAxK,GAGA,IAAAyK,GAAA3Q,IACAwQ,GAAA,SAAAhE,GACAmE,EAAApI,SAKAoI,EAAApI,OAAA,GAAA7G,GAAA8K,GACAkE,EAAAC,EAAApI,WA1BA,GAAA7G,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAA+G,iBAAA,WACA,GAAAhI,KAAAuI,OACA,KAAAvI,MAAAuI,QAQA5G,EAAAiP,OAAA,WACA,GAAAxE,GACAuE,EAAA,GAAAhP,GAAA,SAAAlB,GACA2L,EAAA3L,GAEA,QACAkQ,QACAvE,WAIAvM,EAAAD,QAAA+B,G1BslDM,SAAU9B,EAAQD,G2B9oDxB,YAsBAC,GAAAD,QAAA,SAAAiR,GACA,gBAAAC,GACA,MAAAD,GAAAxL,MAAA,KAAAyL","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(4);\n\tvar mergeConfig = __webpack_require__(22);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(mergeConfig(axios.defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(9);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Buffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Buffer, otherwise false\n\t */\n\tfunction isBuffer(val) {\n\t return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n\t && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t * nativescript\n\t * navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t navigator.product === 'NativeScript' ||\n\t navigator.product === 'NS')) {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (typeof result[key] === 'object' && typeof val === 'object') {\n\t result[key] = merge(result[key], val);\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Function equal to merge with the difference being that no reference\n\t * to original objects is kept.\n\t *\n\t * @see merge\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (typeof result[key] === 'object' && typeof val === 'object') {\n\t result[key] = deepMerge(result[key], val);\n\t } else if (typeof val === 'object') {\n\t result[key] = deepMerge({}, val);\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t deepMerge: deepMerge,\n\t extend: extend,\n\t trim: trim\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar buildURL = __webpack_require__(5);\n\tvar InterceptorManager = __webpack_require__(6);\n\tvar dispatchRequest = __webpack_require__(7);\n\tvar mergeConfig = __webpack_require__(22);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = arguments[1] || {};\n\t config.url = arguments[0];\n\t } else {\n\t config = config || {};\n\t }\n\t\n\t config = mergeConfig(this.defaults, config);\n\t\n\t // Set config.method\n\t if (config.method) {\n\t config.method = config.method.toLowerCase();\n\t } else if (this.defaults.method) {\n\t config.method = this.defaults.method.toLowerCase();\n\t } else {\n\t config.method = 'get';\n\t }\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\tAxios.prototype.getUri = function getUri(config) {\n\t config = mergeConfig(this.defaults, config);\n\t return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t var hashmarkIndex = url.indexOf('#');\n\t if (hashmarkIndex !== -1) {\n\t url = url.slice(0, hashmarkIndex);\n\t }\n\t\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(8);\n\tvar isCancel = __webpack_require__(9);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(11);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(12);\n\t } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(12);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Accept');\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(13);\n\tvar buildURL = __webpack_require__(5);\n\tvar buildFullPath = __webpack_require__(16);\n\tvar parseHeaders = __webpack_require__(19);\n\tvar isURLSameOrigin = __webpack_require__(20);\n\tvar createError = __webpack_require__(14);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password || '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t var fullPath = buildFullPath(config.baseURL, config.url);\n\t request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function handleLoad() {\n\t if (!request || request.readyState !== 4) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t status: request.status,\n\t statusText: request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle browser request cancellation (as opposed to a manual cancellation)\n\t request.onabort = function handleAbort() {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\t if (config.timeoutErrorMessage) {\n\t timeoutErrorMessage = config.timeoutErrorMessage;\n\t }\n\t reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t var cookies = __webpack_require__(21);\n\t\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (!utils.isUndefined(config.withCredentials)) {\n\t request.withCredentials = !!config.withCredentials;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (requestData === undefined) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(14);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t if (!validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(15);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t\n\t error.request = request;\n\t error.response = response;\n\t error.isAxiosError = true;\n\t\n\t error.toJSON = function() {\n\t return {\n\t // Standard\n\t message: this.message,\n\t name: this.name,\n\t // Microsoft\n\t description: this.description,\n\t number: this.number,\n\t // Mozilla\n\t fileName: this.fileName,\n\t lineNumber: this.lineNumber,\n\t columnNumber: this.columnNumber,\n\t stack: this.stack,\n\t // Axios\n\t config: this.config,\n\t code: this.code\n\t };\n\t };\n\t return error;\n\t};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar isAbsoluteURL = __webpack_require__(17);\n\tvar combineURLs = __webpack_require__(18);\n\t\n\t/**\n\t * Creates a new URL by combining the baseURL with the requestedURL,\n\t * only when the requestedURL is not already an absolute URL.\n\t * If the requestURL is absolute, this function returns the requestedURL untouched.\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} requestedURL Absolute or relative URL to combine\n\t * @returns {string} The combined full path\n\t */\n\tmodule.exports = function buildFullPath(baseURL, requestedURL) {\n\t if (baseURL && !isAbsoluteURL(requestedURL)) {\n\t return combineURLs(baseURL, requestedURL);\n\t }\n\t return requestedURL;\n\t};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tmodule.exports = function mergeConfig(config1, config2) {\n\t // eslint-disable-next-line no-param-reassign\n\t config2 = config2 || {};\n\t var config = {};\n\t\n\t var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n\t var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n\t var defaultToConfig2Keys = [\n\t 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n\t 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n\t 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n\t 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n\t 'httpsAgent', 'cancelToken', 'socketPath'\n\t ];\n\t\n\t utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n\t if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t }\n\t });\n\t\n\t utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n\t if (utils.isObject(config2[prop])) {\n\t config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n\t } else if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t } else if (utils.isObject(config1[prop])) {\n\t config[prop] = utils.deepMerge(config1[prop]);\n\t } else if (typeof config1[prop] !== 'undefined') {\n\t config[prop] = config1[prop];\n\t }\n\t });\n\t\n\t utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n\t if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t } else if (typeof config1[prop] !== 'undefined') {\n\t config[prop] = config1[prop];\n\t }\n\t });\n\t\n\t var axiosKeys = valueFromConfig2Keys\n\t .concat(mergeDeepPropertiesKeys)\n\t .concat(defaultToConfig2Keys);\n\t\n\t var otherKeys = Object\n\t .keys(config2)\n\t .filter(function filterAxiosKeys(key) {\n\t return axiosKeys.indexOf(key) === -1;\n\t });\n\t\n\t utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n\t if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t } else if (typeof config1[prop] !== 'undefined') {\n\t config[prop] = config1[prop];\n\t }\n\t });\n\t\n\t return config;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap be8c45a40d7c235b46c5","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 16\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n var defaultToConfig2Keys = [\n 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath'\n ];\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys);\n\n var otherKeys = Object\n .keys(config2)\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap 081842adca0968bb3270","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js","webpack:///./lib/helpers/isAxiosError.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","mergeConfig","defaults","axios","create","instanceConfig","Cancel","CancelToken","isCancel","all","promises","Promise","spread","isAxiosError","default","isArray","val","toString","isUndefined","isBuffer","constructor","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isPlainObject","Object","getPrototypeOf","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","hasOwnProperty","merge","assignValue","slice","arguments","a","b","thisArg","stripBOM","content","charCodeAt","args","Array","apply","interceptors","InterceptorManager","response","buildURL","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","getUri","params","paramsSerializer","data","encode","encodeURIComponent","serializedParams","parts","v","toISOString","JSON","stringify","join","hashmarkIndex","indexOf","handlers","use","eject","h","throwIfCancellationRequested","cancelToken","throwIfRequested","transformData","headers","transformRequest","common","adapter","transformResponse","reason","reject","fns","value","__CANCEL__","setContentTypeIfUnset","getDefaultAdapter","XMLHttpRequest","process","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","status","Accept","normalizedName","name","toUpperCase","settle","cookies","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","password","unescape","Authorization","btoa","fullPath","baseURL","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onabort","onerror","ontimeout","timeoutErrorMessage","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","send","enhanceError","message","code","error","Error","toJSON","description","number","fileName","lineNumber","columnNumber","stack","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","isAbsoluteURL","combineURLs","requestedURL","test","relativeURL","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","userAgent","createElement","location","requestURL","config1","config2","getMergedValue","target","source","mergeDeepProperties","prop","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","axiosKeys","otherKeys","keys","filter","executor","TypeError","resolvePromise","token","callback","arr","payload"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEtDjCL,EAAAD,QAAAM,EAAA,IF4DM,SAAUL,EAAQD,EAASM,GG5DjC,YAcA,SAAAS,GAAAC,GACA,GAAAC,GAAA,GAAAC,GAAAF,GACAG,EAAAC,EAAAF,EAAAG,UAAAC,QAAAL,EAQA,OALAM,GAAAC,OAAAL,EAAAD,EAAAG,UAAAJ,GAGAM,EAAAC,OAAAL,EAAAF,GAEAE,EAtBA,GAAAI,GAAAjB,EAAA,GACAc,EAAAd,EAAA,GACAY,EAAAZ,EAAA,GACAmB,EAAAnB,EAAA,IACAoB,EAAApB,EAAA,IAsBAqB,EAAAZ,EAAAW,EAGAC,GAAAT,QAGAS,EAAAC,OAAA,SAAAC,GACA,MAAAd,GAAAU,EAAAE,EAAAD,SAAAG,KAIAF,EAAAG,OAAAxB,EAAA,IACAqB,EAAAI,YAAAzB,EAAA,IACAqB,EAAAK,SAAA1B,EAAA,GAGAqB,EAAAM,IAAA,SAAAC,GACA,MAAAC,SAAAF,IAAAC,IAEAP,EAAAS,OAAA9B,EAAA,IAGAqB,EAAAU,aAAA/B,EAAA,IAEAL,EAAAD,QAAA2B,EAGA1B,EAAAD,QAAAsC,QAAAX,GHmEM,SAAU1B,EAAQD,EAASM,GI1HjC,YAgBA,SAAAiC,GAAAC,GACA,yBAAAC,EAAA9B,KAAA6B,GASA,QAAAE,GAAAF,GACA,yBAAAA,GASA,QAAAG,GAAAH,GACA,cAAAA,IAAAE,EAAAF,IAAA,OAAAA,EAAAI,cAAAF,EAAAF,EAAAI,cACA,kBAAAJ,GAAAI,YAAAD,UAAAH,EAAAI,YAAAD,SAAAH,GASA,QAAAK,GAAAL,GACA,+BAAAC,EAAA9B,KAAA6B,GASA,QAAAM,GAAAN,GACA,yBAAAO,WAAAP,YAAAO,UASA,QAAAC,GAAAR,GACA,GAAAS,EAMA,OAJAA,GADA,mBAAAC,0BAAA,OACAA,YAAAC,OAAAX,GAEA,GAAAA,EAAA,QAAAA,EAAAY,iBAAAF,aAWA,QAAAG,GAAAb,GACA,sBAAAA,GASA,QAAAc,GAAAd,GACA,sBAAAA,GASA,QAAAe,GAAAf,GACA,cAAAA,GAAA,gBAAAA,GASA,QAAAgB,GAAAhB,GACA,uBAAAC,EAAA9B,KAAA6B,GACA,QAGA,IAAAnB,GAAAoC,OAAAC,eAAAlB,EACA,eAAAnB,OAAAoC,OAAApC,UASA,QAAAsC,GAAAnB,GACA,wBAAAC,EAAA9B,KAAA6B,GASA,QAAAoB,GAAApB,GACA,wBAAAC,EAAA9B,KAAA6B,GASA,QAAAqB,GAAArB,GACA,wBAAAC,EAAA9B,KAAA6B,GASA,QAAAsB,GAAAtB,GACA,4BAAAC,EAAA9B,KAAA6B,GASA,QAAAuB,GAAAvB,GACA,MAAAe,GAAAf,IAAAsB,EAAAtB,EAAAwB,MASA,QAAAC,GAAAzB,GACA,yBAAA0B,kBAAA1B,YAAA0B,iBASA,QAAAC,GAAAC,GACA,MAAAA,GAAAC,QAAA,WAAAA,QAAA,WAkBA,QAAAC,KACA,0BAAAC,YAAA,gBAAAA,UAAAC,SACA,iBAAAD,UAAAC,SACA,OAAAD,UAAAC,WAIA,mBAAAC,SACA,mBAAAC,WAgBA,QAAAC,GAAAC,EAAAC,GAEA,UAAAD,GAAA,mBAAAA,GAUA,GALA,gBAAAA,KAEAA,OAGArC,EAAAqC,GAEA,OAAAE,GAAA,EAAAC,EAAAH,EAAAI,OAAmCF,EAAAC,EAAOD,IAC1CD,EAAAlE,KAAA,KAAAiE,EAAAE,KAAAF,OAIA,QAAAK,KAAAL,GACAnB,OAAApC,UAAA6D,eAAAvE,KAAAiE,EAAAK,IACAJ,EAAAlE,KAAA,KAAAiE,EAAAK,KAAAL,GAuBA,QAAAO,KAEA,QAAAC,GAAA5C,EAAAyC,GACAzB,EAAAP,EAAAgC,KAAAzB,EAAAhB,GACAS,EAAAgC,GAAAE,EAAAlC,EAAAgC,GAAAzC,GACKgB,EAAAhB,GACLS,EAAAgC,GAAAE,KAA4B3C,GACvBD,EAAAC,GACLS,EAAAgC,GAAAzC,EAAA6C,QAEApC,EAAAgC,GAAAzC,EAIA,OAbAS,MAaA6B,EAAA,EAAAC,EAAAO,UAAAN,OAAuCF,EAAAC,EAAOD,IAC9CH,EAAAW,UAAAR,GAAAM,EAEA,OAAAnC,GAWA,QAAAzB,GAAA+D,EAAAC,EAAAC,GAQA,MAPAd,GAAAa,EAAA,SAAAhD,EAAAyC,GACAQ,GAAA,kBAAAjD,GACA+C,EAAAN,GAAA7D,EAAAoB,EAAAiD,GAEAF,EAAAN,GAAAzC,IAGA+C,EASA,QAAAG,GAAAC,GAIA,MAHA,SAAAA,EAAAC,WAAA,KACAD,IAAAN,MAAA,IAEAM,EAlUA,GAAAvE,GAAAd,EAAA,GAMAmC,EAAAgB,OAAApC,UAAAoB,QA+TAxC,GAAAD,SACAuC,UACAM,gBACAF,WACAG,aACAE,oBACAK,WACAC,WACAC,WACAC,gBACAd,cACAiB,SACAC,SACAC,SACAC,aACAC,WACAE,oBACAK,uBACAK,UACAQ,QACA3D,SACA2C,OACAuB,aJkIM,SAAUzF,EAAQD,GK/dxB,YAEAC,GAAAD,QAAA,SAAA6E,EAAAY,GACA,kBAEA,OADAI,GAAA,GAAAC,OAAAR,UAAAN,QACAF,EAAA,EAAmBA,EAAAe,EAAAb,OAAiBF,IACpCe,EAAAf,GAAAQ,UAAAR,EAEA,OAAAD,GAAAkB,MAAAN,EAAAI,MLweM,SAAU5F,EAAQD,EAASM,GMhfjC,YAaA,SAAAY,GAAAW,GACAzB,KAAAsB,SAAAG,EACAzB,KAAA4F,cACA1E,QAAA,GAAA2E,GACAC,SAAA,GAAAD,IAfA,GAAA1E,GAAAjB,EAAA,GACA6F,EAAA7F,EAAA,GACA2F,EAAA3F,EAAA,GACA8F,EAAA9F,EAAA,GACAmB,EAAAnB,EAAA,GAoBAY,GAAAG,UAAAC,QAAA,SAAA+E,GAGA,gBAAAA,IACAA,EAAAf,UAAA,OACAe,EAAAC,IAAAhB,UAAA,IAEAe,QAGAA,EAAA5E,EAAArB,KAAAsB,SAAA2E,GAGAA,EAAAE,OACAF,EAAAE,OAAAF,EAAAE,OAAAC,cACGpG,KAAAsB,SAAA6E,OACHF,EAAAE,OAAAnG,KAAAsB,SAAA6E,OAAAC,cAEAH,EAAAE,OAAA,KAIA,IAAAE,IAAAL,EAAAM,QACAC,EAAAxE,QAAAyE,QAAAP,EAUA,KARAjG,KAAA4F,aAAA1E,QAAAqD,QAAA,SAAAkC,GACAJ,EAAAK,QAAAD,EAAAE,UAAAF,EAAAG,YAGA5G,KAAA4F,aAAAE,SAAAvB,QAAA,SAAAkC,GACAJ,EAAAQ,KAAAJ,EAAAE,UAAAF,EAAAG,YAGAP,EAAAzB,QACA2B,IAAAO,KAAAT,EAAAU,QAAAV,EAAAU,QAGA,OAAAR,IAGAzF,EAAAG,UAAA+F,OAAA,SAAAf,GAEA,MADAA,GAAA5E,EAAArB,KAAAsB,SAAA2E,GACAF,EAAAE,EAAAC,IAAAD,EAAAgB,OAAAhB,EAAAiB,kBAAAjD,QAAA,WAIA9C,EAAAoD,SAAA,0CAAA4B,GAEArF,EAAAG,UAAAkF,GAAA,SAAAD,EAAAD,GACA,MAAAjG,MAAAkB,QAAAG,EAAA4E,OACAE,SACAD,MACAiB,MAAAlB,OAAyBkB,WAKzBhG,EAAAoD,SAAA,+BAAA4B,GAEArF,EAAAG,UAAAkF,GAAA,SAAAD,EAAAiB,EAAAlB,GACA,MAAAjG,MAAAkB,QAAAG,EAAA4E,OACAE,SACAD,MACAiB,aAKAtH,EAAAD,QAAAkB,GNufM,SAAUjB,EAAQD,EAASM,GOrlBjC,YAIA,SAAAkH,GAAAhF,GACA,MAAAiF,oBAAAjF,GACA6B,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,aATA,GAAA9C,GAAAjB,EAAA,EAmBAL,GAAAD,QAAA,SAAAsG,EAAAe,EAAAC,GAEA,IAAAD,EACA,MAAAf,EAGA,IAAAoB,EACA,IAAAJ,EACAI,EAAAJ,EAAAD,OACG,IAAA9F,EAAA0C,kBAAAoD,GACHK,EAAAL,EAAA5E,eACG,CACH,GAAAkF,KAEApG,GAAAoD,QAAA0C,EAAA,SAAA7E,EAAAyC,GACA,OAAAzC,GAAA,mBAAAA,KAIAjB,EAAAgB,QAAAC,GACAyC,GAAA,KAEAzC,MAGAjB,EAAAoD,QAAAnC,EAAA,SAAAoF,GACArG,EAAAoC,OAAAiE,GACAA,IAAAC,cACStG,EAAAgC,SAAAqE,KACTA,EAAAE,KAAAC,UAAAH,IAEAD,EAAAV,KAAAO,EAAAvC,GAAA,IAAAuC,EAAAI,SAIAF,EAAAC,EAAAK,KAAA,KAGA,GAAAN,EAAA,CACA,GAAAO,GAAA3B,EAAA4B,QAAA,IACAD,MAAA,IACA3B,IAAAjB,MAAA,EAAA4C,IAGA3B,MAAA4B,QAAA,mBAAAR,EAGA,MAAApB,KP6lBM,SAAUrG,EAAQD,EAASM,GQjqBjC,YAIA,SAAA2F,KACA7F,KAAA+H,YAHA,GAAA5G,GAAAjB,EAAA,EAcA2F,GAAA5E,UAAA+G,IAAA,SAAArB,EAAAC,GAKA,MAJA5G,MAAA+H,SAAAlB,MACAF,YACAC,aAEA5G,KAAA+H,SAAAnD,OAAA,GAQAiB,EAAA5E,UAAAgH,MAAA,SAAA5H,GACAL,KAAA+H,SAAA1H,KACAL,KAAA+H,SAAA1H,GAAA,OAYAwF,EAAA5E,UAAAsD,QAAA,SAAAE,GACAtD,EAAAoD,QAAAvE,KAAA+H,SAAA,SAAAG,GACA,OAAAA,GACAzD,EAAAyD,MAKArI,EAAAD,QAAAiG,GRwqBM,SAAUhG,EAAQD,EAASM,GS3tBjC,YAUA,SAAAiI,GAAAlC,GACAA,EAAAmC,aACAnC,EAAAmC,YAAAC,mBAVA,GAAAlH,GAAAjB,EAAA,GACAoI,EAAApI,EAAA,GACA0B,EAAA1B,EAAA,GACAoB,EAAApB,EAAA,GAiBAL,GAAAD,QAAA,SAAAqG,GACAkC,EAAAlC,GAGAA,EAAAsC,QAAAtC,EAAAsC,YAGAtC,EAAAkB,KAAAmB,EACArC,EAAAkB,KACAlB,EAAAsC,QACAtC,EAAAuC,kBAIAvC,EAAAsC,QAAApH,EAAA4D,MACAkB,EAAAsC,QAAAE,WACAxC,EAAAsC,QAAAtC,EAAAE,YACAF,EAAAsC,SAGApH,EAAAoD,SACA,qDACA,SAAA4B,SACAF,GAAAsC,QAAApC,IAIA,IAAAuC,GAAAzC,EAAAyC,SAAApH,EAAAoH,OAEA,OAAAA,GAAAzC,GAAAa,KAAA,SAAAhB,GAUA,MATAqC,GAAAlC,GAGAH,EAAAqB,KAAAmB,EACAxC,EAAAqB,KACArB,EAAAyC,QACAtC,EAAA0C,mBAGA7C,GACG,SAAA8C,GAcH,MAbAhH,GAAAgH,KACAT,EAAAlC,GAGA2C,KAAA9C,WACA8C,EAAA9C,SAAAqB,KAAAmB,EACAM,EAAA9C,SAAAqB,KACAyB,EAAA9C,SAAAyC,QACAtC,EAAA0C,qBAKA5G,QAAA8G,OAAAD,OTouBM,SAAU/I,EAAQD,EAASM,GUhzBjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAAuH,EAAAoB,EAAAO,GAMA,MAJA3H,GAAAoD,QAAAuE,EAAA,SAAArE,GACA0C,EAAA1C,EAAA0C,EAAAoB,KAGApB,IVwzBM,SAAUtH,EAAQD,GW10BxB,YAEAC,GAAAD,QAAA,SAAAmJ,GACA,SAAAA,MAAAC,cXk1BM,SAAUnJ,EAAQD,EAASM,GYr1BjC,YASA,SAAA+I,GAAAV,EAAAQ,IACA5H,EAAAmB,YAAAiG,IAAApH,EAAAmB,YAAAiG,EAAA,mBACAA,EAAA,gBAAAQ,GAIA,QAAAG,KACA,GAAAR,EAQA,OAPA,mBAAAS,gBAEAT,EAAAxI,EAAA,IACG,mBAAAkJ,UAAA,qBAAA/F,OAAApC,UAAAoB,SAAA9B,KAAA6I,WAEHV,EAAAxI,EAAA,KAEAwI,EAtBA,GAAAvH,GAAAjB,EAAA,GACAmJ,EAAAnJ,EAAA,IAEAoJ,GACAC,eAAA,qCAqBAjI,GACAoH,QAAAQ,IAEAV,kBAAA,SAAArB,EAAAoB,GAGA,MAFAc,GAAAd,EAAA,UACAc,EAAAd,EAAA,gBACApH,EAAAuB,WAAAyE,IACAhG,EAAAsB,cAAA0E,IACAhG,EAAAoB,SAAA4E,IACAhG,EAAAwC,SAAAwD,IACAhG,EAAAqC,OAAA2D,IACAhG,EAAAsC,OAAA0D,GAEAA,EAEAhG,EAAAyB,kBAAAuE,GACAA,EAAAnE,OAEA7B,EAAA0C,kBAAAsD,IACA8B,EAAAV,EAAA,mDACApB,EAAA9E,YAEAlB,EAAAgC,SAAAgE,IACA8B,EAAAV,EAAA,kCACAb,KAAAC,UAAAR,IAEAA,IAGAwB,mBAAA,SAAAxB,GAEA,mBAAAA,GACA,IACAA,EAAAO,KAAA8B,MAAArC,GACO,MAAAsC,IAEP,MAAAtC,KAOAuC,QAAA,EAEAC,eAAA,aACAC,eAAA,eAEAC,kBAAA,EACAC,eAAA,EAEAC,eAAA,SAAAC,GACA,MAAAA,IAAA,KAAAA,EAAA,KAIA1I,GAAAiH,SACAE,QACAwB,OAAA,sCAIA9I,EAAAoD,SAAA,gCAAA4B,GACA7E,EAAAiH,QAAApC,QAGAhF,EAAAoD,SAAA,+BAAA4B,GACA7E,EAAAiH,QAAApC,GAAAhF,EAAA4D,MAAAuE,KAGAzJ,EAAAD,QAAA0B,GZ41BM,SAAUzB,EAAQD,EAASM,Ga77BjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QAAA,SAAA2I,EAAA2B,GACA/I,EAAAoD,QAAAgE,EAAA,SAAAQ,EAAAoB,GACAA,IAAAD,GAAAC,EAAAC,gBAAAF,EAAAE,gBACA7B,EAAA2B,GAAAnB,QACAR,GAAA4B,Qbu8BM,SAAUtK,EAAQD,EAASM,Gc/8BjC,YAEA,IAAAiB,GAAAjB,EAAA,GACAmK,EAAAnK,EAAA,IACAoK,EAAApK,EAAA,IACA6F,EAAA7F,EAAA,GACAqK,EAAArK,EAAA,IACAsK,EAAAtK,EAAA,IACAuK,EAAAvK,EAAA,IACAwK,EAAAxK,EAAA,GAEAL,GAAAD,QAAA,SAAAqG,GACA,UAAAlE,SAAA,SAAAyE,EAAAqC,GACA,GAAA8B,GAAA1E,EAAAkB,KACAyD,EAAA3E,EAAAsC,OAEApH,GAAAuB,WAAAiI,UACAC,GAAA,eAGA,IAAA1J,GAAA,GAAAiI,eAGA,IAAAlD,EAAA4E,KAAA,CACA,GAAAC,GAAA7E,EAAA4E,KAAAC,UAAA,GACAC,EAAA9E,EAAA4E,KAAAE,SAAAC,SAAA3D,mBAAApB,EAAA4E,KAAAE,WAAA,EACAH,GAAAK,cAAA,SAAAC,KAAAJ,EAAA,IAAAC,GAGA,GAAAI,GAAAZ,EAAAtE,EAAAmF,QAAAnF,EAAAC,IA4EA,IA3EAhF,EAAAmK,KAAApF,EAAAE,OAAAiE,cAAArE,EAAAoF,EAAAlF,EAAAgB,OAAAhB,EAAAiB,mBAAA,GAGAhG,EAAAwI,QAAAzD,EAAAyD,QAGAxI,EAAAoK,mBAAA,WACA,GAAApK,GAAA,IAAAA,EAAAqK,aAQA,IAAArK,EAAA8I,QAAA9I,EAAAsK,aAAA,IAAAtK,EAAAsK,YAAA1D,QAAA,WAKA,GAAA2D,GAAA,yBAAAvK,GAAAsJ,EAAAtJ,EAAAwK,yBAAA,KACAC,EAAA1F,EAAA2F,cAAA,SAAA3F,EAAA2F,aAAA1K,EAAA4E,SAAA5E,EAAA2K,aACA/F,GACAqB,KAAAwE,EACA3B,OAAA9I,EAAA8I,OACA8B,WAAA5K,EAAA4K,WACAvD,QAAAkD,EACAxF,SACA/E,UAGAmJ,GAAA7D,EAAAqC,EAAA/C,GAGA5E,EAAA,OAIAA,EAAA6K,QAAA,WACA7K,IAIA2H,EAAA6B,EAAA,kBAAAzE,EAAA,eAAA/E,IAGAA,EAAA,OAIAA,EAAA8K,QAAA,WAGAnD,EAAA6B,EAAA,gBAAAzE,EAAA,KAAA/E,IAGAA,EAAA,MAIAA,EAAA+K,UAAA,WACA,GAAAC,GAAA,cAAAjG,EAAAyD,QAAA,aACAzD,GAAAiG,sBACAA,EAAAjG,EAAAiG,qBAEArD,EAAA6B,EAAAwB,EAAAjG,EAAA,eACA/E,IAGAA,EAAA,MAMAC,EAAA+C,uBAAA,CAEA,GAAAiI,IAAAlG,EAAAmG,iBAAA3B,EAAAU,KAAAlF,EAAA0D,eACAW,EAAA+B,KAAApG,EAAA0D,gBACArD,MAEA6F,KACAvB,EAAA3E,EAAA2D,gBAAAuC,GAuBA,GAlBA,oBAAAjL,IACAC,EAAAoD,QAAAqG,EAAA,SAAAxI,EAAAyC,GACA,mBAAA8F,IAAA,iBAAA9F,EAAAuB,oBAEAwE,GAAA/F,GAGA3D,EAAAoL,iBAAAzH,EAAAzC,KAMAjB,EAAAmB,YAAA2D,EAAAmG,mBACAlL,EAAAkL,kBAAAnG,EAAAmG,iBAIAnG,EAAA2F,aACA,IACA1K,EAAA0K,aAAA3F,EAAA2F,aACO,MAAAnC,GAGP,YAAAxD,EAAA2F,aACA,KAAAnC,GAMA,kBAAAxD,GAAAsG,oBACArL,EAAAsL,iBAAA,WAAAvG,EAAAsG,oBAIA,kBAAAtG,GAAAwG,kBAAAvL,EAAAwL,QACAxL,EAAAwL,OAAAF,iBAAA,WAAAvG,EAAAwG,kBAGAxG,EAAAmC,aAEAnC,EAAAmC,YAAA7B,QAAAO,KAAA,SAAA6F,GACAzL,IAIAA,EAAA0L,QACA/D,EAAA8D,GAEAzL,EAAA,QAIAyJ,IACAA,EAAA,MAIAzJ,EAAA2L,KAAAlC,Odw9BM,SAAU9K,EAAQD,EAASM,GexoCjC,YAEA,IAAAwK,GAAAxK,EAAA,GASAL,GAAAD,QAAA,SAAA4G,EAAAqC,EAAA/C,GACA,GAAAiE,GAAAjE,EAAAG,OAAA8D,cACAjE,GAAAkE,QAAAD,MAAAjE,EAAAkE,QAGAnB,EAAA6B,EACA,mCAAA5E,EAAAkE,OACAlE,EAAAG,OACA,KACAH,EAAA5E,QACA4E,IAPAU,EAAAV,KfypCM,SAAUjG,EAAQD,EAASM,GgBvqCjC,YAEA,IAAA4M,GAAA5M,EAAA,GAYAL,GAAAD,QAAA,SAAAmN,EAAA9G,EAAA+G,EAAA9L,EAAA4E,GACA,GAAAmH,GAAA,GAAAC,OAAAH,EACA,OAAAD,GAAAG,EAAAhH,EAAA+G,EAAA9L,EAAA4E,KhB+qCM,SAAUjG,EAAQD,GiB/rCxB,YAYAC,GAAAD,QAAA,SAAAqN,EAAAhH,EAAA+G,EAAA9L,EAAA4E,GA4BA,MA3BAmH,GAAAhH,SACA+G,IACAC,EAAAD,QAGAC,EAAA/L,UACA+L,EAAAnH,WACAmH,EAAAhL,cAAA,EAEAgL,EAAAE,OAAA,WACA,OAEAJ,QAAA/M,KAAA+M,QACA5C,KAAAnK,KAAAmK,KAEAiD,YAAApN,KAAAoN,YACAC,OAAArN,KAAAqN,OAEAC,SAAAtN,KAAAsN,SACAC,WAAAvN,KAAAuN,WACAC,aAAAxN,KAAAwN,aACAC,MAAAzN,KAAAyN,MAEAxH,OAAAjG,KAAAiG,OACA+G,KAAAhN,KAAAgN,OAGAC,IjBusCM,SAAUpN,EAAQD,EAASM,GkB/uCjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAA+C,uBAGA,WACA,OACAwJ,MAAA,SAAAvD,EAAApB,EAAA4E,EAAAC,EAAAC,EAAAC,GACA,GAAAC,KACAA,GAAAlH,KAAAsD,EAAA,IAAA9C,mBAAA0B,IAEA5H,EAAA+B,SAAAyK,IACAI,EAAAlH,KAAA,cAAAmH,MAAAL,GAAAM,eAGA9M,EAAA8B,SAAA2K,IACAG,EAAAlH,KAAA,QAAA+G,GAGAzM,EAAA8B,SAAA4K,IACAE,EAAAlH,KAAA,UAAAgH,GAGAC,KAAA,GACAC,EAAAlH,KAAA,UAGAvC,SAAAyJ,SAAAnG,KAAA,OAGAyE,KAAA,SAAAlC,GACA,GAAA+D,GAAA5J,SAAAyJ,OAAAG,MAAA,GAAAC,QAAA,aAA4DhE,EAAA,aAC5D,OAAA+D,GAAAE,mBAAAF,EAAA,UAGAG,OAAA,SAAAlE,GACAnK,KAAA0N,MAAAvD,EAAA,GAAA6D,KAAAM,MAAA,YAMA,WACA,OACAZ,MAAA,aACArB,KAAA,WAA+B,aAC/BgC,OAAA,kBlByvCM,SAAUxO,EAAQD,EAASM,GmB1yCjC,YAEA,IAAAqO,GAAArO,EAAA,IACAsO,EAAAtO,EAAA,GAWAL,GAAAD,QAAA,SAAAwL,EAAAqD,GACA,MAAArD,KAAAmD,EAAAE,GACAD,EAAApD,EAAAqD,GAEAA,InBkzCM,SAAU5O,EAAQD,GoBp0CxB,YAQAC,GAAAD,QAAA,SAAAsG,GAIA,sCAAAwI,KAAAxI,KpB40CM,SAAUrG,EAAQD,GqBx1CxB,YASAC,GAAAD,QAAA,SAAAwL,EAAAuD,GACA,MAAAA,GACAvD,EAAAnH,QAAA,eAAA0K,EAAA1K,QAAA,WACAmH,IrBg2CM,SAAUvL,EAAQD,EAASM,GsB52CjC,YAEA,IAAAiB,GAAAjB,EAAA,GAIA0O,GACA,6DACA,kEACA,gEACA,qCAgBA/O,GAAAD,QAAA,SAAA2I,GACA,GACA1D,GACAzC,EACAsC,EAHAmK,IAKA,OAAAtG,IAEApH,EAAAoD,QAAAgE,EAAAuG,MAAA,eAAAC,GAKA,GAJArK,EAAAqK,EAAAjH,QAAA,KACAjD,EAAA1D,EAAA4C,KAAAgL,EAAAC,OAAA,EAAAtK,IAAA0B,cACAhE,EAAAjB,EAAA4C,KAAAgL,EAAAC,OAAAtK,EAAA,IAEAG,EAAA,CACA,GAAAgK,EAAAhK,IAAA+J,EAAA9G,QAAAjD,IAAA,EACA,MAEA,gBAAAA,EACAgK,EAAAhK,IAAAgK,EAAAhK,GAAAgK,EAAAhK,OAAAoK,QAAA7M,IAEAyM,EAAAhK,GAAAgK,EAAAhK,GAAAgK,EAAAhK,GAAA,KAAAzC,OAKAyM,GAnBiBA,ItBu4CX,SAAUhP,EAAQD,EAASM,GuBv6CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAA+C,uBAIA,WAWA,QAAAgL,GAAAhJ,GACA,GAAAiJ,GAAAjJ,CAWA,OATAkJ,KAEAC,EAAAC,aAAA,OAAAH,GACAA,EAAAE,EAAAF,MAGAE,EAAAC,aAAA,OAAAH,IAIAA,KAAAE,EAAAF,KACAI,SAAAF,EAAAE,SAAAF,EAAAE,SAAAtL,QAAA,YACAuL,KAAAH,EAAAG,KACAC,OAAAJ,EAAAI,OAAAJ,EAAAI,OAAAxL,QAAA,aACAyL,KAAAL,EAAAK,KAAAL,EAAAK,KAAAzL,QAAA,YACA0L,SAAAN,EAAAM,SACAC,KAAAP,EAAAO,KACAC,SAAA,MAAAR,EAAAQ,SAAAC,OAAA,GACAT,EAAAQ,SACA,IAAAR,EAAAQ,UAhCA,GAEAE,GAFAX,EAAA,kBAAAV,KAAAvK,UAAA6L,WACAX,EAAA/K,SAAA2L,cAAA,IA2CA,OARAF,GAAAb,EAAA7K,OAAA6L,SAAAf,MAQA,SAAAgB,GACA,GAAAtB,GAAA1N,EAAA8B,SAAAkN,GAAAjB,EAAAiB,IACA,OAAAtB,GAAAU,WAAAQ,EAAAR,UACAV,EAAAW,OAAAO,EAAAP,SAKA,WACA,kBACA,cvBi7CM,SAAU3P,EAAQD,EAASM,GwBj/CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAAwQ,EAAAC,GAgBA,QAAAC,GAAAC,EAAAC,GACA,MAAArP,GAAAiC,cAAAmN,IAAApP,EAAAiC,cAAAoN,GACArP,EAAA4D,MAAAwL,EAAAC,GACKrP,EAAAiC,cAAAoN,GACLrP,EAAA4D,SAA2ByL,GACtBrP,EAAAgB,QAAAqO,GACLA,EAAAvL,QAEAuL,EAGA,QAAAC,GAAAC,GACAvP,EAAAmB,YAAA+N,EAAAK,IAEKvP,EAAAmB,YAAA8N,EAAAM,MACLzK,EAAAyK,GAAAJ,EAAAhK,OAAA8J,EAAAM,KAFAzK,EAAAyK,GAAAJ,EAAAF,EAAAM,GAAAL,EAAAK,IA3BAL,OACA,IAAApK,MAEA0K,GAAA,uBACAC,GAAA,mCACAC,GACA,oEACA,uFACA,sEACA,0EACA,4DAEAC,GAAA,iBAqBA3P,GAAAoD,QAAAoM,EAAA,SAAAD,GACAvP,EAAAmB,YAAA+N,EAAAK,MACAzK,EAAAyK,GAAAJ,EAAAhK,OAAA+J,EAAAK,OAIAvP,EAAAoD,QAAAqM,EAAAH,GAEAtP,EAAAoD,QAAAsM,EAAA,SAAAH,GACAvP,EAAAmB,YAAA+N,EAAAK,IAEKvP,EAAAmB,YAAA8N,EAAAM,MACLzK,EAAAyK,GAAAJ,EAAAhK,OAAA8J,EAAAM,KAFAzK,EAAAyK,GAAAJ,EAAAhK,OAAA+J,EAAAK,MAMAvP,EAAAoD,QAAAuM,EAAA,SAAAJ,GACAA,IAAAL,GACApK,EAAAyK,GAAAJ,EAAAF,EAAAM,GAAAL,EAAAK,IACKA,IAAAN,KACLnK,EAAAyK,GAAAJ,EAAAhK,OAAA8J,EAAAM,MAIA,IAAAK,GAAAJ,EACA1B,OAAA2B,GACA3B,OAAA4B,GACA5B,OAAA6B,GAEAE,EAAA3N,OACA4N,KAAAb,GACAnB,OAAA5L,OAAA4N,KAAAZ,IACAa,OAAA,SAAArM,GACA,MAAAkM,GAAAjJ,QAAAjD,MAAA,GAKA,OAFA1D,GAAAoD,QAAAyM,EAAAP,GAEAxK,IxBy/CM,SAAUpG,EAAQD,GyB9kDxB,YAQA,SAAA8B,GAAAqL,GACA/M,KAAA+M,UAGArL,EAAAT,UAAAoB,SAAA,WACA,gBAAArC,KAAA+M,QAAA,KAAA/M,KAAA+M,QAAA,KAGArL,EAAAT,UAAA+H,YAAA,EAEAnJ,EAAAD,QAAA8B,GzBqlDM,SAAU7B,EAAQD,EAASM,G0BvmDjC,YAUA,SAAAyB,GAAAwP,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACArR,MAAAuG,QAAA,GAAAxE,SAAA,SAAAyE,GACA6K,EAAA7K,GAGA,IAAA8K,GAAAtR,IACAmR,GAAA,SAAApE,GACAuE,EAAA1I,SAKA0I,EAAA1I,OAAA,GAAAlH,GAAAqL,GACAsE,EAAAC,EAAA1I,WA1BA,GAAAlH,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAAoH,iBAAA,WACA,GAAArI,KAAA4I,OACA,KAAA5I,MAAA4I,QAQAjH,EAAA6O,OAAA,WACA,GAAA7D,GACA2E,EAAA,GAAA3P,GAAA,SAAAlB,GACAkM,EAAAlM,GAEA,QACA6Q,QACA3E,WAIA9M,EAAAD,QAAA+B,G1B8mDM,SAAU9B,EAAQD,G2BtqDxB,YAsBAC,GAAAD,QAAA,SAAA2R,GACA,gBAAAC,GACA,MAAAD,GAAA5L,MAAA,KAAA6L,M3B+qDM,SAAU3R,EAAQD,G4BvsDxB,YAQAC,GAAAD,QAAA,SAAA6R,GACA,sBAAAA,MAAAxP,gBAAA","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(4);\n\tvar mergeConfig = __webpack_require__(22);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(mergeConfig(axios.defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(9);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\t// Expose isAxiosError\n\taxios.isAxiosError = __webpack_require__(26);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Buffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Buffer, otherwise false\n\t */\n\tfunction isBuffer(val) {\n\t return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n\t && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a plain Object\n\t *\n\t * @param {Object} val The value to test\n\t * @return {boolean} True if value is a plain Object, otherwise false\n\t */\n\tfunction isPlainObject(val) {\n\t if (toString.call(val) !== '[object Object]') {\n\t return false;\n\t }\n\t\n\t var prototype = Object.getPrototypeOf(val);\n\t return prototype === null || prototype === Object.prototype;\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t * nativescript\n\t * navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t navigator.product === 'NativeScript' ||\n\t navigator.product === 'NS')) {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (isPlainObject(result[key]) && isPlainObject(val)) {\n\t result[key] = merge(result[key], val);\n\t } else if (isPlainObject(val)) {\n\t result[key] = merge({}, val);\n\t } else if (isArray(val)) {\n\t result[key] = val.slice();\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\t/**\n\t * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n\t *\n\t * @param {string} content with BOM\n\t * @return {string} content value without BOM\n\t */\n\tfunction stripBOM(content) {\n\t if (content.charCodeAt(0) === 0xFEFF) {\n\t content = content.slice(1);\n\t }\n\t return content;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isPlainObject: isPlainObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t extend: extend,\n\t trim: trim,\n\t stripBOM: stripBOM\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar buildURL = __webpack_require__(5);\n\tvar InterceptorManager = __webpack_require__(6);\n\tvar dispatchRequest = __webpack_require__(7);\n\tvar mergeConfig = __webpack_require__(22);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = arguments[1] || {};\n\t config.url = arguments[0];\n\t } else {\n\t config = config || {};\n\t }\n\t\n\t config = mergeConfig(this.defaults, config);\n\t\n\t // Set config.method\n\t if (config.method) {\n\t config.method = config.method.toLowerCase();\n\t } else if (this.defaults.method) {\n\t config.method = this.defaults.method.toLowerCase();\n\t } else {\n\t config.method = 'get';\n\t }\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\tAxios.prototype.getUri = function getUri(config) {\n\t config = mergeConfig(this.defaults, config);\n\t return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: (config || {}).data\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t var hashmarkIndex = url.indexOf('#');\n\t if (hashmarkIndex !== -1) {\n\t url = url.slice(0, hashmarkIndex);\n\t }\n\t\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(8);\n\tvar isCancel = __webpack_require__(9);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(11);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(12);\n\t } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(12);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Accept');\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t maxBodyLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(13);\n\tvar cookies = __webpack_require__(16);\n\tvar buildURL = __webpack_require__(5);\n\tvar buildFullPath = __webpack_require__(17);\n\tvar parseHeaders = __webpack_require__(20);\n\tvar isURLSameOrigin = __webpack_require__(21);\n\tvar createError = __webpack_require__(14);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t var fullPath = buildFullPath(config.baseURL, config.url);\n\t request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function handleLoad() {\n\t if (!request || request.readyState !== 4) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t status: request.status,\n\t statusText: request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle browser request cancellation (as opposed to a manual cancellation)\n\t request.onabort = function handleAbort() {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\t if (config.timeoutErrorMessage) {\n\t timeoutErrorMessage = config.timeoutErrorMessage;\n\t }\n\t reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (!utils.isUndefined(config.withCredentials)) {\n\t request.withCredentials = !!config.withCredentials;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (!requestData) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(14);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t if (!response.status || !validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(15);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t\n\t error.request = request;\n\t error.response = response;\n\t error.isAxiosError = true;\n\t\n\t error.toJSON = function toJSON() {\n\t return {\n\t // Standard\n\t message: this.message,\n\t name: this.name,\n\t // Microsoft\n\t description: this.description,\n\t number: this.number,\n\t // Mozilla\n\t fileName: this.fileName,\n\t lineNumber: this.lineNumber,\n\t columnNumber: this.columnNumber,\n\t stack: this.stack,\n\t // Axios\n\t config: this.config,\n\t code: this.code\n\t };\n\t };\n\t return error;\n\t};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar isAbsoluteURL = __webpack_require__(18);\n\tvar combineURLs = __webpack_require__(19);\n\t\n\t/**\n\t * Creates a new URL by combining the baseURL with the requestedURL,\n\t * only when the requestedURL is not already an absolute URL.\n\t * If the requestURL is absolute, this function returns the requestedURL untouched.\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} requestedURL Absolute or relative URL to combine\n\t * @returns {string} The combined full path\n\t */\n\tmodule.exports = function buildFullPath(baseURL, requestedURL) {\n\t if (baseURL && !isAbsoluteURL(requestedURL)) {\n\t return combineURLs(baseURL, requestedURL);\n\t }\n\t return requestedURL;\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tmodule.exports = function mergeConfig(config1, config2) {\n\t // eslint-disable-next-line no-param-reassign\n\t config2 = config2 || {};\n\t var config = {};\n\t\n\t var valueFromConfig2Keys = ['url', 'method', 'data'];\n\t var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n\t var defaultToConfig2Keys = [\n\t 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n\t 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n\t 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n\t 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n\t 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n\t ];\n\t var directMergeKeys = ['validateStatus'];\n\t\n\t function getMergedValue(target, source) {\n\t if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n\t return utils.merge(target, source);\n\t } else if (utils.isPlainObject(source)) {\n\t return utils.merge({}, source);\n\t } else if (utils.isArray(source)) {\n\t return source.slice();\n\t }\n\t return source;\n\t }\n\t\n\t function mergeDeepProperties(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t }\n\t\n\t utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\t\n\t utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(directMergeKeys, function merge(prop) {\n\t if (prop in config2) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (prop in config1) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t var axiosKeys = valueFromConfig2Keys\n\t .concat(mergeDeepPropertiesKeys)\n\t .concat(defaultToConfig2Keys)\n\t .concat(directMergeKeys);\n\t\n\t var otherKeys = Object\n\t .keys(config1)\n\t .concat(Object.keys(config2))\n\t .filter(function filterAxiosKeys(key) {\n\t return axiosKeys.indexOf(key) === -1;\n\t });\n\t\n\t utils.forEach(otherKeys, mergeDeepProperties);\n\t\n\t return config;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the payload is an error thrown by Axios\n\t *\n\t * @param {*} payload The value to test\n\t * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n\t */\n\tmodule.exports = function isAxiosError(payload) {\n\t return (typeof payload === 'object') && (payload.isAxiosError === true);\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 081842adca0968bb3270","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAxiosError.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/server/node_modules/axios/index.d.ts b/server/node_modules/axios/index.d.ts old mode 100755 new mode 100644 index fc1fd18..c74e93c --- a/server/node_modules/axios/index.d.ts +++ b/server/node_modules/axios/index.d.ts @@ -29,15 +29,16 @@ export type Method = | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' + | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK' -export type ResponseType = - | 'arraybuffer' - | 'blob' - | 'document' - | 'json' - | 'text' +export type ResponseType = + | 'arraybuffer' + | 'blob' + | 'document' + | 'json' + | 'text' | 'stream' export interface AxiosRequestConfig { @@ -61,13 +62,15 @@ export interface AxiosRequestConfig { onUploadProgress?: (progressEvent: any) => void; onDownloadProgress?: (progressEvent: any) => void; maxContentLength?: number; - validateStatus?: (status: number) => boolean; + validateStatus?: ((status: number) => boolean) | null; + maxBodyLength?: number; maxRedirects?: number; socketPath?: string | null; httpAgent?: any; httpsAgent?: any; proxy?: AxiosProxyConfig | false; cancelToken?: CancelToken; + decompress?: boolean; } export interface AxiosResponse { @@ -150,8 +153,9 @@ export interface AxiosStatic extends AxiosInstance { isCancel(value: any): boolean; all(values: (T | Promise)[]): Promise; spread(callback: (...args: T[]) => R): (array: T[]) => R; + isAxiosError(payload: any): payload is AxiosError; } -declare const Axios: AxiosStatic; +declare const axios: AxiosStatic; -export default Axios; +export default axios; diff --git a/server/node_modules/axios/index.js b/server/node_modules/axios/index.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/adapters/README.md b/server/node_modules/axios/lib/adapters/README.md old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/adapters/http.js b/server/node_modules/axios/lib/adapters/http.js index 16dad12..f32241f 100755 --- a/server/node_modules/axios/lib/adapters/http.js +++ b/server/node_modules/axios/lib/adapters/http.js @@ -16,6 +16,31 @@ var enhanceError = require('../core/enhanceError'); var isHttps = /https:?/; +/** + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} proxy + * @param {string} location + */ +function setProxy(options, proxy, location) { + options.hostname = proxy.host; + options.host = proxy.host; + options.port = proxy.port; + options.path = location; + + // Basic proxy authorization + if (proxy.auth) { + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + // If a proxy is used, any redirects must also pass through the proxy + options.beforeRedirect = function beforeRedirect(redirection) { + redirection.headers.host = redirection.host; + setProxy(redirection, proxy, redirection.href); + }; +} + /*eslint consistent-return:0*/ module.exports = function httpAdapter(config) { return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { @@ -126,11 +151,11 @@ module.exports = function httpAdapter(config) { }); } - if (shouldProxy) { proxy = { host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port + port: parsedProxyUrl.port, + protocol: parsedProxyUrl.protocol }; if (parsedProxyUrl.auth) { @@ -145,17 +170,8 @@ module.exports = function httpAdapter(config) { } if (proxy) { - options.hostname = proxy.host; - options.host = proxy.host; options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - options.port = proxy.port; - options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } + setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); } var transport; @@ -171,8 +187,8 @@ module.exports = function httpAdapter(config) { transport = isHttpsProxy ? httpsFollow : httpFollow; } - if (config.maxContentLength && config.maxContentLength > -1) { - options.maxBodyLength = config.maxContentLength; + if (config.maxBodyLength > -1) { + options.maxBodyLength = config.maxBodyLength; } // Create the request @@ -181,22 +197,27 @@ module.exports = function httpAdapter(config) { // uncompress the response body transparently if required var stream = res; - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } // return the last request in case of redirects var lastRequest = res.req || req; + + // if no content, is HEAD request or decompress disabled we should not decompress + if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) { + switch (res.headers['content-encoding']) { + /*eslint default-case:0*/ + case 'gzip': + case 'compress': + case 'deflate': + // add the unzipper to the body stream processing pipeline + stream = stream.pipe(zlib.createUnzip()); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + } + } + var response = { status: res.statusCode, statusText: res.statusMessage, @@ -230,6 +251,9 @@ module.exports = function httpAdapter(config) { var responseData = Buffer.concat(responseBuffer); if (config.responseType !== 'arraybuffer') { responseData = responseData.toString(config.responseEncoding); + if (!config.responseEncoding || config.responseEncoding === 'utf8') { + responseData = utils.stripBOM(responseData); + } } response.data = responseData; @@ -240,7 +264,7 @@ module.exports = function httpAdapter(config) { // Handle errors req.on('error', function handleRequestError(err) { - if (req.aborted) return; + if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return; reject(enhanceError(err, config, null, req)); }); diff --git a/server/node_modules/axios/lib/adapters/xhr.js b/server/node_modules/axios/lib/adapters/xhr.js old mode 100755 new mode 100644 index 377e3e9..3027752 --- a/server/node_modules/axios/lib/adapters/xhr.js +++ b/server/node_modules/axios/lib/adapters/xhr.js @@ -2,6 +2,7 @@ var utils = require('./../utils'); var settle = require('./../core/settle'); +var cookies = require('./../helpers/cookies'); var buildURL = require('./../helpers/buildURL'); var buildFullPath = require('../core/buildFullPath'); var parseHeaders = require('./../helpers/parseHeaders'); @@ -22,7 +23,7 @@ module.exports = function xhrAdapter(config) { // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; - var password = config.auth.password || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } @@ -103,8 +104,6 @@ module.exports = function xhrAdapter(config) { // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { - var cookies = require('./../helpers/cookies'); - // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : @@ -170,7 +169,7 @@ module.exports = function xhrAdapter(config) { }); } - if (requestData === undefined) { + if (!requestData) { requestData = null; } diff --git a/server/node_modules/axios/lib/axios.js b/server/node_modules/axios/lib/axios.js old mode 100755 new mode 100644 index 8142437..c6357b0 --- a/server/node_modules/axios/lib/axios.js +++ b/server/node_modules/axios/lib/axios.js @@ -47,6 +47,9 @@ axios.all = function all(promises) { }; axios.spread = require('./helpers/spread'); +// Expose isAxiosError +axios.isAxiosError = require('./helpers/isAxiosError'); + module.exports = axios; // Allow use of default import syntax in TypeScript diff --git a/server/node_modules/axios/lib/cancel/Cancel.js b/server/node_modules/axios/lib/cancel/Cancel.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/cancel/CancelToken.js b/server/node_modules/axios/lib/cancel/CancelToken.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/cancel/isCancel.js b/server/node_modules/axios/lib/cancel/isCancel.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/Axios.js b/server/node_modules/axios/lib/core/Axios.js old mode 100755 new mode 100644 index fb34ace..c28c413 --- a/server/node_modules/axios/lib/core/Axios.js +++ b/server/node_modules/axios/lib/core/Axios.js @@ -73,9 +73,10 @@ Axios.prototype.getUri = function getUri(config) { utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { - return this.request(utils.merge(config || {}, { + return this.request(mergeConfig(config || {}, { method: method, - url: url + url: url, + data: (config || {}).data })); }; }); @@ -83,7 +84,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, data, config) { - return this.request(utils.merge(config || {}, { + return this.request(mergeConfig(config || {}, { method: method, url: url, data: data diff --git a/server/node_modules/axios/lib/core/InterceptorManager.js b/server/node_modules/axios/lib/core/InterceptorManager.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/README.md b/server/node_modules/axios/lib/core/README.md old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/buildFullPath.js b/server/node_modules/axios/lib/core/buildFullPath.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/createError.js b/server/node_modules/axios/lib/core/createError.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/dispatchRequest.js b/server/node_modules/axios/lib/core/dispatchRequest.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/core/enhanceError.js b/server/node_modules/axios/lib/core/enhanceError.js old mode 100755 new mode 100644 index 02fbbd6..b6bc444 --- a/server/node_modules/axios/lib/core/enhanceError.js +++ b/server/node_modules/axios/lib/core/enhanceError.js @@ -20,7 +20,7 @@ module.exports = function enhanceError(error, config, code, request, response) { error.response = response; error.isAxiosError = true; - error.toJSON = function() { + error.toJSON = function toJSON() { return { // Standard message: this.message, diff --git a/server/node_modules/axios/lib/core/mergeConfig.js b/server/node_modules/axios/lib/core/mergeConfig.js old mode 100755 new mode 100644 index 8e1ce61..5a2c10c --- a/server/node_modules/axios/lib/core/mergeConfig.js +++ b/server/node_modules/axios/lib/core/mergeConfig.js @@ -15,59 +15,73 @@ module.exports = function mergeConfig(config1, config2) { config2 = config2 || {}; var config = {}; - var valueFromConfig2Keys = ['url', 'method', 'params', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy']; + var valueFromConfig2Keys = ['url', 'method', 'data']; + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; var defaultToConfig2Keys = [ - 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', - 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath' + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', + 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', + 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' ]; + var directMergeKeys = ['validateStatus']; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); + } + } utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); } }); - utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) { - if (utils.isObject(config2[prop])) { - config[prop] = utils.deepMerge(config1[prop], config2[prop]); - } else if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (utils.isObject(config1[prop])) { - config[prop] = utils.deepMerge(config1[prop]); - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; + utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); + + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + config[prop] = getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + config[prop] = getMergedValue(undefined, config1[prop]); } }); - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; + utils.forEach(directMergeKeys, function merge(prop) { + if (prop in config2) { + config[prop] = getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + config[prop] = getMergedValue(undefined, config1[prop]); } }); var axiosKeys = valueFromConfig2Keys .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys); + .concat(defaultToConfig2Keys) + .concat(directMergeKeys); var otherKeys = Object - .keys(config2) + .keys(config1) + .concat(Object.keys(config2)) .filter(function filterAxiosKeys(key) { return axiosKeys.indexOf(key) === -1; }); - utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); + utils.forEach(otherKeys, mergeDeepProperties); return config; }; diff --git a/server/node_modules/axios/lib/core/settle.js b/server/node_modules/axios/lib/core/settle.js old mode 100755 new mode 100644 index 071d9e3..886adb0 --- a/server/node_modules/axios/lib/core/settle.js +++ b/server/node_modules/axios/lib/core/settle.js @@ -11,7 +11,7 @@ var createError = require('./createError'); */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; - if (!validateStatus || validateStatus(response.status)) { + if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( diff --git a/server/node_modules/axios/lib/core/transformData.js b/server/node_modules/axios/lib/core/transformData.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/defaults.js b/server/node_modules/axios/lib/defaults.js old mode 100755 new mode 100644 index 23e1cbd..2b2a1a7 --- a/server/node_modules/axios/lib/defaults.js +++ b/server/node_modules/axios/lib/defaults.js @@ -74,6 +74,7 @@ var defaults = { xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, + maxBodyLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; diff --git a/server/node_modules/axios/lib/helpers/README.md b/server/node_modules/axios/lib/helpers/README.md old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/bind.js b/server/node_modules/axios/lib/helpers/bind.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/buildURL.js b/server/node_modules/axios/lib/helpers/buildURL.js old mode 100755 new mode 100644 index 8c40e40..31595c3 --- a/server/node_modules/axios/lib/helpers/buildURL.js +++ b/server/node_modules/axios/lib/helpers/buildURL.js @@ -4,7 +4,6 @@ var utils = require('./../utils'); function encode(val) { return encodeURIComponent(val). - replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). diff --git a/server/node_modules/axios/lib/helpers/combineURLs.js b/server/node_modules/axios/lib/helpers/combineURLs.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/cookies.js b/server/node_modules/axios/lib/helpers/cookies.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/deprecatedMethod.js b/server/node_modules/axios/lib/helpers/deprecatedMethod.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/isAbsoluteURL.js b/server/node_modules/axios/lib/helpers/isAbsoluteURL.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/isAxiosError.js b/server/node_modules/axios/lib/helpers/isAxiosError.js new file mode 100644 index 0000000..29ff41a --- /dev/null +++ b/server/node_modules/axios/lib/helpers/isAxiosError.js @@ -0,0 +1,11 @@ +'use strict'; + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +module.exports = function isAxiosError(payload) { + return (typeof payload === 'object') && (payload.isAxiosError === true); +}; diff --git a/server/node_modules/axios/lib/helpers/isURLSameOrigin.js b/server/node_modules/axios/lib/helpers/isURLSameOrigin.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/normalizeHeaderName.js b/server/node_modules/axios/lib/helpers/normalizeHeaderName.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/parseHeaders.js b/server/node_modules/axios/lib/helpers/parseHeaders.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/helpers/spread.js b/server/node_modules/axios/lib/helpers/spread.js old mode 100755 new mode 100644 diff --git a/server/node_modules/axios/lib/utils.js b/server/node_modules/axios/lib/utils.js old mode 100755 new mode 100644 index e028c67..83eb1c6 --- a/server/node_modules/axios/lib/utils.js +++ b/server/node_modules/axios/lib/utils.js @@ -105,6 +105,21 @@ function isObject(val) { return val !== null && typeof val === 'object'; } +/** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ +function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; +} + /** * Determine if a value is a Date * @@ -261,34 +276,12 @@ function forEach(obj, fn) { function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { + if (isPlainObject(result[key]) && isPlainObject(val)) { result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function deepMerge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val); - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); } else { result[key] = val; } @@ -319,6 +312,19 @@ function extend(a, b, thisArg) { return a; } +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ +function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, @@ -328,6 +334,7 @@ module.exports = { isString: isString, isNumber: isNumber, isObject: isObject, + isPlainObject: isPlainObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, @@ -338,7 +345,7 @@ module.exports = { isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, - deepMerge: deepMerge, extend: extend, - trim: trim + trim: trim, + stripBOM: stripBOM }; diff --git a/server/node_modules/axios/node_modules/follow-redirects/LICENSE b/server/node_modules/axios/node_modules/follow-redirects/LICENSE new file mode 100644 index 0000000..742cbad --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/LICENSE @@ -0,0 +1,18 @@ +Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh + +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. diff --git a/server/node_modules/axios/node_modules/follow-redirects/README.md b/server/node_modules/axios/node_modules/follow-redirects/README.md new file mode 100644 index 0000000..ea618ab --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/README.md @@ -0,0 +1,148 @@ +## Follow Redirects + +Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. + +[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Build Status](https://github.com/follow-redirects/follow-redirects/workflows/CI/badge.svg)](https://github.com/follow-redirects/follow-redirects/actions) +[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) +[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) + +`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) + methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) + modules, with the exception that they will seamlessly follow redirects. + +```javascript +const { http, https } = require('follow-redirects'); + +http.get('http://bit.ly/900913', response => { + response.on('data', chunk => { + console.log(chunk); + }); +}).on('error', err => { + console.error(err); +}); +``` + +You can inspect the final redirected URL through the `responseUrl` property on the `response`. +If no redirection happened, `responseUrl` is the original request URL. + +```javascript +const request = https.request({ + host: 'bitly.com', + path: '/UHfDGO', +}, response => { + console.log(response.responseUrl); + // 'http://duckduckgo.com/robots.txt' +}); +request.end(); +``` + +## Options +### Global options +Global options are set directly on the `follow-redirects` module: + +```javascript +const followRedirects = require('follow-redirects'); +followRedirects.maxRedirects = 10; +followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB +``` + +The following global options are supported: + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +### Per-request options +Per-request options are set by passing an `options` object: + +```javascript +const url = require('url'); +const { http, https } = require('follow-redirects'); + +const options = url.parse('http://bit.ly/900913'); +options.maxRedirects = 10; +options.beforeRedirect = (options, { headers }) => { + // Use this to adjust the request options upon redirecting, + // to inspect the latest response headers, + // or to cancel the request by throwing an error + if (options.hostname === "example.com") { + options.auth = "user:password"; + } +}; +http.request(options); +``` + +In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), +the following per-request options are supported: +- `followRedirects` (default: `true`) – whether redirects should be followed. + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. + +- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` + +- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. + + +### Advanced usage +By default, `follow-redirects` will use the Node.js default implementations +of [`http`](https://nodejs.org/api/http.html) +and [`https`](https://nodejs.org/api/https.html). +To enable features such as caching and/or intermediate request tracking, +you might instead want to wrap `follow-redirects` around custom protocol implementations: + +```javascript +const { http, https } = require('follow-redirects').wrap({ + http: require('your-custom-http'), + https: require('your-custom-https'), +}); +``` + +Such custom protocols only need an implementation of the `request` method. + +## Browser Usage + +Due to the way the browser works, +the `http` and `https` browser equivalents perform redirects by default. + +By requiring `follow-redirects` this way: +```javascript +const http = require('follow-redirects/http'); +const https = require('follow-redirects/https'); +``` +you can easily tell webpack and friends to replace +`follow-redirect` by the built-in versions: + +```json +{ + "follow-redirects/http" : "http", + "follow-redirects/https" : "https" +} +``` + +## Contributing + +Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) + detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied + by tests. You can run the test suite locally with a simple `npm test` command. + +## Debug Logging + +`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging + set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test + suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. + +## Authors + +- [Ruben Verborgh](https://ruben.verborgh.org/) +- [Olivier Lalonde](mailto:olalonde@gmail.com) +- [James Talmage](mailto:james@talmage.io) + +## License + +[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/server/node_modules/axios/node_modules/follow-redirects/debug.js b/server/node_modules/axios/node_modules/follow-redirects/debug.js new file mode 100644 index 0000000..f2556d7 --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/debug.js @@ -0,0 +1,14 @@ +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = require("debug")("follow-redirects"); + } + catch (error) { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; diff --git a/server/node_modules/axios/node_modules/follow-redirects/http.js b/server/node_modules/axios/node_modules/follow-redirects/http.js new file mode 100644 index 0000000..695e356 --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/http.js @@ -0,0 +1 @@ +module.exports = require("./").http; diff --git a/server/node_modules/axios/node_modules/follow-redirects/https.js b/server/node_modules/axios/node_modules/follow-redirects/https.js new file mode 100644 index 0000000..d21c921 --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/https.js @@ -0,0 +1 @@ +module.exports = require("./").https; diff --git a/server/node_modules/axios/node_modules/follow-redirects/index.js b/server/node_modules/axios/node_modules/follow-redirects/index.js new file mode 100644 index 0000000..98db8ee --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/index.js @@ -0,0 +1,504 @@ +var url = require("url"); +var URL = url.URL; +var http = require("http"); +var https = require("https"); +var Writable = require("stream").Writable; +var assert = require("assert"); +var debug = require("./debug"); + +// Create handlers that pass events from native requests +var eventHandlers = Object.create(null); +["abort", "aborted", "connect", "error", "socket", "timeout"].forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +// Error types with codes +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded" +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + self._processResponse(response); + }; + + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); + +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (typeof encoding === "function") { + callback = encoding; + encoding = null; + } + + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; + +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (typeof data === "function") { + callback = data; + data = encoding = null; + } + else if (typeof encoding === "function") { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + if (callback) { + this.once("timeout", callback); + } + + if (this.socket) { + startTimer(this, msecs); + } + else { + var self = this; + this._currentRequest.once("socket", function () { + startTimer(self, msecs); + }); + } + + this.once("response", clearTimer); + this.once("error", clearTimer); + + return this; +}; + +function startTimer(request, msecs) { + clearTimeout(request._timeout); + request._timeout = setTimeout(function () { + request.emit("timeout"); + }, msecs); +} + +function clearTimer() { + clearTimeout(this._timeout); +} + +// Proxy all other public ClientRequest methods +[ + "abort", "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + this.emit("error", new TypeError("Unsupported protocol " + protocol)); + return; + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.substr(0, protocol.length - 1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + this._currentUrl = url.format(this._options); + + // Set up event handlers + request._redirectable = this; + for (var event in eventHandlers) { + /* istanbul ignore else */ + if (event) { + request.on(event, eventHandlers[event]); + } + } + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end. + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + /* istanbul ignore else */ + if (request === self._currentRequest) { + // Report any write errors + /* istanbul ignore if */ + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + /* istanbul ignore else */ + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + var location = response.headers.location; + if (location && this._options.followRedirects !== false && + statusCode >= 300 && statusCode < 400) { + // Abort the current request + this._currentRequest.removeAllListeners(); + this._currentRequest.on("error", noop); + this._currentRequest.abort(); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + this.emit("error", new TooManyRedirectsError()); + return; + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var previousHostName = removeMatchingHeaders(/^host$/i, this._options.headers) || + url.parse(this._currentUrl).hostname; + + // Create the redirected request + var redirectUrl = url.resolve(this._currentUrl, location); + debug("redirecting to", redirectUrl); + this._isRedirect = true; + var redirectUrlParts = url.parse(redirectUrl); + Object.assign(this._options, redirectUrlParts); + + // Drop the Authorization header if redirecting to another host + if (redirectUrlParts.hostname !== previousHostName) { + removeMatchingHeaders(/^authorization$/i, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (typeof this._options.beforeRedirect === "function") { + var responseDetails = { headers: response.headers }; + try { + this._options.beforeRedirect.call(null, this._options, responseDetails); + } + catch (err) { + this.emit("error", err); + return; + } + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + try { + this._performRequest(); + } + catch (cause) { + var error = new RedirectionError("Redirected request failed: " + cause.message); + error.cause = cause; + this.emit("error", error); + } + } + else { + // The response is not a redirect; return it as-is + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + } +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters + if (typeof input === "string") { + var urlStr = input; + try { + input = urlToOptions(new URL(urlStr)); + } + catch (err) { + /* istanbul ignore next */ + input = url.parse(urlStr); + } + } + else if (URL && (input instanceof URL)) { + input = urlToOptions(input); + } + else { + callback = options; + options = input; + input = { protocol: protocol }; + } + if (typeof options === "function") { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} + +/* istanbul ignore next */ +function noop() { /* empty */ } + +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js +function urlToOptions(urlObject) { + var options = { + protocol: urlObject.protocol, + hostname: urlObject.hostname.startsWith("[") ? + /* istanbul ignore next */ + urlObject.hostname.slice(1, -1) : + urlObject.hostname, + hash: urlObject.hash, + search: urlObject.search, + pathname: urlObject.pathname, + path: urlObject.pathname + urlObject.search, + href: urlObject.href, + }; + if (urlObject.port !== "") { + options.port = Number(urlObject.port); + } + return options; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return lastValue; +} + +function createErrorType(code, defaultMessage) { + function CustomError(message) { + Error.captureStackTrace(this, this.constructor); + this.message = message || defaultMessage; + } + CustomError.prototype = new Error(); + CustomError.prototype.constructor = CustomError; + CustomError.prototype.name = "Error [" + code + "]"; + CustomError.prototype.code = code; + return CustomError; +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; diff --git a/server/node_modules/axios/node_modules/follow-redirects/package.json b/server/node_modules/axios/node_modules/follow-redirects/package.json new file mode 100644 index 0000000..4862637 --- /dev/null +++ b/server/node_modules/axios/node_modules/follow-redirects/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "follow-redirects@1.13.2", + "/home/sigonasr2/divar/server" + ] + ], + "_from": "follow-redirects@1.13.2", + "_id": "follow-redirects@1.13.2", + "_inBundle": false, + "_integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", + "_location": "/axios/follow-redirects", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "follow-redirects@1.13.2", + "name": "follow-redirects", + "escapedName": "follow-redirects", + "rawSpec": "1.13.2", + "saveSpec": null, + "fetchSpec": "1.13.2" + }, + "_requiredBy": [ + "/axios" + ], + "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", + "_spec": "1.13.2", + "_where": "/home/sigonasr2/divar/server", + "author": { + "name": "Ruben Verborgh", + "email": "ruben@verborgh.org", + "url": "https://ruben.verborgh.org/" + }, + "bugs": { + "url": "https://github.com/follow-redirects/follow-redirects/issues" + }, + "contributors": [ + { + "name": "Olivier Lalonde", + "email": "olalonde@gmail.com", + "url": "http://www.syskall.com" + }, + { + "name": "James Talmage", + "email": "james@talmage.io" + } + ], + "description": "HTTP and HTTPS modules that follow redirects.", + "devDependencies": { + "concat-stream": "^2.0.0", + "eslint": "^5.16.0", + "express": "^4.16.4", + "lolex": "^3.1.0", + "mocha": "^6.0.2", + "nyc": "^14.1.1" + }, + "engines": { + "node": ">=4.0" + }, + "files": [ + "*.js" + ], + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "homepage": "https://github.com/follow-redirects/follow-redirects", + "keywords": [ + "http", + "https", + "url", + "redirect", + "client", + "location", + "utility" + ], + "license": "MIT", + "main": "index.js", + "name": "follow-redirects", + "peerDependenciesMeta": { + "debug": { + "optional": true + } + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git" + }, + "scripts": { + "lint": "eslint *.js test", + "mocha": "nyc mocha", + "test": "npm run lint && npm run mocha" + }, + "version": "1.13.2" +} diff --git a/server/node_modules/axios/package.json b/server/node_modules/axios/package.json old mode 100755 new mode 100644 index 2701294..b277337 --- a/server/node_modules/axios/package.json +++ b/server/node_modules/axios/package.json @@ -1,27 +1,31 @@ { - "_from": "axios@^0.19.2", - "_id": "axios@0.19.2", + "_args": [ + [ + "axios@0.21.1", + "/home/sigonasr2/divar/server" + ] + ], + "_from": "axios@0.21.1", + "_id": "axios@0.21.1", "_inBundle": false, - "_integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "_integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "_location": "/axios", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "axios@^0.19.2", + "raw": "axios@0.21.1", "name": "axios", "escapedName": "axios", - "rawSpec": "^0.19.2", + "rawSpec": "0.21.1", "saveSpec": null, - "fetchSpec": "^0.19.2" + "fetchSpec": "0.21.1" }, "_requiredBy": [ - "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "_shasum": "3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27", - "_spec": "axios@^0.19.2", + "_resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "_spec": "0.21.1", "_where": "/home/sigonasr2/divar/server", "author": { "name": "Matt Zabriskie" @@ -32,7 +36,6 @@ "bugs": { "url": "https://github.com/axios/axios/issues" }, - "bundleDependencies": false, "bundlesize": [ { "path": "./dist/axios.min.js", @@ -40,9 +43,8 @@ } ], "dependencies": { - "follow-redirects": "1.5.10" + "follow-redirects": "^1.10.0" }, - "deprecated": false, "description": "Promise based HTTP client for the browser and node.js", "devDependencies": { "bundlesize": "^0.17.0", @@ -82,6 +84,7 @@ "webpack-dev-server": "^1.14.1" }, "homepage": "https://github.com/axios/axios", + "jsdelivr": "dist/axios.min.js", "keywords": [ "xhr", "http", @@ -108,5 +111,6 @@ "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json" }, "typings": "./index.d.ts", - "version": "0.19.2" + "unpkg": "dist/axios.min.js", + "version": "0.21.1" } diff --git a/server/node_modules/bluebird/LICENSE b/server/node_modules/bluebird/LICENSE old mode 100755 new mode 100644 index 4182a1e..b24e635 --- a/server/node_modules/bluebird/LICENSE +++ b/server/node_modules/bluebird/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2015 Petka Antonov +Copyright (c) 2013-2018 Petka Antonov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/server/node_modules/bluebird/README.md b/server/node_modules/bluebird/README.md old mode 100755 new mode 100644 index 3772161..7c1dd66 --- a/server/node_modules/bluebird/README.md +++ b/server/node_modules/bluebird/README.md @@ -2,8 +2,10 @@ Promises/A+ logo + + [![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird) -[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html) +[![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html) **Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises) @@ -15,6 +17,10 @@ See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x). +### Note + +Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself. + # Questions and issues The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. @@ -29,7 +35,7 @@ Thanks to BrowserStack for providing us with a free account which lets us suppor The MIT License (MIT) -Copyright (c) 2013-2016 Petka Antonov +Copyright (c) 2013-2019 Petka Antonov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/server/node_modules/bluebird/changelog.md b/server/node_modules/bluebird/changelog.md old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/browser/bluebird.core.js b/server/node_modules/bluebird/js/browser/bluebird.core.js old mode 100755 new mode 100644 index ffb6538..24a8bf2 --- a/server/node_modules/bluebird/js/browser/bluebird.core.js +++ b/server/node_modules/bluebird/js/browser/bluebird.core.js @@ -1,7 +1,7 @@ /* @preserve * The MIT License (MIT) * - * Copyright (c) 2013-2015 Petka Antonov + * Copyright (c) 2013-2018 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,7 @@ * */ /** - * bluebird build version 3.4.7 + * bluebird build version 3.7.2 * Features enabled: core * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ @@ -33,7 +33,6 @@ var firstLineError; try {throw new Error(); } catch (e) {firstLineError = e;} var schedule = _dereq_("./schedule"); var Queue = _dereq_("./queue"); -var util = _dereq_("./util"); function Async() { this._customScheduler = false; @@ -41,7 +40,6 @@ function Async() { this._lateQueue = new Queue(16); this._normalQueue = new Queue(16); this._haveDrainedQueues = false; - this._trampolineEnabled = true; var self = this; this.drainQueues = function () { self._drainQueues(); @@ -60,16 +58,6 @@ Async.prototype.hasCustomScheduler = function() { return this._customScheduler; }; -Async.prototype.enableTrampoline = function() { - this._trampolineEnabled = true; -}; - -Async.prototype.disableTrampolineIfNecessary = function() { - if (util.hasDevTools) { - this._trampolineEnabled = false; - } -}; - Async.prototype.haveItemsQueued = function () { return this._isTickUsed || this._haveDrainedQueues; }; @@ -118,62 +106,33 @@ function AsyncSettlePromises(promise) { this._queueTick(); } -if (!util.hasDevTools) { - Async.prototype.invokeLater = AsyncInvokeLater; - Async.prototype.invoke = AsyncInvoke; - Async.prototype.settlePromises = AsyncSettlePromises; -} else { - Async.prototype.invokeLater = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvokeLater.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - setTimeout(function() { - fn.call(receiver, arg); - }, 100); - }); - } - }; +Async.prototype.invokeLater = AsyncInvokeLater; +Async.prototype.invoke = AsyncInvoke; +Async.prototype.settlePromises = AsyncSettlePromises; - Async.prototype.invoke = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvoke.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - fn.call(receiver, arg); - }); - } - }; - Async.prototype.settlePromises = function(promise) { - if (this._trampolineEnabled) { - AsyncSettlePromises.call(this, promise); - } else { - this._schedule(function() { - promise._settlePromises(); - }); - } - }; +function _drainQueue(queue) { + while (queue.length() > 0) { + _drainQueueStep(queue); + } } -Async.prototype._drainQueue = function(queue) { - while (queue.length() > 0) { - var fn = queue.shift(); - if (typeof fn !== "function") { - fn._settlePromises(); - continue; - } +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { var receiver = queue.shift(); var arg = queue.shift(); fn.call(receiver, arg); } -}; +} Async.prototype._drainQueues = function () { - this._drainQueue(this._normalQueue); + _drainQueue(this._normalQueue); this._reset(); this._haveDrainedQueues = true; - this._drainQueue(this._lateQueue); + _drainQueue(this._lateQueue); }; Async.prototype._queueTick = function () { @@ -190,7 +149,7 @@ Async.prototype._reset = function () { module.exports = Async; module.exports.firstLineError = firstLineError; -},{"./queue":17,"./schedule":18,"./util":21}],2:[function(_dereq_,module,exports){ +},{"./queue":17,"./schedule":18}],2:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { var calledBind = false; @@ -520,11 +479,12 @@ return Context; },{}],7:[function(_dereq_,module,exports){ "use strict"; -module.exports = function(Promise, Context) { -var getDomain = Promise._getDomain; +module.exports = function(Promise, Context, + enableAsyncHooks, disableAsyncHooks) { var async = Promise._async; var Warning = _dereq_("./errors").Warning; var util = _dereq_("./util"); +var es5 = _dereq_("./es5"); var canAttachTrace = util.canAttachTrace; var unhandledRejectionHandled; var possiblyUnhandledRejection; @@ -550,6 +510,34 @@ var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); +var deferUnhandledRejectionCheck; +(function() { + var promises = []; + + function unhandledRejectionCheck() { + for (var i = 0; i < promises.length; ++i) { + promises[i]._notifyUnhandledRejection(); + } + unhandledRejectionClear(); + } + + function unhandledRejectionClear() { + promises.length = 0; + } + + deferUnhandledRejectionCheck = function(promise) { + promises.push(promise); + setTimeout(unhandledRejectionCheck, 1); + }; + + es5.defineProperty(Promise, "_unhandledRejectionCheck", { + value: unhandledRejectionCheck + }); + es5.defineProperty(Promise, "_unhandledRejectionClear", { + value: unhandledRejectionClear + }); +})(); + Promise.prototype.suppressUnhandledRejections = function() { var target = this._target(); target._bitField = ((target._bitField & (~1048576)) | @@ -559,7 +547,7 @@ Promise.prototype.suppressUnhandledRejections = function() { Promise.prototype._ensurePossibleRejectionHandled = function () { if ((this._bitField & 524288) !== 0) return; this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); + deferUnhandledRejectionCheck(this); }; Promise.prototype._notifyUnhandledRejectionIsHandled = function () { @@ -617,19 +605,13 @@ Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { }; Promise.onPossiblyUnhandledRejection = function (fn) { - var domain = getDomain(); - possiblyUnhandledRejection = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + possiblyUnhandledRejection = util.contextBind(context, fn); }; Promise.onUnhandledRejectionHandled = function (fn) { - var domain = getDomain(); - unhandledRejectionHandled = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + unhandledRejectionHandled = util.contextBind(context, fn); }; var disableLongStackTraces = function() {}; @@ -640,6 +622,7 @@ Promise.longStackTraces = function () { if (!config.longStackTraces && longStackTracesIsSupported()) { var Promise_captureStackTrace = Promise.prototype._captureStackTrace; var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; config.longStackTraces = true; disableLongStackTraces = function() { if (async.haveItemsQueued() && !config.longStackTraces) { @@ -647,14 +630,14 @@ Promise.longStackTraces = function () { } Promise.prototype._captureStackTrace = Promise_captureStackTrace; Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; Context.deactivateLongStackTraces(); - async.enableTrampoline(); config.longStackTraces = false; }; Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; Context.activateLongStackTraces(); - async.disableTrampolineIfNecessary(); } }; @@ -662,37 +645,85 @@ Promise.hasLongStackTraces = function () { return config.longStackTraces && longStackTracesIsSupported(); }; + +var legacyHandlers = { + unhandledrejection: { + before: function() { + var ret = util.global.onunhandledrejection; + util.global.onunhandledrejection = null; + return ret; + }, + after: function(fn) { + util.global.onunhandledrejection = fn; + } + }, + rejectionhandled: { + before: function() { + var ret = util.global.onrejectionhandled; + util.global.onrejectionhandled = null; + return ret; + }, + after: function(fn) { + util.global.onrejectionhandled = fn; + } + } +}; + var fireDomEvent = (function() { + var dispatch = function(legacy, e) { + if (legacy) { + var fn; + try { + fn = legacy.before(); + return !util.global.dispatchEvent(e); + } finally { + legacy.after(fn); + } + } else { + return !util.global.dispatchEvent(e); + } + }; try { if (typeof CustomEvent === "function") { var event = new CustomEvent("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new CustomEvent(name.toLowerCase(), { + name = name.toLowerCase(); + var eventData = { detail: event, cancelable: true - }); - return !util.global.dispatchEvent(domEvent); + }; + var domEvent = new CustomEvent(name, eventData); + es5.defineProperty( + domEvent, "promise", {value: event.promise}); + es5.defineProperty( + domEvent, "reason", {value: event.reason}); + + return dispatch(legacyHandlers[name], domEvent); }; } else if (typeof Event === "function") { var event = new Event("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new Event(name.toLowerCase(), { + name = name.toLowerCase(); + var domEvent = new Event(name, { cancelable: true }); domEvent.detail = event; - return !util.global.dispatchEvent(domEvent); + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return dispatch(legacyHandlers[name], domEvent); }; } else { var event = document.createEvent("CustomEvent"); event.initCustomEvent("testingtheevent", false, true, {}); util.global.dispatchEvent(event); return function(name, event) { + name = name.toLowerCase(); var domEvent = document.createEvent("CustomEvent"); - domEvent.initCustomEvent(name.toLowerCase(), false, true, + domEvent.initCustomEvent(name, false, true, event); - return !util.global.dispatchEvent(domEvent); + return dispatch(legacyHandlers[name], domEvent); }; } } catch (e) {} @@ -810,6 +841,18 @@ Promise.config = function(opts) { Promise.prototype._fireEvent = defaultFireEvent; } } + if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) { + var prev = config.asyncHooks; + var cur = !!opts.asyncHooks; + if (prev !== cur) { + config.asyncHooks = cur; + if (cur) { + enableAsyncHooks(); + } else { + disableAsyncHooks(); + } + } + } return Promise; }; @@ -830,6 +873,7 @@ Promise.prototype._attachCancellationCallback = function(onCancel) { }; Promise.prototype._captureStackTrace = function () {}; Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; Promise.prototype._clearCancellationData = function() {}; Promise.prototype._propagateFrom = function (parent, flags) { ; @@ -935,6 +979,10 @@ function longStackTracesAttachExtraTrace(error, ignoreSelf) { } } +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) { if (returnValue === undefined && promiseCreated !== null && @@ -1192,8 +1240,8 @@ function parseLineInfo(line) { function setBounds(firstLineError, lastLineError) { if (!longStackTracesIsSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); var firstIndex = -1; var lastIndex = -1; var firstFileName; @@ -1402,12 +1450,16 @@ var config = { warnings: warnings, longStackTraces: false, cancellation: false, - monitoring: false + monitoring: false, + asyncHooks: false }; if (longStackTraces) Promise.longStackTraces(); return { + asyncHooks: function() { + return config.asyncHooks; + }, longStackTraces: function() { return config.longStackTraces; }, @@ -1436,7 +1488,7 @@ return { }; }; -},{"./errors":9,"./util":21}],8:[function(_dereq_,module,exports){ +},{"./errors":9,"./es5":10,"./util":21}],8:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise) { function returner() { @@ -1686,10 +1738,11 @@ if (isES5) { },{}],11:[function(_dereq_,module,exports){ "use strict"; -module.exports = function(Promise, tryConvertToPromise) { +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { var util = _dereq_("./util"); var CancellationError = Promise.CancellationError; var errorObj = util.errorObj; +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); function PassThroughHandlerContext(promise, type, handler) { this.promise = promise; @@ -1741,7 +1794,9 @@ function finallyHandler(reasonOrValue) { var ret = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue); - if (ret !== undefined) { + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { promise._setReturnedNonUndefined(); var maybePromise = tryConvertToPromise(ret, promise); if (maybePromise instanceof Promise) { @@ -1790,18 +1845,49 @@ Promise.prototype["finally"] = function (handler) { finallyHandler); }; + Promise.prototype.tap = function (handler) { return this._passThrough(handler, 1, finallyHandler); }; +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + return PassThroughHandlerContext; }; -},{"./util":21}],12:[function(_dereq_,module,exports){ +},{"./catch_filter":5,"./util":21}],12:[function(_dereq_,module,exports){ "use strict"; module.exports = -function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, - getDomain) { +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) { var util = _dereq_("./util"); var canEvaluate = util.canEvaluate; var tryCatch = util.tryCatch; @@ -1947,10 +2033,8 @@ Promise.join = function () { if (!ret._isFateSealed()) { if (holder.asyncNeeded) { - var domain = getDomain(); - if (domain !== null) { - holder.fn = util.domainBind(domain, holder.fn); - } + var context = Promise._getContext(); + holder.fn = util.contextBind(context, holder.fn); } ret._setAsyncGuaranteed(); ret._setOnCancel(holder); @@ -2092,20 +2176,42 @@ var apiRejection = function(msg) { function Proxyable() {} var UNDEFINED_BINDING = {}; var util = _dereq_("./util"); +util.setReflectHandler(reflectHandler); -var getDomain; -if (util.isNode) { - getDomain = function() { - var ret = process.domain; - if (ret === undefined) ret = null; - return ret; - }; -} else { - getDomain = function() { +var getDomain = function() { + var domain = process.domain; + if (domain === undefined) { return null; + } + return domain; +}; +var getContextDefault = function() { + return null; +}; +var getContextDomain = function() { + return { + domain: getDomain(), + async: null }; -} -util.notEnumerableProp(Promise, "_getDomain", getDomain); +}; +var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ? + _dereq_("async_hooks").AsyncResource : null; +var getContextAsyncHooks = function() { + return { + domain: getDomain(), + async: new AsyncResource("Bluebird::Promise") + }; +}; +var getContext = util.isNode ? getContextDomain : getContextDefault; +util.notEnumerableProp(Promise, "_getContext", getContext); +var enableAsyncHooks = function() { + getContext = getContextAsyncHooks; + util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks); +}; +var disableAsyncHooks = function() { + getContext = getContextDomain; + util.notEnumerableProp(Promise, "_getContext", getContextDomain); +}; var es5 = _dereq_("./es5"); var Async = _dereq_("./async"); @@ -2129,33 +2235,36 @@ var PromiseArray = var Context = _dereq_("./context")(Promise); /*jshint unused:false*/ var createContext = Context.create; -var debug = _dereq_("./debuggability")(Promise, Context); + +var debug = _dereq_("./debuggability")(Promise, Context, + enableAsyncHooks, disableAsyncHooks); var CapturedTrace = debug.CapturedTrace; var PassThroughHandlerContext = - _dereq_("./finally")(Promise, tryConvertToPromise); + _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); var nodebackForPromise = _dereq_("./nodeback"); var errorObj = util.errorObj; var tryCatch = util.tryCatch; function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } if (typeof executor !== "function") { throw new TypeError("expecting a function but got " + util.classString(executor)); } - if (self.constructor !== Promise) { - throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); - } + } function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } this._bitField = 0; this._fulfillmentHandler0 = undefined; this._rejectionHandler0 = undefined; this._promise0 = undefined; this._receiver0 = undefined; - if (executor !== INTERNAL) { - check(this, executor); - this._resolveFromExecutor(executor); - } + this._resolveFromExecutor(executor); this._promiseCreated(); this._fireEvent("promiseCreated", this); } @@ -2174,12 +2283,17 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { if (util.isObject(item)) { catchInstances[j++] = item; } else { - return apiRejection("expecting an object but got " + - "A catch statement predicate " + util.classString(item)); + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); } } catchInstances.length = j; fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } return this.then(undefined, catchFilter(catchInstances, fn, this)); } return this.then(undefined, fn); @@ -2320,7 +2434,7 @@ Promise.prototype._then = function ( this._fireEvent("promiseChained", this, promise); } - var domain = getDomain(); + var context = getContext(); if (!((bitField & 50397184) === 0)) { var handler, value, settler = target._settlePromiseCtx; if (((bitField & 33554432) !== 0)) { @@ -2338,15 +2452,14 @@ Promise.prototype._then = function ( } async.invoke(settler, target, { - handler: domain === null ? handler - : (typeof handler === "function" && - util.domainBind(domain, handler)), + handler: util.contextBind(context, handler), promise: promise, receiver: receiver, value: value }); } else { - target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + target._addCallbacks(didFulfill, didReject, promise, + receiver, context); } return promise; @@ -2407,7 +2520,15 @@ Promise.prototype._setWillBeCancelled = function() { Promise.prototype._setAsyncGuaranteed = function() { if (async.hasCustomScheduler()) return; - this._bitField = this._bitField | 134217728; + var bitField = this._bitField; + this._bitField = bitField | + (((bitField & 536870912) >> 2) ^ + 134217728); +}; + +Promise.prototype._setNoAsyncGuarantee = function() { + this._bitField = (this._bitField | 536870912) & + (~134217728); }; Promise.prototype._receiverAt = function (index) { @@ -2462,7 +2583,7 @@ Promise.prototype._addCallbacks = function ( reject, promise, receiver, - domain + context ) { var index = this._length(); @@ -2475,12 +2596,10 @@ Promise.prototype._addCallbacks = function ( this._promise0 = promise; this._receiver0 = receiver; if (typeof fulfill === "function") { - this._fulfillmentHandler0 = - domain === null ? fulfill : util.domainBind(domain, fulfill); + this._fulfillmentHandler0 = util.contextBind(context, fulfill); } if (typeof reject === "function") { - this._rejectionHandler0 = - domain === null ? reject : util.domainBind(domain, reject); + this._rejectionHandler0 = util.contextBind(context, reject); } } else { var base = index * 4 - 4; @@ -2488,11 +2607,11 @@ Promise.prototype._addCallbacks = function ( this[base + 3] = receiver; if (typeof fulfill === "function") { this[base + 0] = - domain === null ? fulfill : util.domainBind(domain, fulfill); + util.contextBind(context, fulfill); } if (typeof reject === "function") { this[base + 1] = - domain === null ? reject : util.domainBind(domain, reject); + util.contextBind(context, reject); } } this._setLength(index + 1); @@ -2512,6 +2631,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { if (shouldBind) this._propagateFrom(maybePromise, 2); + var promise = maybePromise._target(); if (promise === this) { @@ -2528,7 +2648,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { } this._setFollowing(); this._setLength(0); - this._setFollowee(promise); + this._setFollowee(maybePromise); } else if (((bitField & 33554432) !== 0)) { this._fulfill(promise._value()); } else if (((bitField & 16777216) !== 0)) { @@ -2554,6 +2674,7 @@ function(reason, synchronous, ignoreNonErrorWarnings) { }; Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; var promise = this; this._captureStackTrace(); this._pushContext(); @@ -2717,6 +2838,7 @@ Promise.prototype._fulfill = function (value) { } else { async.settlePromises(this); } + this._dereferenceTrace(); } }; @@ -2785,6 +2907,14 @@ Promise.prototype._settledValue = function() { } }; +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + function deferResolve(v) {this.promise._resolveCallback(v);} function deferReject(v) {this.promise._rejectCallback(v, false);} @@ -2809,9 +2939,9 @@ _dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); _dereq_("./direct_resolve")(Promise); _dereq_("./synchronous_inspection")(Promise); _dereq_("./join")( - Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async); Promise.Promise = Promise; -Promise.version = "3.4.7"; +Promise.version = "3.7.2"; util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); @@ -2837,7 +2967,7 @@ Promise.version = "3.4.7"; }; -},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(_dereq_,module,exports){ +},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21,"async_hooks":undefined}],16:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) { @@ -2848,6 +2978,7 @@ function toResolutionValue(val) { switch(val) { case -2: return []; case -3: return {}; + case -6: return new Map(); } } @@ -2855,6 +2986,7 @@ function PromiseArray(values) { var promise = this._promise = new Promise(INTERNAL); if (values instanceof Promise) { promise._propagateFrom(values, 3); + values.suppressUnhandledRejections(); } promise._setOnCancel(this); this._values = values; @@ -3121,7 +3253,8 @@ if (util.isNode && typeof MutationObserver === "undefined") { } else if ((typeof MutationObserver !== "undefined") && !(typeof window !== "undefined" && window.navigator && - (window.navigator.standalone || window.cordova))) { + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { schedule = (function() { var div = document.createElement("div"); var opts = {attributes: true}; @@ -3135,11 +3268,11 @@ if (util.isNode && typeof MutationObserver === "undefined") { var scheduleToggle = function() { if (toggleScheduled) return; - toggleScheduled = true; - div2.classList.toggle("foo"); - }; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; - return function schedule(fn) { + return function schedule(fn) { var o = new MutationObserver(function() { o.disconnect(); fn(); @@ -3552,8 +3685,12 @@ function toFastProperties(obj) { /*jshint -W027,-W055,-W031*/ function FakeConstructor() {} FakeConstructor.prototype = obj; - var l = 8; - while (l--) new FakeConstructor(); + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); return obj; eval(obj); } @@ -3580,10 +3717,11 @@ function safeToString(obj) { } function isError(obj) { - return obj !== null && + return obj instanceof Error || + (obj !== null && typeof obj === "object" && typeof obj.message === "string" && - typeof obj.name === "string"; + typeof obj.name === "string"); } function markAsOriginatingFromRejection(e) { @@ -3678,18 +3816,42 @@ function getNativePromise() { if (typeof Promise === "function") { try { var promise = new Promise(function(){}); - if ({}.toString.call(promise) === "[object Promise]") { + if (classString(promise) === "[object Promise]") { return Promise; } } catch (e) {} } } -function domainBind(self, cb) { - return self.bind(cb); +var reflectHandler; +function contextBind(ctx, cb) { + if (ctx === null || + typeof cb !== "function" || + cb === reflectHandler) { + return cb; + } + + if (ctx.domain !== null) { + cb = ctx.domain.bind(cb); + } + + var async = ctx.async; + if (async !== null) { + var old = cb; + cb = function() { + var args = (new Array(2)).concat([].slice.call(arguments));; + args[0] = old; + args[1] = this; + return async.runInAsyncScope.apply(async, args); + }; + } + return cb; } var ret = { + setReflectHandler: function(fn) { + reflectHandler = fn; + }, isClass: isClass, isIdentifier: isIdentifier, inheritedDataKeys: inheritedDataKeys, @@ -3716,24 +3878,37 @@ var ret = { markAsOriginatingFromRejection: markAsOriginatingFromRejection, classString: classString, copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", isNode: isNode, hasEnvVariables: hasEnvVariables, env: env, global: globalObject, getNativePromise: getNativePromise, - domainBind: domainBind + contextBind: contextBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } return (version[0] === 0 && version[1] > 10) || (version[0] > 0); })(); +ret.nodeSupportsAsyncResource = ret.isNode && (function() { + var supportsAsync = false; + try { + var res = _dereq_("async_hooks").AsyncResource; + supportsAsync = typeof res.prototype.runInAsyncScope === "function"; + } catch (e) { + supportsAsync = false; + } + return supportsAsync; +})(); if (ret.isNode) ret.toFastProperties(process); try {throw new Error(); } catch (e) {ret.lastLineError = e;} module.exports = ret; -},{"./es5":10}]},{},[3])(3) +},{"./es5":10,"async_hooks":undefined}]},{},[3])(3) }); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/server/node_modules/bluebird/js/browser/bluebird.core.min.js b/server/node_modules/bluebird/js/browser/bluebird.core.min.js old mode 100755 new mode 100644 index 84bc422..836176e --- a/server/node_modules/bluebird/js/browser/bluebird.core.min.js +++ b/server/node_modules/bluebird/js/browser/bluebird.core.min.js @@ -1,7 +1,7 @@ /* @preserve * The MIT License (MIT) * - * Copyright (c) 2013-2015 Petka Antonov + * Copyright (c) 2013-2018 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,9 @@ * */ /** - * bluebird build version 3.4.7 + * bluebird build version 3.7.2 * Features enabled: core * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+I.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?I.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new x(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);I.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),I.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=C(s),l=c.length-1;l>=0;--l){var u=c[l];if(!V.test(u)){var p=u.match(Q);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}tt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?w(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(I.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){B.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||k(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():I.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+T(e)+">, no stack trace)"}function T(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(nt=function(t){if(D.test(t))return!0;var e=R(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function x(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,x),e>32&&this.uncycle()}var O,A,L,N=e._getDomain,B=e._async,U=t("./errors").Warning,I=t("./util"),H=I.canAttachTrace,D=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,G=null,M=!1,W=!(0==I.env("BLUEBIRD_DEBUG")||!I.env("BLUEBIRD_DEBUG")&&"development"!==I.env("NODE_ENV")),$=!(0==I.env("BLUEBIRD_WARNINGS")||!W&&!I.env("BLUEBIRD_WARNINGS")),z=!(0==I.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!I.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=I.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!I.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=N();A="function"==typeof t?null===e?t:I.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=N();O="function"==typeof t?null===e?t:I.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),B.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&P()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!I.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!I.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),I.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!I.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return I.isNode?function(){return process.emit.apply(process,arguments)}:I.global?function(t){var e="on"+t.toLowerCase(),n=I.global[e];return n?(n.apply(I.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){B.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){B.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,X=ot.warnings,I.isObject(n)&&"wForgottenReturn"in n&&(X=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;I.inherits(x,Error),n.CapturedTrace=x,x.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;b(r),m(r),I.notEnumerableProp(t,"stack",g(n,r)),I.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,G=e;var n=Error.captureStackTrace;return nt=function(t){return D.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,G=e,M=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},I.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:I.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return z&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return f},checkForgottenReturns:d,setBounds:S,warn:y,deprecated:v,CapturedTrace:x,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":9,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return c.call(this,this.promise._target()._settledValue())}function s(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var f=n(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var h=new u("late cancellation observer");return r._attachExtraTrace(h),p.e=h,p}f.isPending()&&f._attachCancellationCallback(new i(this))}return f._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("expecting an object but got A catch statement predicate "+h.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise(); -},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=x(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,f=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),f=e),v.invoke(d,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:_})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=x(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=x(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===S?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,x(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.4.7",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(d.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return L.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function o(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},r.prototype.invokeLater=o,r.prototype.invoke=i,r.prototype.settlePromises=a,r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(i),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===i&&(Promise=o)}catch(t){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=t("./promise")();i.noConflict=r,e.exports=i},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),a=i.tryCatch,s=i.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var n=0;n=0?i[t]:void 0}var o=!1,i=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=i.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,o=!1},o=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){function i(t,e){return{promise:e}}function a(){return!1}function s(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+V.toString(t));r._attachCancellationCallback(t)})}catch(o){return o}}function c(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?V.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function l(){return this._onCancelField}function u(t){this._onCancelField=t}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function _(){this._trace=new H(this._peekContext())}function v(t,e){if(q(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=F(t);V.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),V.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(){this._trace=void 0}function g(t,e,n,r,o){if(void 0===t&&null!==e&&Z){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=E(s),l=c.length-1;l>=0;--l){var u=c[l];if(!M.test(u)){var p=u.match(W);p&&(i="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function m(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),b(n)}function b(t,n,r){if(ut.warnings){var o,i=new D(t);if(n)r._attachExtraTrace(i);else if(ut.longStackTraces&&(o=e._peekContext()))o.attachExtraTrace(i);else{var a=F(i);i.stack=a.message+"\n"+a.stack.join("\n")}it("warning",i)||T(i,"",!0)}}function C(t,e){for(var n=0;n=0;--s)if(r[s]===i){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[o]!==c)break;e.pop(),o--}e=r}}function E(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function F(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:E(e)}}function T(t,e,n){if("undefined"!=typeof console){var r;if(V.isObject(t)){var o=t.stack;r=e+z(o,t)}else r=e+String(t);"function"==typeof B?B(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function x(t,e,n,r){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(i){I.throwLater(i)}"unhandledRejection"===t?it(t,n,r)||o||T(n,"Unhandled rejection "):it(t,r)}function R(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():V.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(o){}0===e.length&&(e="(empty array)")}return"(<"+S(e)+">, no stack trace)"}function S(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(st=function(t){if(G.test(t))return!0;var e=O(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function H(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);lt(this,H),e>32&&this.uncycle()}var N,L,B,U,I=e._async,D=t("./errors").Warning,V=t("./util"),Q=t("./es5"),q=V.canAttachTrace,G=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,M=/\((?:timers\.js):\d+:\d+\)/,W=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,$=null,z=null,X=!1,K=!(0==V.env("BLUEBIRD_DEBUG")||!V.env("BLUEBIRD_DEBUG")&&"development"!==V.env("NODE_ENV")),J=!(0==V.env("BLUEBIRD_WARNINGS")||!K&&!V.env("BLUEBIRD_WARNINGS")),Y=!(0==V.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!V.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=V.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(J||!!V.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){function t(){for(var t=0;t0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return b(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var n=e._getContext();L=V.contextBind(n,t)},e.onUnhandledRejectionHandled=function(t){var n=e._getContext();N=V.contextBind(n,t)};var tt=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ut.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,o=e.prototype._dereferenceTrace;ut.longStackTraces=!0,tt=function(){if(I.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=o,n.deactivateLongStackTraces(),ut.longStackTraces=!1},e.prototype._captureStackTrace=_,e.prototype._attachExtraTrace=v,e.prototype._dereferenceTrace=y,n.activateLongStackTraces()}},e.hasLongStackTraces=function(){return ut.longStackTraces&&P()};var et={unhandledrejection:{before:function(){var t=V.global.onunhandledrejection;return V.global.onunhandledrejection=null,t},after:function(t){V.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=V.global.onrejectionhandled;return V.global.onrejectionhandled=null,t},after:function(t){V.global.onrejectionhandled=t}}},nt=function(){var t=function(t,e){if(!t)return!V.global.dispatchEvent(e);var n;try{return n=t.before(),!V.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r={detail:n,cancelable:!0},o=new CustomEvent(e,r);return Q.defineProperty(o,"promise",{value:n.promise}),Q.defineProperty(o,"reason",{value:n.reason}),t(et[e],o)}}if("function"==typeof Event){var e=new Event("CustomEvent");return V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,Q.defineProperty(r,"promise",{value:n.promise}),Q.defineProperty(r,"reason",{value:n.reason}),t(et[e],r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(et[e],r)}}catch(n){}return function(){return!1}}(),rt=function(){return V.isNode?function(){return process.emit.apply(process,arguments)}:V.global?function(t){var e="on"+t.toLowerCase(),n=V.global[e];return n?(n.apply(V.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),ot={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},it=function(t){var e=!1;try{e=rt.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=nt(t,ot[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&tt()),"warnings"in t){var n=t.warnings;ut.warnings=!!n,Z=ut.warnings,V.isObject(n)&&"wForgottenReturn"in n&&(Z=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ut.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=p,e.prototype._propagateFrom=f,e.prototype._onCancel=l,e.prototype._setOnCancel=u,e.prototype._attachCancellationCallback=c,e.prototype._execute=s,at=f,ut.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!ut.monitoring?(ut.monitoring=!0,e.prototype._fireEvent=it):!t.monitoring&&ut.monitoring&&(ut.monitoring=!1,e.prototype._fireEvent=a)),"asyncHooks"in t&&V.nodeSupportsAsyncResource){var i=ut.asyncHooks,h=!!t.asyncHooks;i!==h&&(ut.asyncHooks=h,h?r():o())}return e},e.prototype._fireEvent=a,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var at=h,st=function(){return!1},ct=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;V.inherits(H,Error),n.CapturedTrace=H,H.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,o=this;void 0!==o;++r)e.push(o),o=o._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var i=e[r].stack;void 0===n[i]&&(n[i]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},H.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=F(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(E(o.stack.split("\n"))),o=o._parent;k(r),w(r),V.notEnumerableProp(t,"stack",C(n,r)),V.notEnumerableProp(t,"__stackCleaned__",!0)}};var lt=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():R(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,$=t,z=e;var n=Error.captureStackTrace;return st=function(t){return G.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return $=/@/,z=e,X=!0,function(t){t.stack=(new Error).stack};var o;try{throw new Error}catch(i){o="stack"in i}return"stack"in r||!o||"number"!=typeof Error.stackTraceLimit?(z=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?R(e):e.toString()},null):($=t,z=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(B=function(t){console.warn(t)},V.isNode&&process.stderr.isTTY?B=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:V.isNode||"string"!=typeof(new Error).stack||(B=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ut={warnings:J,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return Y&&e.longStackTraces(),{asyncHooks:function(){return ut.asyncHooks},longStackTraces:function(){return ut.longStackTraces},warnings:function(){return ut.warnings},cancellation:function(){return ut.cancellation},monitoring:function(){return ut.monitoring},propagateFromFunction:function(){return at},boundValueFunction:function(){return d},checkForgottenReturns:g,setBounds:A,warn:b,deprecated:m,CapturedTrace:H,fireDomEvent:nt,fireGlobalEvent:rt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var o=function(){return r};return this.caught(n,o)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function o(t){return this instanceof o?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(t)}var i,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{i=TypeError,a=RangeError}catch(v){i=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var o=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(o._boundValue()):l.call(o._boundValue(),t);if(u===r)return u;if(void 0!==u){o._setReturnedNonUndefined();var h=n(u,o);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new p("late cancellation observer");return o._attachExtraTrace(d),f.e=d,f}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,c,void 0,this,void 0)}}}return o.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return o.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new o(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,o=new Array(n-1),i=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));o[i++]=a}o.length=i;var s=arguments[r];return this._passThrough(h(o,s,this),1,void 0,l)},o}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var o=[].slice.call(arguments);t&&o.pop();var r=new n(o).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var o=s(t).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return o("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return i.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function o(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),o=0;o1){var n,r=new Array(e-1),o=0; +for(n=0;e-1>n;++n){var i=arguments[n];if(!f.isObject(i))return u("Catch statement predicate: expecting an object but got "+f.classString(i));r[o++]=i}if(r.length=o,t=arguments[n],"function"!=typeof t)throw new j("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,N(r,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},o.prototype.then=function(t,e){if(A.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?u("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,x,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new P(this).promise()},o.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},o.getNewLibraryCopy=e.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(T);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=U(t)(L(e,n));return r===B&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new P(t).promise()},o.cast=function(t){var e=S(t);return e instanceof o||(e=new o(T),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(T);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new j("expecting a function but got "+f.classString(t));return k.setScheduler(t)},o.prototype._then=function(t,e,n,r,i){var a=void 0!==i,s=a?i:new o(T),c=this._target(),l=c._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var u=g();if(0!==(50397184&l)){var p,h,d=c._settlePromiseCtx;0!==(33554432&l)?(h=c._rejectionHandler0,p=t):0!==(16777216&l)?(h=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(d=c._settlePromiseLateCancellationObserver,h=new F("late cancellation observer"),c._attachExtraTrace(h),p=e),k.invoke(d,c,{handler:f.contextBind(u,p),promise:s,receiver:r,value:h})}else c._addCallbacks(t,e,s,r,u);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){if(!k.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},o.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===p?void 0:void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=p),this._addCallbacks(e,n,r,o,null)},o.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=p),this._addCallbacks(n,r,o,i,null)},o.prototype._addCallbacks=function(t,e,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=f.contextBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=f.contextBind(o,e));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=f.contextBind(o,t)),"function"==typeof e&&(this[a+1]=f.contextBind(o,e))}return this._setLength(i+1),i},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var n=S(t,this);if(!(n instanceof o))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var i=r._bitField;if(0===(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(r._value());else if(0!==(16777216&i))this._reject(r._reason());else{var l=new F("late cancellation observer");r._attachExtraTrace(l),this._reject(l)}}},o.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),o=r===t;if(!o&&!n&&A.warnings()){var i="a promise was rejected with a non-error: "+f.classString(t);this._warn(i,!0)}this._attachExtraTrace(r,e?o:!1),this._reject(t)},o.prototype._resolveFromExecutor=function(t){if(t!==T){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},o.prototype._settlePromiseFromHandler=function(t,e,n,r){var o=r._bitField;if(0===(65536&o)){r._pushContext();var i;e===x?n&&"number"==typeof n.length?i=U(t).apply(this._boundValue(),n):(i=B,i.e=new j("cannot .spread() a non-array: "+f.classString(n))):i=U(t).call(e,n);var a=r._popContext();o=r._bitField,0===(65536&o)&&(i===R?r._reject(n):i===B?r._rejectCallback(i.e,!1):(A.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof H&&r.isFinallyHandler()?(r.cancelPromise=t,U(e).call(r,i)===B&&t._reject(B.e)):e===l?t._fulfill(l.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof P?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,i=t.value;"function"==typeof e?n instanceof o?this._settlePromiseFromHandler(e,r,i,n):e.call(r,i,n):n instanceof o&&n._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,o,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():k.settlePromises(this),this._dereferenceTrace())}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?k.fatalError(t,f.isNode):void((65535&e)>0?k.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},o.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&C.defineProperty(o.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),o.defer=o.pending=function(){A.deprecated("Promise.defer","new Promise");var t=new o(T);return{promise:t,resolve:i,reject:a}},f.notEnumerableProp(o,"_makeSelfResolutionError",c),t("./method")(o,T,S,u,A),t("./bind")(o,T,S,A),t("./cancel")(o,P,u,A),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,P,S,T,k),o.Promise=o,o.version="3.7.2",f.toFastProperties(o),f.toFastProperties(o.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new o(T)),A.setBounds(w.firstLineError,f.lastLineError),o}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21,async_hooks:void 0}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&(r._propagateFrom(t,3),t.suppressUnhandledRejections()),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var i=r(this._values,this._promise);if(i instanceof e){i=i._target();var s=i._bitField;if(this._values=i,0===(50397184&s))return this._promise._setAsyncGuaranteed(),i._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(i._reason()):this._cancel();i=i._value()}if(i=c.asArray(i),null===i){var u=o("expecting an array or an iterable object but got "+c.classString(i)).reason();return void this._promise._rejectCallback(u,!1)}return 0===i.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(i)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise,i=!1,a=null,s=0;n>s;++s){var c=r(t[s],o);c instanceof e?(c=c._target(),a=c._bitField):a=null,i?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):i=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(c,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;ni;++i)n[i+r]=t[i+e],t[i+e]=void 0}function o(t){this._capacity=t,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)o[n]=t[n];return o[n]=e,o}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(i(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=A.test(t+"")&&F.names(t).length>0;if(n||r||o)return!0}return!1}catch(i){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function d(t){return H.test(t)}function _(t,e,n){for(var r=new Array(t),o=0;t>o;++o)r[o]=e+o+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),o=0;o10||t[0]>0}(),V.nodeSupportsAsyncResource=V.isNode&&function(){var e=!1;try{var n=t("async_hooks").AsyncResource;e="function"==typeof n.prototype.runInAsyncScope}catch(r){e=!1}return e}(),V.isNode&&V.toFastProperties(process);try{throw new Error}catch(Q){V.lastLineError=Q}e.exports=V},{"./es5":10,async_hooks:void 0}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/server/node_modules/bluebird/js/browser/bluebird.js b/server/node_modules/bluebird/js/browser/bluebird.js old mode 100755 new mode 100644 index dc80cb6..7f0686f --- a/server/node_modules/bluebird/js/browser/bluebird.js +++ b/server/node_modules/bluebird/js/browser/bluebird.js @@ -1,7 +1,7 @@ /* @preserve * The MIT License (MIT) * - * Copyright (c) 2013-2015 Petka Antonov + * Copyright (c) 2013-2018 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,7 @@ * */ /** - * bluebird build version 3.4.7 + * bluebird build version 3.7.2 * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0) { + _drainQueueStep(queue); + } } -Async.prototype._drainQueue = function(queue) { - while (queue.length() > 0) { - var fn = queue.shift(); - if (typeof fn !== "function") { - fn._settlePromises(); - continue; - } +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { var receiver = queue.shift(); var arg = queue.shift(); fn.call(receiver, arg); } -}; +} Async.prototype._drainQueues = function () { - this._drainQueue(this._normalQueue); + _drainQueue(this._normalQueue); this._reset(); this._haveDrainedQueues = true; - this._drainQueue(this._lateQueue); + _drainQueue(this._lateQueue); }; Async.prototype._queueTick = function () { @@ -212,7 +171,7 @@ Async.prototype._reset = function () { module.exports = Async; module.exports.firstLineError = firstLineError; -},{"./queue":26,"./schedule":29,"./util":36}],3:[function(_dereq_,module,exports){ +},{"./queue":26,"./schedule":29}],3:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { var calledBind = false; @@ -667,11 +626,12 @@ return Context; },{}],9:[function(_dereq_,module,exports){ "use strict"; -module.exports = function(Promise, Context) { -var getDomain = Promise._getDomain; +module.exports = function(Promise, Context, + enableAsyncHooks, disableAsyncHooks) { var async = Promise._async; var Warning = _dereq_("./errors").Warning; var util = _dereq_("./util"); +var es5 = _dereq_("./es5"); var canAttachTrace = util.canAttachTrace; var unhandledRejectionHandled; var possiblyUnhandledRejection; @@ -697,6 +657,34 @@ var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); +var deferUnhandledRejectionCheck; +(function() { + var promises = []; + + function unhandledRejectionCheck() { + for (var i = 0; i < promises.length; ++i) { + promises[i]._notifyUnhandledRejection(); + } + unhandledRejectionClear(); + } + + function unhandledRejectionClear() { + promises.length = 0; + } + + deferUnhandledRejectionCheck = function(promise) { + promises.push(promise); + setTimeout(unhandledRejectionCheck, 1); + }; + + es5.defineProperty(Promise, "_unhandledRejectionCheck", { + value: unhandledRejectionCheck + }); + es5.defineProperty(Promise, "_unhandledRejectionClear", { + value: unhandledRejectionClear + }); +})(); + Promise.prototype.suppressUnhandledRejections = function() { var target = this._target(); target._bitField = ((target._bitField & (~1048576)) | @@ -706,7 +694,7 @@ Promise.prototype.suppressUnhandledRejections = function() { Promise.prototype._ensurePossibleRejectionHandled = function () { if ((this._bitField & 524288) !== 0) return; this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); + deferUnhandledRejectionCheck(this); }; Promise.prototype._notifyUnhandledRejectionIsHandled = function () { @@ -764,19 +752,13 @@ Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { }; Promise.onPossiblyUnhandledRejection = function (fn) { - var domain = getDomain(); - possiblyUnhandledRejection = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + possiblyUnhandledRejection = util.contextBind(context, fn); }; Promise.onUnhandledRejectionHandled = function (fn) { - var domain = getDomain(); - unhandledRejectionHandled = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + unhandledRejectionHandled = util.contextBind(context, fn); }; var disableLongStackTraces = function() {}; @@ -787,6 +769,7 @@ Promise.longStackTraces = function () { if (!config.longStackTraces && longStackTracesIsSupported()) { var Promise_captureStackTrace = Promise.prototype._captureStackTrace; var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; config.longStackTraces = true; disableLongStackTraces = function() { if (async.haveItemsQueued() && !config.longStackTraces) { @@ -794,14 +777,14 @@ Promise.longStackTraces = function () { } Promise.prototype._captureStackTrace = Promise_captureStackTrace; Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; Context.deactivateLongStackTraces(); - async.enableTrampoline(); config.longStackTraces = false; }; Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; Context.activateLongStackTraces(); - async.disableTrampolineIfNecessary(); } }; @@ -809,37 +792,85 @@ Promise.hasLongStackTraces = function () { return config.longStackTraces && longStackTracesIsSupported(); }; + +var legacyHandlers = { + unhandledrejection: { + before: function() { + var ret = util.global.onunhandledrejection; + util.global.onunhandledrejection = null; + return ret; + }, + after: function(fn) { + util.global.onunhandledrejection = fn; + } + }, + rejectionhandled: { + before: function() { + var ret = util.global.onrejectionhandled; + util.global.onrejectionhandled = null; + return ret; + }, + after: function(fn) { + util.global.onrejectionhandled = fn; + } + } +}; + var fireDomEvent = (function() { + var dispatch = function(legacy, e) { + if (legacy) { + var fn; + try { + fn = legacy.before(); + return !util.global.dispatchEvent(e); + } finally { + legacy.after(fn); + } + } else { + return !util.global.dispatchEvent(e); + } + }; try { if (typeof CustomEvent === "function") { var event = new CustomEvent("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new CustomEvent(name.toLowerCase(), { + name = name.toLowerCase(); + var eventData = { detail: event, cancelable: true - }); - return !util.global.dispatchEvent(domEvent); + }; + var domEvent = new CustomEvent(name, eventData); + es5.defineProperty( + domEvent, "promise", {value: event.promise}); + es5.defineProperty( + domEvent, "reason", {value: event.reason}); + + return dispatch(legacyHandlers[name], domEvent); }; } else if (typeof Event === "function") { var event = new Event("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new Event(name.toLowerCase(), { + name = name.toLowerCase(); + var domEvent = new Event(name, { cancelable: true }); domEvent.detail = event; - return !util.global.dispatchEvent(domEvent); + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return dispatch(legacyHandlers[name], domEvent); }; } else { var event = document.createEvent("CustomEvent"); event.initCustomEvent("testingtheevent", false, true, {}); util.global.dispatchEvent(event); return function(name, event) { + name = name.toLowerCase(); var domEvent = document.createEvent("CustomEvent"); - domEvent.initCustomEvent(name.toLowerCase(), false, true, + domEvent.initCustomEvent(name, false, true, event); - return !util.global.dispatchEvent(domEvent); + return dispatch(legacyHandlers[name], domEvent); }; } } catch (e) {} @@ -957,6 +988,18 @@ Promise.config = function(opts) { Promise.prototype._fireEvent = defaultFireEvent; } } + if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) { + var prev = config.asyncHooks; + var cur = !!opts.asyncHooks; + if (prev !== cur) { + config.asyncHooks = cur; + if (cur) { + enableAsyncHooks(); + } else { + disableAsyncHooks(); + } + } + } return Promise; }; @@ -977,6 +1020,7 @@ Promise.prototype._attachCancellationCallback = function(onCancel) { }; Promise.prototype._captureStackTrace = function () {}; Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; Promise.prototype._clearCancellationData = function() {}; Promise.prototype._propagateFrom = function (parent, flags) { ; @@ -1082,6 +1126,10 @@ function longStackTracesAttachExtraTrace(error, ignoreSelf) { } } +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) { if (returnValue === undefined && promiseCreated !== null && @@ -1339,8 +1387,8 @@ function parseLineInfo(line) { function setBounds(firstLineError, lastLineError) { if (!longStackTracesIsSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); var firstIndex = -1; var lastIndex = -1; var firstFileName; @@ -1549,12 +1597,16 @@ var config = { warnings: warnings, longStackTraces: false, cancellation: false, - monitoring: false + monitoring: false, + asyncHooks: false }; if (longStackTraces) Promise.longStackTraces(); return { + asyncHooks: function() { + return config.asyncHooks; + }, longStackTraces: function() { return config.longStackTraces; }, @@ -1583,7 +1635,7 @@ return { }; }; -},{"./errors":12,"./util":36}],10:[function(_dereq_,module,exports){ +},{"./errors":12,"./es5":13,"./util":36}],10:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise) { function returner() { @@ -1879,10 +1931,11 @@ Promise.filter = function (promises, fn, options) { },{}],15:[function(_dereq_,module,exports){ "use strict"; -module.exports = function(Promise, tryConvertToPromise) { +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { var util = _dereq_("./util"); var CancellationError = Promise.CancellationError; var errorObj = util.errorObj; +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); function PassThroughHandlerContext(promise, type, handler) { this.promise = promise; @@ -1934,7 +1987,9 @@ function finallyHandler(reasonOrValue) { var ret = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue); - if (ret !== undefined) { + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { promise._setReturnedNonUndefined(); var maybePromise = tryConvertToPromise(ret, promise); if (maybePromise instanceof Promise) { @@ -1983,14 +2038,46 @@ Promise.prototype["finally"] = function (handler) { finallyHandler); }; + Promise.prototype.tap = function (handler) { return this._passThrough(handler, 1, finallyHandler); }; +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + return PassThroughHandlerContext; }; -},{"./util":36}],16:[function(_dereq_,module,exports){ +},{"./catch_filter":7,"./util":36}],16:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise, apiRejection, @@ -2150,7 +2237,7 @@ PromiseSpawn.prototype._continue = function (result) { if (maybePromise === null) { this._promiseRejected( new TypeError( - "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", value) + + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) + "From coroutine:\u000a" + this._stack.split("\n").slice(1, -7).join("\n") ) @@ -2218,8 +2305,7 @@ Promise.spawn = function (generatorFunction) { },{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){ "use strict"; module.exports = -function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, - getDomain) { +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) { var util = _dereq_("./util"); var canEvaluate = util.canEvaluate; var tryCatch = util.tryCatch; @@ -2365,10 +2451,8 @@ Promise.join = function () { if (!ret._isFateSealed()) { if (holder.asyncNeeded) { - var domain = getDomain(); - if (domain !== null) { - holder.fn = util.domainBind(domain, holder.fn); - } + var context = Promise._getContext(); + holder.fn = util.contextBind(context, holder.fn); } ret._setAsyncGuaranteed(); ret._setOnCancel(holder); @@ -2393,7 +2477,6 @@ module.exports = function(Promise, tryConvertToPromise, INTERNAL, debug) { -var getDomain = Promise._getDomain; var util = _dereq_("./util"); var tryCatch = util.tryCatch; var errorObj = util.errorObj; @@ -2402,8 +2485,8 @@ var async = Promise._async; function MappingPromiseArray(promises, fn, limit, _filter) { this.constructor$(promises); this._promise._captureStackTrace(); - var domain = getDomain(); - this._callback = domain === null ? fn : util.domainBind(domain, fn); + var context = Promise._getContext(); + this._callback = util.contextBind(context, fn); this._preservedValues = _filter === INTERNAL ? new Array(this.length()) : null; @@ -2411,6 +2494,14 @@ function MappingPromiseArray(promises, fn, limit, _filter) { this._inFlight = 0; this._queue = []; async.invoke(this._asyncInit, this, undefined); + if (util.isArray(promises)) { + for (var i = 0; i < promises.length; ++i) { + var maybePromise = promises[i]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + } } util.inherits(MappingPromiseArray, PromiseArray); @@ -2740,20 +2831,42 @@ var apiRejection = function(msg) { function Proxyable() {} var UNDEFINED_BINDING = {}; var util = _dereq_("./util"); +util.setReflectHandler(reflectHandler); -var getDomain; -if (util.isNode) { - getDomain = function() { - var ret = process.domain; - if (ret === undefined) ret = null; - return ret; - }; -} else { - getDomain = function() { +var getDomain = function() { + var domain = process.domain; + if (domain === undefined) { return null; + } + return domain; +}; +var getContextDefault = function() { + return null; +}; +var getContextDomain = function() { + return { + domain: getDomain(), + async: null }; -} -util.notEnumerableProp(Promise, "_getDomain", getDomain); +}; +var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ? + _dereq_("async_hooks").AsyncResource : null; +var getContextAsyncHooks = function() { + return { + domain: getDomain(), + async: new AsyncResource("Bluebird::Promise") + }; +}; +var getContext = util.isNode ? getContextDomain : getContextDefault; +util.notEnumerableProp(Promise, "_getContext", getContext); +var enableAsyncHooks = function() { + getContext = getContextAsyncHooks; + util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks); +}; +var disableAsyncHooks = function() { + getContext = getContextDomain; + util.notEnumerableProp(Promise, "_getContext", getContextDomain); +}; var es5 = _dereq_("./es5"); var Async = _dereq_("./async"); @@ -2777,33 +2890,36 @@ var PromiseArray = var Context = _dereq_("./context")(Promise); /*jshint unused:false*/ var createContext = Context.create; -var debug = _dereq_("./debuggability")(Promise, Context); + +var debug = _dereq_("./debuggability")(Promise, Context, + enableAsyncHooks, disableAsyncHooks); var CapturedTrace = debug.CapturedTrace; var PassThroughHandlerContext = - _dereq_("./finally")(Promise, tryConvertToPromise); + _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); var nodebackForPromise = _dereq_("./nodeback"); var errorObj = util.errorObj; var tryCatch = util.tryCatch; function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } if (typeof executor !== "function") { throw new TypeError("expecting a function but got " + util.classString(executor)); } - if (self.constructor !== Promise) { - throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); - } + } function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } this._bitField = 0; this._fulfillmentHandler0 = undefined; this._rejectionHandler0 = undefined; this._promise0 = undefined; this._receiver0 = undefined; - if (executor !== INTERNAL) { - check(this, executor); - this._resolveFromExecutor(executor); - } + this._resolveFromExecutor(executor); this._promiseCreated(); this._fireEvent("promiseCreated", this); } @@ -2822,12 +2938,17 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { if (util.isObject(item)) { catchInstances[j++] = item; } else { - return apiRejection("expecting an object but got " + - "A catch statement predicate " + util.classString(item)); + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); } } catchInstances.length = j; fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } return this.then(undefined, catchFilter(catchInstances, fn, this)); } return this.then(undefined, fn); @@ -2968,7 +3089,7 @@ Promise.prototype._then = function ( this._fireEvent("promiseChained", this, promise); } - var domain = getDomain(); + var context = getContext(); if (!((bitField & 50397184) === 0)) { var handler, value, settler = target._settlePromiseCtx; if (((bitField & 33554432) !== 0)) { @@ -2986,15 +3107,14 @@ Promise.prototype._then = function ( } async.invoke(settler, target, { - handler: domain === null ? handler - : (typeof handler === "function" && - util.domainBind(domain, handler)), + handler: util.contextBind(context, handler), promise: promise, receiver: receiver, value: value }); } else { - target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + target._addCallbacks(didFulfill, didReject, promise, + receiver, context); } return promise; @@ -3055,7 +3175,15 @@ Promise.prototype._setWillBeCancelled = function() { Promise.prototype._setAsyncGuaranteed = function() { if (async.hasCustomScheduler()) return; - this._bitField = this._bitField | 134217728; + var bitField = this._bitField; + this._bitField = bitField | + (((bitField & 536870912) >> 2) ^ + 134217728); +}; + +Promise.prototype._setNoAsyncGuarantee = function() { + this._bitField = (this._bitField | 536870912) & + (~134217728); }; Promise.prototype._receiverAt = function (index) { @@ -3110,7 +3238,7 @@ Promise.prototype._addCallbacks = function ( reject, promise, receiver, - domain + context ) { var index = this._length(); @@ -3123,12 +3251,10 @@ Promise.prototype._addCallbacks = function ( this._promise0 = promise; this._receiver0 = receiver; if (typeof fulfill === "function") { - this._fulfillmentHandler0 = - domain === null ? fulfill : util.domainBind(domain, fulfill); + this._fulfillmentHandler0 = util.contextBind(context, fulfill); } if (typeof reject === "function") { - this._rejectionHandler0 = - domain === null ? reject : util.domainBind(domain, reject); + this._rejectionHandler0 = util.contextBind(context, reject); } } else { var base = index * 4 - 4; @@ -3136,11 +3262,11 @@ Promise.prototype._addCallbacks = function ( this[base + 3] = receiver; if (typeof fulfill === "function") { this[base + 0] = - domain === null ? fulfill : util.domainBind(domain, fulfill); + util.contextBind(context, fulfill); } if (typeof reject === "function") { this[base + 1] = - domain === null ? reject : util.domainBind(domain, reject); + util.contextBind(context, reject); } } this._setLength(index + 1); @@ -3160,6 +3286,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { if (shouldBind) this._propagateFrom(maybePromise, 2); + var promise = maybePromise._target(); if (promise === this) { @@ -3176,7 +3303,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { } this._setFollowing(); this._setLength(0); - this._setFollowee(promise); + this._setFollowee(maybePromise); } else if (((bitField & 33554432) !== 0)) { this._fulfill(promise._value()); } else if (((bitField & 16777216) !== 0)) { @@ -3202,6 +3329,7 @@ function(reason, synchronous, ignoreNonErrorWarnings) { }; Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; var promise = this; this._captureStackTrace(); this._pushContext(); @@ -3365,6 +3493,7 @@ Promise.prototype._fulfill = function (value) { } else { async.settlePromises(this); } + this._dereferenceTrace(); } }; @@ -3433,6 +3562,14 @@ Promise.prototype._settledValue = function() { } }; +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + function deferResolve(v) {this.promise._resolveCallback(v);} function deferReject(v) {this.promise._rejectCallback(v, false);} @@ -3457,14 +3594,12 @@ _dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); _dereq_("./direct_resolve")(Promise); _dereq_("./synchronous_inspection")(Promise); _dereq_("./join")( - Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async); Promise.Promise = Promise; -Promise.version = "3.4.7"; -_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +Promise.version = "3.7.2"; _dereq_('./call_get.js')(Promise); -_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); -_dereq_('./timers.js')(Promise, INTERNAL, debug); _dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); _dereq_('./nodeify.js')(Promise); _dereq_('./promisify.js')(Promise, INTERNAL); _dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); @@ -3472,9 +3607,11 @@ _dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); _dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); _dereq_('./settle.js')(Promise, PromiseArray, debug); _dereq_('./some.js')(Promise, PromiseArray, apiRejection); -_dereq_('./filter.js')(Promise, INTERNAL); -_dereq_('./each.js')(Promise, INTERNAL); +_dereq_('./timers.js')(Promise, INTERNAL, debug); +_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); _dereq_('./any.js')(Promise); +_dereq_('./each.js')(Promise, INTERNAL); +_dereq_('./filter.js')(Promise, INTERNAL); util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); @@ -3500,7 +3637,7 @@ _dereq_('./any.js')(Promise); }; -},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(_dereq_,module,exports){ +},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,"async_hooks":undefined}],23:[function(_dereq_,module,exports){ "use strict"; module.exports = function(Promise, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) { @@ -3511,6 +3648,7 @@ function toResolutionValue(val) { switch(val) { case -2: return []; case -3: return {}; + case -6: return new Map(); } } @@ -3518,6 +3656,7 @@ function PromiseArray(values) { var promise = this._promise = new Promise(INTERNAL); if (values instanceof Promise) { promise._propagateFrom(values, 3); + values.suppressUnhandledRejections(); } promise._setOnCancel(this); this._values = values; @@ -4060,7 +4199,7 @@ function PropertiesPromiseArray(obj) { } this.constructor$(entries); this._isMap = isMap; - this._init$(undefined, -3); + this._init$(undefined, isMap ? -6 : -3); } util.inherits(PropertiesPromiseArray, PromiseArray); @@ -4256,14 +4395,13 @@ module.exports = function(Promise, tryConvertToPromise, INTERNAL, debug) { -var getDomain = Promise._getDomain; var util = _dereq_("./util"); var tryCatch = util.tryCatch; function ReductionPromiseArray(promises, fn, initialValue, _each) { this.constructor$(promises); - var domain = getDomain(); - this._fn = domain === null ? fn : util.domainBind(domain, fn); + var context = Promise._getContext(); + this._fn = util.contextBind(context, fn); if (initialValue !== undefined) { initialValue = Promise.resolve(initialValue); initialValue._attachCancellationCallback(this); @@ -4283,8 +4421,8 @@ function ReductionPromiseArray(promises, fn, initialValue, _each) { util.inherits(ReductionPromiseArray, PromiseArray); ReductionPromiseArray.prototype._gotAccum = function(accum) { - if (this._eachValues !== undefined && - this._eachValues !== null && + if (this._eachValues !== undefined && + this._eachValues !== null && accum !== INTERNAL) { this._eachValues.push(accum); } @@ -4340,6 +4478,13 @@ ReductionPromiseArray.prototype._iterate = function (values) { this._currentCancellable = value; + for (var j = i; j < length; ++j) { + var maybePromise = values[j]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + if (!value.isRejected()) { for (; i < length; ++i) { var ctx = { @@ -4349,7 +4494,12 @@ ReductionPromiseArray.prototype._iterate = function (values) { length: length, array: this }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + + if ((i & 127) === 0) { + value._setNoAsyncGuarantee(); + } } } @@ -4445,7 +4595,8 @@ if (util.isNode && typeof MutationObserver === "undefined") { } else if ((typeof MutationObserver !== "undefined") && !(typeof window !== "undefined" && window.navigator && - (window.navigator.standalone || window.cordova))) { + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { schedule = (function() { var div = document.createElement("div"); var opts = {attributes: true}; @@ -4459,11 +4610,11 @@ if (util.isNode && typeof MutationObserver === "undefined") { var scheduleToggle = function() { if (toggleScheduled) return; - toggleScheduled = true; - div2.classList.toggle("foo"); - }; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; - return function schedule(fn) { + return function schedule(fn) { var o = new MutationObserver(function() { o.disconnect(); fn(); @@ -4525,6 +4676,10 @@ Promise.settle = function (promises) { return new SettledPromiseArray(promises).promise(); }; +Promise.allSettled = function (promises) { + return new SettledPromiseArray(promises).promise(); +}; + Promise.prototype.settle = function () { return Promise.settle(this); }; @@ -5394,8 +5549,12 @@ function toFastProperties(obj) { /*jshint -W027,-W055,-W031*/ function FakeConstructor() {} FakeConstructor.prototype = obj; - var l = 8; - while (l--) new FakeConstructor(); + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); return obj; eval(obj); } @@ -5422,10 +5581,11 @@ function safeToString(obj) { } function isError(obj) { - return obj !== null && + return obj instanceof Error || + (obj !== null && typeof obj === "object" && typeof obj.message === "string" && - typeof obj.name === "string"; + typeof obj.name === "string"); } function markAsOriginatingFromRejection(e) { @@ -5520,18 +5680,42 @@ function getNativePromise() { if (typeof Promise === "function") { try { var promise = new Promise(function(){}); - if ({}.toString.call(promise) === "[object Promise]") { + if (classString(promise) === "[object Promise]") { return Promise; } } catch (e) {} } } -function domainBind(self, cb) { - return self.bind(cb); +var reflectHandler; +function contextBind(ctx, cb) { + if (ctx === null || + typeof cb !== "function" || + cb === reflectHandler) { + return cb; + } + + if (ctx.domain !== null) { + cb = ctx.domain.bind(cb); + } + + var async = ctx.async; + if (async !== null) { + var old = cb; + cb = function() { + var args = (new Array(2)).concat([].slice.call(arguments));; + args[0] = old; + args[1] = this; + return async.runInAsyncScope.apply(async, args); + }; + } + return cb; } var ret = { + setReflectHandler: function(fn) { + reflectHandler = fn; + }, isClass: isClass, isIdentifier: isIdentifier, inheritedDataKeys: inheritedDataKeys, @@ -5558,24 +5742,37 @@ var ret = { markAsOriginatingFromRejection: markAsOriginatingFromRejection, classString: classString, copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", isNode: isNode, hasEnvVariables: hasEnvVariables, env: env, global: globalObject, getNativePromise: getNativePromise, - domainBind: domainBind + contextBind: contextBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } return (version[0] === 0 && version[1] > 10) || (version[0] > 0); })(); +ret.nodeSupportsAsyncResource = ret.isNode && (function() { + var supportsAsync = false; + try { + var res = _dereq_("async_hooks").AsyncResource; + supportsAsync = typeof res.prototype.runInAsyncScope === "function"; + } catch (e) { + supportsAsync = false; + } + return supportsAsync; +})(); if (ret.isNode) ret.toFastProperties(process); try {throw new Error(); } catch (e) {ret.lastLineError = e;} module.exports = ret; -},{"./es5":13}]},{},[4])(4) +},{"./es5":13,"async_hooks":undefined}]},{},[4])(4) }); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/server/node_modules/bluebird/js/browser/bluebird.min.js b/server/node_modules/bluebird/js/browser/bluebird.min.js old mode 100755 new mode 100644 index 242bbfe..c1e907b --- a/server/node_modules/bluebird/js/browser/bluebird.min.js +++ b/server/node_modules/bluebird/js/browser/bluebird.min.js @@ -1,7 +1,7 @@ /* @preserve * The MIT License (MIT) * - * Copyright (c) 2013-2015 Petka Antonov + * Copyright (c) 2013-2018 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,9 @@ * */ /** - * bluebird build version 3.4.7 + * bluebird build version 3.7.2 * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(N(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function m(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function k(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){I.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,H=t("./util"),N=H.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),z=!(0==H.env("BLUEBIRD_WARNINGS")||!G&&!H.env("BLUEBIRD_WARNINGS")),X=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!H.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),g(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(D=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,E,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,x),t("./settle.js")(i,E,x),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){ -if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var u;try{throw new Error}catch(l){u=l}var p=t("./schedule"),f=t("./queue");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s,r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=u},{"./queue":26,"./schedule":29}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var u=n(o),l=new t(e);l._propagateFrom(this,1);var p=this._target();if(l._setBoundTo(u),u instanceof t){var f={promiseRejectionQueued:!1,promise:l,target:p,bindingPromise:u};p._then(e,s,void 0,l,f),u._then(a,c,void 0,l,f),l._setOnCancel(u)}else l._resolveCallback(p);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,e){return{promise:e}}function s(){return!1}function a(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+B.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function c(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?B.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function l(t){this._onCancelField=t}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function _(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new V(this._peekContext())}function v(t,e){if(q(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=F(t);B.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),B.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(){this._trace=void 0}function g(t,e,n,r,i){if(void 0===t&&null!==e&&Z){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=k(a),u=c.length-1;u>=0;--u){var l=c[u];if(!Q.test(l)){var p=l.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],u=0;u0&&(s="\n"+a[u-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(h,!0,e)}}function m(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),b(n)}function b(t,n,r){if(lt.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(lt.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=F(o);o.stack=s.message+"\n"+s.stack.join("\n")}ot("warning",o)||x(o,"",!0)}}function w(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function k(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function F(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:k(e)}}function x(t,e,n){if("undefined"!=typeof console){var r;if(B.isObject(t)){var i=t.stack;r=e+X(i,t)}else r=e+String(t);"function"==typeof I?I(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function T(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){N.throwLater(o)}"unhandledRejection"===t?ot(t,n,r)||i||x(n,"Unhandled rejection "):ot(t,r)}function P(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():B.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+R(e)+">, no stack trace)"}function R(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(at=function(t){if($.test(t))return!0;var e=O(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function V(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ut(this,V),e>32&&this.uncycle()}var H,D,I,L,N=e._async,U=t("./errors").Warning,B=t("./util"),M=t("./es5"),q=B.canAttachTrace,$=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,Q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,z=null,X=null,W=!1,K=!(0==B.env("BLUEBIRD_DEBUG")||!B.env("BLUEBIRD_DEBUG")&&"development"!==B.env("NODE_ENV")),J=!(0==B.env("BLUEBIRD_WARNINGS")||!K&&!B.env("BLUEBIRD_WARNINGS")),Y=!(0==B.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!B.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=B.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(J||!!B.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){function t(){for(var t=0;t0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return b(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var n=e._getContext();D=B.contextBind(n,t)},e.onUnhandledRejectionHandled=function(t){var n=e._getContext();H=B.contextBind(n,t)};var tt=function(){};e.longStackTraces=function(){if(N.haveItemsQueued()&&!lt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!lt.longStackTraces&&S()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;lt.longStackTraces=!0,tt=function(){if(N.haveItemsQueued()&&!lt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),lt.longStackTraces=!1},e.prototype._captureStackTrace=d,e.prototype._attachExtraTrace=v,e.prototype._dereferenceTrace=y,n.activateLongStackTraces()}},e.hasLongStackTraces=function(){return lt.longStackTraces&&S()};var et={unhandledrejection:{before:function(){var t=B.global.onunhandledrejection;return B.global.onunhandledrejection=null,t},after:function(t){B.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=B.global.onrejectionhandled;return B.global.onrejectionhandled=null,t},after:function(t){B.global.onrejectionhandled=t}}},nt=function(){var t=function(t,e){if(!t)return!B.global.dispatchEvent(e);var n;try{return n=t.before(),!B.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r={detail:n,cancelable:!0},i=new CustomEvent(e,r);return M.defineProperty(i,"promise",{value:n.promise}),M.defineProperty(i,"reason",{value:n.reason}),t(et[e],i)}}if("function"==typeof Event){var e=new Event("CustomEvent");return B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,M.defineProperty(r,"promise",{value:n.promise}),M.defineProperty(r,"reason",{value:n.reason}),t(et[e],r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(et[e],r)}}catch(n){}return function(){return!1}}(),rt=function(){return B.isNode?function(){return process.emit.apply(process,arguments)}:B.global?function(t){var e="on"+t.toLowerCase(),n=B.global[e];return n?(n.apply(B.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),it={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:o},ot=function(t){var e=!1;try{e=rt.apply(null,arguments)}catch(n){N.throwLater(n),e=!0}var r=!1;try{r=nt(t,it[t].apply(null,arguments))}catch(n){N.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&tt()),"warnings"in t){var n=t.warnings;lt.warnings=!!n,Z=lt.warnings,B.isObject(n)&&"wForgottenReturn"in n&&(Z=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!lt.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=p,e.prototype._propagateFrom=f,e.prototype._onCancel=u,e.prototype._setOnCancel=l,e.prototype._attachCancellationCallback=c,e.prototype._execute=a,st=f,lt.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!lt.monitoring?(lt.monitoring=!0,e.prototype._fireEvent=ot):!t.monitoring&<.monitoring&&(lt.monitoring=!1,e.prototype._fireEvent=s)),"asyncHooks"in t&&B.nodeSupportsAsyncResource){var o=lt.asyncHooks,h=!!t.asyncHooks;o!==h&&(lt.asyncHooks=h,h?r():i())}return e},e.prototype._fireEvent=s,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var st=h,at=function(){return!1},ct=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;B.inherits(V,Error),n.CapturedTrace=V,V.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var u=c._length+1,l=r-2;l>=0;--l)e[l]._length=u,u++;return}}}},V.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=F(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(k(i.stack.split("\n"))),i=i._parent;j(r),C(r),B.notEnumerableProp(t,"stack",w(n,r)),B.notEnumerableProp(t,"__stackCleaned__",!0)}};var ut=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():P(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,z=t,X=e;var n=Error.captureStackTrace;return at=function(t){return $.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return z=/@/,X=e,W=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(X=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?P(e):e.toString()},null):(z=t,X=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(I=function(t){console.warn(t)},B.isNode&&process.stderr.isTTY?I=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:B.isNode||"string"!=typeof(new Error).stack||(I=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var lt={warnings:J,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return Y&&e.longStackTraces(),{asyncHooks:function(){return lt.asyncHooks},longStackTraces:function(){return lt.longStackTraces},warnings:function(){return lt.warnings},cancellation:function(){return lt.cancellation},monitoring:function(){return lt.monitoring},propagateFromFunction:function(){return st},boundValueFunction:function(){return _},checkForgottenReturns:g,setBounds:A,warn:b,deprecated:m,CapturedTrace:V,fireDomEvent:nt,fireGlobalEvent:rt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return l(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,u=t("./util"),l=u.inherits,p=u.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return u.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(f.e=t,f)}function u(t){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),t);if(l===r)return l;if(void 0!==l){i._setReturnedNonUndefined();var h=n(l,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),f.e=_,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),f.e=t,f):(s(this),t)}var l=t("./util"),p=e.CancellationError,f=l.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,u);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!l.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+l.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(h(i,a,this),1,void 0,u)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t),this._promise._captureStackTrace();var s=e._getContext();if(this._callback=u.contextBind(s,n),this._preservedValues=i===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0),u.isArray(t))for(var a=0;a=1?s:0,new a(t,n,s,o).promise()}var u=t("./util"),l=u.tryCatch,p=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var u=this._promise,f=this._callback,h=u._boundValue();u._pushContext();var _=l(f).call(h,t,n,o),d=u._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",u),_===p)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var g=++this._totalResolved;return g>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];c=s.isArray(u)?a(t).apply(l,u):a(t).call(l,u)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new u(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return l("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new E("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,D(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(V.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?l("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,T,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(x);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=N(t)(I(e,n));return r===L&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new S(t).promise()},i.cast=function(t){var e=R(t);return e instanceof i||(e=new i(x),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(x);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new E("expecting a function but got "+f.classString(t));return j.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(x),c=this._target(),u=c._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=g();if(0!==(50397184&u)){var p,h,_=c._settlePromiseCtx;0!==(33554432&u)?(h=c._rejectionHandler0,p=t):0!==(16777216&u)?(h=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(_=c._settlePromiseLateCancellationObserver,h=new F("late cancellation observer"),c._attachExtraTrace(h),p=e),j.invoke(_,c,{handler:f.contextBind(l,p),promise:a,receiver:r,value:h})}else c._addCallbacks(t,e,a,r,l);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){if(!j.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},i.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===p?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=f.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=f.contextBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=f.contextBind(i,t)),"function"==typeof e&&(this[s+1]=f.contextBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var n=R(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var u=new F("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&V.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==x){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===T?n&&"number"==typeof n.length?o=N(t).apply(this._boundValue(),n):(o=L,o.e=new E("cannot .spread() a non-array: "+f.classString(n))):o=N(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===P?r._reject(n):o===L?r._rejectCallback(o.e,!1):(V.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof H&&r.isFinallyHandler()?(r.cancelPromise=t,N(e).call(r,o)===L&&t._reject(L.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof S?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():j.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?j.fatalError(t,f.isNode):void((65535&e)>0?j.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&w.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){V.deprecated("Promise.defer","new Promise");var t=new i(x);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",c),t("./method")(i,x,R,l,V),t("./bind")(i,x,R,V),t("./cancel")(i,S,l,V),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,S,R,x,j),i.Promise=i,i.version="3.7.2",t("./call_get.js")(i),t("./generators.js")(i,l,x,R,n,V),t("./map.js")(i,S,l,R,x,V),t("./nodeify.js")(i),t("./promisify.js")(i,x),t("./props.js")(i,S,R,l),t("./race.js")(i,x,R,l),t("./reduce.js")(i,S,l,R,x,V),t("./settle.js")(i,S,V),t("./some.js")(i,S,l),t("./timers.js")(i,x,V),t("./using.js")(i,l,R,A,x,V),t("./any.js")(i),t("./each.js")(i,x),t("./filter.js")(i,x),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(x)),V.setBounds(C.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&(r._propagateFrom(t,3),t.suppressUnhandledRejections()),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function u(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(u,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var l=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(l,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var l=s[c],p=s[c+1],_=l+e;if(r===E)t[_]=E(l,f,l,p,e,i);else{var d=r(p,function(){return E(l,f,l,p,e,i)});h.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return h.toFastProperties(t),t}function l(t,e,n){return E(t,e,void 0,t,null,n)}var p,f={},h=t("./util"),_=t("./nodeback"),d=h.withAppended,v=h.maybeWrapAsError,y=h.canEvaluate,g=t("./errors").TypeError,m="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},E=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?f:e.context,o=!!e.multiArgs,s=l(t,n,o);return h.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=m);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=E),!h.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=h.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return u(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),u=c.isObject,l=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),f=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=f(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityf;++f){var _=t[f];(void 0!==_||f in t)&&e.cast(_)._then(l,p,void 0,u,null)}return u}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=e._getContext();this._fn=f.contextBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function u(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function l(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=h(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var f=t("./util"),h=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n;for(var o=r;i>o;++o){var s=t[o];s instanceof e&&s.suppressUnhandledRejections()}if(!n.isRejected())for(;i>r;++r){var a={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(l,void 0,void 0,a,void 0),0===(127&r)&&n._setNoAsyncGuarantee()}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,n,r){return u(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){ +var u=s.resolve();r=function(t){u.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.allSettled=function(t){return new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,u=s.isArray,l={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=u(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===u){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return u.e=e,u}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),l=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,f=c.tryCatch(r).call(t,o,s);return p=!1,a&&f===u&&(a._rejectCallback(f.e,!0,!0),a=null),l}var c=t("./util"),u=c.errorObj,l=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(u,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return l(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,n){function i(){if(s>=u)return l._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,u=t.length,l=new e(o);return i(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function f(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,g=_.tryCatch,m={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==m?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,l),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new h(t),p=0;t>p;++p){var d=o[p];if(l.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(f,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function u(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function l(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return V.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{l(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.nodeSupportsAsyncResource=B.isNode&&function(){var e=!1;try{var n=t("async_hooks").AsyncResource;e="function"==typeof n.prototype.runInAsyncScope}catch(r){e=!1}return e}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(M){B.lastLineError=M}e.exports=B},{"./es5":13,async_hooks:void 0}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/server/node_modules/bluebird/js/release/any.js b/server/node_modules/bluebird/js/release/any.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/assert.js b/server/node_modules/bluebird/js/release/assert.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/async.js b/server/node_modules/bluebird/js/release/async.js old mode 100755 new mode 100644 index 41f6655..8eab6f8 --- a/server/node_modules/bluebird/js/release/async.js +++ b/server/node_modules/bluebird/js/release/async.js @@ -3,7 +3,6 @@ var firstLineError; try {throw new Error(); } catch (e) {firstLineError = e;} var schedule = require("./schedule"); var Queue = require("./queue"); -var util = require("./util"); function Async() { this._customScheduler = false; @@ -11,7 +10,6 @@ function Async() { this._lateQueue = new Queue(16); this._normalQueue = new Queue(16); this._haveDrainedQueues = false; - this._trampolineEnabled = true; var self = this; this.drainQueues = function () { self._drainQueues(); @@ -30,16 +28,6 @@ Async.prototype.hasCustomScheduler = function() { return this._customScheduler; }; -Async.prototype.enableTrampoline = function() { - this._trampolineEnabled = true; -}; - -Async.prototype.disableTrampolineIfNecessary = function() { - if (util.hasDevTools) { - this._trampolineEnabled = false; - } -}; - Async.prototype.haveItemsQueued = function () { return this._isTickUsed || this._haveDrainedQueues; }; @@ -88,62 +76,33 @@ function AsyncSettlePromises(promise) { this._queueTick(); } -if (!util.hasDevTools) { - Async.prototype.invokeLater = AsyncInvokeLater; - Async.prototype.invoke = AsyncInvoke; - Async.prototype.settlePromises = AsyncSettlePromises; -} else { - Async.prototype.invokeLater = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvokeLater.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - setTimeout(function() { - fn.call(receiver, arg); - }, 100); - }); - } - }; +Async.prototype.invokeLater = AsyncInvokeLater; +Async.prototype.invoke = AsyncInvoke; +Async.prototype.settlePromises = AsyncSettlePromises; - Async.prototype.invoke = function (fn, receiver, arg) { - if (this._trampolineEnabled) { - AsyncInvoke.call(this, fn, receiver, arg); - } else { - this._schedule(function() { - fn.call(receiver, arg); - }); - } - }; - Async.prototype.settlePromises = function(promise) { - if (this._trampolineEnabled) { - AsyncSettlePromises.call(this, promise); - } else { - this._schedule(function() { - promise._settlePromises(); - }); - } - }; +function _drainQueue(queue) { + while (queue.length() > 0) { + _drainQueueStep(queue); + } } -Async.prototype._drainQueue = function(queue) { - while (queue.length() > 0) { - var fn = queue.shift(); - if (typeof fn !== "function") { - fn._settlePromises(); - continue; - } +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { var receiver = queue.shift(); var arg = queue.shift(); fn.call(receiver, arg); } -}; +} Async.prototype._drainQueues = function () { - this._drainQueue(this._normalQueue); + _drainQueue(this._normalQueue); this._reset(); this._haveDrainedQueues = true; - this._drainQueue(this._lateQueue); + _drainQueue(this._lateQueue); }; Async.prototype._queueTick = function () { diff --git a/server/node_modules/bluebird/js/release/bind.js b/server/node_modules/bluebird/js/release/bind.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/bluebird.js b/server/node_modules/bluebird/js/release/bluebird.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/call_get.js b/server/node_modules/bluebird/js/release/call_get.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/cancel.js b/server/node_modules/bluebird/js/release/cancel.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/catch_filter.js b/server/node_modules/bluebird/js/release/catch_filter.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/context.js b/server/node_modules/bluebird/js/release/context.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/debuggability.js b/server/node_modules/bluebird/js/release/debuggability.js old mode 100755 new mode 100644 index bf0587c..ce997ee --- a/server/node_modules/bluebird/js/release/debuggability.js +++ b/server/node_modules/bluebird/js/release/debuggability.js @@ -1,9 +1,10 @@ "use strict"; -module.exports = function(Promise, Context) { -var getDomain = Promise._getDomain; +module.exports = function(Promise, Context, + enableAsyncHooks, disableAsyncHooks) { var async = Promise._async; var Warning = require("./errors").Warning; var util = require("./util"); +var es5 = require("./es5"); var canAttachTrace = util.canAttachTrace; var unhandledRejectionHandled; var possiblyUnhandledRejection; @@ -29,6 +30,34 @@ var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); +var deferUnhandledRejectionCheck; +(function() { + var promises = []; + + function unhandledRejectionCheck() { + for (var i = 0; i < promises.length; ++i) { + promises[i]._notifyUnhandledRejection(); + } + unhandledRejectionClear(); + } + + function unhandledRejectionClear() { + promises.length = 0; + } + + deferUnhandledRejectionCheck = function(promise) { + promises.push(promise); + setTimeout(unhandledRejectionCheck, 1); + }; + + es5.defineProperty(Promise, "_unhandledRejectionCheck", { + value: unhandledRejectionCheck + }); + es5.defineProperty(Promise, "_unhandledRejectionClear", { + value: unhandledRejectionClear + }); +})(); + Promise.prototype.suppressUnhandledRejections = function() { var target = this._target(); target._bitField = ((target._bitField & (~1048576)) | @@ -38,7 +67,7 @@ Promise.prototype.suppressUnhandledRejections = function() { Promise.prototype._ensurePossibleRejectionHandled = function () { if ((this._bitField & 524288) !== 0) return; this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); + deferUnhandledRejectionCheck(this); }; Promise.prototype._notifyUnhandledRejectionIsHandled = function () { @@ -96,19 +125,13 @@ Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { }; Promise.onPossiblyUnhandledRejection = function (fn) { - var domain = getDomain(); - possiblyUnhandledRejection = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + possiblyUnhandledRejection = util.contextBind(context, fn); }; Promise.onUnhandledRejectionHandled = function (fn) { - var domain = getDomain(); - unhandledRejectionHandled = - typeof fn === "function" ? (domain === null ? - fn : util.domainBind(domain, fn)) - : undefined; + var context = Promise._getContext(); + unhandledRejectionHandled = util.contextBind(context, fn); }; var disableLongStackTraces = function() {}; @@ -119,6 +142,7 @@ Promise.longStackTraces = function () { if (!config.longStackTraces && longStackTracesIsSupported()) { var Promise_captureStackTrace = Promise.prototype._captureStackTrace; var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; config.longStackTraces = true; disableLongStackTraces = function() { if (async.haveItemsQueued() && !config.longStackTraces) { @@ -126,14 +150,14 @@ Promise.longStackTraces = function () { } Promise.prototype._captureStackTrace = Promise_captureStackTrace; Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; Context.deactivateLongStackTraces(); - async.enableTrampoline(); config.longStackTraces = false; }; Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; Context.activateLongStackTraces(); - async.disableTrampolineIfNecessary(); } }; @@ -141,37 +165,85 @@ Promise.hasLongStackTraces = function () { return config.longStackTraces && longStackTracesIsSupported(); }; + +var legacyHandlers = { + unhandledrejection: { + before: function() { + var ret = util.global.onunhandledrejection; + util.global.onunhandledrejection = null; + return ret; + }, + after: function(fn) { + util.global.onunhandledrejection = fn; + } + }, + rejectionhandled: { + before: function() { + var ret = util.global.onrejectionhandled; + util.global.onrejectionhandled = null; + return ret; + }, + after: function(fn) { + util.global.onrejectionhandled = fn; + } + } +}; + var fireDomEvent = (function() { + var dispatch = function(legacy, e) { + if (legacy) { + var fn; + try { + fn = legacy.before(); + return !util.global.dispatchEvent(e); + } finally { + legacy.after(fn); + } + } else { + return !util.global.dispatchEvent(e); + } + }; try { if (typeof CustomEvent === "function") { var event = new CustomEvent("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new CustomEvent(name.toLowerCase(), { + name = name.toLowerCase(); + var eventData = { detail: event, cancelable: true - }); - return !util.global.dispatchEvent(domEvent); + }; + var domEvent = new CustomEvent(name, eventData); + es5.defineProperty( + domEvent, "promise", {value: event.promise}); + es5.defineProperty( + domEvent, "reason", {value: event.reason}); + + return dispatch(legacyHandlers[name], domEvent); }; } else if (typeof Event === "function") { var event = new Event("CustomEvent"); util.global.dispatchEvent(event); return function(name, event) { - var domEvent = new Event(name.toLowerCase(), { + name = name.toLowerCase(); + var domEvent = new Event(name, { cancelable: true }); domEvent.detail = event; - return !util.global.dispatchEvent(domEvent); + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return dispatch(legacyHandlers[name], domEvent); }; } else { var event = document.createEvent("CustomEvent"); event.initCustomEvent("testingtheevent", false, true, {}); util.global.dispatchEvent(event); return function(name, event) { + name = name.toLowerCase(); var domEvent = document.createEvent("CustomEvent"); - domEvent.initCustomEvent(name.toLowerCase(), false, true, + domEvent.initCustomEvent(name, false, true, event); - return !util.global.dispatchEvent(domEvent); + return dispatch(legacyHandlers[name], domEvent); }; } } catch (e) {} @@ -289,6 +361,18 @@ Promise.config = function(opts) { Promise.prototype._fireEvent = defaultFireEvent; } } + if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) { + var prev = config.asyncHooks; + var cur = !!opts.asyncHooks; + if (prev !== cur) { + config.asyncHooks = cur; + if (cur) { + enableAsyncHooks(); + } else { + disableAsyncHooks(); + } + } + } return Promise; }; @@ -309,6 +393,7 @@ Promise.prototype._attachCancellationCallback = function(onCancel) { }; Promise.prototype._captureStackTrace = function () {}; Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; Promise.prototype._clearCancellationData = function() {}; Promise.prototype._propagateFrom = function (parent, flags) { ; @@ -414,6 +499,10 @@ function longStackTracesAttachExtraTrace(error, ignoreSelf) { } } +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) { if (returnValue === undefined && promiseCreated !== null && @@ -671,8 +760,8 @@ function parseLineInfo(line) { function setBounds(firstLineError, lastLineError) { if (!longStackTracesIsSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); var firstIndex = -1; var lastIndex = -1; var firstFileName; @@ -881,12 +970,16 @@ var config = { warnings: warnings, longStackTraces: false, cancellation: false, - monitoring: false + monitoring: false, + asyncHooks: false }; if (longStackTraces) Promise.longStackTraces(); return { + asyncHooks: function() { + return config.asyncHooks; + }, longStackTraces: function() { return config.longStackTraces; }, diff --git a/server/node_modules/bluebird/js/release/direct_resolve.js b/server/node_modules/bluebird/js/release/direct_resolve.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/each.js b/server/node_modules/bluebird/js/release/each.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/errors.js b/server/node_modules/bluebird/js/release/errors.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/es5.js b/server/node_modules/bluebird/js/release/es5.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/filter.js b/server/node_modules/bluebird/js/release/filter.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/finally.js b/server/node_modules/bluebird/js/release/finally.js old mode 100755 new mode 100644 index 3717911..d57444b --- a/server/node_modules/bluebird/js/release/finally.js +++ b/server/node_modules/bluebird/js/release/finally.js @@ -1,8 +1,9 @@ "use strict"; -module.exports = function(Promise, tryConvertToPromise) { +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { var util = require("./util"); var CancellationError = Promise.CancellationError; var errorObj = util.errorObj; +var catchFilter = require("./catch_filter")(NEXT_FILTER); function PassThroughHandlerContext(promise, type, handler) { this.promise = promise; @@ -54,7 +55,9 @@ function finallyHandler(reasonOrValue) { var ret = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue); - if (ret !== undefined) { + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { promise._setReturnedNonUndefined(); var maybePromise = tryConvertToPromise(ret, promise); if (maybePromise instanceof Promise) { @@ -103,9 +106,41 @@ Promise.prototype["finally"] = function (handler) { finallyHandler); }; + Promise.prototype.tap = function (handler) { return this._passThrough(handler, 1, finallyHandler); }; +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + return PassThroughHandlerContext; }; diff --git a/server/node_modules/bluebird/js/release/generators.js b/server/node_modules/bluebird/js/release/generators.js old mode 100755 new mode 100644 index 40e9b1f..500c280 --- a/server/node_modules/bluebird/js/release/generators.js +++ b/server/node_modules/bluebird/js/release/generators.js @@ -157,7 +157,7 @@ PromiseSpawn.prototype._continue = function (result) { if (maybePromise === null) { this._promiseRejected( new TypeError( - "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", value) + + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) + "From coroutine:\u000a" + this._stack.split("\n").slice(1, -7).join("\n") ) diff --git a/server/node_modules/bluebird/js/release/join.js b/server/node_modules/bluebird/js/release/join.js old mode 100755 new mode 100644 index 4945e3f..e7e19f0 --- a/server/node_modules/bluebird/js/release/join.js +++ b/server/node_modules/bluebird/js/release/join.js @@ -1,7 +1,6 @@ "use strict"; module.exports = -function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, - getDomain) { +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) { var util = require("./util"); var canEvaluate = util.canEvaluate; var tryCatch = util.tryCatch; @@ -147,10 +146,8 @@ Promise.join = function () { if (!ret._isFateSealed()) { if (holder.asyncNeeded) { - var domain = getDomain(); - if (domain !== null) { - holder.fn = util.domainBind(domain, holder.fn); - } + var context = Promise._getContext(); + holder.fn = util.contextBind(context, holder.fn); } ret._setAsyncGuaranteed(); ret._setOnCancel(holder); @@ -159,7 +156,7 @@ Promise.join = function () { } } } - var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}; + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i ];}; if (fn) args.pop(); var ret = new PromiseArray(args).promise(); return fn !== undefined ? ret.spread(fn) : ret; diff --git a/server/node_modules/bluebird/js/release/map.js b/server/node_modules/bluebird/js/release/map.js old mode 100755 new mode 100644 index 976f15e..91d5a82 --- a/server/node_modules/bluebird/js/release/map.js +++ b/server/node_modules/bluebird/js/release/map.js @@ -5,7 +5,6 @@ module.exports = function(Promise, tryConvertToPromise, INTERNAL, debug) { -var getDomain = Promise._getDomain; var util = require("./util"); var tryCatch = util.tryCatch; var errorObj = util.errorObj; @@ -14,8 +13,8 @@ var async = Promise._async; function MappingPromiseArray(promises, fn, limit, _filter) { this.constructor$(promises); this._promise._captureStackTrace(); - var domain = getDomain(); - this._callback = domain === null ? fn : util.domainBind(domain, fn); + var context = Promise._getContext(); + this._callback = util.contextBind(context, fn); this._preservedValues = _filter === INTERNAL ? new Array(this.length()) : null; @@ -23,6 +22,14 @@ function MappingPromiseArray(promises, fn, limit, _filter) { this._inFlight = 0; this._queue = []; async.invoke(this._asyncInit, this, undefined); + if (util.isArray(promises)) { + for (var i = 0; i < promises.length; ++i) { + var maybePromise = promises[i]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + } } util.inherits(MappingPromiseArray, PromiseArray); diff --git a/server/node_modules/bluebird/js/release/method.js b/server/node_modules/bluebird/js/release/method.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/nodeback.js b/server/node_modules/bluebird/js/release/nodeback.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/nodeify.js b/server/node_modules/bluebird/js/release/nodeify.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/promise.js b/server/node_modules/bluebird/js/release/promise.js old mode 100755 new mode 100644 index f699a53..622a86f --- a/server/node_modules/bluebird/js/release/promise.js +++ b/server/node_modules/bluebird/js/release/promise.js @@ -12,20 +12,42 @@ var apiRejection = function(msg) { function Proxyable() {} var UNDEFINED_BINDING = {}; var util = require("./util"); +util.setReflectHandler(reflectHandler); -var getDomain; -if (util.isNode) { - getDomain = function() { - var ret = process.domain; - if (ret === undefined) ret = null; - return ret; - }; -} else { - getDomain = function() { +var getDomain = function() { + var domain = process.domain; + if (domain === undefined) { return null; + } + return domain; +}; +var getContextDefault = function() { + return null; +}; +var getContextDomain = function() { + return { + domain: getDomain(), + async: null }; -} -util.notEnumerableProp(Promise, "_getDomain", getDomain); +}; +var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ? + require("async_hooks").AsyncResource : null; +var getContextAsyncHooks = function() { + return { + domain: getDomain(), + async: new AsyncResource("Bluebird::Promise") + }; +}; +var getContext = util.isNode ? getContextDomain : getContextDefault; +util.notEnumerableProp(Promise, "_getContext", getContext); +var enableAsyncHooks = function() { + getContext = getContextAsyncHooks; + util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks); +}; +var disableAsyncHooks = function() { + getContext = getContextDomain; + util.notEnumerableProp(Promise, "_getContext", getContextDomain); +}; var es5 = require("./es5"); var Async = require("./async"); @@ -49,33 +71,36 @@ var PromiseArray = var Context = require("./context")(Promise); /*jshint unused:false*/ var createContext = Context.create; -var debug = require("./debuggability")(Promise, Context); + +var debug = require("./debuggability")(Promise, Context, + enableAsyncHooks, disableAsyncHooks); var CapturedTrace = debug.CapturedTrace; var PassThroughHandlerContext = - require("./finally")(Promise, tryConvertToPromise); + require("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); var catchFilter = require("./catch_filter")(NEXT_FILTER); var nodebackForPromise = require("./nodeback"); var errorObj = util.errorObj; var tryCatch = util.tryCatch; function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } if (typeof executor !== "function") { throw new TypeError("expecting a function but got " + util.classString(executor)); } - if (self.constructor !== Promise) { - throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); - } + } function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } this._bitField = 0; this._fulfillmentHandler0 = undefined; this._rejectionHandler0 = undefined; this._promise0 = undefined; this._receiver0 = undefined; - if (executor !== INTERNAL) { - check(this, executor); - this._resolveFromExecutor(executor); - } + this._resolveFromExecutor(executor); this._promiseCreated(); this._fireEvent("promiseCreated", this); } @@ -94,12 +119,17 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { if (util.isObject(item)) { catchInstances[j++] = item; } else { - return apiRejection("expecting an object but got " + - "A catch statement predicate " + util.classString(item)); + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); } } catchInstances.length = j; fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } return this.then(undefined, catchFilter(catchInstances, fn, this)); } return this.then(undefined, fn); @@ -240,7 +270,7 @@ Promise.prototype._then = function ( this._fireEvent("promiseChained", this, promise); } - var domain = getDomain(); + var context = getContext(); if (!((bitField & 50397184) === 0)) { var handler, value, settler = target._settlePromiseCtx; if (((bitField & 33554432) !== 0)) { @@ -258,15 +288,14 @@ Promise.prototype._then = function ( } async.invoke(settler, target, { - handler: domain === null ? handler - : (typeof handler === "function" && - util.domainBind(domain, handler)), + handler: util.contextBind(context, handler), promise: promise, receiver: receiver, value: value }); } else { - target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + target._addCallbacks(didFulfill, didReject, promise, + receiver, context); } return promise; @@ -327,7 +356,15 @@ Promise.prototype._setWillBeCancelled = function() { Promise.prototype._setAsyncGuaranteed = function() { if (async.hasCustomScheduler()) return; - this._bitField = this._bitField | 134217728; + var bitField = this._bitField; + this._bitField = bitField | + (((bitField & 536870912) >> 2) ^ + 134217728); +}; + +Promise.prototype._setNoAsyncGuarantee = function() { + this._bitField = (this._bitField | 536870912) & + (~134217728); }; Promise.prototype._receiverAt = function (index) { @@ -382,7 +419,7 @@ Promise.prototype._addCallbacks = function ( reject, promise, receiver, - domain + context ) { var index = this._length(); @@ -395,12 +432,10 @@ Promise.prototype._addCallbacks = function ( this._promise0 = promise; this._receiver0 = receiver; if (typeof fulfill === "function") { - this._fulfillmentHandler0 = - domain === null ? fulfill : util.domainBind(domain, fulfill); + this._fulfillmentHandler0 = util.contextBind(context, fulfill); } if (typeof reject === "function") { - this._rejectionHandler0 = - domain === null ? reject : util.domainBind(domain, reject); + this._rejectionHandler0 = util.contextBind(context, reject); } } else { var base = index * 4 - 4; @@ -408,11 +443,11 @@ Promise.prototype._addCallbacks = function ( this[base + 3] = receiver; if (typeof fulfill === "function") { this[base + 0] = - domain === null ? fulfill : util.domainBind(domain, fulfill); + util.contextBind(context, fulfill); } if (typeof reject === "function") { this[base + 1] = - domain === null ? reject : util.domainBind(domain, reject); + util.contextBind(context, reject); } } this._setLength(index + 1); @@ -432,6 +467,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { if (shouldBind) this._propagateFrom(maybePromise, 2); + var promise = maybePromise._target(); if (promise === this) { @@ -448,7 +484,7 @@ Promise.prototype._resolveCallback = function(value, shouldBind) { } this._setFollowing(); this._setLength(0); - this._setFollowee(promise); + this._setFollowee(maybePromise); } else if (((bitField & 33554432) !== 0)) { this._fulfill(promise._value()); } else if (((bitField & 16777216) !== 0)) { @@ -474,6 +510,7 @@ function(reason, synchronous, ignoreNonErrorWarnings) { }; Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; var promise = this; this._captureStackTrace(); this._pushContext(); @@ -637,6 +674,7 @@ Promise.prototype._fulfill = function (value) { } else { async.settlePromises(this); } + this._dereferenceTrace(); } }; @@ -705,6 +743,14 @@ Promise.prototype._settledValue = function() { } }; +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + function deferResolve(v) {this.promise._resolveCallback(v);} function deferReject(v) {this.promise._rejectCallback(v, false);} @@ -729,14 +775,12 @@ require("./cancel")(Promise, PromiseArray, apiRejection, debug); require("./direct_resolve")(Promise); require("./synchronous_inspection")(Promise); require("./join")( - Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async); Promise.Promise = Promise; -Promise.version = "3.4.7"; -require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +Promise.version = "3.7.2"; require('./call_get.js')(Promise); -require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); -require('./timers.js')(Promise, INTERNAL, debug); require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); require('./nodeify.js')(Promise); require('./promisify.js')(Promise, INTERNAL); require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); @@ -744,9 +788,11 @@ require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); require('./settle.js')(Promise, PromiseArray, debug); require('./some.js')(Promise, PromiseArray, apiRejection); -require('./filter.js')(Promise, INTERNAL); -require('./each.js')(Promise, INTERNAL); +require('./timers.js')(Promise, INTERNAL, debug); +require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); require('./any.js')(Promise); +require('./each.js')(Promise, INTERNAL); +require('./filter.js')(Promise, INTERNAL); util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); diff --git a/server/node_modules/bluebird/js/release/promise_array.js b/server/node_modules/bluebird/js/release/promise_array.js old mode 100755 new mode 100644 index f874df3..8fc665a --- a/server/node_modules/bluebird/js/release/promise_array.js +++ b/server/node_modules/bluebird/js/release/promise_array.js @@ -8,6 +8,7 @@ function toResolutionValue(val) { switch(val) { case -2: return []; case -3: return {}; + case -6: return new Map(); } } @@ -15,6 +16,7 @@ function PromiseArray(values) { var promise = this._promise = new Promise(INTERNAL); if (values instanceof Promise) { promise._propagateFrom(values, 3); + values.suppressUnhandledRejections(); } promise._setOnCancel(this); this._values = values; diff --git a/server/node_modules/bluebird/js/release/promisify.js b/server/node_modules/bluebird/js/release/promisify.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/props.js b/server/node_modules/bluebird/js/release/props.js old mode 100755 new mode 100644 index fc981ce..6a34aaf --- a/server/node_modules/bluebird/js/release/props.js +++ b/server/node_modules/bluebird/js/release/props.js @@ -55,7 +55,7 @@ function PropertiesPromiseArray(obj) { } this.constructor$(entries); this._isMap = isMap; - this._init$(undefined, -3); + this._init$(undefined, isMap ? -6 : -3); } util.inherits(PropertiesPromiseArray, PromiseArray); diff --git a/server/node_modules/bluebird/js/release/queue.js b/server/node_modules/bluebird/js/release/queue.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/race.js b/server/node_modules/bluebird/js/release/race.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/reduce.js b/server/node_modules/bluebird/js/release/reduce.js old mode 100755 new mode 100644 index 26e2b1a..101ac22 --- a/server/node_modules/bluebird/js/release/reduce.js +++ b/server/node_modules/bluebird/js/release/reduce.js @@ -5,14 +5,13 @@ module.exports = function(Promise, tryConvertToPromise, INTERNAL, debug) { -var getDomain = Promise._getDomain; var util = require("./util"); var tryCatch = util.tryCatch; function ReductionPromiseArray(promises, fn, initialValue, _each) { this.constructor$(promises); - var domain = getDomain(); - this._fn = domain === null ? fn : util.domainBind(domain, fn); + var context = Promise._getContext(); + this._fn = util.contextBind(context, fn); if (initialValue !== undefined) { initialValue = Promise.resolve(initialValue); initialValue._attachCancellationCallback(this); @@ -32,8 +31,8 @@ function ReductionPromiseArray(promises, fn, initialValue, _each) { util.inherits(ReductionPromiseArray, PromiseArray); ReductionPromiseArray.prototype._gotAccum = function(accum) { - if (this._eachValues !== undefined && - this._eachValues !== null && + if (this._eachValues !== undefined && + this._eachValues !== null && accum !== INTERNAL) { this._eachValues.push(accum); } @@ -89,6 +88,13 @@ ReductionPromiseArray.prototype._iterate = function (values) { this._currentCancellable = value; + for (var j = i; j < length; ++j) { + var maybePromise = values[j]; + if (maybePromise instanceof Promise) { + maybePromise.suppressUnhandledRejections(); + } + } + if (!value.isRejected()) { for (; i < length; ++i) { var ctx = { @@ -98,7 +104,12 @@ ReductionPromiseArray.prototype._iterate = function (values) { length: length, array: this }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + + if ((i & 127) === 0) { + value._setNoAsyncGuarantee(); + } } } diff --git a/server/node_modules/bluebird/js/release/schedule.js b/server/node_modules/bluebird/js/release/schedule.js old mode 100755 new mode 100644 index a190728..15197d1 --- a/server/node_modules/bluebird/js/release/schedule.js +++ b/server/node_modules/bluebird/js/release/schedule.js @@ -20,7 +20,8 @@ if (util.isNode && typeof MutationObserver === "undefined") { } else if ((typeof MutationObserver !== "undefined") && !(typeof window !== "undefined" && window.navigator && - (window.navigator.standalone || window.cordova))) { + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { schedule = (function() { var div = document.createElement("div"); var opts = {attributes: true}; @@ -34,11 +35,11 @@ if (util.isNode && typeof MutationObserver === "undefined") { var scheduleToggle = function() { if (toggleScheduled) return; - toggleScheduled = true; - div2.classList.toggle("foo"); - }; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; - return function schedule(fn) { + return function schedule(fn) { var o = new MutationObserver(function() { o.disconnect(); fn(); diff --git a/server/node_modules/bluebird/js/release/settle.js b/server/node_modules/bluebird/js/release/settle.js old mode 100755 new mode 100644 index fade3a1..e24b204 --- a/server/node_modules/bluebird/js/release/settle.js +++ b/server/node_modules/bluebird/js/release/settle.js @@ -37,6 +37,10 @@ Promise.settle = function (promises) { return new SettledPromiseArray(promises).promise(); }; +Promise.allSettled = function (promises) { + return new SettledPromiseArray(promises).promise(); +}; + Promise.prototype.settle = function () { return Promise.settle(this); }; diff --git a/server/node_modules/bluebird/js/release/some.js b/server/node_modules/bluebird/js/release/some.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/synchronous_inspection.js b/server/node_modules/bluebird/js/release/synchronous_inspection.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/thenables.js b/server/node_modules/bluebird/js/release/thenables.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/timers.js b/server/node_modules/bluebird/js/release/timers.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/using.js b/server/node_modules/bluebird/js/release/using.js old mode 100755 new mode 100644 diff --git a/server/node_modules/bluebird/js/release/util.js b/server/node_modules/bluebird/js/release/util.js old mode 100755 new mode 100644 index 84c28ec..8ca4d91 --- a/server/node_modules/bluebird/js/release/util.js +++ b/server/node_modules/bluebird/js/release/util.js @@ -195,8 +195,12 @@ function toFastProperties(obj) { /*jshint -W027,-W055,-W031*/ function FakeConstructor() {} FakeConstructor.prototype = obj; - var l = 8; - while (l--) new FakeConstructor(); + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); return obj; eval(obj); } @@ -223,10 +227,11 @@ function safeToString(obj) { } function isError(obj) { - return obj !== null && + return obj instanceof Error || + (obj !== null && typeof obj === "object" && typeof obj.message === "string" && - typeof obj.name === "string"; + typeof obj.name === "string"); } function markAsOriginatingFromRejection(e) { @@ -321,18 +326,42 @@ function getNativePromise() { if (typeof Promise === "function") { try { var promise = new Promise(function(){}); - if ({}.toString.call(promise) === "[object Promise]") { + if (classString(promise) === "[object Promise]") { return Promise; } } catch (e) {} } } -function domainBind(self, cb) { - return self.bind(cb); +var reflectHandler; +function contextBind(ctx, cb) { + if (ctx === null || + typeof cb !== "function" || + cb === reflectHandler) { + return cb; + } + + if (ctx.domain !== null) { + cb = ctx.domain.bind(cb); + } + + var async = ctx.async; + if (async !== null) { + var old = cb; + cb = function() { + var $_len = arguments.length + 2;var args = new Array($_len); for(var $_i = 2; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i - 2];}; + args[0] = old; + args[1] = this; + return async.runInAsyncScope.apply(async, args); + }; + } + return cb; } var ret = { + setReflectHandler: function(fn) { + reflectHandler = fn; + }, isClass: isClass, isIdentifier: isIdentifier, inheritedDataKeys: inheritedDataKeys, @@ -359,19 +388,32 @@ var ret = { markAsOriginatingFromRejection: markAsOriginatingFromRejection, classString: classString, copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", isNode: isNode, hasEnvVariables: hasEnvVariables, env: env, global: globalObject, getNativePromise: getNativePromise, - domainBind: domainBind + contextBind: contextBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } return (version[0] === 0 && version[1] > 10) || (version[0] > 0); })(); +ret.nodeSupportsAsyncResource = ret.isNode && (function() { + var supportsAsync = false; + try { + var res = require("async_hooks").AsyncResource; + supportsAsync = typeof res.prototype.runInAsyncScope === "function"; + } catch (e) { + supportsAsync = false; + } + return supportsAsync; +})(); if (ret.isNode) ret.toFastProperties(process); diff --git a/server/node_modules/bluebird/package.json b/server/node_modules/bluebird/package.json old mode 100755 new mode 100644 index 08a824e..ee46bd7 --- a/server/node_modules/bluebird/package.json +++ b/server/node_modules/bluebird/package.json @@ -1,27 +1,28 @@ { - "_from": "bluebird@~3.4.1", - "_id": "bluebird@3.4.7", + "_from": "bluebird", + "_id": "bluebird@3.7.2", "_inBundle": false, - "_integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "_integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "_location": "/bluebird", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "bluebird@~3.4.1", + "raw": "bluebird", "name": "bluebird", "escapedName": "bluebird", - "rawSpec": "~3.4.1", + "rawSpec": "", "saveSpec": null, - "fetchSpec": "~3.4.1" + "fetchSpec": "latest" }, "_requiredBy": [ - "/unzipper" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "_shasum": "f72d760be09b7f76d08ed8fae98b289a8d05fab3", - "_spec": "bluebird@~3.4.1", - "_where": "/home/sigonasr2/divar/server/node_modules/unzipper", + "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "_shasum": "9f229c15be272454ffa973ace0dbee79a1b0c36f", + "_spec": "bluebird", + "_where": "/home/sigonasr2/divar/server", "author": { "name": "Petka Antonov", "email": "petka_antonov@hotmail.com", @@ -35,7 +36,8 @@ "deprecated": false, "description": "Full featured Promises/A+ implementation with exceptionally good performance", "devDependencies": { - "acorn": "~0.6.0", + "acorn": "^6.0.2", + "acorn-walk": "^6.1.0", "baconjs": "^0.7.43", "bluebird": "^2.9.2", "body-parser": "^1.10.2", @@ -94,7 +96,8 @@ "istanbul": "istanbul", "lint": "node scripts/jshint.js", "prepublish": "npm run generate-browser-core && npm run generate-browser-full", - "test": "node tools/test.js" + "test": "node --expose-gc tools/test.js" }, - "version": "3.4.7" + "version": "3.7.2", + "webpack": "./js/release/bluebird.js" } diff --git a/server/node_modules/express-promise-router/.changeset/README.md b/server/node_modules/express-promise-router/.changeset/README.md new file mode 100644 index 0000000..4f3b76b --- /dev/null +++ b/server/node_modules/express-promise-router/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/server/node_modules/express-promise-router/.changeset/config.json b/server/node_modules/express-promise-router/.changeset/config.json new file mode 100644 index 0000000..0979e56 --- /dev/null +++ b/server/node_modules/express-promise-router/.changeset/config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@1.1.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "linked": [], + "access": "restricted", + "baseBranch": "trunk", + "updateInternalDependencies": "patch" +} diff --git a/server/node_modules/express-promise-router/.eslintrc.json b/server/node_modules/express-promise-router/.eslintrc.json new file mode 100644 index 0000000..b98a546 --- /dev/null +++ b/server/node_modules/express-promise-router/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "env": { + "node": true + }, + "extends": ["eslint:recommended", "prettier"], + "globals": { + "Promise": true + }, + "parserOptions": { + "ecmaVersion": 2017, + "sourceType": "script" + } +} diff --git a/server/node_modules/express-promise-router/.github/renovate.json5 b/server/node_modules/express-promise-router/.github/renovate.json5 new file mode 100644 index 0000000..24f7030 --- /dev/null +++ b/server/node_modules/express-promise-router/.github/renovate.json5 @@ -0,0 +1,14 @@ +{ + extends: ["config:base"], + packageRules: [ + { + updateTypes: ["minor", "patch", "pin", "digest"], + automerge: true, + }, + { + depTypeList: ["devDependencies"], + automerge: true, + }, + ], + prHourlyLimit: 10, +} diff --git a/server/node_modules/express-promise-router/.github/workflows/test.yml b/server/node_modules/express-promise-router/.github/workflows/test.yml new file mode 100644 index 0000000..cc98cde --- /dev/null +++ b/server/node_modules/express-promise-router/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Test + +on: + push: + branches: [trunk] + pull_request: + branches: [trunk] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn --frozen-lockfile + - run: yarn test diff --git a/server/node_modules/express-promise-router/.prettierrc.yaml b/server/node_modules/express-promise-router/.prettierrc.yaml new file mode 100644 index 0000000..408b6a5 --- /dev/null +++ b/server/node_modules/express-promise-router/.prettierrc.yaml @@ -0,0 +1,2 @@ +trailingComma: "all" +printWidth: 80 diff --git a/server/node_modules/express-promise-router/CHANGELOG.md b/server/node_modules/express-promise-router/CHANGELOG.md new file mode 100644 index 0000000..d3614f3 --- /dev/null +++ b/server/node_modules/express-promise-router/CHANGELOG.md @@ -0,0 +1,76 @@ +# express-promise-router + +## 4.1.0 + +### Minor Changes + +- c2f70e2: The handler function now uses the name of the original (wrapped) handler as its name to aid in debugging and tracing. + +## 4.0.1 + +### Patch Changes + +- 04a9dc3: Fix TypeScript dependencies for yarn v2 users, by including @types/express as an optional dependency. + [#66](https://github.com/express-promise-router/express-promise-router/issues/66) + [#96](https://github.com/express-promise-router/express-promise-router/pull/96) + +## 4.0.0 + +### Breaking Changes + +- Drop old (v4, v6, v8) node versions + [#68](https://github.com/express-promise-router/express-promise-router/pull/68) + +### Patch Changes + +- 5739c6a: Fix incorrect array access check. + +### Internal / Dev / Testing + +- ecb1c51: Update deep transitive dependencies of eslint to remove vulnerable package "minimist". +- 1aff90b: Update dependency to remove transitive dependency on vulnerable package "minimist". +- b35e29d: Update babel to remove transitive dependency on vulnerable package "minimist". + +## v3.0.3 + +- Improve package dependencies + [#57](https://github.com/express-promise-router/express-promise-router/issues/57) + +### v3.0.2 + +- Add `default` property to simulate es6 style default export + [#50](https://github.com/express-promise-router/express-promise-router/issues/50) + [#51](https://github.com/express-promise-router/express-promise-router/pull/51) + +## v3.0.1 + +- Remove `@types/express` peerDependency + [#47](https://github.com/express-promise-router/express-promise-router/pull/47) + [#48](https://github.com/express-promise-router/express-promise-router/pull/48) + +## v3.0.0 + +- Update to `chai` 4 +- Update to `mocha` 4 +- Update to `eslint` 4 +- Update to `sinon` 4 +- Reduced lodash usage and footprint [#41](https://github.com/express-promise-router/express-promise-router/issues/41) +- Added TypeScript definitions [#47](https://github.com/express-promise-router/express-promise-router/pull/47) + +## v2.0.0 + +- Dropped support for old Node versions (<4). + - Supported: Node 4 LTS, Node 6 LTS, Node current. +- Use native promises instead of bluebird. (One less dependency!) +- Use [`is-promise`](https://github.com/then/is-promise) module instead of our own function. + +## v1.1.1 + +- Update to [`lodash`](https://lodash.com) 4 +- Update to [`bluebird`](http://bluebirdjs.com/) 3 + +## v1.1.0 + +- Improvements to error reporting +- Support for route array +- Bug fixes diff --git a/server/node_modules/express-promise-router/LICENSE b/server/node_modules/express-promise-router/LICENSE new file mode 100644 index 0000000..9aa6e84 --- /dev/null +++ b/server/node_modules/express-promise-router/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014 express-promise-router + +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. diff --git a/server/node_modules/express-promise-router/README.md b/server/node_modules/express-promise-router/README.md new file mode 100644 index 0000000..55b4a1f --- /dev/null +++ b/server/node_modules/express-promise-router/README.md @@ -0,0 +1,182 @@ +# express-promise-router + +[![npm version](https://badge.fury.io/js/express-promise-router.svg)](https://badge.fury.io/js/express-promise-router) + +A simple wrapper for Express 4's Router that allows middleware to return promises. +This package makes it simpler to write route handlers for Express when dealing +with promises by reducing duplicate code. + +## Getting Started + +Install the module with npm + +```bash +npm install express-promise-router --save +``` + +or yarn. + +```bash +yarn add express-promise-router +``` + +`express-promise-router` is a drop-in replacement for Express 4's `Router`. + +## Documentation + +Middleware and route handlers can simply return a promise. +If the promise is rejected, `express-promise-router` will call `next` with the +reason. This functionality removes the need to explicitly define a rejection +handler. + +```javascript +// With Express 4's router +var router = require("express").Router(); + +router.use("/url", function (req, res, next) { + Promise.reject().catch(next); +}); + +// With express-promise-router +var router = require("express-promise-router")(); + +router.use("/url", function (req, res) { + return Promise.reject(); +}); +``` + +Calling `next()` and `next("route")` is supported by resolving a promise with either `"next"` or `"route"`. No action is taken if the promise is resolved with any other value. + +```javascript +router.use("/url", function (req, res) { + // equivalent to calling next() + return Promise.resolve("next"); +}); + +router.use("/url", function (req, res) { + // equivalent to calling next('route') + return Promise.resolve("route"); +}); +``` + +This package still allows calling `next` directly. + +```javascript +router = require("express-promise-router")(); + +// still works as expected +router.use("/url", function (req, res, next) { + next(); +}); +``` + +### ES6 Imports + +`express-promise-router` can be imported via ES6 imports. The `Router` +constructor is the default export. + +```javascript +import Router from "express-promise-router"; +const router = Router(); +``` + +### Async / Await + +Using `async` / `await` can dramatically improve code readability. + +```javascript +router.get('/url', async (req, res) { + const user = await User.fetch(req.user.id); + + if (user.permission !== "ADMIN") { + throw new Error("You must be an admin to view this page."); + } + + res.send(`Hi ${user.name}!`); +}) +``` + +### Error handling + +Just like with regular `express.Router` you can define custom error handlers. + +```javascript +router.use((err, req, res, next) => { + res.status(403).send(err.message); +}); +``` + +### Frequently Asked Questions + +#### `Cannot read property '0' of undefined` + +This error may indicate that you call a method that needs a path, without one. +Calling `router.get` (or `post`, `all` or any other verb) without a path is not +valid. You should always specify a path like this: + +```javascript +// DO: +router.get("/", function (req, res) { + res.send("Test"); +}); + +// DON'T: +router.get(function (req, res) { + res.send("Test"); +}); +``` + +For more information take a look at [this comment](https://github.com/express-promise-router/express-promise-router/issues/46#issuecomment-342002277). + +#### Can i use this on `app`? + +We currently don't support promisifying the `app` object. To use promises with +the top-level router we recommend mounting a `Router` on the app object, like +this: + +```javascript +import express from "express"; +import Router from "express-promise-router"; + +const app = express(); +const router = Router(); +app.use(router); + +router.get("/", function (req, res) { + res.send("Test"); +}); +``` + +#### Why aren't promise values sent to the client + +We don't send values at the end of the promise chain to the client, because this +could easily lead to the unintended leak of secrets or internal state. If you +intend to send the result of your chain as JSON, please add an explicit +`.then(data => res.send(data))` to the end of your chain or send it in the last +promise handler. + +## Contributing + +Add unit tests for any new or changed functionality. +Lint and test your code using `npm test`. + +Unit tests use [mocha](https://mochajs.org) and +[chai](http://chaijs.com). + +We use [eslint](http://eslint.org), but styling is +controlled mostly by +[prettier](https://github.com/prettier/prettier/blob/master/README.md) +which reformats your code before you commit. You can manually trigger a +reformat using `npm run-script format`. + +## Release History + +See [CHANGELOG](https://github.com/express-promise-router/express-promise-router/blob/trunk/CHANGELOG.md) + +## Attribution + +Licensed under the [MIT license](LICENSE). + +Initial implementation by [Alex Whitney](https://github.com/alex-whitney) \ +Maintained by [Moritz Mahringer](https://github.com/mormahr) \ +Contributed to by [awesome people](https://github.com/express-promise-router/express-promise-router/graphs/contributors) diff --git a/server/node_modules/express-promise-router/index.d.ts b/server/node_modules/express-promise-router/index.d.ts new file mode 100644 index 0000000..fe1acda --- /dev/null +++ b/server/node_modules/express-promise-router/index.d.ts @@ -0,0 +1,7 @@ +declare module "express-promise-router" { + import { Router, RouterOptions } from "express"; + + function PromiseRouter(options?: RouterOptions): Router; + + export default PromiseRouter; +} diff --git a/server/node_modules/express-promise-router/lib/express-promise-router.js b/server/node_modules/express-promise-router/lib/express-promise-router.js new file mode 100644 index 0000000..4309cd0 --- /dev/null +++ b/server/node_modules/express-promise-router/lib/express-promise-router.js @@ -0,0 +1,125 @@ +"use strict"; +var Router = require("express").Router; +var flattenDeep = require("lodash.flattendeep"); +var isPromise = require("is-promise"); + +var wrapHandler = function (handler) { + if ("function" !== typeof handler) { + var type = Object.prototype.toString.call(handler); + var msg = "Expected a callback function but got a " + type; + throw new Error(msg); + } + + var handleReturn = function (args) { + // Find the next function from the arguments + var next = args.slice(-1)[0]; + + // When calling router.param, the last parameter is a string, not next. + // If so, the next should be the one before it. + if ("string" === typeof next) { + next = args.slice(-2)[0]; + } + + // Call the route + var ret = handler.apply(null, args); + + // If it doesn't return a promise, we exit. + if (!isPromise(ret)) { + return; + } + + // Since we got a promise, we handle calling next + Promise.resolve(ret).then( + function (d) { + if (d === "next") { + next(); + } else if (d === "route") { + next("route"); + } + }, + function (err) { + if (!err) { + err = new Error( + "returned promise was rejected but did not have a reason", + ); + } + next(err); + }, + ); + }; + + if (handler.length === 4) { + // Preserve the original handler function name. See #146. + const wrapperObj = { + [handler.name]: function (err, req, res, next) { + handleReturn([err, req, res, next]); + }, + }; + return wrapperObj[handler.name]; + } + + // Preserve the original handler function name. See #146. + const wrapperObj = { + [handler.name]: function (req, res, next) { + handleReturn([req, res, next]); + }, + }; + return wrapperObj[handler.name]; +}; + +var wrapMethods = function (instanceToWrap, isRoute) { + var toConcat = isRoute ? ["all"] : ["use", "all", "param"]; + + var methods = require("methods").concat(toConcat); + + methods.forEach(function (method) { + var original = "__" + method; + instanceToWrap[original] = instanceToWrap[method]; + instanceToWrap[method] = function () { + // Manipulating arguments directly is discouraged + var args = new Array(arguments.length); + for (var i = 0; i < arguments.length; ++i) { + args[i] = arguments[i]; + } + + // Grab the first parameter out in case it's a route or array of routes. + var first = null; + if ( + "string" === typeof args[0] || + args[0] instanceof RegExp || + (Array.isArray(args[0]) && + ("string" === typeof args[0][0] || args[0][0] instanceof RegExp)) + ) { + first = args[0]; + args = args.slice(1); + } + + args = flattenDeep(args).map(function (arg) { + return wrapHandler(arg); + }); + + // If we have a route path or something, push it in front + if (first) { + args.unshift(first); + } + + return instanceToWrap[original].apply(this, args); + }; + }); + + return instanceToWrap; +}; + +var PromiseRouter = function (path) { + var me = wrapMethods(new Router(path)); + + me.__route = me.route; + me.route = function (path) { + return wrapMethods(me.__route(path), true); + }; + + return me; +}; + +PromiseRouter.default = PromiseRouter; +module.exports = PromiseRouter; diff --git a/server/node_modules/express-promise-router/package.json b/server/node_modules/express-promise-router/package.json new file mode 100644 index 0000000..9afa0bb --- /dev/null +++ b/server/node_modules/express-promise-router/package.json @@ -0,0 +1,114 @@ +{ + "_from": "express-promise-router", + "_id": "express-promise-router@4.1.0", + "_inBundle": false, + "_integrity": "sha512-nvg0X1Rj8oajPPC+fG3t4e740aNmQZRZY6dRLbiiM56Dvd8213RJ4kaxhZVTdQLut+l4DZdfeJkyx2VENPMBdw==", + "_location": "/express-promise-router", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "express-promise-router", + "name": "express-promise-router", + "escapedName": "express-promise-router", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/express-promise-router/-/express-promise-router-4.1.0.tgz", + "_shasum": "79160e145c27610ba411bceb0552a36f11dbab4f", + "_spec": "express-promise-router", + "_where": "/home/sigonasr2/divar/server", + "author": { + "name": "Moritz Mahringer", + "email": "contact@mahringer.dev" + }, + "bugs": { + "url": "https://github.com/express-promise-router/express-promise-router/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Alex Whitney", + "email": "alex.whitney@gatech.edu" + } + ], + "dependencies": { + "is-promise": "^4.0.0", + "lodash.flattendeep": "^4.0.0", + "methods": "^1.0.0" + }, + "deprecated": false, + "description": "A lightweight wrapper for Express 4's Router that allows middleware to return promises", + "devDependencies": { + "@babel/core": "7.13.10", + "@babel/plugin-transform-modules-commonjs": "7.13.8", + "@changesets/cli": "2.14.1", + "@mormahr/typescript-definition-tester": "1.1.0", + "@types/express": "4.17.11", + "chai": "4.3.4", + "eslint": "7.22.0", + "eslint-config-prettier": "8.1.0", + "express": "4.17.1", + "husky": "5.1.3", + "lint-staged": "10.5.4", + "mocha": "8.3.2", + "prettier": "2.2.1", + "request": "2.88.2", + "request-promise": "4.2.6", + "sinon": "9.2.4", + "typescript": "4.2.3" + }, + "engines": { + "node": ">=10" + }, + "homepage": "https://github.com/express-promise-router/express-promise-router", + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "keywords": [ + "express", + "promise", + "router" + ], + "licenses": [ + { + "type": "MIT" + } + ], + "lint-staged": { + "*.js": "eslint --cache --fix", + "*.{js,ts,yml,yaml,json,json5,css,md,.eslintrc}": "prettier --write" + }, + "main": "lib/express-promise-router.js", + "name": "express-promise-router", + "peerDependencies": { + "express": "^4.0.0", + "@types/express": "^4.0.0" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/express-promise-router/express-promise-router.git" + }, + "scripts": { + "lint": "eslint {lib,test}/**/*.js", + "test": "npm run-script lint && npm run-script unit-tests", + "unit-tests": "mocha test/*.test.js" + }, + "types": "index.d.ts", + "version": "4.1.0" +} diff --git a/server/node_modules/express-promise-router/test/.eslintrc b/server/node_modules/express-promise-router/test/.eslintrc new file mode 100644 index 0000000..949ccc9 --- /dev/null +++ b/server/node_modules/express-promise-router/test/.eslintrc @@ -0,0 +1,8 @@ +{ + "env": { + "mocha": true + }, + "rules": { + "no-unused-vars": 0 + } +} diff --git a/server/node_modules/express-promise-router/test/babel.test.js b/server/node_modules/express-promise-router/test/babel.test.js new file mode 100644 index 0000000..7f7a4c1 --- /dev/null +++ b/server/node_modules/express-promise-router/test/babel.test.js @@ -0,0 +1,35 @@ +"use strict"; + +var resolve = require("path").resolve; +var assert = require("chai").assert; +var spawnBabel = require("./util/launch-utils").spawnBabel; +var GET = require("./util/http-utils").GET; + +describe("Babel", function () { + it("should run the example and respond", function (done) { + this.timeout(5000); + var js_file = resolve(__dirname, "./test-resources/babel-base-case.js"); + var target = spawnBabel(js_file); + var called = false; + + target.stdout.on("data", function (data) { + if (data.toString().indexOf("START") === -1) { + return; + } + + GET("/").then(function () { + called = true; + target.kill("SIGINT"); + }); + }); + + target.stderr.on("data", function (data) { + console.error(data.toString()); + }); + + target.on("close", function () { + assert(called); + done(); + }); + }); +}); diff --git a/server/node_modules/express-promise-router/test/commonjs.test.js b/server/node_modules/express-promise-router/test/commonjs.test.js new file mode 100644 index 0000000..448649e --- /dev/null +++ b/server/node_modules/express-promise-router/test/commonjs.test.js @@ -0,0 +1,35 @@ +"use strict"; + +var resolve = require("path").resolve; +var assert = require("chai").assert; +var spawnJavaScript = require("./util/launch-utils").spawnJavaScript; +var GET = require("./util/http-utils").GET; + +describe("CommonJs", function () { + it("should run the example and respond", function (done) { + this.timeout(5000); + var js_file = resolve(__dirname, "./test-resources/commonjs-base-case.js"); + var target = spawnJavaScript(js_file); + var called = false; + + target.stdout.on("data", function (data) { + if (data.toString().indexOf("START") === -1) { + return; + } + + GET("/").then(function () { + called = true; + target.kill("SIGINT"); + }); + }); + + target.stderr.on("data", function (data) { + console.error(data.toString()); + }); + + target.on("close", function () { + assert(called); + done(); + }); + }); +}); diff --git a/server/node_modules/express-promise-router/test/express-promise-router.route.test.js b/server/node_modules/express-promise-router/test/express-promise-router.route.test.js new file mode 100644 index 0000000..47b87f6 --- /dev/null +++ b/server/node_modules/express-promise-router/test/express-promise-router.route.test.js @@ -0,0 +1,353 @@ +"use strict"; + +var assert = require("chai").assert; +var sinon = require("sinon"); +var express = require("express"); +var GET = require("./util/http-utils").GET; + +var delay = function (method, payload) { + setTimeout(function () { + method(payload); + }, 10); +}; + +var PromiseRouter = require("../lib/express-promise-router.js"); + +describe("new Router().route(...)", function () { + var app; + var serverListening; + var server; + var router; + + var bootstrap = function (router) { + app = express(); + app.use("/", router); + + if (serverListening) { + throw "already bootstrapped"; + } + + serverListening = new Promise(function (resolve, reject) { + server = app.listen(12345, function (err) { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + + return serverListening; + }; + + beforeEach(function () { + router = new PromiseRouter(); + }); + + afterEach(function () { + if (serverListening) { + return serverListening.then(function () { + server.close(); + app = undefined; + server = undefined; + serverListening = undefined; + }); + } + }); + + it("should call next with an error when a returned promise is rejected", function () { + var callback = sinon.spy(); + + router.route("/foo").get(function () { + return new Promise(function (resolve, reject) { + delay(reject, "some error"); + }); + }); + router.use(function (err, req, res, next) { + assert.equal("some error", err); + callback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.calledOnce); + }); + }); + + it('should call next without an error when a returned promise is resolved with "next"', function () { + var errorCallback = sinon.spy(); + var nextCallback = sinon.spy(); + + router + .route("/foo") + .get(function () { + return new Promise(function (resolve) { + delay(resolve, "next"); + }); + }) + .all(function (req, res) { + nextCallback(); + res.send(); + }); + router.use(function (err, req, res, next) { + errorCallback(); + next(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(errorCallback.notCalled); + assert(nextCallback.calledOnce); + }); + }); + + it('should not call next when a returned promise is resolved with anything other than "route" or "next"', function () { + var callback = sinon.spy(); + + router.route("/foo").get(function (req, res) { + return new Promise(function (resolve) { + res.send(); + delay(resolve, "something"); + }); + }); + router.route("/bar").get(function (req, res) { + return new Promise(function (resolve) { + res.send(); + delay(resolve, {}); + }); + }); + router.use(function (req, res) { + callback(); + res.send(500); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.notCalled); + return GET("/bar"); + }) + .then(function () { + assert(callback.notCalled); + }); + }); + + it("should move to the next middleware when next is called without an error", function () { + var callback = sinon.spy(); + + router + .route("/foo") + .get(function (req, res, next) { + next(); + }) + .all(function (req, res, next) { + callback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.calledOnce); + }); + }); + + it("should move to the next error handler when next is called with an error", function () { + var callback = sinon.spy(); + var errorCallback = sinon.spy(); + + router + .route("/foo") + .get(function (req, res, next) { + next("an error"); + }) + .all(function (req, res, next) { + callback(); + next(); + }); + router.use(function (err, req, res, next) { + assert.equal("an error", err); + errorCallback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(errorCallback.calledOnce); + assert(callback.notCalled); + }); + }); + + it("should call chained handlers in the correct order", function () { + var fn2 = sinon.spy(function (req, res) { + res.send(); + }); + var fn1 = sinon.spy(function () { + assert(fn2.notCalled); + return Promise.resolve("next"); + }); + + router.route("/foo").get(fn1, fn2); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it("should correctly call an array of handlers", function () { + var fn2 = sinon.spy(function (req, res) { + res.send(); + }); + var fn1 = sinon.spy(function () { + assert(fn2.notCalled); + return Promise.resolve("next"); + }); + + router.route("/foo").get([[fn1], [fn2]]); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it('should call next("route") if a returned promise is resolved with "route"', function () { + var fn1 = function () { + return Promise.resolve("route"); + }; + var fn2 = function () { + assert.fail(); + }; + + router.route("/foo").get(fn1, fn2); + + router.route("/foo").get(function (req, res) { + res.send(); + }); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it("should bind to RegExp routes", function () { + var fn1 = function (req, res) { + res.send(); + }; + + router.route(/^\/foo/).get(fn1); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it('multiple calls to handlers that have used "next" should not interfere with each other', function () { + var fn = sinon.spy(function (req, res, next) { + if (fn.calledOnce) { + next("error"); + } else { + setTimeout(function () { + res.status(200).send("ok"); + }, 15); + } + }); + var errHandler = function (err, req, res, next) { + if (err === "error") { + res.send("fail"); + } else { + next(err); + } + }; + + router.route("/foo").get(fn, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "fail"); + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "ok"); + }); + }); + + it("calls next if next is called even if the handler returns a promise", function () { + var fn = function (req, res, next) { + next(); + return new Promise(function (resolve, reject) {}); + }; + var fn2 = function (req, res) { + res.send("ok"); + }; + var errHandler = function (err, req, res, next) { + res.send("error"); + }; + + router.route("/foo").get(fn, fn2, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "ok"); + }); + }); + + it("calls next with an error if the returned promise is rejected with no reason", function () { + var fn = function () { + return new Promise(function (resolve, reject) { + delay(reject, null); + }); + }; + var errHandler = function (err, req, res, next) { + res.send("error"); + }; + + router.route("/foo").get(fn, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "error"); + }); + }); + + it("should handle resolved promises returned in req.param() calls", function () { + router.param("id", function () { + return new Promise(function (resolve) { + delay(resolve, "next"); + }); + }); + router.route("/foo/:id").all(function (req, res) { + res.send("done"); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo/1"); + }) + .then(function (res) { + assert.equal(res.body, "done"); + }); + }); +}); diff --git a/server/node_modules/express-promise-router/test/express-promise-router.test.js b/server/node_modules/express-promise-router/test/express-promise-router.test.js new file mode 100644 index 0000000..3539e2f --- /dev/null +++ b/server/node_modules/express-promise-router/test/express-promise-router.test.js @@ -0,0 +1,401 @@ +"use strict"; + +var assert = require("chai").assert; +var sinon = require("sinon"); +var express = require("express"); +var GET = require("./util/http-utils").GET; + +var delay = function (method, payload) { + setTimeout(function () { + method(payload); + }, 10); +}; + +var PromiseRouter = require("../lib/express-promise-router.js"); + +describe("express-promise-router", function () { + var app; + var serverListening; + var server; + var router; + + var bootstrap = function (router) { + app = express(); + app.use("/", router); + + if (serverListening) { + throw "already bootstrapped"; + } + + serverListening = new Promise(function (resolve, reject) { + server = app.listen(12345, function (err) { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + + return serverListening; + }; + + beforeEach(function () { + router = new PromiseRouter(); + }); + + afterEach(function () { + if (serverListening) { + return serverListening.then(function () { + server.close(); + app = undefined; + server = undefined; + serverListening = undefined; + }); + } + }); + + it("should call next with an error when a returned promise is rejected", function () { + var callback = sinon.spy(); + + router.use("/foo", function () { + return new Promise(function (resolve, reject) { + delay(reject, "some error"); + }); + }); + router.use(function (err, req, res, next) { + assert.equal("some error", err); + callback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.calledOnce); + }); + }); + + it('should call next without an error when a returned promise is resolved with "next"', function () { + var errorCallback = sinon.spy(); + var nextCallback = sinon.spy(); + + router.use("/foo", function () { + return new Promise(function (resolve) { + delay(resolve, "next"); + }); + }); + router.use("/foo", function (req, res) { + nextCallback(); + res.send(); + }); + router.use(function (err, req, res, next) { + errorCallback(); + next(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(errorCallback.notCalled); + assert(nextCallback.calledOnce); + }); + }); + + it('should not call next when a returned promise is resolved with anything other than "route" or "next"', function () { + var callback = sinon.spy(); + + router.get("/foo", function (req, res) { + return new Promise(function (resolve) { + res.send(); + delay(resolve, "something"); + }); + }); + router.get("/bar", function (req, res) { + return new Promise(function (resolve) { + res.send(); + delay(resolve, {}); + }); + }); + router.use(function (req, res) { + callback(); + res.send(500); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.notCalled); + return GET("/bar"); + }) + .then(function () { + assert(callback.notCalled); + }); + }); + + it("should move to the next middleware when next is called without an error", function () { + var callback = sinon.spy(); + + router.use("/foo", function (req, res, next) { + next(); + }); + router.use("/foo", function (req, res, next) { + callback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(callback.calledOnce); + }); + }); + + it("should move to the next error handler when next is called with an error", function () { + var callback = sinon.spy(); + var errorCallback = sinon.spy(); + + router.use("/foo", function (req, res, next) { + next("an error"); + }); + router.use("/foo", function (req, res, next) { + callback(); + next(); + }); + router.use(function (err, req, res, next) { + assert.equal("an error", err); + errorCallback(); + res.send(); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function () { + assert(errorCallback.calledOnce); + assert(callback.notCalled); + }); + }); + + it("should call chained handlers in the correct order", function () { + var fn2 = sinon.spy(function (req, res) { + res.send(); + }); + var fn1 = sinon.spy(function () { + assert(fn2.notCalled); + return Promise.resolve("next"); + }); + + router.get("/foo", fn1, fn2); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it("should correctly call an array of handlers", function () { + var fn2 = sinon.spy(function (req, res) { + res.send(); + }); + var fn1 = sinon.spy(function () { + assert(fn2.notCalled); + return Promise.resolve("next"); + }); + + router.get("/foo", [[fn1], [fn2]]); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it('should call next("route") if a returned promise is resolved with "route"', function () { + var fn1 = function () { + return Promise.resolve("route"); + }; + var fn2 = function () { + assert.fail(); + }; + + router.get("/foo", fn1, fn2); + router.get("/foo", function (req, res) { + res.send(); + }); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it("should bind to RegExp routes", function () { + var fn1 = function (req, res) { + res.send(); + }; + + router.get(/^\/foo/, fn1); + + return bootstrap(router).then(function () { + return GET("/foo"); + }); + }); + + it('multiple calls to handlers that have used "next" should not interfere with each other', function () { + var fn = sinon.spy(function (req, res, next) { + if (fn.calledOnce) { + next("error"); + } else { + setTimeout(function () { + res.status(200).send("ok"); + }, 15); + } + }); + var errHandler = function (err, req, res, next) { + if (err === "error") { + res.send("fail"); + } else { + next(err); + } + }; + + router.get("/foo", fn, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "fail"); + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "ok"); + }); + }); + + it("calls next if next is called even if the handler returns a promise", function () { + var fn = function (req, res, next) { + next(); + return new Promise(function (resolve, reject) {}); + }; + var fn2 = function (req, res) { + res.send("ok"); + }; + var errHandler = function (err, req, res, next) { + res.send("error"); + }; + + router.get("/foo", fn, fn2, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "ok"); + }); + }); + + it("calls next with an error if the returned promise is rejected with no reason", function () { + var fn = function () { + return new Promise(function (resolve, reject) { + delay(reject, null); + }); + }; + var errHandler = function (err, req, res, next) { + res.send("error"); + }; + + router.get("/foo", fn, errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo"); + }) + .then(function (res) { + assert.equal(res.body, "error"); + }); + }); + + it("should handle resolved promises returned in req.param() calls", function () { + router.param("id", function () { + return new Promise(function (resolve) { + delay(resolve, "next"); + }); + }); + router.use("/foo/:id", function (req, res) { + res.send("done"); + }); + + return bootstrap(router) + .then(function () { + return GET("/foo/1"); + }) + .then(function (res) { + assert.equal(res.body, "done"); + }); + }); + + it("should call next with unresolved promises returned in req.param() calls", function () { + var assertOutput = "error in param"; + + router.param("id", function (req, res, next, id) { + return new Promise(function (resolve, reject) { + delay(reject, assertOutput); + }); + }); + + var fn = function (req, res) { + res.send("done"); + }; + + var errHandler = function (err, req, res, next) { + res.send(err); + }; + + router.use("/foo/:id", fn); + + router.use(errHandler); + + return bootstrap(router) + .then(function () { + return GET("/foo/1"); + }) + .then(function (res) { + assert.equal(res.body, assertOutput); + }); + }); + + it("support array in routes values", function () { + router.use(["/", "/foo/:bar"], function (req, res) { + res.send("done"); + }); + + return bootstrap(router) + .then(function () { + return GET("/"); + }) + .then(function (res) { + assert.equal(res.body, "done"); + + return GET("/foo/1"); + }) + .then(function (res) { + assert.equal(res.body, "done"); + }); + }); + + it("should throw sensible errors when handler is not a function", function () { + assert.throws(function () { + router.use("/foo/:id", null); + }, /callback/); + }); +}); diff --git a/server/node_modules/express-promise-router/test/test-resources/.eslintrc b/server/node_modules/express-promise-router/test/test-resources/.eslintrc new file mode 100644 index 0000000..a7ac9f7 --- /dev/null +++ b/server/node_modules/express-promise-router/test/test-resources/.eslintrc @@ -0,0 +1,6 @@ +{ + "parserOptions": { + "ecmaVersion": 2015, + "sourceType": "module" + } +} diff --git a/server/node_modules/express-promise-router/test/test-resources/babel-base-case.js b/server/node_modules/express-promise-router/test/test-resources/babel-base-case.js new file mode 100644 index 0000000..521e39e --- /dev/null +++ b/server/node_modules/express-promise-router/test/test-resources/babel-base-case.js @@ -0,0 +1,12 @@ +import express from "express"; +import Router from "../../lib/express-promise-router.js"; +const router = Router(); + +router.get("/", function (req, res) { + res.send("Hi!"); +}); + +const app = express(); +app.use(router); +app.listen(12345); +console.log("START"); diff --git a/server/node_modules/express-promise-router/test/test-resources/commonjs-base-case.js b/server/node_modules/express-promise-router/test/test-resources/commonjs-base-case.js new file mode 100644 index 0000000..1470fd8 --- /dev/null +++ b/server/node_modules/express-promise-router/test/test-resources/commonjs-base-case.js @@ -0,0 +1,12 @@ +var express = require("express"); +var Router = require("../../lib/express-promise-router.js"); +var router = Router(); + +router.get("/", function (req, res) { + res.send("Hi!"); +}); + +var app = express(); +app.use(router); +app.listen(12345); +console.log("START"); diff --git a/server/node_modules/express-promise-router/test/test-resources/typescript-base-case.ts b/server/node_modules/express-promise-router/test/test-resources/typescript-base-case.ts new file mode 100644 index 0000000..17fc159 --- /dev/null +++ b/server/node_modules/express-promise-router/test/test-resources/typescript-base-case.ts @@ -0,0 +1,13 @@ +/// +import * as express from "express"; +import Router from "../../lib/express-promise-router.js"; +const router = Router(); + +router.get("/", function (req, res) { + res.send("Hi!"); +}); + +const app = express(); +app.use(router); +app.listen(12345); +console.log("START"); diff --git a/server/node_modules/express-promise-router/test/tracing.test.js b/server/node_modules/express-promise-router/test/tracing.test.js new file mode 100644 index 0000000..d1cab26 --- /dev/null +++ b/server/node_modules/express-promise-router/test/tracing.test.js @@ -0,0 +1,36 @@ +const Router = require("../lib/express-promise-router"); +const assert = require("chai").assert; + +describe("function name", function () { + it("uses the wrapped handler's name in a route handler", function () { + const router = Router(); + router.get("/test-route", function actualHandler() {}); + + assert.equal(router.stack[0].route.stack[0].handle.name, "actualHandler"); + assert.equal(router.stack[0].route.stack[0].name, "actualHandler"); + }); + + it("uses the wrapped handler's name in a middleware handler", function () { + const router = Router(); + router.use(function actualHandler(req, res, next) {}); + + assert.equal(router.stack[0].handle.name, "actualHandler"); + assert.equal(router.stack[0].name, "actualHandler"); + }); + + it("uses the wrapped handler's name in an error middleware", function () { + const router = Router(); + router.use(function actualErrorHandler(err, req, res, next) {}); + + assert.equal(router.stack[0].handle.name, "actualErrorHandler"); + assert.equal(router.stack[0].name, "actualErrorHandler"); + }); + + it("empty name for anonymous middleware handler", function () { + const router = Router(); + router.use((req, res, next) => {}); + + assert.equal(router.stack[0].handle.name, ""); + assert.equal(router.stack[0].name, ""); + }); +}); diff --git a/server/node_modules/express-promise-router/test/typescript.test.js b/server/node_modules/express-promise-router/test/typescript.test.js new file mode 100644 index 0000000..df308f0 --- /dev/null +++ b/server/node_modules/express-promise-router/test/typescript.test.js @@ -0,0 +1,53 @@ +"use strict"; + +var tt = require("@mormahr/typescript-definition-tester"); +var path = require("path"); +var resolve = require("path").resolve; +var assert = require("chai").assert; +var spawnTypeScript = require("./util/launch-utils").spawnTypeScript; +var GET = require("./util/http-utils").GET; + +describe("TypeScript", function () { + it("should compile base-case successfully against index.d.ts", function (done) { + this.timeout(20000); + tt.compile( + [ + path.resolve( + __dirname + "/typescript-resources/typescript-base-case.ts", + ), + ], + {}, + done.bind(null), + ); + }); + + it("should run the example and respond", function (done) { + this.timeout(5000); + var ts_file = resolve( + __dirname, + "./test-resources/typescript-base-case.ts", + ); + var target = spawnTypeScript(ts_file); + var called = false; + + target.stdout.on("data", function (data) { + if (data.toString().indexOf("START") === -1) { + return; + } + + GET("/").then(function () { + called = true; + target.kill("SIGINT"); + }); + }); + + target.stderr.on("data", function (data) { + console.error(data.toString()); + }); + + target.on("close", function () { + assert(called); + done(); + }); + }); +}); diff --git a/server/node_modules/express-promise-router/test/util/http-utils.js b/server/node_modules/express-promise-router/test/util/http-utils.js new file mode 100644 index 0000000..b79d67a --- /dev/null +++ b/server/node_modules/express-promise-router/test/util/http-utils.js @@ -0,0 +1,14 @@ +var request = require("request-promise"); +var assert = require("chai").assert; + +exports.GET = function (route) { + return request({ + url: "http://localhost:12345" + route, + resolveWithFullResponse: true, + }).then(function (res) { + // Express sends 500 errors for uncaught exceptions (like failed assertions) + // Make sure to still fail the test if an assertion in middleware failed. + assert.equal(res.statusCode, 200); + return res; + }); +}; diff --git a/server/node_modules/express-promise-router/test/util/launch-utils.js b/server/node_modules/express-promise-router/test/util/launch-utils.js new file mode 100644 index 0000000..287c81a --- /dev/null +++ b/server/node_modules/express-promise-router/test/util/launch-utils.js @@ -0,0 +1,40 @@ +var ts = require("typescript"); +var babel = require("@babel/core"); +var fs = require("fs"); +var spawn = require("child_process").spawn; +var dirname = require("path").dirname; + +function spawnString(source, dir) { + return spawn("node", ["-e", source], { + cwd: dir, + }); +} + +// path has to be fully qualified +exports.spawnTypeScript = function spawnTypeScript(path) { + var content = fs.readFileSync(path, "utf-8"); + + var compilerOptions = { + module: ts.ModuleKind.CommonJS, + }; + + var transpiled = ts.transpile(content, compilerOptions); + + return spawnString(transpiled, dirname(path)); +}; + +exports.spawnJavaScript = function spawnJavaScript(path) { + var content = fs.readFileSync(path, "utf-8"); + + return spawnString(content, dirname(path)); +}; + +exports.spawnBabel = function spawnBabel(path) { + var content = fs.readFileSync(path, "utf-8"); + + var result = babel.transform(content, { + plugins: ["@babel/plugin-transform-modules-commonjs"], + }); + + return spawnString(result.code, dirname(path)); +}; diff --git a/server/node_modules/is-promise/LICENSE b/server/node_modules/is-promise/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/server/node_modules/is-promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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. \ No newline at end of file diff --git a/server/node_modules/is-promise/index.d.ts b/server/node_modules/is-promise/index.d.ts new file mode 100644 index 0000000..2107b42 --- /dev/null +++ b/server/node_modules/is-promise/index.d.ts @@ -0,0 +1,2 @@ +declare function isPromise(obj: PromiseLike | S): obj is PromiseLike; +export default isPromise; diff --git a/server/node_modules/is-promise/index.js b/server/node_modules/is-promise/index.js new file mode 100644 index 0000000..1bed087 --- /dev/null +++ b/server/node_modules/is-promise/index.js @@ -0,0 +1,6 @@ +module.exports = isPromise; +module.exports.default = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} diff --git a/server/node_modules/is-promise/index.mjs b/server/node_modules/is-promise/index.mjs new file mode 100644 index 0000000..bf9e99b --- /dev/null +++ b/server/node_modules/is-promise/index.mjs @@ -0,0 +1,3 @@ +export default function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} diff --git a/server/node_modules/is-promise/package.json b/server/node_modules/is-promise/package.json new file mode 100644 index 0000000..46275fc --- /dev/null +++ b/server/node_modules/is-promise/package.json @@ -0,0 +1,61 @@ +{ + "_from": "is-promise@^4.0.0", + "_id": "is-promise@4.0.0", + "_inBundle": false, + "_integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "_location": "/is-promise", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-promise@^4.0.0", + "name": "is-promise", + "escapedName": "is-promise", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/express-promise-router" + ], + "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "_shasum": "42ff9f84206c1991d26debf520dd5c01042dd2f3", + "_spec": "is-promise@^4.0.0", + "_where": "/home/sigonasr2/divar/server/node_modules/express-promise-router", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/is-promise/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Test whether an object looks like a promises-a+ promise", + "exports": { + ".": [ + { + "import": "./index.mjs", + "require": "./index.js", + "default": "./index.js" + }, + "./index.js" + ] + }, + "files": [ + "index.js", + "index.mjs", + "index.d.ts" + ], + "homepage": "https://github.com/then/is-promise#readme", + "license": "MIT", + "main": "./index.js", + "name": "is-promise", + "repository": { + "type": "git", + "url": "git+https://github.com/then/is-promise.git" + }, + "scripts": { + "test": "node test" + }, + "version": "4.0.0" +} diff --git a/server/node_modules/is-promise/readme.md b/server/node_modules/is-promise/readme.md new file mode 100644 index 0000000..d53d34b --- /dev/null +++ b/server/node_modules/is-promise/readme.md @@ -0,0 +1,33 @@ + + +# is-promise + + Test whether an object looks like a promises-a+ promise + + [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) + [![Dependency Status](https://img.shields.io/david/then/is-promise.svg)](https://david-dm.org/then/is-promise) + [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) + + + +## Installation + + $ npm install is-promise + +You can also use it client side via npm. + +## API + +```typescript +import isPromise from 'is-promise'; + +isPromise(Promise.resolve());//=>true +isPromise({then:function () {...}});//=>true +isPromise(null);//=>false +isPromise({});//=>false +isPromise({then: true})//=>false +``` + +## License + + MIT diff --git a/server/node_modules/lodash.flattendeep/LICENSE b/server/node_modules/lodash.flattendeep/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/server/node_modules/lodash.flattendeep/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/server/node_modules/lodash.flattendeep/README.md b/server/node_modules/lodash.flattendeep/README.md new file mode 100644 index 0000000..afcd03c --- /dev/null +++ b/server/node_modules/lodash.flattendeep/README.md @@ -0,0 +1,18 @@ +# lodash.flattendeep v4.4.0 + +The [lodash](https://lodash.com/) method `_.flattenDeep` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.flattendeep +``` + +In Node.js: +```js +var flattenDeep = require('lodash.flattendeep'); +``` + +See the [documentation](https://lodash.com/docs#flattenDeep) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.flattendeep) for more details. diff --git a/server/node_modules/lodash.flattendeep/index.js b/server/node_modules/lodash.flattendeep/index.js new file mode 100644 index 0000000..254b884 --- /dev/null +++ b/server/node_modules/lodash.flattendeep/index.js @@ -0,0 +1,350 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, INFINITY) : []; +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = flattenDeep; diff --git a/server/node_modules/lodash.flattendeep/package.json b/server/node_modules/lodash.flattendeep/package.json new file mode 100644 index 0000000..eeea67a --- /dev/null +++ b/server/node_modules/lodash.flattendeep/package.json @@ -0,0 +1,69 @@ +{ + "_from": "lodash.flattendeep@^4.0.0", + "_id": "lodash.flattendeep@4.4.0", + "_inBundle": false, + "_integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "_location": "/lodash.flattendeep", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lodash.flattendeep@^4.0.0", + "name": "lodash.flattendeep", + "escapedName": "lodash.flattendeep", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/express-promise-router" + ], + "_resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "_shasum": "fb030917f86a3134e5bc9bec0d69e0013ddfedb2", + "_spec": "lodash.flattendeep@^4.0.0", + "_where": "/home/sigonasr2/divar/server/node_modules/express-promise-router", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "deprecated": false, + "description": "The lodash method `_.flattenDeep` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "flattendeep" + ], + "license": "MIT", + "name": "lodash.flattendeep", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.0" +} diff --git a/server/node_modules/pg-minify/README.md b/server/node_modules/pg-minify/README.md new file mode 100644 index 0000000..c9efa7e --- /dev/null +++ b/server/node_modules/pg-minify/README.md @@ -0,0 +1,101 @@ +pg-minify +========= + +Minifies PostgreSQL scripts, reducing the IO usage. + +[![Build Status](https://travis-ci.org/vitaly-t/pg-minify.svg?branch=master)](https://travis-ci.org/vitaly-t/pg-minify) +[![Coverage Status](https://coveralls.io/repos/vitaly-t/pg-minify/badge.svg?branch=master)](https://coveralls.io/r/vitaly-t/pg-minify?branch=master) +[![Join the chat at https://gitter.im/vitaly-t/pg-minify](https://badges.gitter.im/vitaly-t/pg-minify.svg)](https://gitter.im/vitaly-t/pg-minify?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +**Features:** + +* Removes `/*multi-line*/` (including nested) and `--single-line` comments +* Preserves special/copyright multi-line comments that start with `/*!` +* Concatenates multi-line strings into a single line with `\n` +* Fixes multi-line text, prefixing it with `E` where needed +* Removes redundant line gaps: line breaks, tabs and spaces +* Provides basic parsing and error detection for invalid SQL +* Flattens the resulting script into a single line +* Optionally, compresses SQL for minimum space + +## Installing + +``` +$ npm install pg-minify +``` + +## Usage + +```js +const minify = require('pg-minify'); + +const sql = 'SELECT 1; -- comments'; + +minify(sql); //=> SELECT 1; +``` + +with compression (removes all unnecessary spaces): + +```js +const sql = 'SELECT * FROM "table" WHERE col = 123; -- comments'; + +minify(sql, {compress: true}); +//=> SELECT*FROM"table"WHERE col=123; +``` + +The library's distribution includes [TypeScript] declarations. + +## Error Handling + +[SQLParsingError] is thrown on failed SQL parsing: + +```js +try { + minify('SELECT \'1'); +} catch (error) { + // error is minify.SQLParsingError instance + // error.message: + // Error parsing SQL at {line:1,col:8}: Unclosed text block. +} +``` + +## API + +### minify(sql, [options]) ⇒ String + +Minifies SQL into a single line, according to the `options`. + +##### options.compress ⇒ Boolean + +Compresses / uglifies the SQL to its bare minimum, by removing all unnecessary spaces. + +* `false (default)` - keeps minimum spaces, for easier read +* `true` - removes all unnecessary spaces + +See also: [SQL Compression]. + +##### options.removeAll ⇒ Boolean + +Removes everything, i.e. special/copyright multi-line comments that start with `/*!` will be removed as well. + +## Testing + +First, clone the repository and install DEV dependencies. + +``` +$ npm test +``` + +Testing with coverage: +``` +$ npm run coverage +``` + +## License + +Copyright © 2020 [Vitaly Tomilov](https://github.com/vitaly-t); +Released under the MIT license. + +[SQLParsingError]:https://github.com/vitaly-t/pg-minify/blob/master/lib/error.js#L22 +[TypeScript]:https://github.com/vitaly-t/pg-minify/tree/master/typescript +[SQL Compression]:https://github.com/vitaly-t/pg-minify/wiki/SQL-Compression diff --git a/server/node_modules/pg-minify/lib/error.js b/server/node_modules/pg-minify/lib/error.js new file mode 100644 index 0000000..b784877 --- /dev/null +++ b/server/node_modules/pg-minify/lib/error.js @@ -0,0 +1,53 @@ +const {EOL} = require('os'); +const {addInspection, messageGap} = require('./utils'); + +const parsingErrorCode = { + unclosedMLC: 0, // Unclosed multi-line comment. + unclosedText: 1, // Unclosed text block. + unclosedQI: 2, // Unclosed quoted identifier. + multiLineQI: 3 // Multi-line quoted identifiers are not supported. +}; + +Object.freeze(parsingErrorCode); + +const errorMessages = [ + {name: 'unclosedMLC', message: 'Unclosed multi-line comment.'}, + {name: 'unclosedText', message: 'Unclosed text block.'}, + {name: 'unclosedQI', message: 'Unclosed quoted identifier.'}, + {name: 'multiLineQI', message: 'Multi-line quoted identifiers are not supported.'} +]; + +class SQLParsingError extends Error { + constructor(code, position) { + const err = errorMessages[code].message; + const message = `Error parsing SQL at {line:${position.line},col:${position.column}}: ${err}`; + super(message); + this.name = this.constructor.name; + this.error = err; + this.code = code; + this.position = position; + Error.captureStackTrace(this, this.constructor); + } +} + +SQLParsingError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap = messageGap(level + 1); + const lines = [ + `SQLParsingError {`, + `${gap}code: parsingErrorCode.${errorMessages[this.code].name}`, + `${gap}error: "${this.error}"`, + `${gap}position: {line: ${this.position.line}, col: ${this.position.column}}`, + `${messageGap(level)}}` + ]; + return lines.join(EOL); +}; + +addInspection(SQLParsingError.prototype, function () { + return this.toString(); +}); + +module.exports = { + SQLParsingError, + parsingErrorCode +}; diff --git a/server/node_modules/pg-minify/lib/index.js b/server/node_modules/pg-minify/lib/index.js new file mode 100644 index 0000000..ae798c7 --- /dev/null +++ b/server/node_modules/pg-minify/lib/index.js @@ -0,0 +1,7 @@ +const parser = require('./parser'); +const error = require('./error'); + +parser.SQLParsingError = error.SQLParsingError; +parser.parsingErrorCode = error.parsingErrorCode; + +module.exports = parser; diff --git a/server/node_modules/pg-minify/lib/parser.js b/server/node_modules/pg-minify/lib/parser.js new file mode 100644 index 0000000..11b4431 --- /dev/null +++ b/server/node_modules/pg-minify/lib/parser.js @@ -0,0 +1,196 @@ +const {parsingErrorCode, SQLParsingError} = require('./error'); +const {getIndexPos} = require('./utils'); + +// symbols that need no spaces around them: +const compressors = '.,;:()[]=<>+-*/|!?@#'; + +//////////////////////////////////////////// +// Parses and minimizes a PostgreSQL script. +function minify(sql, options) { + + if (typeof sql !== 'string') { + throw new TypeError('Input SQL must be a text string.'); + } + + if (!sql.length) { + return ''; + } + + sql = sql.replace(/\r\n/g, '\n'); + + options = options || {}; + + let idx = 0, // current index + result = '', // resulting sql + space = false; // add a space on the next step + + const len = sql.length; + + do { + const s = sql[idx], // current symbol; + s1 = sql[idx + 1]; // next symbol; + + if (isGap(s)) { + while (++idx < len && isGap(sql[idx])) ; + if (idx < len) { + space = true; + } + idx--; + continue; + } + + if (s === '-' && s1 === '-') { + const lb = sql.indexOf('\n', idx + 2); + if (lb < 0) { + break; + } + idx = lb - 1; + skipGaps(); + continue; + } + + if (s === '/' && s1 === '*') { + let c = idx + 1, open = 0, close = 0, lastOpen, lastClose; + while (++c < len - 1 && close <= open) { + if (sql[c] === '/' && sql[c + 1] === '*') { + lastOpen = c; + open++; + c++; + } else { + if (sql[c] === '*' && sql[c + 1] === '/') { + lastClose = c; + close++; + c++; + } + } + } + if (close <= open) { + idx = lastOpen; + throwError(parsingErrorCode.unclosedMLC); + } + if (sql[idx + 2] === '!' && !options.removeAll) { + if (options.compress) { + space = false; + } + addSpace(); + result += sql.substring(idx, lastClose + 2) + .replace(/\n/g, '\r\n'); + } + idx = lastClose + 1; + skipGaps(); + continue; + } + + let closeIdx, text; + + if (s === '"') { + closeIdx = sql.indexOf('"', idx + 1); + if (closeIdx < 0) { + throwError(parsingErrorCode.unclosedQI); + } + text = sql.substring(idx, closeIdx + 1); + if (text.indexOf('\n') > 0) { + throwError(parsingErrorCode.multiLineQI); + } + if (options.compress) { + space = false; + } + addSpace(); + result += text; + idx = closeIdx; + skipGaps(); + continue; + } + + if (s === `'`) { + closeIdx = idx; + do { + closeIdx = sql.indexOf(`'`, closeIdx + 1); + if (closeIdx > 0) { + let i = closeIdx; + while (sql[--i] === '\\') ; + if ((closeIdx - i) % 2) { + let step = closeIdx; + while (++step < len && sql[step] === `'`) ; + if ((step - closeIdx) % 2) { + closeIdx = step - 1; + break; + } + closeIdx = step === len ? -1 : step; + } + } + } while (closeIdx > 0); + if (closeIdx < 0) { + throwError(parsingErrorCode.unclosedText); + } + if (options.compress) { + space = false; + } + addSpace(); + text = sql.substring(idx, closeIdx + 1); + const hasLB = text.indexOf('\n') > 0; + if (hasLB) { + text = text.split('\n').map(m => { + return m.replace(/^\s+|\s+$/g, ''); + }).join('\\n'); + } + const hasTabs = text.indexOf('\t') > 0; + if (hasLB || hasTabs) { + const prev = idx ? sql[idx - 1] : ''; + if (prev !== 'E' && prev !== 'e') { + const r = result ? result[result.length - 1] : ''; + if (r && r !== ' ' && compressors.indexOf(r) < 0) { + result += ' '; + } + result += 'E'; + } + if (hasTabs) { + text = text.replace(/\t/g, '\\t'); + } + } + result += text; + idx = closeIdx; + skipGaps(); + continue; + } + + if (options.compress && compressors.indexOf(s) >= 0) { + space = false; + skipGaps(); + } + + addSpace(); + result += s; + + } while (++idx < len); + + return result; + + function skipGaps() { + if (options.compress) { + while (idx < len - 1 && isGap(sql[idx + 1]) && idx++) ; + } + } + + function addSpace() { + if (space) { + if (result.length) { + result += ' '; + } + space = false; + } + } + + function throwError(code) { + const position = getIndexPos(sql, idx); + throw new SQLParsingError(code, position); + } +} + +//////////////////////////////////// +// Identifies a gap / empty symbol. +function isGap(s) { + return s === ' ' || s === '\t' || s === '\r' || s === '\n'; +} + +module.exports = minify; diff --git a/server/node_modules/pg-minify/lib/utils.js b/server/node_modules/pg-minify/lib/utils.js new file mode 100644 index 0000000..ae46ee5 --- /dev/null +++ b/server/node_modules/pg-minify/lib/utils.js @@ -0,0 +1,38 @@ +const {inspect} = require('util'); + +///////////////////////////////////////////////////////////// +// Returns {line, column} of an index within multi-line text. +function getIndexPos(text, index) { + let lineIdx = 0, colIdx = index, pos = 0; + do { + pos = text.indexOf('\n', pos); + if (pos === -1 || index < pos + 1) { + break; + } + lineIdx++; + pos++; + colIdx = index - pos; + } while (pos < index); + return { + line: lineIdx + 1, + column: colIdx + 1 + }; +} + +/////////////////////////////////////////// +// Returns a space gap for console output. +function messageGap(level) { + return ' '.repeat(level * 4); +} + +//////////////////////////////////////////////////// +// Type inspection +function addInspection(type, cb) { + type[inspect.custom] = cb; +} + +module.exports = { + getIndexPos, + messageGap, + addInspection +}; diff --git a/server/node_modules/pg-minify/package.json b/server/node_modules/pg-minify/package.json new file mode 100644 index 0000000..3066f71 --- /dev/null +++ b/server/node_modules/pg-minify/package.json @@ -0,0 +1,76 @@ +{ + "_from": "pg-minify@1.6.2", + "_id": "pg-minify@1.6.2", + "_inBundle": false, + "_integrity": "sha512-1KdmFGGTP6jplJoI8MfvRlfvMiyBivMRP7/ffh4a11RUFJ7kC2J0ZHlipoKiH/1hz+DVgceon9U2qbaHpPeyPg==", + "_location": "/pg-minify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pg-minify@1.6.2", + "name": "pg-minify", + "escapedName": "pg-minify", + "rawSpec": "1.6.2", + "saveSpec": null, + "fetchSpec": "1.6.2" + }, + "_requiredBy": [ + "/pg-promise" + ], + "_resolved": "https://registry.npmjs.org/pg-minify/-/pg-minify-1.6.2.tgz", + "_shasum": "055acfe862cfca3ca0a529020846b0f308d68e70", + "_spec": "pg-minify@1.6.2", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise", + "author": { + "name": "Vitaly Tomilov", + "email": "vitaly.tomilov@gmail.com" + }, + "bugs": { + "url": "https://github.com/vitaly-t/pg-minify/issues", + "email": "vitaly.tomilov@gmail.com" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Minifies PostgreSQL scripts.", + "devDependencies": { + "coveralls": "3.1.0", + "eslint": "7.16.0", + "istanbul": "0.4.5", + "jasmine-node": "3.0.0", + "typescript": "4.1.3" + }, + "engines": { + "node": ">=8.0" + }, + "files": [ + "lib", + "typescript" + ], + "homepage": "https://github.com/vitaly-t/pg-minify", + "keywords": [ + "sql", + "postgresql", + "comments", + "minify", + "uglify", + "compress", + "strip", + "remove" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "pg-minify", + "repository": { + "type": "git", + "url": "git+https://github.com/vitaly-t/pg-minify.git" + }, + "scripts": { + "coverage": "istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test", + "lint": "eslint ./lib ./test/*.js", + "test": "jasmine-node --captureExceptions test", + "travis": "npm run lint && istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test --captureExceptions && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + }, + "typings": "typescript/pg-minify.d.ts", + "version": "1.6.2" +} diff --git a/server/node_modules/pg-minify/typescript/README.md b/server/node_modules/pg-minify/typescript/README.md new file mode 100644 index 0000000..86e68ce --- /dev/null +++ b/server/node_modules/pg-minify/typescript/README.md @@ -0,0 +1,26 @@ +## TypeScript for pg-minify + +Complete TypeScript 3.x (`strict` mode) declarations for the module. + +### Inclusion + +Typescript picks up the definitions without any manual configuration. + +### Usage + +```ts +import * as minify from 'pg-minify'; + +const sql = 'SELECT 1; -- comments'; + +minify(sql); //=> SELECT 1; +``` + +And if you are using `"allowSyntheticDefaultImports": true` in your `tsconfig.json`, +then you can include it like this: + +```ts +import minify from 'pg-minify'; +``` + +[pg-minify]:https://github.com/vitaly-t/pg-minify diff --git a/server/node_modules/pg-minify/typescript/pg-minify.d.ts b/server/node_modules/pg-minify/typescript/pg-minify.d.ts new file mode 100644 index 0000000..0e1f299 --- /dev/null +++ b/server/node_modules/pg-minify/typescript/pg-minify.d.ts @@ -0,0 +1,36 @@ +//////////////////////////////////////// +// For pg-minify v1.6.0 or later. +//////////////////////////////////////// + +declare namespace pgMinify { + + interface IMinifyOptions { + compress?: boolean; + removeAll?: boolean; + } + + interface IErrorPosition { + line: number; + column: number; + } + + enum parsingErrorCode { + unclosedMLC = 0, // Unclosed multi-line comment. + unclosedText = 1, // Unclosed text block. + unclosedQI = 2, // Unclosed quoted identifier. + multiLineQI = 3 // Multi-line quoted identifiers are not supported. + } + + class SQLParsingError implements Error { + name: string; + message: string; + stack: string; + error: string; + code: parsingErrorCode; + position: IErrorPosition; + } +} + +declare function pgMinify(sql: string, options?: pgMinify.IMinifyOptions): string; + +export = pgMinify; diff --git a/server/node_modules/pg-promise/LICENSE b/server/node_modules/pg-promise/LICENSE new file mode 100644 index 0000000..e2a556b --- /dev/null +++ b/server/node_modules/pg-promise/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2018 Vitaly Tomilov + +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. diff --git a/server/node_modules/pg-promise/README.md b/server/node_modules/pg-promise/README.md new file mode 100644 index 0000000..754579f --- /dev/null +++ b/server/node_modules/pg-promise/README.md @@ -0,0 +1,1136 @@ +pg-promise +========== + +PostgreSQL interface for Node.js + +--- + +* [About](#about) +* [Support & Sponsorship](#support--sponsorship) +* [Documentation](#documentation) +* [Contributing](#contributing) +* [Usage] + - [Methods](#methods) + - [Query Formatting](#query-formatting) + - [Index Variables] + - [Named Parameters] + - [Nested Named Parameters] + - [Formatting Filters](#formatting-filters) + - [SQL Names] + - [Alias Filter] + - [Raw Text] + - [Open Values] + - [JSON Filter] + - [CSV Filter] + - [Custom Type Formatting] + - [Explicit CTF] + - [Symbolic CTF] + - [Query Files] + - [Tasks] + - [Conditional Tasks] + - [Transactions] + - [Nested Transactions] + - [Limitations] + - [Configurable Transactions] + - [Conditional Transactions] + - [Library de-initialization] +* [History](#history) + +--- + +# About + +Built on top of [node-postgres], this library adds the following: + +* Automatic connections +* Automatic transactions +* Powerful query-formatting engine + query generation +* Declarative approach to handling query results +* Global events reporting for central handling +* Extensive support for external SQL files +* Support for all promise libraries + +At its inception in 2015, this library was only adding promises to the base driver, hence the name `pg-promise`. +And while the original name was kept, the library's functionality was vastly extended, with promises now being +only its tiny part. + +# Support & Sponsorship + +I do free support here and on [StackOverflow](https://stackoverflow.com/questions/tagged/pg-promise). + +And if you want to help this project, I can accept Bitcoin: `1yki7MXMkuDw8qqe5icVdh1GJZSQSzKZp` + +# Documentation + +Chapter [Usage] below explains the basics you need to know, while the [Official Documentation] +gets you started, and provides links to all other resources. + +# Contributing + +Please read the [Contribution Notes] before opening any new issue or PR. + +# Usage + +Once you have created a [Database] object, according to the steps in the [Official Documentation], +you get access to the methods documented below. + +## Methods + +All query methods of the library are based off generic method [query]. + +You should normally use only the derived, result-specific methods for executing queries, all of which are named according +to how many rows of data the query is expected to return, so for each query you should pick the right method: +[none], [one], [oneOrNone], [many], [manyOrNone] = [any]. Do not confuse the method name for the number of rows +to be affected by the query, which is completely irrelevant. + +By relying on the result-specific methods you protect your code from an unexpected number of data rows, +to be automatically rejected (treated as errors). + +There are also a few specific methods that you will often need: + +* [result], [multi], [multiResult] - for verbose and/or multi-query results; +* [map], [each] - for simpler/inline result pre-processing/re-mapping; +* [func], [proc] - to simplify execution of SQL functions/procedures; +* [stream] - to access rows from a query via a read stream; +* [connect], [task], [tx] + [txIf] - for shared connections + automatic transactions, each exposing a connected protocol + that has additional methods [batch], [page] and [sequence]. + +The protocol is fully customizable / extendable via event [extend]. + +**IMPORTANT:** + +The most important methods to understand from start are [task] and [tx]/[txIf] (see [Tasks] and [Transactions]). +As documented for method [query], it acquires and releases the connection, which makes it a poor choice for executing +multiple queries at once. For this reason, [Chaining Queries] is a must-read, to avoid writing the code that misuses connections. + +[Learn by Example] is a beginner's tutorial based on examples. + +## Query Formatting + +This library comes with embedded query-formatting engine that offers high-performance value escaping, +flexibility and extensibility. It is used by default with all query methods, unless you opt out of it entirely +via option `pgFormatting` within [Initialization Options]. + +All formatting methods used internally are available from the [formatting] namespace, so they can also be used +directly when needed. The main method there is [format], used by every query method to format the query. + +The formatting syntax for variables is decided from the type of `values` passed in: + +* [Index Variables] when `values` is an array or a single basic type; +* [Named Parameters] when `values` is an object (other than `Array` or `null`). + +**ATTENTION:** Never use ES6 template strings or manual concatenation to generate queries, as both +can easily result in broken queries! Only this library's formatting engine knows how to properly escape +variable values for PostgreSQL. + +### Index Variables + +The simplest (classic) formatting uses `$1, $2, ...` syntax to inject values into the query string, +based on their index (from `$1` to `$100000`) from the array of values: + +```js +await db.any('SELECT * FROM product WHERE price BETWEEN $1 AND $2', [1, 10]) +``` + +The formatting engine also supports single-value parametrization for queries that use only variable `$1`: + +```js +await db.any('SELECT * FROM users WHERE name = $1', 'John') +``` + +This however works only for types `number`, `bigint`, `string`, `boolean`, `Date` and `null`, because types like `Array` +and `Object` change the way parameters are interpreted. That's why passing in index variables within an array +is advised as safer, to avoid ambiguities. + +### Named Parameters + +When a query method is parameterized with `values` as an object, the formatting engine expects the query to use +the Named Parameter syntax `$*propName*`, with `*` being any of the following open-close pairs: `{}`, `()`, `<>`, `[]`, `//`. + +```js +// We can use every supported variable syntax at the same time, if needed: +await db.none('INSERT INTO users(first_name, last_name, age) VALUES(${name.first}, $, $/age/)', { + name: {first: 'John', last: 'Dow'}, + age: 30 +}); +``` + +**IMPORTANT:** Never use the reserved `${}` syntax inside ES6 template strings, as those have no knowledge of how to format values +for PostgreSQL. Inside ES6 template strings you should only use one of the 4 alternatives - `$()`, `$<>`, `$[]` or `$//`. +In general, you should either use the standard strings for SQL, or place SQL into external files - see [Query Files]. + +Valid variable names are limited to the syntax of open-name JavaScript variables. And name `this` has special meaning - it refers +to the formatting object itself (see below). + +Keep in mind that while property values `null` and `undefined` are both formatted as `null`, an error is thrown when the +property does not exist. + +**`this` reference** + +Property `this` refers to the formatting object itself, to be inserted as a JSON-formatted string. + +```js +await db.none('INSERT INTO documents(id, doc) VALUES(${id}, ${this})', { + id: 123, + body: 'some text' +}) +//=> INSERT INTO documents(id, doc) VALUES(123, '{"id":123,"body":"some text"}') +``` + +#### Nested Named Parameters + +[Named Parameters] support property name nesting of any depth. + +
    +Example + +```js +const obj = { + one: { + two: { + three: { + value1: 123, + value2: a => { + // a = obj.one.two.three + return 'hello'; + }, + value3: function(a) { + // a = this = obj.one.two.three + return 'world'; + }, + value4: { + toPostgres: a => { + // Custom Type Formatting + // a = obj.one.two.three.value4 + return a.text; + }, + text: 'custom' + } + } + } + } +}; +await db.one('SELECT ${one.two.three.value1}', obj); //=> SELECT 123 +await db.one('SELECT ${one.two.three.value2}', obj); //=> SELECT 'hello' +await db.one('SELECT ${one.two.three.value3}', obj); //=> SELECT 'world' +await db.one('SELECT ${one.two.three.value4}', obj); //=> SELECT 'custom' +``` +
    +
    + +The last name in the resolution can be anything, including: + +* the actual value (basic JavaScript type) +* a function that returns: + - the actual value + - another function + - a [Custom Type Formatting] object +* a [Custom Type Formatting] object that returns: + - the actual value + - another [Custom Type Formatting] object + - a function + +i.e. the resolution chain is infinitely flexible, and supports recursion without limits. + +Please note, however, that nested parameters are not supported within the [helpers] namespace. + +## Formatting Filters + +By default, all values are formatted according to their JavaScript type. Formatting filters (or modifiers), +change that, so the value is formatted differently. + +Note that formatting filters work only for normal queries, and are not available within [PreparedStatement] or +[ParameterizedQuery], because those are, by definition, formatted on the server side. + +Filters use the same syntax for [Index Variables] and [Named Parameters], following immediately the variable name: + +
    +With Index Variables + +```js +await db.any('SELECT $1:name FROM $2:name', ['price', 'products']) +//=> SELECT "price" FROM "products" +``` +
    + +
    +With Named Parameters + +```js +await db.any('SELECT ${column:name} FROM ${table:name}', { + column: 'price', + table: 'products' +}); +//=> SELECT "price" FROM "products" +``` +
    +
    + +The following filters are supported: + +* `:name` / `~` - [SQL Names] + - `:alias` - [Alias Filter] +* `:raw` / `^` - [Raw Text] +* `:value` / `#` - [Open Values] +* `:csv` / `:list` - [CSV Filter] +* `:json` - [JSON Filter] + +### SQL Names + +When a variable name ends with `:name`, or shorter syntax `~` (tilde), it represents an SQL name or identifier, +to be escaped accordingly: + +
    +Using ~ filter + +```js +await db.query('INSERT INTO $1~($2~) VALUES(...)', ['Table Name', 'Column Name']); +//=> INSERT INTO "Table Name"("Column Name") VALUES(...) +``` +
    + +
    +Using :name filter + +```js +await db.query('INSERT INTO $1:name($2:name) VALUES(...)', ['Table Name', 'Column Name']); +//=> INSERT INTO "Table Name"("Column Name") VALUES(...) +``` +
    +
    + +Typically, an SQL name variable is a text string, which must be at least 1 character long. +However, `pg-promise` supports a variety of ways in which SQL names can be supplied: + +* A string that contains only `*` (asterisks) is automatically recognized as _all columns_: + +```js +await db.query('SELECT $1:name FROM $2:name', ['*', 'table']); +//=> SELECT * FROM "table" +``` + +* An array of strings to represent column names: + +```js +await db.query('SELECT ${columns:name} FROM ${table:name}', { + columns: ['column1', 'column2'], + table: 'table' +}); +//=> SELECT "column1","column2" FROM "table" +``` + +* Any object that's not an array gets its properties enumerated for column names: + +```js +const obj = { + one: 1, + two: 2 +}; + +await db.query('SELECT $1:name FROM $2:name', [obj, 'table']); +//=> SELECT "one","two" FROM "table" +``` + +In addition, the syntax supports `this` to enumerate column names from the formatting object: + +```js +const obj = { + one: 1, + two: 2 +}; + +await db.query('INSERT INTO table(${this:name}) VALUES(${this:csv})', obj); +//=> INSERT INTO table("one","two") VALUES(1, 2) +``` + +Relying on this type of formatting for sql names and identifiers, along with regular variable formatting +protects your application from [SQL injection]. + +Method [as.name] implements the formatting. + +#### Alias Filter + +An alias is a simpler, less-strict version of `:name` filter, which only supports a text string, i.e. +it does not support `*`, `this`, array or object as inputs, like `:name` does. However, it supports other +popular cases that are less strict, but cover at least 99% of all use cases, as shown below. + + - It will skip adding surrounding double quotes when the name is a same-case single word: + +```js +await db.any('SELECT full_name as $1:alias FROM $2:name', ['name', 'table']); +//=> SELECT full_name as name FROM "table" +``` + + - It will automatically split the name into multiple SQL names when encountering `.`, and then + escape each part separately, thus supporting auto-composite SQL names: + +```js +await db.any('SELECT * FROM $1:alias', ['schemaName.table']); +//=> SELECT * FROM "schemaName".table +``` + +For more details see method [as.alias] that implements the formatting. + +### Raw Text + +When a variable name ends with `:raw`, or shorter syntax `^`, the value is to be injected as raw text, without escaping. + +Such variables cannot be `null` or `undefined`, because of the ambiguous meaning in this case, and those values +will throw error `Values null/undefined cannot be used as raw text.` + +```js +const where = pgp.as.format('WHERE price BETWEEN $1 AND $2', [5, 10]); // pre-format WHERE condition +await db.any('SELECT * FROM products $1:raw', where); +//=> SELECT * FROM products WHERE price BETWEEN 5 AND 10 +``` + +Special syntax `this:raw` / `this^` is supported, to inject the formatting object as raw JSON string. + +**WARNING:**
    +This filter is unsafe, and should not be used for values that come from the client side, as it may result in [SQL injection]. + +### Open Values + +When a variable name ends with `:value`, or shorter syntax `#`, it is escaped as usual, except when its type is a string, +the trailing quotes are not added. + +Open values are primarily to be able to compose complete `LIKE`/`ILIKE` dynamic statements in external SQL files, +without having to generate them in the code. + +i.e. you can either generate a filter like this in your code: + +```js +const name = 'John'; +const filter = '%' + name + '%'; +``` + +and then pass it in as a regular string variable, or you can pass in only `name`, and have your query use the +open-value syntax to add the extra search logic: + +```sql +SELECT * FROM table WHERE name LIKE '%$1:value%') +``` + +**WARNING:**
    +This filter is unsafe, and should not be used for values that come from the client side, as it may result in [SQL injection]. + +Method [as.value] implements the formatting. + +### JSON Filter + +When a variable name ends with `:json`, explicit JSON formatting is applied to the value. + +By default, any object that's not `Date`, `Array`, `Buffer`, `null` or Custom-Type (see [Custom Type Formatting]), +is automatically formatted as JSON. + +Method [as.json] implements the formatting. + +### CSV Filter + +When a variable name ends with `:csv` or `:list`, it is formatted as a list of Comma-Separated Values, with each +value formatted according to its JavaScript type. + +Typically, you would use this for a value that's an array, though it works for single values also. See the examples below. + +
    +Using :csv filter + +```js +const ids = [1, 2, 3]; +await db.any('SELECT * FROM table WHERE id IN ($1:csv)', [ids]) +//=> SELECT * FROM table WHERE id IN (1,2,3) +``` +
    + +
    +Using :list filter + +```js +const ids = [1, 2, 3]; +await db.any('SELECT * FROM table WHERE id IN ($1:list)', [ids]) +//=> SELECT * FROM table WHERE id IN (1,2,3) +``` +
    +
    + +Using automatic property enumeration: + +
    +Enumeration with :csv filter + +```js +const obj = {first: 123, second: 'text'}; + +await db.none('INSERT INTO table($1:name) VALUES($1:csv)', [obj]) +//=> INSERT INTO table("first","second") VALUES(123,'text') + +await db.none('INSERT INTO table(${this:name}) VALUES(${this:csv})', obj) +//=> INSERT INTO table("first","second") VALUES(123,'text') +``` +
    + +
    +Enumeration with :list filter + +```js +const obj = {first: 123, second: 'text'}; + +await db.none('INSERT INTO table($1:name) VALUES($1:list)', [obj]) +//=> INSERT INTO table("first","second") VALUES(123,'text') + +await db.none('INSERT INTO table(${this:name}) VALUES(${this:list})', obj) +//=> INSERT INTO table("first","second") VALUES(123,'text') +``` +
    +
    + +Method [as.csv] implements the formatting. + +## Custom Type Formatting + +The library supports dual syntax for _CTF_ (Custom Type Formatting): + +* [Explicit CTF] - extending the object/type directly, for ease of use, while changing its signature; +* [Symbolic CTF] - extending the object/type via [Symbol] properties, without changing its signature. + +The library always first checks for the [Symbolic CTF], and if no such syntax is used, only then it checks for the [Explicit CTF]. + +### Explicit CTF + +Any value/object that implements function `toPostgres` is treated as a custom-formatting type. The function is then called to get the actual value, +passing it the object via `this` context, and plus as a single parameter (in case `toPostgres` is an ES6 arrow function): + +```js +const obj = { + toPostgres(self) { + // self = this = obj + + // return a value that needs proper escaping + } +} +``` + +Function `toPostgres` can return anything, including another object with its own `toPostgres` function, i.e. nested custom types are supported. + +The value returned from `toPostgres` is escaped according to its JavaScript type, unless the object also contains property `rawType` set +to a truthy value, in which case the returned value is considered pre-formatted, and thus injected directly, as [Raw Text]: + +```js +const obj = { + toPostgres(self) { + // self = this = obj + + // return a pre-formatted value that does not need escaping + }, + rawType: true // use result from toPostgres directly, as Raw Text +} +``` + +Example below implements a class that auto-formats `ST_MakePoint` from coordinates: + +```js +class STPoint { + constructor(x, y) { + this.x = x; + this.y = y; + this.rawType = true; // no escaping, because we return pre-formatted SQL + } + + toPostgres(self) { + return pgp.as.format('ST_MakePoint($1, $2)', [this.x, this.y]); + } +} +``` + +And a classic syntax for such a class is even simpler: + +```js +function STPoint(x, y){ + this.rawType = true; // no escaping, because we return pre-formatted SQL + this.toPostgres = () => pgp.as.format('ST_MakePoint($1, $2)', [x, y]); +} +``` + +With this class you can use `new STPoint(12, 34)` as a formatting value that will be injected correctly. + +You can also use _CTF_ to override any standard type: + +```js +Date.prototype.toPostgres = a => a.getTime(); +``` + +### Symbolic CTF + +The only difference from [Explicit CTF] is that we set `toPostgres` and `rawType` as ES6 [Symbol] properties, +defined in the [ctf] namespace: + +```js +const {toPostgres, rawType} = pgp.as.ctf; // Global CTF symbols + +const obj = { + [toPostgres](self) { + // self = this = obj + + // return a pre-formatted value that does not need escaping + }, + [rawType]: true // use result from toPostgres directly, as Raw Text +}; +``` + +As CTF symbols are global, you can also configure objects independently of this library: + +```js +const ctf = { + toPostgres: Symbol.for('ctf.toPostgres'), + rawType: Symbol.for('ctf.rawType') +}; +``` + +Other than that, it works exactly as the [Explicit CTF], but without changing the object's signature. + +If you do not know what it means, read the ES6 [Symbol] API and its use for unique property names. +But in short, [Symbol] properties are not enumerated via `for(name in obj)`, i.e. they are not generally +visible within JavaScript, only through specific API `Object.getOwnPropertySymbols`. + +## Query Files + +Use of external SQL files (via [QueryFile]) offers many advantages: + +* Much cleaner JavaScript code, with all SQL kept in external files; +* Much easier to write large and well-formatted SQL, with many comments and whole revisions; +* Changes in external SQL can be automatically re-loaded (option `debug`), without restarting the app; +* Pre-formatting SQL upon loading (option `params`), automating two-step SQL formatting; +* Parsing and minifying SQL (options `minify` + `compress`), for early error detection and compact queries. + +
    +Example + +```js +const {join: joinPath} = require('path'); + +// Helper for linking to external query files: +function sql(file) { + const fullPath = joinPath(__dirname, file); + return new pgp.QueryFile(fullPath, {minify: true}); +} + +// Create a QueryFile globally, once per file: +const sqlFindUser = sql('./sql/findUser.sql'); + +db.one(sqlFindUser, {id: 123}) + .then(user => { + console.log(user); + }) + .catch(error => { + if (error instanceof pgp.errors.QueryFileError) { + // => the error is related to our QueryFile + } + }); +``` + +File `findUser.sql`: + +```sql +/* + multi-line comments are supported +*/ +SELECT name, dob -- single-line comments are supported +FROM Users +WHERE id = ${id} +``` +
    +
    + +Every query method of the library can accept type [QueryFile] as its `query` parameter. +Type [QueryFile] never throws any error, leaving it for query methods to gracefully reject with [QueryFileError]. + +Use of [Named Parameters] within external SQL files is recommended over the [Index Variables], because it makes the SQL +much easier to read and understand, and because it also allows [Nested Named Parameters], so variables in a large +and complex SQL file can be grouped in namespaces for even easier visual separation. + +## Tasks + +A [task] represents a shared connection for executing multiple queries: + +```js +db.task(t => { + // execute a chain of queries against the task context, and return the result: + return t.one('SELECT count(*) FROM events WHERE id = $1', 123, a => +a.count) + .then(count => { + if(count > 0) { + return t.any('SELECT * FROM log WHERE event_id = $1', 123) + .then(logs => { + return {count, logs}; + }) + } + return {count}; + }); +}) + .then(data => { + // success, data = either {count} or {count, logs} + }) + .catch(error => { + // failed + }); +``` + +Tasks provide a shared connection context for its callback function, to be released when finished, and +they must be used whenever executing more than one query at a time. See also [Chaining Queries] to understand +the importance of using tasks. + +You can optionally tag tasks (see [Tags]), and use ES7 async syntax: + +
    + With ES7 async + +```js +db.task(async t => { + const count = await t.one('SELECT count(*) FROM events WHERE id = $1', 123, a => +a.count); + if(count > 0) { + const logs = await t.any('SELECT * FROM log WHERE event_id = $1', 123); + return {count, logs}; + } + return {count}; +}) + .then(data => { + // success, data = either {count} or {count, logs} + }) + .catch(error => { + // failed + }); +``` + +
    + +
    + With ES7 async + tag + +```js +db.task('get-event-logs', async t => { + const count = await t.one('SELECT count(*) FROM events WHERE id = $1', 123, a => +a.count); + if(count > 0) { + const logs = await t.any('SELECT * FROM log WHERE event_id = $1', 123); + return {count, logs}; + } + return {count}; +}) + .then(data => { + // success, data = either {count} or {count, logs} + }) + .catch(error => { + // failed + }); +``` + +
    + +### Conditional Tasks + +Method [taskIf] creates a new task only when required, according to the condition. + +The default condition is to start a new task only when necessary, such as on the top level. + +
    +With default condition + +```js +db.taskIf(t1 => { + // new task has started, as the top level doesn't have one + return t1.taskIf(t2 => { + // Task t1 is being used, according to the default condition + // t2 = t1 + }); +}) +``` +
    + +
    +With a custom condition - value + +```js +db.taskIf({cnd: false}, t1 => { + // new task is created, i.e. option cnd is ignored here, + // because the task is required on the top level + return t1.taskIf({cnd: true}, t2 => { + // new task created, because we specified that we want one; + // t2 != t1 + }); +}) +``` +
    + +
    +With a custom condition - callback + +```js +const cnd = c => { + // c.ctx - task/tx context (not available on the top level) + // default condition: return !c.ctx; + return someValue; +}; + +db.taskIf({cnd}, t1 => { + // new task is always created, because it is required on the top level + return t1.taskIf({cnd}, t2 => { + // if someValue is truthy, a new task is created (t2 != t1); + // otherwise, we continue with the containing task (t2 = t1). + }); +}) +``` +
    + +## Transactions + +Transaction method [tx] is like [task], which also executes `BEGIN` + `COMMIT`/`ROLLBACK`: + +```js +db.tx(t => { + // creating a sequence of transaction queries: + const q1 = t.none('UPDATE users SET active = $1 WHERE id = $2', [true, 123]); + const q2 = t.one('INSERT INTO audit(entity, id) VALUES($1, $2) RETURNING id', ['users', 123]); + + // returning a promise that determines a successful transaction: + return t.batch([q1, q2]); // all of the queries are to be resolved; +}) + .then(data => { + // success, COMMIT was executed + }) + .catch(error => { + // failure, ROLLBACK was executed + }); +``` + +If the callback function returns a rejected promise or throws an error, the method will automatically execute `ROLLBACK` at the end. +In all other cases the transaction will be automatically closed by `COMMIT`. + +The same as tasks, transactions support [Tags] and ES7 `async`: + +
    +With ES7 async + +```js +db.tx(async t => { + await t.none('UPDATE users SET active = $1 WHERE id = $2', [true, 123]); + await t.one('INSERT INTO audit(entity, id) VALUES($1, $2) RETURNING id', ['users', 123]); +}) + .then(data => { + // success, COMMIT was executed + }) + .catch(error => { + // failure, ROLLBACK was executed + }); +``` + +
    + +
    +With ES7 async + tag + +```js +db.tx('update-user', async t => { + await t.none('UPDATE users SET active = $1 WHERE id = $2', [true, 123]); + await t.one('INSERT INTO audit(entity, id) VALUES($1, $2) RETURNING id', ['users', 123]); +}) + .then(data => { + // success, COMMIT was executed + }) + .catch(error => { + // failure, ROLLBACK was executed + }); +``` + +
    + +### Nested Transactions + +Nested transactions automatically share the connection between all levels. +This library sets no limitation as to the depth (nesting levels) of transactions supported. + +
    +Example + +```js +db.tx(t => { + const queries = [ + t.none('DROP TABLE users;'), + t.none('CREATE TABLE users(id SERIAL NOT NULL, name TEXT NOT NULL)') + ]; + for (let i = 1; i <= 100; i++) { + queries.push(t.none('INSERT INTO users(name) VALUES($1)', 'name-' + i)); + } + queries.push( + t.tx(t1 => { + return t1.tx(t2 => { + return t2.one('SELECT count(*) FROM users'); + }); + })); + return t.batch(queries); +}) + .then(data => { + // success + }) + .catch(error => { + // failure + }); +``` +
    +
    + +If you want to avoid automatic occurrence of nested transactions, see [Conditional Transactions]. + +#### Limitations + +It is important to know that PostgreSQL does not support full/atomic nested transactions, it only +supports [savepoints](http://www.postgresql.org/docs/9.6/static/sql-savepoint.html) inside top-level +transactions, to allow *partial rollbacks*. + +Postgres uses `BEGIN` with `COMMIT / ROLLBACK` for top-level transactions, and `SAVEPOINT name` +with `RELEASE / ROLLBACK TO name` for inner save-points. + +This library automatically executes all such transaction and savepoint commands, with unique +savepoint names, based on the transaction level, plus index within the current level, in the +form of `sp_x_y`. + +In the name, `x` is the transaction level, starting with `1` (because `0` is the top-level +transaction that does not use savepoints). And `y` represents sub-transaction order/index +within the current level, starting with `1`. So the first savepoint on the top level will +be named `sp_1_1`. + +### Configurable Transactions + +[TransactionMode] type can extend your `BEGIN` command with transaction configuration: + +```js +const {TransactionMode, isolationLevel} = pgp.txMode; + +// Create a reusable transaction mode (serializable + read-only + deferrable): +const mode = new TransactionMode({ + tiLevel: isolationLevel.serializable, + readOnly: true, + deferrable: true +}); + +db.tx({mode}, t => { + // do transaction queries here +}) + .then(() => { + // success; + }) + .catch(error => { + // failure + }); +``` + +Instead of the default `BEGIN`, such transaction will open with the following command: +``` +BEGIN ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE +``` + +_Transaction Mode_ is set via option `mode`, preceding the callback function. See methods [tx] and [txIf]. + +This is the most efficient and best-performing way of configuring transactions. In combination with +*Transaction Snapshots* you can make the most out of transactions in terms of performance and concurrency. + +### Conditional Transactions + +Method [txIf] executes a transaction / [tx] when a specified condition is met, or else it executes a [task]. + +When no condition is specified, the default is to start a transaction, if currently not in one, or else it starts a task. +It is useful when you want to avoid [Nested Transactions] - savepoints. + +
    +With default condition + +```js +db.txIf(t => { + // transaction is started, as the top level doesn't have one + return t.txIf(t2 => { + // a task is started, because there is a parent transaction + }); +}) +``` +
    + +
    +With a custom condition - value + +```js +db.txIf({cnd: someValue}, t => { + // if condition is truthy, a transaction is started + return t.txIf(t2 => { + // a task is started, if the parent is a transaction + // a transaction is started, if the parent is a task + }); +}) +``` +
    + +
    +With a custom condition - callback + +```js +const cnd = c => { + // c.ctx - task/transaction context (not available on the top level) + // default condition: return !c.ctx || !c.ctx.inTransaction; + return someValue; +}; + +db.txIf({cnd}, t => { + // if condition is truthy, a transaction is started + return t.txIf(t2 => { + // a task is started, if the parent is a transaction + // a transaction is started, if the parent is a task + }); +}) +``` +
    + +## Library de-initialization + +This library manages all database connections via the [connection pool], which internally caches them. + +Connections in the cache expire due to inactivity after [idleTimeoutMillis] number of milliseconds, which you +can set only when creating the [Database] object. + +While there is a single open connection in the pool, the process cannot terminate by itself, only via `process.exit()`, +unless `allowExitOnIdle` is used - see update section below. +If you want the process to finish by itself, without waiting for all connections in the pool to expire, you need +to force the pool to shut down all the connections it holds: + +```js +db.$pool.end(); // shuts down the connection pool associated with the Database object +``` + +For example, if you are using the [Bluebird] library, you can chain the last promise in the process like this: + +```js +.finally(db.$pool.end); +``` + +**IMPORTANT:** Note that if your app is an HTTP service, or generally an application that does not feature any exit point, +then you should not do any de-initialization at all. It is only if your app is a run-through process/utility, then you +might want to use it, so the process ends without delays. + +In applications that either use multiple databases or execute a multi-pool strategy for balanced query loads, you would end up +with multiple [Database] objects, each with its own connection pool. In this scenario, in order to exit the process normally, +at a particular point, you can call [pgp.end] to shut down all connection pools at once: + +```js +pgp.end(); // shuts down all connection pools created in the process +``` + +or promise-chained to the last query block in the process: + +```js +.finally(pgp.end); +``` + +Once you have shut down the pool associated with your [Database] object, you can no longer use the object, and any of its query methods +will be rejecting with [Error] = `Connection pool of the database object has been destroyed`. + +See the relevant API: [pgp.end], [Database.$pool] + +### update + +Version 10.11.0 added support for connection option `allowExitOnIdle`, to let process exit when pool is idle. + +# History + +Although this project formally maintains a [CHANGELOG], for a short list of the top-level changes, +for detailed changes between versions you should see the corresponding release notes. + + + +[Usage]:#usage +[Index Variables]:#index-variables +[Named Parameters]:#named-parameters +[Nested Named Parameters]:#nested-named-parameters +[SQL Names]:#sql-names +[Raw Text]:#raw-text +[Open Values]:#open-values +[Alias Filter]:#alias-filter +[JSON Filter]:#json-filter +[CSV Filter]:#csv-filter +[Custom Type Formatting]:#custom-type-formatting +[Explicit CTF]:#explicit-ctf +[Symbolic CTF]:#symbolic-ctf +[Tasks]:#tasks +[Transactions]:#transactions +[Nested Transactions]:#nested-transactions +[Limitations]:#limitations +[Configurable Transactions]:#configurable-transactions +[Conditional Tasks]:#conditional-tasks +[Conditional Transactions]:#conditional-transactions +[Library de-initialization]:#library-de-initialization +[Query Files]:#query-files + + + +[Contribution Notes]:.github/CONTRIBUTING.md +[CHANGELOG]:.github/CHANGELOG.md + + + +[query]:http://vitaly-t.github.io/pg-promise/Database.html#query +[none]:http://vitaly-t.github.io/pg-promise/Database.html#none +[one]:http://vitaly-t.github.io/pg-promise/Database.html#one +[oneOrNone]:http://vitaly-t.github.io/pg-promise/Database.html#oneOrNone +[many]:http://vitaly-t.github.io/pg-promise/Database.html#many +[manyOrNone]:http://vitaly-t.github.io/pg-promise/Database.html#manyOrNone +[any]:http://vitaly-t.github.io/pg-promise/Database.html#any +[result]:http://vitaly-t.github.io/pg-promise/Database.html#result +[multi]:http://vitaly-t.github.io/pg-promise/Database.html#multi +[multiResult]:http://vitaly-t.github.io/pg-promise/Database.html#multiResult +[map]:http://vitaly-t.github.io/pg-promise/Database.html#map +[each]:http://vitaly-t.github.io/pg-promise/Database.html#each +[func]:http://vitaly-t.github.io/pg-promise/Database.html#func +[proc]:http://vitaly-t.github.io/pg-promise/Database.html#proc +[stream]:http://vitaly-t.github.io/pg-promise/Database.html#stream +[connect]:http://vitaly-t.github.io/pg-promise/Database.html#connect +[task]:http://vitaly-t.github.io/pg-promise/Database.html#task +[taskIf]:http://vitaly-t.github.io/pg-promise/Database.html#taskIf +[tx]:http://vitaly-t.github.io/pg-promise/Database.html#tx +[txIf]:http://vitaly-t.github.io/pg-promise/Database.html#txIf +[batch]:http://vitaly-t.github.io/pg-promise/Task.html#batch +[sequence]:http://vitaly-t.github.io/pg-promise/Task.html#sequence +[page]:http://vitaly-t.github.io/pg-promise/Task.html#page +[extend]:http://vitaly-t.github.io/pg-promise/global.html#event:extend + + + +[Official Documentation]:http://vitaly-t.github.io/pg-promise/index.html +[Initialization Options]:http://vitaly-t.github.io/pg-promise/module-pg-promise.html +[helpers]:http://vitaly-t.github.io/pg-promise/helpers.html +[QueryFile]:http://vitaly-t.github.io/pg-promise/QueryFile.html +[QueryFileError]:http://vitaly-t.github.io/pg-promise/errors.QueryFileError.html +[Database]:http://vitaly-t.github.io/pg-promise/Database.html +[Database.$pool]:http://vitaly-t.github.io/pg-promise/Database.html#$pool +[pgp.end]:http://vitaly-t.github.io/pg-promise/module-pg-promise.html#~end +[formatting]:http://vitaly-t.github.io/pg-promise/formatting.html +[ctf]:http://vitaly-t.github.io/pg-promise/formatting.ctf.html +[as.format]:http://vitaly-t.github.io/pg-promise/formatting.html#.format +[format]:http://vitaly-t.github.io/pg-promise/formatting.html#.format +[as.value]:http://vitaly-t.github.io/pg-promise/formatting.html#.value +[as.csv]:http://vitaly-t.github.io/pg-promise/formatting.html#.csv +[as.json]:http://vitaly-t.github.io/pg-promise/formatting.html#.json +[as.name]:http://vitaly-t.github.io/pg-promise/formatting.html#.name +[as.alias]:http://vitaly-t.github.io/pg-promise/formatting.html#.alias +[TransactionMode]:http://vitaly-t.github.io/pg-promise/txMode.TransactionMode.html +[PreparedStatement]:https://vitaly-t.github.io/pg-promise/PreparedStatement.html +[ParameterizedQuery]:https://vitaly-t.github.io/pg-promise/ParameterizedQuery.html + + + +[Learn by Example]:https://github.com/vitaly-t/pg-promise/wiki/Learn-by-Example +[Chaining Queries]:https://github.com/vitaly-t/pg-promise/wiki/Chaining-Queries +[Tags]:https://github.com/vitaly-t/pg-promise/wiki/Tags + + + +[node-postgres]:https://github.com/brianc/node-postgres +[Bluebird]:https://github.com/petkaantonov/bluebird +[SQL injection]:https://en.wikipedia.org/wiki/SQL_injection +[Symbol]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol +[idleTimeoutMillis]:https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/defaults.js#L46 +[connection pool]:https://github.com/brianc/node-pg-pool +[Error]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error diff --git a/server/node_modules/pg-promise/lib/connect.js b/server/node_modules/pg-promise/lib/connect.js new file mode 100644 index 0000000..b10396b --- /dev/null +++ b/server/node_modules/pg-promise/lib/connect.js @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Events} = require(`./events`); +const {ColorConsole} = require(`./utils/color`); + +const npm = { + utils: require(`./utils`), + text: require(`./text`), + formatting: require(`./formatting`) +}; + +function poolConnect(ctx, db, config) { + return config.promise((resolve, reject) => { + const p = db.$pool; + if (p.ending) { + db.$destroy(); + const err = new Error(npm.text.poolDestroyed); + Events.error(ctx.options, err, { + dc: ctx.dc + }); + reject(err); + return; + } + p.connect((err, client) => { + if (err) { + Events.error(ctx.options, err, { + cn: npm.utils.getSafeConnection(ctx.cn), + dc: ctx.dc + }); + reject(err); + } else { + if (`$useCount` in client) { + // Make sure useCount drops to 1, if it ever reaches maximum integer number; + // We do not drop it to zero, to avoid rerun of initialization queries that + // usually check for useCount === 0; + // istanbul ignore if + if (client.$useCount >= Number.MAX_SAFE_INTEGER) { + client.$useCount = 1; // resetting; cannot auto-test this + } else { + client.$useCount = ++client.$useCount; + } + } else { + Object.defineProperty(client, `$useCount`, { + value: 0, + configurable: false, + enumerable: false, + writable: true + }); + setSchema(client, ctx); + } + setCtx(client, ctx); + const end = lockClientEnd(client); + client.on(`error`, onError); + resolve({ + client, + useCount: client.$useCount, + release(kill) { + client.end = end; + client.release(kill || client.$connectionError); + Events.disconnect(ctx, client); + client.removeListener(`error`, onError); + } + }); + Events.connect(ctx, client, client.$useCount); + } + }); + }); +} + +function directConnect(ctx, config) { + return config.promise((resolve, reject) => { + const client = new config.pgp.pg.Client(ctx.cn); + client.connect(err => { + if (err) { + Events.error(ctx.options, err, { + cn: npm.utils.getSafeConnection(ctx.cn), + dc: ctx.dc + }); + reject(err); + } else { + setSchema(client, ctx); + setCtx(client, ctx); + const end = lockClientEnd(client); + client.on(`error`, onError); + resolve({ + client, + useCount: 0, + release() { + client.end = end; + const p = config.promise((res, rej) => client.end().then(res).catch(rej)); + Events.disconnect(ctx, client); + client.removeListener(`error`, onError); + return p; + } + }); + Events.connect(ctx, client, 0); + } + }); + }); +} + +// this event only happens when the connection is lost physically, +// which cannot be tested automatically; removing from coverage: +// istanbul ignore next +function onError(err) { + const ctx = this.$ctx; + const cn = npm.utils.getSafeConnection(ctx.cn); + Events.error(ctx.options, err, {cn, dc: ctx.dc}); + if (ctx.cnOptions && typeof ctx.cnOptions.onLost === `function` && !ctx.notified) { + try { + ctx.cnOptions.onLost.call(this, err, { + cn, + dc: ctx.dc, + start: ctx.start, + client: this + }); + } catch (e) { + ColorConsole.error(e && e.stack || e); + } + ctx.notified = true; + } +} + +function lockClientEnd(client) { + const end = client.end; + client.end = doNotCall => { + // This call can happen only in the following two cases: + // 1. the client made the call directly, against the library's documentation (invalid code) + // 2. connection with the server broke, and the pool is terminating all clients forcefully. + ColorConsole.error(`${npm.text.clientEnd}\n${npm.utils.getLocalStack(1, 3)}\n`); + if (!doNotCall) { + end.call(client); + } + }; + return end; +} + +function setCtx(client, ctx) { + Object.defineProperty(client, `$ctx`, { + value: ctx, + writable: true + }); +} + +function setSchema(client, ctx) { + let s = ctx.options.schema; + if (!s) { + return; + } + if (typeof s === `function`) { + s = s.call(ctx.dc, ctx.dc); + } + if (Array.isArray(s)) { + s = s.filter(a => a && typeof a === `string`); + } + if (typeof s === `string` || (Array.isArray(s) && s.length)) { + client.query(npm.formatting.as.format(`SET search_path TO $1:name`, [s]), err => { + // istanbul ignore if; + if (err) { + // This is unlikely to ever happen, unless the connection is created faulty, + // and fails on the very first query, which is impossible to test automatically. + throw err; + } + }); + } +} + +module.exports = config => ({ + pool: (ctx, db) => poolConnect(ctx, db, config), + direct: ctx => directConnect(ctx, config) +}); diff --git a/server/node_modules/pg-promise/lib/context.js b/server/node_modules/pg-promise/lib/context.js new file mode 100644 index 0000000..6ec4ef3 --- /dev/null +++ b/server/node_modules/pg-promise/lib/context.js @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +/** + * @class ConnectionContext + * @private + * @summary Internal connection context. + * + * @param {object} cc + * Connection Context. + * + * @param {object} cc.cn + * Connection details + * + * @param {*} cc.dc + * Database Context + * + * @param {object} cc.options + * Library's Initialization Options + * + * @param {object} cc.db + * Database Session we're attached to, if any. + * + * @param {number} cc.level + * Task Level + * + * @param {number} cc.txLevel + * Transaction Level + * + * @param {object} cc.parentCtx + * Connection Context of the parent operation, if any. + * + */ +class ConnectionContext { + + constructor(cc) { + this.cn = cc.cn; // connection details; + this.dc = cc.dc; // database context; + this.options = cc.options; // library options; + this.db = cc.db; // database session; + this.level = cc.level; // task level; + this.txLevel = cc.txLevel; // transaction level; + this.parentCtx = null; // parent context + this.taskCtx = null; // task context + this.start = null; // Date/Time when connected + this.txCount = 0; + } + + connect(db) { + this.db = db; + this.start = new Date(); + } + + disconnect(kill) { + if (this.db) { + const p = this.db.release(kill); + this.db = null; + return p; + } + } + + clone() { + const obj = new ConnectionContext(this); + obj.parent = this; + obj.parentCtx = this.taskCtx; + return obj; + } + + get nextTxCount() { + let txCurrent = this, txTop = this; + while (txCurrent.parent) { + txCurrent = txCurrent.parent; + if (txCurrent.taskCtx && txCurrent.taskCtx.isTX) { + txTop = txCurrent; + } + } + return txTop.txCount++; + } +} + +/** + * Connection Context + * @module context + * @author Vitaly Tomilov + * @private + */ +module.exports = {ConnectionContext}; diff --git a/server/node_modules/pg-promise/lib/database-pool.js b/server/node_modules/pg-promise/lib/database-pool.js new file mode 100644 index 0000000..098ae7d --- /dev/null +++ b/server/node_modules/pg-promise/lib/database-pool.js @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ColorConsole} = require(`./utils/color`); + +const npm = { + utils: require(`./utils`) +}; + +/** + * @class DatabasePool + * @static + * @private + */ +class DatabasePool { + + /** + * Global instance of the database pool repository. + * + * @returns {{dbMap: {}, dbs: Array}} + */ + static get instance() { + const s = Symbol.for(`pgPromiseDatabasePool`); + let scope = global[s]; + if (!scope) { + scope = { + dbMap: {}, // map of used database context keys (connection + dc) + dbs: [] // all database objects + }; + global[s] = scope; + } + return scope; + } + + /** + * @method DatabasePool.register + * @static + * @description + * - Registers each database object, to make sure no duplicates connections are used, + * and if they are, produce a warning; + * - Registers each Pool object, to be able to release them all when requested. + * + * @param {Database} db - The new Database object being registered. + */ + static register(db) { + const cnKey = DatabasePool.createContextKey(db); + npm.utils.addReadProp(db, `$cnKey`, cnKey, true); + const {dbMap, dbs} = DatabasePool.instance; + if (cnKey in dbMap) { + dbMap[cnKey]++; + /* istanbul ignore if */ + if (!db.$config.options.noWarnings) { + ColorConsole.warn(`WARNING: Creating a duplicate database object for the same connection.\n${npm.utils.getLocalStack(4, 3)}\n`); + } + } else { + dbMap[cnKey] = 1; + } + dbs.push(db); + } + + /** + * @method DatabasePool.unregister + * @static + * @param db + */ + static unregister(db) { + const cnKey = db.$cnKey; + const {dbMap} = DatabasePool.instance; + if (!--dbMap[cnKey]) { + delete dbMap[cnKey]; + } + } + + /** + * @method DatabasePool.shutDown + * @static + */ + static shutDown() { + const {instance} = DatabasePool; + instance.dbs.forEach(db => { + db.$destroy(); + }); + instance.dbs.length = 0; + instance.dbMap = {}; + } + + /** + * @method DatabasePool.createContextKey + * @static + * @description + * For connections that are objects it reorders the keys alphabetically, + * and then serializes the result into a JSON string. + * + * @param {Database} db - Database instance. + */ + static createContextKey(db) { + let cn = db.$cn; + if (typeof cn === `object`) { + const obj = {}, keys = Object.keys(cn).sort(); + keys.forEach(name => { + obj[name] = cn[name]; + }); + cn = obj; + } + return npm.utils.toJson(npm.utils.getSafeConnection(cn)) + npm.utils.toJson(db.$dc); + } +} + +module.exports = {DatabasePool}; diff --git a/server/node_modules/pg-promise/lib/database.js b/server/node_modules/pg-promise/lib/database.js new file mode 100644 index 0000000..714296f --- /dev/null +++ b/server/node_modules/pg-promise/lib/database.js @@ -0,0 +1,1691 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Events} = require(`./events`); +const {assertOptions} = require(`assert-options`); +const {resultQuery, multiResultQuery, streamQuery} = require(`./special-query`); +const {ConnectionContext} = require(`./context`); +const {DatabasePool} = require(`./database-pool`); +const {queryResult} = require(`./query-result`); + +const npm = { + utils: require(`./utils`), + pubUtils: require(`./utils/public`), + connect: require(`./connect`), + query: require(`./query`), + task: require(`./task`), + text: require(`./text`) +}; + +/** + * @class Database + * @description + * + * Represents the database protocol, extensible via event {@link event:extend extend}. + * This type is not available directly, it can only be created via the library's base call. + * + * **IMPORTANT:** + * + * For any given connection, you should only create a single {@link Database} object in a separate module, + * to be shared in your application (see the code example below). If instead you keep creating the {@link Database} + * object dynamically, your application will suffer from loss in performance, and will be getting a warning in a + * development environment (when `NODE_ENV` = `development`): + * + * `WARNING: Creating a duplicate database object for the same connection.` + * + * If you ever see this warning, rectify your {@link Database} object initialization, so there is only one object + * per connection details. See the example provided below. + * + * See also: property `noWarnings` in {@link module:pg-promise Initialization Options}. + * + * Note however, that in special cases you may need to re-create the database object, if its connection pool has been + * shut-down externally. And in this case the library won't be showing any warning. + * + * @param {string|object} cn + * Database connection details, which can be: + * + * - a configuration object + * - a connection string + * + * For details see {@link https://github.com/vitaly-t/pg-promise/wiki/Connection-Syntax Connection Syntax}. + * + * The value can be accessed from the database object via property {@link Database.$cn $cn}. + * + * @param {*} [dc] + * Database Context. + * + * Any object or value to be propagated through the protocol, to allow implementations and event handling + * that depend on the database context. + * + * This is mainly to facilitate the use of multiple databases which may need separate protocol extensions, + * or different implementations within a single task / transaction callback, depending on the database context. + * + * This parameter also adds uniqueness to the connection context that's used in combination with the connection + * parameters, i.e. use of unique database context will prevent getting the warning about creating a duplicate + * Database object. + * + * The value can be accessed from the database object via property {@link Database#$dc $dc}. + * + * @returns {Database} + * + * @see + * + * {@link Database#query query}, + * {@link Database#none none}, + * {@link Database#one one}, + * {@link Database#oneOrNone oneOrNone}, + * {@link Database#many many}, + * {@link Database#manyOrNone manyOrNone}, + * {@link Database#any any}, + * {@link Database#func func}, + * {@link Database#proc proc}, + * {@link Database#result result}, + * {@link Database#multiResult multiResult}, + * {@link Database#multi multi}, + * {@link Database#map map}, + * {@link Database#each each}, + * {@link Database#stream stream}, + * {@link Database#task task}, + * {@link Database#taskIf taskIf}, + * {@link Database#tx tx}, + * {@link Database#txIf txIf}, + * {@link Database#connect connect}, + * {@link Database#$config $config}, + * {@link Database#$cn $cn}, + * {@link Database#$dc $dc}, + * {@link Database#$pool $pool}, + * {@link event:extend extend} + * + * @example + * // Proper way to initialize and share the Database object + * + * // Loading and initializing the library: + * const pgp = require('pg-promise')({ + * // Initialization Options + * }); + * + * // Preparing the connection details: + * const cn = 'postgres://username:password@host:port/database'; + * + * // Creating a new database instance from the connection details: + * const db = pgp(cn); + * + * // Exporting the database object for shared use: + * module.exports = db; + */ +function Database(cn, dc, config) { + + const dbThis = this, + $p = config.promise, + poolConnection = typeof cn === `string` ? {connectionString: cn} : cn, + pool = new config.pgp.pg.Pool(poolConnection), + endMethod = pool.end; + + let destroyed; + + pool.end = cb => { + const res = endMethod.call(pool, cb); + dbThis.$destroy(); + return res; + }; + + pool.on(`error`, onError); + + /** + * @method Database#connect + * + * @description + * Acquires a new or existing connection, depending on the current state of the connection pool, and parameter `direct`. + * + * This method creates a shared connection for executing a chain of queries against it. The connection must be released + * in the end of the chain by calling `done()` on the connection object. + * + * Method `done` takes one optional parameter - boolean `kill` flag, to signal the connection pool that you want it to kill + * the physical connection. This flag is ignored for direct connections, as they always close when released. + * + * It should not be used just for chaining queries on the same connection, methods {@link Database#task task} and + * {@link Database#tx tx} (for transactions) are to be used for that. This method is primarily for special cases, like + * `LISTEN` notifications. + * + * **NOTE:** Even though this method exposes a {@link external:Client Client} object via property `client`, + * you cannot call `client.end()` directly, or it will print an error into the console: + * `Abnormal client.end() call, due to invalid code or failed server connection.` + * You should only call method `done()` to release the connection. + * + * @param {object} [options] + * Connection Options. + * + * @param {boolean} [options.direct=false] + * Creates a new connection directly, as a stand-alone {@link external:Client Client} object, bypassing the connection pool. + * + * By default, all connections are acquired from the connection pool. But if you set this option, the library will instead + * create a new {@link external:Client Client} object directly (separately from the pool), and then call its `connect` method. + * + * Note that specifically for direct connections, method `done` returns a {@link external:Promise Promise}, because those connections + * are closed physically, which may take time. + * + * **WARNING:** + * + * Do not use this option for regular query execution, because it exclusively occupies one physical channel, and it cannot scale. + * This option is only suitable for global connection usage, such as event listeners. + * + * @param {function} [options.onLost] + * Notification callback of the lost/broken connection, called with the following parameters: + * - `err` - the original connectivity error + * - `e` - error context object, which contains: + * - `cn` - safe connection string/config (with the password hashed); + * - `dc` - Database Context, as was used during {@link Database} construction; + * - `start` - Date/Time (`Date` type) when the connection was established; + * - `client` - {@link external:Client Client} object that has lost the connection. + * + * The notification is mostly valuable with `direct: true`, to be able to re-connect direct/permanent connections by calling + * method {@link Database#connect connect} again. + * + * You do not need to call `done` on lost connections, as it happens automatically. However, if you had event listeners + * set up on the connection's `client` object, you should remove them to avoid leaks: + * + * ```js + * function onLostConnection(err, e) { + * e.client.removeListener('my-event', myHandler); + * } + * ``` + * + * For a complete example see $[Robust Listeners]. + * + * @returns {external:Promise} + * A promise object that represents the connection result: + * - resolves with the complete {@link Database} protocol, extended with: + * - property `client` of type {@link external:Client Client} that represents the open connection + * - method `done` that must be called in the end, in order to release the connection (returns a {@link external:Promise Promise} + * in case of direct connections) + * - methods `batch`, `page` and `sequence`, same as inside a {@link Task} + * - rejects with a connection-related error when it fails to connect. + * + * @see + * {@link Database#task Database.task}, + * {@link Database#taskIf Database.taskIf}, + * {@link Database#tx Database.tx}, + * {@link Database#txIf Database.txIf} + * + * @example + * + * let sco; // shared connection object; + * + * db.connect() + * .then(obj => { + * // obj.client = new connected Client object; + * + * sco = obj; // save the connection object; + * + * // execute all the queries you need: + * return sco.any('SELECT * FROM Users'); + * }) + * .then(data => { + * // success + * }) + * .catch(error => { + * // error + * }) + * .finally(() => { + * // release the connection, if it was successful: + * if (sco) { + * // if you pass `true` into method done, i.e. done(true), + * // it will make the pool kill the physical connection. + * sco.done(); + * } + * }); + * + */ + this.connect = function (options) { + options = options || {}; + const ctx = createContext(); + ctx.cnOptions = options; + const self = { + query(query, values, qrm) { + if (!ctx.db) { + return $p.reject(new Error(npm.text.queryDisconnected)); + } + return config.$npm.query.call(this, ctx, query, values, qrm); + }, + done(kill) { + if (!ctx.db) { + throw new Error(npm.text.looseQuery); + } + return ctx.disconnect(kill); + }, + batch(values, opt) { + return config.$npm.spex.batch.call(this, values, opt); + }, + page(source, opt) { + return config.$npm.spex.page.call(this, source, opt); + }, + sequence(source, opt) { + return config.$npm.spex.sequence.call(this, source, opt); + } + }; + const connection = options.direct ? config.$npm.connect.direct(ctx) : config.$npm.connect.pool(ctx, dbThis); + return connection + .then(db => { + ctx.connect(db); + self.client = db.client; + extend(ctx, self); + return self; + }); + }; + + /** + * @method Database#query + * + * @description + * Base query method that executes a generic query, expecting the return data according to parameter `qrm`. + * + * It performs the following steps: + * + * 1. Validates and formats the query via {@link formatting.format as.format}, according to the `query` and `values` passed in; + * 2. For a root-level query (against the {@link Database} object), it requests a new connection from the pool; + * 3. Executes the query; + * 4. For a root-level query (against the {@link Database} object), it releases the connection back to the pool; + * 5. Resolves/rejects, according to the data returned from the query and the value of `qrm`. + * + * Direct use of this method is not suitable for chaining queries, for performance reasons. It should be done + * through either task or transaction context, see $[Chaining Queries]. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {queryResult} [qrm=queryResult.any] + * {@link queryResult Query Result Mask} + * + * @returns {external:Promise} + * A promise object that represents the query result according to `qrm`. + */ + this.query = function (query, values, qrm) { + const self = this, ctx = createContext(); + return config.$npm.connect.pool(ctx, dbThis) + .then(db => { + ctx.connect(db); + return config.$npm.query.call(self, ctx, query, values, qrm); + }) + .then(data => { + ctx.disconnect(); + return data; + }) + .catch(error => { + ctx.disconnect(); + return $p.reject(error); + }); + }; + + /** + * @member {object} Database#$config + * @readonly + * @description + * This is a hidden property, to help integrating type {@link Database} directly with third-party libraries. + * + * Properties available in the object: + * - `pgp` - instance of the entire library after initialization + * - `options` - the library's {@link module:pg-promise Initialization Options} object + * - `promiseLib` - instance of the promise library that's used + * - `promise` - generic promise interface that uses `promiseLib` via 4 basic methods: + * - `promise((resolve, reject) => {})` - to create a new promise + * - `promise.resolve(value)` - to resolve with a value + * - `promise.reject(reason)` - to reject with a reason + * - `promise.all(iterable)` - to resolve an iterable list of promises + * - `version` - this library's version + * - `$npm` _(hidden property)_ - internal module cache + * + * @example + * + * // Using the promise protocol as configured by pg-promise: + * + * const $p = db.$config.promise; + * + * const resolvedPromise = $p.resolve('some data'); + * const rejectedPromise = $p.reject('some reason'); + * + * const newPromise = $p((resolve, reject) => { + * // call either resolve(data) or reject(reason) here + * }); + */ + npm.utils.addReadProp(this, `$config`, config, true); + + /** + * @member {string|object} Database#$cn + * @readonly + * @description + * Database connection, as was passed in during the object's construction. + * + * This is a hidden property, to help integrating type {@link Database} directly with third-party libraries. + * + * @see Database + */ + npm.utils.addReadProp(this, `$cn`, cn, true); + + /** + * @member {*} Database#$dc + * @readonly + * @description + * Database Context, as was passed in during the object's construction. + * + * This is a hidden property, to help integrating type {@link Database} directly with third-party libraries. + * + * @see Database + */ + npm.utils.addReadProp(this, `$dc`, dc, true); + + /** + * @member {external:pg-pool} Database#$pool + * @readonly + * @description + * A $[pg-pool] object associated with the database object, as each {@link Database} creates its own $[pg-pool] instance. + * + * This is a hidden property, primarily for integrating type {@link Database} with third-party libraries that support + * $[pg-pool] directly. Note however, that if you pass the pool object into a library that calls `pool.end()`, you will no longer be able + * to use this {@link Database} object, and each query method will be rejecting with {@link external:Error Error} = + * `Connection pool of the database object has been destroyed.` + * + * You can also use this object to shut down the pool, by calling `$pool.end()`. + * + * For more details see $[Library de-initialization]. + * + * @see + * {@link Database} + * {@link module:pg-promise~end pgp.end} + * + * @example + * + * // Shutting down the connection pool of this database object, + * // after all queries have finished in a run-though process: + * + * .then(() => {}) // processing the data + * .catch() => {}) // handling the error + * .finally(db.$pool.end); // shutting down the pool + * + */ + npm.utils.addReadProp(this, `$pool`, pool, true); + + /** + * @member {function} Database.$destroy + * @readonly + * @private + * @description + * Permanently shuts down the database object. + */ + npm.utils.addReadProp(this, `$destroy`, () => { + if (!destroyed) { + if (!pool.ending) { + endMethod.call(pool); + } + DatabasePool.unregister(dbThis); + pool.removeListener(`error`, onError); + destroyed = true; + } + }, true); + + DatabasePool.register(this); + + extend(createContext(), this); // extending root protocol; + + function createContext() { + return new ConnectionContext({cn, dc, options: config.options}); + } + + // Optional value-transformation helper: + function transform(value, cb, thisArg) { + return typeof cb === `function` ? value.then(data => cb.call(thisArg, data)) : value; + } + + //////////////////////////////////////////////////// + // Injects additional methods into an access object, + // extending the protocol's base method 'query'. + function extend(ctx, obj) { + + /** + * @method Database#none + * @description + * Executes a query that expects no data to be returned. If the query returns any data, + * the method rejects. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When no records are returned, it resolves with `null`. + * - When any data is returned, it rejects with {@link errors.QueryResultError QueryResultError}: + * - `.message` = `No return data was expected.` + * - `.code` = {@link errors.queryResultErrorCode.notEmpty queryResultErrorCode.notEmpty} + */ + obj.none = function (query, values) { + return obj.query.call(this, query, values, queryResult.none); + }; + + /** + * @method Database#one + * @description + * Executes a query that expects exactly 1 row to be returned. When 0 or more than 1 rows are returned, + * the method rejects. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {function} [cb] + * Value-transformation callback, to allow in-line value change. + * When specified, the returned value replaces the original one. + * + * The function takes only one parameter - value resolved from the query. + * + * @param {*} [thisArg] + * Value to use as `this` when executing the transformation callback. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When 1 row is returned, it resolves with that row as a single object. + * - When no rows are returned, it rejects with {@link errors.QueryResultError QueryResultError}: + * - `.message` = `No data returned from the query.` + * - `.code` = {@link errors.queryResultErrorCode.noData queryResultErrorCode.noData} + * - When multiple rows are returned, it rejects with {@link errors.QueryResultError QueryResultError}: + * - `.message` = `Multiple rows were not expected.` + * - `.code` = {@link errors.queryResultErrorCode.multiple queryResultErrorCode.multiple} + * - Resolves with the new value, if transformation callback `cb` was specified. + * + * @see + * {@link Database#oneOrNone oneOrNone} + * + * @example + * + * // a query with in-line value transformation: + * db.one('INSERT INTO Events VALUES($1) RETURNING id', [123], event => event.id) + * .then(data => { + * // data = a new event id, rather than an object with it + * }); + * + * @example + * + * // a query with in-line value transformation + conversion: + * db.one('SELECT count(*) FROM Users', [], c => +c.count) + * .then(count => { + * // count = a proper integer value, rather than an object with a string + * }); + * + */ + obj.one = function (query, values, cb, thisArg) { + const v = obj.query.call(this, query, values, queryResult.one); + return transform(v, cb, thisArg); + }; + + /** + * @method Database#many + * @description + * Executes a query that expects one or more rows to be returned. When the query returns no rows, the method rejects. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When 1 or more rows are returned, it resolves with the array of rows. + * - When no rows are returned, it rejects with {@link errors.QueryResultError QueryResultError}: + * - `.message` = `No data returned from the query.` + * - `.code` = {@link errors.queryResultErrorCode.noData queryResultErrorCode.noData} + */ + obj.many = function (query, values) { + return obj.query.call(this, query, values, queryResult.many); + }; + + /** + * @method Database#oneOrNone + * @description + * Executes a query that expects 0 or 1 rows to be returned. It resolves with the row-object when 1 row is returned, + * or with `null` when nothing is returned. When the query returns more than 1 row, the method rejects. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {function} [cb] + * Value-transformation callback, to allow in-line value change. + * When specified, the returned value replaces the original one. + * + * The function takes only one parameter - value resolved from the query. + * + * @param {*} [thisArg] + * Value to use as `this` when executing the transformation callback. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When no rows are returned, it resolves with `null`. + * - When 1 row is returned, it resolves with that row as a single object. + * - When multiple rows are returned, it rejects with {@link errors.QueryResultError QueryResultError}: + * - `.message` = `Multiple rows were not expected.` + * - `.code` = {@link errors.queryResultErrorCode.multiple queryResultErrorCode.multiple} + * - Resolves with the new value, if transformation callback `cb` was specified. + * + * @see + * {@link Database#one one}, + * {@link Database#none none}, + * {@link Database#manyOrNone manyOrNone} + * + * @example + * + * // a query with in-line value transformation: + * db.oneOrNone('SELECT id FROM Events WHERE type = $1', ['entry'], e => e && e.id) + * .then(data => { + * // data = the event id or null (rather than object or null) + * }); + * + */ + obj.oneOrNone = function (query, values, cb, thisArg) { + const v = obj.query.call(this, query, values, queryResult.one | queryResult.none); + return transform(v, cb, thisArg); + }; + + /** + * @method Database#manyOrNone + * @description + * Executes a query that can return any number of rows. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When no rows are returned, it resolves with an empty array. + * - When 1 or more rows are returned, it resolves with the array of rows. + * + * @see + * {@link Database#any any}, + * {@link Database#many many}, + * {@link Database#none none} + * + */ + obj.manyOrNone = function (query, values) { + return obj.query.call(this, query, values, queryResult.many | queryResult.none); + }; + + /** + * @method Database#any + * @description + * Executes a query that can return any number of rows. + * This is simply a shorter alias for method {@link Database#manyOrNone manyOrNone}. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - When no rows are returned, it resolves with an empty array. + * - When 1 or more rows are returned, it resolves with the array of rows. + * + * @see + * {@link Database#manyOrNone manyOrNone}, + * {@link Database#map map}, + * {@link Database#each each} + * + */ + obj.any = function (query, values) { + return obj.query.call(this, query, values, queryResult.any); + }; + + /** + * @method Database#result + * @description + * Executes a query without any expectation for the return data, and resolves with the + * original $[Result] object when successful. + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {function} [cb] + * Value-transformation callback, to allow in-line value change. + * When specified, the returned value replaces the original one. + * + * The function takes only one parameter - value resolved from the query. + * + * @param {*} [thisArg] + * Value to use as `this` when executing the transformation callback. + * + * @returns {external:Promise} + * A promise object that represents the query result: + * - resolves with the original $[Result] object (by default); + * - resolves with the new value, if transformation callback `cb` was specified. + * + * @example + * + * // use of value transformation: + * // deleting rows and returning the number of rows deleted + * db.result('DELETE FROM Events WHERE id = $1', [123], r => r.rowCount) + * .then(data => { + * // data = number of rows that were deleted + * }); + * + * @example + * + * // use of value transformation: + * // getting only column details from a table + * db.result('SELECT * FROM Users LIMIT 0', null, r => r.fields) + * .then(data => { + * // data = array of column descriptors + * }); + * + */ + obj.result = function (query, values, cb, thisArg) { + const v = obj.query.call(this, query, values, resultQuery); + return transform(v, cb, thisArg); + }; + + /** + * @method Database#multiResult + * @description + * Executes a multi-query string, without any expectation for the return data, and resolves with an array + * of the original $[Result] objects when successful. + * + * The operation is atomic, i.e. all queries are executed in a single transaction, unless there are explicit + * `BEGIN/COMMIT` commands included in the query string to divide it into multiple transactions. + * + * @param {string|function|object} query + * Multi-query string to be executed, which can be any of the following types: + * - A non-empty string that can contain any number of queries + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise} + * + * @see {@link Database#multi multi} + * + */ + obj.multiResult = function (query, values) { + return obj.query.call(this, query, values, multiResultQuery); + }; + + /** + * @method Database#multi + * @description + * Executes a multi-query string, without any expectation for the return data, and resolves with an array + * of arrays of rows when successful. + * + * The operation is atomic, i.e. all queries are executed in a single transaction, unless there are explicit + * `BEGIN/COMMIT` commands included in the query string to divide it into multiple transactions. + * + * @param {string|function|object} query + * Multi-query string to be executed, which can be any of the following types: + * - A non-empty string that can contain any number of queries + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @returns {external:Promise>} + * + * @see {@link Database#multiResult multiResult} + * + * @example + * + * // Get data from 2 tables in a single request: + * const [users, products] = await db.multi('SELECT * FROM users;SELECT * FROM products'); + * + */ + obj.multi = function (query, values) { + return obj.query.call(this, query, values, multiResultQuery) + .then(data => data.map(a => a.rows)); + }; + + /** + * @method Database#stream + * @description + * Custom data streaming, with the help of $[pg-query-stream]. + * + * This method doesn't work with the $[Native Bindings], and if option `pgNative` + * is set, it will reject with `Streaming doesn't work with Native Bindings.` + * + * @param {QueryStream} qs + * Stream object of type $[QueryStream]. + * + * @param {Database.streamInitCB} initCB + * Stream initialization callback. + * + * It is invoked with the same `this` context as the calling method. + * + * @returns {external:Promise} + * Result of the streaming operation. + * + * Once the streaming has finished successfully, the method resolves with + * `{processed, duration}`: + * - `processed` - total number of rows processed; + * - `duration` - streaming duration, in milliseconds. + * + * Possible rejections messages: + * - `Invalid or missing stream object.` + * - `Invalid stream state.` + * - `Invalid or missing stream initialization callback.` + */ + obj.stream = function (qs, init) { + return obj.query.call(this, qs, init, streamQuery); + }; + + /** + * @method Database#func + * @description + * Executes a database function that returns a table, abbreviating the full syntax + * of `query('SELECT * FROM $1:alias($2:csv)', [funcName, values], qrm)`. + * + * @param {string} funcName + * Name of the function to be executed. + * When it is not same-case, or contains extended symbols, it is double-quoted, as per the `:alias` filter, + * which also supports `.`, to auto-split into a composite name. + * + * @param {array|value|function} [values] + * Parameters for the function - one value | array of values | function returning value(s). + * + * @param {queryResult} [qrm=queryResult.any] - {@link queryResult Query Result Mask}. + * + * @returns {external:Promise} + * + * A promise object as returned from method {@link Database#query query}, according to parameter `qrm`. + * + * @see + * {@link Database#query query}, + * {@link Database#proc proc} + */ + obj.func = function (funcName, values, qrm) { + return obj.query.call(this, {entity: funcName, type: `func`}, values, qrm); + }; + + /** + * @method Database#proc + * @description + * Executes a stored procedure by name, abbreviating the full syntax of + * `oneOrNone('CALL $1:alias($2:csv)', [procName, values], cb, thisArg)`. + * + * **NOTE:** This method uses the new `CALL` syntax that requires PostgreSQL v11 or later. + * + * @param {string} procName + * Name of the stored procedure to be executed. + * When it is not same-case, or contains extended symbols, it is double-quoted, as per the `:alias` filter, + * which also supports `.`, to auto-split into a composite SQL name. + * + * @param {array|value|function} [values] + * Parameters for the procedure - one value | array of values | function returning value(s). + * + * @param {function} [cb] + * Value-transformation callback, to allow in-line value change. + * When specified, the returned value replaces the original one. + * + * The function takes only one parameter - value resolved from the query. + * + * @param {*} [thisArg] + * Value to use as `this` when executing the transformation callback. + * + * @returns {external:Promise} + * When the procedure takes output parameters, a single object is returned, with + * properties for the output values. Otherwise, the method resolves with `null`. + * And if the value-transformation callback is provided, it overrides the result. + * + * @see + * {@link Database#func func} + */ + obj.proc = function (procName, values, cb, thisArg) { + const v = obj.query.call(this, { + entity: procName, + type: `proc` + }, values, queryResult.one | queryResult.none); + return transform(v, cb, thisArg); + }; + + /** + * @method Database#map + * @description + * Creates a new array with the results of calling a provided function on every element in the array of rows + * resolved by method {@link Database#any any}. + * + * It is a convenience method, to reduce the following code: + * + * ```js + * db.any(query, values) + * .then(data => { + * return data.map((row, index, data) => { + * // return a new element + * }); + * }); + * ``` + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} values + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {function} cb + * Function that produces an element of the new array, taking three arguments: + * - `row` - the current row object being processed in the array + * - `index` - the index of the current row being processed in the array + * - `data` - the original array of rows resolved by method {@link Database#any any} + * + * @param {*} [thisArg] + * Value to use as `this` when executing the callback. + * + * @returns {external:Promise} + * Resolves with the new array of values returned from the callback. + * + * @see + * {@link Database#any any}, + * {@link Database#each each}, + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map Array.map} + * + * @example + * + * db.map('SELECT id FROM Users WHERE status = $1', ['active'], row => row.id) + * .then(data => { + * // data = array of active user id-s + * }) + * .catch(error => { + * // error + * }); + * + * @example + * + * db.tx(t => { + * return t.map('SELECT id FROM Users WHERE status = $1', ['active'], row => { + * return t.none('UPDATE Events SET checked = $1 WHERE userId = $2', [true, row.id]); + * }).then(t.batch); + * }) + * .then(data => { + * // success + * }) + * .catch(error => { + * // error + * }); + * + * @example + * + * // Build a list of active users, each with the list of user events: + * db.task(t => { + * return t.map('SELECT id FROM Users WHERE status = $1', ['active'], user => { + * return t.any('SELECT * FROM Events WHERE userId = $1', user.id) + * .then(events=> { + * user.events = events; + * return user; + * }); + * }).then(t.batch); + * }) + * .then(data => { + * // success + * }) + * .catch(error => { + * // error + * }); + * + */ + obj.map = function (query, values, cb, thisArg) { + return obj.any.call(this, query, values) + .then(data => data.map(cb, thisArg)); + }; + + /** + * @method Database#each + * @description + * Executes a provided function once per array element, for an array of rows resolved by method {@link Database#any any}. + * + * It is a convenience method to reduce the following code: + * + * ```js + * db.any(query, values) + * .then(data => { + * data.forEach((row, index, data) => { + * // process the row + * }); + * return data; + * }); + * ``` + * + * When receiving a multi-query result, only the last result is processed, ignoring the rest. + * + * @param {string|function|object} query + * Query to be executed, which can be any of the following types: + * - A non-empty query string + * - A function that returns a query string or another function, i.e. recursive resolution + * is supported, passing in `values` as `this`, and as the first parameter. + * - Prepared Statement `{name, text, values, ...}` or {@link PreparedStatement} object + * - Parameterized Query `{text, values, ...}` or {@link ParameterizedQuery} object + * - {@link QueryFile} object + * + * @param {array|value|function} [values] + * Query formatting parameter(s), or a function that returns it. + * + * When `query` is of type `string` or a {@link QueryFile} object, the `values` can be: + * - a single value - to replace all `$1` occurrences + * - an array of values - to replace all `$1`, `$2`, ... variables + * - an object - to apply $[Named Parameters] formatting + * + * When `query` is a Prepared Statement or a Parameterized Query (or their class types), + * and `values` is not `null` or `undefined`, it is automatically set within such object, + * as an override for its internal `values`. + * + * @param {function} cb + * Function to execute for each row, taking three arguments: + * - `row` - the current row object being processed in the array + * - `index` - the index of the current row being processed in the array + * - `data` - the array of rows resolved by method {@link Database#any any} + * + * @param {*} [thisArg] + * Value to use as `this` when executing the callback. + * + * @returns {external:Promise>} + * Resolves with the original array of rows. + * + * @see + * {@link Database#any any}, + * {@link Database#map map}, + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach Array.forEach} + * + * @example + * + * db.each('SELECT id, code, name FROM Events', [], row => { + * row.code = parseInt(row.code); + * }) + * .then(data => { + * // data = array of events, with 'code' converted into integer + * }) + * .catch(error => { + * // error + * }); + * + */ + obj.each = function (query, values, cb, thisArg) { + return obj.any.call(this, query, values) + .then(data => { + data.forEach(cb, thisArg); + return data; + }); + }; + + /** + * @method Database#task + * @description + * Executes a callback function with automatically managed connection. + * + * When invoked on the root {@link Database} object, the method allocates the connection from the pool, + * executes the callback, and once finished - releases the connection back to the pool. + * However, when invoked inside another task or transaction, the method reuses the parent connection. + * + * This method should be used whenever executing more than one query at once, so the allocated connection + * is reused between all queries, and released only after the task has finished (see $[Chaining Queries]). + * + * The callback function is called with one parameter - database protocol (same as `this`), extended with methods + * {@link Task#batch batch}, {@link Task#page page}, {@link Task#sequence sequence}, plus property {@link Task#ctx ctx} - + * the task context object. See class {@link Task} for more details. + * + * @param {string|number|Object} [options] + * This parameter is optional, and presumed skipped when the first parameter is a function (`cb` parameter). + * + * When it is of type `string` or `number`, it is assumed to be option `tag` passed in directly. Otherwise, + * it is expected to be an object with options as listed below. + * + * @param {} [options.tag] + * Traceable context for the task (see $[tags]). + * + * @param {function} cb + * Task callback function, to return the result that will determine either success or failure for the operation. + * + * The function can be either the first of the second parameter passed into the method. + * + * It also can be an ES7 `async` function. + * + * @returns {external:Promise} + * A promise object with the result from the callback function. + * + * @see + * {@link Task}, + * {@link Database#taskIf taskIf}, + * {@link Database#tx tx}, + * $[tags], + * $[Chaining Queries] + * + * @example + * + * db.task('my-task', t => { + * // t.ctx = task context object + * + * return t.one('SELECT id FROM Users WHERE name = $1', 'John') + * .then(user => { + * return t.any('SELECT * FROM Events WHERE userId = $1', user.id); + * }); + * }) + * .then(data => { + * // success + * // data = as returned from the task's callback + * }) + * .catch(error => { + * // error + * }); + * + * @example + * + * // using an ES7 syntax for the callback: + * db.task('my-task', async t { + * // t.ctx = task context object + * + * const user = await t.one('SELECT id FROM Users WHERE name = $1', 'John'); + * return t.any('SELECT * FROM Events WHERE userId = $1', user.id); + * }) + * .then(data => { + * // success + * // data = as returned from the task's callback + * }) + * .catch(error => { + * // error + * }); + * + */ + obj.task = function () { + const args = npm.pubUtils.taskArgs(arguments); + assertOptions(args.options, [`tag`]); + return taskProcessor.call(this, args, false); + }; + + /** + * @method Database#taskIf + * @description + * Executes a conditional task that results in an actual new {@link Database#task task}, if either condition is met or + * when it is necessary (on the top level), or else it reuses the current connection context. + * + * The default condition is `not in task or transaction`, to start a task only if currently not inside another task or transaction, + * which is the same as calling the following: + * + * ```js + * db.taskIf({cnd: t => !t.ctx}, cb => {}) + * ``` + * + * It can be useful, if you want to simplify/reduce the task + log events footprint, by creating new tasks only when necessary. + * + * @param {string|number|Object} [options] + * This parameter is optional, and presumed skipped when the first parameter is a function (`cb` parameter). + * + * When it is of type `string` or `number`, it is assumed to be option `tag` passed in directly. Otherwise, + * it is expected to be an object with options as listed below. + * + * @param {} [options.tag] + * Traceable context for the task/transaction (see $[tags]). + * + * @param {boolean|function} [options.cnd] + * Condition for creating a ({@link Database#task task}), if it is met. + * It can be either a simple boolean, or a callback function that takes the task context as `this` and as the first parameter. + * + * Default condition (when it is not specified): + * + * ```js + * {cnd: t => !t.ctx} + * ``` + * + * @param {function} cb + * Task callback function, to return the result that will determine either success or failure for the operation. + * + * The function can be either the first or the second parameter passed into the method. + * + * It also can be an ES7 `async` function. + * + * @returns {external:Promise} + * A promise object with the result from the callback function. + * + * @see + * {@link Task}, + * {@link Database#task Database.task}, + * {@link Database#tx Database.tx}, + * {@link Database#txIf Database.txIf}, + * {@link TaskContext} + * + */ + obj.taskIf = function () { + const args = npm.pubUtils.taskArgs(arguments); + assertOptions(args.options, [`tag`, `cnd`]); + try { + let cnd = args.options.cnd; + if (`cnd` in args.options) { + cnd = typeof cnd === `function` ? cnd.call(obj, obj) : !!cnd; + } else { + cnd = !obj.ctx; // create task, if it is the top level + } + // reusable only if condition fails, and not top-level: + args.options.reusable = !cnd && !!obj.ctx; + } catch (e) { + return $p.reject(e); + } + return taskProcessor.call(this, args, false); + }; + + /** + * @method Database#tx + * @description + * Executes a callback function as a transaction, with automatically managed connection. + * + * When invoked on the root {@link Database} object, the method allocates the connection from the pool, + * executes the callback, and once finished - releases the connection back to the pool. + * However, when invoked inside another task or transaction, the method reuses the parent connection. + * + * A transaction wraps a regular {@link Database#task task} into additional queries: + * - it executes `BEGIN` just before invoking the callback function + * - it executes `COMMIT`, if the callback didn't throw any error or return a rejected promise + * - it executes `ROLLBACK`, if the callback did throw an error or return a rejected promise + * - it executes corresponding `SAVEPOINT` commands when the method is called recursively. + * + * The callback function is called with one parameter - database protocol (same as `this`), extended with methods + * {@link Task#batch batch}, {@link Task#page page}, {@link Task#sequence sequence}, plus property {@link Task#ctx ctx} - + * the transaction context object. See class {@link Task} for more details. + * + * Note that transactions should be chosen over tasks only where necessary, because unlike regular tasks, + * transactions are blocking operations. + * + * @param {string|number|Object} [options] + * This parameter is optional, and presumed skipped when the first parameter is a function (`cb` parameter). + * + * When it is of type `string` or `number`, it is assumed to be option `tag` passed in directly. Otherwise, + * it is expected to be an object with options as listed below. + * + * @param {} [options.tag] + * Traceable context for the transaction (see $[tags]). + * + * @param {txMode.TransactionMode} [options.mode] + * Transaction Configuration Mode - extends the transaction-opening command with additional configuration. + * + * @param {function} cb + * Transaction callback function, to return the result that will determine either success or failure for the operation. + * + * The function can be either the first of the second parameter passed into the method. + * + * It also can be an ES7 `async` function. + * + * @returns {external:Promise} + * A promise object with the result from the callback function. + * + * @see + * {@link Task}, + * {@link Database#task Database.task}, + * {@link Database#taskIf Database.taskIf}, + * {@link TaskContext}, + * $[tags], + * $[Chaining Queries] + * + * @example + * + * db.tx('my-transaction', t => { + * // t.ctx = transaction context object + * + * return t.one('INSERT INTO Users(name, age) VALUES($1, $2) RETURNING id', ['Mike', 25]) + * .then(user => { + * return t.batch([ + * t.none('INSERT INTO Events(userId, name) VALUES($1, $2)', [user.id, 'created']), + * t.none('INSERT INTO Events(userId, name) VALUES($1, $2)', [user.id, 'login']) + * ]); + * }); + * }) + * .then(data => { + * // success + * // data = as returned from the transaction's callback + * }) + * .catch(error => { + * // error + * }); + * + * @example + * + * // using an ES7 syntax for the callback: + * db.tx('my-transaction', async t { + * // t.ctx = transaction context object + * + * const user = await t.one('INSERT INTO Users(name, age) VALUES($1, $2) RETURNING id', ['Mike', 25]); + * return t.none('INSERT INTO Events(userId, name) VALUES($1, $2)', [user.id, 'created']); + * }) + * .then(data => { + * // success + * // data = as returned from the transaction's callback + * }) + * .catch(error => { + * // error + * }); + * + */ + obj.tx = function () { + const args = npm.pubUtils.taskArgs(arguments); + assertOptions(args.options, [`tag`, `mode`]); + return taskProcessor.call(this, args, true); + }; + + /** + * @method Database#txIf + * @description + * Executes a conditional transaction that results in an actual transaction ({@link Database#tx tx}), if the condition is met, + * or else it executes a regular {@link Database#task task}. + * + * The default condition is `not in transaction`, to start a transaction only if currently not in transaction, + * or else start a task, which is the same as calling the following: + * + * ```js + * db.txIf({cnd: t => !t.ctx || !t.ctx.inTransaction}, cb => {}) + * ``` + * + * It is useful when you want to avoid $[Nested Transactions] - savepoints. + * + * @param {string|number|Object} [options] + * This parameter is optional, and presumed skipped when the first parameter is a function (`cb` parameter). + * + * When it is of type `string` or `number`, it is assumed to be option `tag` passed in directly. Otherwise, + * it is expected to be an object with options as listed below. + * + * @param {} [options.tag] + * Traceable context for the task/transaction (see $[tags]). + * + * @param {txMode.TransactionMode} [options.mode] + * Transaction Configuration Mode - extends the transaction-opening command with additional configuration. + * + * @param {boolean|function} [options.cnd] + * Condition for opening a transaction ({@link Database#tx tx}), if it is met, or a {@link Database#task task} when the condition is not met. + * It can be either a simple boolean, or a callback function that takes the task/tx context as `this` and as the first parameter. + * + * Default condition (when it is not specified): + * + * ```js + * {cnd: t => !t.ctx || !t.ctx.inTransaction} + * ``` + * + * @param {boolean|function} [options.reusable=false] + * When `cnd` is/returns false, reuse context of the current task/transaction, if one exists. + * It can be either a simple boolean, or a callback function that takes the task/tx context as `this` + * and as the first parameter. + * + * By default, when `cnd` is/returns false, the method creates a new task. This option tells + * the method to reuse the current task/transaction context, and not create a new task. + * + * This option is ignored when executing against the top level of the protocol, because on + * that level, if no transaction is suddenly needed, a new task becomes necessary. + * + * @param {function} cb + * Transaction/task callback function, to return the result that will determine either + * success or failure for the operation. + * + * The function can be either the first or the second parameter passed into the method. + * + * It also can be an ES7 `async` function. + * + * @returns {external:Promise} + * A promise object with the result from the callback function. + * + * @see + * {@link Task}, + * {@link Database#task Database.task}, + * {@link Database#taskIf Database.taskIf}, + * {@link Database#tx Database.tx}, + * {@link TaskContext} + * + */ + obj.txIf = function () { + const args = npm.pubUtils.taskArgs(arguments); + assertOptions(args.options, [`tag`, `mode`, `cnd`, `reusable`]); + try { + let cnd; + if (`cnd` in args.options) { + cnd = args.options.cnd; + cnd = typeof cnd === `function` ? cnd.call(obj, obj) : !!cnd; + } else { + cnd = !obj.ctx || !obj.ctx.inTransaction; + } + args.options.cnd = cnd; + const reusable = args.options.reusable; + args.options.reusable = !cnd && obj.ctx && typeof reusable === `function` ? reusable.call(obj, obj) : !!reusable; + } catch (e) { + return $p.reject(e); + } + return taskProcessor.call(this, args, args.options.cnd); + }; + + // Task method; + // Resolves with result from the callback function; + function taskProcessor(params, isTX) { + + if (typeof params.cb !== `function`) { + return $p.reject(new TypeError(`Callback function is required.`)); + } + + if (params.options.reusable) { + return config.$npm.task.callback(obj.ctx, obj, params.cb, config); + } + + const taskCtx = ctx.clone(); // task context object; + if (isTX) { + taskCtx.txLevel = taskCtx.txLevel >= 0 ? (taskCtx.txLevel + 1) : 0; + } + taskCtx.inTransaction = taskCtx.txLevel >= 0; + taskCtx.level = taskCtx.level >= 0 ? (taskCtx.level + 1) : 0; + taskCtx.cb = params.cb; // callback function; + taskCtx.mode = params.options.mode; // transaction mode; + if (this !== obj) { + taskCtx.context = this; // calling context object; + } + + const tsk = new config.$npm.task.Task(taskCtx, params.options.tag, isTX, config); + taskCtx.taskCtx = tsk.ctx; + extend(taskCtx, tsk); + + if (taskCtx.db) { + // reuse existing connection; + npm.utils.addReadProp(tsk.ctx, `useCount`, taskCtx.db.useCount); + addServerVersion(tsk.ctx, taskCtx.db.client); + return config.$npm.task.execute(taskCtx, tsk, isTX, config); + } + + // connection required; + return config.$npm.connect.pool(taskCtx, dbThis) + .then(db => { + taskCtx.connect(db); + npm.utils.addReadProp(tsk.ctx, `useCount`, db.useCount); + addServerVersion(tsk.ctx, db.client); + return config.$npm.task.execute(taskCtx, tsk, isTX, config); + }) + .then(data => { + taskCtx.disconnect(); + return data; + }) + .catch(error => { + taskCtx.disconnect(); + return $p.reject(error); + }); + } + + function addServerVersion(target, client) { + // Exclude else-case from coverage, because it can only occur with Native Bindings. + // istanbul ignore else + if (client.serverVersion) { + npm.utils.addReadProp(target, `serverVersion`, client.serverVersion); + } + } + + // lock all default properties to read-only, + // to prevent override by the client. + npm.utils.lock(obj, false, ctx.options); + + // extend the protocol; + Events.extend(ctx.options, obj, ctx.dc); + + // freeze the protocol permanently; + npm.utils.lock(obj, true, ctx.options); + } + +} + +// this event only happens when the connection is lost physically, +// which cannot be tested automatically; removing from coverage: +// istanbul ignore next +function onError(err) { + // this client was never seen by pg-promise, which + // can happen if it failed to initialize + if (!err.client.$ctx) { + return; + } + const ctx = err.client.$ctx; + Events.error(ctx.options, err, { + cn: npm.utils.getSafeConnection(ctx.cn), + dc: ctx.dc + }); +} + +module.exports = config => { + const npmLocal = config.$npm; + npmLocal.connect = npmLocal.connect || npm.connect(config); + npmLocal.query = npmLocal.query || npm.query(config); + npmLocal.task = npmLocal.task || npm.task(config); + return Database; +}; + +/** + * @callback Database.streamInitCB + * @description + * Stream initialization callback, used by {@link Database#stream Database.stream}. + * + * @param {external:Stream} stream + * Stream object to initialize streaming. + * + * @example + * const QueryStream = require('pg-query-stream'); + * const JSONStream = require('JSONStream'); + * + * // you can also use pgp.as.format(query, values, options) + * // to format queries properly, via pg-promise; + * const qs = new QueryStream('SELECT * FROM users'); + * + * db.stream(qs, stream => { + * // initiate streaming into the console: + * stream.pipe(JSONStream.stringify()).pipe(process.stdout); + * }) + * .then(data => { + * console.log('Total rows processed:', data.processed, + * 'Duration in milliseconds:', data.duration); + * }) + * .catch(error => { + * // error; + * }); + */ + +/** + * @external Stream + * @see https://nodejs.org/api/stream.html + */ + +/** + * @external pg-pool + * @alias pg-pool + * @see https://github.com/brianc/node-pg-pool + */ + +/** + * @external Result + * @see https://node-postgres.com/api/result + */ diff --git a/server/node_modules/pg-promise/lib/errors/README.md b/server/node_modules/pg-promise/lib/errors/README.md new file mode 100644 index 0000000..5c761a3 --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/README.md @@ -0,0 +1,13 @@ +### `errors` namespace + +This folder contains everything that's available via the [errors] namespace, before and after initialization: + +```js +const pgpLib = require('pg-promise'); +const pgp = pgpLib(/*initialization options*/); + +pgpLib.errors; // `errors` namespace +pgp.errors; // `errors` namespace +``` + +[errors]:http://vitaly-t.github.io/pg-promise/errors.html diff --git a/server/node_modules/pg-promise/lib/errors/index.js b/server/node_modules/pg-promise/lib/errors/index.js new file mode 100644 index 0000000..b3878d2 --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/index.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {QueryResultError, queryResultErrorCode} = require(`./query-result-error`); +const {PreparedStatementError} = require(`./prepared-statement-error`); +const {ParameterizedQueryError} = require(`./parameterized-query-error`); +const {QueryFileError} = require(`./query-file-error`); + +/** + * @namespace errors + * @description + * Error types namespace, available as `pgp.errors`, before and after initializing the library. + * + * @property {function} PreparedStatementError + * {@link errors.PreparedStatementError PreparedStatementError} class constructor. + * + * Represents all errors that can be reported by class {@link PreparedStatement}. + * + * @property {function} ParameterizedQueryError + * {@link errors.ParameterizedQueryError ParameterizedQueryError} class constructor. + * + * Represents all errors that can be reported by class {@link ParameterizedQuery}. + * + * @property {function} QueryFileError + * {@link errors.QueryFileError QueryFileError} class constructor. + * + * Represents all errors that can be reported by class {@link QueryFile}. + * + * @property {function} QueryResultError + * {@link errors.QueryResultError QueryResultError} class constructor. + * + * Represents all result-specific errors from query methods. + * + * @property {errors.queryResultErrorCode} queryResultErrorCode + * Error codes `enum` used by class {@link errors.QueryResultError QueryResultError}. + * + */ + +module.exports = { + QueryResultError, + queryResultErrorCode, + PreparedStatementError, + ParameterizedQueryError, + QueryFileError +}; diff --git a/server/node_modules/pg-promise/lib/errors/parameterized-query-error.js b/server/node_modules/pg-promise/lib/errors/parameterized-query-error.js new file mode 100644 index 0000000..90aef9f --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/parameterized-query-error.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {QueryFileError} = require(`./query-file-error`); + +const npm = { + os: require(`os`), + utils: require(`../utils`) +}; + +/** + * @class errors.ParameterizedQueryError + * @augments external:Error + * @description + * {@link errors.ParameterizedQueryError ParameterizedQueryError} class, available from the {@link errors} namespace. + * + * This type represents all errors that can be reported by class {@link ParameterizedQuery}, whether it is used + * explicitly or implicitly (via a simple `{text, values}` object). + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `ParameterizedQueryError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {errors.QueryFileError} error + * Internal {@link errors.QueryFileError} object. + * + * It is set only when the source {@link ParameterizedQuery} used a {@link QueryFile} which threw the error. + * + * @property {object} result + * Resulting Parameterized Query object. + * + * @see ParameterizedQuery + */ +class ParameterizedQueryError extends Error { + constructor(error, pq) { + const isQueryFileError = error instanceof QueryFileError; + const message = isQueryFileError ? `Failed to initialize 'text' from a QueryFile.` : error; + super(message); + this.name = this.constructor.name; + if (isQueryFileError) { + this.error = error; + } + this.result = pq; + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @method errors.ParameterizedQueryError#toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +ParameterizedQueryError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + gap2 = npm.utils.messageGap(level + 2), + lines = [ + `ParameterizedQueryError {`, + gap1 + `message: "` + this.message + `"`, + gap1 + `result: {`, + gap2 + `text: ` + npm.utils.toJson(this.result.text), + gap2 + `values: ` + npm.utils.toJson(this.result.values), + gap1 + `}` + ]; + if (this.error) { + lines.push(gap1 + `error: ` + this.error.toString(level + 1)); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(ParameterizedQueryError, function () { + return this.toString(); +}); + +module.exports = {ParameterizedQueryError}; diff --git a/server/node_modules/pg-promise/lib/errors/prepared-statement-error.js b/server/node_modules/pg-promise/lib/errors/prepared-statement-error.js new file mode 100644 index 0000000..6bc435c --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/prepared-statement-error.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {QueryFileError} = require(`./query-file-error`); + +const npm = { + os: require(`os`), + utils: require(`../utils`) +}; + +/** + * @class errors.PreparedStatementError + * @augments external:Error + * @description + * {@link errors.PreparedStatementError PreparedStatementError} class, available from the {@link errors} namespace. + * + * This type represents all errors that can be reported by class {@link PreparedStatement}, whether it is used + * explicitly or implicitly (via a simple `{name, text, values}` object). + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `PreparedStatementError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {errors.QueryFileError} error + * Internal {@link errors.QueryFileError} object. + * + * It is set only when the source {@link PreparedStatement} used a {@link QueryFile} which threw the error. + * + * @property {object} result + * Resulting Prepared Statement object. + * + * @see PreparedStatement + */ +class PreparedStatementError extends Error { + constructor(error, ps) { + const isQueryFileError = error instanceof QueryFileError; + const message = isQueryFileError ? `Failed to initialize 'text' from a QueryFile.` : error; + super(message); + this.name = this.constructor.name; + if (isQueryFileError) { + this.error = error; + } + this.result = ps; + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @method errors.PreparedStatementError#toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +PreparedStatementError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + gap2 = npm.utils.messageGap(level + 2), + lines = [ + `PreparedStatementError {`, + gap1 + `message: "` + this.message + `"`, + gap1 + `result: {`, + gap2 + `name: ` + npm.utils.toJson(this.result.name), + gap2 + `text: ` + npm.utils.toJson(this.result.text), + gap2 + `values: ` + npm.utils.toJson(this.result.values), + gap1 + `}` + ]; + if (this.error) { + lines.push(gap1 + `error: ` + this.error.toString(level + 1)); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(PreparedStatementError, function () { + return this.toString(); +}); + +module.exports = {PreparedStatementError}; diff --git a/server/node_modules/pg-promise/lib/errors/query-file-error.js b/server/node_modules/pg-promise/lib/errors/query-file-error.js new file mode 100644 index 0000000..4f77961 --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/query-file-error.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const npm = { + os: require(`os`), + utils: require(`../utils`), + minify: require(`pg-minify`) +}; + +/** + * @class errors.QueryFileError + * @augments external:Error + * @description + * {@link errors.QueryFileError QueryFileError} class, available from the {@link errors} namespace. + * + * This type represents all errors related to {@link QueryFile}. + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `QueryFileError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {string} file + * File path/name that was passed into the {@link QueryFile} constructor. + * + * @property {object} options + * Set of options that was used by the {@link QueryFile} object. + * + * @property {SQLParsingError} error + * Internal $[SQLParsingError] object. + * + * It is set only when the error was thrown by $[pg-minify] while parsing the SQL file. + * + * @see QueryFile + * + */ +class QueryFileError extends Error { + constructor(error, qf) { + const isSqlError = error instanceof npm.minify.SQLParsingError; + const message = isSqlError ? `Failed to parse the SQL.` : error.message; + super(message); + this.name = this.constructor.name; + if (isSqlError) { + this.error = error; + } + this.file = qf.file; + this.options = qf.options; + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @method errors.QueryFileError#toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +QueryFileError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + `QueryFileError {`, + gap1 + `message: "` + this.message + `"`, + gap1 + `options: ` + npm.utils.toJson(this.options), + gap1 + `file: "` + this.file + `"` + ]; + if (this.error) { + lines.push(gap1 + `error: ` + this.error.toString(level + 1)); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(QueryFileError, function () { + return this.toString(); +}); + +module.exports = {QueryFileError}; diff --git a/server/node_modules/pg-promise/lib/errors/query-result-error.js b/server/node_modules/pg-promise/lib/errors/query-result-error.js new file mode 100644 index 0000000..9baccd5 --- /dev/null +++ b/server/node_modules/pg-promise/lib/errors/query-result-error.js @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const npm = { + os: require(`os`), + utils: require(`../utils`), + text: require(`../text`) +}; + +/** + * @enum {number} + * @alias errors.queryResultErrorCode + * @readonly + * @description + * `queryResultErrorCode` enumerator, available from the {@link errors} namespace. + * + * Represents an integer code for each type of error supported by type {@link errors.QueryResultError}. + * + * @see {@link errors.QueryResultError} + */ +const queryResultErrorCode = { + /** No data returned from the query. */ + noData: 0, + + /** No return data was expected. */ + notEmpty: 1, + + /** Multiple rows were not expected. */ + multiple: 2 +}; + +const errorMessages = [ + {name: `noData`, message: npm.text.noData}, + {name: `notEmpty`, message: npm.text.notEmpty}, + {name: `multiple`, message: npm.text.multiple} +]; + +/** + * @class errors.QueryResultError + * @augments external:Error + * @description + * + * This error is specified as the rejection reason for all result-specific methods when the result doesn't match + * the expectation, i.e. when a query result doesn't match its Query Result Mask - the value of {@link queryResult}. + * + * The error applies to the result from the following methods: {@link Database#none none}, + * {@link Database#one one}, {@link Database#oneOrNone oneOrNone} and {@link Database#many many}. + * + * Supported errors: + * + * - `No return data was expected.`, method {@link Database#none none} + * - `No data returned from the query.`, methods {@link Database#one one} and {@link Database#many many} + * - `Multiple rows were not expected.`, methods {@link Database#one one} and {@link Database#oneOrNone oneOrNone} + * + * Like any other error, this one is notified with through the global event {@link event:error error}. + * + * The type is available from the {@link errors} namespace. + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `QueryResultError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {object} result + * The original $[Result] object that was received. + * + * @property {number} received + * Total number of rows received. It is simply the value of `result.rows.length`. + * + * @property {number} code + * Error code - {@link errors.queryResultErrorCode queryResultErrorCode} value. + * + * @property {string} query + * Query that was executed. + * + * Normally, it is the query already formatted with values, if there were any. + * But if you are using initialization option `pgFormatting`, then the query string is before formatting. + * + * @property {*} values + * Values passed in as query parameters. Available only when initialization option `pgFormatting` is used. + * Otherwise, the values are within the pre-formatted `query` string. + * + * @example + * + * const QueryResultError = pgp.errors.QueryResultError; + * const qrec = pgp.errors.queryResultErrorCode; + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * error: (err, e) => { + * if (err instanceof QueryResultError) { + * // A query returned unexpected number of records, and thus rejected; + * + * // we can check the error code, if we want specifics: + * if(err.code === qrec.noData) { + * // expected some data, but received none; + * } + * + * // If you write QueryResultError into the console, + * // you will get a nicely formatted output. + * + * console.log(err); + * + * // See also: err, e.query, e.params, etc. + * } + * } + * }; + * + * @see + * {@link queryResult}, {@link Database#none none}, {@link Database#one one}, + * {@link Database#oneOrNone oneOrNone}, {@link Database#many many} + * + */ +class QueryResultError extends Error { + constructor(code, result, query, values) { + const message = errorMessages[code].message; + super(message); + this.name = this.constructor.name; + this.code = code; + this.result = result; + this.query = query; + this.values = values; + this.received = result.rows.length; + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @method errors.QueryResultError#toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +QueryResultError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + `QueryResultError {`, + gap1 + `code: queryResultErrorCode.` + errorMessages[this.code].name, + gap1 + `message: "` + this.message + `"`, + gap1 + `received: ` + this.received, + gap1 + `query: ` + (typeof this.query === `string` ? `"` + this.query + `"` : npm.utils.toJson(this.query)) + ]; + if (this.values !== undefined) { + lines.push(gap1 + `values: ` + npm.utils.toJson(this.values)); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(QueryResultError, function () { + return this.toString(); +}); + +module.exports = { + QueryResultError, + queryResultErrorCode +}; diff --git a/server/node_modules/pg-promise/lib/events.js b/server/node_modules/pg-promise/lib/events.js new file mode 100644 index 0000000..16e9ea0 --- /dev/null +++ b/server/node_modules/pg-promise/lib/events.js @@ -0,0 +1,531 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ColorConsole} = require(`./utils/color`); + +const npm = { + main: require(`./`), + utils: require(`./utils`) +}; + +///////////////////////////////// +// Client notification helpers; +class Events { + + /** + * @event connect + * @description + * Global notification of acquiring a new database connection from the connection pool, i.e. a virtual connection. + * + * However, for direct calls to method {@link Database#connect Database.connect} with parameter `{direct: true}`, + * this event represents a physical connection. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {external:Client} client + * $[pg.Client] object that represents the connection. + * + * @param {*} dc + * Database Context that was used when creating the database object (see {@link Database}). + * + * @param {number} useCount + * Number of times the connection has been previously used, starting with 0 for a freshly + * allocated physical connection. + * + * This parameter is always 0 for direct connections (created by calling {@link Database#connect Database.connect} + * with parameter `{direct: true}`). + * + * @example + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * connect(client, dc, useCount) { + * const cp = client.connectionParameters; + * console.log('Connected to database:', cp.database); + * } + * + * }; + */ + static connect(ctx, client, useCount) { + if (typeof ctx.options.connect === `function`) { + try { + ctx.options.connect(client, ctx.dc, useCount); + } catch (e) { + // have to silence errors here; + // cannot allow unhandled errors while connecting to the database, + // as it will break the connection logic; + Events.unexpected(`connect`, e); + } + } + } + + /** + * @event disconnect + * @description + * Global notification of releasing a database connection back to the connection pool, i.e. releasing the virtual connection. + * + * However, when releasing a direct connection (created by calling {@link Database#connect Database.connect} with parameter + * `{direct: true}`), this event represents a physical disconnection. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {external:Client} client - $[pg.Client] object that represents connection with the database. + * + * @param {*} dc - Database Context that was used when creating the database object (see {@link Database}). + * + * @example + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * disconnect(client, dc) { + * const cp = client.connectionParameters; + * console.log('Disconnecting from database:', cp.database); + * } + * + * }; + */ + static disconnect(ctx, client) { + if (typeof ctx.options.disconnect === `function`) { + try { + ctx.options.disconnect(client, ctx.dc); + } catch (e) { + // have to silence errors here; + // cannot allow unhandled errors while disconnecting from the database, + // as it will break the disconnection logic; + Events.unexpected(`disconnect`, e); + } + } + } + + /** + * @event query + * @description + * + * Global notification of a query that's about to execute. + * + * Notification happens just before the query execution. And if the handler throws an error, the query execution + * will be rejected with that error. + * + * @param {EventContext} e + * Event Context Object. + * + * @example + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * query(e) { + * console.log('QUERY:', e.query); + * } + * }; + */ + static query(options, context) { + if (typeof options.query === `function`) { + try { + options.query(context); + } catch (e) { + // throwing an error during event 'query' + // will result in a reject for the request. + return e instanceof Error ? e : new npm.utils.InternalError(e); + } + } + } + + /** + * @event receive + * @description + * Global notification of any data received from the database, coming from a regular query or from a stream. + * + * The event is fired before the data reaches the client, and it serves two purposes: + * - Providing selective data logging for debugging; + * - Pre-processing data before it reaches the client. + * + * **NOTES:** + * - If you alter the size of `data` directly or through the `result` object, it may affect `QueryResultMask` + * validation for regular queries, which is executed right after. + * - Any data pre-processing needs to be fast here, to avoid performance penalties. + * - If the event handler throws an error, the original request will be rejected with that error. + * + * For methods {@link Database#multi Database.multi} and {@link Database#multiResult Database.multiResult}, + * this event is called for every result that's returned. And for method {@link Database#stream Database.stream}, + * the event occurs for every record. + * + * @param {Array} data + * Array of received objects/rows. + * + * If any of those objects are modified during notification, the client will receive the modified data. + * + * @param {external:Result} result + * - Original $[Result] object, if the data is from a non-stream query, in which case `data = result.rows`. + * For single-query requests, $[Result] object is extended with property `duration` - number of milliseconds + * it took to send the query, execute it and get the result back. + * - It is `undefined` when the data comes from a stream (method {@link Database#stream Database.stream}). + * + * @param {EventContext} e + * Event Context Object. + * + * @example + * + * // Example below shows the fastest way to camelize all column names. + * // NOTE: The example does not do processing for nested JSON objects. + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * receive(data, result, e) { + * camelizeColumns(data); + * } + * }; + * + * function camelizeColumns(data) { + * const tmp = data[0]; + * for (const prop in tmp) { + * const camel = pgp.utils.camelize(prop); + * if (!(camel in tmp)) { + * for (let i = 0; i < data.length; i++) { + * const d = data[i]; + * d[camel] = d[prop]; + * delete d[prop]; + * } + * } + * } + * } + */ + static receive(options, data, result, context) { + if (typeof options.receive === `function`) { + try { + options.receive(data, result, context); + } catch (e) { + // throwing an error during event 'receive' + // will result in a reject for the request. + return e instanceof Error ? e : new npm.utils.InternalError(e); + } + } + } + + /** + * @event task + * @description + * Global notification of a task start / finish events, as executed via + * {@link Database#task Database.task} or {@link Database#taskIf Database.taskIf}. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {EventContext} e + * Event Context Object. + * + * @example + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * task(e) { + * if (e.ctx.finish) { + * // this is a task->finish event; + * console.log('Duration:', e.ctx.duration); + * if (e.ctx.success) { + * // e.ctx.result = resolved data; + * } else { + * // e.ctx.result = error/rejection reason; + * } + * } else { + * // this is a task->start event; + * console.log('Start Time:', e.ctx.start); + * } + * } + * }; + * + */ + static task(options, context) { + if (typeof options.task === `function`) { + try { + options.task(context); + } catch (e) { + // silencing the error, to avoid breaking the task; + Events.unexpected(`task`, e); + } + } + } + + /** + * @event transact + * @description + * Global notification of a transaction start / finish events, as executed via {@link Database#tx Database.tx} + * or {@link Database#txIf Database.txIf}. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {EventContext} e + * Event Context Object. + * + * @example + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * transact(e) { + * if (e.ctx.finish) { + * // this is a transaction->finish event; + * console.log('Duration:', e.ctx.duration); + * if (e.ctx.success) { + * // e.ctx.result = resolved data; + * } else { + * // e.ctx.result = error/rejection reason; + * } + * } else { + * // this is a transaction->start event; + * console.log('Start Time:', e.ctx.start); + * } + * } + * }; + * + */ + static transact(options, context) { + if (typeof options.transact === `function`) { + try { + options.transact(context); + } catch (e) { + // silencing the error, to avoid breaking the transaction; + Events.unexpected(`transact`, e); + } + } + } + + /** + * @event error + * @description + * Global notification of every error encountered by this library. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {*} err + * The error encountered, of the same value and type as it was reported. + * + * @param {EventContext} e + * Event Context Object. + * + * @example + * const initOptions = { + * + * // pg-promise initialization options... + * + * error(err, e) { + * + * if (e.cn) { + * // this is a connection-related error + * // cn = safe connection details passed into the library: + * // if password is present, it is masked by # + * } + * + * if (e.query) { + * // query string is available + * if (e.params) { + * // query parameters are available + * } + * } + * + * if (e.ctx) { + * // occurred inside a task or transaction + * } + * } + * }; + * + */ + static error(options, err, context) { + if (typeof options.error === `function`) { + try { + options.error(err, context); + } catch (e) { + // have to silence errors here; + // throwing unhandled errors while handling an error + // notification is simply not acceptable. + Events.unexpected(`error`, e); + } + } + } + + /** + * @event extend + * @description + * Extends {@link Database} protocol with custom methods and properties. + * + * Override this event to extend the existing access layer with your own functions and + * properties best suited for your application. + * + * The extension thus becomes available across all access layers: + * + * - Within the root/default database protocol; + * - Inside transactions, including nested ones; + * - Inside tasks, including nested ones. + * + * All pre-defined methods and properties are read-only, so you will get an error, + * if you try overriding them. + * + * The library will suppress any error thrown by the handler and write it into the console. + * + * @param {object} obj - Protocol object to be extended. + * + * @param {*} dc - Database Context that was used when creating the {@link Database} object. + * + * @see $[pg-promise-demo] + * + * @example + * + * // In the example below we extend the protocol with function `addImage` + * // that will insert one binary image and resolve with the new record id. + * + * const initOptions = { + * + * // pg-promise initialization options... + * + * extend(obj, dc) { + * // dc = database context; + * obj.addImage = data => { + * // adds a new image and resolves with its record id: + * return obj.one('INSERT INTO images(data) VALUES($1) RETURNING id', data, a => a.id); + * } + * } + * }; + * + * @example + * + * // It is best to extend the protocol by adding whole entity repositories to it as shown in the following example. + * // For a comprehensive example see https://github.com/vitaly-t/pg-promise-demo + * + * class UsersRepository { + * constructor(rep, pgp) { + * this.rep = rep; + * this.pgp = pgp; + * } + * + * add(name) { + * return this.rep.one('INSERT INTO users(name) VALUES($1) RETURNING id', name, a => a.id); + * } + * + * remove(id) { + * return this.rep.none('DELETE FROM users WHERE id = $1', id); + * } + * } + * + * // Overriding 'extend' event; + * const initOptions = { + * + * // pg-promise initialization options... + * + * extend(obj, dc) { + * // dc = database context; + * obj.users = new UsersRepository(obj, pgp); + * // You can set different repositories based on `dc` + * } + * }; + * + * // Usage example: + * db.users.add('John', true) + * .then(id => { + * // user added successfully, id = new user's id + * }) + * .catch(error => { + * // failed to add the user; + * }); + * + */ + static extend(options, obj, dc) { + if (typeof options.extend === `function`) { + try { + options.extend.call(obj, obj, dc); + } catch (e) { + // have to silence errors here; + // the result of throwing unhandled errors while + // extending the protocol would be unpredictable. + Events.unexpected(`extend`, e); + } + } + } + + /** + * @event unexpected + * @param {string} event - unhandled event name. + * @param {string|Error} e - unhandled error. + * @private + */ + static unexpected(event, e) { + // If you should ever get here, your app is definitely broken, and you need to fix + // your event handler to prevent unhandled errors during event notifications. + // + // Console output is suppressed when running tests, to avoid polluting test output + // with error messages that are intentional and of no value to the test. + + /* istanbul ignore if */ + if (!npm.main.suppressErrors) { + const stack = e instanceof Error ? e.stack : new Error().stack; + ColorConsole.error(`Unexpected error in '${event}' event handler.\n${stack}\n`); + } + } +} + +module.exports = {Events}; + +/** + * @typedef EventContext + * @description + * This common type is used for the following events: {@link event:query query}, {@link event:receive receive}, + * {@link event:error error}, {@link event:task task} and {@link event:transact transact}. + * + * @property {string|object} cn + * + * Set only for event {@link event:error error}, and only when the error is connection-related. + * + * It is a safe copy of the connection string/object that was used when initializing `db` - the database instance. + * + * If the original connection contains a password, the safe copy contains it masked with symbol `#`, so the connection + * can be logged safely, without exposing the password. + * + * @property {*} dc + * Database Context that was used when creating the database object (see {@link Database}). It is set for all events. + * + * @property {string|object} query + * + * Query string/object that was passed into the query method. This property is only set during events {@link event:query query}, + * {@link event:receive receive} and {@link event:error error} (only when the error is query-related). + * + * @property {external:Client} client + * + * $[pg.Client] object that represents the connection. It is set for all events, except for event {@link event:error error} + * when it is connection-related. Note that sometimes the value may be unset when the connection is lost. + * + * @property {*} params - Formatting parameters for the query. + * + * It is set only for events {@link event:query query}, {@link event:receive receive} and {@link event:error error}, and only + * when it is needed for logging. This library takes an extra step in figuring out when formatting parameters are of any value + * to the event logging: + * - when an error occurs related to the query formatting, event {@link event:error error} is sent with the property set. + * - when initialization parameter `pgFormat` is used, and all query formatting is done within the $[PG] library, events + * {@link event:query query} and {@link event:receive receive} will have this property set also, since this library no longer + * handles the query formatting. + * + * When this parameter is not set, it means one of the two things: + * - there were no parameters passed into the query method; + * - property `query` of this object already contains all the formatting values in it, so logging only the query is sufficient. + * + * @property {TaskContext} ctx + * _Task/Transaction Context_ object. + * + * This property is always set for events {@link event:task task} and {@link event:transact transact}, while for events + * {@link event:query query}, {@link event:receive receive} and {@link event:error error} it is only set when they occur + * inside a task or transaction. + * + */ diff --git a/server/node_modules/pg-promise/lib/formatting.js b/server/node_modules/pg-promise/lib/formatting.js new file mode 100644 index 0000000..76561f8 --- /dev/null +++ b/server/node_modules/pg-promise/lib/formatting.js @@ -0,0 +1,931 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {assertOptions} = require(`assert-options`); + +const npm = { + pgUtils: require(`pg/lib/utils`), + patterns: require(`./patterns`), + utils: require(`./utils`) +}; + +// Format Modification Flags; +const fmFlags = { + raw: 1, // Raw-Text variable + alias: 2, // SQL Alias + name: 4, // SQL Name/Identifier + json: 8, // JSON modifier + csv: 16, // CSV modifier + value: 32 // escaped, but without '' +}; + +// Format Modification Map; +const fmMap = { + '^': fmFlags.raw, + ':raw': fmFlags.raw, + ':alias': fmFlags.alias, + '~': fmFlags.name, + ':name': fmFlags.name, + ':json': fmFlags.json, + ':csv': fmFlags.csv, + ':list': fmFlags.csv, + ':value': fmFlags.value, + '#': fmFlags.value +}; + +// Global symbols for Custom Type Formatting: +const ctfSymbols = { + toPostgres: Symbol.for(`ctf.toPostgres`), + rawType: Symbol.for(`ctf.rawType`) +}; + +const maxVariable = 100000; // maximum supported variable is '$100000' + +//////////////////////////////////////////////////// +// Converts a single value into its Postgres format. +function formatValue({value, fm, cc, options}) { + + if (typeof value === `function`) { + return formatValue({value: resolveFunc(value, cc), fm, cc}); + } + + const ctf = getCTF(value); // Custom Type Formatting + if (ctf) { + fm |= ctf.rawType ? fmFlags.raw : 0; + return formatValue({value: resolveFunc(ctf.toPostgres, value), fm, cc}); + } + + const isRaw = !!(fm & fmFlags.raw); + fm &= ~fmFlags.raw; + + switch (fm) { + case fmFlags.alias: + return $as.alias(value); + case fmFlags.name: + return $as.name(value); + case fmFlags.json: + return $as.json(value, isRaw); + case fmFlags.csv: + return $to.csv(value, options); + case fmFlags.value: + return $as.value(value); + default: + break; + } + + if (isNull(value)) { + throwIfRaw(isRaw); + return `null`; + } + + switch (typeof value) { + case `string`: + return $to.text(value, isRaw); + case `boolean`: + return $to.bool(value); + case `number`: + case `bigint`: + return $to.number(value); + case `symbol`: + throw new TypeError(`Type Symbol has no meaning for PostgreSQL: ${value.toString()}`); + default: + if (value instanceof Date) { + return $to.date(value, isRaw); + } + if (value instanceof Array) { + return $to.array(value, options); + } + if (value instanceof Buffer) { + return $to.buffer(value, isRaw); + } + return $to.json(value, isRaw); + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Converts array of values into PostgreSQL Array Constructor: array[...], as per PostgreSQL documentation: +// http://www.postgresql.org/docs/9.6/static/arrays.html +// +// Arrays of any depth/dimension are supported. +// +// Top-level empty arrays are formatted as literal '{}' to avoid the necessity of explicit type casting, +// as the server cannot automatically infer type of an empty non-literal array. +function formatArray(array, options) { + const loop = a => `[` + a.map(value => value instanceof Array ? loop(value) : formatValue({ + value, + options + })).join() + `]`; + const prefix = options && options.capSQL ? `ARRAY` : `array`; + return array.length ? (prefix + loop(array)) : `'{}'`; +} + +/////////////////////////////////////////////////////////////////// +// Formats array/object/value as a list of comma-separated values. +function formatCSV(values, options) { + if (values instanceof Array) { + return values.map(value => formatValue({value, options})).join(); + } + if (typeof values === `object` && values !== null) { + return Object.keys(values).map(v => formatValue({value: values[v], options})).join(); + } + return values === undefined ? `` : formatValue({value: values, options}); +} + +/////////////////////////////// +// Query formatting helpers; +const formatAs = { + + object({query, obj, raw, options}) { + options = options && typeof options === `object` ? options : {}; + return query.replace(npm.patterns.namedParameters, name => { + const v = formatAs.stripName(name.replace(/^\$[{(<[/]|[\s})>\]/]/g, ``), raw), + c = npm.utils.getIfHas(obj, v.name); + if (!c.valid) { + throw new Error(`Invalid property name '${v.name}'.`); + } + if (c.has) { + return formatValue({value: c.value, fm: v.fm, cc: c.target, options}); + } + if (v.name === `this`) { + return formatValue({value: obj, fm: v.fm, options}); + } + if (`def` in options) { + const d = options.def, value = typeof d === `function` ? d.call(obj, v.name, obj) : d; + return formatValue({value, fm: v.fm, cc: obj, options}); + } + if (options.partial) { + return name; + } + // property must exist as the object's own or inherited; + throw new Error(`Property '${v.name}' doesn't exist.`); + }); + }, + + array({query, array, raw, options}) { + options = options && typeof options === `object` ? options : {}; + return query.replace(npm.patterns.multipleValues, name => { + const v = formatAs.stripName(name.substr(1), raw); + const idx = v.name - 1; + if (idx >= maxVariable) { + throw new RangeError(`Variable $${v.name} exceeds supported maximum of $${maxVariable}`); + } + if (idx < array.length) { + return formatValue({value: array[idx], fm: v.fm, options}); + } + if (`def` in options) { + const d = options.def, value = typeof d === `function` ? d.call(array, idx, array) : d; + return formatValue({value, fm: v.fm, options}); + } + if (options.partial) { + return name; + } + throw new RangeError(`Variable $${v.name} out of range. Parameters array length: ${array.length}`); + }); + }, + + value({query, value, raw, options}) { + return query.replace(npm.patterns.singleValue, name => { + const v = formatAs.stripName(name, raw); + return formatValue({value, fm: v.fm, options}); + }); + }, + + stripName(name, raw) { + const mod = name.match(npm.patterns.hasValidModifier); + if (mod) { + return { + name: name.substr(0, mod.index), + fm: fmMap[mod[0]] | (raw ? fmFlags.raw : 0) + }; + } + return { + name, + fm: raw ? fmFlags.raw : null + }; + } +}; + +//////////////////////////////////////////// +// Simpler check for null/undefined; +function isNull(value) { + return value === undefined || value === null; +} + +////////////////////////////////////////////////////////////////// +// Checks if the value supports Custom Type Formatting, +// to return {toPostgres, rawType}, if it does, or null otherwise. +function getCTF(value) { + if (!isNull(value)) { + let toPostgres = value[ctfSymbols.toPostgres], rawType = !!value[ctfSymbols.rawType]; + if (typeof toPostgres !== `function`) { + toPostgres = value.toPostgres; + rawType = !!value.rawType; + } + if (typeof toPostgres === `function`) { + if (toPostgres.constructor.name !== `Function`) { + throw new Error(`CTF does not support asynchronous toPostgres functions.`); + } + return {toPostgres, rawType}; + } + } + return null; +} + +///////////////////////////////////////// +// Wraps a text string in single quotes; +function wrapText(text) { + return `'${text}'`; +} + +//////////////////////////////////////////////// +// Replaces each single-quote symbol ' with two, +// for compliance with PostgreSQL strings. +function safeText(text) { + return text.replace(/'/g, `''`); +} + +///////////////////////////////////////////// +// Throws an exception, if flag 'raw' is set. +function throwIfRaw(raw) { + if (raw) { + throw new TypeError(`Values null/undefined cannot be used as raw text.`); + } +} + +///////////////////////////////////////////////////////////////////////////// +// Recursively resolves parameter-function, with an optional Calling Context. +function resolveFunc(value, cc) { + while (typeof value === `function`) { + if (value.constructor.name !== `Function`) { + // Constructor name for asynchronous functions have different names: + // - 'GeneratorFunction' for ES6 generators + // - 'AsyncFunction' for ES7 async functions + throw new Error(`Cannot use asynchronous functions with query formatting.`); + } + value = value.call(cc, cc); + } + return value; +} + +/////////////////////////////////////////////////////////////////////////////////// +// It implements two types of formatting, depending on the 'values' passed: +// +// 1. format '$1, $2, etc', when 'values' is of type string, boolean, number, date, +// function or null (or an array of the same types, plus undefined values); +// 2. format $*propName*, when 'values' is an object (not null and not Date), +// and where * is any of the supported open-close pairs: {}, (), [], <>, // +// +function formatQuery(query, values, raw, options) { + if (typeof query !== `string`) { + throw new TypeError(`Parameter 'query' must be a text string.`); + } + const ctf = getCTF(values); + if (ctf) { + // Custom Type Formatting + return formatQuery(query, resolveFunc(ctf.toPostgres, values), raw || ctf.rawType, options); + } + if (typeof values === `object` && values !== null) { + if (values instanceof Array) { + // $1, $2,... formatting to be applied; + return formatAs.array({query, array: values, raw, options}); + } + if (!(values instanceof Date || values instanceof Buffer)) { + // $*propName* formatting to be applied; + return formatAs.object({query, obj: values, raw, options}); + } + } + // $1 formatting to be applied, if values != undefined; + return values === undefined ? query : formatAs.value({query, value: values, raw, options}); +} + +////////////////////////////////////////////////////// +// Formats a function or stored procedure call query; +function formatEntity(entity, values, {capSQL, type}) { + let prefix = type === `func` ? `select * from` : `call`; + if (capSQL) { + prefix = prefix.toUpperCase(); + } + return `${prefix} ${$as.alias(entity)}(${formatCSV(values, {capSQL})})`; +} + +function formatSqlName(name) { + return `"${name.replace(/"/g, `""`)}"`; +} + +/** + * @namespace formatting + * @description + * Namespace for all query-formatting functions, available from `pgp.as` before and after initializing the library. + * + * @property {formatting.ctf} ctf + * Namespace for symbols used by $[Custom Type Formatting]. + * + * @property {function} alias + * {@link formatting.alias alias} - formats an SQL alias. + * + * @property {function} name + * {@link formatting.name name} - formats an SQL Name/Identifier. + * + * @property {function} text + * {@link formatting.text text} - formats a text string. + * + * @property {function} number + * {@link formatting.number number} - formats a number. + * + * @property {function} buffer + * {@link formatting.buffer buffer} - formats a `Buffer` object. + * + * @property {function} value + * {@link formatting.value value} - formats text as an open value. + * + * @property {function} json + * {@link formatting.json json} - formats any value as JSON. + * + * @property {function} array + * {@link formatting.array array} - formats an array of any depth. + * + * @property {function} csv + * {@link formatting.csv csv} - formats an array as a list of comma-separated values. + * + * @property {function} func + * {@link formatting.func func} - formats the value returned from a function. + * + * @property {function} format + * {@link formatting.format format} - formats a query, according to parameters. + * + */ +const $as = { + + /** + * @namespace formatting.ctf + * @description + * Namespace for ES6 symbols used by $[Custom Type Formatting], available from `pgp.as.ctf` before and after initializing the library. + * + * It was added to avoid explicit/enumerable extension of types that need to be used as formatting parameters, to keep their type signature intact. + * + * @property {external:Symbol} toPostgres + * Property name for the $[Custom Type Formatting] callback function `toPostgres`. + * + * @property {external:Symbol} rawType + * Property name for the $[Custom Type Formatting] flag `rawType`. + * + * @example + * const ctf = pgp.as.ctf; // Custom Type Formatting symbols + * + * class MyType { + * constructor() { + * this[ctf.rawType] = true; // set it only when toPostgres returns a pre-formatted result + * } + * + * [ctf.toPostgres](self) { + * // self = this + * + * // return the custom/actual value here + * } + * } + * + * const a = new MyType(); + * + * const s = pgp.as.format('$1', a); // will be custom-formatted + */ + ctf: ctfSymbols, + + /** + * @method formatting.text + * @description + * Converts a value into PostgreSQL text presentation, escaped as required. + * + * Escaping the result means: + * 1. Every single-quote (apostrophe) is replaced with two + * 2. The resulting text is wrapped in apostrophes + * + * @param {value|function} value + * Value to be converted, or a function that returns the value. + * + * If the `value` resolves as `null` or `undefined`, while `raw`=`true`, + * it will throw {@link external:TypeError TypeError} = `Values null/undefined cannot be used as raw text.` + * + * @param {boolean} [raw=false] + * Indicates when not to escape the resulting text. + * + * @returns {string} + * + * - `null` string, if the `value` resolves as `null` or `undefined` + * - escaped result of `value.toString()`, if the `value` isn't a string + * - escaped string version, if `value` is a string. + * + * The result is not escaped, if `raw` was passed in as `true`. + */ + text(value, raw) { + value = resolveFunc(value); + if (isNull(value)) { + throwIfRaw(raw); + return `null`; + } + if (typeof value !== `string`) { + value = value.toString(); + } + return $to.text(value, raw); + }, + + /** + * @method formatting.name + * @description + * Properly escapes an sql name or identifier, fixing double-quote symbols and wrapping the result in double quotes. + * + * Implements a safe way to format $[SQL Names] that neutralizes SQL Injection. + * + * When formatting a query, a variable makes use of this method via modifier `:name` or `~`. See method {@link formatting.format format}. + * + * @param {string|function|array|object} name + * SQL name or identifier, or a function that returns it. + * + * The name must be at least 1 character long. + * + * If `name` doesn't resolve into a non-empty string, it throws {@link external:TypeError TypeError} = `Invalid sql name: ...` + * + * If the `name` contains only a single `*` (trailing spaces are ignored), then `name` is returned exactly as is (unescaped). + * + * - If `name` is an Array, it is formatted as a comma-separated list of $[SQL Names] + * - If `name` is a non-Array object, its keys are formatted as a comma-separated list of $[SQL Names] + * + * Passing in an empty array/object will throw {@link external:Error Error} = `Cannot retrieve sql names from an empty array/object.` + * + * @returns {string} + * The SQL Name/Identifier, properly escaped for compliance with the PostgreSQL standard for $[SQL Names] and identifiers. + * + * @see + * {@link formatting.alias alias}, + * {@link formatting.format format} + * + * @example + * + * // automatically list object properties as sql names: + * format('INSERT INTO table(${this~}) VALUES(${one}, ${two})', { + * one: 1, + * two: 2 + * }); + * //=> INSERT INTO table("one","two") VALUES(1, 2) + * + */ + name(name) { + name = resolveFunc(name); + if (name) { + if (typeof name === `string`) { + return /^\s*\*(\s*)$/.test(name) ? name : formatSqlName(name); + } + if (typeof name === `object`) { + const keys = Array.isArray(name) ? name : Object.keys(name); + if (!keys.length) { + throw new Error(`Cannot retrieve sql names from an empty array/object.`); + } + return keys.map(value => { + if (!value || typeof value !== `string`) { + throw new Error(`Invalid sql name: ${npm.utils.toJson(value)}`); + } + return formatSqlName(value); + }).join(); + } + } + throw new TypeError(`Invalid sql name: ${npm.utils.toJson(name)}`); + }, + + /** + * @method formatting.alias + * @description + * Simpler (non-verbose) version of method {@link formatting.name name}, to handle only a regular string-identifier + * that's mostly used as an SQL alias, i.e. it doesn't support `*` or an array/object of names, which in the context of + * an SQL alias would be incorrect. However, it supports `.` as name-separator, for simpler escaping of composite names. + * + * The surrounding double quotes are not added when the alias uses a simple syntax: + * - it is a same-case single word, without spaces + * - it can contain underscores, and can even start with them + * - it can contain digits and `$`, but cannot start with those + * + * The method will automatically split the string with `.`, to support composite SQL names. + * + * When formatting a query, a variable makes use of this method via modifier `:alias`. See method {@link formatting.format format}. + * + * @param {string|function} name + * SQL alias name, or a function that returns it. + * + * The name must be at least 1 character long. And it can contain `.`, to split into multiple SQL names. + * + * If `name` doesn't resolve into a non-empty string, it throws {@link external:TypeError TypeError} = `Invalid sql alias: ...` + * + * @returns {string} + * The SQL alias, properly escaped for compliance with the PostgreSQL standard for $[SQL Names] and identifiers. + * + * @see + * {@link formatting.name name}, + * {@link formatting.format format} + * + */ + alias(name) { + name = resolveFunc(name); + if (name && typeof name === `string`) { + return name.split(`.`) + .filter(f => f) + .map(a => { + const m = a.match(/^([a-z_][a-z0-9_$]*|[A-Z_][A-Z0-9_$]*)$/); + if (m && m[0] === a) { + return a; + } + return `"${a.replace(/"/g, `""`)}"`; + }).join(`.`); + } + throw new TypeError(`Invalid sql alias: ${npm.utils.toJson(name)}`); + }, + + /** + * @method formatting.value + * @description + * Represents an open value, one to be formatted according to its type, properly escaped, but without surrounding quotes for text types. + * + * When formatting a query, a variable makes use of this method via modifier `:value` or `#`. See method {@link formatting.format format}. + * + * @param {value|function} value + * Value to be converted, or a function that returns the value. + * + * If `value` resolves as `null` or `undefined`, it will throw {@link external:TypeError TypeError} = `Open values cannot be null or undefined.` + * + * @returns {string} + * Formatted and properly escaped string, but without surrounding quotes for text types. + * + * @see {@link formatting.format format} + * + */ + value(value) { + value = resolveFunc(value); + if (isNull(value)) { + throw new TypeError(`Open values cannot be null or undefined.`); + } + return safeText(formatValue({value, fm: fmFlags.raw})); + }, + + /** + * @method formatting.buffer + * @description + * Converts an object of type `Buffer` into a hex string compatible with PostgreSQL type `bytea`. + * + * @param {Buffer|function} obj + * Object to be converted, or a function that returns one. + * + * @param {boolean} [raw=false] + * Indicates when not to wrap the resulting string in quotes. + * + * The generated hex string doesn't need to be escaped. + * + * @returns {string} + */ + buffer(obj, raw) { + obj = resolveFunc(obj); + if (isNull(obj)) { + throwIfRaw(raw); + return `null`; + } + if (obj instanceof Buffer) { + return $to.buffer(obj, raw); + } + throw new TypeError(`${wrapText(obj)} is not a Buffer object.`); + }, + + /** + * @method formatting.bool + * @description + * Converts a truthy value into PostgreSQL boolean presentation. + * + * @param {boolean|function} value + * Value to be converted, or a function that returns the value. + * + * @returns {string} + */ + bool(value) { + value = resolveFunc(value); + if (isNull(value)) { + return `null`; + } + return $to.bool(value); + }, + + /** + * @method formatting.date + * @description + * Converts a `Date`-type value into PostgreSQL date/time presentation, + * wrapped in quotes (unless flag `raw` is set). + * + * @param {Date|function} d + * Date object to be converted, or a function that returns one. + * + * @param {boolean} [raw=false] + * Indicates when not to escape the value. + * + * @returns {string} + */ + date(d, raw) { + d = resolveFunc(d); + if (isNull(d)) { + throwIfRaw(raw); + return `null`; + } + if (d instanceof Date) { + return $to.date(d, raw); + } + throw new TypeError(`${wrapText(d)} is not a Date object.`); + }, + + /** + * @method formatting.number + * @description + * Converts a numeric value into its PostgreSQL number presentation, with support + * for special values of `NaN`, `+Infinity` and `-Infinity`. + * + * @param {number|bigint|function} num + * Number to be converted, or a function that returns one. + * + * @returns {string} + */ + number(num) { + num = resolveFunc(num); + if (isNull(num)) { + return `null`; + } + const t = typeof num; + if (t !== `number` && t !== `bigint`) { + throw new TypeError(`${wrapText(num)} is not a number.`); + } + return $to.number(num); + }, + + /** + * @method formatting.array + * @description + * Converts an array of values into its PostgreSQL presentation as an Array-Type constructor string: `array[]`. + * + * Top-level empty arrays are formatted as literal `{}`, to avoid the necessity of explicit type casting, + * as the server cannot automatically infer type of an empty non-literal array. + * + * @param {Array|function} arr + * Array to be converted, or a function that returns one. + * + * @param {{}} [options] + * Array-Formatting Options. + * + * @param {boolean} [options.capSQL=false] + * When `true`, outputs `ARRAY` instead of `array`. + * + * @returns {string} + */ + array(arr, options) { + options = assertOptions(options, [`capSQL`]); + arr = resolveFunc(arr); + if (isNull(arr)) { + return `null`; + } + if (arr instanceof Array) { + return $to.array(arr, options); + } + throw new TypeError(`${wrapText(arr)} is not an Array object.`); + }, + + /** + * @method formatting.csv + * @description + * Converts a single value or an array of values into a CSV (comma-separated values) string, with all values formatted + * according to their JavaScript type. + * + * When formatting a query, a variable makes use of this method via modifier `:csv` or its alias `:list`. + * + * When `values` is an object that's not `null` or `Array`, its properties are enumerated for the actual values. + * + * @param {Array|Object|value|function} values + * Value(s) to be converted, or a function that returns it. + * + * @returns {string} + * + * @see {@link formatting.format format} + */ + csv(values) { + return $to.csv(values); + }, + + /** + * @method formatting.json + * @description + * Converts any value into JSON (includes `BigInt` support), and returns it as a valid string, + * with single-quote symbols fixed, unless flag `raw` is set. + * + * When formatting a query, a variable makes use of this method via modifier `:json`. See method {@link formatting.format format}. + * + * @param {*} data + * Object/value to be converted, or a function that returns it. + * + * @param {boolean} [raw=false] + * Indicates when not to escape the result. + * + * @returns {string} + * + * @see {@link formatting.format format} + */ + json(data, raw) { + data = resolveFunc(data); + if (isNull(data)) { + throwIfRaw(raw); + return `null`; + } + return $to.json(data, raw); + }, + + /** + * @method formatting.func + * @description + * Calls the function to get the actual value, and then formats the result according to its type + `raw` flag. + * + * @param {function} func + * Function to be called, with support for nesting. + * + * @param {boolean} [raw=false] + * Indicates when not to escape the result. + * + * @param {*} [cc] + * Calling Context: `this` + the only value to be passed into the function on all nested levels. + * + * @returns {string} + */ + func(func, raw, cc) { + if (isNull(func)) { + throwIfRaw(raw); + return `null`; + } + if (typeof func !== `function`) { + throw new TypeError(`${wrapText(func)} is not a function.`); + } + const fm = raw ? fmFlags.raw : null; + return formatValue({value: resolveFunc(func, cc), fm, cc}); + }, + + /** + * @method formatting.format + * @description + * Replaces variables in a string according to the type of `values`: + * + * - Replaces `$1` occurrences when `values` is of type `string`, `boolean`, `number`, `bigint`, `Date`, `Buffer` or when it is `null`. + * + * - Replaces variables `$1`, `$2`, ...`$100000` when `values` is an array of parameters. It throws a {@link external:RangeError RangeError} + * when the values or variables are out of range. + * + * - Replaces `$*propName*`, where `*` is any of `{}`, `()`, `[]`, `<>`, `//`, when `values` is an object that's not a + * `Date`, `Buffer`, {@link QueryFile} or `null`. Special property name `this` refers to the formatting object itself, + * to be injected as a JSON string. When referencing a property that doesn't exist in the formatting object, it throws + * {@link external:Error Error} = `Property 'PropName' doesn't exist`, unless option `partial` is used. + * + * - Supports $[Nested Named Parameters] of any depth. + * + * By default, each variable is automatically formatted according to its type, unless it is a special variable: + * + * - Raw-text variables end with `:raw` or symbol `^`, and prevent escaping the text. Such variables are not + * allowed to be `null` or `undefined`, or the method will throw {@link external:TypeError TypeError} = `Values null/undefined cannot be used as raw text.` + * - `$1:raw`, `$2:raw`,..., and `$*propName:raw*` (see `*` above) + * - `$1^`, `$2^`,..., and `$*propName^*` (see `*` above) + * + * - Open-value variables end with `:value` or symbol `#`, to be escaped, but not wrapped in quotes. Such variables are + * not allowed to be `null` or `undefined`, or the method will throw {@link external:TypeError TypeError} = `Open values cannot be null or undefined.` + * - `$1:value`, `$2:value`,..., and `$*propName:value*` (see `*` above) + * - `$1#`, `$2#`,..., and `$*propName#*` (see `*` above) + * + * - SQL name variables end with `:name` or symbol `~` (tilde), and provide proper escaping for SQL names/identifiers: + * - `$1:name`, `$2:name`,..., and `$*propName:name*` (see `*` above) + * - `$1~`, `$2~`,..., and `$*propName~*` (see `*` above) + * + * - Modifier `:alias` - non-verbose $[SQL Names] escaping. + * + * - JSON override ends with `:json` to format the value of any type as a JSON string + * + * - CSV override ends with `:csv` or `:list` to format an array as a properly escaped comma-separated list of values. + * + * @param {string|QueryFile|object} query + * A query string, a {@link QueryFile} or any object that implements $[Custom Type Formatting], to be formatted according to `values`. + * + * @param {array|object|value} [values] + * Formatting parameter(s) / variable value(s). + * + * @param {{}} [options] + * Formatting Options. + * + * @param {boolean} [options.capSQL=false] + * Formats reserved SQL words capitalized. Presently, this only concerns arrays, to output `ARRAY` when required. + * + * @param {boolean} [options.partial=false] + * Indicates that we intend to do only a partial replacement, i.e. throw no error when encountering a variable or + * property name that's missing within the formatting parameters. + * + * **NOTE:** This option has no meaning when option `def` is used. + * + * @param {*} [options.def] + * Sets default value for every variable that's missing, consequently preventing errors when encountering a variable + * or property name that's missing within the formatting parameters. + * + * It can also be set to a function, to be called with two parameters that depend on the type of formatting being used, + * and to return the actual default value: + * + * - For $[Named Parameters] formatting: + * - `name` - name of the property missing in the formatting object + * - `obj` - the formatting object, and is the same as `this` context + * + * - For $[Index Variables] formatting: + * - `index` - element's index (starts with 1) that's outside of the input array + * - `arr` - the formatting/input array, and is the same as `this` context + * + * You can tell which type of call it is by checking the type of the first parameter. + * + * @returns {string} + * Formatted query string. + * + * The function will throw an error, if any occurs during formatting. + */ + format(query, values, options) { + options = assertOptions(options, [`capSQL`, `partial`, `def`]); + const ctf = getCTF(query); + if (ctf) { + query = ctf.toPostgres.call(query, query); + } + return formatQuery(query, values, false, options); + } +}; + +/* Pre-parsed type formatting */ +const $to = { + array(arr, options) { + return formatArray(arr, options); + }, + csv(values, options) { + return formatCSV(resolveFunc(values), options); + }, + bool(value) { + return value ? `true` : `false`; + }, + buffer(obj, raw) { + const s = `\\x${obj.toString(`hex`)}`; + return raw ? s : wrapText(s); + }, + date(d, raw) { + const s = npm.pgUtils.prepareValue(d); + return raw ? s : wrapText(s); + }, + json(data, raw) { + const s = npm.utils.toJson(data); + return raw ? s : wrapText(safeText(s)); + }, + number(num) { + if (typeof num === `bigint` || Number.isFinite(num)) { + return num.toString(); + } + // Converting NaN/+Infinity/-Infinity according to Postgres documentation: + // http://www.postgresql.org/docs/9.6/static/datatype-numeric.html#DATATYPE-FLOAT + // + // NOTE: strings for 'NaN'/'+Infinity'/'-Infinity' are not case-sensitive. + if (num === Number.POSITIVE_INFINITY) { + return wrapText(`+Infinity`); + } + if (num === Number.NEGATIVE_INFINITY) { + return wrapText(`-Infinity`); + } + return wrapText(`NaN`); + }, + text(value, raw) { + return raw ? value : wrapText(safeText(value)); + } +}; + +module.exports = { + formatQuery, + formatEntity, + resolveFunc, + as: $as +}; + +/** + * @external Error + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error + */ + +/** + * @external TypeError + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError + */ + +/** + * @external RangeError + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError + */ + +/** + * @external Symbol + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol + */ diff --git a/server/node_modules/pg-promise/lib/helpers/README.md b/server/node_modules/pg-promise/lib/helpers/README.md new file mode 100644 index 0000000..46f9f18 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/README.md @@ -0,0 +1,10 @@ +### `helpers` namespace + +This folder contains everything that's available via the [helpers] namespace, after initializing the library: + +```js +const pgp = require('pg-promise')(/*initialization options*/); +const helpers = pgp.helpers; // `helpers` namespace +``` + +[helpers]:http://vitaly-t.github.io/pg-promise/helpers.html diff --git a/server/node_modules/pg-promise/lib/helpers/column-set.js b/server/node_modules/pg-promise/lib/helpers/column-set.js new file mode 100644 index 0000000..302d408 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/column-set.js @@ -0,0 +1,647 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {InnerState} = require(`../inner-state`); +const {assertOptions} = require(`assert-options`); +const {TableName} = require(`./table-name`); +const {Column} = require(`./column`); + +const npm = { + os: require(`os`), + utils: require(`../utils`), + formatting: require(`../formatting`) +}; + +/** + * @class helpers.ColumnSet + * @description + * Performance-optimized, read-only structure with query-formatting columns. + * + * In order to avail from performance optimization provided by this class, it should be created + * only once, statically, and then reused. + * + * @param {object|helpers.Column|array} columns + * Columns information object, depending on the type: + * + * - When it is a simple object, its properties are enumerated to represent both column names and property names + * within the source objects. See also option `inherit` that's applicable in this case. + * + * - When it is a single {@link helpers.Column Column} object, property {@link helpers.ColumnSet#columns columns} is initialized with + * just a single column. It is not a unique situation when only a single column is required for an update operation. + * + * - When it is an array, each element is assumed to represent details for a column. If the element is already of type {@link helpers.Column Column}, + * it is used directly; otherwise the element is passed into {@link helpers.Column Column} constructor for initialization. + * On any duplicate column name (case-sensitive) it will throw {@link external:Error Error} = `Duplicate column name "name".` + * + * - When it is none of the above, it will throw {@link external:TypeError TypeError} = `Invalid parameter 'columns' specified.` + * + * @param {object} [options] + * + * @param {helpers.TableName|string|{table,schema}} [options.table] + * Table details. + * + * When it is a non-null value, and not a {@link helpers.TableName TableName} object, a new {@link helpers.TableName TableName} is constructed from the value. + * + * It can be used as the default for methods {@link helpers.insert insert} and {@link helpers.update update} when their parameter + * `table` is omitted, and for logging purposes. + * + * @param {boolean} [options.inherit = false] + * Use inherited properties in addition to the object's own properties. + * + * By default, only the object's own properties are enumerated for column names. + * + * @returns {helpers.ColumnSet} + * + * @see + * + * {@link helpers.ColumnSet#columns columns}, + * {@link helpers.ColumnSet#names names}, + * {@link helpers.ColumnSet#table table}, + * {@link helpers.ColumnSet#variables variables} | + * {@link helpers.ColumnSet#assign assign}, + * {@link helpers.ColumnSet#assignColumns assignColumns}, + * {@link helpers.ColumnSet#extend extend}, + * {@link helpers.ColumnSet#merge merge}, + * {@link helpers.ColumnSet#prepare prepare} + * + * @example + * + * // A complex insert/update object scenario for table 'purchases' in schema 'fiscal'. + * // For a good performance, you should declare such objects once and then reuse them. + * // + * // Column Requirements: + * // + * // 1. Property 'id' is only to be used for a WHERE condition in updates + * // 2. Property 'list' needs to be formatted as a csv + * // 3. Property 'code' is to be used as raw text, and to be defaulted to 0 when the + * // property is missing in the source object + * // 4. Property 'log' is a JSON object with 'log-entry' for the column name + * // 5. Property 'data' requires SQL type casting '::int[]' + * // 6. Property 'amount' needs to be set to 100, if it is 0 + * // 7. Property 'total' must be skipped during updates, if 'amount' was 0, plus its + * // column name is 'total-val' + * + * const cs = new pgp.helpers.ColumnSet([ + * '?id', // ColumnConfig equivalent: {name: 'id', cnd: true} + * 'list:csv', // ColumnConfig equivalent: {name: 'list', mod: ':csv'} + * { + * name: 'code', + * mod: '^', // format as raw text + * def: 0 // default to 0 when the property doesn't exist + * }, + * { + * name: 'log-entry', + * prop: 'log', + * mod: ':json' // format as JSON + * }, + * { + * name: 'data', + * cast: 'int[]' // use SQL type casting '::int[]' + * }, + * { + * name: 'amount', + * init(col) { + * // set to 100, if the value is 0: + * return col.value === 0 ? 100 : col.value; + * } + * }, + * { + * name: 'total-val', + * prop: 'total', + * skip(col) { + * // skip from updates, if 'amount' is 0: + * return col.source.amount === 0; + * } + * } + * ], {table: {table: 'purchases', schema: 'fiscal'}}); + * + * // Alternatively, you could take the table declaration out: + * // const table = new pgp.helpers.TableName('purchases', 'fiscal'); + * + * console.log(cs); // console output for the object: + * //=> + * // ColumnSet { + * // table: "fiscal"."purchases" + * // columns: [ + * // Column { + * // name: "id" + * // cnd: true + * // } + * // Column { + * // name: "list" + * // mod: ":csv" + * // } + * // Column { + * // name: "code" + * // mod: "^" + * // def: 0 + * // } + * // Column { + * // name: "log-entry" + * // prop: "log" + * // mod: ":json" + * // } + * // Column { + * // name: "data" + * // cast: "int[]" + * // } + * // Column { + * // name: "amount" + * // init: [Function] + * // } + * // Column { + * // name: "total-val" + * // prop: "total" + * // skip: [Function] + * // } + * // ] + * // } + */ +class ColumnSet extends InnerState { + + constructor(columns, opt) { + super(); + + if (!columns || typeof columns !== `object`) { + throw new TypeError(`Invalid parameter 'columns' specified.`); + } + + opt = assertOptions(opt, [`table`, `inherit`]); + + if (!npm.utils.isNull(opt.table)) { + this.table = (opt.table instanceof TableName) ? opt.table : new TableName(opt.table); + } + + /** + * @name helpers.ColumnSet#table + * @type {helpers.TableName} + * @readonly + * @description + * Destination table. It can be specified for two purposes: + * + * - **primary:** to be used as the default table when it is omitted during a call into methods {@link helpers.insert insert} and {@link helpers.update update} + * - **secondary:** to be automatically written into the console (for logging purposes). + */ + + + /** + * @name helpers.ColumnSet#columns + * @type helpers.Column[] + * @readonly + * @description + * Array of {@link helpers.Column Column} objects. + */ + if (Array.isArray(columns)) { + const colNames = {}; + this.columns = columns.map(c => { + const col = (c instanceof Column) ? c : new Column(c); + if (col.name in colNames) { + throw new Error(`Duplicate column name "${col.name}".`); + } + colNames[col.name] = true; + return col; + }); + } else { + if (columns instanceof Column) { + this.columns = [columns]; + } else { + this.columns = []; + for (const name in columns) { + if (opt.inherit || Object.prototype.hasOwnProperty.call(columns, name)) { + this.columns.push(new Column(name)); + } + } + } + } + + Object.freeze(this.columns); + Object.freeze(this); + + this.extendState({ + names: undefined, + variables: undefined, + updates: undefined, + isSimple: true + }); + + for (let i = 0; i < this.columns.length; i++) { + const c = this.columns[i]; + // ColumnSet is simple when the source objects require no preparation, + // and should be used directly: + if (c.prop || c.init || `def` in c) { + this._inner.isSimple = false; + break; + } + } + } + + /** + * @name helpers.ColumnSet#names + * @type string + * @readonly + * @description + * Returns a string - comma-separated list of all column names, properly escaped. + * + * @example + * const cs = new ColumnSet(['id^', {name: 'cells', cast: 'int[]'}, 'doc:json']); + * console.log(cs.names); + * //=> "id","cells","doc" + */ + get names() { + const _i = this._inner; + if (!_i.names) { + _i.names = this.columns.map(c => c.escapedName).join(); + } + return _i.names; + } + + /** + * @name helpers.ColumnSet#variables + * @type string + * @readonly + * @description + * Returns a string - formatting template for all column values. + * + * @see {@link helpers.ColumnSet#assign assign} + * + * @example + * const cs = new ColumnSet(['id^', {name: 'cells', cast: 'int[]'}, 'doc:json']); + * console.log(cs.variables); + * //=> ${id^},${cells}::int[],${doc:json} + */ + get variables() { + const _i = this._inner; + if (!_i.variables) { + _i.variables = this.columns.map(c => c.variable + c.castText).join(); + } + return _i.variables; + } + +} + +/** + * @method helpers.ColumnSet#assign + * @description + * Returns a formatting template of SET assignments, either generic or for a single object. + * + * The method is optimized to cache the output string when there are no columns that can be skipped dynamically. + * + * This method is primarily for internal use, that's why it does not validate the input. + * + * @param {object} [options] + * Assignment/formatting options. + * + * @param {object} [options.source] + * Source - a single object that contains values for columns. + * + * The object is only necessary to correctly apply the logic of skipping columns dynamically, based on the source data + * and the rules defined in the {@link helpers.ColumnSet ColumnSet}. If, however, you do not care about that, then you do not need to specify any object. + * + * Note that even if you do not specify the object, the columns marked as conditional (`cnd: true`) will always be skipped. + * + * @param {string} [options.prefix] + * In cases where needed, an alias prefix to be added before each column. + * + * @returns {string} + * Comma-separated list of variable-to-column assignments. + * + * @see {@link helpers.ColumnSet#variables variables} + * + * @example + * + * const cs = new pgp.helpers.ColumnSet([ + * '?first', // = {name: 'first', cnd: true} + * 'second:json', + * {name: 'third', mod: ':raw', cast: 'text'} + * ]); + * + * cs.assign(); + * //=> "second"=${second:json},"third"=${third:raw}::text + * + * cs.assign({prefix: 'a b c'}); + * //=> "a b c"."second"=${second:json},"a b c"."third"=${third:raw}::text + */ +ColumnSet.prototype.assign = function (options) { + const _i = this._inner; + const hasPrefix = options && options.prefix && typeof options.prefix === `string`; + if (_i.updates && !hasPrefix) { + return _i.updates; + } + let dynamic = hasPrefix; + const hasSource = options && options.source && typeof options.source === `object`; + let list = this.columns.filter(c => { + if (c.cnd) { + return false; + } + if (c.skip) { + dynamic = true; + if (hasSource) { + const a = colDesc(c, options.source); + if (c.skip.call(options.source, a)) { + return false; + } + } + } + return true; + }); + + const prefix = hasPrefix ? npm.formatting.as.alias(options.prefix) + `.` : ``; + list = list.map(c => prefix + c.escapedName + `=` + c.variable + c.castText).join(); + + if (!dynamic) { + _i.updates = list; + } + return list; +}; + +/** + * @method helpers.ColumnSet#assignColumns + * @description + * Generates assignments for all columns in the set, with support for aliases and column-skipping logic. + * Aliases are set by using method {@link formatting.alias as.alias}. + * + * @param {{}} [options] + * Optional Parameters. + * + * @param {string} [options.from] + * Alias for the source columns. + * + * @param {string} [options.to] + * Alias for the destination columns. + * + * @param {string | Array | function} [options.skip] + * Name(s) of the column(s) to be skipped (case-sensitive). It can be either a single string or an array of strings. + * + * It can also be a function - iterator, to be called for every column, passing in {@link helpers.Column Column} as + * `this` context, and plus as a single parameter. The function would return a truthy value for every column that needs to be skipped. + * + * @returns {string} + * A string of comma-separated column assignments. + * + * @example + * + * const cs = new pgp.helpers.ColumnSet(['id', 'city', 'street']); + * + * cs.assignColumns({from: 'EXCLUDED', skip: 'id'}) + * //=> "city"=EXCLUDED."city","street"=EXCLUDED."street" + * + * @example + * + * const cs = new pgp.helpers.ColumnSet(['?id', 'city', 'street']); + * + * cs.assignColumns({from: 'source', to: 'target', skip: c => c.cnd}) + * //=> target."city"=source."city",target."street"=source."street" + * + */ +ColumnSet.prototype.assignColumns = function (options) { + options = assertOptions(options, [`from`, `to`, `skip`]); + const skip = (typeof options.skip === `string` && [options.skip]) || ((Array.isArray(options.skip) || typeof options.skip === `function`) && options.skip); + const from = (typeof options.from === `string` && options.from && (npm.formatting.as.alias(options.from) + `.`)) || ``; + const to = (typeof options.to === `string` && options.to && (npm.formatting.as.alias(options.to) + `.`)) || ``; + const iterator = typeof skip === `function` ? c => !skip.call(c, c) : c => skip.indexOf(c.name) === -1; + const cols = skip ? this.columns.filter(iterator) : this.columns; + return cols.map(c => to + c.escapedName + `=` + from + c.escapedName).join(); +}; + +/** + * @method helpers.ColumnSet#extend + * @description + * Creates a new {@link helpers.ColumnSet ColumnSet}, by joining the two sets of columns. + * + * If the two sets contain a column with the same `name` (case-sensitive), an error is thrown. + * + * @param {helpers.Column|helpers.ColumnSet|array} columns + * Columns to be appended, of the same type as parameter `columns` during {@link helpers.ColumnSet ColumnSet} construction, except: + * - it can also be of type {@link helpers.ColumnSet ColumnSet} + * - it cannot be a simple object (properties enumeration is not supported here) + * + * @returns {helpers.ColumnSet} + * New {@link helpers.ColumnSet ColumnSet} object with the extended/concatenated list of columns. + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet#merge merge} + * + * @example + * + * const pgp = require('pg-promise')(); + * + * const cs = new pgp.helpers.ColumnSet(['one', 'two'], {table: 'my-table'}); + * console.log(cs); + * //=> + * // ColumnSet { + * // table: "my-table" + * // columns: [ + * // Column { + * // name: "one" + * // } + * // Column { + * // name: "two" + * // } + * // ] + * // } + * const csExtended = cs.extend(['three']); + * console.log(csExtended); + * //=> + * // ColumnSet { + * // table: "my-table" + * // columns: [ + * // Column { + * // name: "one" + * // } + * // Column { + * // name: "two" + * // } + * // Column { + * // name: "three" + * // } + * // ] + * // } + */ +ColumnSet.prototype.extend = function (columns) { + let cs = columns; + if (!(cs instanceof ColumnSet)) { + cs = new ColumnSet(columns); + } + // Any duplicate column will throw Error = 'Duplicate column name "name".', + return new ColumnSet(this.columns.concat(cs.columns), {table: this.table}); +}; + +/** + * @method helpers.ColumnSet#merge + * @description + * Creates a new {@link helpers.ColumnSet ColumnSet}, by joining the two sets of columns. + * + * Items in `columns` with the same `name` (case-sensitive) override the original columns. + * + * @param {helpers.Column|helpers.ColumnSet|array} columns + * Columns to be appended, of the same type as parameter `columns` during {@link helpers.ColumnSet ColumnSet} construction, except: + * - it can also be of type {@link helpers.ColumnSet ColumnSet} + * - it cannot be a simple object (properties enumeration is not supported here) + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet#extend extend} + * + * @returns {helpers.ColumnSet} + * New {@link helpers.ColumnSet ColumnSet} object with the merged list of columns. + * + * @example + * + * const pgp = require('pg-promise')(); + * + * const cs = new pgp.helpers.ColumnSet(['?one', 'two:json'], {table: 'my-table'}); + * console.log(cs); + * //=> + * // ColumnSet { + * // table: "my-table" + * // columns: [ + * // Column { + * // name: "one" + * // cnd: true + * // } + * // Column { + * // name: "two" + * // mod: ":json" + * // } + * // ] + * // } + * const csMerged = cs.merge(['two', 'three^']); + * console.log(csMerged); + * //=> + * // ColumnSet { + * // table: "my-table" + * // columns: [ + * // Column { + * // name: "one" + * // cnd: true + * // } + * // Column { + * // name: "two" + * // } + * // Column { + * // name: "three" + * // mod: "^" + * // } + * // ] + * // } + * + */ +ColumnSet.prototype.merge = function (columns) { + let cs = columns; + if (!(cs instanceof ColumnSet)) { + cs = new ColumnSet(columns); + } + const colNames = {}, cols = []; + this.columns.forEach((c, idx) => { + cols.push(c); + colNames[c.name] = idx; + }); + cs.columns.forEach(c => { + if (c.name in colNames) { + cols[colNames[c.name]] = c; + } else { + cols.push(c); + } + }); + return new ColumnSet(cols, {table: this.table}); +}; + +/** + * @method helpers.ColumnSet#prepare + * @description + * Prepares a source object to be formatted, by cloning it and applying the rules as set by the + * columns configuration. + * + * This method is primarily for internal use, that's why it does not validate the input parameters. + * + * @param {object} source + * The source object to be prepared, if required. + * + * It must be a non-`null` object, which the method does not validate, as it is + * intended primarily for internal use by the library. + * + * @returns {object} + * When the object needs to be prepared, the method returns a clone of the source object, + * with all properties and values set according to the columns configuration. + * + * When the object does not need to be prepared, the original object is returned. + */ +ColumnSet.prototype.prepare = function (source) { + if (this._inner.isSimple) { + return source; // a simple ColumnSet requires no object preparation; + } + const target = {}; + this.columns.forEach(c => { + const a = colDesc(c, source); + if (c.init) { + target[a.name] = c.init.call(source, a); + } else { + if (a.exists || `def` in c) { + target[a.name] = a.value; + } + } + }); + return target; +}; + +function colDesc(column, source) { + const a = { + source, + name: column.prop || column.name + }; + a.exists = a.name in source; + if (a.exists) { + a.value = source[a.name]; + } else { + a.value = `def` in column ? column.def : undefined; + } + return a; +} + +/** + * @method helpers.ColumnSet#toString + * @description + * Creates a well-formatted multi-line string that represents the object. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +ColumnSet.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + `ColumnSet {` + ]; + if (this.table) { + lines.push(gap1 + `table: ` + this.table); + } + if (this.columns.length) { + lines.push(gap1 + `columns: [`); + this.columns.forEach(c => { + lines.push(c.toString(2)); + }); + lines.push(gap1 + `]`); + } else { + lines.push(gap1 + `columns: []`); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(ColumnSet, function () { + return this.toString(); +}); + +module.exports = {ColumnSet}; diff --git a/server/node_modules/pg-promise/lib/helpers/column.js b/server/node_modules/pg-promise/lib/helpers/column.js new file mode 100644 index 0000000..bee6e08 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/column.js @@ -0,0 +1,455 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {InnerState} = require(`../inner-state`); +const {assertOptions} = require(`assert-options`); + +const npm = { + os: require(`os`), + utils: require(`../utils`), + formatting: require(`../formatting`), + patterns: require(`../patterns`) +}; + +/** + * + * @class helpers.Column + * @description + * + * Read-only structure with details for a single column. Used primarily by {@link helpers.ColumnSet ColumnSet}. + * + * The class parses details into a template, to be used for query generation. + * + * @param {string|helpers.ColumnConfig} col + * Column details, depending on the type. + * + * When it is a string, it is expected to contain a name for both the column and the source property, assuming that the two are the same. + * The name must adhere to JavaScript syntax for variable names. The name can be appended with any format modifier as supported by + * {@link formatting.format as.format} (`^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`), which is then removed from the name and put + * into property `mod`. If the name starts with `?`, it is removed, while setting flag `cnd` = `true`. + * + * If the string doesn't adhere to the above requirements, the method will throw {@link external:TypeError TypeError} = `Invalid column syntax`. + * + * When `col` is a simple {@link helpers.ColumnConfig ColumnConfig}-like object, it is used as an input configurator to set all the properties + * of the class. + * + * @property {string} name + * Destination column name + source property name (if `prop` is skipped). The name must adhere to JavaScript syntax for variables, + * unless `prop` is specified, in which case `name` represents only the column name, and therefore can be any non-empty string. + * + * @property {string} [prop] + * Source property name, if different from the column's name. It must adhere to JavaScript syntax for variables. + * + * It is ignored when it is the same as `name`. + * + * @property {string} [mod] + * Formatting modifier, as supported by method {@link formatting.format as.format}: `^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`. + * + * @property {string} [cast] + * Server-side type casting, without `::` in front. + * + * @property {boolean} [cnd] + * Conditional column flag. + * + * Used by methods {@link helpers.update update} and {@link helpers.sets sets}, ignored by methods {@link helpers.insert insert} and + * {@link helpers.values values}. It indicates that the column is reserved for a `WHERE` condition, not to be set or updated. + * + * It can be set from a string initialization, by adding `?` in front of the name. + * + * @property {*} [def] + * Default value for the property, to be used only when the source object doesn't have the property. + * It is ignored when property `init` is set. + * + * @property {helpers.initCB} [init] + * Override callback for the value. + * + * @property {helpers.skipCB} [skip] + * An override for skipping columns dynamically. + * + * Used by methods {@link helpers.update update} (for a single object) and {@link helpers.sets sets}, ignored by methods + * {@link helpers.insert insert} and {@link helpers.values values}. + * + * It is also ignored when conditional flag `cnd` is set. + * + * @returns {helpers.Column} + * + * @see + * {@link helpers.ColumnConfig ColumnConfig}, + * {@link helpers.Column#castText castText}, + * {@link helpers.Column#escapedName escapedName}, + * {@link helpers.Column#variable variable} + * + * @example + * + * const pgp = require('pg-promise')({ + * capSQL: true // if you want all generated SQL capitalized + * }); + * + * const Column = pgp.helpers.Column; + * + * // creating a column from just a name: + * const col1 = new Column('colName'); + * console.log(col1); + * //=> + * // Column { + * // name: "colName" + * // } + * + * // creating a column from a name + modifier: + * const col2 = new Column('colName:csv'); + * console.log(col2); + * //=> + * // Column { + * // name: "colName" + * // mod: ":csv" + * // } + * + * // creating a column from a configurator: + * const col3 = new Column({ + * name: 'colName', // required + * prop: 'propName', // optional + * mod: '^', // optional + * def: 123 // optional + * }); + * console.log(col3); + * //=> + * // Column { + * // name: "colName" + * // prop: "propName" + * // mod: "^" + * // def: 123 + * // } + * + */ +class Column extends InnerState { + + constructor(col) { + super(); + + if (typeof col === `string`) { + const info = parseColumn(col); + this.name = info.name; + if (`mod` in info) { + this.mod = info.mod; + } + if (`cnd` in info) { + this.cnd = info.cnd; + } + } else { + col = assertOptions(col, [`name`, `prop`, `mod`, `cast`, `cnd`, `def`, `init`, `skip`]); + if (`name` in col) { + if (!npm.utils.isText(col.name)) { + throw new TypeError(`Invalid 'name' value: ${npm.utils.toJson(col.name)}. A non-empty string was expected.`); + } + if (npm.utils.isNull(col.prop) && !isValidVariable(col.name)) { + throw new TypeError(`Invalid 'name' syntax: ${npm.utils.toJson(col.name)}.`); + } + this.name = col.name; // column name + property name (if 'prop' isn't specified) + + if (!npm.utils.isNull(col.prop)) { + if (!npm.utils.isText(col.prop)) { + throw new TypeError(`Invalid 'prop' value: ${npm.utils.toJson(col.prop)}. A non-empty string was expected.`); + } + if (!isValidVariable(col.prop)) { + throw new TypeError(`Invalid 'prop' syntax: ${npm.utils.toJson(col.prop)}.`); + } + if (col.prop !== col.name) { + // optional property name, if different from the column's name; + this.prop = col.prop; + } + } + if (!npm.utils.isNull(col.mod)) { + if (typeof col.mod !== `string` || !isValidMod(col.mod)) { + throw new TypeError(`Invalid 'mod' value: ${npm.utils.toJson(col.mod)}.`); + } + this.mod = col.mod; // optional format modifier; + } + if (!npm.utils.isNull(col.cast)) { + this.cast = parseCast(col.cast); // optional SQL type casting + } + if (`cnd` in col) { + this.cnd = !!col.cnd; + } + if (`def` in col) { + this.def = col.def; // optional default + } + if (typeof col.init === `function`) { + this.init = col.init; // optional value override (overrides 'def' also) + } + if (typeof col.skip === `function`) { + this.skip = col.skip; + } + } else { + throw new TypeError(`Invalid column details.`); + } + } + + const variable = `\${` + (this.prop || this.name) + (this.mod || ``) + `}`; + const castText = this.cast ? (`::` + this.cast) : ``; + const escapedName = npm.formatting.as.name(this.name); + + this.extendState({variable, castText, escapedName}); + Object.freeze(this); + } + + /** + * @name helpers.Column#variable + * @type string + * @readonly + * @description + * Full-syntax formatting variable, ready for direct use in query templates. + * + * @example + * + * const cs = new pgp.helpers.ColumnSet([ + * 'id', + * 'coordinate:json', + * { + * name: 'places', + * mod: ':csv', + * cast: 'int[]' + * } + * ]); + * + * // cs.columns[0].variable = ${id} + * // cs.columns[1].variable = ${coordinate:json} + * // cs.columns[2].variable = ${places:csv}::int[] + */ + get variable() { + return this._inner.variable; + } + + /** + * @name helpers.Column#castText + * @type string + * @readonly + * @description + * Full-syntax sql type casting, if there is any, or else an empty string. + */ + get castText() { + return this._inner.castText; + } + + /** + * @name helpers.Column#escapedName + * @type string + * @readonly + * @description + * Escaped name of the column, ready to be injected into queries directly. + * + */ + get escapedName() { + return this._inner.escapedName; + } + +} + +function parseCast(name) { + if (typeof name === `string`) { + const s = name.replace(/^[:\s]*|\s*$/g, ``); + if (s) { + return s; + } + } + throw new TypeError(`Invalid 'cast' value: ${npm.utils.toJson(name)}.`); +} + +function parseColumn(name) { + const m = name.match(npm.patterns.validColumn); + if (m && m[0] === name) { + const res = {}; + if (name[0] === `?`) { + res.cnd = true; + name = name.substr(1); + } + const mod = name.match(npm.patterns.hasValidModifier); + if (mod) { + res.name = name.substr(0, mod.index); + res.mod = mod[0]; + } else { + res.name = name; + } + return res; + } + throw new TypeError(`Invalid column syntax: ${npm.utils.toJson(name)}.`); +} + +function isValidMod(mod) { + return npm.patterns.validModifiers.indexOf(mod) !== -1; +} + +function isValidVariable(name) { + const m = name.match(npm.patterns.validVariable); + return !!m && m[0] === name; +} + +/** + * @method helpers.Column#toString + * @description + * Creates a well-formatted multi-line string that represents the object. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +Column.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + gap0 + `Column {`, + gap1 + `name: ` + npm.utils.toJson(this.name) + ]; + if (`prop` in this) { + lines.push(gap1 + `prop: ` + npm.utils.toJson(this.prop)); + } + if (`mod` in this) { + lines.push(gap1 + `mod: ` + npm.utils.toJson(this.mod)); + } + if (`cast` in this) { + lines.push(gap1 + `cast: ` + npm.utils.toJson(this.cast)); + } + if (`cnd` in this) { + lines.push(gap1 + `cnd: ` + npm.utils.toJson(this.cnd)); + } + if (`def` in this) { + lines.push(gap1 + `def: ` + npm.utils.toJson(this.def)); + } + if (`init` in this) { + lines.push(gap1 + `init: [Function]`); + } + if (`skip` in this) { + lines.push(gap1 + `skip: [Function]`); + } + lines.push(gap0 + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(Column, function () { + return this.toString(); +}); + +/** + * @typedef helpers.ColumnConfig + * @description + * A simple structure with column details, to be passed into the {@link helpers.Column Column} constructor for initialization. + * + * @property {string} name + * Destination column name + source property name (if `prop` is skipped). The name must adhere to JavaScript syntax for variables, + * unless `prop` is specified, in which case `name` represents only the column name, and therefore can be any non-empty string. + * + * @property {string} [prop] + * Source property name, if different from the column's name. It must adhere to JavaScript syntax for variables. + * + * It is ignored when it is the same as `name`. + * + * @property {string} [mod] + * Formatting modifier, as supported by method {@link formatting.format as.format}: `^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`. + * + * @property {string} [cast] + * Server-side type casting. Leading `::` is allowed, but not needed (automatically removed when specified). + * + * @property {boolean} [cnd] + * Conditional column flag. + * + * Used by methods {@link helpers.update update} and {@link helpers.sets sets}, ignored by methods {@link helpers.insert insert} and + * {@link helpers.values values}. It indicates that the column is reserved for a `WHERE` condition, not to be set or updated. + * + * It can be set from a string initialization, by adding `?` in front of the name. + * + * @property {*} [def] + * Default value for the property, to be used only when the source object doesn't have the property. + * It is ignored when property `init` is set. + * + * @property {helpers.initCB} [init] + * Override callback for the value. + * + * @property {helpers.skipCB} [skip] + * An override for skipping columns dynamically. + * + * Used by methods {@link helpers.update update} (for a single object) and {@link helpers.sets sets}, ignored by methods + * {@link helpers.insert insert} and {@link helpers.values values}. + * + * It is also ignored when conditional flag `cnd` is set. + * + */ + +/** + * @callback helpers.initCB + * @description + * A callback function type used by parameter `init` within {@link helpers.ColumnConfig ColumnConfig}. + * + * It works as an override for the corresponding property value in the `source` object. + * + * The function is called with `this` set to the `source` object. + * + * @param {*} col + * Column-to-property descriptor. + * + * @param {object} col.source + * The source object, equals to `this` that's passed into the function. + * + * @param {string} col.name + * Resolved name of the property within the `source` object, i.e. the value of `name` when `prop` is not used + * for the column, or the value of `prop` when it is specified. + * + * @param {*} col.value + * + * Property value, set to one of the following: + * + * - Value of the property within the `source` object (`value` = `source[name]`), if the property exists + * - If the property doesn't exist and `def` is set in the column, then `value` is set to the value of `def` + * - If the property doesn't exist and `def` is not set in the column, then `value` is set to `undefined` + * + * @param {boolean} col.exists + * Indicates whether the property exists in the `source` object (`exists = name in source`). + * + * @returns {*} + * The new value to be used for the corresponding column. + */ + +/** + * @callback helpers.skipCB + * @description + * A callback function type used by parameter `skip` within {@link helpers.ColumnConfig ColumnConfig}. + * + * It is to dynamically determine when the property with specified `name` in the `source` object is to be skipped. + * + * The function is called with `this` set to the `source` object. + * + * @param {*} col + * Column-to-property descriptor. + * + * @param {object} col.source + * The source object, equals to `this` that's passed into the function. + * + * @param {string} col.name + * Resolved name of the property within the `source` object, i.e. the value of `name` when `prop` is not used + * for the column, or the value of `prop` when it is specified. + * + * @param {*} col.value + * + * Property value, set to one of the following: + * + * - Value of the property within the `source` object (`value` = `source[name]`), if the property exists + * - If the property doesn't exist and `def` is set in the column, then `value` is set to the value of `def` + * - If the property doesn't exist and `def` is not set in the column, then `value` is set to `undefined` + * + * @param {boolean} col.exists + * Indicates whether the property exists in the `source` object (`exists = name in source`). + * + * @returns {boolean} + * A truthy value that indicates whether the column is to be skipped. + * + */ + +module.exports = {Column}; diff --git a/server/node_modules/pg-promise/lib/helpers/index.js b/server/node_modules/pg-promise/lib/helpers/index.js new file mode 100644 index 0000000..757b5b8 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/index.js @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Column} = require(`./column`); +const {ColumnSet} = require(`./column-set`); +const {TableName} = require(`./table-name`); +const method = require(`./methods`); +const utils = require(`../utils`); + +/** + * @namespace helpers + * @description + * Namespace for query-formatting generators, available as {@link module:pg-promise~helpers pgp.helpers}, after initializing the library. + * + * It unifies the approach to generating multi-row `INSERT` / `UPDATE` queries with the single-row ones. + * + * See also: $[Performance Boost]. + * + * @property {function} TableName + * {@link helpers.TableName TableName} class constructor. + * + * @property {function} ColumnSet + * {@link helpers.ColumnSet ColumnSet} class constructor. + * + * @property {function} Column + * {@link helpers.Column Column} class constructor. + * + * @property {function} insert + * {@link helpers.insert insert} static method. + * + * @property {function} update + * {@link helpers.update update} static method. + * + * @property {function} values + * {@link helpers.values values} static method. + * + * @property {function} sets + * {@link helpers.sets sets} static method. + * + * @property {function} concat + * {@link helpers.concat concat} static method. + */ +module.exports = config => { + const capSQL = () => config.options && config.options.capSQL; + const res = { + insert(data, columns, table) { + return method.insert(data, columns, table, capSQL()); + }, + update(data, columns, table, options) { + return method.update(data, columns, table, options, capSQL()); + }, + concat(queries) { + return method.concat(queries, capSQL()); + }, + values(data, columns) { + return method.values(data, columns, capSQL()); + }, + sets(data, columns) { + return method.sets(data, columns, capSQL()); + }, + TableName, + ColumnSet, + Column + }; + utils.lock(res, true, config.options); + return res; +}; diff --git a/server/node_modules/pg-promise/lib/helpers/methods/concat.js b/server/node_modules/pg-promise/lib/helpers/methods/concat.js new file mode 100644 index 0000000..caa84e5 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/concat.js @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {QueryFile} = require(`../../query-file`); + +const npm = { + formatting: require(`../../formatting`) +}; + +/** + * @method helpers.concat + * @description + * Formats and concatenates multiple queries into a single query string. + * + * Before joining the queries, the method does the following: + * - Formats each query, if `values` are provided; + * - Removes all leading and trailing spaces, tabs and semi-colons; + * - Automatically skips all empty queries. + * + * @param {array} queries + * Array of mixed-type elements: + * - a simple query string, to be used as is + * - a {@link helpers.QueryFormat QueryFormat}-like object = `{query, [values], [options]}` + * - a {@link QueryFile} object + * + * @returns {string} + * Concatenated string with all queries. + * + * @example + * + * const pgp = require('pg-promise')(); + * + * const qf1 = new pgp.QueryFile('./query1.sql', {minify: true}); + * const qf2 = new pgp.QueryFile('./query2.sql', {minify: true}); + * + * const query = pgp.helpers.concat([ + * {query: 'INSERT INTO Users(name, age) VALUES($1, $2)', values: ['John', 23]}, // QueryFormat-like object + * {query: qf1, values: [1, 'Name']}, // QueryFile with formatting parameters + * 'SELECT count(*) FROM Users', // a simple-string query, + * qf2 // direct QueryFile object + * ]); + * + * // query = concatenated string with all the queries + */ +function concat(queries, capSQL) { + if (!Array.isArray(queries)) { + throw new TypeError(`Parameter 'queries' must be an array.`); + } + const fmOptions = {capSQL}; + const all = queries.map((q, index) => { + if (typeof q === `string`) { + // a simple query string without parameters: + return clean(q); + } + if (q && typeof q === `object`) { + if (q instanceof QueryFile) { + // QueryFile object: + return clean(q[npm.formatting.as.ctf.toPostgres]()); + } + if (`query` in q) { + // object {query, values, options}: + let opt = q.options && typeof q.options === `object` ? q.options : {}; + opt = opt.capSQL === undefined ? Object.assign(opt, fmOptions) : opt; + return clean(npm.formatting.as.format(q.query, q.values, opt)); + } + } + throw new Error(`Invalid query element at index ${index}.`); + }); + + return all.filter(q => q).join(`;`); +} + +function clean(q) { + // removes from the query all leading and trailing symbols ' ', '\t' and ';' + return q.replace(/^[\s;]*|[\s;]*$/g, ``); +} + +module.exports = {concat}; + +/** + * @typedef helpers.QueryFormat + * @description + * A simple structure of parameters to be passed into method {@link formatting.format as.format} exactly as they are, + * used by {@link helpers.concat}. + * + * @property {string|value|object} query + * A query string or a value/object that implements $[Custom Type Formatting], to be formatted according to `values`. + * + * @property {array|object|value} [values] + * Query-formatting values. + * + * @property {object} [options] + * Query-formatting options, as supported by method {@link formatting.format as.format}. + * + * @see + * {@link formatting.format as.format} + */ diff --git a/server/node_modules/pg-promise/lib/helpers/methods/index.js b/server/node_modules/pg-promise/lib/helpers/methods/index.js new file mode 100644 index 0000000..5a12d04 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/index.js @@ -0,0 +1,13 @@ +const {concat} = require(`./concat`); +const {insert} = require(`./insert`); +const {update} = require(`./update`); +const {values} = require(`./values`); +const {sets} = require(`./sets`); + +module.exports = { + concat, + insert, + update, + values, + sets +}; diff --git a/server/node_modules/pg-promise/lib/helpers/methods/insert.js b/server/node_modules/pg-promise/lib/helpers/methods/insert.js new file mode 100644 index 0000000..17ecfa2 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/insert.js @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {TableName} = require(`../table-name`); +const {ColumnSet} = require(`../column-set`); + +const npm = { + formatting: require(`../../formatting`), + utils: require(`../../utils`) +}; + +/** + * @method helpers.insert + * @description + * Generates an `INSERT` query for either one object or an array of objects. + * + * @param {object|object[]} data + * An insert object with properties for insert values, or an array of such objects. + * + * When `data` is not a non-null object and not an array, it will throw {@link external:TypeError TypeError} = `Invalid parameter 'data' specified.` + * + * When `data` is an empty array, it will throw {@link external:TypeError TypeError} = `Cannot generate an INSERT from an empty array.` + * + * When `data` is an array that contains a non-object value, the method will throw {@link external:Error Error} = + * `Invalid insert object at index N.` + * + * @param {array|helpers.Column|helpers.ColumnSet} [columns] + * Set of columns to be inserted. + * + * It is optional when `data` is a single object, and required when `data` is an array of objects. If not specified for an array + * of objects, the method will throw {@link external:TypeError TypeError} = `Parameter 'columns' is required when inserting multiple records.` + * + * When `columns` is not a {@link helpers.ColumnSet ColumnSet} object, a temporary {@link helpers.ColumnSet ColumnSet} + * is created - from the value of `columns` (if it was specified), or from the value of `data` (if it is not an array). + * + * When the final {@link helpers.ColumnSet ColumnSet} is empty (no columns in it), the method will throw + * {@link external:Error Error} = `Cannot generate an INSERT without any columns.` + * + * @param {helpers.TableName|string|{table,schema}} [table] + * Destination table. + * + * It is normally a required parameter. But when `columns` is passed in as a {@link helpers.ColumnSet ColumnSet} object + * with `table` set in it, that will be used when this parameter isn't specified. When neither is available, the method + * will throw {@link external:Error Error} = `Table name is unknown.` + * + * @returns {string} + * An `INSERT` query string. + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet ColumnSet}, + * {@link helpers.TableName TableName} + * + * @example + * + * const pgp = require('pg-promise')({ + * capSQL: true // if you want all generated SQL capitalized + * }); + * + * const dataSingle = {val: 123, msg: 'hello'}; + * const dataMulti = [{val: 123, msg: 'hello'}, {val: 456, msg: 'world!'}]; + * + * // Column details can be taken from the data object: + * + * pgp.helpers.insert(dataSingle, null, 'my-table'); + * //=> INSERT INTO "my-table"("val","msg") VALUES(123,'hello') + * + * @example + * + * // Column details are required for a multi-row `INSERT`: + * + * pgp.helpers.insert(dataMulti, ['val', 'msg'], 'my-table'); + * //=> INSERT INTO "my-table"("val","msg") VALUES(123,'hello'),(456,'world!') + * + * @example + * + * // Column details from a reusable ColumnSet (recommended for performance): + * + * const cs = new pgp.helpers.ColumnSet(['val', 'msg'], {table: 'my-table'}); + * + * pgp.helpers.insert(dataMulti, cs); + * //=> INSERT INTO "my-table"("val","msg") VALUES(123,'hello'),(456,'world!') + * + */ +function insert(data, columns, table, capSQL) { + + if (!data || typeof data !== `object`) { + throw new TypeError(`Invalid parameter 'data' specified.`); + } + + const isArray = Array.isArray(data); + + if (isArray && !data.length) { + throw new TypeError(`Cannot generate an INSERT from an empty array.`); + } + + if (columns instanceof ColumnSet) { + if (npm.utils.isNull(table)) { + table = columns.table; + } + } else { + if (isArray && npm.utils.isNull(columns)) { + throw new TypeError(`Parameter 'columns' is required when inserting multiple records.`); + } + columns = new ColumnSet(columns || data); + } + + if (!columns.columns.length) { + throw new Error(`Cannot generate an INSERT without any columns.`); + } + + if (!table) { + throw new Error(`Table name is unknown.`); + } + + if (!(table instanceof TableName)) { + table = new TableName(table); + } + + let query = capSQL ? sql.capCase : sql.lowCase; + const fmOptions = {capSQL}; + + const format = npm.formatting.as.format; + query = format(query, [table.name, columns.names], fmOptions); + + if (isArray) { + return query + data.map((d, index) => { + if (!d || typeof d !== `object`) { + throw new Error(`Invalid insert object at index ${index}.`); + } + return `(` + format(columns.variables, columns.prepare(d), fmOptions) + `)`; + }).join(); + } + return query + `(` + format(columns.variables, columns.prepare(data), fmOptions) + `)`; +} + +const sql = { + lowCase: `insert into $1^($2^) values`, + capCase: `INSERT INTO $1^($2^) VALUES` +}; + +module.exports = {insert}; diff --git a/server/node_modules/pg-promise/lib/helpers/methods/sets.js b/server/node_modules/pg-promise/lib/helpers/methods/sets.js new file mode 100644 index 0000000..4815a4e --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/sets.js @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ColumnSet} = require(`../column-set`); + +const npm = { + format: require(`../../formatting`).as.format, + utils: require(`../../utils`) +}; + +/** + * @method helpers.sets + * @description + * Generates a string of comma-separated value-set statements from a single object: `col1=val1, col2=val2, ...`, + * to be used as part of a query. + * + * Since it is to be used as part of `UPDATE` queries, {@link helpers.Column Column} properties `cnd` and `skip` apply. + * + * @param {object} data + * A simple, non-null and non-array source object. + * + * If it is anything else, the method will throw {@link external:TypeError TypeError} = `Invalid parameter 'data' specified.` + * + * @param {array|helpers.Column|helpers.ColumnSet} [columns] + * Columns for which to set values. + * + * When not specified, properties of the `data` object are used. + * + * When no effective columns are found, an empty string is returned. + * + * @returns {string} + * - comma-separated value-set statements for the `data` object + * - an empty string, if no effective columns found + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet ColumnSet} + * + * @example + * + * const pgp = require('pg-promise')(); + * + * const data = {id: 1, val: 123, msg: 'hello'}; + * + * // Properties can be pulled automatically from the object: + * + * pgp.helpers.sets(data); + * //=> "id"=1,"val"=123,"msg"='hello' + * + * @example + * + * // Column details from a reusable ColumnSet (recommended for performance); + * // NOTE: Conditional columns (start with '?') are skipped: + * + * const cs = new pgp.helpers.ColumnSet(['?id','val', 'msg']); + * + * pgp.helpers.sets(data, cs); + * //=> "val"=123,"msg"='hello' + * + */ +function sets(data, columns, capSQL) { + + if (!data || typeof data !== `object` || Array.isArray(data)) { + throw new TypeError(`Invalid parameter 'data' specified.`); + } + + if (!(columns instanceof ColumnSet)) { + columns = new ColumnSet(columns || data); + } + + return npm.format(columns.assign({source: data}), columns.prepare(data), {capSQL}); +} + +module.exports = {sets}; diff --git a/server/node_modules/pg-promise/lib/helpers/methods/update.js b/server/node_modules/pg-promise/lib/helpers/methods/update.js new file mode 100644 index 0000000..5982d72 --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/update.js @@ -0,0 +1,245 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {assertOptions} = require(`assert-options`); +const {TableName} = require(`../table-name`); +const {ColumnSet} = require(`../column-set`); + +const npm = { + formatting: require(`../../formatting`), + utils: require(`../../utils`) +}; + +/** + * @method helpers.update + * @description + * Generates a simplified `UPDATE` query for either one object or an array of objects. + * + * The resulting query needs a `WHERE` clause to be appended to it, to specify the update logic. + * This is to allow for update conditions of any complexity that are easy to add. + * + * @param {object|object[]} data + * An update object with properties for update values, or an array of such objects. + * + * When `data` is not a non-null object and not an array, it will throw {@link external:TypeError TypeError} = `Invalid parameter 'data' specified.` + * + * When `data` is an empty array, it will throw {@link external:TypeError TypeError} = `Cannot generate an UPDATE from an empty array.` + * + * When `data` is an array that contains a non-object value, the method will throw {@link external:Error Error} = + * `Invalid update object at index N.` + * + * @param {array|helpers.Column|helpers.ColumnSet} [columns] + * Set of columns to be updated. + * + * It is optional when `data` is a single object, and required when `data` is an array of objects. If not specified for an array + * of objects, the method will throw {@link external:TypeError TypeError} = `Parameter 'columns' is required when updating multiple records.` + * + * When `columns` is not a {@link helpers.ColumnSet ColumnSet} object, a temporary {@link helpers.ColumnSet ColumnSet} + * is created - from the value of `columns` (if it was specified), or from the value of `data` (if it is not an array). + * + * When the final {@link helpers.ColumnSet ColumnSet} is empty (no columns in it), the method will throw + * {@link external:Error Error} = `Cannot generate an UPDATE without any columns.`, unless option `emptyUpdate` was specified. + * + * @param {helpers.TableName|string|{table,schema}} [table] + * Table to be updated. + * + * It is normally a required parameter. But when `columns` is passed in as a {@link helpers.ColumnSet ColumnSet} object + * with `table` set in it, that will be used when this parameter isn't specified. When neither is available, the method + * will throw {@link external:Error Error} = `Table name is unknown.` + * + * @param {{}} [options] + * An object with formatting options for multi-row `UPDATE` queries. + * + * @param {string} [options.tableAlias=t] + * Name of the SQL variable that represents the destination table. + * + * @param {string} [options.valueAlias=v] + * Name of the SQL variable that represents the values. + * + * @param {*} [options.emptyUpdate] + * This is a convenience option, to avoid throwing an error when generating a conditional update results in no columns. + * + * When present, regardless of the value, this option overrides the method's behaviour when applying `skip` logic results in no columns, + * i.e. when every column is being skipped. + * + * By default, in that situation the method throws {@link external:Error Error} = `Cannot generate an UPDATE without any columns.` + * But when this option is present, the method will instead return whatever value the option was passed. + * + * @returns {*} + * An `UPDATE` query string that needs a `WHERE` condition appended. + * + * If it results in an empty update, and option `emptyUpdate` was passed in, then the method returns the value + * to which the option was set. + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet ColumnSet}, + * {@link helpers.TableName TableName} + * + * @example + * + * const pgp = require('pg-promise')({ + * capSQL: true // if you want all generated SQL capitalized + * }); + * + * const dataSingle = {id: 1, val: 123, msg: 'hello'}; + * const dataMulti = [{id: 1, val: 123, msg: 'hello'}, {id: 2, val: 456, msg: 'world!'}]; + * + * // Although column details can be taken from the data object, it is not + * // a likely scenario for an update, unless updating the whole table: + * + * pgp.helpers.update(dataSingle, null, 'my-table'); + * //=> UPDATE "my-table" SET "id"=1,"val"=123,"msg"='hello' + * + * @example + * + * // A typical single-object update: + * + * // Dynamic conditions must be escaped/formatted properly: + * const condition = pgp.as.format(' WHERE id = ${id}', dataSingle); + * + * pgp.helpers.update(dataSingle, ['val', 'msg'], 'my-table') + condition; + * //=> UPDATE "my-table" SET "val"=123,"msg"='hello' WHERE id = 1 + * + * @example + * + * // Column details are required for a multi-row `UPDATE`; + * // Adding '?' in front of a column name means it is only for a WHERE condition: + * + * pgp.helpers.update(dataMulti, ['?id', 'val', 'msg'], 'my-table') + ' WHERE v.id = t.id'; + * //=> UPDATE "my-table" AS t SET "val"=v."val","msg"=v."msg" FROM (VALUES(1,123,'hello'),(2,456,'world!')) + * // AS v("id","val","msg") WHERE v.id = t.id + * + * @example + * + * // Column details from a reusable ColumnSet (recommended for performance): + * + * const cs = new pgp.helpers.ColumnSet(['?id', 'val', 'msg'], {table: 'my-table'}); + * + * pgp.helpers.update(dataMulti, cs) + ' WHERE v.id = t.id'; + * //=> UPDATE "my-table" AS t SET "val"=v."val","msg"=v."msg" FROM (VALUES(1,123,'hello'),(2,456,'world!')) + * // AS v("id","val","msg") WHERE v.id = t.id + * + * @example + * + * // Using parameter `options` to change the default alias names: + * + * pgp.helpers.update(dataMulti, cs, null, {tableAlias: 'X', valueAlias: 'Y'}) + ' WHERE Y.id = X.id'; + * //=> UPDATE "my-table" AS X SET "val"=Y."val","msg"=Y."msg" FROM (VALUES(1,123,'hello'),(2,456,'world!')) + * // AS Y("id","val","msg") WHERE Y.id = X.id + * + * @example + * + * // Handling an empty update + * + * const cs = new pgp.helpers.ColumnSet(['?id', '?name'], {table: 'tt'}); // no actual update-able columns + * const result = pgp.helpers.update(dataMulti, cs, null, {emptyUpdate: 123}); + * if(result === 123) { + * // We know the update is empty, i.e. no columns that can be updated; + * // And it didn't throw because we specified `emptyUpdate` option. + * } + */ +function update(data, columns, table, options, capSQL) { + + if (!data || typeof data !== `object`) { + throw new TypeError(`Invalid parameter 'data' specified.`); + } + + const isArray = Array.isArray(data); + + if (isArray && !data.length) { + throw new TypeError(`Cannot generate an UPDATE from an empty array.`); + } + + if (columns instanceof ColumnSet) { + if (npm.utils.isNull(table)) { + table = columns.table; + } + } else { + if (isArray && npm.utils.isNull(columns)) { + throw new TypeError(`Parameter 'columns' is required when updating multiple records.`); + } + columns = new ColumnSet(columns || data); + } + + options = assertOptions(options, [`tableAlias`, `valueAlias`, `emptyUpdate`]); + + const format = npm.formatting.as.format, + useEmptyUpdate = `emptyUpdate` in options, + fmOptions = {capSQL}; + + if (isArray) { + const tableAlias = npm.formatting.as.alias(npm.utils.isNull(options.tableAlias) ? `t` : options.tableAlias); + const valueAlias = npm.formatting.as.alias(npm.utils.isNull(options.valueAlias) ? `v` : options.valueAlias); + + const q = capSQL ? sql.multi.capCase : sql.multi.lowCase; + + const actualColumns = columns.columns.filter(c => !c.cnd); + + if (checkColumns(actualColumns)) { + return options.emptyUpdate; + } + + checkTable(); + + const targetCols = actualColumns.map(c => c.escapedName + `=` + valueAlias + `.` + c.escapedName).join(); + + const values = data.map((d, index) => { + if (!d || typeof d !== `object`) { + throw new Error(`Invalid update object at index ${index}.`); + } + return `(` + format(columns.variables, columns.prepare(d), fmOptions) + `)`; + }).join(); + + return format(q, [table.name, tableAlias, targetCols, values, valueAlias, columns.names], fmOptions); + } + + const updates = columns.assign({source: data}); + + if (checkColumns(updates)) { + return options.emptyUpdate; + } + + checkTable(); + + const query = capSQL ? sql.single.capCase : sql.single.lowCase; + + return format(query, table.name) + format(updates, columns.prepare(data), fmOptions); + + function checkTable() { + if (table && !(table instanceof TableName)) { + table = new TableName(table); + } + if (!table) { + throw new Error(`Table name is unknown.`); + } + } + + function checkColumns(cols) { + if (!cols.length) { + if (useEmptyUpdate) { + return true; + } + throw new Error(`Cannot generate an UPDATE without any columns.`); + } + } +} + +const sql = { + single: { + lowCase: `update $1^ set `, + capCase: `UPDATE $1^ SET ` + }, + multi: { + lowCase: `update $1^ as $2^ set $3^ from (values$4^) as $5^($6^)`, + capCase: `UPDATE $1^ AS $2^ SET $3^ FROM (VALUES$4^) AS $5^($6^)` + } +}; + +module.exports = {update}; diff --git a/server/node_modules/pg-promise/lib/helpers/methods/values.js b/server/node_modules/pg-promise/lib/helpers/methods/values.js new file mode 100644 index 0000000..4d5a34c --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/methods/values.js @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ColumnSet} = require(`../column-set`); + +const npm = { + formatting: require(`../../formatting`), + utils: require(`../../utils`) +}; + +/** + * @method helpers.values + * @description + * Generates a string of comma-separated value groups from either one object or an array of objects, + * to be used as part of a query: + * + * - from a single object: `(val_1, val_2, ...)` + * - from an array of objects: `(val_11, val_12, ...), (val_21, val_22, ...)` + * + * @param {object|object[]} data + * A source object with properties as values, or an array of such objects. + * + * If it is anything else, the method will throw {@link external:TypeError TypeError} = `Invalid parameter 'data' specified.` + * + * When `data` is an array that contains a non-object value, the method will throw {@link external:Error Error} = + * `Invalid object at index N.` + * + * When `data` is an empty array, an empty string is returned. + * + * @param {array|helpers.Column|helpers.ColumnSet} [columns] + * Columns for which to return values. + * + * It is optional when `data` is a single object, and required when `data` is an array of objects. If not specified for an array + * of objects, the method will throw {@link external:TypeError TypeError} = `Parameter 'columns' is required when generating multi-row values.` + * + * When the final {@link helpers.ColumnSet ColumnSet} is empty (no columns in it), the method will throw + * {@link external:Error Error} = `Cannot generate values without any columns.` + * + * @returns {string} + * - comma-separated value groups, according to `data` + * - an empty string, if `data` is an empty array + * + * @see + * {@link helpers.Column Column}, + * {@link helpers.ColumnSet ColumnSet} + * + * @example + * + * const pgp = require('pg-promise')(); + * + * const dataSingle = {val: 123, msg: 'hello'}; + * const dataMulti = [{val: 123, msg: 'hello'}, {val: 456, msg: 'world!'}]; + * + * // Properties can be pulled automatically from a single object: + * + * pgp.helpers.values(dataSingle); + * //=> (123,'hello') + * + * @example + * + * // Column details are required when using an array of objects: + * + * pgp.helpers.values(dataMulti, ['val', 'msg']); + * //=> (123,'hello'),(456,'world!') + * + * @example + * + * // Column details from a reusable ColumnSet (recommended for performance): + * + * const cs = new pgp.helpers.ColumnSet(['val', 'msg']); + * + * pgp.helpers.values(dataMulti, cs); + * //=> (123,'hello'),(456,'world!') + * + */ +function values(data, columns, capSQL) { + + if (!data || typeof data !== `object`) { + throw new TypeError(`Invalid parameter 'data' specified.`); + } + + const isArray = Array.isArray(data); + + if (!(columns instanceof ColumnSet)) { + if (isArray && npm.utils.isNull(columns)) { + throw new TypeError(`Parameter 'columns' is required when generating multi-row values.`); + } + columns = new ColumnSet(columns || data); + } + + if (!columns.columns.length) { + throw new Error(`Cannot generate values without any columns.`); + } + + const format = npm.formatting.as.format, + fmOptions = {capSQL}; + + if (isArray) { + return data.map((d, index) => { + if (!d || typeof d !== `object`) { + throw new Error(`Invalid object at index ${index}.`); + } + return `(` + format(columns.variables, columns.prepare(d), fmOptions) + `)`; + }).join(); + } + return `(` + format(columns.variables, columns.prepare(data), fmOptions) + `)`; +} + +module.exports = {values}; diff --git a/server/node_modules/pg-promise/lib/helpers/table-name.js b/server/node_modules/pg-promise/lib/helpers/table-name.js new file mode 100644 index 0000000..ce1e8dd --- /dev/null +++ b/server/node_modules/pg-promise/lib/helpers/table-name.js @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {assertOptions} = require(`assert-options`); + +const npm = { + utils: require(`../utils`), + format: require(`../formatting`).as // formatting namespace +}; + +/** + * @class helpers.TableName + * @description + * Represents a full table name that can be injected into queries directly. + * + * This is a read-only type that can be used wherever parameter `table` is supported. + * + * It supports $[Custom Type Formatting], which means you can use the type directly as a formatting + * parameter, without specifying any escaping. + * + * Filter `:alias` is an alternative approach to splitting an SQL name into multiple ones. + * + * @param {string|object} table + * Table name details, depending on the type: + * + * - table name, if `table` is a string + * - object `{table, [schema]}` + * + * @property {string} name + * Formatted/escaped full table name, combining `schema` + `table`. + * + * @property {string} table + * Table name. + * + * @property {string} schema + * Database schema name. + * + * It is `undefined` when no valid schema was specified. + * + * @returns {helpers.TableName} + * + * @see + * {@link helpers.TableName#toPostgres toPostgres} + * + * @example + * + * const table = new pgp.helpers.TableName({table: 'my-table', schema: 'my-schema'}); + * console.log(table); + * //=> "my-schema"."my-table" + * + * // Formatting the type directly: + * pgp.as.format('SELECT * FROM $1', table); + * //=> SELECT * FROM "my-schema"."my-table" + * + */ +class TableName { + + constructor(table) { + if (typeof table === `string`) { + this.table = table; + } else { + const config = assertOptions(table, [`table`, `schema`]); + this.table = config.table; + if (npm.utils.isText(config.schema)) { + this.schema = config.schema; + } + } + if (!npm.utils.isText(this.table)) { + throw new TypeError(`Table name must be a non-empty text string.`); + } + this.name = npm.format.name(this.table); + if (this.schema) { + this.name = npm.format.name(this.schema) + `.` + this.name; + } + Object.freeze(this); + } +} + +/** + * @method helpers.TableName#toPostgres + * @description + * $[Custom Type Formatting], based on $[Symbolic CTF], i.e. the actual method is available only via {@link external:Symbol Symbol}: + * + * ```js + * const ctf = pgp.as.ctf; // Custom Type Formatting symbols namespace + * const fullName = tn[ctf.toPostgres]; // tn = an object of type TableName + * ``` + * + * This is a raw formatting type (`rawType = true`), i.e. when used as a query-formatting parameter, type `TableName` + * injects full table name as raw text. + * + * @param {helpers.TableName} [self] + * Optional self-reference, for ES6 arrow functions. + * + * @returns {string} + * Escaped full table name that includes optional schema name, if specified. + */ +TableName.prototype[npm.format.ctf.toPostgres] = function (self) { + self = this instanceof TableName && this || self; + return self.name; +}; + +TableName.prototype[npm.format.ctf.rawType] = true; // use as pre-formatted + +/** + * @method helpers.TableName#toString + * @description + * Creates a well-formatted string that represents the object. + * + * It is called automatically when writing the object into the console. + * + * @returns {string} + */ +TableName.prototype.toString = function () { + return this.name; +}; + +npm.utils.addInspection(TableName, function () { + return this.toString(); +}); + +module.exports = {TableName}; diff --git a/server/node_modules/pg-promise/lib/index.js b/server/node_modules/pg-promise/lib/index.js new file mode 100644 index 0000000..052432a --- /dev/null +++ b/server/node_modules/pg-promise/lib/index.js @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +/* eslint no-var: off */ +var v = process.versions.node.split(`.`), + highVer = +v[0]; + +// istanbul ignore next +if (highVer < 8) { + + // From pg-promise v10.4.0, the oldest supported Node.js is v8.0.0, + // which among other things, adds method 'destroy' to streams. + + // Node.js v7.6.0 was supported up to pg-promise v10.3.5 + // Node.js v4.5.0 was supported up to pg-promise v8.7.5 + // Node.js v0.10 was supported up to pg-promise v5.5.8 + + throw new Error(`Minimum Node.js version supported by pg-promise is 8.0.0`); +} + +module.exports = require(`./main`); diff --git a/server/node_modules/pg-promise/lib/inner-state.js b/server/node_modules/pg-promise/lib/inner-state.js new file mode 100644 index 0000000..7b00de6 --- /dev/null +++ b/server/node_modules/pg-promise/lib/inner-state.js @@ -0,0 +1,39 @@ +const {addReadProp} = require(`./utils`); + +/** + * @private + * @class InnerState + * @description + * Implements support for private/inner state object inside the class, + * which can be accessed by a derived class via hidden read-only property _inner. + */ +class InnerState { + + constructor(initialState) { + addReadProp(this, `_inner`, {}, true); + if (initialState && typeof initialState === `object`) { + this.extendState(initialState); + } + } + + /** + * Extends or overrides inner state with the specified properties. + * + * Only own properties are used, i.e. inherited ones are skipped. + */ + extendState(state) { + for (const a in state) { + // istanbul ignore else + if (Object.prototype.hasOwnProperty.call(state, a)) { + this._inner[a] = state[a]; + } + } + } +} + +/** + * @member InnerState#_inner + * Private/Inner object state. + */ + +module.exports = {InnerState}; diff --git a/server/node_modules/pg-promise/lib/main.js b/server/node_modules/pg-promise/lib/main.js new file mode 100644 index 0000000..23090bb --- /dev/null +++ b/server/node_modules/pg-promise/lib/main.js @@ -0,0 +1,443 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {PromiseAdapter} = require(`./promise-adapter`); +const {DatabasePool} = require(`./database-pool`); +const {PreparedStatement, ParameterizedQuery} = require(`./types`); +const {QueryFile} = require(`./query-file`); +const {queryResult} = require(`./query-result`); +const {parsePromise} = require(`./promise-parser`); +const {assertOptions} = require(`assert-options`); + +const npm = { + path: require(`path`), + pg: require(`pg`), + minify: require(`pg-minify`), + formatting: require(`./formatting`), + helpers: require(`./helpers`), + errors: require(`./errors`), + utils: require(`./utils`), + pubUtils: require(`./utils/public`), + mode: require(`./tx-mode`), + package: require(`../package.json`), + text: require(`./text`) +}; + +let originalClientConnect; + +/** + * @author Vitaly Tomilov + * @module pg-promise + * + * @description + * ## pg-promise v10 + * All documentation here is for the latest official release only. + * + * ### Initialization Options + * + * Below is the complete list of _Initialization Options_ for the library that can be passed in during + * the library's initialization: + * + * ```js + * const initOptions = {/* options as documented below */}; + * + * const pgp = require('pg-promise')(initOptions); + * ``` + * + * @param {{}} [options] + * Library Initialization Options. + * + * @param {boolean} [options.pgFormatting=false] + * Redirects all query formatting to the $[pg] driver. + * + * By default (`false`), the library uses its own advanced query-formatting engine. + * If you set this option to a truthy value, query formatting will be done entirely by the + * $[pg] driver, which means you won't be able to use any of the feature-rich query formatting + * that this library implements, restricting yourself to the very basic `$1, $2,...` syntax. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {boolean} [options.pgNative=false] + * Use $[Native Bindings]. Library $[pg-native] must be included and installed independently, or else there will + * be an error thrown: {@link external:Error Error} = `Failed to initialize Native Bindings.` + * + * This is a static option (can only be set prior to initialization). + * + * @param {object|function} [options.promiseLib=Promise] + * Overrides the default (ES6 Promise) promise library for its internal use. + * + * Example below sets to use $[Bluebird] - the best and recommended promise library. It is the fastest one, + * and supports $[Long Stack Traces], essential for debugging promises. + * + * ```js + * const Promise = require('bluebird'); + * const initOptions = { + * promiseLib: Promise + * }; + * const pgp = require('pg-promise')(initOptions); + * ``` + * + * All existing promise libraries are supported. The ones with recognizable signature are used automatically, + * while the rest can be configured via the $[Promise Adapter]. + * + * This is a static option (can only be set prior to initialization). + * + * @param {boolean} [options.noLocking=false] + * Prevents protocol locking. + * + * By default, the library locks much of its protocol to read-only access, as a fool-proof mechanism. + * Specifically for the {@link event:extend extend} event this serves as a protection against overriding existing + * properties or trying to set them at the wrong time. + * + * If this provision gets in the way of using a mock-up framework for your tests, you can force + * the library to deactivate most of the locks by setting `noLocking` = `true` within the options. + * + * This option is dynamic (can be set before or after initialization). However, changing it after the library's + * initialization will not affect {@link Database} objects that have already been created. + * + * @param {boolean} [options.capSQL=false] + * Capitalizes any SQL generated by the library. + * + * By default, all internal SQL within the library is generated using the low case. + * If, however, you want all SQL to be capitalized instead, set `capSQL` = `true`. + * + * It is purely a cosmetic feature. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {string|Array|null|undefined|function} [options.schema] + * Forces change of the default database schema(s) for every fresh connection, i.e. + * the library will execute `SET search_path TO schema_1, schema_2, ...` in the background + * whenever a fresh physical connection is allocated. + * + * Normally, one changes the default schema(s) by $[changing the database or the role], but sometimes you + * may want to switch the default schema(s) without persisting the change, and then use this option. + * + * It can be a string, an array of strings, or a callback function that takes `dc` (database context) + * as the only parameter (and as `this`), and returns schema(s) according to the database context. A callback function + * can also return nothing (`undefined` or `null`), if no schema change needed for the specified database context. + * + * The order of schema names matters, so if a table name exists in more than one schema, its default access resolves + * to the table from the first such schema on the list. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {boolean} [options.noWarnings=false] + * Disables all diagnostic warnings in the library (it is ill-advised). + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.connect] + * Global event {@link event:connect connect} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.disconnect] + * Global event {@link event:disconnect disconnect} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.query] + * Global event {@link event:query query} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.receive] + * Global event {@link event:receive receive} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.task] + * Global event {@link event:task task} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.transact] + * Global event {@link event:transact transact} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.error] + * Global event {@link event:error error} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @param {function} [options.extend] + * Global event {@link event:extend extend} handler. + * + * This option is dynamic (can be set before or after initialization). + * + * @see + * {@link module:pg-promise~end end}, + * {@link module:pg-promise~as as}, + * {@link module:pg-promise~errors errors}, + * {@link module:pg-promise~helpers helpers}, + * {@link module:pg-promise~minify minify}, + * {@link module:pg-promise~ParameterizedQuery ParameterizedQuery}, + * {@link module:pg-promise~PreparedStatement PreparedStatement}, + * {@link module:pg-promise~pg pg}, + * {@link module:pg-promise~QueryFile QueryFile}, + * {@link module:pg-promise~queryResult queryResult}, + * {@link module:pg-promise~spex spex}, + * {@link module:pg-promise~txMode txMode}, + * {@link module:pg-promise~utils utils} + * + */ +function $main(options) { + + options = assertOptions(options, [`pgFormatting`, `pgNative`, `promiseLib`, `noLocking`, `capSQL`, `noWarnings`, + `connect`, `disconnect`, `query`, `receive`, `task`, `transact`, `error`, `extend`, `schema`]); + + let pg = npm.pg; + const p = parsePromise(options.promiseLib); + + const config = { + version: npm.package.version, + promiseLib: p.promiseLib, + promise: p.promise + }; + + npm.utils.addReadProp(config, `$npm`, {}, true); + + // Locking properties that cannot be changed later: + npm.utils.addReadProp(options, `promiseLib`, options.promiseLib); + npm.utils.addReadProp(options, `pgNative`, !!options.pgNative); + + config.options = options; + + // istanbul ignore next: + // we do not cover code specific to Native Bindings + if (options.pgNative) { + pg = npm.pg.native; + if (npm.utils.isNull(pg)) { + throw new Error(npm.text.nativeError); + } + } else { + if (!originalClientConnect) { + originalClientConnect = pg.Client.prototype.connect; + pg.Client.prototype.connect = function () { + const handler = msg => { + if (msg.parameterName === `server_version`) { + this.serverVersion = msg.parameterValue; + this.connection.removeListener(`parameterStatus`, handler); + } + }; + this.connection.on(`parameterStatus`, handler); + return originalClientConnect.call(this, ...arguments); + }; + } + } + + const Database = require(`./database`)(config); + + const inst = (cn, dc) => { + if (npm.utils.isText(cn) || (cn && typeof cn === `object`)) { + return new Database(cn, dc, config); + } + throw new TypeError(`Invalid connection details: ` + npm.utils.toJson(cn)); + }; + + npm.utils.addReadProperties(inst, rootNameSpace); + + /** + * @member {external:PG} pg + * @description + * Instance of the $[pg] library that's being used, depending on initialization option `pgNative`: + * - regular `pg` module instance, without option `pgNative`, or equal to `false` (default) + * - `pg` module instance with $[Native Bindings], if option `pgNative` was set. + * + * Available as `pgp.pg`, after initializing the library. + */ + inst.pg = pg; // keep it modifiable, so the protocol can be mocked + + /** + * @member {function} end + * @readonly + * @description + * Shuts down all connection pools created in the process, so it can terminate without delay. + * It is available as `pgp.end`, after initializing the library. + * + * All {@link Database} objects created previously can no longer be used, and their query methods will be rejecting + * with {@link external:Error Error} = `Connection pool of the database object has been destroyed.` + * + * And if you want to shut down only a specific connection pool, you do so via the {@link Database} + * object that owns the pool: `db.$pool.end()` (see {@link Database#$pool Database.$pool}). + * + * For more details see $[Library de-initialization]. + */ + npm.utils.addReadProp(inst, `end`, () => { + DatabasePool.shutDown(); + }); + + /** + * @member {helpers} helpers + * @readonly + * @description + * Namespace for {@link helpers all query-formatting helper functions}. + * + * Available as `pgp.helpers`, after initializing the library. + * + * @see {@link helpers}. + */ + npm.utils.addReadProp(inst, `helpers`, npm.helpers(config)); + + /** + * @member {external:spex} spex + * @readonly + * @description + * Initialized instance of the $[spex] module, used by the library within tasks and transactions. + * + * Available as `pgp.spex`, after initializing the library. + * + * @see + * {@link Task#batch}, + * {@link Task#page}, + * {@link Task#sequence} + */ + npm.utils.addReadProp(inst, `spex`, config.$npm.spex); + + config.pgp = inst; + npm.utils.lock(config, true, options); + + return inst; +} + +const rootNameSpace = { + + /** + * @member {formatting} as + * @readonly + * @description + * Namespace for {@link formatting all query-formatting functions}. + * + * Available as `pgp.as`, before and after initializing the library. + * + * @see {@link formatting}. + */ + as: npm.formatting.as, + + /** + * @member {external:pg-minify} minify + * @readonly + * @description + * Instance of the $[pg-minify] library used internally to minify SQL scripts. + * + * Available as `pgp.minify`, before and after initializing the library. + */ + minify: npm.minify, + + /** + * @member {queryResult} queryResult + * @readonly + * @description + * Query Result Mask enumerator. + * + * Available as `pgp.queryResult`, before and after initializing the library. + */ + queryResult, + + /** + * @member {PromiseAdapter} PromiseAdapter + * @readonly + * @description + * {@link PromiseAdapter} class. + * + * Available as `pgp.PromiseAdapter`, before and after initializing the library. + */ + PromiseAdapter, + + /** + * @member {ParameterizedQuery} ParameterizedQuery + * @readonly + * @description + * {@link ParameterizedQuery} class. + * + * Available as `pgp.ParameterizedQuery`, before and after initializing the library. + */ + ParameterizedQuery, + + /** + * @member {PreparedStatement} PreparedStatement + * @readonly + * @description + * {@link PreparedStatement} class. + * + * Available as `pgp.PreparedStatement`, before and after initializing the library. + */ + PreparedStatement, + + /** + * @member {QueryFile} QueryFile + * @readonly + * @description + * {@link QueryFile} class. + * + * Available as `pgp.QueryFile`, before and after initializing the library. + */ + QueryFile, + + /** + * @member {errors} errors + * @readonly + * @description + * {@link errors} - namespace for all error types. + * + * Available as `pgp.errors`, before and after initializing the library. + */ + errors: npm.errors, + + /** + * @member {utils} utils + * @readonly + * @description + * {@link utils} - namespace for utility functions. + * + * Available as `pgp.utils`, before and after initializing the library. + */ + utils: npm.pubUtils, + + /** + * @member {txMode} txMode + * @readonly + * @description + * {@link txMode Transaction Mode} namespace. + * + * Available as `pgp.txMode`, before and after initializing the library. + */ + txMode: npm.mode +}; + +npm.utils.addReadProperties($main, rootNameSpace); + +module.exports = $main; + +/** + * @external Promise + * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise + */ + +/** + * @external PG + * @see https://node-postgres.com + */ + +/** + * @external Client + * @see https://node-postgres.com/api/client + */ + +/** + * @external pg-minify + * @see https://github.com/vitaly-t/pg-minify + */ + +/** + * @external spex + * @see https://github.com/vitaly-t/spex + */ diff --git a/server/node_modules/pg-promise/lib/patterns.js b/server/node_modules/pg-promise/lib/patterns.js new file mode 100644 index 0000000..27e21cf --- /dev/null +++ b/server/node_modules/pg-promise/lib/patterns.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +/* + The most important regular expressions and data as used by the library, + isolated here to help with possible edge cases during integration. +*/ + +module.exports = { + // Searches for all Named Parameters, supporting any of the following syntax: + // ${propName}, $(propName), $[propName], $/propName/, $ + // Nested property names are also supported: ${propName.abc} + namedParameters: /\$(?:({)|(\()|(<)|(\[)|(\/))\s*[a-zA-Z0-9$_.]+(\^|~|#|:raw|:alias|:name|:json|:csv|:list|:value)?\s*(?:(?=\2)(?=\3)(?=\4)(?=\5)}|(?=\1)(?=\3)(?=\4)(?=\5)\)|(?=\1)(?=\2)(?=\4)(?=\5)>|(?=\1)(?=\2)(?=\3)(?=\5)]|(?=\1)(?=\2)(?=\3)(?=\4)\/)/g, + + // Searches for all variables $1, $2, ...$100000, and while it will find greater than $100000 + // variables, the formatting engine is expected to throw an error for those. + multipleValues: /\$([1-9][0-9]{0,16}(?![0-9])(\^|~|#|:raw|:alias|:name|:json|:csv|:list|:value)?)/g, + + // Searches for all occurrences of variable $1 + singleValue: /\$1(?![0-9])(\^|~|#|:raw|:alias|:name|:json|:csv|:list|:value)?/g, + + // Matches a valid column name for the Column type parser, according to the following rules: + // - can contain: any combination of a-z, A-Z, 0-9, $ or _ + // - can contain ? at the start + // - can contain one of the supported filters/modifiers + validColumn: /\??[a-zA-Z0-9$_]+(\^|~|#|:raw|:alias|:name|:json|:csv|:list|:value)?/, + + // Matches a valid open-name JavaScript variable, according to the following rules: + // - can contain: any combination of a-z, A-Z, 0-9, $ or _ + validVariable: /[a-zA-Z0-9$_]+/, + + // Matches a valid modifier in a column/property: + hasValidModifier: /\^|~|#|:raw|:alias|:name|:json|:csv|:list|:value/, + + // List of all supported formatting modifiers: + validModifiers: [`^`, `~`, `#`, `:raw`, `:alias`, `:name`, `:json`, `:csv`, `:list`, `:value`] +}; diff --git a/server/node_modules/pg-promise/lib/promise-adapter.js b/server/node_modules/pg-promise/lib/promise-adapter.js new file mode 100644 index 0000000..bbc0bb0 --- /dev/null +++ b/server/node_modules/pg-promise/lib/promise-adapter.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {assertOptions} = require(`assert-options`); + +/** + * @class PromiseAdapter + * @summary Adapter for the primary promise operations. + * @description + * Provides compatibility with promise libraries that cannot be recognized automatically, + * via functions that implement the primary operations with promises: + * + * - construct a new promise with a callback function + * - resolve a promise with some result data + * - reject a promise with a reason + * - resolve an array of promises + * + * The type is available from the library's root: `pgp.PromiseAdapter`. + * + * @param {object} api + * Promise API configuration object. + * + * Passing in anything other than an object will throw {@link external:TypeError TypeError} = `Adapter requires an api configuration object.` + * + * @param {function} api.create + * A function that takes a callback parameter and returns a new promise object. + * The callback parameter is expected to be `function(resolve, reject)`. + * + * Passing in anything other than a function will throw {@link external:TypeError TypeError} = `Function 'create' must be specified.` + * + * @param {function} api.resolve + * A function that takes an optional data parameter and resolves a promise with it. + * + * Passing in anything other than a function will throw {@link external:TypeError TypeError} = `Function 'resolve' must be specified.` + * + * @param {function} api.reject + * A function that takes an optional error parameter and rejects a promise with it. + * + * Passing in anything other than a function will throw {@link external:TypeError TypeError} = `Function 'reject' must be specified.` + * + * @param {function} api.all + * A function that resolves an array of promises. + * + * Passing in anything other than a function will throw {@link external:TypeError TypeError} = `Function 'all' must be specified.` + * + * @returns {PromiseAdapter} + */ +class PromiseAdapter { + constructor(api) { + + if (!api || typeof api !== `object`) { + throw new TypeError(`Adapter requires an api configuration object.`); + } + + api = assertOptions(api, [`create`, `resolve`, `reject`, `all`]); + + this.create = api.create; + this.resolve = api.resolve; + this.reject = api.reject; + this.all = api.all; + + if (typeof this.create !== `function`) { + throw new TypeError(`Function 'create' must be specified.`); + } + + if (typeof this.resolve !== `function`) { + throw new TypeError(`Function 'resolve' must be specified.`); + } + + if (typeof this.reject !== `function`) { + throw new TypeError(`Function 'reject' must be specified.`); + } + + if (typeof this.all !== `function`) { + throw new TypeError(`Function 'all' must be specified.`); + } + } +} + +module.exports = {PromiseAdapter}; diff --git a/server/node_modules/pg-promise/lib/promise-parser.js b/server/node_modules/pg-promise/lib/promise-parser.js new file mode 100644 index 0000000..fd70ee0 --- /dev/null +++ b/server/node_modules/pg-promise/lib/promise-parser.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {PromiseAdapter} = require(`./promise-adapter`); + +////////////////////////////////////////// +// Parses and validates a promise library; +function parse(pl) { + + let promise; + if (pl instanceof PromiseAdapter) { + promise = function (func) { + return pl.create(func); + }; + promise.resolve = pl.resolve; + promise.reject = pl.reject; + promise.all = pl.all; + return promise; + } + const t = typeof pl; + if (t === `function` || t === `object`) { + const Root = typeof pl.Promise === `function` ? pl.Promise : pl; + promise = function (func) { + return new Root(func); + }; + promise.resolve = Root.resolve; + promise.reject = Root.reject; + promise.all = Root.all; + if (typeof promise.resolve === `function` && + typeof promise.reject === `function` && + typeof promise.all === `function`) { + return promise; + } + } + + throw new TypeError(`Invalid promise library specified.`); +} + +function parsePromise(promiseLib) { + const result = {promiseLib}; + if (promiseLib) { + result.promise = parse(promiseLib); + } else { + result.promise = parse(Promise); + result.promiseLib = Promise; + } + return result; +} + +module.exports = {parsePromise}; diff --git a/server/node_modules/pg-promise/lib/query-file.js b/server/node_modules/pg-promise/lib/query-file.js new file mode 100644 index 0000000..80c8c70 --- /dev/null +++ b/server/node_modules/pg-promise/lib/query-file.js @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {InnerState} = require(`./inner-state`); +const {QueryFileError} = require(`./errors`); +const {assertOptions} = require(`assert-options`); +const {ColorConsole} = require(`./utils/color`); + +const npm = { + fs: require(`fs`), + os: require(`os`), + path: require(`path`), + minify: require(`pg-minify`), + utils: require(`./utils`), + formatting: require(`./formatting`) +}; + +const file$query = Symbol(`QueryFile.query`); + +/** + * @class QueryFile + * @description + * + * Represents an external SQL file. The type is available from the library's root: `pgp.QueryFile`. + * + * Reads a file with SQL and prepares it for execution, also parses and minifies it, if required. + * The SQL can be of any complexity, with both single and multi-line comments. + * + * The type can be used in place of the `query` parameter, with any query method directly, plus as `text` in {@link PreparedStatement} + * and {@link ParameterizedQuery}. + * + * It never throws any error, leaving it for query methods to reject with {@link errors.QueryFileError QueryFileError}. + * + * **IMPORTANT:** You should only create a single reusable object per file, in order to avoid repeated file reads, + * as the IO is a very expensive resource. If you do not follow it, you will be seeing the following warning: + * `Creating a duplicate QueryFile object for the same file`, which signals a bad-use pattern. + * + * @param {string} file + * Path to the SQL file with the query, either absolute or relative to the application's entry point file. + * + * If there is any problem reading the file, it will be reported when executing the query. + * + * @param {QueryFile.Options} [options] + * Set of configuration options, as documented by {@link QueryFile.Options}. + * + * @returns {QueryFile} + * + * @see + * {@link errors.QueryFileError QueryFileError}, + * {@link QueryFile#toPostgres toPostgres} + * + * @example + * // File sql.js + * + * // Proper way to organize an sql provider: + * // + * // - have all sql files for Users in ./sql/users + * // - have all sql files for Products in ./sql/products + * // - have your sql provider module as ./sql/index.js + * + * const {QueryFile} = require('pg-promise'); + * const {join: joinPath} = require('path'); + * + * // Helper for linking to external query files: + * function sql(file) { + * const fullPath = joinPath(__dirname, file); // generating full path; + * return new QueryFile(fullPath, {minify: true}); + * } + * + * module.exports = { + * // external queries for Users: + * users: { + * add: sql('users/create.sql'), + * search: sql('users/search.sql'), + * report: sql('users/report.sql'), + * }, + * // external queries for Products: + * products: { + * add: sql('products/add.sql'), + * quote: sql('products/quote.sql'), + * search: sql('products/search.sql'), + * } + * }; + * + * @example + * // Testing our SQL provider + * + * const db = require('./db'); // our database module; + * const {users: sql} = require('./sql'); // sql for users; + * + * module.exports = { + * addUser: (name, age) => db.none(sql.add, [name, age]), + * findUser: name => db.any(sql.search, name) + * }; + * + */ +class QueryFile extends InnerState { + + constructor(file, options) { + + let filePath = file; + + options = assertOptions(options, { + debug: npm.utils.isDev(), + minify: (options && options.compress && options.minify === undefined) ? true : undefined, + compress: undefined, + params: undefined, + noWarnings: undefined + }); + + if (npm.utils.isText(filePath) && !npm.path.isAbsolute(filePath)) { + filePath = npm.path.join(npm.utils.startDir, filePath); + } + + const {usedPath} = QueryFile.instance; + + // istanbul ignore next: + if (!options.noWarnings) { + if (filePath in usedPath) { + usedPath[filePath]++; + ColorConsole.warn(`WARNING: Creating a duplicate QueryFile object for the same file - \n ${filePath}\n${npm.utils.getLocalStack(2, 3)}\n`); + } else { + usedPath[filePath] = 0; + } + } + + const _inner = { + file, + filePath, + options, + sql: undefined, + error: undefined, + ready: undefined, + modTime: undefined + }; + + super(_inner); + + this.prepare(); + } + + /** + * Global instance of the file-path repository. + * + * @return {{usedPath: {}}} + */ + static get instance() { + const s = Symbol.for(`pgPromiseQueryFile`); + let scope = global[s]; + if (!scope) { + scope = { + usedPath: {} // used-path look-up dictionary + }; + global[s] = scope; + } + return scope; + } + + /** + * @name QueryFile#Symbol(QueryFile.$query) + * @type {string} + * @default undefined + * @readonly + * @private + * @summary Prepared query string. + * @description + * When property {@link QueryFile#error error} is set, the query is `undefined`. + * + * **IMPORTANT:** This property is for internal use by the library only, never use this + * property directly from your code. + */ + get [file$query]() { + return this._inner.sql; + } + + /** + * @name QueryFile#error + * @type {errors.QueryFileError} + * @default undefined + * @readonly + * @description + * When in an error state, it is set to a {@link errors.QueryFileError QueryFileError} object. Otherwise, it is `undefined`. + */ + get error() { + return this._inner.error; + } + + /** + * @name QueryFile#file + * @type {string} + * @readonly + * @description + * File name that was passed into the constructor. + * + * This property is primarily for internal use by the library. + */ + get file() { + return this._inner.file; + } + + /** + * @name QueryFile#options + * @type {QueryFile.Options} + * @readonly + * @description + * Set of options, as configured during the object's construction. + * + * This property is primarily for internal use by the library. + */ + get options() { + return this._inner.options; + } + + /** + * @summary Prepares the query for execution. + * @description + * If the query hasn't been prepared yet, it will read the file and process the content according + * to the parameters passed into the constructor. + * + * This method is primarily for internal use by the library. + * + * @param {boolean} [throwErrors=false] + * Throw any error encountered. + */ + prepare(throwErrors) { + const i = this._inner, options = i.options; + let lastMod; + if (options.debug && i.ready) { + try { + lastMod = npm.fs.statSync(i.filePath).mtime.getTime(); + // istanbul ignore if; + if (lastMod === i.modTime) { + return; + } + i.ready = false; + } catch (e) { + i.sql = undefined; + i.ready = false; + i.error = e; + if (throwErrors) { + throw i.error; + } + return; + } + } + if (i.ready) { + return; + } + try { + i.sql = npm.fs.readFileSync(i.filePath, `utf8`); + i.modTime = lastMod || npm.fs.statSync(i.filePath).mtime.getTime(); + if (options.minify && options.minify !== `after`) { + i.sql = npm.minify(i.sql, {compress: options.compress}); + } + if (options.params !== undefined) { + i.sql = npm.formatting.as.format(i.sql, options.params, {partial: true}); + } + if (options.minify && options.minify === `after`) { + i.sql = npm.minify(i.sql, {compress: options.compress}); + } + i.ready = true; + i.error = undefined; + } catch (e) { + i.sql = undefined; + i.error = new QueryFileError(e, this); + if (throwErrors) { + throw i.error; + } + } + } + +} + +// Hiding the query as a symbol within the type, +// to make it even more difficult to misuse it: +QueryFile.$query = file$query; + +/** + * @method QueryFile#toPostgres + * @description + * $[Custom Type Formatting], based on $[Symbolic CTF], i.e. the actual method is available only via {@link external:Symbol Symbol}: + * + * ```js + * const ctf = pgp.as.ctf; // Custom Type Formatting symbols namespace + * const query = qf[ctf.toPostgres](); // qf = an object of type QueryFile + * ``` + * + * This is a raw formatting type (`rawType = true`), i.e. when used as a query-formatting parameter, type `QueryFile` injects SQL as raw text. + * + * If you need to support type `QueryFile` outside of query methods, this is the only safe way to get the most current SQL. + * And you would want to use this method dynamically, as it reloads the SQL automatically, if option `debug` is set. + * See {@link QueryFile.Options Options}. + * + * @param {QueryFile} [self] + * Optional self-reference, for ES6 arrow functions. + * + * @returns {string} + * SQL string from the file, according to the {@link QueryFile.Options options} specified. + * + */ +QueryFile.prototype[npm.formatting.as.ctf.toPostgres] = function (self) { + self = this instanceof QueryFile && this || self; + self.prepare(true); + return self[QueryFile.$query]; +}; + +QueryFile.prototype[npm.formatting.as.ctf.rawType] = true; // use as pre-formatted + +/** + * @method QueryFile#toString + * @description + * Creates a well-formatted multi-line string that represents the object's current state. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +QueryFile.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap = npm.utils.messageGap(level + 1); + const lines = [ + `QueryFile {` + ]; + this.prepare(); + lines.push(gap + `file: "` + this.file + `"`); + lines.push(gap + `options: ` + npm.utils.toJson(this.options)); + if (this.error) { + lines.push(gap + `error: ` + this.error.toString(level + 1)); + } else { + lines.push(gap + `query: "` + this[QueryFile.$query] + `"`); + } + lines.push(npm.utils.messageGap(level) + `}`); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(QueryFile, function () { + return this.toString(); +}); + +module.exports = {QueryFile}; + +/** + * @typedef QueryFile.Options + * @description + * A set of configuration options as passed into the {@link QueryFile} constructor. + * + * @property {boolean} debug + * When in debug mode, the query file is checked for its last modification time on every query request, + * so if it changes, the file is read afresh. + * + * The default for this property is `true` when `NODE_ENV` = `development`, + * or `false` otherwise. + * + * @property {boolean|string} minify=false + * Parses and minifies the SQL using $[pg-minify]: + * - `false` - do not use $[pg-minify] + * - `true` - use $[pg-minify] to parse and minify SQL + * - `'after'` - use $[pg-minify] after applying static formatting parameters + * (option `params`), as opposed to before it (default) + * + * If option `compress` is set, then the default for `minify` is `true`. + * + * Failure to parse SQL will result in $[SQLParsingError]. + * + * @property {boolean} compress=false + * Sets option `compress` as supported by $[pg-minify], to uglify the SQL: + * - `false` - no compression to be applied, keep minimum spaces for easier read + * - `true` - remove all unnecessary spaces from SQL + * + * This option has no meaning, if `minify` is explicitly set to `false`. However, if `minify` is not + * specified and `compress` is specified as `true`, then `minify` defaults to `true`. + * + * @property {array|object|value} params + * + * Static formatting parameters to be applied to the SQL, using the same method {@link formatting.format as.format}, + * but with option `partial` = `true`. + * + * Most of the time query formatting is fully dynamic, and applied just before executing the query. + * In some cases though you may need to pre-format SQL with static values. Examples of it can be a + * schema name, or a configurable table name. + * + * This option makes two-step SQL formatting easy: you can pre-format the SQL initially, and then + * apply the second-step dynamic formatting when executing the query. + * + * @property {boolean} noWarnings=false + * Suppresses all warnings produced by the class. It is not recommended for general use, only in specific tests + * that may require it. + * + */ diff --git a/server/node_modules/pg-promise/lib/query-result.js b/server/node_modules/pg-promise/lib/query-result.js new file mode 100644 index 0000000..e15e90c --- /dev/null +++ b/server/node_modules/pg-promise/lib/query-result.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +/** + * @enum {number} + * @alias queryResult + * @readonly + * @description + * **Query Result Mask** + * + * Binary mask that represents the number of rows expected from a query method, + * used by generic {@link Database#query query} method, plus {@link Database#func func}. + * + * The mask is always the last optional parameter, which defaults to `queryResult.any`. + * + * Any combination of flags is supported, except for `one + many`. + * + * The type is available from the library's root: `pgp.queryResult`. + * + * @see {@link Database#query Database.query}, {@link Database#func Database.func} + */ +const queryResult = { + /** Single row is expected, to be resolved as a single row-object. */ + one: 1, + /** One or more rows expected, to be resolved as an array, with at least 1 row-object. */ + many: 2, + /** Expecting no rows, to be resolved with `null`. */ + none: 4, + /** `many|none` - any result is expected, to be resolved with an array of rows-objects. */ + any: 6 +}; + +module.exports = {queryResult}; diff --git a/server/node_modules/pg-promise/lib/query.js b/server/node_modules/pg-promise/lib/query.js new file mode 100644 index 0000000..f00425e --- /dev/null +++ b/server/node_modules/pg-promise/lib/query.js @@ -0,0 +1,265 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Events} = require(`./events`); +const {QueryFile} = require(`./query-file`); +const {ServerFormatting, PreparedStatement, ParameterizedQuery} = require(`./types`); +const {SpecialQuery} = require(`./special-query`); +const {queryResult} = require(`./query-result`); + +const npm = { + util: require(`util`), + utils: require(`./utils`), + formatting: require(`./formatting`), + errors: require(`./errors`), + stream: require(`./stream`), + text: require(`./text`) +}; + +const QueryResultError = npm.errors.QueryResultError, + InternalError = npm.utils.InternalError, + qrec = npm.errors.queryResultErrorCode; + +const badMask = queryResult.one | queryResult.many; // unsupported combination bit-mask; + +////////////////////////////// +// Generic query method; +function $query(ctx, query, values, qrm, config) { + + const special = qrm instanceof SpecialQuery && qrm; + const $p = config.promise; + + if (special && special.isStream) { + return npm.stream.call(this, ctx, query, values, config); + } + + const opt = ctx.options, + capSQL = opt.capSQL; + + let error, entityType, + pgFormatting = opt.pgFormatting, + params = pgFormatting ? values : undefined; + + if (typeof query === `function`) { + try { + query = npm.formatting.resolveFunc(query, values); + } catch (e) { + error = e; + params = values; + query = npm.util.inspect(query); + } + } + + if (!error && !query) { + error = new TypeError(npm.text.invalidQuery); + } + + if (!error && typeof query === `object`) { + if (query instanceof QueryFile) { + query.prepare(); + if (query.error) { + error = query.error; + query = query.file; + } else { + query = query[QueryFile.$query]; + } + } else { + if (`entity` in query) { + entityType = query.type; + query = query.entity; // query is a function name; + } else { + if (query instanceof ServerFormatting) { + pgFormatting = true; + } else { + if (`name` in query) { + query = new PreparedStatement(query); + pgFormatting = true; + } else { + if (`text` in query) { + query = new ParameterizedQuery(query); + pgFormatting = true; + } + } + } + if (query instanceof ServerFormatting && !npm.utils.isNull(values)) { + query.values = values; + } + } + } + } + + if (!error) { + if (!pgFormatting && !npm.utils.isText(query)) { + const errTxt = entityType ? (entityType === `func` ? npm.text.invalidFunction : npm.text.invalidProc) : npm.text.invalidQuery; + error = new TypeError(errTxt); + } + if (query instanceof ServerFormatting) { + const qp = query.parse(); + if (qp instanceof Error) { + error = qp; + } else { + query = qp; + } + } + } + + if (!error && !special) { + if (npm.utils.isNull(qrm)) { + qrm = queryResult.any; // default query result; + } else { + if (qrm !== parseInt(qrm) || (qrm & badMask) === badMask || qrm < 1 || qrm > 6) { + error = new TypeError(npm.text.invalidMask); + } + } + } + + if (!error && (!pgFormatting || entityType)) { + try { + // use 'pg-promise' implementation of values formatting; + if (entityType) { + params = undefined; + query = npm.formatting.formatEntity(query, values, {capSQL, type: entityType}); + } else { + query = npm.formatting.formatQuery(query, values); + } + } catch (e) { + if (entityType) { + let prefix = entityType === `func` ? `select * from` : `call`; + if (capSQL) { + prefix = prefix.toUpperCase(); + } + query = prefix + ` ` + query + `(...)`; + } else { + params = values; + } + error = e instanceof Error ? e : new npm.utils.InternalError(e); + } + } + + return $p((resolve, reject) => { + + if (notifyReject()) { + return; + } + error = Events.query(opt, getContext()); + if (notifyReject()) { + return; + } + try { + const start = Date.now(); + ctx.db.client.query(query, params, (err, result) => { + let data, multiResult, lastResult = result; + if (err) { + // istanbul ignore if (auto-testing connectivity issues is too problematic) + if (npm.utils.isConnectivityError(err)) { + ctx.db.client.$connectionError = err; + } + error = err; + } else { + multiResult = Array.isArray(result); + if (multiResult) { + lastResult = result[result.length - 1]; + for (let i = 0; i < result.length; i++) { + const r = result[i]; + error = Events.receive(opt, r.rows, r, getContext()); + if (error) { + break; + } + } + } else { + result.duration = Date.now() - start; + error = Events.receive(opt, result.rows, result, getContext()); + } + } + if (!error) { + data = lastResult; + if (special) { + if (special.isMultiResult) { + data = multiResult ? result : [result]; // method .multiResult() is called + } + // else, method .result() is called + } else { + data = data.rows; + const len = data.length; + if (len) { + if (len > 1 && qrm & queryResult.one) { + // one row was expected, but returned multiple; + error = new QueryResultError(qrec.multiple, lastResult, query, params); + } else { + if (!(qrm & (queryResult.one | queryResult.many))) { + // no data should have been returned; + error = new QueryResultError(qrec.notEmpty, lastResult, query, params); + } else { + if (!(qrm & queryResult.many)) { + data = data[0]; + } + } + } + } else { + // no data returned; + if (qrm & queryResult.none) { + if (qrm & queryResult.one) { + data = null; + } else { + data = qrm & queryResult.many ? data : null; + } + } else { + error = new QueryResultError(qrec.noData, lastResult, query, params); + } + } + } + } + + if (!notifyReject()) { + resolve(data); + } + }); + } catch (e) { + // this can only happen as a result of an internal failure within node-postgres, + // like during a sudden loss of communications, which is impossible to reproduce + // automatically, so removing it from the test coverage: + // istanbul ignore next + error = e; + } + + function getContext() { + let client; + if (ctx.db) { + client = ctx.db.client; + } else { + error = new Error(npm.text.looseQuery); + } + return { + client, query, params, + dc: ctx.dc, + ctx: ctx.ctx + }; + } + + notifyReject(); + + function notifyReject() { + const context = getContext(); + if (error) { + if (error instanceof InternalError) { + error = error.error; + } + Events.error(opt, error, context); + reject(error); + return true; + } + } + }); +} + +module.exports = config => { + return function (ctx, query, values, qrm) { + return $query.call(this, ctx, query, values, qrm, config); + }; +}; diff --git a/server/node_modules/pg-promise/lib/special-query.js b/server/node_modules/pg-promise/lib/special-query.js new file mode 100644 index 0000000..edbbe97 --- /dev/null +++ b/server/node_modules/pg-promise/lib/special-query.js @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const specialQueryType = { + result: 0, + multiResult: 1, + stream: 2 +}; + +class SpecialQuery { + constructor(type) { + this.isResult = type === specialQueryType.result; // type used implicitly + this.isStream = type === specialQueryType.stream; + this.isMultiResult = type === specialQueryType.multiResult; + } +} + +const cache = { + resultQuery: new SpecialQuery(specialQueryType.result), + multiResultQuery: new SpecialQuery(specialQueryType.multiResult), + streamQuery: new SpecialQuery(specialQueryType.stream) +}; + +module.exports = Object.assign({SpecialQuery}, cache); diff --git a/server/node_modules/pg-promise/lib/stream.js b/server/node_modules/pg-promise/lib/stream.js new file mode 100644 index 0000000..a577a39 --- /dev/null +++ b/server/node_modules/pg-promise/lib/stream.js @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Events} = require(`./events`); + +const npm = { + utils: require(`./utils`), + text: require(`./text`) +}; + +//////////////////////////////////////////// +// Streams query data into any destination, +// with the help of pg-query-stream library. +function $stream(ctx, qs, initCB, config) { + + const $p = config.promise; + + // istanbul ignore next: + // we do not provide code coverage for the Native Bindings specifics + if (ctx.options.pgNative) { + return $p.reject(new Error(npm.text.nativeStreaming)); + } + // Stream class was renamed again, see the following issue: + // https://github.com/brianc/node-postgres/issues/2412 + if (!qs || !qs.constructor || qs.constructor.name !== `QueryStream`) { + // invalid or missing stream object; + return $p.reject(new TypeError(npm.text.invalidStream)); + } + if (qs._reading || qs._closed) { + // stream object is in the wrong state; + return $p.reject(new Error(npm.text.invalidStreamState)); + } + if (typeof initCB !== `function`) { + // parameter `initCB` must be passed as the initialization callback; + return $p.reject(new TypeError(npm.text.invalidStreamCB)); + } + + let error = Events.query(ctx.options, getContext()); + + if (error) { + error = getError(error); + Events.error(ctx.options, error, getContext()); + return $p.reject(error); + } + + const stream = ctx.db.client.query(qs); + + stream.on(`data`, onData); + stream.on(`error`, onError); + stream.on(`end`, onEnd); + + try { + initCB.call(this, stream); // the stream must be initialized during the call; + } catch (e) { + release(); + error = getError(e); + Events.error(ctx.options, error, getContext()); + return $p.reject(error); + } + + const start = Date.now(); + let resolve, reject, nRows = 0; + + function onData(data) { + nRows++; + error = Events.receive(ctx.options, [data], undefined, getContext()); + if (error) { + onError(error); + } + } + + function onError(e) { + release(); + stream.destroy(); + e = getError(e); + Events.error(ctx.options, e, getContext()); + reject(e); + } + + function onEnd() { + release(); + resolve({ + processed: nRows, // total number of rows processed; + duration: Date.now() - start // duration, in milliseconds; + }); + } + + function release() { + stream.removeListener(`data`, onData); + stream.removeListener(`error`, onError); + stream.removeListener(`end`, onEnd); + } + + function getError(e) { + return e instanceof npm.utils.InternalError ? e.error : e; + } + + function getContext() { + let client; + if (ctx.db) { + client = ctx.db.client; + } else { + error = new Error(npm.text.looseQuery); + } + return { + client, + dc: ctx.dc, + query: qs.cursor.text, + params: qs.cursor.values, + ctx: ctx.ctx + }; + } + + return $p((res, rej) => { + resolve = res; + reject = rej; + }); + +} + +module.exports = $stream; diff --git a/server/node_modules/pg-promise/lib/task.js b/server/node_modules/pg-promise/lib/task.js new file mode 100644 index 0000000..a2dea04 --- /dev/null +++ b/server/node_modules/pg-promise/lib/task.js @@ -0,0 +1,416 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {Events} = require(`./events`); + +const npm = { + spex: require(`spex`), + utils: require(`./utils`), + mode: require(`./tx-mode`), + query: require(`./query`), + text: require(`./text`) +}; + +/** + * @interface Task + * @description + * Extends {@link Database} for an automatic connection session, with methods for executing multiple database queries. + * + * The type isn't available directly, it can only be created via methods {@link Database#task Database.task}, {@link Database#tx Database.tx}, + * or their derivations. + * + * When executing more than one request at a time, one should allocate and release the connection only once, + * while executing all the required queries within the same connection session. More importantly, a transaction + * can only work within a single connection. + * + * This is an interface for tasks/transactions to implement a connection session, during which you can + * execute multiple queries against the same connection that's released automatically when the task/transaction is finished. + * + * Each task/transaction manages the connection automatically. When executed on the root {@link Database} object, the connection + * is allocated from the pool, and once the method's callback has finished, the connection is released back to the pool. + * However, when invoked inside another task or transaction, the method reuses the parent connection. + * + * @see + * {@link Task#ctx ctx}, + * {@link Task#batch batch}, + * {@link Task#sequence sequence}, + * {@link Task#page page} + * + * @example + * db.task(t => { + * // t = task protocol context; + * // t.ctx = Task Context; + * return t.one('select * from users where id=$1', 123) + * .then(user => { + * return t.any('select * from events where login=$1', user.name); + * }); + * }) + * .then(events => { + * // success; + * }) + * .catch(error => { + * // error; + * }); + * + */ +function Task(ctx, tag, isTX, config) { + + const $p = config.promise; + + /** + * @member {TaskContext} Task#ctx + * @readonly + * @description + * Task/Transaction Context object - contains individual properties for each task/transaction. + * + * @see event {@link event:query query} + * + * @example + * + * db.task(t => { + * return t.ctx; // task context object + * }) + * .then(ctx => { + * console.log('Task Duration:', ctx.duration); + * }); + * + * @example + * + * db.tx(t => { + * return t.ctx; // transaction context object + * }) + * .then(ctx => { + * console.log('Transaction Duration:', ctx.duration); + * }); + */ + this.ctx = ctx.ctx = {}; // task context object; + + npm.utils.addReadProp(this.ctx, `isTX`, isTX); + + if (`context` in ctx) { + npm.utils.addReadProp(this.ctx, `context`, ctx.context); + } + + npm.utils.addReadProp(this.ctx, `connected`, !ctx.db); + npm.utils.addReadProp(this.ctx, `tag`, tag); + npm.utils.addReadProp(this.ctx, `dc`, ctx.dc); + npm.utils.addReadProp(this.ctx, `level`, ctx.level); + npm.utils.addReadProp(this.ctx, `inTransaction`, ctx.inTransaction); + + if (isTX) { + npm.utils.addReadProp(this.ctx, `txLevel`, ctx.txLevel); + } + + npm.utils.addReadProp(this.ctx, `parent`, ctx.parentCtx); + + // generic query method; + this.query = function (query, values, qrm) { + if (!ctx.db) { + return $p.reject(new Error(npm.text.looseQuery)); + } + return config.$npm.query.call(this, ctx, query, values, qrm); + }; + + /** + * @method Task#batch + * @description + * Settles a predefined array of mixed values by redirecting to method $[spex.batch]. + * + * For complete method documentation see $[spex.batch]. + * + * @param {array} values + * @param {Object} [options] + * Optional Parameters. + * @param {function} [options.cb] + * + * @returns {external:Promise} + */ + this.batch = function (values, options) { + return config.$npm.spex.batch.call(this, values, options); + }; + + /** + * @method Task#page + * @description + * Resolves a dynamic sequence of arrays/pages with mixed values, by redirecting to method $[spex.page]. + * + * For complete method documentation see $[spex.page]. + * + * @param {function} source + * @param {Object} [options] + * Optional Parameters. + * @param {function} [options.dest] + * @param {number} [options.limit=0] + * + * @returns {external:Promise} + */ + this.page = function (source, options) { + return config.$npm.spex.page.call(this, source, options); + }; + + /** + * @method Task#sequence + * @description + * Resolves a dynamic sequence of mixed values by redirecting to method $[spex.sequence]. + * + * For complete method documentation see $[spex.sequence]. + * + * @param {function} source + * @param {Object} [options] + * Optional Parameters. + * @param {function} [options.dest] + * @param {number} [options.limit=0] + * @param {boolean} [options.track=false] + * + * @returns {external:Promise} + */ + this.sequence = function (source, options) { + return config.$npm.spex.sequence.call(this, source, options); + }; + +} + +/** + * @private + * @method Task.callback + * Callback invocation helper. + * + * @param ctx + * @param obj + * @param cb + * @param config + * @returns {Promise.} + */ +const callback = (ctx, obj, cb, config) => { + + const $p = config.promise; + let result; + + try { + if (cb.constructor.name === `GeneratorFunction`) { + // v9.0 dropped all support for ES6 generator functions; + // Clients should use the new ES7 async/await syntax. + throw new TypeError(`ES6 generator functions are no longer supported!`); + } + result = cb.call(obj, obj); // invoking the callback function; + } catch (err) { + Events.error(ctx.options, err, { + client: ctx.db && ctx.db.client, // the error can be due to loss of connectivity + dc: ctx.dc, + ctx: ctx.ctx + }); + return $p.reject(err); // reject with the error; + } + if (result && typeof result.then === `function`) { + return result; // result is a valid promise object; + } + return $p.resolve(result); +}; + +/** + * @private + * @method Task.execute + * Executes a task. + * + * @param ctx + * @param obj + * @param isTX + * @param config + * @returns {Promise.} + */ +const execute = (ctx, obj, isTX, config) => { + + const $p = config.promise; + + // updates the task context and notifies the client; + function update(start, success, result) { + const c = ctx.ctx; + if (start) { + npm.utils.addReadProp(c, `start`, new Date()); + } else { + c.finish = new Date(); + c.success = success; + c.result = result; + c.duration = c.finish - c.start; + npm.utils.lock(c, true); + } + (isTX ? Events.transact : Events.task)(ctx.options, { + client: ctx.db && ctx.db.client, // loss of connectivity is possible at this point + dc: ctx.dc, + ctx: c + }); + } + + let cbData, cbReason, success, + spName; // Save-Point Name; + + const capSQL = ctx.options.capSQL; // capitalize sql; + + update(true); + + if (isTX) { + // executing a transaction; + spName = `sp_${ctx.txLevel}_${ctx.nextTxCount}`; + return begin() + .then(() => callback(ctx, obj, ctx.cb, config) + .then(data => { + cbData = data; // save callback data; + success = true; + return commit(); + }, err => { + cbReason = err; // save callback failure reason; + return rollback(); + }) + .then(() => { + if (success) { + update(false, true, cbData); + return cbData; + } + update(false, false, cbReason); + return $p.reject(cbReason); + }, + err => { + // either COMMIT or ROLLBACK has failed, which is impossible + // to replicate in a test environment, so skipping from the test; + // istanbul ignore next: + update(false, false, err); + // istanbul ignore next: + return $p.reject(err); + }), + err => { + // BEGIN has failed, which is impossible to replicate in a test + // environment, so skipping the whole block from the test; + // istanbul ignore next: + update(false, false, err); + // istanbul ignore next: + return $p.reject(err); + }); + } + + function begin() { + if (!ctx.txLevel && ctx.mode instanceof npm.mode.TransactionMode) { + return exec(ctx.mode.begin(capSQL), `savepoint`); + } + return exec(`begin`, `savepoint`); + } + + function commit() { + return exec(`commit`, `release savepoint`); + } + + function rollback() { + return exec(`rollback`, `rollback to savepoint`); + } + + function exec(top, nested) { + if (ctx.txLevel) { + return obj.none((capSQL ? nested.toUpperCase() : nested) + ` ` + spName); + } + return obj.none(capSQL ? top.toUpperCase() : top); + } + + // executing a task; + return callback(ctx, obj, ctx.cb, config) + .then(data => { + update(false, true, data); + return data; + }) + .catch(error => { + update(false, false, error); + return $p.reject(error); + }); +}; + +module.exports = config => { + const npmLocal = config.$npm; + + // istanbul ignore next: + // we keep 'npm.query' initialization here, even though it is always + // pre-initialized by the 'database' module, for integrity purpose. + npmLocal.query = npmLocal.query || npm.query(config); + npmLocal.spex = npmLocal.spex || npm.spex(config.promiseLib); + + return { + Task, execute, callback + }; +}; + +/** + * @typedef TaskContext + * @description + * Task/Transaction Context used via property {@link Task#ctx ctx} inside tasks (methods {@link Database#task Database.task} and {@link Database#taskIf Database.taskIf}) + * and transactions (methods {@link Database#tx Database.tx} and {@link Database#txIf Database.txIf}). + * + * Properties `context`, `connected`, `parent`, `level`, `dc`, `isTX`, `tag`, `start`, `useCount` and `serverVersion` are set just before the operation has started, + * while properties `finish`, `duration`, `success` and `result` are set immediately after the operation has finished. + * + * @property {*} context + * If the operation was invoked with a calling context - `task.call(context,...)` or `tx.call(context,...)`, + * this property is set with the context that was passed in. Otherwise, the property doesn't exist. + * + * @property {*} dc + * _Database Context_ that was passed into the {@link Database} object during construction. + * + * @property {boolean} isTX + * Indicates whether this operation is a transaction (as opposed to a regular task). + * + * @property {number} duration + * Number of milliseconds consumed by the operation. + * + * Set after the operation has finished, it is simply a shortcut for `finish - start`. + * + * @property {number} level + * Task nesting level, starting from 0, counting both regular tasks and transactions. + * + * @property {number} txLevel + * Transaction nesting level, starting from 0. Transactions on level 0 use `BEGIN/COMMIT/ROLLBACK`, + * while transactions on nested levels use the corresponding `SAVEPOINT` commands. + * + * This property exists only within the context of a transaction (`isTX = true`). + * + * @property {boolean} inTransaction + * Available in both tasks and transactions, it simplifies checking when there is a transaction + * going on either on this level or above. + * + * For example, when you want to check for a containing transaction while inside a task, and + * only start a transaction when there is none yet. + * + * @property {TaskContext} parent + * Parent task/transaction context, or `null` when it is top-level. + * + * @property {boolean} connected + * Indicates when the task/transaction acquired the connection on its own (`connected = true`), and will release it once + * the operation has finished. When the value is `false`, the operation is reusing an existing connection. + * + * @property {*} tag + * Tag value as it was passed into the task. See methods {@link Database#task task} and {@link Database#tx tx}. + * + * @property {Date} start + * Date/Time of when this operation started the execution. + * + * @property {number} useCount + * Number of times the connection has been previously used, starting with 0 for a freshly + * allocated physical connection. + * + * @property {string} serverVersion + * **(Added in v10.1.0)** - Version of the PostgreSQL server to which we are connected. + * Not available with $[Native Bindings]. + * + * @property {Date} finish + * Once the operation has finished, this property is set to the Data/Time of when it happened. + * + * @property {boolean} success + * Once the operation has finished, this property indicates whether it was successful. + * + * @property {*} result + * Once the operation has finished, this property contains the result, depending on property `success`: + * - data resolved by the operation, if `success = true` + * - error / rejection reason, if `success = false` + * + */ diff --git a/server/node_modules/pg-promise/lib/text.js b/server/node_modules/pg-promise/lib/text.js new file mode 100644 index 0000000..3bf21e9 --- /dev/null +++ b/server/node_modules/pg-promise/lib/text.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +/* All error messages used in the module */ + +const streamVersion = require(`../package.json`) + .devDependencies[`pg-query-stream`]; + +module.exports = { + nativeError: `Failed to initialize Native Bindings.`, + + /* Database errors */ + queryDisconnected: `Cannot execute a query on a disconnected client.`, + invalidQuery: `Invalid query format.`, + invalidFunction: `Invalid function name.`, + invalidProc: `Invalid procedure name.`, + invalidMask: `Invalid Query Result Mask specified.`, + looseQuery: `Querying against a released or lost connection.`, + + /* result errors */ + notEmpty: `No return data was expected.`, + noData: `No data returned from the query.`, + multiple: `Multiple rows were not expected.`, + + /* streaming support */ + nativeStreaming: `Streaming doesn't work with Native Bindings.`, + invalidStream: `Invalid or missing stream object: pg-query-stream >= v${streamVersion} was expected`, + invalidStreamState: `Invalid stream state.`, + invalidStreamCB: `Invalid or missing stream initialization callback.`, + + /* connection errors */ + poolDestroyed: `Connection pool of the database object has been destroyed.`, + clientEnd: `Abnormal client.end() call, due to invalid code or failed server connection.` +}; diff --git a/server/node_modules/pg-promise/lib/tx-mode.js b/server/node_modules/pg-promise/lib/tx-mode.js new file mode 100644 index 0000000..dc51c9b --- /dev/null +++ b/server/node_modules/pg-promise/lib/tx-mode.js @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {InnerState} = require(`./inner-state`); +const {addInspection} = require(`./utils`); +const {assertOptions} = require(`assert-options`); + +/** + * @enum {number} + * @alias txMode.isolationLevel + * @readonly + * @summary Transaction Isolation Level. + * @description + * The type is available from the {@link txMode} namespace. + * + * @see $[Transaction Isolation] + */ +const isolationLevel = { + /** Isolation level not specified. */ + none: 0, + + /** ISOLATION LEVEL SERIALIZABLE */ + serializable: 1, + + /** ISOLATION LEVEL REPEATABLE READ */ + repeatableRead: 2, + + /** ISOLATION LEVEL READ COMMITTED */ + readCommitted: 3 + + // From the official documentation: http://www.postgresql.org/docs/9.5/static/sql-set-transaction.html + // The SQL standard defines one additional level, READ UNCOMMITTED. In PostgreSQL READ UNCOMMITTED is treated as READ COMMITTED. + // => skipping `READ UNCOMMITTED`. +}; + +/** + * @class txMode.TransactionMode + * @description + * Constructs a complete transaction-opening `BEGIN` command, from these options: + * - isolation level + * - access mode + * - deferrable mode + * + * The type is available from the {@link txMode} namespace. + * + * @param {} [options] + * Transaction Mode options. + * + * @param {txMode.isolationLevel} [options.tiLevel] + * Transaction Isolation Level. + * + * @param {boolean} [options.readOnly] + * Sets transaction access mode based on the read-only flag: + * - `undefined` - access mode not specified (default) + * - `true` - access mode is set to `READ ONLY` + * - `false` - access mode is set to `READ WRITE` + * + * @param {boolean} [options.deferrable] + * Sets transaction deferrable mode based on the boolean value: + * - `undefined` - deferrable mode not specified (default) + * - `true` - mode is set to `DEFERRABLE` + * - `false` - mode is set to `NOT DEFERRABLE` + * + * It is used only when `tiLevel`=`isolationLevel.serializable` + * and `readOnly`=`true`, or else it is ignored. + * + * @returns {txMode.TransactionMode} + * + * @see $[BEGIN], {@link txMode.isolationLevel} + * + * @example + * + * const {TransactionMode, isolationLevel} = pgp.txMode; + * + * // Create a reusable transaction mode (serializable + read-only + deferrable): + * const mode = new TransactionMode({ + * tiLevel: isolationLevel.serializable, + * readOnly: true, + * deferrable: true + * }); + * + * db.tx({mode}, t => { + * return t.any('SELECT * FROM table'); + * }) + * .then(data => { + * // success; + * }) + * .catch(error => { + * // error + * }); + * + * // Instead of the default BEGIN, such transaction will start with: + * + * // BEGIN ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE + * + */ +class TransactionMode extends InnerState { + + constructor(options) { + options = assertOptions(options, [`tiLevel`, `deferrable`, `readOnly`]); + const {readOnly, deferrable} = options; + let {tiLevel} = options; + let level, accessMode, deferrableMode, begin = `begin`; + tiLevel = (tiLevel > 0) ? parseInt(tiLevel) : 0; + + if (tiLevel > 0 && tiLevel < 4) { + const values = [`serializable`, `repeatable read`, `read committed`]; + level = `isolation level ` + values[tiLevel - 1]; + } + if (readOnly) { + accessMode = `read only`; + } else { + if (readOnly !== undefined) { + accessMode = `read write`; + } + } + // From the official documentation: http://www.postgresql.org/docs/9.5/static/sql-set-transaction.html + // The DEFERRABLE transaction property has no effect unless the transaction is also SERIALIZABLE and READ ONLY + if (tiLevel === isolationLevel.serializable && readOnly) { + if (deferrable) { + deferrableMode = `deferrable`; + } else { + if (deferrable !== undefined) { + deferrableMode = `not deferrable`; + } + } + } + if (level) { + begin += ` ` + level; + } + if (accessMode) { + begin += ` ` + accessMode; + } + if (deferrableMode) { + begin += ` ` + deferrableMode; + } + + super({begin, capBegin: begin.toUpperCase()}); + } + + /** + * @method txMode.TransactionMode#begin + * @description + * Returns a complete BEGIN statement, according to all the parameters passed into the class. + * + * This method is primarily for internal use by the library. + * + * @param {boolean} [cap=false] + * Indicates whether the returned SQL must be capitalized. + * + * @returns {string} + */ + begin(cap) { + return cap ? this._inner.capBegin : this._inner.begin; + } +} + +addInspection(TransactionMode, function () { + return this.begin(true); +}); + +/** + * @namespace txMode + * @description + * Transaction Mode namespace, available as `pgp.txMode`, before and after initializing the library. + * + * Extends the default `BEGIN` with Transaction Mode parameters: + * - isolation level + * - access mode + * - deferrable mode + * + * @property {function} TransactionMode + * {@link txMode.TransactionMode TransactionMode} class constructor. + * + * @property {txMode.isolationLevel} isolationLevel + * Transaction Isolation Level enumerator + * + * @see $[BEGIN] + */ +module.exports = { + isolationLevel, + TransactionMode +}; + diff --git a/server/node_modules/pg-promise/lib/types/index.js b/server/node_modules/pg-promise/lib/types/index.js new file mode 100644 index 0000000..5240615 --- /dev/null +++ b/server/node_modules/pg-promise/lib/types/index.js @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ServerFormatting} = require(`./server-formatting`); +const {PreparedStatement} = require(`./prepared-statement`); +const {ParameterizedQuery} = require(`./parameterized-query`); + +module.exports = { + ServerFormatting, + PreparedStatement, + ParameterizedQuery +}; diff --git a/server/node_modules/pg-promise/lib/types/parameterized-query.js b/server/node_modules/pg-promise/lib/types/parameterized-query.js new file mode 100644 index 0000000..b52275f --- /dev/null +++ b/server/node_modules/pg-promise/lib/types/parameterized-query.js @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ServerFormatting} = require(`./server-formatting`); +const {ParameterizedQueryError} = require(`../errors`); +const {QueryFile} = require(`../query-file`); +const {assertOptions} = require(`assert-options`); + +const npm = { + EOL: require(`os`).EOL, + utils: require(`../utils`) +}; + +/** + * @class ParameterizedQuery + * @description + * Constructs a new {@link ParameterizedQuery} object. All properties can also be set after the object's construction. + * + * This type extends the basic `{text, values}` object, i.e. when the basic object is used with a query method, + * a new {@link ParameterizedQuery} object is created in its place. + * + * The type can be used in place of the `query` parameter, with any query method directly. + * + * The type is available from the library's root: `pgp.ParameterizedQuery`. + * + * @param {string|QueryFile|Object} [options] + * Object configuration options / properties. + * + * @param {string|QueryFile} [options.text] - See property {@link ParameterizedQuery#text text}. + * @param {array} [options.values] - See property {@link ParameterizedQuery#values values}. + * @param {boolean} [options.binary] - See property {@link ParameterizedQuery#binary binary}. + * @param {string} [options.rowMode] - See property {@link ParameterizedQuery#rowMode rowMode}. + * + * @returns {ParameterizedQuery} + * + * @see + * {@link errors.ParameterizedQueryError ParameterizedQueryError} + * + * @example + * + * const {ParameterizedQuery: PQ} = require('pg-promise'); + * + * // Creating a complete Parameterized Query with parameters: + * const findUser = new PQ({text: 'SELECT * FROM Users WHERE id = $1', values: [123]}); + * + * db.one(findUser) + * .then(user => { + * // user found; + * }) + * .catch(error => { + * // error; + * }); + * + * @example + * + * const {ParameterizedQuery: PQ} = require('pg-promise'); + * + * // Creating a reusable Parameterized Query without values: + * const addUser = new PQ('INSERT INTO Users(name, age) VALUES($1, $2)'); + * + * // setting values explicitly: + * addUser.values = ['John', 30]; + * + * db.none(addUser) + * .then(() => { + * // user added; + * }) + * .catch(error=> { + * // error; + * }); + * + * // setting values implicitly, by passing them into the query method: + * db.none(addUser, ['Mike', 25]) + * .then(() => { + * // user added; + * }) + * .catch(error=> { + * // error; + * }); + */ +class ParameterizedQuery extends ServerFormatting { + constructor(options) { + if (typeof options === `string` || options instanceof QueryFile) { + options = { + text: options + }; + } else { + options = assertOptions(options, [`text`, `values`, `binary`, `rowMode`]); + } + super(options); + } +} + +/** + * @method ParameterizedQuery#parse + * @description + * Parses the current object and returns a simple `{text, values}`, if successful, + * or else it returns a {@link errors.ParameterizedQueryError ParameterizedQueryError} object. + * + * This method is primarily for internal use by the library. + * + * @returns {{text, values}|errors.ParameterizedQueryError} + */ +ParameterizedQuery.prototype.parse = function () { + + const _i = this._inner, options = _i.options; + const qf = options.text instanceof QueryFile ? options.text : null; + + if (!_i.changed && !qf) { + return _i.target; + } + + const errors = [], values = _i.target.values; + _i.target = { + text: options.text + }; + _i.changed = true; + _i.currentError = undefined; + + if (qf) { + qf.prepare(); + if (qf.error) { + errors.push(qf.error); + } else { + _i.target.text = qf[QueryFile.$query]; + } + } + + if (!npm.utils.isText(_i.target.text)) { + errors.push(`Property 'text' must be a non-empty text string.`); + } + + if (!npm.utils.isNull(values)) { + _i.target.values = values; + } + + if (options.binary !== undefined) { + _i.target.binary = !!options.binary; + } + + if (options.rowMode !== undefined) { + _i.target.rowMode = options.rowMode; + } + + if (errors.length) { + return _i.currentError = new ParameterizedQueryError(errors[0], _i.target); + } + + _i.changed = false; + + return _i.target; +}; + +/** + * @method ParameterizedQuery#toString + * @description + * Creates a well-formatted multi-line string that represents the object's current state. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +ParameterizedQuery.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap = npm.utils.messageGap(level + 1); + const pq = this.parse(); + const lines = [ + `ParameterizedQuery {` + ]; + if (npm.utils.isText(pq.text)) { + lines.push(gap + `text: "` + pq.text + `"`); + } + if (this.values !== undefined) { + lines.push(gap + `values: ` + npm.utils.toJson(this.values)); + } + if (this.binary !== undefined) { + lines.push(gap + `binary: ` + npm.utils.toJson(this.binary)); + } + if (this.rowMode !== undefined) { + lines.push(gap + `rowMode: ` + npm.utils.toJson(this.rowMode)); + } + if (this.error !== undefined) { + lines.push(gap + `error: ` + this.error.toString(level + 1)); + } + lines.push(npm.utils.messageGap(level) + `}`); + return lines.join(npm.EOL); +}; + +module.exports = {ParameterizedQuery}; + +/** + * @name ParameterizedQuery#text + * @type {string|QueryFile} + * @description + * A non-empty query string or a {@link QueryFile} object. + * + * Only the basic variables (`$1`, `$2`, etc) can be used in the query, because _Parameterized Queries_ + * are formatted on the server side. + */ + +/** + * @name ParameterizedQuery#values + * @type {array} + * @description + * Query formatting parameters, depending on the type: + * + * - `null` / `undefined` means the query has no formatting parameters + * - `Array` - it is an array of formatting parameters + * - None of the above, means it is a single formatting value, which + * is then automatically wrapped into an array + */ + +/** + * @name ParameterizedQuery#binary + * @type {boolean} + * @default undefined + * @description + * Activates binary result mode. The default is the text mode. + * + * @see {@link http://www.postgresql.org/docs/devel/static/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY Extended Query} + */ + +/** + * @name ParameterizedQuery#rowMode + * @type {string} + * @default undefined + * @description + * Changes the way data arrives to the client, with only one value supported by $[pg]: + * - `array` will make all data rows arrive as arrays of values. By default, rows arrive as objects. + */ + +/** + * @name ParameterizedQuery#error + * @type {errors.ParameterizedQueryError} + * @default undefined + * @readonly + * @description + * When in an error state, it is set to a {@link errors.ParameterizedQueryError ParameterizedQueryError} object. Otherwise, it is `undefined`. + * + * This property is primarily for internal use by the library. + */ diff --git a/server/node_modules/pg-promise/lib/types/prepared-statement.js b/server/node_modules/pg-promise/lib/types/prepared-statement.js new file mode 100644 index 0000000..d0a2823 --- /dev/null +++ b/server/node_modules/pg-promise/lib/types/prepared-statement.js @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {ServerFormatting} = require(`./server-formatting`); +const {PreparedStatementError} = require(`../errors`); +const {QueryFile} = require(`../query-file`); +const {assertOptions} = require(`assert-options`); + +const npm = { + EOL: require(`os`).EOL, + utils: require(`../utils`) +}; + +/** + * @class PreparedStatement + * @description + * Constructs a new $[Prepared Statement] object. All properties can also be set after the object's construction. + * + * This type extends the basic `{name, text, values}` object, i.e. when the basic object is used + * with a query method, a new {@link PreparedStatement} object is created in its place. + * + * The type can be used in place of the `query` parameter, with any query method directly. + * + * The type is available from the library's root: `pgp.PreparedStatement`. + * + * @param {Object} [options] + * Object configuration options / properties. + * + * @param {string} [options.name] - See property {@link PreparedStatement#name name}. + * @param {string|QueryFile} [options.text] - See property {@link PreparedStatement#text text}. + * @param {array} [options.values] - See property {@link PreparedStatement#values values}. + * @param {boolean} [options.binary] - See property {@link PreparedStatement#binary binary}. + * @param {string} [options.rowMode] - See property {@link PreparedStatement#rowMode rowMode}. + * @param {number} [options.rows] - See property {@link PreparedStatement#rows rows}. + * + * @returns {PreparedStatement} + * + * @see + * {@link errors.PreparedStatementError PreparedStatementError}, + * {@link http://www.postgresql.org/docs/9.6/static/sql-prepare.html PostgreSQL Prepared Statements} + * + * @example + * + * const {PreparedStatement: PS} = require('pg-promise'); + * + * // Creating a complete Prepared Statement with parameters: + * const findUser = new PS({name: 'find-user', text: 'SELECT * FROM Users WHERE id = $1', values: [123]}); + * + * db.one(findUser) + * .then(user => { + * // user found; + * }) + * .catch(error => { + * // error; + * }); + * + * @example + * + * const {PreparedStatement: PS} = require('pg-promise'); + * + * // Creating a reusable Prepared Statement without values: + * const addUser = new PS({name: 'add-user', text: 'INSERT INTO Users(name, age) VALUES($1, $2)'}); + * + * // setting values explicitly: + * addUser.values = ['John', 30]; + * + * db.none(addUser) + * .then(() => { + * // user added; + * }) + * .catch(error => { + * // error; + * }); + * + * // setting values implicitly, by passing them into the query method: + * db.none(addUser, ['Mike', 25]) + * .then(() => { + * // user added; + * }) + * .catch(error => { + * // error; + * }); + */ +class PreparedStatement extends ServerFormatting { + constructor(options) { + options = assertOptions(options, [`name`, `text`, `values`, `binary`, `rowMode`, `rows`]); + super(options); + } + + /** + * @name PreparedStatement#name + * @type {string} + * @description + * An arbitrary name given to this particular prepared statement. It must be unique within a single session and is + * subsequently used to execute or deallocate a previously prepared statement. + */ + get name() { + return this._inner.options.name; + } + + set name(value) { + const _i = this._inner; + if (value !== _i.options.name) { + _i.options.name = value; + _i.changed = true; + } + } + + /** + * @name PreparedStatement#rows + * @type {number} + * @description + * Number of rows to return at a time from a Prepared Statement's portal. + * The default is 0, which means that all rows must be returned at once. + */ + get rows() { + return this._inner.options.rows; + } + + set rows(value) { + const _i = this._inner; + if (value !== _i.options.rows) { + _i.options.rows = value; + _i.changed = true; + } + } +} + +/** + * @method PreparedStatement#parse + * @description + * Parses the current object and returns a simple `{name, text, values}`, if successful, + * or else it returns a {@link errors.PreparedStatementError PreparedStatementError} object. + * + * This method is primarily for internal use by the library. + * + * @returns {{name, text, values}|errors.PreparedStatementError} + */ +PreparedStatement.prototype.parse = function () { + + const _i = this._inner, options = _i.options; + + const qf = options.text instanceof QueryFile ? options.text : null; + + if (!_i.changed && !qf) { + return _i.target; + } + + const errors = [], values = _i.target.values; + _i.target = { + name: options.name, + text: options.text + }; + _i.changed = true; + _i.currentError = undefined; + + if (!npm.utils.isText(_i.target.name)) { + errors.push(`Property 'name' must be a non-empty text string.`); + } + + if (qf) { + qf.prepare(); + if (qf.error) { + errors.push(qf.error); + } else { + _i.target.text = qf[QueryFile.$query]; + } + } + if (!npm.utils.isText(_i.target.text)) { + errors.push(`Property 'text' must be a non-empty text string.`); + } + + if (!npm.utils.isNull(values)) { + _i.target.values = values; + } + + if (options.binary !== undefined) { + _i.target.binary = !!options.binary; + } + + if (options.rowMode !== undefined) { + _i.target.rowMode = options.rowMode; + } + + if (options.rows !== undefined) { + _i.target.rows = options.rows; + } + + if (errors.length) { + return _i.currentError = new PreparedStatementError(errors[0], _i.target); + } + + _i.changed = false; + + return _i.target; +}; + +/** + * @method PreparedStatement#toString + * @description + * Creates a well-formatted multi-line string that represents the object's current state. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +PreparedStatement.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap = npm.utils.messageGap(level + 1); + const ps = this.parse(); + const lines = [ + `PreparedStatement {`, + gap + `name: ` + npm.utils.toJson(this.name) + ]; + if (npm.utils.isText(ps.text)) { + lines.push(gap + `text: "` + ps.text + `"`); + } + if (this.values !== undefined) { + lines.push(gap + `values: ` + npm.utils.toJson(this.values)); + } + if (this.binary !== undefined) { + lines.push(gap + `binary: ` + npm.utils.toJson(this.binary)); + } + if (this.rowMode !== undefined) { + lines.push(gap + `rowMode: ` + npm.utils.toJson(this.rowMode)); + } + if (this.rows !== undefined) { + lines.push(gap + `rows: ` + npm.utils.toJson(this.rows)); + } + if (this.error) { + lines.push(gap + `error: ` + this.error.toString(level + 1)); + } + lines.push(npm.utils.messageGap(level) + `}`); + return lines.join(npm.EOL); +}; + +module.exports = {PreparedStatement}; + +/** + * @name PreparedStatement#text + * @type {string|QueryFile} + * @description + * A non-empty query string or a {@link QueryFile} object. + * + * Only the basic variables (`$1`, `$2`, etc) can be used in the query, because $[Prepared Statements] + * are formatted on the server side. + * + * Changing this property for the same {@link PreparedStatement#name name} will have no effect, because queries + * for Prepared Statements are cached by the server, with {@link PreparedStatement#name name} being the cache key. + */ + +/** + * @name PreparedStatement#values + * @type {array} + * @description + * Query formatting parameters, depending on the type: + * + * - `null` / `undefined` means the query has no formatting parameters + * - `Array` - it is an array of formatting parameters + * - None of the above, means it is a single formatting value, which + * is then automatically wrapped into an array + */ + +/** + * @name PreparedStatement#binary + * @type {boolean} + * @default undefined + * @description + * Activates binary result mode. The default is the text mode. + * + * @see {@link http://www.postgresql.org/docs/devel/static/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY Extended Query} + */ + +/** + * @name PreparedStatement#rowMode + * @type {string} + * @default undefined + * @description + * Changes the way data arrives to the client, with only one value supported by $[pg]: + * - `array` will make all data rows arrive as arrays of values. By default, rows arrive as objects. + */ + +/** + * @name PreparedStatement#error + * @type {errors.PreparedStatementError} + * @default undefined + * @description + * When in an error state, it is set to a {@link errors.PreparedStatementError PreparedStatementError} object. Otherwise, it is `undefined`. + * + * This property is primarily for internal use by the library. + */ diff --git a/server/node_modules/pg-promise/lib/types/server-formatting.js b/server/node_modules/pg-promise/lib/types/server-formatting.js new file mode 100644 index 0000000..95553b2 --- /dev/null +++ b/server/node_modules/pg-promise/lib/types/server-formatting.js @@ -0,0 +1,97 @@ +const {InnerState} = require(`../inner-state`); +const {addInspection} = require(`../utils`); +const utils = require(`../utils`); + +/** + * @private + * @class ServerFormatting + */ +class ServerFormatting extends InnerState { + + constructor(options) { + const _inner = { + options, + changed: true, + currentError: undefined, + target: {} + }; + super(_inner); + setValues.call(this, options.values); + } + + get error() { + return this._inner.currentError; + } + + get text() { + return this._inner.options.text; + } + + set text(value) { + const _i = this._inner; + if (value !== _i.options.text) { + _i.options.text = value; + _i.changed = true; + } + } + + get binary() { + return this._inner.options.binary; + } + + set binary(value) { + const _i = this._inner; + if (value !== _i.options.binary) { + _i.options.binary = value; + _i.changed = true; + } + } + + get rowMode() { + return this._inner.options.rowMode; + } + + set rowMode(value) { + const _i = this._inner; + if (value !== _i.options.rowMode) { + _i.options.rowMode = value; + _i.changed = true; + } + } + + get values() { + return this._inner.target.values; + } + + set values(values) { + setValues.call(this, values); + } + +} + +/** + * @member ServerFormatting#parse + */ + +function setValues(v) { + const target = this._inner.target; + if (Array.isArray(v)) { + if (v.length) { + target.values = v; + } else { + delete target.values; + } + } else { + if (utils.isNull(v)) { + delete target.values; + } else { + target.values = [v]; + } + } +} + +addInspection(ServerFormatting, function () { + return this.toString(); +}); + +module.exports = {ServerFormatting}; diff --git a/server/node_modules/pg-promise/lib/utils/README.md b/server/node_modules/pg-promise/lib/utils/README.md new file mode 100644 index 0000000..b752ce3 --- /dev/null +++ b/server/node_modules/pg-promise/lib/utils/README.md @@ -0,0 +1,13 @@ +### `utils` namespace + +This folder contains everything that's available via the [utils] namespace, before and after initialization: + +```js +const pgpLib = require('pg-promise'); +const pgp = pgpLib(/*initialization options*/); + +pgpLib.utils; // `utils` namespace +pgp.utils; // `utils` namespace +``` + +[utils]:http://vitaly-t.github.io/pg-promise/utils.html diff --git a/server/node_modules/pg-promise/lib/utils/color.js b/server/node_modules/pg-promise/lib/utils/color.js new file mode 100644 index 0000000..77e8aa5 --- /dev/null +++ b/server/node_modules/pg-promise/lib/utils/color.js @@ -0,0 +1,68 @@ +const util = require(`util`); + +class ColorConsole { + + static log() { + ColorConsole.writeNormal([...arguments], 39); // white + } + + static info() { + ColorConsole.writeNormal([...arguments], 36); // cyan + } + + static success() { + ColorConsole.writeNormal([...arguments], 32); // green + } + + static warn() { + ColorConsole.writeNormal([...arguments], 33); // yellow + } + + static error() { + ColorConsole.writeError([...arguments], 31); // red + } + + static writeNormal(params, color) { + // istanbul ignore else + if (process.stdout.isTTY) { + console.log.apply(null, ColorConsole.formatColor(params, color)); // eslint-disable-line no-console + } else { + console.log.apply(null, params); // eslint-disable-line no-console + } + } + + static writeError(params, color) { + // istanbul ignore else + if (process.stderr.isTTY) { + console.error.apply(null, ColorConsole.formatColor(params, color)); // eslint-disable-line no-console + } else { + console.error.apply(null, params); // eslint-disable-line no-console + } + } + + static formatColor(args, color) { + return args.map(a => `\x1b[${color}m${util.format(a)}\x1b[0m`); + } +} + +ColorConsole.log.bright = function () { + ColorConsole.writeNormal([...arguments], 97); // light white +}; + +ColorConsole.info.bright = function () { + ColorConsole.writeNormal([...arguments], 93); // light cyan +}; + +ColorConsole.success.bright = function () { + ColorConsole.writeNormal([...arguments], 92); // light green +}; + +ColorConsole.warn.bright = function () { + ColorConsole.writeNormal([...arguments], 93); // light yellow +}; + +ColorConsole.error.bright = function () { + ColorConsole.writeError([...arguments], 91); // light red +}; + +module.exports = {ColorConsole}; diff --git a/server/node_modules/pg-promise/lib/utils/index.js b/server/node_modules/pg-promise/lib/utils/index.js new file mode 100644 index 0000000..653d52c --- /dev/null +++ b/server/node_modules/pg-promise/lib/utils/index.js @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const npm = { + path: require(`path`), + util: require(`util`), + patterns: require(`../patterns`), + os: require(`os`) +}; + +//////////////////////////////////////////// +// Simpler check for null/undefined; +function isNull(value) { + return value === null || value === undefined; +} + +//////////////////////////////////////////////////////// +// Verifies parameter for being a non-empty text string; +function isText(txt) { + return txt && typeof txt === `string` && /\S/.test(txt); +} + +/////////////////////////////////////////////////////////// +// Approximates the environment as being for development. +// +// Proper configuration is having NODE_ENV = 'development', but this +// method only checks for 'dev' being present, and regardless of the case. +function isDev() { + const env = global.process.env.NODE_ENV || ``; + return env.toLowerCase().indexOf(`dev`) !== -1; +} + +/////////////////////////////////////////////////// +// Locks all properties in an object to read-only, +// or freezes the entire object for any changes. +function lock(obj, freeze, options) { + if (options && options.noLocking) { + return; + } + if (freeze) { + Object.freeze(obj); // freeze the entire object, permanently; + } else { + const desc = { + writable: false, + configurable: false, + enumerable: true + }; + for (const p in obj) { + Object.defineProperty(obj, p, desc); + } + } +} + +///////////////////////////////////////////// +// Adds properties from source to the target, +// making them read-only and enumerable. +function addReadProperties(target, source) { + for (const p in source) { + addReadProp(target, p, source[p]); + } +} + +/////////////////////////////////////////////////////// +// Adds a read-only, non-deletable enumerable property. +function addReadProp(obj, name, value, hidden) { + Object.defineProperty(obj, name, { + value, + configurable: false, + enumerable: !hidden, + writable: false + }); +} + +////////////////////////////////////////////////////////////// +// Converts a connection string or object into its safe copy: +// if password is present, it is masked with symbol '#'. +function getSafeConnection(cn) { + const maskPassword = cs => cs.replace(/:(?![/])([^@]+)/, (_, m) => `:` + new Array(m.length + 1).join(`#`)); + if (typeof cn === `object`) { + const copy = Object.assign({}, cn); + if (typeof copy.password === `string`) { + copy.password = copy.password.replace(/./g, `#`); + } + if (typeof copy.connectionString === `string`) { + copy.connectionString = maskPassword(copy.connectionString); + } + return copy; + } + return maskPassword(cn); +} + +/////////////////////////////////////////// +// Returns a space gap for console output; +function messageGap(level) { + return ` `.repeat(level * 4); +} + +///////////////////////////////////////// +// Provides platform-neutral inheritance; +function inherits(child, parent) { + child.prototype.__proto__ = parent.prototype; +} + +// istanbul ignore next +function getLocalStack(startIdx, maxLines) { + // from the call stack, we take up to maximum lines, + // starting with specified line index: + startIdx = startIdx || 0; + const endIdx = maxLines > 0 ? startIdx + maxLines : undefined; + return new Error().stack + .split(`\n`) + .filter(line => line.match(/\(.+\)/)) + .slice(startIdx, endIdx) + .join(`\n`); +} + +////////////////////////////// +// Internal error container; +function InternalError(error) { + this.error = error; +} + +///////////////////////////////////////////////////////////////// +// Parses a property name, and gets its name from the object, +// if the property exists. Returns object {valid, has, target, value}: +// - valid - true/false, whether the syntax is valid +// - has - a flag that property exists; set when 'valid' = true +// - target - the target object that contains the property; set when 'has' = true +// - value - the value; set when 'has' = true +function getIfHas(obj, prop) { + const result = {valid: true}; + if (prop.indexOf(`.`) === -1) { + result.has = prop in obj; + result.target = obj; + if (result.has) { + result.value = obj[prop]; + } + } else { + const names = prop.split(`.`); + let missing, target; + for (let i = 0; i < names.length; i++) { + const n = names[i]; + if (!n) { + result.valid = false; + return result; + } + if (!missing && hasProperty(obj, n)) { + target = obj; + obj = obj[n]; + } else { + missing = true; + } + } + result.has = !missing; + if (result.has) { + result.target = target; + result.value = obj; + } + } + return result; +} + +///////////////////////////////////////////////////////////////////////// +// Checks if the property exists in the object or value or its prototype; +function hasProperty(value, prop) { + return (value && typeof value === `object` && prop in value) || + value !== null && value !== undefined && value[prop] !== undefined; +} + +//////////////////////////////////////////////////////// +// Adds prototype inspection +function addInspection(type, cb) { + type.prototype[npm.util.inspect.custom] = cb; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Identifies a general connectivity error, after which no more queries can be executed. +// This is for detecting when to skip executing ROLLBACK for a failed transaction. +function isConnectivityError(err) { + const code = err && typeof err.code === `string` && err.code; + const cls = code && code.substr(0, 2); // Error Class + // istanbul ignore next (we cannot test-cover all error cases): + return code === `ECONNRESET` || (cls === `08` && code !== `08P01`) || (cls === `57` && code !== `57014`); + // Code 'ECONNRESET' - Connectivity issue handled by the driver. + // Class 08 - Connection Exception (except for 08P01, for protocol violation). + // Class 57 - Operator Intervention (except for 57014, for cancelled queries). + // + // ERROR CODES: https://www.postgresql.org/docs/9.6/static/errcodes-appendix.html +} + +/////////////////////////////////////////////////////////////// +// Does JSON.stringify, with support for BigInt (irreversible) +function toJson(data) { + if (data !== undefined) { + return JSON.stringify(data, (_, v) => typeof v === `bigint` ? `${v}#bigint` : v) + .replace(/"(-?\d+)#bigint"/g, (_, a) => a); + } +} + +const platform = npm.os.platform(); + +const exp = { + toJson, + getIfHas, + addInspection, + InternalError, + getLocalStack, + lock, + isText, + isNull, + isDev, + platform: { + isWindows: platform === `win32`, + isMac: platform === `darwin` + }, + addReadProp, + addReadProperties, + getSafeConnection, + messageGap, + inherits, + isConnectivityError +}; + +const mainFile = process.argv[1]; + +// istanbul ignore next +exp.startDir = mainFile ? npm.path.dirname(mainFile) : process.cwd(); + +module.exports = exp; diff --git a/server/node_modules/pg-promise/lib/utils/public.js b/server/node_modules/pg-promise/lib/utils/public.js new file mode 100644 index 0000000..668a8f5 --- /dev/null +++ b/server/node_modules/pg-promise/lib/utils/public.js @@ -0,0 +1,312 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +const {assertOptions} = require(`assert-options`); + +const npm = { + fs: require(`fs`), + path: require(`path`), + utils: require(`./`), + package: require(`../../package.json`) +}; + +/** + * @method utils.camelize + * @description + * Camelizes a text string. + * + * Case-changing characters include: + * - _hyphen_ + * - _underscore_ + * - _period_ + * - _space_ + * + * @param {string} text + * Input text string. + * + * @returns {string} + * Camelized text string. + * + * @see + * {@link utils.camelizeVar camelizeVar} + * + */ +function camelize(text) { + text = text.replace(/[-_\s.]+(.)?/g, (_, c) => c ? c.toUpperCase() : ``); + return text.substr(0, 1).toLowerCase() + text.substr(1); +} + +/** + * @method utils.camelizeVar + * @description + * Camelizes a text string, while making it compliant with JavaScript variable names: + * - contains symbols `a-z`, `A-Z`, `0-9`, `_` and `$` + * - cannot have leading digits + * + * First, it removes all symbols that do not meet the above criteria, except for _hyphen_, _period_ and _space_, + * and then it forwards into {@link utils.camelize camelize}. + * + * @param {string} text + * Input text string. + * + * If it doesn't contain any symbols to make up a valid variable name, the result will be an empty string. + * + * @returns {string} + * Camelized text string that can be used as an open property name. + * + * @see + * {@link utils.camelize camelize} + * + */ +function camelizeVar(text) { + text = text.replace(/[^a-zA-Z0-9$_\-\s.]/g, ``).replace(/^[0-9_\-\s.]+/, ``); + return camelize(text); +} + +function _enumSql(dir, options, cb, namePath) { + const tree = {}; + npm.fs.readdirSync(dir).forEach(file => { + let stat; + const fullPath = npm.path.join(dir, file); + try { + stat = npm.fs.statSync(fullPath); + } catch (e) { + // while it is very easy to test manually, it is very difficult to test for + // access-denied errors automatically; therefore excluding from the coverage: + // istanbul ignore next + if (options.ignoreErrors) { + return; // on to the next file/folder; + } + // istanbul ignore next + throw e; + } + if (stat.isDirectory()) { + if (options.recursive) { + const dirName = camelizeVar(file); + const np = namePath ? (namePath + `.` + dirName) : dirName; + const t = _enumSql(fullPath, options, cb, np); + if (Object.keys(t).length) { + if (!dirName.length || dirName in tree) { + if (!options.ignoreErrors) { + throw new Error(`Empty or duplicate camelized folder name: ` + fullPath); + } + } + tree[dirName] = t; + } + } + } else { + if (npm.path.extname(file).toLowerCase() === `.sql`) { + const name = camelizeVar(file.replace(/\.[^/.]+$/, ``)); + if (!name.length || name in tree) { + if (!options.ignoreErrors) { + throw new Error(`Empty or duplicate camelized file name: ` + fullPath); + } + } + tree[name] = fullPath; + if (cb) { + const result = cb(fullPath, name, namePath ? (namePath + `.` + name) : name); + if (result !== undefined) { + tree[name] = result; + } + } + } + } + }); + return tree; +} + +/** + * @method utils.enumSql + * @description + * Synchronously enumerates all SQL files (within a given directory) into a camelized SQL tree. + * + * All property names within the tree are camelized via {@link utils.camelizeVar camelizeVar}, + * so they can be used in the code directly, as open property names. + * + * @param {string} dir + * Directory path where SQL files are located, either absolute or relative to the current directory. + * + * SQL files are identified by using `.sql` extension (case-insensitive). + * + * @param {{}} [options] + * Search options. + * + * @param {boolean} [options.recursive=false] + * Include sub-directories into the search. + * + * Sub-directories without SQL files will be skipped from the result. + * + * @param {boolean} [options.ignoreErrors=false] + * Ignore the following types of errors: + * - access errors, when there is no read access to a file or folder + * - empty or duplicate camelized property names + * + * This flag does not affect errors related to invalid input parameters, or if you pass in a + * non-existing directory. + * + * @param {function} [cb] + * A callback function that takes three arguments: + * - `file` - SQL file path, relative or absolute, according to how you specified the search directory + * - `name` - name of the property that represents the SQL file + * - `path` - property resolution path (full property name) + * + * If the function returns anything other than `undefined`, it overrides the corresponding property value in the tree. + * + * @returns {object} + * Camelized SQL tree object, with each value being an SQL file path (unless changed via the callback). + * + * @example + * + * // simple SQL tree generation for further processing: + * const tree = pgp.utils.enumSql('../sql', {recursive: true}); + * + * @example + * + * // generating an SQL tree for dynamic use of names: + * const sql = pgp.utils.enumSql(__dirname, {recursive: true}, file => { + * return new pgp.QueryFile(file, {minify: true}); + * }); + * + * @example + * + * const {join: joinPath} = require('path'); + * + * // replacing each relative path in the tree with a full one: + * const tree = pgp.utils.enumSql('../sql', {recursive: true}, file => { + * return joinPath(__dirname, file); + * }); + * + */ +function enumSql(dir, options, cb) { + if (!npm.utils.isText(dir)) { + throw new TypeError(`Parameter 'dir' must be a non-empty text string.`); + } + options = assertOptions(options, [`recursive`, `ignoreErrors`]); + cb = (typeof cb === `function`) ? cb : null; + return _enumSql(dir, options, cb, ``); +} + +/** + * @method utils.taskArgs + * @description + * Normalizes/prepares arguments for tasks and transactions. + * + * Its main purpose is to simplify adding custom methods {@link Database#task task}, {@link Database#taskIf taskIf}, + * {@link Database#tx tx} and {@link Database#txIf txIf} within event {@link event:extend extend}, as the those methods use fairly + * complex logic for parsing inputs. + * + * @param args {Object} + * Array-like object of `arguments` that was passed into the method. It is expected that the `arguments` + * are always made of two parameters - `(options, cb)`, same as all the default task/transaction methods. + * + * And if your custom method needs additional parameters, they should be passed in as extra properties within `options`. + * + * @returns {Array} + * Array of arguments that can be passed into a task or transaction. + * + * It is extended with properties `options` and `cb` to access the corresponding array elements `[0]` and `[1]` by name. + * + * @example + * + * // Registering a custom transaction method that assigns a default Transaction Mode: + * + * const initOptions = { + * extend: obj => { + * obj.myTx = function(options, cb) { + * const args = pgp.utils.taskArgs(arguments); // prepare arguments + * + * if (!('mode' in args.options)) { + * // if no 'mode' was specified, set default for transaction mode: + * args.options.mode = myTxModeObject; // of type pgp.txMode.TransactionMode + * } + * + * return obj.tx.apply(this, args); + * // or explicitly, if needed: + * // return obj.tx.call(this, args.options, args.cb); + * } + * } + * }; + * + */ +function taskArgs(args) { + + if (!args || typeof args.length !== `number`) { + throw new TypeError(`Parameter 'args' must be an array-like object of arguments.`); + } + + let options = args[0], cb; + if (typeof options === `function`) { + cb = options; + options = {}; + if (cb.name) { + options.tag = cb.name; + } + } else { + if (typeof args[1] === `function`) { + cb = args[1]; + } + if (typeof options === `string` || typeof options === `number`) { + options = {tag: options}; + } else { + options = (typeof options === `object` && options) || {}; + if (!(`tag` in options) && cb && cb.name) { + options.tag = cb.name; + } + } + } + + const res = [options, cb]; + + Object.defineProperty(res, `options`, { + get: function () { + return this[0]; + }, + set: function (newValue) { + this[0] = newValue; + }, + enumerable: true + }); + + Object.defineProperty(res, `cb`, { + get: function () { + return this[1]; + }, + set: function (newValue) { + this[1] = newValue; + }, + enumerable: true + }); + + return res; +} + +/** + * @namespace utils + * + * @description + * Namespace for general-purpose static functions, available as `pgp.utils`, before and after initializing the library. + * + * @property {function} camelize + * {@link utils.camelize camelize} - camelizes a text string + * + * @property {function} camelizeVar + * {@link utils.camelizeVar camelizeVar} - camelizes a text string as a variable + * + * @property {function} enumSql + * {@link utils.enumSql enumSql} - enumerates SQL files in a directory + * + * @property {function} taskArgs + * {@link utils.taskArgs taskArgs} - prepares arguments for tasks and transactions + */ +module.exports = { + camelize, + camelizeVar, + enumSql, + taskArgs +}; diff --git a/server/node_modules/pg-promise/node_modules/pg-connection-string/LICENSE b/server/node_modules/pg-promise/node_modules/pg-connection-string/LICENSE new file mode 100644 index 0000000..b068a6c --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-connection-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Iced Development + +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. \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-connection-string/README.md b/server/node_modules/pg-promise/node_modules/pg-connection-string/README.md new file mode 100644 index 0000000..360505e --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-connection-string/README.md @@ -0,0 +1,77 @@ +pg-connection-string +==================== + +[![NPM](https://nodei.co/npm/pg-connection-string.png?compact=true)](https://nodei.co/npm/pg-connection-string/) + +[![Build Status](https://travis-ci.org/iceddev/pg-connection-string.svg?branch=master)](https://travis-ci.org/iceddev/pg-connection-string) +[![Coverage Status](https://coveralls.io/repos/github/iceddev/pg-connection-string/badge.svg?branch=master)](https://coveralls.io/github/iceddev/pg-connection-string?branch=master) + +Functions for dealing with a PostgresSQL connection string + +`parse` method taken from [node-postgres](https://github.com/brianc/node-postgres.git) +Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com) +MIT License + +## Usage + +```js +var parse = require('pg-connection-string').parse; + +var config = parse('postgres://someuser:somepassword@somehost:381/somedatabase') +``` + +The resulting config contains a subset of the following properties: + +* `host` - Postgres server hostname or, for UNIX domain sockets, the socket filename +* `port` - port on which to connect +* `user` - User with which to authenticate to the server +* `password` - Corresponding password +* `database` - Database name within the server +* `client_encoding` - string encoding the client will use +* `ssl`, either a boolean or an object with properties + * `rejectUnauthorized` + * `cert` + * `key` + * `ca` +* any other query parameters (for example, `application_name`) are preserved intact. + +## Connection Strings + +The short summary of acceptable URLs is: + + * `socket:?` - UNIX domain socket + * `postgres://:@:/?` - TCP connection + +But see below for more details. + +### UNIX Domain Sockets + +When user and password are not given, the socket path follows `socket:`, as in `socket:/var/run/pgsql`. +This form can be shortened to just a path: `/var/run/pgsql`. + +When user and password are given, they are included in the typical URL positions, with an empty `host`, as in `socket://user:pass@/var/run/pgsql`. + +Query parameters follow a `?` character, including the following special query parameters: + + * `db=` - sets the database name (urlencoded) + * `encoding=` - sets the `client_encoding` property + +### TCP Connections + +TCP connections to the Postgres server are indicated with `pg:` or `postgres:` schemes (in fact, any scheme but `socket:` is accepted). +If username and password are included, they should be urlencoded. +The database name, however, should *not* be urlencoded. + +Query parameters follow a `?` character, including the following special query parameters: + * `host=` - sets `host` property, overriding the URL's host + * `encoding=` - sets the `client_encoding` property + * `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly + * `sslmode=` + * `sslmode=disable` - sets `ssl` to false + * `sslmode=no-verify` - sets `ssl` to `{ rejectUnauthorized: false }` + * `sslmode=prefer`, `sslmode=require`, `sslmode=verify-ca`, `sslmode=verify-full` - sets `ssl` to true + * `sslcert=` - reads data from the given file and includes the result as `ssl.cert` + * `sslkey=` - reads data from the given file and includes the result as `ssl.key` + * `sslrootcert=` - reads data from the given file and includes the result as `ssl.ca` + +A bare relative URL, such as `salesdata`, will indicate a database name while leaving other properties empty. diff --git a/server/node_modules/pg-promise/node_modules/pg-connection-string/index.d.ts b/server/node_modules/pg-promise/node_modules/pg-connection-string/index.d.ts new file mode 100644 index 0000000..3081270 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-connection-string/index.d.ts @@ -0,0 +1,15 @@ +export function parse(connectionString: string): ConnectionOptions + +export interface ConnectionOptions { + host: string | null + password?: string + user?: string + port?: string | null + database: string | null | undefined + client_encoding?: string + ssl?: boolean | string + + application_name?: string + fallback_application_name?: string + options?: string +} diff --git a/server/node_modules/pg-promise/node_modules/pg-connection-string/index.js b/server/node_modules/pg-promise/node_modules/pg-connection-string/index.js new file mode 100644 index 0000000..995ff06 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-connection-string/index.js @@ -0,0 +1,106 @@ +'use strict' + +var url = require('url') +var fs = require('fs') + +//Parse method copied from https://github.com/brianc/node-postgres +//Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com) +//MIT License + +//parses a connection string +function parse(str) { + //unix socket + if (str.charAt(0) === '/') { + var config = str.split(' ') + return { host: config[0], database: config[1] } + } + + // url parse expects spaces encoded as %20 + var result = url.parse( + / |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str) ? encodeURI(str).replace(/\%25(\d\d)/g, '%$1') : str, + true + ) + var config = result.query + for (var k in config) { + if (Array.isArray(config[k])) { + config[k] = config[k][config[k].length - 1] + } + } + + var auth = (result.auth || ':').split(':') + config.user = auth[0] + config.password = auth.splice(1).join(':') + + config.port = result.port + if (result.protocol == 'socket:') { + config.host = decodeURI(result.pathname) + config.database = result.query.db + config.client_encoding = result.query.encoding + return config + } + if (!config.host) { + // Only set the host if there is no equivalent query param. + config.host = result.hostname + } + + // If the host is missing it might be a URL-encoded path to a socket. + var pathname = result.pathname + if (!config.host && pathname && /^%2f/i.test(pathname)) { + var pathnameSplit = pathname.split('/') + config.host = decodeURIComponent(pathnameSplit[0]) + pathname = pathnameSplit.splice(1).join('/') + } + // result.pathname is not always guaranteed to have a '/' prefix (e.g. relative urls) + // only strip the slash if it is present. + if (pathname && pathname.charAt(0) === '/') { + pathname = pathname.slice(1) || null + } + config.database = pathname && decodeURI(pathname) + + if (config.ssl === 'true' || config.ssl === '1') { + config.ssl = true + } + + if (config.ssl === '0') { + config.ssl = false + } + + if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) { + config.ssl = {} + } + + if (config.sslcert) { + config.ssl.cert = fs.readFileSync(config.sslcert).toString() + } + + if (config.sslkey) { + config.ssl.key = fs.readFileSync(config.sslkey).toString() + } + + if (config.sslrootcert) { + config.ssl.ca = fs.readFileSync(config.sslrootcert).toString() + } + + switch (config.sslmode) { + case 'disable': { + config.ssl = false + break + } + case 'prefer': + case 'require': + case 'verify-ca': + case 'verify-full': { + break + } + case 'no-verify': { + config.ssl.rejectUnauthorized = false + break + } + } + + return config +} + +module.exports = parse + +parse.parse = parse diff --git a/server/node_modules/pg-promise/node_modules/pg-connection-string/package.json b/server/node_modules/pg-promise/node_modules/pg-connection-string/package.json new file mode 100644 index 0000000..c4734c0 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-connection-string/package.json @@ -0,0 +1,69 @@ +{ + "_from": "pg-connection-string@^2.5.0", + "_id": "pg-connection-string@2.5.0", + "_inBundle": false, + "_integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", + "_location": "/pg-promise/pg-connection-string", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pg-connection-string@^2.5.0", + "name": "pg-connection-string", + "escapedName": "pg-connection-string", + "rawSpec": "^2.5.0", + "saveSpec": null, + "fetchSpec": "^2.5.0" + }, + "_requiredBy": [ + "/pg-promise/pg" + ], + "_resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "_shasum": "538cadd0f7e603fc09a12590f3b8a452c2c0cf34", + "_spec": "pg-connection-string@^2.5.0", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise/node_modules/pg", + "author": { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://iceddev.com/" + }, + "bugs": { + "url": "https://github.com/brianc/node-postgres/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Functions for dealing with a PostgresSQL connection string", + "devDependencies": { + "chai": "^4.1.1", + "coveralls": "^3.0.4", + "istanbul": "^0.4.5", + "mocha": "^7.1.2" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "gitHead": "d45947938263bec30a1e3252452f04177b785f66", + "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string", + "keywords": [ + "pg", + "connection", + "string", + "parse" + ], + "license": "MIT", + "main": "./index.js", + "name": "pg-connection-string", + "repository": { + "type": "git", + "url": "git://github.com/brianc/node-postgres.git", + "directory": "packages/pg-connection-string" + }, + "scripts": { + "check-coverage": "istanbul check-coverage --statements 100 --branches 100 --lines 100 --functions 100", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls", + "test": "istanbul cover _mocha && npm run check-coverage" + }, + "types": "./index.d.ts", + "version": "2.5.0" +} diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/LICENSE b/server/node_modules/pg-promise/node_modules/pg-pool/LICENSE new file mode 100644 index 0000000..4e90581 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Brian M. Carlson + +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. diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/README.md b/server/node_modules/pg-promise/node_modules/pg-pool/README.md new file mode 100644 index 0000000..c6d7e92 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/README.md @@ -0,0 +1,376 @@ +# pg-pool +[![Build Status](https://travis-ci.org/brianc/node-pg-pool.svg?branch=master)](https://travis-ci.org/brianc/node-pg-pool) + +A connection pool for node-postgres + +## install +```sh +npm i pg-pool pg +``` + +## use + +### create + +to use pg-pool you must first create an instance of a pool + +```js +var Pool = require('pg-pool') + +// by default the pool uses the same +// configuration as whatever `pg` version you have installed +var pool = new Pool() + +// you can pass properties to the pool +// these properties are passed unchanged to both the node-postgres Client constructor +// and the node-pool (https://github.com/coopernurse/node-pool) constructor +// allowing you to fully configure the behavior of both +var pool2 = new Pool({ + database: 'postgres', + user: 'brianc', + password: 'secret!', + port: 5432, + ssl: true, + max: 20, // set pool max size to 20 + idleTimeoutMillis: 1000, // close idle clients after 1 second + connectionTimeoutMillis: 1000, // return an error after 1 second if connection could not be established + maxUses: 7500, // close (and replace) a connection after it has been used 7500 times (see below for discussion) +}) + +//you can supply a custom client constructor +//if you want to use the native postgres client +var NativeClient = require('pg').native.Client +var nativePool = new Pool({ Client: NativeClient }) + +//you can even pool pg-native clients directly +var PgNativeClient = require('pg-native') +var pgNativePool = new Pool({ Client: PgNativeClient }) +``` + +##### Note: +The Pool constructor does not support passing a Database URL as the parameter. To use pg-pool on heroku, for example, you need to parse the URL into a config object. Here is an example of how to parse a Database URL. + +```js +const Pool = require('pg-pool'); +const url = require('url') + +const params = url.parse(process.env.DATABASE_URL); +const auth = params.auth.split(':'); + +const config = { + user: auth[0], + password: auth[1], + host: params.hostname, + port: params.port, + database: params.pathname.split('/')[1], + ssl: true +}; + +const pool = new Pool(config); + +/* + Transforms, 'postgres://DBuser:secret@DBHost:#####/myDB', into + config = { + user: 'DBuser', + password: 'secret', + host: 'DBHost', + port: '#####', + database: 'myDB', + ssl: true + } +*/ +``` + +### acquire clients with a promise + +pg-pool supports a fully promise-based api for acquiring clients + +```js +var pool = new Pool() +pool.connect().then(client => { + client.query('select $1::text as name', ['pg-pool']).then(res => { + client.release() + console.log('hello from', res.rows[0].name) + }) + .catch(e => { + client.release() + console.error('query error', e.message, e.stack) + }) +}) +``` + +### plays nice with async/await + +this ends up looking much nicer if you're using [co](https://github.com/tj/co) or async/await: + +```js +// with async/await +(async () => { + var pool = new Pool() + var client = await pool.connect() + try { + var result = await client.query('select $1::text as name', ['brianc']) + console.log('hello from', result.rows[0]) + } finally { + client.release() + } +})().catch(e => console.error(e.message, e.stack)) + +// with co +co(function * () { + var client = yield pool.connect() + try { + var result = yield client.query('select $1::text as name', ['brianc']) + console.log('hello from', result.rows[0]) + } finally { + client.release() + } +}).catch(e => console.error(e.message, e.stack)) +``` + +### your new favorite helper method + +because its so common to just run a query and return the client to the pool afterward pg-pool has this built-in: + +```js +var pool = new Pool() +var time = await pool.query('SELECT NOW()') +var name = await pool.query('select $1::text as name', ['brianc']) +console.log(name.rows[0].name, 'says hello at', time.rows[0].name) +``` + +you can also use a callback here if you'd like: + +```js +var pool = new Pool() +pool.query('SELECT $1::text as name', ['brianc'], function (err, res) { + console.log(res.rows[0].name) // brianc +}) +``` + +__pro tip:__ unless you need to run a transaction (which requires a single client for multiple queries) or you +have some other edge case like [streaming rows](https://github.com/brianc/node-pg-query-stream) or using a [cursor](https://github.com/brianc/node-pg-cursor) +you should almost always just use `pool.query`. Its easy, it does the right thing :tm:, and wont ever forget to return +clients back to the pool after the query is done. + +### drop-in backwards compatible + +pg-pool still and will always support the traditional callback api for acquiring a client. This is the exact API node-postgres has shipped with for years: + +```js +var pool = new Pool() +pool.connect((err, client, done) => { + if (err) return done(err) + + client.query('SELECT $1::text as name', ['pg-pool'], (err, res) => { + done() + if (err) { + return console.error('query error', e.message, e.stack) + } + console.log('hello from', res.rows[0].name) + }) +}) +``` + +### shut it down + +When you are finished with the pool if all the clients are idle the pool will close them after `config.idleTimeoutMillis` and your app +will shutdown gracefully. If you don't want to wait for the timeout you can end the pool as follows: + +```js +var pool = new Pool() +var client = await pool.connect() +console.log(await client.query('select now()')) +client.release() +await pool.end() +``` + +### a note on instances + +The pool should be a __long-lived object__ in your application. Generally you'll want to instantiate one pool when your app starts up and use the same instance of the pool throughout the lifetime of your application. If you are frequently creating a new pool within your code you likely don't have your pool initialization code in the correct place. Example: + +```js +// assume this is a file in your program at ./your-app/lib/db.js + +// correct usage: create the pool and let it live +// 'globally' here, controlling access to it through exported methods +var pool = new pg.Pool() + +// this is the right way to export the query method +module.exports.query = (text, values) => { + console.log('query:', text, values) + return pool.query(text, values) +} + +// this would be the WRONG way to export the connect method +module.exports.connect = () => { + // notice how we would be creating a pool instance here + // every time we called 'connect' to get a new client? + // that's a bad thing & results in creating an unbounded + // number of pools & therefore connections + var aPool = new pg.Pool() + return aPool.connect() +} +``` + +### events + +Every instance of a `Pool` is an event emitter. These instances emit the following events: + +#### error + +Emitted whenever an idle client in the pool encounters an error. This is common when your PostgreSQL server shuts down, reboots, or a network partition otherwise causes it to become unavailable while your pool has connected clients. + +Example: + +```js +const Pool = require('pg-pool') +const pool = new Pool() + +// attach an error handler to the pool for when a connected, idle client +// receives an error by being disconnected, etc +pool.on('error', function(error, client) { + // handle this in the same way you would treat process.on('uncaughtException') + // it is supplied the error as well as the idle client which received the error +}) +``` + +#### connect + +Fired whenever the pool creates a __new__ `pg.Client` instance and successfully connects it to the backend. + +Example: + +```js +const Pool = require('pg-pool') +const pool = new Pool() + +var count = 0 + +pool.on('connect', client => { + client.count = count++ +}) + +pool + .connect() + .then(client => { + return client + .query('SELECT $1::int AS "clientCount"', [client.count]) + .then(res => console.log(res.rows[0].clientCount)) // outputs 0 + .then(() => client) + }) + .then(client => client.release()) + +``` + +#### acquire + +Fired whenever the a client is acquired from the pool + +Example: + +This allows you to count the number of clients which have ever been acquired from the pool. + +```js +var Pool = require('pg-pool') +var pool = new Pool() + +var acquireCount = 0 +pool.on('acquire', function (client) { + acquireCount++ +}) + +var connectCount = 0 +pool.on('connect', function () { + connectCount++ +}) + +for (var i = 0; i < 200; i++) { + pool.query('SELECT NOW()') +} + +setTimeout(function () { + console.log('connect count:', connectCount) // output: connect count: 10 + console.log('acquire count:', acquireCount) // output: acquire count: 200 +}, 100) + +``` + +### environment variables + +pg-pool & node-postgres support some of the same environment variables as `psql` supports. The most common are: + +``` +PGDATABASE=my_db +PGUSER=username +PGPASSWORD="my awesome password" +PGPORT=5432 +PGSSLMODE=require +``` + +Usually I will export these into my local environment via a `.env` file with environment settings or export them in `~/.bash_profile` or something similar. This way I get configurability which works with both the postgres suite of tools (`psql`, `pg_dump`, `pg_restore`) and node, I can vary the environment variables locally and in production, and it supports the concept of a [12-factor app](http://12factor.net/) out of the box. + +## bring your own promise + +In versions of node `<=0.12.x` there is no native promise implementation available globally. You can polyfill the promise globally like this: + +```js +// first run `npm install promise-polyfill --save +if (typeof Promise == 'undefined') { + global.Promise = require('promise-polyfill') +} +``` + +You can use any other promise implementation you'd like. The pool also allows you to configure the promise implementation on a per-pool level: + +```js +var bluebirdPool = new Pool({ + Promise: require('bluebird') +}) +``` + +__please note:__ in node `<=0.12.x` the pool will throw if you do not provide a promise constructor in one of the two ways mentioned above. In node `>=4.0.0` the pool will use the native promise implementation by default; however, the two methods above still allow you to "bring your own." + +## maxUses and read-replica autoscaling (e.g. AWS Aurora) + +The maxUses config option can help an application instance rebalance load against a replica set that has been auto-scaled after the connection pool is already full of healthy connections. + +The mechanism here is that a connection is considered "expended" after it has been acquired and released `maxUses` number of times. Depending on the load on your system, this means there will be an approximate time in which any given connection will live, thus creating a window for rebalancing. + +Imagine a scenario where you have 10 app instances providing an API running against a replica cluster of 3 that are accessed via a round-robin DNS entry. Each instance runs a connection pool size of 20. With an ambient load of 50 requests per second, the connection pool will likely fill up in a few minutes with healthy connections. + +If you have weekly bursts of traffic which peak at 1,000 requests per second, you might want to grow your replicas to 10 during this period. Without setting `maxUses`, the new replicas will not be adopted by the app servers without an intervention -- namely, restarting each in turn in order to build up new connection pools that are balanced against all the replicas. Adding additional app server instances will help to some extent because they will adopt all the replicas in an even way, but the initial app servers will continue to focus additional load on the original replicas. + +This is where the `maxUses` configuration option comes into play. Setting `maxUses` to 7500 will ensure that over a period of 30 minutes or so the new replicas will be adopted as the pre-existing connections are closed and replaced with new ones, thus creating a window for eventual balance. + +You'll want to test based on your own scenarios, but one way to make a first guess at `maxUses` is to identify an acceptable window for rebalancing and then solve for the value: + +``` +maxUses = rebalanceWindowSeconds * totalRequestsPerSecond / numAppInstances / poolSize +``` + +In the example above, assuming we acquire and release 1 connection per request and we are aiming for a 30 minute rebalancing window: + +``` +maxUses = rebalanceWindowSeconds * totalRequestsPerSecond / numAppInstances / poolSize + 7200 = 1800 * 1000 / 10 / 25 +``` + +## tests + +To run tests clone the repo, `npm i` in the working dir, and then run `npm test` + +## contributions + +I love contributions. Please make sure they have tests, and submit a PR. If you're not sure if the issue is worth it or will be accepted it never hurts to open an issue to begin the conversation. If you're interested in keeping up with node-postgres releated stuff, you can follow me on twitter at [@briancarlson](https://twitter.com/briancarlson) - I generally announce any noteworthy updates there. + +## license + +The MIT License (MIT) +Copyright (c) 2016 Brian M. Carlson + +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. diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/index.js b/server/node_modules/pg-promise/node_modules/pg-pool/index.js new file mode 100644 index 0000000..48bf5c7 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/index.js @@ -0,0 +1,421 @@ +'use strict' +const EventEmitter = require('events').EventEmitter + +const NOOP = function () {} + +const removeWhere = (list, predicate) => { + const i = list.findIndex(predicate) + + return i === -1 ? undefined : list.splice(i, 1)[0] +} + +class IdleItem { + constructor(client, idleListener, timeoutId) { + this.client = client + this.idleListener = idleListener + this.timeoutId = timeoutId + } +} + +class PendingItem { + constructor(callback) { + this.callback = callback + } +} + +function throwOnDoubleRelease() { + throw new Error('Release called on client which has already been released to the pool.') +} + +function promisify(Promise, callback) { + if (callback) { + return { callback: callback, result: undefined } + } + let rej + let res + const cb = function (err, client) { + err ? rej(err) : res(client) + } + const result = new Promise(function (resolve, reject) { + res = resolve + rej = reject + }) + return { callback: cb, result: result } +} + +function makeIdleListener(pool, client) { + return function idleListener(err) { + err.client = client + + client.removeListener('error', idleListener) + client.on('error', () => { + pool.log('additional client error after disconnection due to error', err) + }) + pool._remove(client) + // TODO - document that once the pool emits an error + // the client has already been closed & purged and is unusable + pool.emit('error', err, client) + } +} + +class Pool extends EventEmitter { + constructor(options, Client) { + super() + this.options = Object.assign({}, options) + + if (options != null && 'password' in options) { + // "hiding" the password so it doesn't show up in stack traces + // or if the client is console.logged + Object.defineProperty(this.options, 'password', { + configurable: true, + enumerable: false, + writable: true, + value: options.password, + }) + } + if (options != null && options.ssl && options.ssl.key) { + // "hiding" the ssl->key so it doesn't show up in stack traces + // or if the client is console.logged + Object.defineProperty(this.options.ssl, 'key', { + enumerable: false, + }) + } + + this.options.max = this.options.max || this.options.poolSize || 10 + this.options.maxUses = this.options.maxUses || Infinity + this.options.allowExitOnIdle = this.options.allowExitOnIdle || false + this.log = this.options.log || function () {} + this.Client = this.options.Client || Client || require('pg').Client + this.Promise = this.options.Promise || global.Promise + + if (typeof this.options.idleTimeoutMillis === 'undefined') { + this.options.idleTimeoutMillis = 10000 + } + + this._clients = [] + this._idle = [] + this._pendingQueue = [] + this._endCallback = undefined + this.ending = false + this.ended = false + } + + _isFull() { + return this._clients.length >= this.options.max + } + + _pulseQueue() { + this.log('pulse queue') + if (this.ended) { + this.log('pulse queue ended') + return + } + if (this.ending) { + this.log('pulse queue on ending') + if (this._idle.length) { + this._idle.slice().map((item) => { + this._remove(item.client) + }) + } + if (!this._clients.length) { + this.ended = true + this._endCallback() + } + return + } + // if we don't have any waiting, do nothing + if (!this._pendingQueue.length) { + this.log('no queued requests') + return + } + // if we don't have any idle clients and we have no more room do nothing + if (!this._idle.length && this._isFull()) { + return + } + const pendingItem = this._pendingQueue.shift() + if (this._idle.length) { + const idleItem = this._idle.pop() + clearTimeout(idleItem.timeoutId) + const client = idleItem.client + client.ref && client.ref() + const idleListener = idleItem.idleListener + + return this._acquireClient(client, pendingItem, idleListener, false) + } + if (!this._isFull()) { + return this.newClient(pendingItem) + } + throw new Error('unexpected condition') + } + + _remove(client) { + const removed = removeWhere(this._idle, (item) => item.client === client) + + if (removed !== undefined) { + clearTimeout(removed.timeoutId) + } + + this._clients = this._clients.filter((c) => c !== client) + client.end() + this.emit('remove', client) + } + + connect(cb) { + if (this.ending) { + const err = new Error('Cannot use a pool after calling end on the pool') + return cb ? cb(err) : this.Promise.reject(err) + } + + const response = promisify(this.Promise, cb) + const result = response.result + + // if we don't have to connect a new client, don't do so + if (this._isFull() || this._idle.length) { + // if we have idle clients schedule a pulse immediately + if (this._idle.length) { + process.nextTick(() => this._pulseQueue()) + } + + if (!this.options.connectionTimeoutMillis) { + this._pendingQueue.push(new PendingItem(response.callback)) + return result + } + + const queueCallback = (err, res, done) => { + clearTimeout(tid) + response.callback(err, res, done) + } + + const pendingItem = new PendingItem(queueCallback) + + // set connection timeout on checking out an existing client + const tid = setTimeout(() => { + // remove the callback from pending waiters because + // we're going to call it with a timeout error + removeWhere(this._pendingQueue, (i) => i.callback === queueCallback) + pendingItem.timedOut = true + response.callback(new Error('timeout exceeded when trying to connect')) + }, this.options.connectionTimeoutMillis) + + this._pendingQueue.push(pendingItem) + return result + } + + this.newClient(new PendingItem(response.callback)) + + return result + } + + newClient(pendingItem) { + const client = new this.Client(this.options) + this._clients.push(client) + const idleListener = makeIdleListener(this, client) + + this.log('checking client timeout') + + // connection timeout logic + let tid + let timeoutHit = false + if (this.options.connectionTimeoutMillis) { + tid = setTimeout(() => { + this.log('ending client due to timeout') + timeoutHit = true + // force kill the node driver, and let libpq do its teardown + client.connection ? client.connection.stream.destroy() : client.end() + }, this.options.connectionTimeoutMillis) + } + + this.log('connecting new client') + client.connect((err) => { + if (tid) { + clearTimeout(tid) + } + client.on('error', idleListener) + if (err) { + this.log('client failed to connect', err) + // remove the dead client from our list of clients + this._clients = this._clients.filter((c) => c !== client) + if (timeoutHit) { + err.message = 'Connection terminated due to connection timeout' + } + + // this client won’t be released, so move on immediately + this._pulseQueue() + + if (!pendingItem.timedOut) { + pendingItem.callback(err, undefined, NOOP) + } + } else { + this.log('new client connected') + + return this._acquireClient(client, pendingItem, idleListener, true) + } + }) + } + + // acquire a client for a pending work item + _acquireClient(client, pendingItem, idleListener, isNew) { + if (isNew) { + this.emit('connect', client) + } + + this.emit('acquire', client) + + client.release = this._releaseOnce(client, idleListener) + + client.removeListener('error', idleListener) + + if (!pendingItem.timedOut) { + if (isNew && this.options.verify) { + this.options.verify(client, (err) => { + if (err) { + client.release(err) + return pendingItem.callback(err, undefined, NOOP) + } + + pendingItem.callback(undefined, client, client.release) + }) + } else { + pendingItem.callback(undefined, client, client.release) + } + } else { + if (isNew && this.options.verify) { + this.options.verify(client, client.release) + } else { + client.release() + } + } + } + + // returns a function that wraps _release and throws if called more than once + _releaseOnce(client, idleListener) { + let released = false + + return (err) => { + if (released) { + throwOnDoubleRelease() + } + + released = true + this._release(client, idleListener, err) + } + } + + // release a client back to the poll, include an error + // to remove it from the pool + _release(client, idleListener, err) { + client.on('error', idleListener) + + client._poolUseCount = (client._poolUseCount || 0) + 1 + + // TODO(bmc): expose a proper, public interface _queryable and _ending + if (err || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) { + if (client._poolUseCount >= this.options.maxUses) { + this.log('remove expended client') + } + this._remove(client) + this._pulseQueue() + return + } + + // idle timeout + let tid + if (this.options.idleTimeoutMillis) { + tid = setTimeout(() => { + this.log('remove idle client') + this._remove(client) + }, this.options.idleTimeoutMillis) + + if (this.options.allowExitOnIdle) { + // allow Node to exit if this is all that's left + tid.unref() + } + } + + if (this.options.allowExitOnIdle) { + client.unref() + } + + this._idle.push(new IdleItem(client, idleListener, tid)) + this._pulseQueue() + } + + query(text, values, cb) { + // guard clause against passing a function as the first parameter + if (typeof text === 'function') { + const response = promisify(this.Promise, text) + setImmediate(function () { + return response.callback(new Error('Passing a function as the first parameter to pool.query is not supported')) + }) + return response.result + } + + // allow plain text query without values + if (typeof values === 'function') { + cb = values + values = undefined + } + const response = promisify(this.Promise, cb) + cb = response.callback + + this.connect((err, client) => { + if (err) { + return cb(err) + } + + let clientReleased = false + const onError = (err) => { + if (clientReleased) { + return + } + clientReleased = true + client.release(err) + cb(err) + } + + client.once('error', onError) + this.log('dispatching query') + client.query(text, values, (err, res) => { + this.log('query dispatched') + client.removeListener('error', onError) + if (clientReleased) { + return + } + clientReleased = true + client.release(err) + if (err) { + return cb(err) + } else { + return cb(undefined, res) + } + }) + }) + return response.result + } + + end(cb) { + this.log('ending') + if (this.ending) { + const err = new Error('Called end on pool more than once') + return cb ? cb(err) : this.Promise.reject(err) + } + this.ending = true + const promised = promisify(this.Promise, cb) + this._endCallback = promised.callback + this._pulseQueue() + return promised.result + } + + get waitingCount() { + return this._pendingQueue.length + } + + get idleCount() { + return this._idle.length + } + + get totalCount() { + return this._clients.length + } +} +module.exports = Pool diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/package.json b/server/node_modules/pg-promise/node_modules/pg-pool/package.json new file mode 100644 index 0000000..52d2ee8 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/package.json @@ -0,0 +1,68 @@ +{ + "_from": "pg-pool@^3.4.1", + "_id": "pg-pool@3.4.1", + "_inBundle": false, + "_integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", + "_location": "/pg-promise/pg-pool", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pg-pool@^3.4.1", + "name": "pg-pool", + "escapedName": "pg-pool", + "rawSpec": "^3.4.1", + "saveSpec": null, + "fetchSpec": "^3.4.1" + }, + "_requiredBy": [ + "/pg-promise/pg" + ], + "_resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", + "_shasum": "0e71ce2c67b442a5e862a9c182172c37eda71e9c", + "_spec": "pg-pool@^3.4.1", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise/node_modules/pg", + "author": { + "name": "Brian M. Carlson" + }, + "bugs": { + "url": "https://github.com/brianc/node-pg-pool/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Connection pool for node-postgres", + "devDependencies": { + "bluebird": "3.4.1", + "co": "4.6.0", + "expect.js": "0.3.1", + "lodash": "^4.17.11", + "mocha": "^7.1.2", + "pg-cursor": "^1.3.0" + }, + "directories": { + "test": "test" + }, + "gitHead": "92b4d37926c276d343bfe56447ff6f526af757cf", + "homepage": "https://github.com/brianc/node-pg-pool#readme", + "keywords": [ + "pg", + "postgres", + "pool", + "database" + ], + "license": "MIT", + "main": "index.js", + "name": "pg-pool", + "peerDependencies": { + "pg": ">=8.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/brianc/node-postgres.git", + "directory": "packages/pg-pool" + }, + "scripts": { + "test": " node_modules/.bin/mocha" + }, + "version": "3.4.1" +} diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/bring-your-own-promise.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/bring-your-own-promise.js new file mode 100644 index 0000000..e905ccc --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/bring-your-own-promise.js @@ -0,0 +1,42 @@ +'use strict' +const co = require('co') +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it +const BluebirdPromise = require('bluebird') + +const Pool = require('../') + +const checkType = (promise) => { + expect(promise).to.be.a(BluebirdPromise) + return promise.catch((e) => undefined) +} + +describe('Bring your own promise', function () { + it( + 'uses supplied promise for operations', + co.wrap(function* () { + const pool = new Pool({ Promise: BluebirdPromise }) + const client1 = yield checkType(pool.connect()) + client1.release() + yield checkType(pool.query('SELECT NOW()')) + const client2 = yield checkType(pool.connect()) + // TODO - make sure pg supports BYOP as well + client2.release() + yield checkType(pool.end()) + }) + ) + + it( + 'uses promises in errors', + co.wrap(function* () { + const pool = new Pool({ Promise: BluebirdPromise, port: 48484 }) + yield checkType(pool.connect()) + yield checkType(pool.end()) + yield checkType(pool.connect()) + yield checkType(pool.query()) + yield checkType(pool.end()) + }) + ) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-strings.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-strings.js new file mode 100644 index 0000000..de45830 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-strings.js @@ -0,0 +1,29 @@ +const expect = require('expect.js') +const describe = require('mocha').describe +const it = require('mocha').it +const Pool = require('../') + +describe('Connection strings', function () { + it('pool delegates connectionString property to client', function (done) { + const connectionString = 'postgres://foo:bar@baz:1234/xur' + + const pool = new Pool({ + // use a fake client so we can check we're passed the connectionString + Client: function (args) { + expect(args.connectionString).to.equal(connectionString) + return { + connect: function (cb) { + cb(new Error('testing')) + }, + on: function () {}, + } + }, + connectionString: connectionString, + }) + + pool.connect(function (err, client) { + expect(err).to.not.be(undefined) + done() + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-timeout.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-timeout.js new file mode 100644 index 0000000..05e8931 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/connection-timeout.js @@ -0,0 +1,229 @@ +'use strict' +const net = require('net') +const co = require('co') +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it +const before = require('mocha').before +const after = require('mocha').after + +const Pool = require('../') + +describe('connection timeout', () => { + const connectionFailure = new Error('Temporary connection failure') + + before((done) => { + this.server = net.createServer((socket) => { + socket.on('data', () => { + // discard any buffered data or the server wont terminate + }) + }) + + this.server.listen(() => { + this.port = this.server.address().port + done() + }) + }) + + after((done) => { + this.server.close(done) + }) + + it('should callback with an error if timeout is passed', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 10, port: this.port, host: 'localhost' }) + pool.connect((err, client, release) => { + expect(err).to.be.an(Error) + expect(err.message).to.contain('timeout') + expect(client).to.equal(undefined) + expect(pool.idleCount).to.equal(0) + done() + }) + }) + + it('should reject promise with an error if timeout is passed', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 10, port: this.port, host: 'localhost' }) + pool.connect().catch((err) => { + expect(err).to.be.an(Error) + expect(err.message).to.contain('timeout') + expect(pool.idleCount).to.equal(0) + done() + }) + }) + + it( + 'should handle multiple timeouts', + co.wrap( + function* () { + const errors = [] + const pool = new Pool({ connectionTimeoutMillis: 1, port: this.port, host: 'localhost' }) + for (var i = 0; i < 15; i++) { + try { + yield pool.connect() + } catch (e) { + errors.push(e) + } + } + expect(errors).to.have.length(15) + }.bind(this) + ) + ) + + it('should timeout on checkout of used connection', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 100, max: 1 }) + pool.connect((err, client, release) => { + expect(err).to.be(undefined) + expect(client).to.not.be(undefined) + pool.connect((err, client) => { + expect(err).to.be.an(Error) + expect(client).to.be(undefined) + release() + pool.end(done) + }) + }) + }) + + it('should not break further pending checkouts on a timeout', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 200, max: 1 }) + pool.connect((err, client, releaseOuter) => { + expect(err).to.be(undefined) + + pool.connect((err, client) => { + expect(err).to.be.an(Error) + expect(client).to.be(undefined) + releaseOuter() + }) + + setTimeout(() => { + pool.connect((err, client, releaseInner) => { + expect(err).to.be(undefined) + expect(client).to.not.be(undefined) + releaseInner() + pool.end(done) + }) + }, 100) + }) + }) + + it('should timeout on query if all clients are busy', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 100, max: 1 }) + pool.connect((err, client, release) => { + expect(err).to.be(undefined) + expect(client).to.not.be(undefined) + pool.query('select now()', (err, result) => { + expect(err).to.be.an(Error) + expect(result).to.be(undefined) + release() + pool.end(done) + }) + }) + }) + + it('should recover from timeout errors', (done) => { + const pool = new Pool({ connectionTimeoutMillis: 100, max: 1 }) + pool.connect((err, client, release) => { + expect(err).to.be(undefined) + expect(client).to.not.be(undefined) + pool.query('select now()', (err, result) => { + expect(err).to.be.an(Error) + expect(result).to.be(undefined) + release() + pool.query('select $1::text as name', ['brianc'], (err, res) => { + expect(err).to.be(undefined) + expect(res.rows).to.have.length(1) + pool.end(done) + }) + }) + }) + }) + + it('continues processing after a connection failure', (done) => { + const Client = require('pg').Client + const orgConnect = Client.prototype.connect + let called = false + + Client.prototype.connect = function (cb) { + // Simulate a failure on first call + if (!called) { + called = true + + return setTimeout(() => { + cb(connectionFailure) + }, 100) + } + // And pass-through the second call + orgConnect.call(this, cb) + } + + const pool = new Pool({ + Client: Client, + connectionTimeoutMillis: 1000, + max: 1, + }) + + pool.connect((err, client, release) => { + expect(err).to.be(connectionFailure) + + pool.query('select $1::text as name', ['brianc'], (err, res) => { + expect(err).to.be(undefined) + expect(res.rows).to.have.length(1) + pool.end(done) + }) + }) + }) + + it('releases newly connected clients if the queued already timed out', (done) => { + const Client = require('pg').Client + + const orgConnect = Client.prototype.connect + + let connection = 0 + + Client.prototype.connect = function (cb) { + // Simulate a failure on first call + if (connection === 0) { + connection++ + + return setTimeout(() => { + cb(connectionFailure) + }, 300) + } + + // And second connect taking > connection timeout + if (connection === 1) { + connection++ + + return setTimeout(() => { + orgConnect.call(this, cb) + }, 1000) + } + + orgConnect.call(this, cb) + } + + const pool = new Pool({ + Client: Client, + connectionTimeoutMillis: 1000, + max: 1, + }) + + // Direct connect + pool.connect((err, client, release) => { + expect(err).to.be(connectionFailure) + }) + + // Queued + let called = 0 + pool.connect((err, client, release) => { + // Verify the callback is only called once + expect(called++).to.be(0) + expect(err).to.be.an(Error) + + pool.query('select $1::text as name', ['brianc'], (err, res) => { + expect(err).to.be(undefined) + expect(res.rows).to.have.length(1) + pool.end(done) + }) + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/ending.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/ending.js new file mode 100644 index 0000000..e1839b4 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/ending.js @@ -0,0 +1,40 @@ +'use strict' +const co = require('co') +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('pool ending', () => { + it('ends without being used', (done) => { + const pool = new Pool() + pool.end(done) + }) + + it('ends with a promise', () => { + return new Pool().end() + }) + + it( + 'ends with clients', + co.wrap(function* () { + const pool = new Pool() + const res = yield pool.query('SELECT $1::text as name', ['brianc']) + expect(res.rows[0].name).to.equal('brianc') + return pool.end() + }) + ) + + it( + 'allows client to finish', + co.wrap(function* () { + const pool = new Pool() + const query = pool.query('SELECT $1::text as name', ['brianc']) + yield pool.end() + const res = yield query + expect(res.rows[0].name).to.equal('brianc') + }) + ) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/error-handling.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/error-handling.js new file mode 100644 index 0000000..0a996b8 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/error-handling.js @@ -0,0 +1,248 @@ +'use strict' +const net = require('net') +const co = require('co') +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('pool error handling', function () { + it('Should complete these queries without dying', function (done) { + const pool = new Pool() + let errors = 0 + let shouldGet = 0 + function runErrorQuery() { + shouldGet++ + return new Promise(function (resolve, reject) { + pool + .query("SELECT 'asd'+1 ") + .then(function (res) { + reject(res) // this should always error + }) + .catch(function (err) { + errors++ + resolve(err) + }) + }) + } + const ps = [] + for (let i = 0; i < 5; i++) { + ps.push(runErrorQuery()) + } + Promise.all(ps).then(function () { + expect(shouldGet).to.eql(errors) + pool.end(done) + }) + }) + + describe('calling release more than once', () => { + it( + 'should throw each time', + co.wrap(function* () { + const pool = new Pool() + const client = yield pool.connect() + client.release() + expect(() => client.release()).to.throwError() + expect(() => client.release()).to.throwError() + return yield pool.end() + }) + ) + + it('should throw each time with callbacks', function (done) { + const pool = new Pool() + + pool.connect(function (err, client, clientDone) { + expect(err).not.to.be.an(Error) + clientDone() + + expect(() => clientDone()).to.throwError() + expect(() => clientDone()).to.throwError() + + pool.end(done) + }) + }) + }) + + describe('using an ended pool', () => { + it('rejects all additional promises', (done) => { + const pool = new Pool() + const promises = [] + pool.end().then(() => { + const squash = (promise) => promise.catch((e) => 'okay!') + promises.push(squash(pool.connect())) + promises.push(squash(pool.query('SELECT NOW()'))) + promises.push(squash(pool.end())) + Promise.all(promises).then((res) => { + expect(res).to.eql(['okay!', 'okay!', 'okay!']) + done() + }) + }) + }) + + it('returns an error on all additional callbacks', (done) => { + const pool = new Pool() + pool.end(() => { + pool.query('SELECT *', (err) => { + expect(err).to.be.an(Error) + pool.connect((err) => { + expect(err).to.be.an(Error) + pool.end((err) => { + expect(err).to.be.an(Error) + done() + }) + }) + }) + }) + }) + }) + + describe('error from idle client', () => { + it( + 'removes client from pool', + co.wrap(function* () { + const pool = new Pool() + const client = yield pool.connect() + expect(pool.totalCount).to.equal(1) + expect(pool.waitingCount).to.equal(0) + expect(pool.idleCount).to.equal(0) + client.release() + yield new Promise((resolve, reject) => { + process.nextTick(() => { + let poolError + pool.once('error', (err) => { + poolError = err + }) + + let clientError + client.once('error', (err) => { + clientError = err + }) + + client.emit('error', new Error('expected')) + + expect(clientError.message).to.equal('expected') + expect(poolError.message).to.equal('expected') + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(0) + pool.end().then(resolve, reject) + }) + }) + }) + ) + }) + + describe('error from in-use client', () => { + it( + 'keeps the client in the pool', + co.wrap(function* () { + const pool = new Pool() + const client = yield pool.connect() + expect(pool.totalCount).to.equal(1) + expect(pool.waitingCount).to.equal(0) + expect(pool.idleCount).to.equal(0) + + yield new Promise((resolve, reject) => { + process.nextTick(() => { + let poolError + pool.once('error', (err) => { + poolError = err + }) + + let clientError + client.once('error', (err) => { + clientError = err + }) + + client.emit('error', new Error('expected')) + + expect(clientError.message).to.equal('expected') + expect(poolError).not.to.be.ok() + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(1) + client.release() + pool.end().then(resolve, reject) + }) + }) + }) + ) + }) + + describe('passing a function to pool.query', () => { + it('calls back with error', (done) => { + const pool = new Pool() + console.log('passing fn to query') + pool.query((err) => { + expect(err).to.be.an(Error) + pool.end(done) + }) + }) + }) + + describe('pool with lots of errors', () => { + it( + 'continues to work and provide new clients', + co.wrap(function* () { + const pool = new Pool({ max: 1 }) + const errors = [] + for (var i = 0; i < 20; i++) { + try { + yield pool.query('invalid sql') + } catch (err) { + errors.push(err) + } + } + expect(errors).to.have.length(20) + expect(pool.idleCount).to.equal(0) + expect(pool.query).to.be.a(Function) + const res = yield pool.query('SELECT $1::text as name', ['brianc']) + expect(res.rows).to.have.length(1) + expect(res.rows[0].name).to.equal('brianc') + return pool.end() + }) + ) + }) + + it('should continue with queued items after a connection failure', (done) => { + const closeServer = net + .createServer((socket) => { + socket.destroy() + }) + .unref() + + closeServer.listen(() => { + const pool = new Pool({ max: 1, port: closeServer.address().port, host: 'localhost' }) + pool.connect((err) => { + expect(err).to.be.an(Error) + if (err.code) { + expect(err.code).to.be('ECONNRESET') + } + }) + pool.connect((err) => { + expect(err).to.be.an(Error) + if (err.code) { + expect(err.code).to.be('ECONNRESET') + } + closeServer.close(() => { + pool.end(done) + }) + }) + }) + }) + + it('handles post-checkout client failures in pool.query', (done) => { + const pool = new Pool({ max: 1 }) + pool.on('error', () => { + // We double close the connection in this test, prevent exception caused by that + }) + pool.query('SELECT pg_sleep(5)', [], (err) => { + expect(err).to.be.an(Error) + done() + }) + + setTimeout(() => { + pool._clients[0].end() + }, 1000) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/events.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/events.js new file mode 100644 index 0000000..6197924 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/events.js @@ -0,0 +1,86 @@ +'use strict' + +const expect = require('expect.js') +const EventEmitter = require('events').EventEmitter +const describe = require('mocha').describe +const it = require('mocha').it +const Pool = require('../') + +describe('events', function () { + it('emits connect before callback', function (done) { + const pool = new Pool() + let emittedClient = false + pool.on('connect', function (client) { + emittedClient = client + }) + + pool.connect(function (err, client, release) { + if (err) return done(err) + release() + pool.end() + expect(client).to.be(emittedClient) + done() + }) + }) + + it('emits "connect" only with a successful connection', function () { + const pool = new Pool({ + // This client will always fail to connect + Client: mockClient({ + connect: function (cb) { + process.nextTick(() => { + cb(new Error('bad news')) + }) + }, + }), + }) + pool.on('connect', function () { + throw new Error('should never get here') + }) + return pool.connect().catch((e) => expect(e.message).to.equal('bad news')) + }) + + it('emits acquire every time a client is acquired', function (done) { + const pool = new Pool() + let acquireCount = 0 + pool.on('acquire', function (client) { + expect(client).to.be.ok() + acquireCount++ + }) + for (let i = 0; i < 10; i++) { + pool.connect(function (err, client, release) { + if (err) return done(err) + release() + }) + pool.query('SELECT now()') + } + setTimeout(function () { + expect(acquireCount).to.be(20) + pool.end(done) + }, 100) + }) + + it('emits error and client if an idle client in the pool hits an error', function (done) { + const pool = new Pool() + pool.connect(function (err, client) { + expect(err).to.equal(undefined) + client.release() + setImmediate(function () { + client.emit('error', new Error('problem')) + }) + pool.once('error', function (err, errClient) { + expect(err.message).to.equal('problem') + expect(errClient).to.equal(client) + done() + }) + }) + }) +}) + +function mockClient(methods) { + return function () { + const client = new EventEmitter() + Object.assign(client, methods) + return client + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout-exit.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout-exit.js new file mode 100644 index 0000000..1292634 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout-exit.js @@ -0,0 +1,16 @@ +// This test is meant to be spawned from idle-timeout.js +if (module === require.main) { + const allowExitOnIdle = process.env.ALLOW_EXIT_ON_IDLE === '1' + const Pool = require('../index') + + const pool = new Pool({ idleTimeoutMillis: 200, ...(allowExitOnIdle ? { allowExitOnIdle: true } : {}) }) + pool.query('SELECT NOW()', (err, res) => console.log('completed first')) + pool.on('remove', () => { + console.log('removed') + done() + }) + + setTimeout(() => { + pool.query('SELECT * from generate_series(0, 1000)', (err, res) => console.log('completed second')) + }, 50) +} diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout.js new file mode 100644 index 0000000..0bb0975 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/idle-timeout.js @@ -0,0 +1,118 @@ +'use strict' +const co = require('co') +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it +const { fork } = require('child_process') +const path = require('path') + +const Pool = require('../') + +const wait = (time) => new Promise((resolve) => setTimeout(resolve, time)) + +describe('idle timeout', () => { + it('should timeout and remove the client', (done) => { + const pool = new Pool({ idleTimeoutMillis: 10 }) + pool.query('SELECT NOW()') + pool.on('remove', () => { + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(0) + done() + }) + }) + + it( + 'times out and removes clients when others are also removed', + co.wrap(function* () { + const pool = new Pool({ idleTimeoutMillis: 10 }) + const clientA = yield pool.connect() + const clientB = yield pool.connect() + clientA.release() + clientB.release(new Error()) + + const removal = new Promise((resolve) => { + pool.on('remove', () => { + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(0) + resolve() + }) + }) + + const timeout = wait(100).then(() => Promise.reject(new Error('Idle timeout failed to occur'))) + + try { + yield Promise.race([removal, timeout]) + } finally { + pool.end() + } + }) + ) + + it( + 'can remove idle clients and recreate them', + co.wrap(function* () { + const pool = new Pool({ idleTimeoutMillis: 1 }) + const results = [] + for (var i = 0; i < 20; i++) { + let query = pool.query('SELECT NOW()') + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(1) + results.push(yield query) + yield wait(2) + expect(pool.idleCount).to.equal(0) + expect(pool.totalCount).to.equal(0) + } + expect(results).to.have.length(20) + }) + ) + + it( + 'does not time out clients which are used', + co.wrap(function* () { + const pool = new Pool({ idleTimeoutMillis: 1 }) + const results = [] + for (var i = 0; i < 20; i++) { + let client = yield pool.connect() + expect(pool.totalCount).to.equal(1) + expect(pool.idleCount).to.equal(0) + yield wait(10) + results.push(yield client.query('SELECT NOW()')) + client.release() + expect(pool.idleCount).to.equal(1) + expect(pool.totalCount).to.equal(1) + } + expect(results).to.have.length(20) + return pool.end() + }) + ) + + it('unrefs the connections and timeouts so the program can exit when idle when the allowExitOnIdle option is set', function (done) { + const child = fork(path.join(__dirname, 'idle-timeout-exit.js'), [], { + silent: true, + env: { ...process.env, ALLOW_EXIT_ON_IDLE: '1' }, + }) + let result = '' + child.stdout.setEncoding('utf8') + child.stdout.on('data', (chunk) => (result += chunk)) + child.on('error', (err) => done(err)) + child.on('close', () => { + expect(result).to.equal('completed first\ncompleted second\n') + done() + }) + }) + + it('keeps old behavior when allowExitOnIdle option is not set', function (done) { + const child = fork(path.join(__dirname, 'idle-timeout-exit.js'), [], { + silent: true, + }) + let result = '' + child.stdout.setEncoding('utf8') + child.stdout.on('data', (chunk) => (result += chunk)) + child.on('error', (err) => done(err)) + child.on('close', () => { + expect(result).to.equal('completed first\ncompleted second\nremoved\n') + done() + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/index.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/index.js new file mode 100644 index 0000000..57a68e0 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/index.js @@ -0,0 +1,226 @@ +'use strict' +const expect = require('expect.js') +const _ = require('lodash') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('pool', function () { + describe('with callbacks', function () { + it('works totally unconfigured', function (done) { + const pool = new Pool() + pool.connect(function (err, client, release) { + if (err) return done(err) + client.query('SELECT NOW()', function (err, res) { + release() + if (err) return done(err) + expect(res.rows).to.have.length(1) + pool.end(done) + }) + }) + }) + + it('passes props to clients', function (done) { + const pool = new Pool({ binary: true }) + pool.connect(function (err, client, release) { + release() + if (err) return done(err) + expect(client.binary).to.eql(true) + pool.end(done) + }) + }) + + it('can run a query with a callback without parameters', function (done) { + const pool = new Pool() + pool.query('SELECT 1 as num', function (err, res) { + expect(res.rows[0]).to.eql({ num: 1 }) + pool.end(function () { + done(err) + }) + }) + }) + + it('can run a query with a callback', function (done) { + const pool = new Pool() + pool.query('SELECT $1::text as name', ['brianc'], function (err, res) { + expect(res.rows[0]).to.eql({ name: 'brianc' }) + pool.end(function () { + done(err) + }) + }) + }) + + it('passes connection errors to callback', function (done) { + const pool = new Pool({ port: 53922 }) + pool.query('SELECT $1::text as name', ['brianc'], function (err, res) { + expect(res).to.be(undefined) + expect(err).to.be.an(Error) + // a connection error should not polute the pool with a dead client + expect(pool.totalCount).to.equal(0) + pool.end(function (err) { + done(err) + }) + }) + }) + + it('does not pass client to error callback', function (done) { + const pool = new Pool({ port: 58242 }) + pool.connect(function (err, client, release) { + expect(err).to.be.an(Error) + expect(client).to.be(undefined) + expect(release).to.be.a(Function) + pool.end(done) + }) + }) + + it('removes client if it errors in background', function (done) { + const pool = new Pool() + pool.connect(function (err, client, release) { + release() + if (err) return done(err) + client.testString = 'foo' + setTimeout(function () { + client.emit('error', new Error('on purpose')) + }, 10) + }) + pool.on('error', function (err) { + expect(err.message).to.be('on purpose') + expect(err.client).to.not.be(undefined) + expect(err.client.testString).to.be('foo') + err.client.connection.stream.on('end', function () { + pool.end(done) + }) + }) + }) + + it('should not change given options', function (done) { + const options = { max: 10 } + const pool = new Pool(options) + pool.connect(function (err, client, release) { + release() + if (err) return done(err) + expect(options).to.eql({ max: 10 }) + pool.end(done) + }) + }) + + it('does not create promises when connecting', function (done) { + const pool = new Pool() + const returnValue = pool.connect(function (err, client, release) { + release() + if (err) return done(err) + pool.end(done) + }) + expect(returnValue).to.be(undefined) + }) + + it('does not create promises when querying', function (done) { + const pool = new Pool() + const returnValue = pool.query('SELECT 1 as num', function (err) { + pool.end(function () { + done(err) + }) + }) + expect(returnValue).to.be(undefined) + }) + + it('does not create promises when ending', function (done) { + const pool = new Pool() + const returnValue = pool.end(done) + expect(returnValue).to.be(undefined) + }) + + it('never calls callback syncronously', function (done) { + const pool = new Pool() + pool.connect((err, client) => { + if (err) throw err + client.release() + setImmediate(() => { + let called = false + pool.connect((err, client) => { + if (err) throw err + called = true + client.release() + setImmediate(() => { + pool.end(done) + }) + }) + expect(called).to.equal(false) + }) + }) + }) + }) + + describe('with promises', function () { + it('connects, queries, and disconnects', function () { + const pool = new Pool() + return pool.connect().then(function (client) { + return client.query('select $1::text as name', ['hi']).then(function (res) { + expect(res.rows).to.eql([{ name: 'hi' }]) + client.release() + return pool.end() + }) + }) + }) + + it('executes a query directly', () => { + const pool = new Pool() + return pool.query('SELECT $1::text as name', ['hi']).then((res) => { + expect(res.rows).to.have.length(1) + expect(res.rows[0].name).to.equal('hi') + return pool.end() + }) + }) + + it('properly pools clients', function () { + const pool = new Pool({ poolSize: 9 }) + const promises = _.times(30, function () { + return pool.connect().then(function (client) { + return client.query('select $1::text as name', ['hi']).then(function (res) { + client.release() + return res + }) + }) + }) + return Promise.all(promises).then(function (res) { + expect(res).to.have.length(30) + expect(pool.totalCount).to.be(9) + return pool.end() + }) + }) + + it('supports just running queries', function () { + const pool = new Pool({ poolSize: 9 }) + const text = 'select $1::text as name' + const values = ['hi'] + const query = { text: text, values: values } + const promises = _.times(30, () => pool.query(query)) + return Promise.all(promises).then(function (queries) { + expect(queries).to.have.length(30) + return pool.end() + }) + }) + + it('recovers from query errors', function () { + const pool = new Pool() + + const errors = [] + const promises = _.times(30, () => { + return pool.query('SELECT asldkfjasldkf').catch(function (e) { + errors.push(e) + }) + }) + return Promise.all(promises).then(() => { + expect(errors).to.have.length(30) + expect(pool.totalCount).to.equal(0) + expect(pool.idleCount).to.equal(0) + return pool.query('SELECT $1::text as name', ['hi']).then(function (res) { + expect(res.rows).to.eql([{ name: 'hi' }]) + return pool.end() + }) + }) + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/logging.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/logging.js new file mode 100644 index 0000000..839603b --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/logging.js @@ -0,0 +1,20 @@ +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('logging', function () { + it('logs to supplied log function if given', function () { + const messages = [] + const log = function (msg) { + messages.push(msg) + } + const pool = new Pool({ log: log }) + return pool.query('SELECT NOW()').then(function () { + expect(messages.length).to.be.greaterThan(0) + return pool.end() + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/max-uses.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/max-uses.js new file mode 100644 index 0000000..c94ddec --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/max-uses.js @@ -0,0 +1,98 @@ +const expect = require('expect.js') +const co = require('co') +const _ = require('lodash') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('maxUses', () => { + it( + 'can create a single client and use it once', + co.wrap(function* () { + const pool = new Pool({ maxUses: 2 }) + expect(pool.waitingCount).to.equal(0) + const client = yield pool.connect() + const res = yield client.query('SELECT $1::text as name', ['hi']) + expect(res.rows[0].name).to.equal('hi') + client.release() + pool.end() + }) + ) + + it( + 'getting a connection a second time returns the same connection and releasing it also closes it', + co.wrap(function* () { + const pool = new Pool({ maxUses: 2 }) + expect(pool.waitingCount).to.equal(0) + const client = yield pool.connect() + client.release() + const client2 = yield pool.connect() + expect(client).to.equal(client2) + expect(client2._ending).to.equal(false) + client2.release() + expect(client2._ending).to.equal(true) + return yield pool.end() + }) + ) + + it( + 'getting a connection a third time returns a new connection', + co.wrap(function* () { + const pool = new Pool({ maxUses: 2 }) + expect(pool.waitingCount).to.equal(0) + const client = yield pool.connect() + client.release() + const client2 = yield pool.connect() + expect(client).to.equal(client2) + client2.release() + const client3 = yield pool.connect() + expect(client3).not.to.equal(client2) + client3.release() + return yield pool.end() + }) + ) + + it( + 'getting a connection from a pending request gets a fresh client when the released candidate is expended', + co.wrap(function* () { + const pool = new Pool({ max: 1, maxUses: 2 }) + expect(pool.waitingCount).to.equal(0) + const client1 = yield pool.connect() + pool.connect().then((client2) => { + expect(client2).to.equal(client1) + expect(pool.waitingCount).to.equal(1) + // Releasing the client this time should also expend it since maxUses is 2, causing client3 to be a fresh client + client2.release() + }) + const client3Promise = pool.connect().then((client3) => { + // client3 should be a fresh client since client2's release caused the first client to be expended + expect(pool.waitingCount).to.equal(0) + expect(client3).not.to.equal(client1) + return client3.release() + }) + // There should be two pending requests since we have 3 connect requests but a max size of 1 + expect(pool.waitingCount).to.equal(2) + // Releasing the client should not yet expend it since maxUses is 2 + client1.release() + yield client3Promise + return yield pool.end() + }) + ) + + it( + 'logs when removing an expended client', + co.wrap(function* () { + const messages = [] + const log = function (msg) { + messages.push(msg) + } + const pool = new Pool({ maxUses: 1, log }) + const client = yield pool.connect() + client.release() + expect(messages).to.contain('remove expended client') + return yield pool.end() + }) + ) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/releasing-clients.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/releasing-clients.js new file mode 100644 index 0000000..da8e09c --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/releasing-clients.js @@ -0,0 +1,54 @@ +const Pool = require('../') + +const expect = require('expect.js') +const net = require('net') + +describe('releasing clients', () => { + it('removes a client which cannot be queried', async () => { + // make a pool w/ only 1 client + const pool = new Pool({ max: 1 }) + expect(pool.totalCount).to.eql(0) + const client = await pool.connect() + expect(pool.totalCount).to.eql(1) + expect(pool.idleCount).to.eql(0) + // reach into the client and sever its connection + client.connection.end() + + // wait for the client to error out + const err = await new Promise((resolve) => client.once('error', resolve)) + expect(err).to.be.ok() + expect(pool.totalCount).to.eql(1) + expect(pool.idleCount).to.eql(0) + + // try to return it to the pool - this removes it because its broken + client.release() + expect(pool.totalCount).to.eql(0) + expect(pool.idleCount).to.eql(0) + + // make sure pool still works + const { rows } = await pool.query('SELECT NOW()') + expect(rows).to.have.length(1) + await pool.end() + }) + + it('removes a client which is ending', async () => { + // make a pool w/ only 1 client + const pool = new Pool({ max: 1 }) + expect(pool.totalCount).to.eql(0) + const client = await pool.connect() + expect(pool.totalCount).to.eql(1) + expect(pool.idleCount).to.eql(0) + // end the client gracefully (but you shouldn't do this with pooled clients) + client.end() + + // try to return it to the pool + client.release() + expect(pool.totalCount).to.eql(0) + expect(pool.idleCount).to.eql(0) + + // make sure pool still works + const { rows } = await pool.query('SELECT NOW()') + expect(rows).to.have.length(1) + await pool.end() + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/setup.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/setup.js new file mode 100644 index 0000000..811e956 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/setup.js @@ -0,0 +1,10 @@ +const crash = (reason) => { + process.on(reason, (err) => { + console.error(reason, err.stack) + process.exit(-1) + }) +} + +crash('unhandledRejection') +crash('uncaughtError') +crash('warning') diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/sizing.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/sizing.js new file mode 100644 index 0000000..e7863ba --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/sizing.js @@ -0,0 +1,58 @@ +const expect = require('expect.js') +const co = require('co') +const _ = require('lodash') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('pool size of 1', () => { + it( + 'can create a single client and use it once', + co.wrap(function* () { + const pool = new Pool({ max: 1 }) + expect(pool.waitingCount).to.equal(0) + const client = yield pool.connect() + const res = yield client.query('SELECT $1::text as name', ['hi']) + expect(res.rows[0].name).to.equal('hi') + client.release() + pool.end() + }) + ) + + it( + 'can create a single client and use it multiple times', + co.wrap(function* () { + const pool = new Pool({ max: 1 }) + expect(pool.waitingCount).to.equal(0) + const client = yield pool.connect() + const wait = pool.connect() + expect(pool.waitingCount).to.equal(1) + client.release() + const client2 = yield wait + expect(client).to.equal(client2) + client2.release() + return yield pool.end() + }) + ) + + it( + 'can only send 1 query at a time', + co.wrap(function* () { + const pool = new Pool({ max: 1 }) + + // the query text column name changed in PostgreSQL 9.2 + const versionResult = yield pool.query('SHOW server_version_num') + const version = parseInt(versionResult.rows[0].server_version_num, 10) + const queryColumn = version < 90200 ? 'current_query' : 'query' + + const queryText = 'SELECT COUNT(*) as counts FROM pg_stat_activity WHERE ' + queryColumn + ' = $1' + const queries = _.times(20, () => pool.query(queryText, [queryText])) + const results = yield Promise.all(queries) + const counts = results.map((res) => parseInt(res.rows[0].counts, 10)) + expect(counts).to.eql(_.times(20, (i) => 1)) + return yield pool.end() + }) + ) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/submittable.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/submittable.js new file mode 100644 index 0000000..7a1574d --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/submittable.js @@ -0,0 +1,19 @@ +'use strict' +const Cursor = require('pg-cursor') +const expect = require('expect.js') +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('submittle', () => { + it('is returned from the query method', false, (done) => { + const pool = new Pool() + const cursor = pool.query(new Cursor('SELECT * from generate_series(0, 1000)')) + cursor.read((err, rows) => { + expect(err).to.be(undefined) + expect(!!rows).to.be.ok() + cursor.close(done) + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/timeout.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/timeout.js new file mode 100644 index 0000000..e69de29 diff --git a/server/node_modules/pg-promise/node_modules/pg-pool/test/verify.js b/server/node_modules/pg-promise/node_modules/pg-pool/test/verify.js new file mode 100644 index 0000000..9331e1a --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-pool/test/verify.js @@ -0,0 +1,24 @@ +'use strict' +const expect = require('expect.js') + +const describe = require('mocha').describe +const it = require('mocha').it + +const Pool = require('../') + +describe('verify', () => { + it('verifies a client with a callback', (done) => { + const pool = new Pool({ + verify: (client, cb) => { + cb(new Error('nope')) + }, + }) + + pool.connect((err, client) => { + expect(err).to.be.an(Error) + expect(err.message).to.be('nope') + pool.end() + done() + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/LICENSE b/server/node_modules/pg-promise/node_modules/pg-protocol/LICENSE new file mode 100644 index 0000000..5c14056 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2010 - 2021 Brian Carlson + +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. diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/README.md b/server/node_modules/pg-promise/node_modules/pg-protocol/README.md new file mode 100644 index 0000000..8c52e40 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/README.md @@ -0,0 +1,3 @@ +# pg-protocol + +Low level postgres wire protocol parser and serializer written in Typescript. Used by node-postgres. Needs more documentation. :smile: diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js new file mode 100644 index 0000000..5f5efb8 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js @@ -0,0 +1,25 @@ +"use strict"; +// file for microbenchmarking +Object.defineProperty(exports, "__esModule", { value: true }); +const buffer_writer_1 = require("./buffer-writer"); +const buffer_reader_1 = require("./buffer-reader"); +const LOOPS = 1000; +let count = 0; +let start = Date.now(); +const writer = new buffer_writer_1.Writer(); +const reader = new buffer_reader_1.BufferReader(); +const buffer = Buffer.from([33, 33, 33, 33, 33, 33, 33, 0]); +const run = () => { + if (count > LOOPS) { + console.log(Date.now() - start); + return; + } + count++; + for (let i = 0; i < LOOPS; i++) { + reader.setBuffer(0, buffer); + reader.cstring(); + } + setImmediate(run); +}; +run(); +//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js.map new file mode 100644 index 0000000..cddd15e --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"b.js","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":";AAAA,6BAA6B;;AAE7B,mDAAwC;AAExC,mDAA8C;AAE9C,MAAM,KAAK,GAAG,IAAI,CAAA;AAClB,IAAI,KAAK,GAAG,CAAC,CAAA;AACb,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;AACtB,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,MAAM,GAAG,IAAI,4BAAY,EAAE,CAAA;AACjC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,GAAG,GAAG,GAAG,EAAE;IACf,IAAI,KAAK,GAAG,KAAK,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;QAC/B,OAAM;KACP;IACD,KAAK,EAAE,CAAA;IACP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;QAC3B,MAAM,CAAC,OAAO,EAAE,CAAA;KACjB;IACD,YAAY,CAAC,GAAG,CAAC,CAAA;AACnB,CAAC,CAAA;AAED,GAAG,EAAE,CAAA"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.d.ts new file mode 100644 index 0000000..8970d77 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.d.ts @@ -0,0 +1,14 @@ +/// +export declare class BufferReader { + private offset; + private buffer; + private encoding; + constructor(offset?: number); + setBuffer(offset: number, buffer: Buffer): void; + int16(): number; + byte(): number; + int32(): number; + string(length: number): string; + cstring(): string; + bytes(length: number): Buffer; +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js new file mode 100644 index 0000000..ef633b1 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BufferReader = void 0; +const emptyBuffer = Buffer.allocUnsafe(0); +class BufferReader { + constructor(offset = 0) { + this.offset = offset; + this.buffer = emptyBuffer; + // TODO(bmc): support non-utf8 encoding? + this.encoding = 'utf-8'; + } + setBuffer(offset, buffer) { + this.offset = offset; + this.buffer = buffer; + } + int16() { + const result = this.buffer.readInt16BE(this.offset); + this.offset += 2; + return result; + } + byte() { + const result = this.buffer[this.offset]; + this.offset++; + return result; + } + int32() { + const result = this.buffer.readInt32BE(this.offset); + this.offset += 4; + return result; + } + string(length) { + const result = this.buffer.toString(this.encoding, this.offset, this.offset + length); + this.offset += length; + return result; + } + cstring() { + const start = this.offset; + let end = start; + while (this.buffer[end++] !== 0) { } + this.offset = end; + return this.buffer.toString(this.encoding, start, end - 1); + } + bytes(length) { + const result = this.buffer.slice(this.offset, this.offset + length); + this.offset += length; + return result; + } +} +exports.BufferReader = BufferReader; +//# sourceMappingURL=buffer-reader.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js.map new file mode 100644 index 0000000..04d5b1d --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-reader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer-reader.js","sourceRoot":"","sources":["../src/buffer-reader.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAEzC,MAAa,YAAY;IAMvB,YAAoB,SAAiB,CAAC;QAAlB,WAAM,GAAN,MAAM,CAAY;QAL9B,WAAM,GAAW,WAAW,CAAA;QAEpC,wCAAwC;QAChC,aAAQ,GAAW,OAAO,CAAA;IAEO,CAAC;IAEnC,SAAS,CAAC,MAAc,EAAE,MAAc;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAChB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,IAAI;QACT,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,MAAM,EAAE,CAAA;QACb,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAChB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,MAAM,CAAC,MAAc;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;QACrF,IAAI,CAAC,MAAM,IAAI,MAAM,CAAA;QACrB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,GAAG,GAAG,KAAK,CAAA;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,GAAE;QACnC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC,CAAA;IAC5D,CAAC;IAEM,KAAK,CAAC,MAAc;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;QACnE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAA;QACrB,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAlDD,oCAkDC"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.d.ts new file mode 100644 index 0000000..4ac41e6 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.d.ts @@ -0,0 +1,16 @@ +/// +export declare class Writer { + private size; + private buffer; + private offset; + private headerPosition; + constructor(size?: number); + private ensure; + addInt32(num: number): Writer; + addInt16(num: number): Writer; + addCString(string: string): Writer; + addString(string?: string): Writer; + add(otherBuffer: Buffer): Writer; + private join; + flush(code?: number): Buffer; +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js new file mode 100644 index 0000000..16fd616 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js @@ -0,0 +1,81 @@ +"use strict"; +//binary data writer tuned for encoding binary specific to the postgres binary protocol +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Writer = void 0; +class Writer { + constructor(size = 256) { + this.size = size; + this.offset = 5; + this.headerPosition = 0; + this.buffer = Buffer.allocUnsafe(size); + } + ensure(size) { + var remaining = this.buffer.length - this.offset; + if (remaining < size) { + var oldBuffer = this.buffer; + // exponential growth factor of around ~ 1.5 + // https://stackoverflow.com/questions/2269063/buffer-growth-strategy + var newSize = oldBuffer.length + (oldBuffer.length >> 1) + size; + this.buffer = Buffer.allocUnsafe(newSize); + oldBuffer.copy(this.buffer); + } + } + addInt32(num) { + this.ensure(4); + this.buffer[this.offset++] = (num >>> 24) & 0xff; + this.buffer[this.offset++] = (num >>> 16) & 0xff; + this.buffer[this.offset++] = (num >>> 8) & 0xff; + this.buffer[this.offset++] = (num >>> 0) & 0xff; + return this; + } + addInt16(num) { + this.ensure(2); + this.buffer[this.offset++] = (num >>> 8) & 0xff; + this.buffer[this.offset++] = (num >>> 0) & 0xff; + return this; + } + addCString(string) { + if (!string) { + this.ensure(1); + } + else { + var len = Buffer.byteLength(string); + this.ensure(len + 1); // +1 for null terminator + this.buffer.write(string, this.offset, 'utf-8'); + this.offset += len; + } + this.buffer[this.offset++] = 0; // null terminator + return this; + } + addString(string = '') { + var len = Buffer.byteLength(string); + this.ensure(len); + this.buffer.write(string, this.offset); + this.offset += len; + return this; + } + add(otherBuffer) { + this.ensure(otherBuffer.length); + otherBuffer.copy(this.buffer, this.offset); + this.offset += otherBuffer.length; + return this; + } + join(code) { + if (code) { + this.buffer[this.headerPosition] = code; + //length is everything in this packet minus the code + const length = this.offset - (this.headerPosition + 1); + this.buffer.writeInt32BE(length, this.headerPosition + 1); + } + return this.buffer.slice(code ? 0 : 5, this.offset); + } + flush(code) { + var result = this.join(code); + this.offset = 5; + this.headerPosition = 0; + this.buffer = Buffer.allocUnsafe(this.size); + return result; + } +} +exports.Writer = Writer; +//# sourceMappingURL=buffer-writer.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js.map new file mode 100644 index 0000000..fc6e650 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/buffer-writer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer-writer.js","sourceRoot":"","sources":["../src/buffer-writer.ts"],"names":[],"mappings":";AAAA,uFAAuF;;;AAEvF,MAAa,MAAM;IAIjB,YAAoB,OAAO,GAAG;QAAV,SAAI,GAAJ,IAAI,CAAM;QAFtB,WAAM,GAAW,CAAC,CAAA;QAClB,mBAAc,GAAW,CAAC,CAAA;QAEhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;IAEO,MAAM,CAAC,IAAY;QACzB,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAChD,IAAI,SAAS,GAAG,IAAI,EAAE;YACpB,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,CAAA;YAC3B,4CAA4C;YAC5C,qEAAqE;YACrE,IAAI,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;YAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;YACzC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;SAC5B;IACH,CAAC;IAEM,QAAQ,CAAC,GAAW;QACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,QAAQ,CAAC,GAAW;QACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,UAAU,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SACf;aAAM;YACL,IAAI,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAA,CAAC,yBAAyB;YAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;YAC/C,IAAI,CAAC,MAAM,IAAI,GAAG,CAAA;SACnB;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAA,CAAC,kBAAkB;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,SAAS,CAAC,SAAiB,EAAE;QAClC,IAAI,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,IAAI,GAAG,CAAA;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,GAAG,CAAC,WAAmB;QAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QAC/B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAC1C,IAAI,CAAC,MAAM,IAAI,WAAW,CAAC,MAAM,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,IAAI,CAAC,IAAa;QACxB,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;YACvC,oDAAoD;YACpD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAA;YACtD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAA;SAC1D;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACrD,CAAC;IAEM,KAAK,CAAC,IAAa;QACxB,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;QACf,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAlFD,wBAkFC"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js new file mode 100644 index 0000000..3423c96 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js @@ -0,0 +1,511 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const test_buffers_1 = __importDefault(require("./testing/test-buffers")); +const buffer_list_1 = __importDefault(require("./testing/buffer-list")); +const _1 = require("."); +const assert_1 = __importDefault(require("assert")); +const stream_1 = require("stream"); +var authOkBuffer = test_buffers_1.default.authenticationOk(); +var paramStatusBuffer = test_buffers_1.default.parameterStatus('client_encoding', 'UTF8'); +var readyForQueryBuffer = test_buffers_1.default.readyForQuery(); +var backendKeyDataBuffer = test_buffers_1.default.backendKeyData(1, 2); +var commandCompleteBuffer = test_buffers_1.default.commandComplete('SELECT 3'); +var parseCompleteBuffer = test_buffers_1.default.parseComplete(); +var bindCompleteBuffer = test_buffers_1.default.bindComplete(); +var portalSuspendedBuffer = test_buffers_1.default.portalSuspended(); +var addRow = function (bufferList, name, offset) { + return bufferList + .addCString(name) // field name + .addInt32(offset++) // table id + .addInt16(offset++) // attribute of column number + .addInt32(offset++) // objectId of field's data type + .addInt16(offset++) // datatype size + .addInt32(offset++) // type modifier + .addInt16(0); // format code, 0 => text +}; +var row1 = { + name: 'id', + tableID: 1, + attributeNumber: 2, + dataTypeID: 3, + dataTypeSize: 4, + typeModifier: 5, + formatCode: 0, +}; +var oneRowDescBuff = test_buffers_1.default.rowDescription([row1]); +row1.name = 'bang'; +var twoRowBuf = test_buffers_1.default.rowDescription([ + row1, + { + name: 'whoah', + tableID: 10, + attributeNumber: 11, + dataTypeID: 12, + dataTypeSize: 13, + typeModifier: 14, + formatCode: 0, + }, +]); +var emptyRowFieldBuf = new buffer_list_1.default().addInt16(0).join(true, 'D'); +var emptyRowFieldBuf = test_buffers_1.default.dataRow([]); +var oneFieldBuf = new buffer_list_1.default() + .addInt16(1) // number of fields + .addInt32(5) // length of bytes of fields + .addCString('test') + .join(true, 'D'); +var oneFieldBuf = test_buffers_1.default.dataRow(['test']); +var expectedAuthenticationOkayMessage = { + name: 'authenticationOk', + length: 8, +}; +var expectedParameterStatusMessage = { + name: 'parameterStatus', + parameterName: 'client_encoding', + parameterValue: 'UTF8', + length: 25, +}; +var expectedBackendKeyDataMessage = { + name: 'backendKeyData', + processID: 1, + secretKey: 2, +}; +var expectedReadyForQueryMessage = { + name: 'readyForQuery', + length: 5, + status: 'I', +}; +var expectedCommandCompleteMessage = { + name: 'commandComplete', + length: 13, + text: 'SELECT 3', +}; +var emptyRowDescriptionBuffer = new buffer_list_1.default() + .addInt16(0) // number of fields + .join(true, 'T'); +var expectedEmptyRowDescriptionMessage = { + name: 'rowDescription', + length: 6, + fieldCount: 0, + fields: [], +}; +var expectedOneRowMessage = { + name: 'rowDescription', + length: 27, + fieldCount: 1, + fields: [ + { + name: 'id', + tableID: 1, + columnID: 2, + dataTypeID: 3, + dataTypeSize: 4, + dataTypeModifier: 5, + format: 'text', + }, + ], +}; +var expectedTwoRowMessage = { + name: 'rowDescription', + length: 53, + fieldCount: 2, + fields: [ + { + name: 'bang', + tableID: 1, + columnID: 2, + dataTypeID: 3, + dataTypeSize: 4, + dataTypeModifier: 5, + format: 'text', + }, + { + name: 'whoah', + tableID: 10, + columnID: 11, + dataTypeID: 12, + dataTypeSize: 13, + dataTypeModifier: 14, + format: 'text', + }, + ], +}; +var emptyParameterDescriptionBuffer = new buffer_list_1.default() + .addInt16(0) // number of parameters + .join(true, 't'); +var oneParameterDescBuf = test_buffers_1.default.parameterDescription([1111]); +var twoParameterDescBuf = test_buffers_1.default.parameterDescription([2222, 3333]); +var expectedEmptyParameterDescriptionMessage = { + name: 'parameterDescription', + length: 6, + parameterCount: 0, + dataTypeIDs: [], +}; +var expectedOneParameterMessage = { + name: 'parameterDescription', + length: 10, + parameterCount: 1, + dataTypeIDs: [1111], +}; +var expectedTwoParameterMessage = { + name: 'parameterDescription', + length: 14, + parameterCount: 2, + dataTypeIDs: [2222, 3333], +}; +var testForMessage = function (buffer, expectedMessage) { + it('recieves and parses ' + expectedMessage.name, () => __awaiter(this, void 0, void 0, function* () { + const messages = yield parseBuffers([buffer]); + const [lastMessage] = messages; + for (const key in expectedMessage) { + assert_1.default.deepEqual(lastMessage[key], expectedMessage[key]); + } + })); +}; +var plainPasswordBuffer = test_buffers_1.default.authenticationCleartextPassword(); +var md5PasswordBuffer = test_buffers_1.default.authenticationMD5Password(); +var SASLBuffer = test_buffers_1.default.authenticationSASL(); +var SASLContinueBuffer = test_buffers_1.default.authenticationSASLContinue(); +var SASLFinalBuffer = test_buffers_1.default.authenticationSASLFinal(); +var expectedPlainPasswordMessage = { + name: 'authenticationCleartextPassword', +}; +var expectedMD5PasswordMessage = { + name: 'authenticationMD5Password', + salt: Buffer.from([1, 2, 3, 4]), +}; +var expectedSASLMessage = { + name: 'authenticationSASL', + mechanisms: ['SCRAM-SHA-256'], +}; +var expectedSASLContinueMessage = { + name: 'authenticationSASLContinue', + data: 'data', +}; +var expectedSASLFinalMessage = { + name: 'authenticationSASLFinal', + data: 'data', +}; +var notificationResponseBuffer = test_buffers_1.default.notification(4, 'hi', 'boom'); +var expectedNotificationResponseMessage = { + name: 'notification', + processId: 4, + channel: 'hi', + payload: 'boom', +}; +const parseBuffers = (buffers) => __awaiter(void 0, void 0, void 0, function* () { + const stream = new stream_1.PassThrough(); + for (const buffer of buffers) { + stream.write(buffer); + } + stream.end(); + const msgs = []; + yield _1.parse(stream, (msg) => msgs.push(msg)); + return msgs; +}); +describe('PgPacketStream', function () { + testForMessage(authOkBuffer, expectedAuthenticationOkayMessage); + testForMessage(plainPasswordBuffer, expectedPlainPasswordMessage); + testForMessage(md5PasswordBuffer, expectedMD5PasswordMessage); + testForMessage(SASLBuffer, expectedSASLMessage); + testForMessage(SASLContinueBuffer, expectedSASLContinueMessage); + // this exercises a found bug in the parser: + // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 + // and adds a test which is deterministic, rather than relying on network packet chunking + const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])]); + testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage); + testForMessage(SASLFinalBuffer, expectedSASLFinalMessage); + // this exercises a found bug in the parser: + // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 + // and adds a test which is deterministic, rather than relying on network packet chunking + const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])]); + testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage); + testForMessage(paramStatusBuffer, expectedParameterStatusMessage); + testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage); + testForMessage(readyForQueryBuffer, expectedReadyForQueryMessage); + testForMessage(commandCompleteBuffer, expectedCommandCompleteMessage); + testForMessage(notificationResponseBuffer, expectedNotificationResponseMessage); + testForMessage(test_buffers_1.default.emptyQuery(), { + name: 'emptyQuery', + length: 4, + }); + testForMessage(Buffer.from([0x6e, 0, 0, 0, 4]), { + name: 'noData', + }); + describe('rowDescription messages', function () { + testForMessage(emptyRowDescriptionBuffer, expectedEmptyRowDescriptionMessage); + testForMessage(oneRowDescBuff, expectedOneRowMessage); + testForMessage(twoRowBuf, expectedTwoRowMessage); + }); + describe('parameterDescription messages', function () { + testForMessage(emptyParameterDescriptionBuffer, expectedEmptyParameterDescriptionMessage); + testForMessage(oneParameterDescBuf, expectedOneParameterMessage); + testForMessage(twoParameterDescBuf, expectedTwoParameterMessage); + }); + describe('parsing rows', function () { + describe('parsing empty row', function () { + testForMessage(emptyRowFieldBuf, { + name: 'dataRow', + fieldCount: 0, + }); + }); + describe('parsing data row with fields', function () { + testForMessage(oneFieldBuf, { + name: 'dataRow', + fieldCount: 1, + fields: ['test'], + }); + }); + }); + describe('notice message', function () { + // this uses the same logic as error message + var buff = test_buffers_1.default.notice([{ type: 'C', value: 'code' }]); + testForMessage(buff, { + name: 'notice', + code: 'code', + }); + }); + testForMessage(test_buffers_1.default.error([]), { + name: 'error', + }); + describe('with all the fields', function () { + var buffer = test_buffers_1.default.error([ + { + type: 'S', + value: 'ERROR', + }, + { + type: 'C', + value: 'code', + }, + { + type: 'M', + value: 'message', + }, + { + type: 'D', + value: 'details', + }, + { + type: 'H', + value: 'hint', + }, + { + type: 'P', + value: '100', + }, + { + type: 'p', + value: '101', + }, + { + type: 'q', + value: 'query', + }, + { + type: 'W', + value: 'where', + }, + { + type: 'F', + value: 'file', + }, + { + type: 'L', + value: 'line', + }, + { + type: 'R', + value: 'routine', + }, + { + type: 'Z', + value: 'alsdkf', + }, + ]); + testForMessage(buffer, { + name: 'error', + severity: 'ERROR', + code: 'code', + message: 'message', + detail: 'details', + hint: 'hint', + position: '100', + internalPosition: '101', + internalQuery: 'query', + where: 'where', + file: 'file', + line: 'line', + routine: 'routine', + }); + }); + testForMessage(parseCompleteBuffer, { + name: 'parseComplete', + }); + testForMessage(bindCompleteBuffer, { + name: 'bindComplete', + }); + testForMessage(bindCompleteBuffer, { + name: 'bindComplete', + }); + testForMessage(test_buffers_1.default.closeComplete(), { + name: 'closeComplete', + }); + describe('parses portal suspended message', function () { + testForMessage(portalSuspendedBuffer, { + name: 'portalSuspended', + }); + }); + describe('parses replication start message', function () { + testForMessage(Buffer.from([0x57, 0x00, 0x00, 0x00, 0x04]), { + name: 'replicationStart', + length: 4, + }); + }); + describe('copy', () => { + testForMessage(test_buffers_1.default.copyIn(0), { + name: 'copyInResponse', + length: 7, + binary: false, + columnTypes: [], + }); + testForMessage(test_buffers_1.default.copyIn(2), { + name: 'copyInResponse', + length: 11, + binary: false, + columnTypes: [0, 1], + }); + testForMessage(test_buffers_1.default.copyOut(0), { + name: 'copyOutResponse', + length: 7, + binary: false, + columnTypes: [], + }); + testForMessage(test_buffers_1.default.copyOut(3), { + name: 'copyOutResponse', + length: 13, + binary: false, + columnTypes: [0, 1, 2], + }); + testForMessage(test_buffers_1.default.copyDone(), { + name: 'copyDone', + length: 4, + }); + testForMessage(test_buffers_1.default.copyData(Buffer.from([5, 6, 7])), { + name: 'copyData', + length: 7, + chunk: Buffer.from([5, 6, 7]), + }); + }); + // since the data message on a stream can randomly divide the incomming + // tcp packets anywhere, we need to make sure we can parse every single + // split on a tcp message + describe('split buffer, single message parsing', function () { + var fullBuffer = test_buffers_1.default.dataRow([null, 'bang', 'zug zug', null, '!']); + it('parses when full buffer comes in', function () { + return __awaiter(this, void 0, void 0, function* () { + const messages = yield parseBuffers([fullBuffer]); + const message = messages[0]; + assert_1.default.equal(message.fields.length, 5); + assert_1.default.equal(message.fields[0], null); + assert_1.default.equal(message.fields[1], 'bang'); + assert_1.default.equal(message.fields[2], 'zug zug'); + assert_1.default.equal(message.fields[3], null); + assert_1.default.equal(message.fields[4], '!'); + }); + }); + var testMessageRecievedAfterSpiltAt = function (split) { + return __awaiter(this, void 0, void 0, function* () { + var firstBuffer = Buffer.alloc(fullBuffer.length - split); + var secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length); + fullBuffer.copy(firstBuffer, 0, 0); + fullBuffer.copy(secondBuffer, 0, firstBuffer.length); + const messages = yield parseBuffers([fullBuffer]); + const message = messages[0]; + assert_1.default.equal(message.fields.length, 5); + assert_1.default.equal(message.fields[0], null); + assert_1.default.equal(message.fields[1], 'bang'); + assert_1.default.equal(message.fields[2], 'zug zug'); + assert_1.default.equal(message.fields[3], null); + assert_1.default.equal(message.fields[4], '!'); + }); + }; + it('parses when split in the middle', function () { + testMessageRecievedAfterSpiltAt(6); + }); + it('parses when split at end', function () { + testMessageRecievedAfterSpiltAt(2); + }); + it('parses when split at beginning', function () { + testMessageRecievedAfterSpiltAt(fullBuffer.length - 2); + testMessageRecievedAfterSpiltAt(fullBuffer.length - 1); + testMessageRecievedAfterSpiltAt(fullBuffer.length - 5); + }); + }); + describe('split buffer, multiple message parsing', function () { + var dataRowBuffer = test_buffers_1.default.dataRow(['!']); + var readyForQueryBuffer = test_buffers_1.default.readyForQuery(); + var fullBuffer = Buffer.alloc(dataRowBuffer.length + readyForQueryBuffer.length); + dataRowBuffer.copy(fullBuffer, 0, 0); + readyForQueryBuffer.copy(fullBuffer, dataRowBuffer.length, 0); + var verifyMessages = function (messages) { + assert_1.default.strictEqual(messages.length, 2); + assert_1.default.deepEqual(messages[0], { + name: 'dataRow', + fieldCount: 1, + length: 11, + fields: ['!'], + }); + assert_1.default.equal(messages[0].fields[0], '!'); + assert_1.default.deepEqual(messages[1], { + name: 'readyForQuery', + length: 5, + status: 'I', + }); + }; + // sanity check + it('recieves both messages when packet is not split', function () { + return __awaiter(this, void 0, void 0, function* () { + const messages = yield parseBuffers([fullBuffer]); + verifyMessages(messages); + }); + }); + var splitAndVerifyTwoMessages = function (split) { + return __awaiter(this, void 0, void 0, function* () { + var firstBuffer = Buffer.alloc(fullBuffer.length - split); + var secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length); + fullBuffer.copy(firstBuffer, 0, 0); + fullBuffer.copy(secondBuffer, 0, firstBuffer.length); + const messages = yield parseBuffers([firstBuffer, secondBuffer]); + verifyMessages(messages); + }); + }; + describe('recieves both messages when packet is split', function () { + it('in the middle', function () { + return splitAndVerifyTwoMessages(11); + }); + it('at the front', function () { + return Promise.all([ + splitAndVerifyTwoMessages(fullBuffer.length - 1), + splitAndVerifyTwoMessages(fullBuffer.length - 4), + splitAndVerifyTwoMessages(fullBuffer.length - 6), + ]); + }); + it('at the end', function () { + return Promise.all([splitAndVerifyTwoMessages(8), splitAndVerifyTwoMessages(1)]); + }); + }); + }); +}); +//# sourceMappingURL=inbound-parser.test.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js.map new file mode 100644 index 0000000..b026ac4 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/inbound-parser.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inbound-parser.test.js","sourceRoot":"","sources":["../src/inbound-parser.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0EAA4C;AAC5C,wEAA8C;AAC9C,wBAAyB;AACzB,oDAA2B;AAC3B,mCAAoC;AAGpC,IAAI,YAAY,GAAG,sBAAO,CAAC,gBAAgB,EAAE,CAAA;AAC7C,IAAI,iBAAiB,GAAG,sBAAO,CAAC,eAAe,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;AAC1E,IAAI,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;AACjD,IAAI,oBAAoB,GAAG,sBAAO,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACvD,IAAI,qBAAqB,GAAG,sBAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;AAC/D,IAAI,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;AACjD,IAAI,kBAAkB,GAAG,sBAAO,CAAC,YAAY,EAAE,CAAA;AAC/C,IAAI,qBAAqB,GAAG,sBAAO,CAAC,eAAe,EAAE,CAAA;AAErD,IAAI,MAAM,GAAG,UAAU,UAAsB,EAAE,IAAY,EAAE,MAAc;IACzE,OAAO,UAAU;SACd,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa;SAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW;SAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,6BAA6B;SAChD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,gCAAgC;SACnD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB;SACnC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB;SACnC,QAAQ,CAAC,CAAC,CAAC,CAAA,CAAC,yBAAyB;AAC1C,CAAC,CAAA;AAED,IAAI,IAAI,GAAG;IACT,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,CAAC;IACV,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;CACd,CAAA;AACD,IAAI,cAAc,GAAG,sBAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AACnD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;AAElB,IAAI,SAAS,GAAG,sBAAO,CAAC,cAAc,CAAC;IACrC,IAAI;IACJ;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAA;AAEF,IAAI,gBAAgB,GAAG,IAAI,qBAAU,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAEnE,IAAI,gBAAgB,GAAG,sBAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AAE1C,IAAI,WAAW,GAAG,IAAI,qBAAU,EAAE;KAC/B,QAAQ,CAAC,CAAC,CAAC,CAAC,mBAAmB;KAC/B,QAAQ,CAAC,CAAC,CAAC,CAAC,4BAA4B;KACxC,UAAU,CAAC,MAAM,CAAC;KAClB,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAElB,IAAI,WAAW,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE3C,IAAI,iCAAiC,GAAG;IACtC,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,CAAC;CACV,CAAA;AAED,IAAI,8BAA8B,GAAG;IACnC,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,MAAM;IACtB,MAAM,EAAE,EAAE;CACX,CAAA;AAED,IAAI,6BAA6B,GAAG;IAClC,IAAI,EAAE,gBAAgB;IACtB,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;CACb,CAAA;AAED,IAAI,4BAA4B,GAAG;IACjC,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,GAAG;CACZ,CAAA;AAED,IAAI,8BAA8B,GAAG;IACnC,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,UAAU;CACjB,CAAA;AACD,IAAI,yBAAyB,GAAG,IAAI,qBAAU,EAAE;KAC7C,QAAQ,CAAC,CAAC,CAAC,CAAC,mBAAmB;KAC/B,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAElB,IAAI,kCAAkC,GAAG;IACvC,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,EAAE;CACX,CAAA;AACD,IAAI,qBAAqB,GAAG;IAC1B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,YAAY,EAAE,CAAC;YACf,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,MAAM;SACf;KACF;CACF,CAAA;AAED,IAAI,qBAAqB,GAAG;IAC1B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,YAAY,EAAE,CAAC;YACf,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,MAAM;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,EAAE;YAChB,gBAAgB,EAAE,EAAE;YACpB,MAAM,EAAE,MAAM;SACf;KACF;CACF,CAAA;AAED,IAAI,+BAA+B,GAAG,IAAI,qBAAU,EAAE;KACnD,QAAQ,CAAC,CAAC,CAAC,CAAC,uBAAuB;KACnC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAElB,IAAI,mBAAmB,GAAG,sBAAO,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAE9D,IAAI,mBAAmB,GAAG,sBAAO,CAAC,oBAAoB,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEpE,IAAI,wCAAwC,GAAG;IAC7C,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,EAAE;CAChB,CAAA;AAED,IAAI,2BAA2B,GAAG;IAChC,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,CAAC;CACpB,CAAA;AAED,IAAI,2BAA2B,GAAG;IAChC,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CAC1B,CAAA;AAED,IAAI,cAAc,GAAG,UAAU,MAAc,EAAE,eAAoB;IACjE,EAAE,CAAC,sBAAsB,GAAG,eAAe,CAAC,IAAI,EAAE,GAAS,EAAE;QAC3D,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;QAC7C,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAA;QAE9B,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE;YACjC,gBAAM,CAAC,SAAS,CAAE,WAAmB,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;SAClE;IACH,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,IAAI,mBAAmB,GAAG,sBAAO,CAAC,+BAA+B,EAAE,CAAA;AACnE,IAAI,iBAAiB,GAAG,sBAAO,CAAC,yBAAyB,EAAE,CAAA;AAC3D,IAAI,UAAU,GAAG,sBAAO,CAAC,kBAAkB,EAAE,CAAA;AAC7C,IAAI,kBAAkB,GAAG,sBAAO,CAAC,0BAA0B,EAAE,CAAA;AAC7D,IAAI,eAAe,GAAG,sBAAO,CAAC,uBAAuB,EAAE,CAAA;AAEvD,IAAI,4BAA4B,GAAG;IACjC,IAAI,EAAE,iCAAiC;CACxC,CAAA;AAED,IAAI,0BAA0B,GAAG;IAC/B,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAChC,CAAA;AAED,IAAI,mBAAmB,GAAG;IACxB,IAAI,EAAE,oBAAoB;IAC1B,UAAU,EAAE,CAAC,eAAe,CAAC;CAC9B,CAAA;AAED,IAAI,2BAA2B,GAAG;IAChC,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,MAAM;CACb,CAAA;AAED,IAAI,wBAAwB,GAAG;IAC7B,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,MAAM;CACb,CAAA;AAED,IAAI,0BAA0B,GAAG,sBAAO,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AACtE,IAAI,mCAAmC,GAAG;IACxC,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,YAAY,GAAG,CAAO,OAAiB,EAA6B,EAAE;IAC1E,MAAM,MAAM,GAAG,IAAI,oBAAW,EAAE,CAAA;IAChC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACrB;IACD,MAAM,CAAC,GAAG,EAAE,CAAA;IACZ,MAAM,IAAI,GAAqB,EAAE,CAAA;IACjC,MAAM,QAAK,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5C,OAAO,IAAI,CAAA;AACb,CAAC,CAAA,CAAA;AAED,QAAQ,CAAC,gBAAgB,EAAE;IACzB,cAAc,CAAC,YAAY,EAAE,iCAAiC,CAAC,CAAA;IAC/D,cAAc,CAAC,mBAAmB,EAAE,4BAA4B,CAAC,CAAA;IACjE,cAAc,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAA;IAC7D,cAAc,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAA;IAC/C,cAAc,CAAC,kBAAkB,EAAE,2BAA2B,CAAC,CAAA;IAE/D,4CAA4C;IAC5C,2EAA2E;IAC3E,yFAAyF;IACzF,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACjG,cAAc,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,CAAA;IAEvE,cAAc,CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAA;IAEzD,4CAA4C;IAC5C,2EAA2E;IAC3E,yFAAyF;IACzF,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3F,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,CAAA;IAEjE,cAAc,CAAC,iBAAiB,EAAE,8BAA8B,CAAC,CAAA;IACjE,cAAc,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,CAAA;IACnE,cAAc,CAAC,mBAAmB,EAAE,4BAA4B,CAAC,CAAA;IACjE,cAAc,CAAC,qBAAqB,EAAE,8BAA8B,CAAC,CAAA;IACrE,cAAc,CAAC,0BAA0B,EAAE,mCAAmC,CAAC,CAAA;IAC/E,cAAc,CAAC,sBAAO,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,CAAC;KACV,CAAC,CAAA;IAEF,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QAC9C,IAAI,EAAE,QAAQ;KACf,CAAC,CAAA;IAEF,QAAQ,CAAC,yBAAyB,EAAE;QAClC,cAAc,CAAC,yBAAyB,EAAE,kCAAkC,CAAC,CAAA;QAC7E,cAAc,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAA;QACrD,cAAc,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,+BAA+B,EAAE;QACxC,cAAc,CAAC,+BAA+B,EAAE,wCAAwC,CAAC,CAAA;QACzF,cAAc,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAA;QAChE,cAAc,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,cAAc,EAAE;QACvB,QAAQ,CAAC,mBAAmB,EAAE;YAC5B,cAAc,CAAC,gBAAgB,EAAE;gBAC/B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;aACd,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,8BAA8B,EAAE;YACvC,cAAc,CAAC,WAAW,EAAE;gBAC1B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;gBACb,MAAM,EAAE,CAAC,MAAM,CAAC;aACjB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,gBAAgB,EAAE;QACzB,4CAA4C;QAC5C,IAAI,IAAI,GAAG,sBAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;QACzD,cAAc,CAAC,IAAI,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,sBAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;QAChC,IAAI,EAAE,OAAO;KACd,CAAC,CAAA;IAEF,QAAQ,CAAC,qBAAqB,EAAE;QAC9B,IAAI,MAAM,GAAG,sBAAO,CAAC,KAAK,CAAC;YACzB;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACb;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACb;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,QAAQ;aAChB;SACF,CAAC,CAAA;QAEF,cAAc,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,gBAAgB,EAAE,KAAK;YACvB,aAAa,EAAE,OAAO;YACtB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;SACnB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,mBAAmB,EAAE;QAClC,IAAI,EAAE,eAAe;KACtB,CAAC,CAAA;IAEF,cAAc,CAAC,kBAAkB,EAAE;QACjC,IAAI,EAAE,cAAc;KACrB,CAAC,CAAA;IAEF,cAAc,CAAC,kBAAkB,EAAE;QACjC,IAAI,EAAE,cAAc;KACrB,CAAC,CAAA;IAEF,cAAc,CAAC,sBAAO,CAAC,aAAa,EAAE,EAAE;QACtC,IAAI,EAAE,eAAe;KACtB,CAAC,CAAA;IAEF,QAAQ,CAAC,iCAAiC,EAAE;QAC1C,cAAc,CAAC,qBAAqB,EAAE;YACpC,IAAI,EAAE,iBAAiB;SACxB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,kCAAkC,EAAE;QAC3C,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE;YAC1D,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,CAAC;SACV,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,cAAc,CAAC,sBAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YAChC,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,EAAE;SAChB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YAChC,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACpB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,EAAE;SAChB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACvB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,QAAQ,EAAE,EAAE;YACjC,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC;SACV,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;YACvD,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SAC9B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,uEAAuE;IACvE,uEAAuE;IACvE,yBAAyB;IACzB,QAAQ,CAAC,sCAAsC,EAAE;QAC/C,IAAI,UAAU,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;QAEtE,EAAE,CAAC,kCAAkC,EAAE;;gBACrC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;gBACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAQ,CAAA;gBAClC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;gBACtC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;gBACvC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;gBAC1C,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACtC,CAAC;SAAA,CAAC,CAAA;QAEF,IAAI,+BAA+B,GAAG,UAAgB,KAAa;;gBACjE,IAAI,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;gBACzD,IAAI,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;gBACvE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;gBAClC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;gBACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAQ,CAAA;gBAClC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;gBACtC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;gBACvC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;gBAC1C,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACtC,CAAC;SAAA,CAAA;QAED,EAAE,CAAC,iCAAiC,EAAE;YACpC,+BAA+B,CAAC,CAAC,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0BAA0B,EAAE;YAC7B,+BAA+B,CAAC,CAAC,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,gCAAgC,EAAE;YACnC,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACtD,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACtD,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACxD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,wCAAwC,EAAE;QACjD,IAAI,aAAa,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,IAAI,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;QACjD,IAAI,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;QAChF,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,mBAAmB,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QAE7D,IAAI,cAAc,GAAG,UAAU,QAAe;YAC5C,gBAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACtC,gBAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBAC5B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;gBACb,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,CAAC,GAAG,CAAC;aACd,CAAC,CAAA;YACF,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACxC,gBAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBAC5B,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,GAAG;aACZ,CAAC,CAAA;QACJ,CAAC,CAAA;QACD,eAAe;QACf,EAAE,CAAC,iDAAiD,EAAE;;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;gBACjD,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC1B,CAAC;SAAA,CAAC,CAAA;QAEF,IAAI,yBAAyB,GAAG,UAAgB,KAAa;;gBAC3D,IAAI,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;gBACzD,IAAI,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;gBACvE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;gBAClC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;gBAChE,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC1B,CAAC;SAAA,CAAA;QAED,QAAQ,CAAC,6CAA6C,EAAE;YACtD,EAAE,CAAC,eAAe,EAAE;gBAClB,OAAO,yBAAyB,CAAC,EAAE,CAAC,CAAA;YACtC,CAAC,CAAC,CAAA;YACF,EAAE,CAAC,cAAc,EAAE;gBACjB,OAAO,OAAO,CAAC,GAAG,CAAC;oBACjB,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;oBAChD,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;oBAChD,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;iBACjD,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,YAAY,EAAE;gBACf,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAClF,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.d.ts new file mode 100644 index 0000000..3961def --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.d.ts @@ -0,0 +1,6 @@ +/// +import { DatabaseError } from './messages'; +import { serialize } from './serializer'; +import { MessageCallback } from './parser'; +export declare function parse(stream: NodeJS.ReadableStream, callback: MessageCallback): Promise; +export { serialize, DatabaseError }; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js new file mode 100644 index 0000000..7eca3bf --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DatabaseError = exports.serialize = exports.parse = void 0; +const messages_1 = require("./messages"); +Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function () { return messages_1.DatabaseError; } }); +const serializer_1 = require("./serializer"); +Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return serializer_1.serialize; } }); +const parser_1 = require("./parser"); +function parse(stream, callback) { + const parser = new parser_1.Parser(); + stream.on('data', (buffer) => parser.parse(buffer, callback)); + return new Promise((resolve) => stream.on('end', () => resolve())); +} +exports.parse = parse; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js.map new file mode 100644 index 0000000..5db25b6 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAUtC,8FAVK,wBAAa,OAUL;AATjC,6CAAwC;AAS/B,0FATA,sBAAS,OASA;AARlB,qCAAkD;AAElD,SAAgB,KAAK,CAAC,MAA6B,EAAE,QAAyB;IAC5E,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;IACrE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAJD,sBAIC"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.d.ts new file mode 100644 index 0000000..f8f2e63 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.d.ts @@ -0,0 +1,162 @@ +/// +export declare type Mode = 'text' | 'binary'; +export declare type MessageName = 'parseComplete' | 'bindComplete' | 'closeComplete' | 'noData' | 'portalSuspended' | 'replicationStart' | 'emptyQuery' | 'copyDone' | 'copyData' | 'rowDescription' | 'parameterDescription' | 'parameterStatus' | 'backendKeyData' | 'notification' | 'readyForQuery' | 'commandComplete' | 'dataRow' | 'copyInResponse' | 'copyOutResponse' | 'authenticationOk' | 'authenticationMD5Password' | 'authenticationCleartextPassword' | 'authenticationSASL' | 'authenticationSASLContinue' | 'authenticationSASLFinal' | 'error' | 'notice'; +export interface BackendMessage { + name: MessageName; + length: number; +} +export declare const parseComplete: BackendMessage; +export declare const bindComplete: BackendMessage; +export declare const closeComplete: BackendMessage; +export declare const noData: BackendMessage; +export declare const portalSuspended: BackendMessage; +export declare const replicationStart: BackendMessage; +export declare const emptyQuery: BackendMessage; +export declare const copyDone: BackendMessage; +interface NoticeOrError { + message: string | undefined; + severity: string | undefined; + code: string | undefined; + detail: string | undefined; + hint: string | undefined; + position: string | undefined; + internalPosition: string | undefined; + internalQuery: string | undefined; + where: string | undefined; + schema: string | undefined; + table: string | undefined; + column: string | undefined; + dataType: string | undefined; + constraint: string | undefined; + file: string | undefined; + line: string | undefined; + routine: string | undefined; +} +export declare class DatabaseError extends Error implements NoticeOrError { + readonly length: number; + readonly name: MessageName; + severity: string | undefined; + code: string | undefined; + detail: string | undefined; + hint: string | undefined; + position: string | undefined; + internalPosition: string | undefined; + internalQuery: string | undefined; + where: string | undefined; + schema: string | undefined; + table: string | undefined; + column: string | undefined; + dataType: string | undefined; + constraint: string | undefined; + file: string | undefined; + line: string | undefined; + routine: string | undefined; + constructor(message: string, length: number, name: MessageName); +} +export declare class CopyDataMessage { + readonly length: number; + readonly chunk: Buffer; + readonly name = "copyData"; + constructor(length: number, chunk: Buffer); +} +export declare class CopyResponse { + readonly length: number; + readonly name: MessageName; + readonly binary: boolean; + readonly columnTypes: number[]; + constructor(length: number, name: MessageName, binary: boolean, columnCount: number); +} +export declare class Field { + readonly name: string; + readonly tableID: number; + readonly columnID: number; + readonly dataTypeID: number; + readonly dataTypeSize: number; + readonly dataTypeModifier: number; + readonly format: Mode; + constructor(name: string, tableID: number, columnID: number, dataTypeID: number, dataTypeSize: number, dataTypeModifier: number, format: Mode); +} +export declare class RowDescriptionMessage { + readonly length: number; + readonly fieldCount: number; + readonly name: MessageName; + readonly fields: Field[]; + constructor(length: number, fieldCount: number); +} +export declare class ParameterDescriptionMessage { + readonly length: number; + readonly parameterCount: number; + readonly name: MessageName; + readonly dataTypeIDs: number[]; + constructor(length: number, parameterCount: number); +} +export declare class ParameterStatusMessage { + readonly length: number; + readonly parameterName: string; + readonly parameterValue: string; + readonly name: MessageName; + constructor(length: number, parameterName: string, parameterValue: string); +} +export declare class AuthenticationMD5Password implements BackendMessage { + readonly length: number; + readonly salt: Buffer; + readonly name: MessageName; + constructor(length: number, salt: Buffer); +} +export declare class BackendKeyDataMessage { + readonly length: number; + readonly processID: number; + readonly secretKey: number; + readonly name: MessageName; + constructor(length: number, processID: number, secretKey: number); +} +export declare class NotificationResponseMessage { + readonly length: number; + readonly processId: number; + readonly channel: string; + readonly payload: string; + readonly name: MessageName; + constructor(length: number, processId: number, channel: string, payload: string); +} +export declare class ReadyForQueryMessage { + readonly length: number; + readonly status: string; + readonly name: MessageName; + constructor(length: number, status: string); +} +export declare class CommandCompleteMessage { + readonly length: number; + readonly text: string; + readonly name: MessageName; + constructor(length: number, text: string); +} +export declare class DataRowMessage { + length: number; + fields: any[]; + readonly fieldCount: number; + readonly name: MessageName; + constructor(length: number, fields: any[]); +} +export declare class NoticeMessage implements BackendMessage, NoticeOrError { + readonly length: number; + readonly message: string | undefined; + constructor(length: number, message: string | undefined); + readonly name = "notice"; + severity: string | undefined; + code: string | undefined; + detail: string | undefined; + hint: string | undefined; + position: string | undefined; + internalPosition: string | undefined; + internalQuery: string | undefined; + where: string | undefined; + schema: string | undefined; + table: string | undefined; + column: string | undefined; + dataType: string | undefined; + constraint: string | undefined; + file: string | undefined; + line: string | undefined; + routine: string | undefined; +} +export {}; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js new file mode 100644 index 0000000..b9f2c44 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js @@ -0,0 +1,160 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NoticeMessage = exports.DataRowMessage = exports.CommandCompleteMessage = exports.ReadyForQueryMessage = exports.NotificationResponseMessage = exports.BackendKeyDataMessage = exports.AuthenticationMD5Password = exports.ParameterStatusMessage = exports.ParameterDescriptionMessage = exports.RowDescriptionMessage = exports.Field = exports.CopyResponse = exports.CopyDataMessage = exports.DatabaseError = exports.copyDone = exports.emptyQuery = exports.replicationStart = exports.portalSuspended = exports.noData = exports.closeComplete = exports.bindComplete = exports.parseComplete = void 0; +exports.parseComplete = { + name: 'parseComplete', + length: 5, +}; +exports.bindComplete = { + name: 'bindComplete', + length: 5, +}; +exports.closeComplete = { + name: 'closeComplete', + length: 5, +}; +exports.noData = { + name: 'noData', + length: 5, +}; +exports.portalSuspended = { + name: 'portalSuspended', + length: 5, +}; +exports.replicationStart = { + name: 'replicationStart', + length: 4, +}; +exports.emptyQuery = { + name: 'emptyQuery', + length: 4, +}; +exports.copyDone = { + name: 'copyDone', + length: 4, +}; +class DatabaseError extends Error { + constructor(message, length, name) { + super(message); + this.length = length; + this.name = name; + } +} +exports.DatabaseError = DatabaseError; +class CopyDataMessage { + constructor(length, chunk) { + this.length = length; + this.chunk = chunk; + this.name = 'copyData'; + } +} +exports.CopyDataMessage = CopyDataMessage; +class CopyResponse { + constructor(length, name, binary, columnCount) { + this.length = length; + this.name = name; + this.binary = binary; + this.columnTypes = new Array(columnCount); + } +} +exports.CopyResponse = CopyResponse; +class Field { + constructor(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, format) { + this.name = name; + this.tableID = tableID; + this.columnID = columnID; + this.dataTypeID = dataTypeID; + this.dataTypeSize = dataTypeSize; + this.dataTypeModifier = dataTypeModifier; + this.format = format; + } +} +exports.Field = Field; +class RowDescriptionMessage { + constructor(length, fieldCount) { + this.length = length; + this.fieldCount = fieldCount; + this.name = 'rowDescription'; + this.fields = new Array(this.fieldCount); + } +} +exports.RowDescriptionMessage = RowDescriptionMessage; +class ParameterDescriptionMessage { + constructor(length, parameterCount) { + this.length = length; + this.parameterCount = parameterCount; + this.name = 'parameterDescription'; + this.dataTypeIDs = new Array(this.parameterCount); + } +} +exports.ParameterDescriptionMessage = ParameterDescriptionMessage; +class ParameterStatusMessage { + constructor(length, parameterName, parameterValue) { + this.length = length; + this.parameterName = parameterName; + this.parameterValue = parameterValue; + this.name = 'parameterStatus'; + } +} +exports.ParameterStatusMessage = ParameterStatusMessage; +class AuthenticationMD5Password { + constructor(length, salt) { + this.length = length; + this.salt = salt; + this.name = 'authenticationMD5Password'; + } +} +exports.AuthenticationMD5Password = AuthenticationMD5Password; +class BackendKeyDataMessage { + constructor(length, processID, secretKey) { + this.length = length; + this.processID = processID; + this.secretKey = secretKey; + this.name = 'backendKeyData'; + } +} +exports.BackendKeyDataMessage = BackendKeyDataMessage; +class NotificationResponseMessage { + constructor(length, processId, channel, payload) { + this.length = length; + this.processId = processId; + this.channel = channel; + this.payload = payload; + this.name = 'notification'; + } +} +exports.NotificationResponseMessage = NotificationResponseMessage; +class ReadyForQueryMessage { + constructor(length, status) { + this.length = length; + this.status = status; + this.name = 'readyForQuery'; + } +} +exports.ReadyForQueryMessage = ReadyForQueryMessage; +class CommandCompleteMessage { + constructor(length, text) { + this.length = length; + this.text = text; + this.name = 'commandComplete'; + } +} +exports.CommandCompleteMessage = CommandCompleteMessage; +class DataRowMessage { + constructor(length, fields) { + this.length = length; + this.fields = fields; + this.name = 'dataRow'; + this.fieldCount = fields.length; + } +} +exports.DataRowMessage = DataRowMessage; +class NoticeMessage { + constructor(length, message) { + this.length = length; + this.message = message; + this.name = 'notice'; + } +} +exports.NoticeMessage = NoticeMessage; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js.map new file mode 100644 index 0000000..091e5c3 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":";;;AAoCa,QAAA,aAAa,GAAmB;IAC3C,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,YAAY,GAAmB;IAC1C,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,aAAa,GAAmB;IAC3C,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,MAAM,GAAmB;IACpC,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,eAAe,GAAmB;IAC7C,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,gBAAgB,GAAmB;IAC9C,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,QAAQ,GAAmB;IACtC,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,CAAC;CACV,CAAA;AAsBD,MAAa,aAAc,SAAQ,KAAK;IAiBtC,YAAY,OAAe,EAAkB,MAAc,EAAkB,IAAiB;QAC5F,KAAK,CAAC,OAAO,CAAC,CAAA;QAD6B,WAAM,GAAN,MAAM,CAAQ;QAAkB,SAAI,GAAJ,IAAI,CAAa;IAE9F,CAAC;CACF;AApBD,sCAoBC;AAED,MAAa,eAAe;IAE1B,YAA4B,MAAc,EAAkB,KAAa;QAA7C,WAAM,GAAN,MAAM,CAAQ;QAAkB,UAAK,GAAL,KAAK,CAAQ;QADzD,SAAI,GAAG,UAAU,CAAA;IAC2C,CAAC;CAC9E;AAHD,0CAGC;AAED,MAAa,YAAY;IAEvB,YACkB,MAAc,EACd,IAAiB,EACjB,MAAe,EAC/B,WAAmB;QAHH,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAa;QACjB,WAAM,GAAN,MAAM,CAAS;QAG/B,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAA;IAC3C,CAAC;CACF;AAVD,oCAUC;AAED,MAAa,KAAK;IAChB,YACkB,IAAY,EACZ,OAAe,EACf,QAAgB,EAChB,UAAkB,EAClB,YAAoB,EACpB,gBAAwB,EACxB,MAAY;QANZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAQ;QAClB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,WAAM,GAAN,MAAM,CAAM;IAC3B,CAAC;CACL;AAVD,sBAUC;AAED,MAAa,qBAAqB;IAGhC,YAA4B,MAAc,EAAkB,UAAkB;QAAlD,WAAM,GAAN,MAAM,CAAQ;QAAkB,eAAU,GAAV,UAAU,CAAQ;QAF9D,SAAI,GAAgB,gBAAgB,CAAA;QAGlD,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAC1C,CAAC;CACF;AAND,sDAMC;AAED,MAAa,2BAA2B;IAGtC,YAA4B,MAAc,EAAkB,cAAsB;QAAtD,WAAM,GAAN,MAAM,CAAQ;QAAkB,mBAAc,GAAd,cAAc,CAAQ;QAFlE,SAAI,GAAgB,sBAAsB,CAAA;QAGxD,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IACnD,CAAC;CACF;AAND,kEAMC;AAED,MAAa,sBAAsB;IAEjC,YACkB,MAAc,EACd,aAAqB,EACrB,cAAsB;QAFtB,WAAM,GAAN,MAAM,CAAQ;QACd,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QAJxB,SAAI,GAAgB,iBAAiB,CAAA;IAKlD,CAAC;CACL;AAPD,wDAOC;AAED,MAAa,yBAAyB;IAEpC,YAA4B,MAAc,EAAkB,IAAY;QAA5C,WAAM,GAAN,MAAM,CAAQ;QAAkB,SAAI,GAAJ,IAAI,CAAQ;QADxD,SAAI,GAAgB,2BAA2B,CAAA;IACY,CAAC;CAC7E;AAHD,8DAGC;AAED,MAAa,qBAAqB;IAEhC,YAA4B,MAAc,EAAkB,SAAiB,EAAkB,SAAiB;QAApF,WAAM,GAAN,MAAM,CAAQ;QAAkB,cAAS,GAAT,SAAS,CAAQ;QAAkB,cAAS,GAAT,SAAS,CAAQ;QADhG,SAAI,GAAgB,gBAAgB,CAAA;IAC+D,CAAC;CACrH;AAHD,sDAGC;AAED,MAAa,2BAA2B;IAEtC,YACkB,MAAc,EACd,SAAiB,EACjB,OAAe,EACf,OAAe;QAHf,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAQ;QACjB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;QALjB,SAAI,GAAgB,cAAc,CAAA;IAM/C,CAAC;CACL;AARD,kEAQC;AAED,MAAa,oBAAoB;IAE/B,YAA4B,MAAc,EAAkB,MAAc;QAA9C,WAAM,GAAN,MAAM,CAAQ;QAAkB,WAAM,GAAN,MAAM,CAAQ;QAD1D,SAAI,GAAgB,eAAe,CAAA;IAC0B,CAAC;CAC/E;AAHD,oDAGC;AAED,MAAa,sBAAsB;IAEjC,YAA4B,MAAc,EAAkB,IAAY;QAA5C,WAAM,GAAN,MAAM,CAAQ;QAAkB,SAAI,GAAJ,IAAI,CAAQ;QADxD,SAAI,GAAgB,iBAAiB,CAAA;IACsB,CAAC;CAC7E;AAHD,wDAGC;AAED,MAAa,cAAc;IAGzB,YAAmB,MAAc,EAAS,MAAa;QAApC,WAAM,GAAN,MAAM,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAO;QADvC,SAAI,GAAgB,SAAS,CAAA;QAE3C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;IACjC,CAAC;CACF;AAND,wCAMC;AAED,MAAa,aAAa;IACxB,YAA4B,MAAc,EAAkB,OAA2B;QAA3D,WAAM,GAAN,MAAM,CAAQ;QAAkB,YAAO,GAAP,OAAO,CAAoB;QACvE,SAAI,GAAG,QAAQ,CAAA;IAD2D,CAAC;CAkB5F;AAnBD,sCAmBC"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js new file mode 100644 index 0000000..18d1eab --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js @@ -0,0 +1,248 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const assert_1 = __importDefault(require("assert")); +const serializer_1 = require("./serializer"); +const buffer_list_1 = __importDefault(require("./testing/buffer-list")); +describe('serializer', () => { + it('builds startup message', function () { + const actual = serializer_1.serialize.startup({ + user: 'brian', + database: 'bang', + }); + assert_1.default.deepEqual(actual, new buffer_list_1.default() + .addInt16(3) + .addInt16(0) + .addCString('user') + .addCString('brian') + .addCString('database') + .addCString('bang') + .addCString('client_encoding') + .addCString('UTF8') + .addCString('') + .join(true)); + }); + it('builds password message', function () { + const actual = serializer_1.serialize.password('!'); + assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString('!').join(true, 'p')); + }); + it('builds request ssl message', function () { + const actual = serializer_1.serialize.requestSsl(); + const expected = new buffer_list_1.default().addInt32(80877103).join(true); + assert_1.default.deepEqual(actual, expected); + }); + it('builds SASLInitialResponseMessage message', function () { + const actual = serializer_1.serialize.sendSASLInitialResponseMessage('mech', 'data'); + assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString('mech').addInt32(4).addString('data').join(true, 'p')); + }); + it('builds SCRAMClientFinalMessage message', function () { + const actual = serializer_1.serialize.sendSCRAMClientFinalMessage('data'); + assert_1.default.deepEqual(actual, new buffer_list_1.default().addString('data').join(true, 'p')); + }); + it('builds query message', function () { + var txt = 'select * from boom'; + const actual = serializer_1.serialize.query(txt); + assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString(txt).join(true, 'Q')); + }); + describe('parse message', () => { + it('builds parse message', function () { + const actual = serializer_1.serialize.parse({ text: '!' }); + var expected = new buffer_list_1.default().addCString('').addCString('!').addInt16(0).join(true, 'P'); + assert_1.default.deepEqual(actual, expected); + }); + it('builds parse message with named query', function () { + const actual = serializer_1.serialize.parse({ + name: 'boom', + text: 'select * from boom', + types: [], + }); + var expected = new buffer_list_1.default().addCString('boom').addCString('select * from boom').addInt16(0).join(true, 'P'); + assert_1.default.deepEqual(actual, expected); + }); + it('with multiple parameters', function () { + const actual = serializer_1.serialize.parse({ + name: 'force', + text: 'select * from bang where name = $1', + types: [1, 2, 3, 4], + }); + var expected = new buffer_list_1.default() + .addCString('force') + .addCString('select * from bang where name = $1') + .addInt16(4) + .addInt32(1) + .addInt32(2) + .addInt32(3) + .addInt32(4) + .join(true, 'P'); + assert_1.default.deepEqual(actual, expected); + }); + }); + describe('bind messages', function () { + it('with no values', function () { + const actual = serializer_1.serialize.bind(); + var expectedBuffer = new buffer_list_1.default() + .addCString('') + .addCString('') + .addInt16(0) + .addInt16(0) + .addInt16(0) + .join(true, 'B'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + it('with named statement, portal, and values', function () { + const actual = serializer_1.serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, 'zing'], + }); + var expectedBuffer = new buffer_list_1.default() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(4) + .addInt32(1) + .add(Buffer.from('1')) + .addInt32(2) + .add(Buffer.from('hi')) + .addInt32(-1) + .addInt32(4) + .add(Buffer.from('zing')) + .addInt16(0) + .join(true, 'B'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + }); + it('with custom valueMapper', function () { + const actual = serializer_1.serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, 'zing'], + valueMapper: () => null, + }); + var expectedBuffer = new buffer_list_1.default() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(4) + .addInt32(-1) + .addInt32(-1) + .addInt32(-1) + .addInt32(-1) + .addInt16(0) + .join(true, 'B'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + it('with named statement, portal, and buffer value', function () { + const actual = serializer_1.serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, Buffer.from('zing', 'utf8')], + }); + var expectedBuffer = new buffer_list_1.default() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) // value count + .addInt16(0) // string + .addInt16(0) // string + .addInt16(0) // string + .addInt16(1) // binary + .addInt16(4) + .addInt32(1) + .add(Buffer.from('1')) + .addInt32(2) + .add(Buffer.from('hi')) + .addInt32(-1) + .addInt32(4) + .add(Buffer.from('zing', 'utf-8')) + .addInt16(0) + .join(true, 'B'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + describe('builds execute message', function () { + it('for unamed portal with no row limit', function () { + const actual = serializer_1.serialize.execute(); + var expectedBuffer = new buffer_list_1.default().addCString('').addInt32(0).join(true, 'E'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + it('for named portal with row limit', function () { + const actual = serializer_1.serialize.execute({ + portal: 'my favorite portal', + rows: 100, + }); + var expectedBuffer = new buffer_list_1.default().addCString('my favorite portal').addInt32(100).join(true, 'E'); + assert_1.default.deepEqual(actual, expectedBuffer); + }); + }); + it('builds flush command', function () { + const actual = serializer_1.serialize.flush(); + var expected = new buffer_list_1.default().join(true, 'H'); + assert_1.default.deepEqual(actual, expected); + }); + it('builds sync command', function () { + const actual = serializer_1.serialize.sync(); + var expected = new buffer_list_1.default().join(true, 'S'); + assert_1.default.deepEqual(actual, expected); + }); + it('builds end command', function () { + const actual = serializer_1.serialize.end(); + var expected = Buffer.from([0x58, 0, 0, 0, 4]); + assert_1.default.deepEqual(actual, expected); + }); + describe('builds describe command', function () { + it('describe statement', function () { + const actual = serializer_1.serialize.describe({ type: 'S', name: 'bang' }); + var expected = new buffer_list_1.default().addChar('S').addCString('bang').join(true, 'D'); + assert_1.default.deepEqual(actual, expected); + }); + it('describe unnamed portal', function () { + const actual = serializer_1.serialize.describe({ type: 'P' }); + var expected = new buffer_list_1.default().addChar('P').addCString('').join(true, 'D'); + assert_1.default.deepEqual(actual, expected); + }); + }); + describe('builds close command', function () { + it('describe statement', function () { + const actual = serializer_1.serialize.close({ type: 'S', name: 'bang' }); + var expected = new buffer_list_1.default().addChar('S').addCString('bang').join(true, 'C'); + assert_1.default.deepEqual(actual, expected); + }); + it('describe unnamed portal', function () { + const actual = serializer_1.serialize.close({ type: 'P' }); + var expected = new buffer_list_1.default().addChar('P').addCString('').join(true, 'C'); + assert_1.default.deepEqual(actual, expected); + }); + }); + describe('copy messages', function () { + it('builds copyFromChunk', () => { + const actual = serializer_1.serialize.copyData(Buffer.from([1, 2, 3])); + const expected = new buffer_list_1.default().add(Buffer.from([1, 2, 3])).join(true, 'd'); + assert_1.default.deepEqual(actual, expected); + }); + it('builds copy fail', () => { + const actual = serializer_1.serialize.copyFail('err!'); + const expected = new buffer_list_1.default().addCString('err!').join(true, 'f'); + assert_1.default.deepEqual(actual, expected); + }); + it('builds copy done', () => { + const actual = serializer_1.serialize.copyDone(); + const expected = new buffer_list_1.default().join(true, 'c'); + assert_1.default.deepEqual(actual, expected); + }); + }); + it('builds cancel message', () => { + const actual = serializer_1.serialize.cancel(3, 4); + const expected = new buffer_list_1.default().addInt16(1234).addInt16(5678).addInt32(3).addInt32(4).join(true); + assert_1.default.deepEqual(actual, expected); + }); +}); +//# sourceMappingURL=outbound-serializer.test.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js.map new file mode 100644 index 0000000..3dcb1c8 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/outbound-serializer.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"outbound-serializer.test.js","sourceRoot":"","sources":["../src/outbound-serializer.test.ts"],"names":[],"mappings":";;;;;AAAA,oDAA2B;AAC3B,6CAAwC;AACxC,wEAA8C;AAE9C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,wBAAwB,EAAE;QAC3B,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,CAAC;YAC/B,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAA;QACF,gBAAM,CAAC,SAAS,CACd,MAAM,EACN,IAAI,qBAAU,EAAE;aACb,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,OAAO,CAAC;aACnB,UAAU,CAAC,UAAU,CAAC;aACtB,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,iBAAiB,CAAC;aAC7B,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,EAAE,CAAC;aACd,IAAI,CAAC,IAAI,CAAC,CACd,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yBAAyB,EAAE;QAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QACtC,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4BAA4B,EAAE;QAC/B,MAAM,MAAM,GAAG,sBAAS,CAAC,UAAU,EAAE,CAAA;QACrC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC/D,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE;QAC9C,MAAM,MAAM,GAAG,sBAAS,CAAC,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACvE,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC7G,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wCAAwC,EAAE;QAC3C,MAAM,MAAM,GAAG,sBAAS,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;QAC5D,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sBAAsB,EAAE;QACzB,IAAI,GAAG,GAAG,oBAAoB,CAAA;QAC9B,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnC,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,sBAAsB,EAAE;YACzB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAC7C,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC1F,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,uCAAuC,EAAE;YAC1C,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC;gBAC7B,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,EAAE;aACV,CAAC,CAAA;YACF,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC/G,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0BAA0B,EAAE;YAC7B,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC;gBAC7B,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,oCAAoC;gBAC1C,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACpB,CAAC,CAAA;YACF,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE;iBAC5B,UAAU,CAAC,OAAO,CAAC;iBACnB,UAAU,CAAC,oCAAoC,CAAC;iBAChD,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE;QACxB,EAAE,CAAC,gBAAgB,EAAE;YACnB,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,EAAE,CAAA;YAE/B,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE;iBAClC,UAAU,CAAC,EAAE,CAAC;iBACd,UAAU,CAAC,EAAE,CAAC;iBACd,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0CAA0C,EAAE;YAC7C,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;gBAC5B,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;aAClC,CAAC,CAAA;YACF,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE;iBAClC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;iBACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;iBACnC,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACrB,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACtB,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACZ,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACxB,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yBAAyB,EAAE;QAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;YACjC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;SACxB,CAAC,CAAA;QACF,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE;aAClC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;aACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;aACnC,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC;aACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,gDAAgD,EAAE;QACnD,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACvD,CAAC,CAAA;QACF,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE;aAClC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;aACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;aACnC,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc;aAC1B,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACrB,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtB,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACjC,QAAQ,CAAC,CAAC,CAAC;aACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,wBAAwB,EAAE;QACjC,EAAE,CAAC,qCAAqC,EAAE;YACxC,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,EAAE,CAAA;YAClC,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAChF,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,iCAAiC,EAAE;YACpC,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,CAAC;gBAC/B,MAAM,EAAE,oBAAoB;gBAC5B,IAAI,EAAE,GAAG;aACV,CAAC,CAAA;YACF,IAAI,cAAc,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACpG,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sBAAsB,EAAE;QACzB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,EAAE,CAAA;QAChC,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC/C,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qBAAqB,EAAE;QACxB,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,EAAE,CAAA;QAC/B,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC/C,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oBAAoB,EAAE;QACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,GAAG,EAAE,CAAA;QAC9B,IAAI,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAC9C,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,yBAAyB,EAAE;QAClC,EAAE,CAAC,oBAAoB,EAAE;YACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;YAC9D,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC/E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,yBAAyB,EAAE;YAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAChD,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC3E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,sBAAsB,EAAE;QAC/B,EAAE,CAAC,oBAAoB,EAAE;YACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;YAC3D,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC/E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,yBAAyB,EAAE;YAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAC7C,IAAI,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC3E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE;QACxB,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAC9B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YACzD,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC7E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YACzC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACpE,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,EAAE,CAAA;YACnC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACjD,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,MAAM,GAAG,sBAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACrC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAClG,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.d.ts new file mode 100644 index 0000000..030d1ef --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.d.ts @@ -0,0 +1,38 @@ +/// +import { TransformOptions } from 'stream'; +import { Mode, BackendMessage } from './messages'; +export declare type Packet = { + code: number; + packet: Buffer; +}; +declare type StreamOptions = TransformOptions & { + mode: Mode; +}; +export declare type MessageCallback = (msg: BackendMessage) => void; +export declare class Parser { + private buffer; + private bufferLength; + private bufferOffset; + private reader; + private mode; + constructor(opts?: StreamOptions); + parse(buffer: Buffer, callback: MessageCallback): void; + private mergeBuffer; + private handlePacket; + private parseReadyForQueryMessage; + private parseCommandCompleteMessage; + private parseCopyData; + private parseCopyInMessage; + private parseCopyOutMessage; + private parseCopyMessage; + private parseNotificationMessage; + private parseRowDescriptionMessage; + private parseField; + private parseParameterDescriptionMessage; + private parseDataRowMessage; + private parseParameterStatusMessage; + private parseBackendKeyData; + parseAuthenticationResponse(offset: number, length: number, bytes: Buffer): any; + private parseErrorMessage; +} +export {}; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js new file mode 100644 index 0000000..d03b637 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js @@ -0,0 +1,308 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Parser = void 0; +const messages_1 = require("./messages"); +const buffer_reader_1 = require("./buffer-reader"); +const assert_1 = __importDefault(require("assert")); +// every message is prefixed with a single bye +const CODE_LENGTH = 1; +// every message has an int32 length which includes itself but does +// NOT include the code in the length +const LEN_LENGTH = 4; +const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH; +const emptyBuffer = Buffer.allocUnsafe(0); +class Parser { + constructor(opts) { + this.buffer = emptyBuffer; + this.bufferLength = 0; + this.bufferOffset = 0; + this.reader = new buffer_reader_1.BufferReader(); + if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'binary') { + throw new Error('Binary mode not supported yet'); + } + this.mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'text'; + } + parse(buffer, callback) { + this.mergeBuffer(buffer); + const bufferFullLength = this.bufferOffset + this.bufferLength; + let offset = this.bufferOffset; + while (offset + HEADER_LENGTH <= bufferFullLength) { + // code is 1 byte long - it identifies the message type + const code = this.buffer[offset]; + // length is 1 Uint32BE - it is the length of the message EXCLUDING the code + const length = this.buffer.readUInt32BE(offset + CODE_LENGTH); + const fullMessageLength = CODE_LENGTH + length; + if (fullMessageLength + offset <= bufferFullLength) { + const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer); + callback(message); + offset += fullMessageLength; + } + else { + break; + } + } + if (offset === bufferFullLength) { + // No more use for the buffer + this.buffer = emptyBuffer; + this.bufferLength = 0; + this.bufferOffset = 0; + } + else { + // Adjust the cursors of remainingBuffer + this.bufferLength = bufferFullLength - offset; + this.bufferOffset = offset; + } + } + mergeBuffer(buffer) { + if (this.bufferLength > 0) { + const newLength = this.bufferLength + buffer.byteLength; + const newFullLength = newLength + this.bufferOffset; + if (newFullLength > this.buffer.byteLength) { + // We can't concat the new buffer with the remaining one + let newBuffer; + if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) { + // We can move the relevant part to the beginning of the buffer instead of allocating a new buffer + newBuffer = this.buffer; + } + else { + // Allocate a new larger buffer + let newBufferLength = this.buffer.byteLength * 2; + while (newLength >= newBufferLength) { + newBufferLength *= 2; + } + newBuffer = Buffer.allocUnsafe(newBufferLength); + } + // Move the remaining buffer to the new one + this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength); + this.buffer = newBuffer; + this.bufferOffset = 0; + } + // Concat the new buffer with the remaining one + buffer.copy(this.buffer, this.bufferOffset + this.bufferLength); + this.bufferLength = newLength; + } + else { + this.buffer = buffer; + this.bufferOffset = 0; + this.bufferLength = buffer.byteLength; + } + } + handlePacket(offset, code, length, bytes) { + switch (code) { + case 50 /* BindComplete */: + return messages_1.bindComplete; + case 49 /* ParseComplete */: + return messages_1.parseComplete; + case 51 /* CloseComplete */: + return messages_1.closeComplete; + case 110 /* NoData */: + return messages_1.noData; + case 115 /* PortalSuspended */: + return messages_1.portalSuspended; + case 99 /* CopyDone */: + return messages_1.copyDone; + case 87 /* ReplicationStart */: + return messages_1.replicationStart; + case 73 /* EmptyQuery */: + return messages_1.emptyQuery; + case 68 /* DataRow */: + return this.parseDataRowMessage(offset, length, bytes); + case 67 /* CommandComplete */: + return this.parseCommandCompleteMessage(offset, length, bytes); + case 90 /* ReadyForQuery */: + return this.parseReadyForQueryMessage(offset, length, bytes); + case 65 /* NotificationResponse */: + return this.parseNotificationMessage(offset, length, bytes); + case 82 /* AuthenticationResponse */: + return this.parseAuthenticationResponse(offset, length, bytes); + case 83 /* ParameterStatus */: + return this.parseParameterStatusMessage(offset, length, bytes); + case 75 /* BackendKeyData */: + return this.parseBackendKeyData(offset, length, bytes); + case 69 /* ErrorMessage */: + return this.parseErrorMessage(offset, length, bytes, 'error'); + case 78 /* NoticeMessage */: + return this.parseErrorMessage(offset, length, bytes, 'notice'); + case 84 /* RowDescriptionMessage */: + return this.parseRowDescriptionMessage(offset, length, bytes); + case 116 /* ParameterDescriptionMessage */: + return this.parseParameterDescriptionMessage(offset, length, bytes); + case 71 /* CopyIn */: + return this.parseCopyInMessage(offset, length, bytes); + case 72 /* CopyOut */: + return this.parseCopyOutMessage(offset, length, bytes); + case 100 /* CopyData */: + return this.parseCopyData(offset, length, bytes); + default: + assert_1.default.fail(`unknown message code: ${code.toString(16)}`); + } + } + parseReadyForQueryMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const status = this.reader.string(1); + return new messages_1.ReadyForQueryMessage(length, status); + } + parseCommandCompleteMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const text = this.reader.cstring(); + return new messages_1.CommandCompleteMessage(length, text); + } + parseCopyData(offset, length, bytes) { + const chunk = bytes.slice(offset, offset + (length - 4)); + return new messages_1.CopyDataMessage(length, chunk); + } + parseCopyInMessage(offset, length, bytes) { + return this.parseCopyMessage(offset, length, bytes, 'copyInResponse'); + } + parseCopyOutMessage(offset, length, bytes) { + return this.parseCopyMessage(offset, length, bytes, 'copyOutResponse'); + } + parseCopyMessage(offset, length, bytes, messageName) { + this.reader.setBuffer(offset, bytes); + const isBinary = this.reader.byte() !== 0; + const columnCount = this.reader.int16(); + const message = new messages_1.CopyResponse(length, messageName, isBinary, columnCount); + for (let i = 0; i < columnCount; i++) { + message.columnTypes[i] = this.reader.int16(); + } + return message; + } + parseNotificationMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const processId = this.reader.int32(); + const channel = this.reader.cstring(); + const payload = this.reader.cstring(); + return new messages_1.NotificationResponseMessage(length, processId, channel, payload); + } + parseRowDescriptionMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const fieldCount = this.reader.int16(); + const message = new messages_1.RowDescriptionMessage(length, fieldCount); + for (let i = 0; i < fieldCount; i++) { + message.fields[i] = this.parseField(); + } + return message; + } + parseField() { + const name = this.reader.cstring(); + const tableID = this.reader.int32(); + const columnID = this.reader.int16(); + const dataTypeID = this.reader.int32(); + const dataTypeSize = this.reader.int16(); + const dataTypeModifier = this.reader.int32(); + const mode = this.reader.int16() === 0 ? 'text' : 'binary'; + return new messages_1.Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode); + } + parseParameterDescriptionMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const parameterCount = this.reader.int16(); + const message = new messages_1.ParameterDescriptionMessage(length, parameterCount); + for (let i = 0; i < parameterCount; i++) { + message.dataTypeIDs[i] = this.reader.int32(); + } + return message; + } + parseDataRowMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const fieldCount = this.reader.int16(); + const fields = new Array(fieldCount); + for (let i = 0; i < fieldCount; i++) { + const len = this.reader.int32(); + // a -1 for length means the value of the field is null + fields[i] = len === -1 ? null : this.reader.string(len); + } + return new messages_1.DataRowMessage(length, fields); + } + parseParameterStatusMessage(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const name = this.reader.cstring(); + const value = this.reader.cstring(); + return new messages_1.ParameterStatusMessage(length, name, value); + } + parseBackendKeyData(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const processID = this.reader.int32(); + const secretKey = this.reader.int32(); + return new messages_1.BackendKeyDataMessage(length, processID, secretKey); + } + parseAuthenticationResponse(offset, length, bytes) { + this.reader.setBuffer(offset, bytes); + const code = this.reader.int32(); + // TODO(bmc): maybe better types here + const message = { + name: 'authenticationOk', + length, + }; + switch (code) { + case 0: // AuthenticationOk + break; + case 3: // AuthenticationCleartextPassword + if (message.length === 8) { + message.name = 'authenticationCleartextPassword'; + } + break; + case 5: // AuthenticationMD5Password + if (message.length === 12) { + message.name = 'authenticationMD5Password'; + const salt = this.reader.bytes(4); + return new messages_1.AuthenticationMD5Password(length, salt); + } + break; + case 10: // AuthenticationSASL + message.name = 'authenticationSASL'; + message.mechanisms = []; + let mechanism; + do { + mechanism = this.reader.cstring(); + if (mechanism) { + message.mechanisms.push(mechanism); + } + } while (mechanism); + break; + case 11: // AuthenticationSASLContinue + message.name = 'authenticationSASLContinue'; + message.data = this.reader.string(length - 8); + break; + case 12: // AuthenticationSASLFinal + message.name = 'authenticationSASLFinal'; + message.data = this.reader.string(length - 8); + break; + default: + throw new Error('Unknown authenticationOk message type ' + code); + } + return message; + } + parseErrorMessage(offset, length, bytes, name) { + this.reader.setBuffer(offset, bytes); + const fields = {}; + let fieldType = this.reader.string(1); + while (fieldType !== '\0') { + fields[fieldType] = this.reader.cstring(); + fieldType = this.reader.string(1); + } + const messageValue = fields.M; + const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name); + message.severity = fields.S; + message.code = fields.C; + message.detail = fields.D; + message.hint = fields.H; + message.position = fields.P; + message.internalPosition = fields.p; + message.internalQuery = fields.q; + message.where = fields.W; + message.schema = fields.s; + message.table = fields.t; + message.column = fields.c; + message.dataType = fields.d; + message.constraint = fields.n; + message.file = fields.F; + message.line = fields.L; + message.routine = fields.R; + return message; + } +} +exports.Parser = Parser; +//# sourceMappingURL=parser.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js.map new file mode 100644 index 0000000..3eb27ad --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;;;;AACA,yCA0BmB;AACnB,mDAA8C;AAC9C,oDAA2B;AAE3B,8CAA8C;AAC9C,MAAM,WAAW,GAAG,CAAC,CAAA;AACrB,mEAAmE;AACnE,qCAAqC;AACrC,MAAM,UAAU,GAAG,CAAC,CAAA;AAEpB,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,CAAA;AAO9C,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAiCzC,MAAa,MAAM;IAOjB,YAAY,IAAoB;QANxB,WAAM,GAAW,WAAW,CAAA;QAC5B,iBAAY,GAAW,CAAC,CAAA;QACxB,iBAAY,GAAW,CAAC,CAAA;QACxB,WAAM,GAAG,IAAI,4BAAY,EAAE,CAAA;QAIjC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;SACjD;QACD,IAAI,CAAC,IAAI,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,MAAM,CAAA;IAClC,CAAC;IAEM,KAAK,CAAC,MAAc,EAAE,QAAyB;QACpD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QACxB,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;QAC9D,IAAI,MAAM,GAAG,IAAI,CAAC,YAAY,CAAA;QAC9B,OAAO,MAAM,GAAG,aAAa,IAAI,gBAAgB,EAAE;YACjD,uDAAuD;YACvD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAChC,4EAA4E;YAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,WAAW,CAAC,CAAA;YAC7D,MAAM,iBAAiB,GAAG,WAAW,GAAG,MAAM,CAAA;YAC9C,IAAI,iBAAiB,GAAG,MAAM,IAAI,gBAAgB,EAAE;gBAClD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;gBACpF,QAAQ,CAAC,OAAO,CAAC,CAAA;gBACjB,MAAM,IAAI,iBAAiB,CAAA;aAC5B;iBAAM;gBACL,MAAK;aACN;SACF;QACD,IAAI,MAAM,KAAK,gBAAgB,EAAE;YAC/B,6BAA6B;YAC7B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;YACzB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;YACrB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;SACtB;aAAM;YACL,wCAAwC;YACxC,IAAI,CAAC,YAAY,GAAG,gBAAgB,GAAG,MAAM,CAAA;YAC7C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAA;SAC3B;IACH,CAAC;IAEO,WAAW,CAAC,MAAc;QAChC,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAA;YACvD,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC,YAAY,CAAA;YACnD,IAAI,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC1C,wDAAwD;gBACxD,IAAI,SAAiB,CAAA;gBACrB,IAAI,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,EAAE;oBACjF,kGAAkG;oBAClG,SAAS,GAAG,IAAI,CAAC,MAAM,CAAA;iBACxB;qBAAM;oBACL,+BAA+B;oBAC/B,IAAI,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAA;oBAChD,OAAO,SAAS,IAAI,eAAe,EAAE;wBACnC,eAAe,IAAI,CAAC,CAAA;qBACrB;oBACD,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAA;iBAChD;gBACD,2CAA2C;gBAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAA;gBACxF,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;gBACvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;aACtB;YACD,+CAA+C;YAC/C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAA;YAC/D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAA;SAC9B;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;YACpB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;YACrB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAA;SACtC;IACH,CAAC;IAEO,YAAY,CAAC,MAAc,EAAE,IAAY,EAAE,MAAc,EAAE,KAAa;QAC9E,QAAQ,IAAI,EAAE;YACZ;gBACE,OAAO,uBAAY,CAAA;YACrB;gBACE,OAAO,wBAAa,CAAA;YACtB;gBACE,OAAO,wBAAa,CAAA;YACtB;gBACE,OAAO,iBAAM,CAAA;YACf;gBACE,OAAO,0BAAe,CAAA;YACxB;gBACE,OAAO,mBAAQ,CAAA;YACjB;gBACE,OAAO,2BAAgB,CAAA;YACzB;gBACE,OAAO,qBAAU,CAAA;YACnB;gBACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YACxD;gBACE,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAChE;gBACE,OAAO,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAC9D;gBACE,OAAO,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAC7D;gBACE,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAChE;gBACE,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAChE;gBACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YACxD;gBACE,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YAC/D;gBACE,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;YAChE;gBACE,OAAO,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAC/D;gBACE,OAAO,IAAI,CAAC,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YACrE;gBACE,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YACvD;gBACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YACxD;gBACE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;YAClD;gBACE,gBAAM,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;SAC5D;IACH,CAAC;IAEO,yBAAyB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC7E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACpC,OAAO,IAAI,+BAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjD,CAAC;IAEO,2BAA2B,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC/E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QAClC,OAAO,IAAI,iCAAsB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACjD,CAAC;IAEO,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACjE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAA;QACxD,OAAO,IAAI,0BAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC3C,CAAC;IAEO,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACtE,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAA;IACvE,CAAC;IAEO,mBAAmB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACvE,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAA;IACxE,CAAC;IAEO,gBAAgB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,WAAwB;QAC9F,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACzC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACvC,MAAM,OAAO,GAAG,IAAI,uBAAY,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;YACpC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;SAC7C;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAEO,wBAAwB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC5E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QACrC,OAAO,IAAI,sCAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7E,CAAC;IAEO,0BAA0B,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC9E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACtC,MAAM,OAAO,GAAG,IAAI,gCAAqB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;QAC7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACnC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;SACtC;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAEO,UAAU;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACtC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACxC,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC1D,OAAO,IAAI,gBAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAA;IAC7F,CAAC;IAEO,gCAAgC,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACpF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAC1C,MAAM,OAAO,GAAG,IAAI,sCAA2B,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QACvE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;SAC7C;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAEO,mBAAmB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACvE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACtC,MAAM,MAAM,GAAU,IAAI,KAAK,CAAC,UAAU,CAAC,CAAA;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;YAC/B,uDAAuD;YACvD,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;SACxD;QACD,OAAO,IAAI,yBAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC3C,CAAC;IAEO,2BAA2B,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC/E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QACnC,OAAO,IAAI,iCAAsB,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACxD,CAAC;IAEO,mBAAmB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QACvE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACrC,OAAO,IAAI,gCAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;IAChE,CAAC;IAEM,2BAA2B,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa;QAC9E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAChC,qCAAqC;QACrC,MAAM,OAAO,GAAyB;YACpC,IAAI,EAAE,kBAAkB;YACxB,MAAM;SACP,CAAA;QAED,QAAQ,IAAI,EAAE;YACZ,KAAK,CAAC,EAAE,mBAAmB;gBACzB,MAAK;YACP,KAAK,CAAC,EAAE,kCAAkC;gBACxC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;oBACxB,OAAO,CAAC,IAAI,GAAG,iCAAiC,CAAA;iBACjD;gBACD,MAAK;YACP,KAAK,CAAC,EAAE,4BAA4B;gBAClC,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE;oBACzB,OAAO,CAAC,IAAI,GAAG,2BAA2B,CAAA;oBAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;oBACjC,OAAO,IAAI,oCAAyB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;iBACnD;gBACD,MAAK;YACP,KAAK,EAAE,EAAE,qBAAqB;gBAC5B,OAAO,CAAC,IAAI,GAAG,oBAAoB,CAAA;gBACnC,OAAO,CAAC,UAAU,GAAG,EAAE,CAAA;gBACvB,IAAI,SAAiB,CAAA;gBACrB,GAAG;oBACD,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;oBAEjC,IAAI,SAAS,EAAE;wBACb,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;qBACnC;iBACF,QAAQ,SAAS,EAAC;gBACnB,MAAK;YACP,KAAK,EAAE,EAAE,6BAA6B;gBACpC,OAAO,CAAC,IAAI,GAAG,4BAA4B,CAAA;gBAC3C,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;gBAC7C,MAAK;YACP,KAAK,EAAE,EAAE,0BAA0B;gBACjC,OAAO,CAAC,IAAI,GAAG,yBAAyB,CAAA;gBACxC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;gBAC7C,MAAK;YACP;gBACE,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,IAAI,CAAC,CAAA;SACnE;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAEO,iBAAiB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,IAAiB;QACxF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,MAAM,MAAM,GAA2B,EAAE,CAAA;QACzC,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACrC,OAAO,SAAS,KAAK,IAAI,EAAE;YACzB,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;YACzC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SAClC;QAED,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAA;QAE7B,MAAM,OAAO,GACX,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,wBAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,wBAAa,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAE7G,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;QAC3B,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;QACvB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;QACzB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;QACvB,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;QAC3B,OAAO,CAAC,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAA;QACnC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAA;QAChC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAA;QACxB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;QACzB,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAA;QACxB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;QACzB,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;QAC3B,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC,CAAA;QAC7B,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;QACvB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;QACvB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;QAC1B,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAvTD,wBAuTC"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.d.ts new file mode 100644 index 0000000..e0f0a00 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.d.ts @@ -0,0 +1,43 @@ +/// +declare type ParseOpts = { + name?: string; + types?: number[]; + text: string; +}; +declare type ValueMapper = (param: any, index: number) => any; +declare type BindOpts = { + portal?: string; + binary?: boolean; + statement?: string; + values?: any[]; + valueMapper?: ValueMapper; +}; +declare type ExecOpts = { + portal?: string; + rows?: number; +}; +declare type PortalOpts = { + type: 'S' | 'P'; + name?: string; +}; +declare const serialize: { + startup: (opts: Record) => Buffer; + password: (password: string) => Buffer; + requestSsl: () => Buffer; + sendSASLInitialResponseMessage: (mechanism: string, initialResponse: string) => Buffer; + sendSCRAMClientFinalMessage: (additionalData: string) => Buffer; + query: (text: string) => Buffer; + parse: (query: ParseOpts) => Buffer; + bind: (config?: BindOpts) => Buffer; + execute: (config?: ExecOpts | undefined) => Buffer; + describe: (msg: PortalOpts) => Buffer; + close: (msg: PortalOpts) => Buffer; + flush: () => Buffer; + sync: () => Buffer; + end: () => Buffer; + copyData: (chunk: Buffer) => Buffer; + copyDone: () => Buffer; + copyFail: (message: string) => Buffer; + cancel: (processID: number, secretKey: number) => Buffer; +}; +export { serialize }; diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js new file mode 100644 index 0000000..9aa0aed --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js @@ -0,0 +1,189 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.serialize = void 0; +const buffer_writer_1 = require("./buffer-writer"); +const writer = new buffer_writer_1.Writer(); +const startup = (opts) => { + // protocol version + writer.addInt16(3).addInt16(0); + for (const key of Object.keys(opts)) { + writer.addCString(key).addCString(opts[key]); + } + writer.addCString('client_encoding').addCString('UTF8'); + var bodyBuffer = writer.addCString('').flush(); + // this message is sent without a code + var length = bodyBuffer.length + 4; + return new buffer_writer_1.Writer().addInt32(length).add(bodyBuffer).flush(); +}; +const requestSsl = () => { + const response = Buffer.allocUnsafe(8); + response.writeInt32BE(8, 0); + response.writeInt32BE(80877103, 4); + return response; +}; +const password = (password) => { + return writer.addCString(password).flush(112 /* startup */); +}; +const sendSASLInitialResponseMessage = function (mechanism, initialResponse) { + // 0x70 = 'p' + writer.addCString(mechanism).addInt32(Buffer.byteLength(initialResponse)).addString(initialResponse); + return writer.flush(112 /* startup */); +}; +const sendSCRAMClientFinalMessage = function (additionalData) { + return writer.addString(additionalData).flush(112 /* startup */); +}; +const query = (text) => { + return writer.addCString(text).flush(81 /* query */); +}; +const emptyArray = []; +const parse = (query) => { + // expect something like this: + // { name: 'queryName', + // text: 'select * from blah', + // types: ['int8', 'bool'] } + // normalize missing query names to allow for null + const name = query.name || ''; + if (name.length > 63) { + /* eslint-disable no-console */ + console.error('Warning! Postgres only supports 63 characters for query names.'); + console.error('You supplied %s (%s)', name, name.length); + console.error('This can cause conflicts and silent errors executing queries'); + /* eslint-enable no-console */ + } + const types = query.types || emptyArray; + var len = types.length; + var buffer = writer + .addCString(name) // name of query + .addCString(query.text) // actual query text + .addInt16(len); + for (var i = 0; i < len; i++) { + buffer.addInt32(types[i]); + } + return writer.flush(80 /* parse */); +}; +const paramWriter = new buffer_writer_1.Writer(); +const writeValues = function (values, valueMapper) { + for (let i = 0; i < values.length; i++) { + const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i]; + if (mappedVal == null) { + // add the param type (string) to the writer + writer.addInt16(0 /* STRING */); + // write -1 to the param writer to indicate null + paramWriter.addInt32(-1); + } + else if (mappedVal instanceof Buffer) { + // add the param type (binary) to the writer + writer.addInt16(1 /* BINARY */); + // add the buffer to the param writer + paramWriter.addInt32(mappedVal.length); + paramWriter.add(mappedVal); + } + else { + // add the param type (string) to the writer + writer.addInt16(0 /* STRING */); + paramWriter.addInt32(Buffer.byteLength(mappedVal)); + paramWriter.addString(mappedVal); + } + } +}; +const bind = (config = {}) => { + // normalize config + const portal = config.portal || ''; + const statement = config.statement || ''; + const binary = config.binary || false; + const values = config.values || emptyArray; + const len = values.length; + writer.addCString(portal).addCString(statement); + writer.addInt16(len); + writeValues(values, config.valueMapper); + writer.addInt16(len); + writer.add(paramWriter.flush()); + // format code + writer.addInt16(binary ? 1 /* BINARY */ : 0 /* STRING */); + return writer.flush(66 /* bind */); +}; +const emptyExecute = Buffer.from([69 /* execute */, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00]); +const execute = (config) => { + // this is the happy path for most queries + if (!config || (!config.portal && !config.rows)) { + return emptyExecute; + } + const portal = config.portal || ''; + const rows = config.rows || 0; + const portalLength = Buffer.byteLength(portal); + const len = 4 + portalLength + 1 + 4; + // one extra bit for code + const buff = Buffer.allocUnsafe(1 + len); + buff[0] = 69 /* execute */; + buff.writeInt32BE(len, 1); + buff.write(portal, 5, 'utf-8'); + buff[portalLength + 5] = 0; // null terminate portal cString + buff.writeUInt32BE(rows, buff.length - 4); + return buff; +}; +const cancel = (processID, secretKey) => { + const buffer = Buffer.allocUnsafe(16); + buffer.writeInt32BE(16, 0); + buffer.writeInt16BE(1234, 4); + buffer.writeInt16BE(5678, 6); + buffer.writeInt32BE(processID, 8); + buffer.writeInt32BE(secretKey, 12); + return buffer; +}; +const cstringMessage = (code, string) => { + const stringLen = Buffer.byteLength(string); + const len = 4 + stringLen + 1; + // one extra bit for code + const buffer = Buffer.allocUnsafe(1 + len); + buffer[0] = code; + buffer.writeInt32BE(len, 1); + buffer.write(string, 5, 'utf-8'); + buffer[len] = 0; // null terminate cString + return buffer; +}; +const emptyDescribePortal = writer.addCString('P').flush(68 /* describe */); +const emptyDescribeStatement = writer.addCString('S').flush(68 /* describe */); +const describe = (msg) => { + return msg.name + ? cstringMessage(68 /* describe */, `${msg.type}${msg.name || ''}`) + : msg.type === 'P' + ? emptyDescribePortal + : emptyDescribeStatement; +}; +const close = (msg) => { + const text = `${msg.type}${msg.name || ''}`; + return cstringMessage(67 /* close */, text); +}; +const copyData = (chunk) => { + return writer.add(chunk).flush(100 /* copyFromChunk */); +}; +const copyFail = (message) => { + return cstringMessage(102 /* copyFail */, message); +}; +const codeOnlyBuffer = (code) => Buffer.from([code, 0x00, 0x00, 0x00, 0x04]); +const flushBuffer = codeOnlyBuffer(72 /* flush */); +const syncBuffer = codeOnlyBuffer(83 /* sync */); +const endBuffer = codeOnlyBuffer(88 /* end */); +const copyDoneBuffer = codeOnlyBuffer(99 /* copyDone */); +const serialize = { + startup, + password, + requestSsl, + sendSASLInitialResponseMessage, + sendSCRAMClientFinalMessage, + query, + parse, + bind, + execute, + describe, + close, + flush: () => flushBuffer, + sync: () => syncBuffer, + end: () => endBuffer, + copyData, + copyDone: () => copyDoneBuffer, + copyFail, + cancel, +}; +exports.serialize = serialize; +//# sourceMappingURL=serializer.js.map \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js.map b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js.map new file mode 100644 index 0000000..75d7119 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/dist/serializer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAkBxC,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,OAAO,GAAG,CAAC,IAA4B,EAAU,EAAE;IACvD,mBAAmB;IACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACnC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;KAC7C;IAED,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAEvD,IAAI,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;IAC9C,sCAAsC;IAEtC,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IAElC,OAAO,IAAI,sBAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAA;AAC9D,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,GAAW,EAAE;IAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IACtC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3B,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IAClC,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAU,EAAE;IAC5C,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,mBAAc,CAAA;AACxD,CAAC,CAAA;AAED,MAAM,8BAA8B,GAAG,UAAU,SAAiB,EAAE,eAAuB;IACzF,aAAa;IACb,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAA;IAEpG,OAAO,MAAM,CAAC,KAAK,mBAAc,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,2BAA2B,GAAG,UAAU,cAAsB;IAClE,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,KAAK,mBAAc,CAAA;AAC7D,CAAC,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE;IACrC,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,gBAAY,CAAA;AAClD,CAAC,CAAA;AAQD,MAAM,UAAU,GAAU,EAAE,CAAA;AAE5B,MAAM,KAAK,GAAG,CAAC,KAAgB,EAAU,EAAE;IACzC,8BAA8B;IAC9B,uBAAuB;IACvB,gCAAgC;IAChC,8BAA8B;IAE9B,kDAAkD;IAClD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;IAC7B,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;QACpB,+BAA+B;QAC/B,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;QAC/E,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACxD,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAA;QAC7E,8BAA8B;KAC/B;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,UAAU,CAAA;IAEvC,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAA;IAEtB,IAAI,MAAM,GAAG,MAAM;SAChB,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB;SACjC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,oBAAoB;SAC3C,QAAQ,CAAC,GAAG,CAAC,CAAA;IAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;KAC1B;IAED,OAAO,MAAM,CAAC,KAAK,gBAAY,CAAA;AACjC,CAAC,CAAA;AAaD,MAAM,WAAW,GAAG,IAAI,sBAAM,EAAE,CAAA;AAQhC,MAAM,WAAW,GAAG,UAAU,MAAa,EAAE,WAAyB;IACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACrE,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,gBAAkB,CAAA;YACjC,gDAAgD;YAChD,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;SACzB;aAAM,IAAI,SAAS,YAAY,MAAM,EAAE;YACtC,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,gBAAkB,CAAA;YACjC,qCAAqC;YACrC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YACtC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;SAC3B;aAAM;YACL,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,gBAAkB,CAAA;YACjC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;YAClD,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;SACjC;KACF;AACH,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,CAAC,SAAmB,EAAE,EAAU,EAAE;IAC7C,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAA;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,KAAK,CAAA;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,UAAU,CAAA;IAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAA;IAEzB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAEpB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IAEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IACpB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAA;IAE/B,cAAc;IACd,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,gBAAkB,CAAC,eAAiB,CAAC,CAAA;IAC7D,OAAO,MAAM,CAAC,KAAK,eAAW,CAAA;AAChC,CAAC,CAAA;AAOD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAe,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEtG,MAAM,OAAO,GAAG,CAAC,MAAiB,EAAU,EAAE;IAC5C,0CAA0C;IAC1C,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC/C,OAAO,YAAY,CAAA;KACpB;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAA;IAE7B,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,CAAC,GAAG,YAAY,GAAG,CAAC,GAAG,CAAC,CAAA;IACpC,yBAAyB;IACzB,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;IACxC,IAAI,CAAC,CAAC,CAAC,mBAAe,CAAA;IACtB,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACzB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;IAC9B,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA,CAAC,gCAAgC;IAC3D,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACzC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAU,EAAE;IAC9D,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAC1B,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IACjC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAClC,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAOD,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,MAAc,EAAU,EAAE;IAC5D,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,GAAG,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,CAAA;IAC7B,yBAAyB;IACzB,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;IAC1C,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAChB,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC3B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;IAChC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA,CAAC,yBAAyB;IACzC,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,mBAAe,CAAA;AACvE,MAAM,sBAAsB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,mBAAe,CAAA;AAE1E,MAAM,QAAQ,GAAG,CAAC,GAAe,EAAU,EAAE;IAC3C,OAAO,GAAG,CAAC,IAAI;QACb,CAAC,CAAC,cAAc,oBAAgB,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QAC/D,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG;YAClB,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,sBAAsB,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,GAAe,EAAU,EAAE;IACxC,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAA;IAC3C,OAAO,cAAc,iBAAa,IAAI,CAAC,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAU,EAAE;IACzC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,yBAAoB,CAAA;AACpD,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAU,EAAE;IAC3C,OAAO,cAAc,qBAAgB,OAAO,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,IAAU,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAE1F,MAAM,WAAW,GAAG,cAAc,gBAAY,CAAA;AAC9C,MAAM,UAAU,GAAG,cAAc,eAAW,CAAA;AAC5C,MAAM,SAAS,GAAG,cAAc,cAAU,CAAA;AAC1C,MAAM,cAAc,GAAG,cAAc,mBAAe,CAAA;AAEpD,MAAM,SAAS,GAAG;IAChB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,8BAA8B;IAC9B,2BAA2B;IAC3B,KAAK;IACL,KAAK;IACL,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,KAAK;IACL,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW;IACxB,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU;IACtB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS;IACpB,QAAQ;IACR,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc;IAC9B,QAAQ;IACR,MAAM;CACP,CAAA;AAEQ,8BAAS"} \ No newline at end of file diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/package.json b/server/node_modules/pg-promise/node_modules/pg-protocol/package.json new file mode 100644 index 0000000..ee88907 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/package.json @@ -0,0 +1,64 @@ +{ + "_from": "pg-protocol@^1.5.0", + "_id": "pg-protocol@1.5.0", + "_inBundle": false, + "_integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==", + "_location": "/pg-promise/pg-protocol", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pg-protocol@^1.5.0", + "name": "pg-protocol", + "escapedName": "pg-protocol", + "rawSpec": "^1.5.0", + "saveSpec": null, + "fetchSpec": "^1.5.0" + }, + "_requiredBy": [ + "/pg-promise/pg" + ], + "_resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "_shasum": "b5dd452257314565e2d54ab3c132adc46565a6a0", + "_spec": "pg-protocol@^1.5.0", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise/node_modules/pg", + "bugs": { + "url": "https://github.com/brianc/node-postgres/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The postgres client/server binary protocol, implemented in TypeScript", + "devDependencies": { + "@types/chai": "^4.2.7", + "@types/mocha": "^5.2.7", + "@types/node": "^12.12.21", + "chai": "^4.2.0", + "chunky": "^0.0.0", + "mocha": "^7.1.2", + "ts-node": "^8.5.4", + "typescript": "^4.0.3" + }, + "files": [ + "/dist/*{js,ts,map}", + "/src" + ], + "gitHead": "d45947938263bec30a1e3252452f04177b785f66", + "homepage": "https://github.com/brianc/node-postgres#readme", + "license": "MIT", + "main": "dist/index.js", + "name": "pg-protocol", + "repository": { + "type": "git", + "url": "git://github.com/brianc/node-postgres.git", + "directory": "packages/pg-protocol" + }, + "scripts": { + "build": "tsc", + "build:watch": "tsc --watch", + "prepublish": "yarn build", + "pretest": "yarn build", + "test": "mocha dist/**/*.test.js" + }, + "types": "dist/index.d.ts", + "version": "1.5.0" +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/b.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/b.ts new file mode 100644 index 0000000..028b763 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/b.ts @@ -0,0 +1,28 @@ +// file for microbenchmarking + +import { Writer } from './buffer-writer' +import { serialize } from './index' +import { BufferReader } from './buffer-reader' + +const LOOPS = 1000 +let count = 0 +let start = Date.now() +const writer = new Writer() + +const reader = new BufferReader() +const buffer = Buffer.from([33, 33, 33, 33, 33, 33, 33, 0]) + +const run = () => { + if (count > LOOPS) { + console.log(Date.now() - start) + return + } + count++ + for (let i = 0; i < LOOPS; i++) { + reader.setBuffer(0, buffer) + reader.cstring() + } + setImmediate(run) +} + +run() diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-reader.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-reader.ts new file mode 100644 index 0000000..2305e13 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-reader.ts @@ -0,0 +1,53 @@ +const emptyBuffer = Buffer.allocUnsafe(0) + +export class BufferReader { + private buffer: Buffer = emptyBuffer + + // TODO(bmc): support non-utf8 encoding? + private encoding: string = 'utf-8' + + constructor(private offset: number = 0) {} + + public setBuffer(offset: number, buffer: Buffer): void { + this.offset = offset + this.buffer = buffer + } + + public int16(): number { + const result = this.buffer.readInt16BE(this.offset) + this.offset += 2 + return result + } + + public byte(): number { + const result = this.buffer[this.offset] + this.offset++ + return result + } + + public int32(): number { + const result = this.buffer.readInt32BE(this.offset) + this.offset += 4 + return result + } + + public string(length: number): string { + const result = this.buffer.toString(this.encoding, this.offset, this.offset + length) + this.offset += length + return result + } + + public cstring(): string { + const start = this.offset + let end = start + while (this.buffer[end++] !== 0) {} + this.offset = end + return this.buffer.toString(this.encoding, start, end - 1) + } + + public bytes(length: number): Buffer { + const result = this.buffer.slice(this.offset, this.offset + length) + this.offset += length + return result + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-writer.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-writer.ts new file mode 100644 index 0000000..756cdc9 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/buffer-writer.ts @@ -0,0 +1,85 @@ +//binary data writer tuned for encoding binary specific to the postgres binary protocol + +export class Writer { + private buffer: Buffer + private offset: number = 5 + private headerPosition: number = 0 + constructor(private size = 256) { + this.buffer = Buffer.allocUnsafe(size) + } + + private ensure(size: number): void { + var remaining = this.buffer.length - this.offset + if (remaining < size) { + var oldBuffer = this.buffer + // exponential growth factor of around ~ 1.5 + // https://stackoverflow.com/questions/2269063/buffer-growth-strategy + var newSize = oldBuffer.length + (oldBuffer.length >> 1) + size + this.buffer = Buffer.allocUnsafe(newSize) + oldBuffer.copy(this.buffer) + } + } + + public addInt32(num: number): Writer { + this.ensure(4) + this.buffer[this.offset++] = (num >>> 24) & 0xff + this.buffer[this.offset++] = (num >>> 16) & 0xff + this.buffer[this.offset++] = (num >>> 8) & 0xff + this.buffer[this.offset++] = (num >>> 0) & 0xff + return this + } + + public addInt16(num: number): Writer { + this.ensure(2) + this.buffer[this.offset++] = (num >>> 8) & 0xff + this.buffer[this.offset++] = (num >>> 0) & 0xff + return this + } + + public addCString(string: string): Writer { + if (!string) { + this.ensure(1) + } else { + var len = Buffer.byteLength(string) + this.ensure(len + 1) // +1 for null terminator + this.buffer.write(string, this.offset, 'utf-8') + this.offset += len + } + + this.buffer[this.offset++] = 0 // null terminator + return this + } + + public addString(string: string = ''): Writer { + var len = Buffer.byteLength(string) + this.ensure(len) + this.buffer.write(string, this.offset) + this.offset += len + return this + } + + public add(otherBuffer: Buffer): Writer { + this.ensure(otherBuffer.length) + otherBuffer.copy(this.buffer, this.offset) + this.offset += otherBuffer.length + return this + } + + private join(code?: number): Buffer { + if (code) { + this.buffer[this.headerPosition] = code + //length is everything in this packet minus the code + const length = this.offset - (this.headerPosition + 1) + this.buffer.writeInt32BE(length, this.headerPosition + 1) + } + return this.buffer.slice(code ? 0 : 5, this.offset) + } + + public flush(code?: number): Buffer { + var result = this.join(code) + this.offset = 5 + this.headerPosition = 0 + this.buffer = Buffer.allocUnsafe(this.size) + return result + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/inbound-parser.test.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/inbound-parser.test.ts new file mode 100644 index 0000000..364bd8d --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/inbound-parser.test.ts @@ -0,0 +1,557 @@ +import buffers from './testing/test-buffers' +import BufferList from './testing/buffer-list' +import { parse } from '.' +import assert from 'assert' +import { PassThrough } from 'stream' +import { BackendMessage } from './messages' + +var authOkBuffer = buffers.authenticationOk() +var paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8') +var readyForQueryBuffer = buffers.readyForQuery() +var backendKeyDataBuffer = buffers.backendKeyData(1, 2) +var commandCompleteBuffer = buffers.commandComplete('SELECT 3') +var parseCompleteBuffer = buffers.parseComplete() +var bindCompleteBuffer = buffers.bindComplete() +var portalSuspendedBuffer = buffers.portalSuspended() + +var addRow = function (bufferList: BufferList, name: string, offset: number) { + return bufferList + .addCString(name) // field name + .addInt32(offset++) // table id + .addInt16(offset++) // attribute of column number + .addInt32(offset++) // objectId of field's data type + .addInt16(offset++) // datatype size + .addInt32(offset++) // type modifier + .addInt16(0) // format code, 0 => text +} + +var row1 = { + name: 'id', + tableID: 1, + attributeNumber: 2, + dataTypeID: 3, + dataTypeSize: 4, + typeModifier: 5, + formatCode: 0, +} +var oneRowDescBuff = buffers.rowDescription([row1]) +row1.name = 'bang' + +var twoRowBuf = buffers.rowDescription([ + row1, + { + name: 'whoah', + tableID: 10, + attributeNumber: 11, + dataTypeID: 12, + dataTypeSize: 13, + typeModifier: 14, + formatCode: 0, + }, +]) + +var emptyRowFieldBuf = new BufferList().addInt16(0).join(true, 'D') + +var emptyRowFieldBuf = buffers.dataRow([]) + +var oneFieldBuf = new BufferList() + .addInt16(1) // number of fields + .addInt32(5) // length of bytes of fields + .addCString('test') + .join(true, 'D') + +var oneFieldBuf = buffers.dataRow(['test']) + +var expectedAuthenticationOkayMessage = { + name: 'authenticationOk', + length: 8, +} + +var expectedParameterStatusMessage = { + name: 'parameterStatus', + parameterName: 'client_encoding', + parameterValue: 'UTF8', + length: 25, +} + +var expectedBackendKeyDataMessage = { + name: 'backendKeyData', + processID: 1, + secretKey: 2, +} + +var expectedReadyForQueryMessage = { + name: 'readyForQuery', + length: 5, + status: 'I', +} + +var expectedCommandCompleteMessage = { + name: 'commandComplete', + length: 13, + text: 'SELECT 3', +} +var emptyRowDescriptionBuffer = new BufferList() + .addInt16(0) // number of fields + .join(true, 'T') + +var expectedEmptyRowDescriptionMessage = { + name: 'rowDescription', + length: 6, + fieldCount: 0, + fields: [], +} +var expectedOneRowMessage = { + name: 'rowDescription', + length: 27, + fieldCount: 1, + fields: [ + { + name: 'id', + tableID: 1, + columnID: 2, + dataTypeID: 3, + dataTypeSize: 4, + dataTypeModifier: 5, + format: 'text', + }, + ], +} + +var expectedTwoRowMessage = { + name: 'rowDescription', + length: 53, + fieldCount: 2, + fields: [ + { + name: 'bang', + tableID: 1, + columnID: 2, + dataTypeID: 3, + dataTypeSize: 4, + dataTypeModifier: 5, + format: 'text', + }, + { + name: 'whoah', + tableID: 10, + columnID: 11, + dataTypeID: 12, + dataTypeSize: 13, + dataTypeModifier: 14, + format: 'text', + }, + ], +} + +var emptyParameterDescriptionBuffer = new BufferList() + .addInt16(0) // number of parameters + .join(true, 't') + +var oneParameterDescBuf = buffers.parameterDescription([1111]) + +var twoParameterDescBuf = buffers.parameterDescription([2222, 3333]) + +var expectedEmptyParameterDescriptionMessage = { + name: 'parameterDescription', + length: 6, + parameterCount: 0, + dataTypeIDs: [], +} + +var expectedOneParameterMessage = { + name: 'parameterDescription', + length: 10, + parameterCount: 1, + dataTypeIDs: [1111], +} + +var expectedTwoParameterMessage = { + name: 'parameterDescription', + length: 14, + parameterCount: 2, + dataTypeIDs: [2222, 3333], +} + +var testForMessage = function (buffer: Buffer, expectedMessage: any) { + it('recieves and parses ' + expectedMessage.name, async () => { + const messages = await parseBuffers([buffer]) + const [lastMessage] = messages + + for (const key in expectedMessage) { + assert.deepEqual((lastMessage as any)[key], expectedMessage[key]) + } + }) +} + +var plainPasswordBuffer = buffers.authenticationCleartextPassword() +var md5PasswordBuffer = buffers.authenticationMD5Password() +var SASLBuffer = buffers.authenticationSASL() +var SASLContinueBuffer = buffers.authenticationSASLContinue() +var SASLFinalBuffer = buffers.authenticationSASLFinal() + +var expectedPlainPasswordMessage = { + name: 'authenticationCleartextPassword', +} + +var expectedMD5PasswordMessage = { + name: 'authenticationMD5Password', + salt: Buffer.from([1, 2, 3, 4]), +} + +var expectedSASLMessage = { + name: 'authenticationSASL', + mechanisms: ['SCRAM-SHA-256'], +} + +var expectedSASLContinueMessage = { + name: 'authenticationSASLContinue', + data: 'data', +} + +var expectedSASLFinalMessage = { + name: 'authenticationSASLFinal', + data: 'data', +} + +var notificationResponseBuffer = buffers.notification(4, 'hi', 'boom') +var expectedNotificationResponseMessage = { + name: 'notification', + processId: 4, + channel: 'hi', + payload: 'boom', +} + +const parseBuffers = async (buffers: Buffer[]): Promise => { + const stream = new PassThrough() + for (const buffer of buffers) { + stream.write(buffer) + } + stream.end() + const msgs: BackendMessage[] = [] + await parse(stream, (msg) => msgs.push(msg)) + return msgs +} + +describe('PgPacketStream', function () { + testForMessage(authOkBuffer, expectedAuthenticationOkayMessage) + testForMessage(plainPasswordBuffer, expectedPlainPasswordMessage) + testForMessage(md5PasswordBuffer, expectedMD5PasswordMessage) + testForMessage(SASLBuffer, expectedSASLMessage) + testForMessage(SASLContinueBuffer, expectedSASLContinueMessage) + + // this exercises a found bug in the parser: + // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 + // and adds a test which is deterministic, rather than relying on network packet chunking + const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])]) + testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage) + + testForMessage(SASLFinalBuffer, expectedSASLFinalMessage) + + // this exercises a found bug in the parser: + // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 + // and adds a test which is deterministic, rather than relying on network packet chunking + const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])]) + testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage) + + testForMessage(paramStatusBuffer, expectedParameterStatusMessage) + testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage) + testForMessage(readyForQueryBuffer, expectedReadyForQueryMessage) + testForMessage(commandCompleteBuffer, expectedCommandCompleteMessage) + testForMessage(notificationResponseBuffer, expectedNotificationResponseMessage) + testForMessage(buffers.emptyQuery(), { + name: 'emptyQuery', + length: 4, + }) + + testForMessage(Buffer.from([0x6e, 0, 0, 0, 4]), { + name: 'noData', + }) + + describe('rowDescription messages', function () { + testForMessage(emptyRowDescriptionBuffer, expectedEmptyRowDescriptionMessage) + testForMessage(oneRowDescBuff, expectedOneRowMessage) + testForMessage(twoRowBuf, expectedTwoRowMessage) + }) + + describe('parameterDescription messages', function () { + testForMessage(emptyParameterDescriptionBuffer, expectedEmptyParameterDescriptionMessage) + testForMessage(oneParameterDescBuf, expectedOneParameterMessage) + testForMessage(twoParameterDescBuf, expectedTwoParameterMessage) + }) + + describe('parsing rows', function () { + describe('parsing empty row', function () { + testForMessage(emptyRowFieldBuf, { + name: 'dataRow', + fieldCount: 0, + }) + }) + + describe('parsing data row with fields', function () { + testForMessage(oneFieldBuf, { + name: 'dataRow', + fieldCount: 1, + fields: ['test'], + }) + }) + }) + + describe('notice message', function () { + // this uses the same logic as error message + var buff = buffers.notice([{ type: 'C', value: 'code' }]) + testForMessage(buff, { + name: 'notice', + code: 'code', + }) + }) + + testForMessage(buffers.error([]), { + name: 'error', + }) + + describe('with all the fields', function () { + var buffer = buffers.error([ + { + type: 'S', + value: 'ERROR', + }, + { + type: 'C', + value: 'code', + }, + { + type: 'M', + value: 'message', + }, + { + type: 'D', + value: 'details', + }, + { + type: 'H', + value: 'hint', + }, + { + type: 'P', + value: '100', + }, + { + type: 'p', + value: '101', + }, + { + type: 'q', + value: 'query', + }, + { + type: 'W', + value: 'where', + }, + { + type: 'F', + value: 'file', + }, + { + type: 'L', + value: 'line', + }, + { + type: 'R', + value: 'routine', + }, + { + type: 'Z', // ignored + value: 'alsdkf', + }, + ]) + + testForMessage(buffer, { + name: 'error', + severity: 'ERROR', + code: 'code', + message: 'message', + detail: 'details', + hint: 'hint', + position: '100', + internalPosition: '101', + internalQuery: 'query', + where: 'where', + file: 'file', + line: 'line', + routine: 'routine', + }) + }) + + testForMessage(parseCompleteBuffer, { + name: 'parseComplete', + }) + + testForMessage(bindCompleteBuffer, { + name: 'bindComplete', + }) + + testForMessage(bindCompleteBuffer, { + name: 'bindComplete', + }) + + testForMessage(buffers.closeComplete(), { + name: 'closeComplete', + }) + + describe('parses portal suspended message', function () { + testForMessage(portalSuspendedBuffer, { + name: 'portalSuspended', + }) + }) + + describe('parses replication start message', function () { + testForMessage(Buffer.from([0x57, 0x00, 0x00, 0x00, 0x04]), { + name: 'replicationStart', + length: 4, + }) + }) + + describe('copy', () => { + testForMessage(buffers.copyIn(0), { + name: 'copyInResponse', + length: 7, + binary: false, + columnTypes: [], + }) + + testForMessage(buffers.copyIn(2), { + name: 'copyInResponse', + length: 11, + binary: false, + columnTypes: [0, 1], + }) + + testForMessage(buffers.copyOut(0), { + name: 'copyOutResponse', + length: 7, + binary: false, + columnTypes: [], + }) + + testForMessage(buffers.copyOut(3), { + name: 'copyOutResponse', + length: 13, + binary: false, + columnTypes: [0, 1, 2], + }) + + testForMessage(buffers.copyDone(), { + name: 'copyDone', + length: 4, + }) + + testForMessage(buffers.copyData(Buffer.from([5, 6, 7])), { + name: 'copyData', + length: 7, + chunk: Buffer.from([5, 6, 7]), + }) + }) + + // since the data message on a stream can randomly divide the incomming + // tcp packets anywhere, we need to make sure we can parse every single + // split on a tcp message + describe('split buffer, single message parsing', function () { + var fullBuffer = buffers.dataRow([null, 'bang', 'zug zug', null, '!']) + + it('parses when full buffer comes in', async function () { + const messages = await parseBuffers([fullBuffer]) + const message = messages[0] as any + assert.equal(message.fields.length, 5) + assert.equal(message.fields[0], null) + assert.equal(message.fields[1], 'bang') + assert.equal(message.fields[2], 'zug zug') + assert.equal(message.fields[3], null) + assert.equal(message.fields[4], '!') + }) + + var testMessageRecievedAfterSpiltAt = async function (split: number) { + var firstBuffer = Buffer.alloc(fullBuffer.length - split) + var secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length) + fullBuffer.copy(firstBuffer, 0, 0) + fullBuffer.copy(secondBuffer, 0, firstBuffer.length) + const messages = await parseBuffers([fullBuffer]) + const message = messages[0] as any + assert.equal(message.fields.length, 5) + assert.equal(message.fields[0], null) + assert.equal(message.fields[1], 'bang') + assert.equal(message.fields[2], 'zug zug') + assert.equal(message.fields[3], null) + assert.equal(message.fields[4], '!') + } + + it('parses when split in the middle', function () { + testMessageRecievedAfterSpiltAt(6) + }) + + it('parses when split at end', function () { + testMessageRecievedAfterSpiltAt(2) + }) + + it('parses when split at beginning', function () { + testMessageRecievedAfterSpiltAt(fullBuffer.length - 2) + testMessageRecievedAfterSpiltAt(fullBuffer.length - 1) + testMessageRecievedAfterSpiltAt(fullBuffer.length - 5) + }) + }) + + describe('split buffer, multiple message parsing', function () { + var dataRowBuffer = buffers.dataRow(['!']) + var readyForQueryBuffer = buffers.readyForQuery() + var fullBuffer = Buffer.alloc(dataRowBuffer.length + readyForQueryBuffer.length) + dataRowBuffer.copy(fullBuffer, 0, 0) + readyForQueryBuffer.copy(fullBuffer, dataRowBuffer.length, 0) + + var verifyMessages = function (messages: any[]) { + assert.strictEqual(messages.length, 2) + assert.deepEqual(messages[0], { + name: 'dataRow', + fieldCount: 1, + length: 11, + fields: ['!'], + }) + assert.equal(messages[0].fields[0], '!') + assert.deepEqual(messages[1], { + name: 'readyForQuery', + length: 5, + status: 'I', + }) + } + // sanity check + it('recieves both messages when packet is not split', async function () { + const messages = await parseBuffers([fullBuffer]) + verifyMessages(messages) + }) + + var splitAndVerifyTwoMessages = async function (split: number) { + var firstBuffer = Buffer.alloc(fullBuffer.length - split) + var secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length) + fullBuffer.copy(firstBuffer, 0, 0) + fullBuffer.copy(secondBuffer, 0, firstBuffer.length) + const messages = await parseBuffers([firstBuffer, secondBuffer]) + verifyMessages(messages) + } + + describe('recieves both messages when packet is split', function () { + it('in the middle', function () { + return splitAndVerifyTwoMessages(11) + }) + it('at the front', function () { + return Promise.all([ + splitAndVerifyTwoMessages(fullBuffer.length - 1), + splitAndVerifyTwoMessages(fullBuffer.length - 4), + splitAndVerifyTwoMessages(fullBuffer.length - 6), + ]) + }) + + it('at the end', function () { + return Promise.all([splitAndVerifyTwoMessages(8), splitAndVerifyTwoMessages(1)]) + }) + }) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/index.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/index.ts new file mode 100644 index 0000000..00491ff --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/index.ts @@ -0,0 +1,11 @@ +import { BackendMessage, DatabaseError } from './messages' +import { serialize } from './serializer' +import { Parser, MessageCallback } from './parser' + +export function parse(stream: NodeJS.ReadableStream, callback: MessageCallback): Promise { + const parser = new Parser() + stream.on('data', (buffer: Buffer) => parser.parse(buffer, callback)) + return new Promise((resolve) => stream.on('end', () => resolve())) +} + +export { serialize, DatabaseError } diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/messages.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/messages.ts new file mode 100644 index 0000000..7eab845 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/messages.ts @@ -0,0 +1,230 @@ +export type Mode = 'text' | 'binary' + +export type MessageName = + | 'parseComplete' + | 'bindComplete' + | 'closeComplete' + | 'noData' + | 'portalSuspended' + | 'replicationStart' + | 'emptyQuery' + | 'copyDone' + | 'copyData' + | 'rowDescription' + | 'parameterDescription' + | 'parameterStatus' + | 'backendKeyData' + | 'notification' + | 'readyForQuery' + | 'commandComplete' + | 'dataRow' + | 'copyInResponse' + | 'copyOutResponse' + | 'authenticationOk' + | 'authenticationMD5Password' + | 'authenticationCleartextPassword' + | 'authenticationSASL' + | 'authenticationSASLContinue' + | 'authenticationSASLFinal' + | 'error' + | 'notice' + +export interface BackendMessage { + name: MessageName + length: number +} + +export const parseComplete: BackendMessage = { + name: 'parseComplete', + length: 5, +} + +export const bindComplete: BackendMessage = { + name: 'bindComplete', + length: 5, +} + +export const closeComplete: BackendMessage = { + name: 'closeComplete', + length: 5, +} + +export const noData: BackendMessage = { + name: 'noData', + length: 5, +} + +export const portalSuspended: BackendMessage = { + name: 'portalSuspended', + length: 5, +} + +export const replicationStart: BackendMessage = { + name: 'replicationStart', + length: 4, +} + +export const emptyQuery: BackendMessage = { + name: 'emptyQuery', + length: 4, +} + +export const copyDone: BackendMessage = { + name: 'copyDone', + length: 4, +} + +interface NoticeOrError { + message: string | undefined + severity: string | undefined + code: string | undefined + detail: string | undefined + hint: string | undefined + position: string | undefined + internalPosition: string | undefined + internalQuery: string | undefined + where: string | undefined + schema: string | undefined + table: string | undefined + column: string | undefined + dataType: string | undefined + constraint: string | undefined + file: string | undefined + line: string | undefined + routine: string | undefined +} + +export class DatabaseError extends Error implements NoticeOrError { + public severity: string | undefined + public code: string | undefined + public detail: string | undefined + public hint: string | undefined + public position: string | undefined + public internalPosition: string | undefined + public internalQuery: string | undefined + public where: string | undefined + public schema: string | undefined + public table: string | undefined + public column: string | undefined + public dataType: string | undefined + public constraint: string | undefined + public file: string | undefined + public line: string | undefined + public routine: string | undefined + constructor(message: string, public readonly length: number, public readonly name: MessageName) { + super(message) + } +} + +export class CopyDataMessage { + public readonly name = 'copyData' + constructor(public readonly length: number, public readonly chunk: Buffer) {} +} + +export class CopyResponse { + public readonly columnTypes: number[] + constructor( + public readonly length: number, + public readonly name: MessageName, + public readonly binary: boolean, + columnCount: number + ) { + this.columnTypes = new Array(columnCount) + } +} + +export class Field { + constructor( + public readonly name: string, + public readonly tableID: number, + public readonly columnID: number, + public readonly dataTypeID: number, + public readonly dataTypeSize: number, + public readonly dataTypeModifier: number, + public readonly format: Mode + ) {} +} + +export class RowDescriptionMessage { + public readonly name: MessageName = 'rowDescription' + public readonly fields: Field[] + constructor(public readonly length: number, public readonly fieldCount: number) { + this.fields = new Array(this.fieldCount) + } +} + +export class ParameterDescriptionMessage { + public readonly name: MessageName = 'parameterDescription' + public readonly dataTypeIDs: number[] + constructor(public readonly length: number, public readonly parameterCount: number) { + this.dataTypeIDs = new Array(this.parameterCount) + } +} + +export class ParameterStatusMessage { + public readonly name: MessageName = 'parameterStatus' + constructor( + public readonly length: number, + public readonly parameterName: string, + public readonly parameterValue: string + ) {} +} + +export class AuthenticationMD5Password implements BackendMessage { + public readonly name: MessageName = 'authenticationMD5Password' + constructor(public readonly length: number, public readonly salt: Buffer) {} +} + +export class BackendKeyDataMessage { + public readonly name: MessageName = 'backendKeyData' + constructor(public readonly length: number, public readonly processID: number, public readonly secretKey: number) {} +} + +export class NotificationResponseMessage { + public readonly name: MessageName = 'notification' + constructor( + public readonly length: number, + public readonly processId: number, + public readonly channel: string, + public readonly payload: string + ) {} +} + +export class ReadyForQueryMessage { + public readonly name: MessageName = 'readyForQuery' + constructor(public readonly length: number, public readonly status: string) {} +} + +export class CommandCompleteMessage { + public readonly name: MessageName = 'commandComplete' + constructor(public readonly length: number, public readonly text: string) {} +} + +export class DataRowMessage { + public readonly fieldCount: number + public readonly name: MessageName = 'dataRow' + constructor(public length: number, public fields: any[]) { + this.fieldCount = fields.length + } +} + +export class NoticeMessage implements BackendMessage, NoticeOrError { + constructor(public readonly length: number, public readonly message: string | undefined) {} + public readonly name = 'notice' + public severity: string | undefined + public code: string | undefined + public detail: string | undefined + public hint: string | undefined + public position: string | undefined + public internalPosition: string | undefined + public internalQuery: string | undefined + public where: string | undefined + public schema: string | undefined + public table: string | undefined + public column: string | undefined + public dataType: string | undefined + public constraint: string | undefined + public file: string | undefined + public line: string | undefined + public routine: string | undefined +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/outbound-serializer.test.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/outbound-serializer.test.ts new file mode 100644 index 0000000..f6669be --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/outbound-serializer.test.ts @@ -0,0 +1,272 @@ +import assert from 'assert' +import { serialize } from './serializer' +import BufferList from './testing/buffer-list' + +describe('serializer', () => { + it('builds startup message', function () { + const actual = serialize.startup({ + user: 'brian', + database: 'bang', + }) + assert.deepEqual( + actual, + new BufferList() + .addInt16(3) + .addInt16(0) + .addCString('user') + .addCString('brian') + .addCString('database') + .addCString('bang') + .addCString('client_encoding') + .addCString('UTF8') + .addCString('') + .join(true) + ) + }) + + it('builds password message', function () { + const actual = serialize.password('!') + assert.deepEqual(actual, new BufferList().addCString('!').join(true, 'p')) + }) + + it('builds request ssl message', function () { + const actual = serialize.requestSsl() + const expected = new BufferList().addInt32(80877103).join(true) + assert.deepEqual(actual, expected) + }) + + it('builds SASLInitialResponseMessage message', function () { + const actual = serialize.sendSASLInitialResponseMessage('mech', 'data') + assert.deepEqual(actual, new BufferList().addCString('mech').addInt32(4).addString('data').join(true, 'p')) + }) + + it('builds SCRAMClientFinalMessage message', function () { + const actual = serialize.sendSCRAMClientFinalMessage('data') + assert.deepEqual(actual, new BufferList().addString('data').join(true, 'p')) + }) + + it('builds query message', function () { + var txt = 'select * from boom' + const actual = serialize.query(txt) + assert.deepEqual(actual, new BufferList().addCString(txt).join(true, 'Q')) + }) + + describe('parse message', () => { + it('builds parse message', function () { + const actual = serialize.parse({ text: '!' }) + var expected = new BufferList().addCString('').addCString('!').addInt16(0).join(true, 'P') + assert.deepEqual(actual, expected) + }) + + it('builds parse message with named query', function () { + const actual = serialize.parse({ + name: 'boom', + text: 'select * from boom', + types: [], + }) + var expected = new BufferList().addCString('boom').addCString('select * from boom').addInt16(0).join(true, 'P') + assert.deepEqual(actual, expected) + }) + + it('with multiple parameters', function () { + const actual = serialize.parse({ + name: 'force', + text: 'select * from bang where name = $1', + types: [1, 2, 3, 4], + }) + var expected = new BufferList() + .addCString('force') + .addCString('select * from bang where name = $1') + .addInt16(4) + .addInt32(1) + .addInt32(2) + .addInt32(3) + .addInt32(4) + .join(true, 'P') + assert.deepEqual(actual, expected) + }) + }) + + describe('bind messages', function () { + it('with no values', function () { + const actual = serialize.bind() + + var expectedBuffer = new BufferList() + .addCString('') + .addCString('') + .addInt16(0) + .addInt16(0) + .addInt16(0) + .join(true, 'B') + assert.deepEqual(actual, expectedBuffer) + }) + + it('with named statement, portal, and values', function () { + const actual = serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, 'zing'], + }) + var expectedBuffer = new BufferList() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(4) + .addInt32(1) + .add(Buffer.from('1')) + .addInt32(2) + .add(Buffer.from('hi')) + .addInt32(-1) + .addInt32(4) + .add(Buffer.from('zing')) + .addInt16(0) + .join(true, 'B') + assert.deepEqual(actual, expectedBuffer) + }) + }) + + it('with custom valueMapper', function () { + const actual = serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, 'zing'], + valueMapper: () => null, + }) + var expectedBuffer = new BufferList() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(0) + .addInt16(4) + .addInt32(-1) + .addInt32(-1) + .addInt32(-1) + .addInt32(-1) + .addInt16(0) + .join(true, 'B') + assert.deepEqual(actual, expectedBuffer) + }) + + it('with named statement, portal, and buffer value', function () { + const actual = serialize.bind({ + portal: 'bang', + statement: 'woo', + values: ['1', 'hi', null, Buffer.from('zing', 'utf8')], + }) + var expectedBuffer = new BufferList() + .addCString('bang') // portal name + .addCString('woo') // statement name + .addInt16(4) // value count + .addInt16(0) // string + .addInt16(0) // string + .addInt16(0) // string + .addInt16(1) // binary + .addInt16(4) + .addInt32(1) + .add(Buffer.from('1')) + .addInt32(2) + .add(Buffer.from('hi')) + .addInt32(-1) + .addInt32(4) + .add(Buffer.from('zing', 'utf-8')) + .addInt16(0) + .join(true, 'B') + assert.deepEqual(actual, expectedBuffer) + }) + + describe('builds execute message', function () { + it('for unamed portal with no row limit', function () { + const actual = serialize.execute() + var expectedBuffer = new BufferList().addCString('').addInt32(0).join(true, 'E') + assert.deepEqual(actual, expectedBuffer) + }) + + it('for named portal with row limit', function () { + const actual = serialize.execute({ + portal: 'my favorite portal', + rows: 100, + }) + var expectedBuffer = new BufferList().addCString('my favorite portal').addInt32(100).join(true, 'E') + assert.deepEqual(actual, expectedBuffer) + }) + }) + + it('builds flush command', function () { + const actual = serialize.flush() + var expected = new BufferList().join(true, 'H') + assert.deepEqual(actual, expected) + }) + + it('builds sync command', function () { + const actual = serialize.sync() + var expected = new BufferList().join(true, 'S') + assert.deepEqual(actual, expected) + }) + + it('builds end command', function () { + const actual = serialize.end() + var expected = Buffer.from([0x58, 0, 0, 0, 4]) + assert.deepEqual(actual, expected) + }) + + describe('builds describe command', function () { + it('describe statement', function () { + const actual = serialize.describe({ type: 'S', name: 'bang' }) + var expected = new BufferList().addChar('S').addCString('bang').join(true, 'D') + assert.deepEqual(actual, expected) + }) + + it('describe unnamed portal', function () { + const actual = serialize.describe({ type: 'P' }) + var expected = new BufferList().addChar('P').addCString('').join(true, 'D') + assert.deepEqual(actual, expected) + }) + }) + + describe('builds close command', function () { + it('describe statement', function () { + const actual = serialize.close({ type: 'S', name: 'bang' }) + var expected = new BufferList().addChar('S').addCString('bang').join(true, 'C') + assert.deepEqual(actual, expected) + }) + + it('describe unnamed portal', function () { + const actual = serialize.close({ type: 'P' }) + var expected = new BufferList().addChar('P').addCString('').join(true, 'C') + assert.deepEqual(actual, expected) + }) + }) + + describe('copy messages', function () { + it('builds copyFromChunk', () => { + const actual = serialize.copyData(Buffer.from([1, 2, 3])) + const expected = new BufferList().add(Buffer.from([1, 2, 3])).join(true, 'd') + assert.deepEqual(actual, expected) + }) + + it('builds copy fail', () => { + const actual = serialize.copyFail('err!') + const expected = new BufferList().addCString('err!').join(true, 'f') + assert.deepEqual(actual, expected) + }) + + it('builds copy done', () => { + const actual = serialize.copyDone() + const expected = new BufferList().join(true, 'c') + assert.deepEqual(actual, expected) + }) + }) + + it('builds cancel message', () => { + const actual = serialize.cancel(3, 4) + const expected = new BufferList().addInt16(1234).addInt16(5678).addInt32(3).addInt32(4).join(true) + assert.deepEqual(actual, expected) + }) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/parser.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/parser.ts new file mode 100644 index 0000000..f900193 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/parser.ts @@ -0,0 +1,389 @@ +import { TransformOptions } from 'stream' +import { + Mode, + bindComplete, + parseComplete, + closeComplete, + noData, + portalSuspended, + copyDone, + replicationStart, + emptyQuery, + ReadyForQueryMessage, + CommandCompleteMessage, + CopyDataMessage, + CopyResponse, + NotificationResponseMessage, + RowDescriptionMessage, + ParameterDescriptionMessage, + Field, + DataRowMessage, + ParameterStatusMessage, + BackendKeyDataMessage, + DatabaseError, + BackendMessage, + MessageName, + AuthenticationMD5Password, + NoticeMessage, +} from './messages' +import { BufferReader } from './buffer-reader' +import assert from 'assert' + +// every message is prefixed with a single bye +const CODE_LENGTH = 1 +// every message has an int32 length which includes itself but does +// NOT include the code in the length +const LEN_LENGTH = 4 + +const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH + +export type Packet = { + code: number + packet: Buffer +} + +const emptyBuffer = Buffer.allocUnsafe(0) + +type StreamOptions = TransformOptions & { + mode: Mode +} + +const enum MessageCodes { + DataRow = 0x44, // D + ParseComplete = 0x31, // 1 + BindComplete = 0x32, // 2 + CloseComplete = 0x33, // 3 + CommandComplete = 0x43, // C + ReadyForQuery = 0x5a, // Z + NoData = 0x6e, // n + NotificationResponse = 0x41, // A + AuthenticationResponse = 0x52, // R + ParameterStatus = 0x53, // S + BackendKeyData = 0x4b, // K + ErrorMessage = 0x45, // E + NoticeMessage = 0x4e, // N + RowDescriptionMessage = 0x54, // T + ParameterDescriptionMessage = 0x74, // t + PortalSuspended = 0x73, // s + ReplicationStart = 0x57, // W + EmptyQuery = 0x49, // I + CopyIn = 0x47, // G + CopyOut = 0x48, // H + CopyDone = 0x63, // c + CopyData = 0x64, // d +} + +export type MessageCallback = (msg: BackendMessage) => void + +export class Parser { + private buffer: Buffer = emptyBuffer + private bufferLength: number = 0 + private bufferOffset: number = 0 + private reader = new BufferReader() + private mode: Mode + + constructor(opts?: StreamOptions) { + if (opts?.mode === 'binary') { + throw new Error('Binary mode not supported yet') + } + this.mode = opts?.mode || 'text' + } + + public parse(buffer: Buffer, callback: MessageCallback) { + this.mergeBuffer(buffer) + const bufferFullLength = this.bufferOffset + this.bufferLength + let offset = this.bufferOffset + while (offset + HEADER_LENGTH <= bufferFullLength) { + // code is 1 byte long - it identifies the message type + const code = this.buffer[offset] + // length is 1 Uint32BE - it is the length of the message EXCLUDING the code + const length = this.buffer.readUInt32BE(offset + CODE_LENGTH) + const fullMessageLength = CODE_LENGTH + length + if (fullMessageLength + offset <= bufferFullLength) { + const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer) + callback(message) + offset += fullMessageLength + } else { + break + } + } + if (offset === bufferFullLength) { + // No more use for the buffer + this.buffer = emptyBuffer + this.bufferLength = 0 + this.bufferOffset = 0 + } else { + // Adjust the cursors of remainingBuffer + this.bufferLength = bufferFullLength - offset + this.bufferOffset = offset + } + } + + private mergeBuffer(buffer: Buffer): void { + if (this.bufferLength > 0) { + const newLength = this.bufferLength + buffer.byteLength + const newFullLength = newLength + this.bufferOffset + if (newFullLength > this.buffer.byteLength) { + // We can't concat the new buffer with the remaining one + let newBuffer: Buffer + if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) { + // We can move the relevant part to the beginning of the buffer instead of allocating a new buffer + newBuffer = this.buffer + } else { + // Allocate a new larger buffer + let newBufferLength = this.buffer.byteLength * 2 + while (newLength >= newBufferLength) { + newBufferLength *= 2 + } + newBuffer = Buffer.allocUnsafe(newBufferLength) + } + // Move the remaining buffer to the new one + this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength) + this.buffer = newBuffer + this.bufferOffset = 0 + } + // Concat the new buffer with the remaining one + buffer.copy(this.buffer, this.bufferOffset + this.bufferLength) + this.bufferLength = newLength + } else { + this.buffer = buffer + this.bufferOffset = 0 + this.bufferLength = buffer.byteLength + } + } + + private handlePacket(offset: number, code: number, length: number, bytes: Buffer): BackendMessage { + switch (code) { + case MessageCodes.BindComplete: + return bindComplete + case MessageCodes.ParseComplete: + return parseComplete + case MessageCodes.CloseComplete: + return closeComplete + case MessageCodes.NoData: + return noData + case MessageCodes.PortalSuspended: + return portalSuspended + case MessageCodes.CopyDone: + return copyDone + case MessageCodes.ReplicationStart: + return replicationStart + case MessageCodes.EmptyQuery: + return emptyQuery + case MessageCodes.DataRow: + return this.parseDataRowMessage(offset, length, bytes) + case MessageCodes.CommandComplete: + return this.parseCommandCompleteMessage(offset, length, bytes) + case MessageCodes.ReadyForQuery: + return this.parseReadyForQueryMessage(offset, length, bytes) + case MessageCodes.NotificationResponse: + return this.parseNotificationMessage(offset, length, bytes) + case MessageCodes.AuthenticationResponse: + return this.parseAuthenticationResponse(offset, length, bytes) + case MessageCodes.ParameterStatus: + return this.parseParameterStatusMessage(offset, length, bytes) + case MessageCodes.BackendKeyData: + return this.parseBackendKeyData(offset, length, bytes) + case MessageCodes.ErrorMessage: + return this.parseErrorMessage(offset, length, bytes, 'error') + case MessageCodes.NoticeMessage: + return this.parseErrorMessage(offset, length, bytes, 'notice') + case MessageCodes.RowDescriptionMessage: + return this.parseRowDescriptionMessage(offset, length, bytes) + case MessageCodes.ParameterDescriptionMessage: + return this.parseParameterDescriptionMessage(offset, length, bytes) + case MessageCodes.CopyIn: + return this.parseCopyInMessage(offset, length, bytes) + case MessageCodes.CopyOut: + return this.parseCopyOutMessage(offset, length, bytes) + case MessageCodes.CopyData: + return this.parseCopyData(offset, length, bytes) + default: + assert.fail(`unknown message code: ${code.toString(16)}`) + } + } + + private parseReadyForQueryMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const status = this.reader.string(1) + return new ReadyForQueryMessage(length, status) + } + + private parseCommandCompleteMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const text = this.reader.cstring() + return new CommandCompleteMessage(length, text) + } + + private parseCopyData(offset: number, length: number, bytes: Buffer) { + const chunk = bytes.slice(offset, offset + (length - 4)) + return new CopyDataMessage(length, chunk) + } + + private parseCopyInMessage(offset: number, length: number, bytes: Buffer) { + return this.parseCopyMessage(offset, length, bytes, 'copyInResponse') + } + + private parseCopyOutMessage(offset: number, length: number, bytes: Buffer) { + return this.parseCopyMessage(offset, length, bytes, 'copyOutResponse') + } + + private parseCopyMessage(offset: number, length: number, bytes: Buffer, messageName: MessageName) { + this.reader.setBuffer(offset, bytes) + const isBinary = this.reader.byte() !== 0 + const columnCount = this.reader.int16() + const message = new CopyResponse(length, messageName, isBinary, columnCount) + for (let i = 0; i < columnCount; i++) { + message.columnTypes[i] = this.reader.int16() + } + return message + } + + private parseNotificationMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const processId = this.reader.int32() + const channel = this.reader.cstring() + const payload = this.reader.cstring() + return new NotificationResponseMessage(length, processId, channel, payload) + } + + private parseRowDescriptionMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const fieldCount = this.reader.int16() + const message = new RowDescriptionMessage(length, fieldCount) + for (let i = 0; i < fieldCount; i++) { + message.fields[i] = this.parseField() + } + return message + } + + private parseField(): Field { + const name = this.reader.cstring() + const tableID = this.reader.int32() + const columnID = this.reader.int16() + const dataTypeID = this.reader.int32() + const dataTypeSize = this.reader.int16() + const dataTypeModifier = this.reader.int32() + const mode = this.reader.int16() === 0 ? 'text' : 'binary' + return new Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode) + } + + private parseParameterDescriptionMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const parameterCount = this.reader.int16() + const message = new ParameterDescriptionMessage(length, parameterCount) + for (let i = 0; i < parameterCount; i++) { + message.dataTypeIDs[i] = this.reader.int32() + } + return message + } + + private parseDataRowMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const fieldCount = this.reader.int16() + const fields: any[] = new Array(fieldCount) + for (let i = 0; i < fieldCount; i++) { + const len = this.reader.int32() + // a -1 for length means the value of the field is null + fields[i] = len === -1 ? null : this.reader.string(len) + } + return new DataRowMessage(length, fields) + } + + private parseParameterStatusMessage(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const name = this.reader.cstring() + const value = this.reader.cstring() + return new ParameterStatusMessage(length, name, value) + } + + private parseBackendKeyData(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const processID = this.reader.int32() + const secretKey = this.reader.int32() + return new BackendKeyDataMessage(length, processID, secretKey) + } + + public parseAuthenticationResponse(offset: number, length: number, bytes: Buffer) { + this.reader.setBuffer(offset, bytes) + const code = this.reader.int32() + // TODO(bmc): maybe better types here + const message: BackendMessage & any = { + name: 'authenticationOk', + length, + } + + switch (code) { + case 0: // AuthenticationOk + break + case 3: // AuthenticationCleartextPassword + if (message.length === 8) { + message.name = 'authenticationCleartextPassword' + } + break + case 5: // AuthenticationMD5Password + if (message.length === 12) { + message.name = 'authenticationMD5Password' + const salt = this.reader.bytes(4) + return new AuthenticationMD5Password(length, salt) + } + break + case 10: // AuthenticationSASL + message.name = 'authenticationSASL' + message.mechanisms = [] + let mechanism: string + do { + mechanism = this.reader.cstring() + + if (mechanism) { + message.mechanisms.push(mechanism) + } + } while (mechanism) + break + case 11: // AuthenticationSASLContinue + message.name = 'authenticationSASLContinue' + message.data = this.reader.string(length - 8) + break + case 12: // AuthenticationSASLFinal + message.name = 'authenticationSASLFinal' + message.data = this.reader.string(length - 8) + break + default: + throw new Error('Unknown authenticationOk message type ' + code) + } + return message + } + + private parseErrorMessage(offset: number, length: number, bytes: Buffer, name: MessageName) { + this.reader.setBuffer(offset, bytes) + const fields: Record = {} + let fieldType = this.reader.string(1) + while (fieldType !== '\0') { + fields[fieldType] = this.reader.cstring() + fieldType = this.reader.string(1) + } + + const messageValue = fields.M + + const message = + name === 'notice' ? new NoticeMessage(length, messageValue) : new DatabaseError(messageValue, length, name) + + message.severity = fields.S + message.code = fields.C + message.detail = fields.D + message.hint = fields.H + message.position = fields.P + message.internalPosition = fields.p + message.internalQuery = fields.q + message.where = fields.W + message.schema = fields.s + message.table = fields.t + message.column = fields.c + message.dataType = fields.d + message.constraint = fields.n + message.file = fields.F + message.line = fields.L + message.routine = fields.R + return message + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/serializer.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/serializer.ts new file mode 100644 index 0000000..07e2fe4 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/serializer.ts @@ -0,0 +1,274 @@ +import { Writer } from './buffer-writer' + +const enum code { + startup = 0x70, + query = 0x51, + parse = 0x50, + bind = 0x42, + execute = 0x45, + flush = 0x48, + sync = 0x53, + end = 0x58, + close = 0x43, + describe = 0x44, + copyFromChunk = 0x64, + copyDone = 0x63, + copyFail = 0x66, +} + +const writer = new Writer() + +const startup = (opts: Record): Buffer => { + // protocol version + writer.addInt16(3).addInt16(0) + for (const key of Object.keys(opts)) { + writer.addCString(key).addCString(opts[key]) + } + + writer.addCString('client_encoding').addCString('UTF8') + + var bodyBuffer = writer.addCString('').flush() + // this message is sent without a code + + var length = bodyBuffer.length + 4 + + return new Writer().addInt32(length).add(bodyBuffer).flush() +} + +const requestSsl = (): Buffer => { + const response = Buffer.allocUnsafe(8) + response.writeInt32BE(8, 0) + response.writeInt32BE(80877103, 4) + return response +} + +const password = (password: string): Buffer => { + return writer.addCString(password).flush(code.startup) +} + +const sendSASLInitialResponseMessage = function (mechanism: string, initialResponse: string): Buffer { + // 0x70 = 'p' + writer.addCString(mechanism).addInt32(Buffer.byteLength(initialResponse)).addString(initialResponse) + + return writer.flush(code.startup) +} + +const sendSCRAMClientFinalMessage = function (additionalData: string): Buffer { + return writer.addString(additionalData).flush(code.startup) +} + +const query = (text: string): Buffer => { + return writer.addCString(text).flush(code.query) +} + +type ParseOpts = { + name?: string + types?: number[] + text: string +} + +const emptyArray: any[] = [] + +const parse = (query: ParseOpts): Buffer => { + // expect something like this: + // { name: 'queryName', + // text: 'select * from blah', + // types: ['int8', 'bool'] } + + // normalize missing query names to allow for null + const name = query.name || '' + if (name.length > 63) { + /* eslint-disable no-console */ + console.error('Warning! Postgres only supports 63 characters for query names.') + console.error('You supplied %s (%s)', name, name.length) + console.error('This can cause conflicts and silent errors executing queries') + /* eslint-enable no-console */ + } + + const types = query.types || emptyArray + + var len = types.length + + var buffer = writer + .addCString(name) // name of query + .addCString(query.text) // actual query text + .addInt16(len) + + for (var i = 0; i < len; i++) { + buffer.addInt32(types[i]) + } + + return writer.flush(code.parse) +} + +type ValueMapper = (param: any, index: number) => any + +type BindOpts = { + portal?: string + binary?: boolean + statement?: string + values?: any[] + // optional map from JS value to postgres value per parameter + valueMapper?: ValueMapper +} + +const paramWriter = new Writer() + +// make this a const enum so typescript will inline the value +const enum ParamType { + STRING = 0, + BINARY = 1, +} + +const writeValues = function (values: any[], valueMapper?: ValueMapper): void { + for (let i = 0; i < values.length; i++) { + const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i] + if (mappedVal == null) { + // add the param type (string) to the writer + writer.addInt16(ParamType.STRING) + // write -1 to the param writer to indicate null + paramWriter.addInt32(-1) + } else if (mappedVal instanceof Buffer) { + // add the param type (binary) to the writer + writer.addInt16(ParamType.BINARY) + // add the buffer to the param writer + paramWriter.addInt32(mappedVal.length) + paramWriter.add(mappedVal) + } else { + // add the param type (string) to the writer + writer.addInt16(ParamType.STRING) + paramWriter.addInt32(Buffer.byteLength(mappedVal)) + paramWriter.addString(mappedVal) + } + } +} + +const bind = (config: BindOpts = {}): Buffer => { + // normalize config + const portal = config.portal || '' + const statement = config.statement || '' + const binary = config.binary || false + const values = config.values || emptyArray + const len = values.length + + writer.addCString(portal).addCString(statement) + writer.addInt16(len) + + writeValues(values, config.valueMapper) + + writer.addInt16(len) + writer.add(paramWriter.flush()) + + // format code + writer.addInt16(binary ? ParamType.BINARY : ParamType.STRING) + return writer.flush(code.bind) +} + +type ExecOpts = { + portal?: string + rows?: number +} + +const emptyExecute = Buffer.from([code.execute, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00]) + +const execute = (config?: ExecOpts): Buffer => { + // this is the happy path for most queries + if (!config || (!config.portal && !config.rows)) { + return emptyExecute + } + + const portal = config.portal || '' + const rows = config.rows || 0 + + const portalLength = Buffer.byteLength(portal) + const len = 4 + portalLength + 1 + 4 + // one extra bit for code + const buff = Buffer.allocUnsafe(1 + len) + buff[0] = code.execute + buff.writeInt32BE(len, 1) + buff.write(portal, 5, 'utf-8') + buff[portalLength + 5] = 0 // null terminate portal cString + buff.writeUInt32BE(rows, buff.length - 4) + return buff +} + +const cancel = (processID: number, secretKey: number): Buffer => { + const buffer = Buffer.allocUnsafe(16) + buffer.writeInt32BE(16, 0) + buffer.writeInt16BE(1234, 4) + buffer.writeInt16BE(5678, 6) + buffer.writeInt32BE(processID, 8) + buffer.writeInt32BE(secretKey, 12) + return buffer +} + +type PortalOpts = { + type: 'S' | 'P' + name?: string +} + +const cstringMessage = (code: code, string: string): Buffer => { + const stringLen = Buffer.byteLength(string) + const len = 4 + stringLen + 1 + // one extra bit for code + const buffer = Buffer.allocUnsafe(1 + len) + buffer[0] = code + buffer.writeInt32BE(len, 1) + buffer.write(string, 5, 'utf-8') + buffer[len] = 0 // null terminate cString + return buffer +} + +const emptyDescribePortal = writer.addCString('P').flush(code.describe) +const emptyDescribeStatement = writer.addCString('S').flush(code.describe) + +const describe = (msg: PortalOpts): Buffer => { + return msg.name + ? cstringMessage(code.describe, `${msg.type}${msg.name || ''}`) + : msg.type === 'P' + ? emptyDescribePortal + : emptyDescribeStatement +} + +const close = (msg: PortalOpts): Buffer => { + const text = `${msg.type}${msg.name || ''}` + return cstringMessage(code.close, text) +} + +const copyData = (chunk: Buffer): Buffer => { + return writer.add(chunk).flush(code.copyFromChunk) +} + +const copyFail = (message: string): Buffer => { + return cstringMessage(code.copyFail, message) +} + +const codeOnlyBuffer = (code: code): Buffer => Buffer.from([code, 0x00, 0x00, 0x00, 0x04]) + +const flushBuffer = codeOnlyBuffer(code.flush) +const syncBuffer = codeOnlyBuffer(code.sync) +const endBuffer = codeOnlyBuffer(code.end) +const copyDoneBuffer = codeOnlyBuffer(code.copyDone) + +const serialize = { + startup, + password, + requestSsl, + sendSASLInitialResponseMessage, + sendSCRAMClientFinalMessage, + query, + parse, + bind, + execute, + describe, + close, + flush: () => flushBuffer, + sync: () => syncBuffer, + end: () => endBuffer, + copyData, + copyDone: () => copyDoneBuffer, + copyFail, + cancel, +} + +export { serialize } diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/buffer-list.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/buffer-list.ts new file mode 100644 index 0000000..15ac785 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/buffer-list.ts @@ -0,0 +1,75 @@ +export default class BufferList { + constructor(public buffers: Buffer[] = []) {} + + public add(buffer: Buffer, front?: boolean) { + this.buffers[front ? 'unshift' : 'push'](buffer) + return this + } + + public addInt16(val: number, front?: boolean) { + return this.add(Buffer.from([val >>> 8, val >>> 0]), front) + } + + public getByteLength(initial?: number) { + return this.buffers.reduce(function (previous, current) { + return previous + current.length + }, initial || 0) + } + + public addInt32(val: number, first?: boolean) { + return this.add( + Buffer.from([(val >>> 24) & 0xff, (val >>> 16) & 0xff, (val >>> 8) & 0xff, (val >>> 0) & 0xff]), + first + ) + } + + public addCString(val: string, front?: boolean) { + var len = Buffer.byteLength(val) + var buffer = Buffer.alloc(len + 1) + buffer.write(val) + buffer[len] = 0 + return this.add(buffer, front) + } + + public addString(val: string, front?: boolean) { + var len = Buffer.byteLength(val) + var buffer = Buffer.alloc(len) + buffer.write(val) + return this.add(buffer, front) + } + + public addChar(char: string, first?: boolean) { + return this.add(Buffer.from(char, 'utf8'), first) + } + + public addByte(byte: number) { + return this.add(Buffer.from([byte])) + } + + public join(appendLength?: boolean, char?: string): Buffer { + var length = this.getByteLength() + if (appendLength) { + this.addInt32(length + 4, true) + return this.join(false, char) + } + if (char) { + this.addChar(char, true) + length++ + } + var result = Buffer.alloc(length) + var index = 0 + this.buffers.forEach(function (buffer) { + buffer.copy(result, index, 0) + index += buffer.length + }) + return result + } + + public static concat(): Buffer { + var total = new BufferList() + for (var i = 0; i < arguments.length; i++) { + total.add(arguments[i]) + } + return total.join() + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/test-buffers.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/test-buffers.ts new file mode 100644 index 0000000..e0a04a7 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/testing/test-buffers.ts @@ -0,0 +1,166 @@ +// http://developer.postgresql.org/pgdocs/postgres/protocol-message-formats.html +import BufferList from './buffer-list' + +const buffers = { + readyForQuery: function () { + return new BufferList().add(Buffer.from('I')).join(true, 'Z') + }, + + authenticationOk: function () { + return new BufferList().addInt32(0).join(true, 'R') + }, + + authenticationCleartextPassword: function () { + return new BufferList().addInt32(3).join(true, 'R') + }, + + authenticationMD5Password: function () { + return new BufferList() + .addInt32(5) + .add(Buffer.from([1, 2, 3, 4])) + .join(true, 'R') + }, + + authenticationSASL: function () { + return new BufferList().addInt32(10).addCString('SCRAM-SHA-256').addCString('').join(true, 'R') + }, + + authenticationSASLContinue: function () { + return new BufferList().addInt32(11).addString('data').join(true, 'R') + }, + + authenticationSASLFinal: function () { + return new BufferList().addInt32(12).addString('data').join(true, 'R') + }, + + parameterStatus: function (name: string, value: string) { + return new BufferList().addCString(name).addCString(value).join(true, 'S') + }, + + backendKeyData: function (processID: number, secretKey: number) { + return new BufferList().addInt32(processID).addInt32(secretKey).join(true, 'K') + }, + + commandComplete: function (string: string) { + return new BufferList().addCString(string).join(true, 'C') + }, + + rowDescription: function (fields: any[]) { + fields = fields || [] + var buf = new BufferList() + buf.addInt16(fields.length) + fields.forEach(function (field) { + buf + .addCString(field.name) + .addInt32(field.tableID || 0) + .addInt16(field.attributeNumber || 0) + .addInt32(field.dataTypeID || 0) + .addInt16(field.dataTypeSize || 0) + .addInt32(field.typeModifier || 0) + .addInt16(field.formatCode || 0) + }) + return buf.join(true, 'T') + }, + + parameterDescription: function (dataTypeIDs: number[]) { + dataTypeIDs = dataTypeIDs || [] + var buf = new BufferList() + buf.addInt16(dataTypeIDs.length) + dataTypeIDs.forEach(function (dataTypeID) { + buf.addInt32(dataTypeID) + }) + return buf.join(true, 't') + }, + + dataRow: function (columns: any[]) { + columns = columns || [] + var buf = new BufferList() + buf.addInt16(columns.length) + columns.forEach(function (col) { + if (col == null) { + buf.addInt32(-1) + } else { + var strBuf = Buffer.from(col, 'utf8') + buf.addInt32(strBuf.length) + buf.add(strBuf) + } + }) + return buf.join(true, 'D') + }, + + error: function (fields: any) { + return buffers.errorOrNotice(fields).join(true, 'E') + }, + + notice: function (fields: any) { + return buffers.errorOrNotice(fields).join(true, 'N') + }, + + errorOrNotice: function (fields: any) { + fields = fields || [] + var buf = new BufferList() + fields.forEach(function (field: any) { + buf.addChar(field.type) + buf.addCString(field.value) + }) + return buf.add(Buffer.from([0])) // terminator + }, + + parseComplete: function () { + return new BufferList().join(true, '1') + }, + + bindComplete: function () { + return new BufferList().join(true, '2') + }, + + notification: function (id: number, channel: string, payload: string) { + return new BufferList().addInt32(id).addCString(channel).addCString(payload).join(true, 'A') + }, + + emptyQuery: function () { + return new BufferList().join(true, 'I') + }, + + portalSuspended: function () { + return new BufferList().join(true, 's') + }, + + closeComplete: function () { + return new BufferList().join(true, '3') + }, + + copyIn: function (cols: number) { + const list = new BufferList() + // text mode + .addByte(0) + // column count + .addInt16(cols) + for (let i = 0; i < cols; i++) { + list.addInt16(i) + } + return list.join(true, 'G') + }, + + copyOut: function (cols: number) { + const list = new BufferList() + // text mode + .addByte(0) + // column count + .addInt16(cols) + for (let i = 0; i < cols; i++) { + list.addInt16(i) + } + return list.join(true, 'H') + }, + + copyData: function (bytes: Buffer) { + return new BufferList().add(bytes).join(true, 'd') + }, + + copyDone: function () { + return new BufferList().join(true, 'c') + }, +} + +export default buffers diff --git a/server/node_modules/pg-promise/node_modules/pg-protocol/src/types/chunky.d.ts b/server/node_modules/pg-promise/node_modules/pg-protocol/src/types/chunky.d.ts new file mode 100644 index 0000000..7389bda --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg-protocol/src/types/chunky.d.ts @@ -0,0 +1 @@ +declare module 'chunky' diff --git a/server/node_modules/pg-promise/node_modules/pg/LICENSE b/server/node_modules/pg-promise/node_modules/pg/LICENSE new file mode 100644 index 0000000..5c14056 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2010 - 2021 Brian Carlson + +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. diff --git a/server/node_modules/pg-promise/node_modules/pg/README.md b/server/node_modules/pg-promise/node_modules/pg/README.md new file mode 100644 index 0000000..e5fcf02 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/README.md @@ -0,0 +1,101 @@ +# node-postgres + +[![Build Status](https://secure.travis-ci.org/brianc/node-postgres.svg?branch=master)](http://travis-ci.org/brianc/node-postgres) +[![Dependency Status](https://david-dm.org/brianc/node-postgres.svg?path=packages/pg)](https://david-dm.org/brianc/node-postgres?path=packages/pg) +NPM version +NPM downloads + +Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings. + +## Install + +```sh +$ npm install pg +``` + +--- + +## :star: [Documentation](https://node-postgres.com) :star: + +### Features + +- Pure JavaScript client and native libpq bindings share _the same API_ +- Connection pooling +- Extensible JS ↔ PostgreSQL data-type coercion +- Supported PostgreSQL features + - Parameterized queries + - Named statements with query plan caching + - Async notifications with `LISTEN/NOTIFY` + - Bulk import & export with `COPY TO/COPY FROM` + +### Extras + +node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture. +The entire list can be found on our [wiki](https://github.com/brianc/node-postgres/wiki/Extras). + +## Support + +node-postgres is free software. If you encounter a bug with the library please open an issue on the [GitHub repo](https://github.com/brianc/node-postgres). If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better! + +When you open an issue please provide: + +- version of Node +- version of Postgres +- smallest possible snippet of code to reproduce the problem + +You can also follow me [@briancarlson](https://twitter.com/briancarlson) if that's your thing. I try to always announce noteworthy changes & developments with node-postgres on Twitter. + +## Sponsorship :two_hearts: + +node-postgres's continued development has been made possible in part by generous finanical support from [the community](https://github.com/brianc/node-postgres/blob/master/SPONSORS.md) and these featured sponsors: + +
    + + + + + + + + +
    + +If you or your company are benefiting from node-postgres and would like to help keep the project financially sustainable [please consider supporting](https://github.com/sponsors/brianc) its development. + +## Contributing + +**:heart: contributions!** + +I will **happily** accept your pull request if it: + +- **has tests** +- looks reasonable +- does not break backwards compatibility + +If your change involves breaking backwards compatibility please please point that out in the pull request & we can discuss & plan when and how to release it and what type of documentation or communicate it will require. + +## Troubleshooting and FAQ + +The causes and solutions to common errors can be found among the [Frequently Asked Questions (FAQ)](https://github.com/brianc/node-postgres/wiki/FAQ) + +## License + +Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) + +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. diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/client.js b/server/node_modules/pg-promise/node_modules/pg/lib/client.js new file mode 100644 index 0000000..589aa9f --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/client.js @@ -0,0 +1,621 @@ +'use strict' + +var EventEmitter = require('events').EventEmitter +var util = require('util') +var utils = require('./utils') +var sasl = require('./sasl') +var pgPass = require('pgpass') +var TypeOverrides = require('./type-overrides') + +var ConnectionParameters = require('./connection-parameters') +var Query = require('./query') +var defaults = require('./defaults') +var Connection = require('./connection') + +class Client extends EventEmitter { + constructor(config) { + super() + + this.connectionParameters = new ConnectionParameters(config) + this.user = this.connectionParameters.user + this.database = this.connectionParameters.database + this.port = this.connectionParameters.port + this.host = this.connectionParameters.host + + // "hiding" the password so it doesn't show up in stack traces + // or if the client is console.logged + Object.defineProperty(this, 'password', { + configurable: true, + enumerable: false, + writable: true, + value: this.connectionParameters.password, + }) + + this.replication = this.connectionParameters.replication + + var c = config || {} + + this._Promise = c.Promise || global.Promise + this._types = new TypeOverrides(c.types) + this._ending = false + this._connecting = false + this._connected = false + this._connectionError = false + this._queryable = true + + this.connection = + c.connection || + new Connection({ + stream: c.stream, + ssl: this.connectionParameters.ssl, + keepAlive: c.keepAlive || false, + keepAliveInitialDelayMillis: c.keepAliveInitialDelayMillis || 0, + encoding: this.connectionParameters.client_encoding || 'utf8', + }) + this.queryQueue = [] + this.binary = c.binary || defaults.binary + this.processID = null + this.secretKey = null + this.ssl = this.connectionParameters.ssl || false + // As with Password, make SSL->Key (the private key) non-enumerable. + // It won't show up in stack traces + // or if the client is console.logged + if (this.ssl && this.ssl.key) { + Object.defineProperty(this.ssl, 'key', { + enumerable: false, + }) + } + + this._connectionTimeoutMillis = c.connectionTimeoutMillis || 0 + } + + _errorAllQueries(err) { + const enqueueError = (query) => { + process.nextTick(() => { + query.handleError(err, this.connection) + }) + } + + if (this.activeQuery) { + enqueueError(this.activeQuery) + this.activeQuery = null + } + + this.queryQueue.forEach(enqueueError) + this.queryQueue.length = 0 + } + + _connect(callback) { + var self = this + var con = this.connection + this._connectionCallback = callback + + if (this._connecting || this._connected) { + const err = new Error('Client has already been connected. You cannot reuse a client.') + process.nextTick(() => { + callback(err) + }) + return + } + this._connecting = true + + this.connectionTimeoutHandle + if (this._connectionTimeoutMillis > 0) { + this.connectionTimeoutHandle = setTimeout(() => { + con._ending = true + con.stream.destroy(new Error('timeout expired')) + }, this._connectionTimeoutMillis) + } + + if (this.host && this.host.indexOf('/') === 0) { + con.connect(this.host + '/.s.PGSQL.' + this.port) + } else { + con.connect(this.port, this.host) + } + + // once connection is established send startup message + con.on('connect', function () { + if (self.ssl) { + con.requestSsl() + } else { + con.startup(self.getStartupConf()) + } + }) + + con.on('sslconnect', function () { + con.startup(self.getStartupConf()) + }) + + this._attachListeners(con) + + con.once('end', () => { + const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly') + + clearTimeout(this.connectionTimeoutHandle) + this._errorAllQueries(error) + + if (!this._ending) { + // if the connection is ended without us calling .end() + // on this client then we have an unexpected disconnection + // treat this as an error unless we've already emitted an error + // during connection. + if (this._connecting && !this._connectionError) { + if (this._connectionCallback) { + this._connectionCallback(error) + } else { + this._handleErrorEvent(error) + } + } else if (!this._connectionError) { + this._handleErrorEvent(error) + } + } + + process.nextTick(() => { + this.emit('end') + }) + }) + } + + connect(callback) { + if (callback) { + this._connect(callback) + return + } + + return new this._Promise((resolve, reject) => { + this._connect((error) => { + if (error) { + reject(error) + } else { + resolve() + } + }) + }) + } + + _attachListeners(con) { + // password request handling + con.on('authenticationCleartextPassword', this._handleAuthCleartextPassword.bind(this)) + // password request handling + con.on('authenticationMD5Password', this._handleAuthMD5Password.bind(this)) + // password request handling (SASL) + con.on('authenticationSASL', this._handleAuthSASL.bind(this)) + con.on('authenticationSASLContinue', this._handleAuthSASLContinue.bind(this)) + con.on('authenticationSASLFinal', this._handleAuthSASLFinal.bind(this)) + con.on('backendKeyData', this._handleBackendKeyData.bind(this)) + con.on('error', this._handleErrorEvent.bind(this)) + con.on('errorMessage', this._handleErrorMessage.bind(this)) + con.on('readyForQuery', this._handleReadyForQuery.bind(this)) + con.on('notice', this._handleNotice.bind(this)) + con.on('rowDescription', this._handleRowDescription.bind(this)) + con.on('dataRow', this._handleDataRow.bind(this)) + con.on('portalSuspended', this._handlePortalSuspended.bind(this)) + con.on('emptyQuery', this._handleEmptyQuery.bind(this)) + con.on('commandComplete', this._handleCommandComplete.bind(this)) + con.on('parseComplete', this._handleParseComplete.bind(this)) + con.on('copyInResponse', this._handleCopyInResponse.bind(this)) + con.on('copyData', this._handleCopyData.bind(this)) + con.on('notification', this._handleNotification.bind(this)) + } + + // TODO(bmc): deprecate pgpass "built in" integration since this.password can be a function + // it can be supplied by the user if required - this is a breaking change! + _checkPgPass(cb) { + const con = this.connection + if (typeof this.password === 'function') { + this._Promise + .resolve() + .then(() => this.password()) + .then((pass) => { + if (pass !== undefined) { + if (typeof pass !== 'string') { + con.emit('error', new TypeError('Password must be a string')) + return + } + this.connectionParameters.password = this.password = pass + } else { + this.connectionParameters.password = this.password = null + } + cb() + }) + .catch((err) => { + con.emit('error', err) + }) + } else if (this.password !== null) { + cb() + } else { + pgPass(this.connectionParameters, (pass) => { + if (undefined !== pass) { + this.connectionParameters.password = this.password = pass + } + cb() + }) + } + } + + _handleAuthCleartextPassword(msg) { + this._checkPgPass(() => { + this.connection.password(this.password) + }) + } + + _handleAuthMD5Password(msg) { + this._checkPgPass(() => { + const hashedPassword = utils.postgresMd5PasswordHash(this.user, this.password, msg.salt) + this.connection.password(hashedPassword) + }) + } + + _handleAuthSASL(msg) { + this._checkPgPass(() => { + this.saslSession = sasl.startSession(msg.mechanisms) + this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response) + }) + } + + _handleAuthSASLContinue(msg) { + sasl.continueSession(this.saslSession, this.password, msg.data) + this.connection.sendSCRAMClientFinalMessage(this.saslSession.response) + } + + _handleAuthSASLFinal(msg) { + sasl.finalizeSession(this.saslSession, msg.data) + this.saslSession = null + } + + _handleBackendKeyData(msg) { + this.processID = msg.processID + this.secretKey = msg.secretKey + } + + _handleReadyForQuery(msg) { + if (this._connecting) { + this._connecting = false + this._connected = true + clearTimeout(this.connectionTimeoutHandle) + + // process possible callback argument to Client#connect + if (this._connectionCallback) { + this._connectionCallback(null, this) + // remove callback for proper error handling + // after the connect event + this._connectionCallback = null + } + this.emit('connect') + } + const { activeQuery } = this + this.activeQuery = null + this.readyForQuery = true + if (activeQuery) { + activeQuery.handleReadyForQuery(this.connection) + } + this._pulseQueryQueue() + } + + // if we receieve an error event or error message + // during the connection process we handle it here + _handleErrorWhileConnecting(err) { + if (this._connectionError) { + // TODO(bmc): this is swallowing errors - we shouldn't do this + return + } + this._connectionError = true + clearTimeout(this.connectionTimeoutHandle) + if (this._connectionCallback) { + return this._connectionCallback(err) + } + this.emit('error', err) + } + + // if we're connected and we receive an error event from the connection + // this means the socket is dead - do a hard abort of all queries and emit + // the socket error on the client as well + _handleErrorEvent(err) { + if (this._connecting) { + return this._handleErrorWhileConnecting(err) + } + this._queryable = false + this._errorAllQueries(err) + this.emit('error', err) + } + + // handle error messages from the postgres backend + _handleErrorMessage(msg) { + if (this._connecting) { + return this._handleErrorWhileConnecting(msg) + } + const activeQuery = this.activeQuery + + if (!activeQuery) { + this._handleErrorEvent(msg) + return + } + + this.activeQuery = null + activeQuery.handleError(msg, this.connection) + } + + _handleRowDescription(msg) { + // delegate rowDescription to active query + this.activeQuery.handleRowDescription(msg) + } + + _handleDataRow(msg) { + // delegate dataRow to active query + this.activeQuery.handleDataRow(msg) + } + + _handlePortalSuspended(msg) { + // delegate portalSuspended to active query + this.activeQuery.handlePortalSuspended(this.connection) + } + + _handleEmptyQuery(msg) { + // delegate emptyQuery to active query + this.activeQuery.handleEmptyQuery(this.connection) + } + + _handleCommandComplete(msg) { + // delegate commandComplete to active query + this.activeQuery.handleCommandComplete(msg, this.connection) + } + + _handleParseComplete(msg) { + // if a prepared statement has a name and properly parses + // we track that its already been executed so we don't parse + // it again on the same client + if (this.activeQuery.name) { + this.connection.parsedStatements[this.activeQuery.name] = this.activeQuery.text + } + } + + _handleCopyInResponse(msg) { + this.activeQuery.handleCopyInResponse(this.connection) + } + + _handleCopyData(msg) { + this.activeQuery.handleCopyData(msg, this.connection) + } + + _handleNotification(msg) { + this.emit('notification', msg) + } + + _handleNotice(msg) { + this.emit('notice', msg) + } + + getStartupConf() { + var params = this.connectionParameters + + var data = { + user: params.user, + database: params.database, + } + + var appName = params.application_name || params.fallback_application_name + if (appName) { + data.application_name = appName + } + if (params.replication) { + data.replication = '' + params.replication + } + if (params.statement_timeout) { + data.statement_timeout = String(parseInt(params.statement_timeout, 10)) + } + if (params.idle_in_transaction_session_timeout) { + data.idle_in_transaction_session_timeout = String(parseInt(params.idle_in_transaction_session_timeout, 10)) + } + if (params.options) { + data.options = params.options + } + + return data + } + + cancel(client, query) { + if (client.activeQuery === query) { + var con = this.connection + + if (this.host && this.host.indexOf('/') === 0) { + con.connect(this.host + '/.s.PGSQL.' + this.port) + } else { + con.connect(this.port, this.host) + } + + // once connection is established send cancel message + con.on('connect', function () { + con.cancel(client.processID, client.secretKey) + }) + } else if (client.queryQueue.indexOf(query) !== -1) { + client.queryQueue.splice(client.queryQueue.indexOf(query), 1) + } + } + + setTypeParser(oid, format, parseFn) { + return this._types.setTypeParser(oid, format, parseFn) + } + + getTypeParser(oid, format) { + return this._types.getTypeParser(oid, format) + } + + // Ported from PostgreSQL 9.2.4 source code in src/interfaces/libpq/fe-exec.c + escapeIdentifier(str) { + return '"' + str.replace(/"/g, '""') + '"' + } + + // Ported from PostgreSQL 9.2.4 source code in src/interfaces/libpq/fe-exec.c + escapeLiteral(str) { + var hasBackslash = false + var escaped = "'" + + for (var i = 0; i < str.length; i++) { + var c = str[i] + if (c === "'") { + escaped += c + c + } else if (c === '\\') { + escaped += c + c + hasBackslash = true + } else { + escaped += c + } + } + + escaped += "'" + + if (hasBackslash === true) { + escaped = ' E' + escaped + } + + return escaped + } + + _pulseQueryQueue() { + if (this.readyForQuery === true) { + this.activeQuery = this.queryQueue.shift() + if (this.activeQuery) { + this.readyForQuery = false + this.hasExecuted = true + + const queryError = this.activeQuery.submit(this.connection) + if (queryError) { + process.nextTick(() => { + this.activeQuery.handleError(queryError, this.connection) + this.readyForQuery = true + this._pulseQueryQueue() + }) + } + } else if (this.hasExecuted) { + this.activeQuery = null + this.emit('drain') + } + } + } + + query(config, values, callback) { + // can take in strings, config object or query object + var query + var result + var readTimeout + var readTimeoutTimer + var queryCallback + + if (config === null || config === undefined) { + throw new TypeError('Client was passed a null or undefined query') + } else if (typeof config.submit === 'function') { + readTimeout = config.query_timeout || this.connectionParameters.query_timeout + result = query = config + if (typeof values === 'function') { + query.callback = query.callback || values + } + } else { + readTimeout = this.connectionParameters.query_timeout + query = new Query(config, values, callback) + if (!query.callback) { + result = new this._Promise((resolve, reject) => { + query.callback = (err, res) => (err ? reject(err) : resolve(res)) + }) + } + } + + if (readTimeout) { + queryCallback = query.callback + + readTimeoutTimer = setTimeout(() => { + var error = new Error('Query read timeout') + + process.nextTick(() => { + query.handleError(error, this.connection) + }) + + queryCallback(error) + + // we already returned an error, + // just do nothing if query completes + query.callback = () => {} + + // Remove from queue + var index = this.queryQueue.indexOf(query) + if (index > -1) { + this.queryQueue.splice(index, 1) + } + + this._pulseQueryQueue() + }, readTimeout) + + query.callback = (err, res) => { + clearTimeout(readTimeoutTimer) + queryCallback(err, res) + } + } + + if (this.binary && !query.binary) { + query.binary = true + } + + if (query._result && !query._result._types) { + query._result._types = this._types + } + + if (!this._queryable) { + process.nextTick(() => { + query.handleError(new Error('Client has encountered a connection error and is not queryable'), this.connection) + }) + return result + } + + if (this._ending) { + process.nextTick(() => { + query.handleError(new Error('Client was closed and is not queryable'), this.connection) + }) + return result + } + + this.queryQueue.push(query) + this._pulseQueryQueue() + return result + } + + ref() { + this.connection.ref() + } + + unref() { + this.connection.unref() + } + + end(cb) { + this._ending = true + + // if we have never connected, then end is a noop, callback immediately + if (!this.connection._connecting) { + if (cb) { + cb() + } else { + return this._Promise.resolve() + } + } + + if (this.activeQuery || !this._queryable) { + // if we have an active query we need to force a disconnect + // on the socket - otherwise a hung query could block end forever + this.connection.stream.destroy() + } else { + this.connection.end() + } + + if (cb) { + this.connection.once('end', cb) + } else { + return new this._Promise((resolve) => { + this.connection.once('end', resolve) + }) + } + } +} + +// expose a Query constructor +Client.Query = Query + +module.exports = Client diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/connection-parameters.js b/server/node_modules/pg-promise/node_modules/pg/lib/connection-parameters.js new file mode 100644 index 0000000..165e6d5 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/connection-parameters.js @@ -0,0 +1,166 @@ +'use strict' + +var dns = require('dns') + +var defaults = require('./defaults') + +var parse = require('pg-connection-string').parse // parses a connection string + +var val = function (key, config, envVar) { + if (envVar === undefined) { + envVar = process.env['PG' + key.toUpperCase()] + } else if (envVar === false) { + // do nothing ... use false + } else { + envVar = process.env[envVar] + } + + return config[key] || envVar || defaults[key] +} + +var readSSLConfigFromEnvironment = function () { + switch (process.env.PGSSLMODE) { + case 'disable': + return false + case 'prefer': + case 'require': + case 'verify-ca': + case 'verify-full': + return true + case 'no-verify': + return { rejectUnauthorized: false } + } + return defaults.ssl +} + +// Convert arg to a string, surround in single quotes, and escape single quotes and backslashes +var quoteParamValue = function (value) { + return "'" + ('' + value).replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'" +} + +var add = function (params, config, paramName) { + var value = config[paramName] + if (value !== undefined && value !== null) { + params.push(paramName + '=' + quoteParamValue(value)) + } +} + +class ConnectionParameters { + constructor(config) { + // if a string is passed, it is a raw connection string so we parse it into a config + config = typeof config === 'string' ? parse(config) : config || {} + + // if the config has a connectionString defined, parse IT into the config we use + // this will override other default values with what is stored in connectionString + if (config.connectionString) { + config = Object.assign({}, config, parse(config.connectionString)) + } + + this.user = val('user', config) + this.database = val('database', config) + + if (this.database === undefined) { + this.database = this.user + } + + this.port = parseInt(val('port', config), 10) + this.host = val('host', config) + + // "hiding" the password so it doesn't show up in stack traces + // or if the client is console.logged + Object.defineProperty(this, 'password', { + configurable: true, + enumerable: false, + writable: true, + value: val('password', config), + }) + + this.binary = val('binary', config) + this.options = val('options', config) + + this.ssl = typeof config.ssl === 'undefined' ? readSSLConfigFromEnvironment() : config.ssl + + if (typeof this.ssl === 'string') { + if (this.ssl === 'true') { + this.ssl = true + } + } + // support passing in ssl=no-verify via connection string + if (this.ssl === 'no-verify') { + this.ssl = { rejectUnauthorized: false } + } + if (this.ssl && this.ssl.key) { + Object.defineProperty(this.ssl, 'key', { + enumerable: false, + }) + } + + this.client_encoding = val('client_encoding', config) + this.replication = val('replication', config) + // a domain socket begins with '/' + this.isDomainSocket = !(this.host || '').indexOf('/') + + this.application_name = val('application_name', config, 'PGAPPNAME') + this.fallback_application_name = val('fallback_application_name', config, false) + this.statement_timeout = val('statement_timeout', config, false) + this.idle_in_transaction_session_timeout = val('idle_in_transaction_session_timeout', config, false) + this.query_timeout = val('query_timeout', config, false) + + if (config.connectionTimeoutMillis === undefined) { + this.connect_timeout = process.env.PGCONNECT_TIMEOUT || 0 + } else { + this.connect_timeout = Math.floor(config.connectionTimeoutMillis / 1000) + } + + if (config.keepAlive === false) { + this.keepalives = 0 + } else if (config.keepAlive === true) { + this.keepalives = 1 + } + + if (typeof config.keepAliveInitialDelayMillis === 'number') { + this.keepalives_idle = Math.floor(config.keepAliveInitialDelayMillis / 1000) + } + } + + getLibpqConnectionString(cb) { + var params = [] + add(params, this, 'user') + add(params, this, 'password') + add(params, this, 'port') + add(params, this, 'application_name') + add(params, this, 'fallback_application_name') + add(params, this, 'connect_timeout') + add(params, this, 'options') + + var ssl = typeof this.ssl === 'object' ? this.ssl : this.ssl ? { sslmode: this.ssl } : {} + add(params, ssl, 'sslmode') + add(params, ssl, 'sslca') + add(params, ssl, 'sslkey') + add(params, ssl, 'sslcert') + add(params, ssl, 'sslrootcert') + + if (this.database) { + params.push('dbname=' + quoteParamValue(this.database)) + } + if (this.replication) { + params.push('replication=' + quoteParamValue(this.replication)) + } + if (this.host) { + params.push('host=' + quoteParamValue(this.host)) + } + if (this.isDomainSocket) { + return cb(null, params.join(' ')) + } + if (this.client_encoding) { + params.push('client_encoding=' + quoteParamValue(this.client_encoding)) + } + dns.lookup(this.host, function (err, address) { + if (err) return cb(err, null) + params.push('hostaddr=' + quoteParamValue(address)) + return cb(null, params.join(' ')) + }) + } +} + +module.exports = ConnectionParameters diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/connection.js b/server/node_modules/pg-promise/node_modules/pg/lib/connection.js new file mode 100644 index 0000000..ebb2f09 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/connection.js @@ -0,0 +1,221 @@ +'use strict' + +var net = require('net') +var EventEmitter = require('events').EventEmitter + +const { parse, serialize } = require('pg-protocol') + +const flushBuffer = serialize.flush() +const syncBuffer = serialize.sync() +const endBuffer = serialize.end() + +// TODO(bmc) support binary mode at some point +class Connection extends EventEmitter { + constructor(config) { + super() + config = config || {} + this.stream = config.stream || new net.Socket() + this._keepAlive = config.keepAlive + this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis + this.lastBuffer = false + this.parsedStatements = {} + this.ssl = config.ssl || false + this._ending = false + this._emitMessage = false + var self = this + this.on('newListener', function (eventName) { + if (eventName === 'message') { + self._emitMessage = true + } + }) + } + + connect(port, host) { + var self = this + + this._connecting = true + this.stream.setNoDelay(true) + this.stream.connect(port, host) + + this.stream.once('connect', function () { + if (self._keepAlive) { + self.stream.setKeepAlive(true, self._keepAliveInitialDelayMillis) + } + self.emit('connect') + }) + + const reportStreamError = function (error) { + // errors about disconnections should be ignored during disconnect + if (self._ending && (error.code === 'ECONNRESET' || error.code === 'EPIPE')) { + return + } + self.emit('error', error) + } + this.stream.on('error', reportStreamError) + + this.stream.on('close', function () { + self.emit('end') + }) + + if (!this.ssl) { + return this.attachListeners(this.stream) + } + + this.stream.once('data', function (buffer) { + var responseCode = buffer.toString('utf8') + switch (responseCode) { + case 'S': // Server supports SSL connections, continue with a secure connection + break + case 'N': // Server does not support SSL connections + self.stream.end() + return self.emit('error', new Error('The server does not support SSL connections')) + default: + // Any other response byte, including 'E' (ErrorResponse) indicating a server error + self.stream.end() + return self.emit('error', new Error('There was an error establishing an SSL connection')) + } + var tls = require('tls') + const options = { + socket: self.stream, + } + + if (self.ssl !== true) { + Object.assign(options, self.ssl) + + if ('key' in self.ssl) { + options.key = self.ssl.key + } + } + + if (net.isIP(host) === 0) { + options.servername = host + } + try { + self.stream = tls.connect(options) + } catch (err) { + return self.emit('error', err) + } + self.attachListeners(self.stream) + self.stream.on('error', reportStreamError) + + self.emit('sslconnect') + }) + } + + attachListeners(stream) { + stream.on('end', () => { + this.emit('end') + }) + parse(stream, (msg) => { + var eventName = msg.name === 'error' ? 'errorMessage' : msg.name + if (this._emitMessage) { + this.emit('message', msg) + } + this.emit(eventName, msg) + }) + } + + requestSsl() { + this.stream.write(serialize.requestSsl()) + } + + startup(config) { + this.stream.write(serialize.startup(config)) + } + + cancel(processID, secretKey) { + this._send(serialize.cancel(processID, secretKey)) + } + + password(password) { + this._send(serialize.password(password)) + } + + sendSASLInitialResponseMessage(mechanism, initialResponse) { + this._send(serialize.sendSASLInitialResponseMessage(mechanism, initialResponse)) + } + + sendSCRAMClientFinalMessage(additionalData) { + this._send(serialize.sendSCRAMClientFinalMessage(additionalData)) + } + + _send(buffer) { + if (!this.stream.writable) { + return false + } + return this.stream.write(buffer) + } + + query(text) { + this._send(serialize.query(text)) + } + + // send parse message + parse(query) { + this._send(serialize.parse(query)) + } + + // send bind message + bind(config) { + this._send(serialize.bind(config)) + } + + // send execute message + execute(config) { + this._send(serialize.execute(config)) + } + + flush() { + if (this.stream.writable) { + this.stream.write(flushBuffer) + } + } + + sync() { + this._ending = true + this._send(flushBuffer) + this._send(syncBuffer) + } + + ref() { + this.stream.ref() + } + + unref() { + this.stream.unref() + } + + end() { + // 0x58 = 'X' + this._ending = true + if (!this._connecting || !this.stream.writable) { + this.stream.end() + return + } + return this.stream.write(endBuffer, () => { + this.stream.end() + }) + } + + close(msg) { + this._send(serialize.close(msg)) + } + + describe(msg) { + this._send(serialize.describe(msg)) + } + + sendCopyFromChunk(chunk) { + this._send(serialize.copyData(chunk)) + } + + endCopyFrom() { + this._send(serialize.copyDone()) + } + + sendCopyFail(msg) { + this._send(serialize.copyFail(msg)) + } +} + +module.exports = Connection diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/defaults.js b/server/node_modules/pg-promise/node_modules/pg/lib/defaults.js new file mode 100644 index 0000000..9384e01 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/defaults.js @@ -0,0 +1,80 @@ +'use strict' + +module.exports = { + // database host. defaults to localhost + host: 'localhost', + + // database user's name + user: process.platform === 'win32' ? process.env.USERNAME : process.env.USER, + + // name of database to connect + database: undefined, + + // database user's password + password: null, + + // a Postgres connection string to be used instead of setting individual connection items + // NOTE: Setting this value will cause it to override any other value (such as database or user) defined + // in the defaults object. + connectionString: undefined, + + // database port + port: 5432, + + // number of rows to return at a time from a prepared statement's + // portal. 0 will return all rows at once + rows: 0, + + // binary result mode + binary: false, + + // Connection pool options - see https://github.com/brianc/node-pg-pool + + // number of connections to use in connection pool + // 0 will disable connection pooling + max: 10, + + // max milliseconds a client can go unused before it is removed + // from the pool and destroyed + idleTimeoutMillis: 30000, + + client_encoding: '', + + ssl: false, + + application_name: undefined, + + fallback_application_name: undefined, + + options: undefined, + + parseInputDatesAsUTC: false, + + // max milliseconds any query using this connection will execute for before timing out in error. + // false=unlimited + statement_timeout: false, + + // Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds + // false=unlimited + idle_in_transaction_session_timeout: false, + + // max milliseconds to wait for query to complete (client side) + query_timeout: false, + + connect_timeout: 0, + + keepalives: 1, + + keepalives_idle: 0, +} + +var pgTypes = require('pg-types') +// save default parsers +var parseBigInteger = pgTypes.getTypeParser(20, 'text') +var parseBigIntegerArray = pgTypes.getTypeParser(1016, 'text') + +// parse int8 so you can get your count values as actual numbers +module.exports.__defineSetter__('parseInt8', function (val) { + pgTypes.setTypeParser(20, 'text', val ? pgTypes.getTypeParser(23, 'text') : parseBigInteger) + pgTypes.setTypeParser(1016, 'text', val ? pgTypes.getTypeParser(1007, 'text') : parseBigIntegerArray) +}) diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/index.js b/server/node_modules/pg-promise/node_modules/pg/lib/index.js new file mode 100644 index 0000000..7f02aba --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/index.js @@ -0,0 +1,55 @@ +'use strict' + +var Client = require('./client') +var defaults = require('./defaults') +var Connection = require('./connection') +var Pool = require('pg-pool') +const { DatabaseError } = require('pg-protocol') + +const poolFactory = (Client) => { + return class BoundPool extends Pool { + constructor(options) { + super(options, Client) + } + } +} + +var PG = function (clientConstructor) { + this.defaults = defaults + this.Client = clientConstructor + this.Query = this.Client.Query + this.Pool = poolFactory(this.Client) + this._pools = [] + this.Connection = Connection + this.types = require('pg-types') + this.DatabaseError = DatabaseError +} + +if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') { + module.exports = new PG(require('./native')) +} else { + module.exports = new PG(Client) + + // lazy require native module...the native module may not have installed + Object.defineProperty(module.exports, 'native', { + configurable: true, + enumerable: false, + get() { + var native = null + try { + native = new PG(require('./native')) + } catch (err) { + if (err.code !== 'MODULE_NOT_FOUND') { + throw err + } + } + + // overwrite module.exports.native so that getter is never called again + Object.defineProperty(module.exports, 'native', { + value: native, + }) + + return native + }, + }) +} diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/native/client.js b/server/node_modules/pg-promise/node_modules/pg/lib/native/client.js new file mode 100644 index 0000000..d1faeb3 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/native/client.js @@ -0,0 +1,297 @@ +'use strict' + +// eslint-disable-next-line +var Native = require('pg-native') +var TypeOverrides = require('../type-overrides') +var pkg = require('../../package.json') +var EventEmitter = require('events').EventEmitter +var util = require('util') +var ConnectionParameters = require('../connection-parameters') + +var NativeQuery = require('./query') + +var Client = (module.exports = function (config) { + EventEmitter.call(this) + config = config || {} + + this._Promise = config.Promise || global.Promise + this._types = new TypeOverrides(config.types) + + this.native = new Native({ + types: this._types, + }) + + this._queryQueue = [] + this._ending = false + this._connecting = false + this._connected = false + this._queryable = true + + // keep these on the object for legacy reasons + // for the time being. TODO: deprecate all this jazz + var cp = (this.connectionParameters = new ConnectionParameters(config)) + this.user = cp.user + + // "hiding" the password so it doesn't show up in stack traces + // or if the client is console.logged + Object.defineProperty(this, 'password', { + configurable: true, + enumerable: false, + writable: true, + value: cp.password, + }) + this.database = cp.database + this.host = cp.host + this.port = cp.port + + // a hash to hold named queries + this.namedQueries = {} +}) + +Client.Query = NativeQuery + +util.inherits(Client, EventEmitter) + +Client.prototype._errorAllQueries = function (err) { + const enqueueError = (query) => { + process.nextTick(() => { + query.native = this.native + query.handleError(err) + }) + } + + if (this._hasActiveQuery()) { + enqueueError(this._activeQuery) + this._activeQuery = null + } + + this._queryQueue.forEach(enqueueError) + this._queryQueue.length = 0 +} + +// connect to the backend +// pass an optional callback to be called once connected +// or with an error if there was a connection error +Client.prototype._connect = function (cb) { + var self = this + + if (this._connecting) { + process.nextTick(() => cb(new Error('Client has already been connected. You cannot reuse a client.'))) + return + } + + this._connecting = true + + this.connectionParameters.getLibpqConnectionString(function (err, conString) { + if (err) return cb(err) + self.native.connect(conString, function (err) { + if (err) { + self.native.end() + return cb(err) + } + + // set internal states to connected + self._connected = true + + // handle connection errors from the native layer + self.native.on('error', function (err) { + self._queryable = false + self._errorAllQueries(err) + self.emit('error', err) + }) + + self.native.on('notification', function (msg) { + self.emit('notification', { + channel: msg.relname, + payload: msg.extra, + }) + }) + + // signal we are connected now + self.emit('connect') + self._pulseQueryQueue(true) + + cb() + }) + }) +} + +Client.prototype.connect = function (callback) { + if (callback) { + this._connect(callback) + return + } + + return new this._Promise((resolve, reject) => { + this._connect((error) => { + if (error) { + reject(error) + } else { + resolve() + } + }) + }) +} + +// send a query to the server +// this method is highly overloaded to take +// 1) string query, optional array of parameters, optional function callback +// 2) object query with { +// string query +// optional array values, +// optional function callback instead of as a separate parameter +// optional string name to name & cache the query plan +// optional string rowMode = 'array' for an array of results +// } +Client.prototype.query = function (config, values, callback) { + var query + var result + var readTimeout + var readTimeoutTimer + var queryCallback + + if (config === null || config === undefined) { + throw new TypeError('Client was passed a null or undefined query') + } else if (typeof config.submit === 'function') { + readTimeout = config.query_timeout || this.connectionParameters.query_timeout + result = query = config + // accept query(new Query(...), (err, res) => { }) style + if (typeof values === 'function') { + config.callback = values + } + } else { + readTimeout = this.connectionParameters.query_timeout + query = new NativeQuery(config, values, callback) + if (!query.callback) { + let resolveOut, rejectOut + result = new this._Promise((resolve, reject) => { + resolveOut = resolve + rejectOut = reject + }) + query.callback = (err, res) => (err ? rejectOut(err) : resolveOut(res)) + } + } + + if (readTimeout) { + queryCallback = query.callback + + readTimeoutTimer = setTimeout(() => { + var error = new Error('Query read timeout') + + process.nextTick(() => { + query.handleError(error, this.connection) + }) + + queryCallback(error) + + // we already returned an error, + // just do nothing if query completes + query.callback = () => {} + + // Remove from queue + var index = this._queryQueue.indexOf(query) + if (index > -1) { + this._queryQueue.splice(index, 1) + } + + this._pulseQueryQueue() + }, readTimeout) + + query.callback = (err, res) => { + clearTimeout(readTimeoutTimer) + queryCallback(err, res) + } + } + + if (!this._queryable) { + query.native = this.native + process.nextTick(() => { + query.handleError(new Error('Client has encountered a connection error and is not queryable')) + }) + return result + } + + if (this._ending) { + query.native = this.native + process.nextTick(() => { + query.handleError(new Error('Client was closed and is not queryable')) + }) + return result + } + + this._queryQueue.push(query) + this._pulseQueryQueue() + return result +} + +// disconnect from the backend server +Client.prototype.end = function (cb) { + var self = this + + this._ending = true + + if (!this._connected) { + this.once('connect', this.end.bind(this, cb)) + } + var result + if (!cb) { + result = new this._Promise(function (resolve, reject) { + cb = (err) => (err ? reject(err) : resolve()) + }) + } + this.native.end(function () { + self._errorAllQueries(new Error('Connection terminated')) + + process.nextTick(() => { + self.emit('end') + if (cb) cb() + }) + }) + return result +} + +Client.prototype._hasActiveQuery = function () { + return this._activeQuery && this._activeQuery.state !== 'error' && this._activeQuery.state !== 'end' +} + +Client.prototype._pulseQueryQueue = function (initialConnection) { + if (!this._connected) { + return + } + if (this._hasActiveQuery()) { + return + } + var query = this._queryQueue.shift() + if (!query) { + if (!initialConnection) { + this.emit('drain') + } + return + } + this._activeQuery = query + query.submit(this) + var self = this + query.once('_done', function () { + self._pulseQueryQueue() + }) +} + +// attempt to cancel an in-progress query +Client.prototype.cancel = function (query) { + if (this._activeQuery === query) { + this.native.cancel(function () {}) + } else if (this._queryQueue.indexOf(query) !== -1) { + this._queryQueue.splice(this._queryQueue.indexOf(query), 1) + } +} + +Client.prototype.ref = function () {} +Client.prototype.unref = function () {} + +Client.prototype.setTypeParser = function (oid, format, parseFn) { + return this._types.setTypeParser(oid, format, parseFn) +} + +Client.prototype.getTypeParser = function (oid, format) { + return this._types.getTypeParser(oid, format) +} diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/native/index.js b/server/node_modules/pg-promise/node_modules/pg/lib/native/index.js new file mode 100644 index 0000000..eead422 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/native/index.js @@ -0,0 +1,2 @@ +'use strict' +module.exports = require('./client') diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/native/query.js b/server/node_modules/pg-promise/node_modules/pg/lib/native/query.js new file mode 100644 index 0000000..d06db43 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/native/query.js @@ -0,0 +1,165 @@ +'use strict' + +var EventEmitter = require('events').EventEmitter +var util = require('util') +var utils = require('../utils') + +var NativeQuery = (module.exports = function (config, values, callback) { + EventEmitter.call(this) + config = utils.normalizeQueryConfig(config, values, callback) + this.text = config.text + this.values = config.values + this.name = config.name + this.callback = config.callback + this.state = 'new' + this._arrayMode = config.rowMode === 'array' + + // if the 'row' event is listened for + // then emit them as they come in + // without setting singleRowMode to true + // this has almost no meaning because libpq + // reads all rows into memory befor returning any + this._emitRowEvents = false + this.on( + 'newListener', + function (event) { + if (event === 'row') this._emitRowEvents = true + }.bind(this) + ) +}) + +util.inherits(NativeQuery, EventEmitter) + +var errorFieldMap = { + /* eslint-disable quote-props */ + sqlState: 'code', + statementPosition: 'position', + messagePrimary: 'message', + context: 'where', + schemaName: 'schema', + tableName: 'table', + columnName: 'column', + dataTypeName: 'dataType', + constraintName: 'constraint', + sourceFile: 'file', + sourceLine: 'line', + sourceFunction: 'routine', +} + +NativeQuery.prototype.handleError = function (err) { + // copy pq error fields into the error object + var fields = this.native.pq.resultErrorFields() + if (fields) { + for (var key in fields) { + var normalizedFieldName = errorFieldMap[key] || key + err[normalizedFieldName] = fields[key] + } + } + if (this.callback) { + this.callback(err) + } else { + this.emit('error', err) + } + this.state = 'error' +} + +NativeQuery.prototype.then = function (onSuccess, onFailure) { + return this._getPromise().then(onSuccess, onFailure) +} + +NativeQuery.prototype.catch = function (callback) { + return this._getPromise().catch(callback) +} + +NativeQuery.prototype._getPromise = function () { + if (this._promise) return this._promise + this._promise = new Promise( + function (resolve, reject) { + this._once('end', resolve) + this._once('error', reject) + }.bind(this) + ) + return this._promise +} + +NativeQuery.prototype.submit = function (client) { + this.state = 'running' + var self = this + this.native = client.native + client.native.arrayMode = this._arrayMode + + var after = function (err, rows, results) { + client.native.arrayMode = false + setImmediate(function () { + self.emit('_done') + }) + + // handle possible query error + if (err) { + return self.handleError(err) + } + + // emit row events for each row in the result + if (self._emitRowEvents) { + if (results.length > 1) { + rows.forEach((rowOfRows, i) => { + rowOfRows.forEach((row) => { + self.emit('row', row, results[i]) + }) + }) + } else { + rows.forEach(function (row) { + self.emit('row', row, results) + }) + } + } + + // handle successful result + self.state = 'end' + self.emit('end', results) + if (self.callback) { + self.callback(null, results) + } + } + + if (process.domain) { + after = process.domain.bind(after) + } + + // named query + if (this.name) { + if (this.name.length > 63) { + /* eslint-disable no-console */ + console.error('Warning! Postgres only supports 63 characters for query names.') + console.error('You supplied %s (%s)', this.name, this.name.length) + console.error('This can cause conflicts and silent errors executing queries') + /* eslint-enable no-console */ + } + var values = (this.values || []).map(utils.prepareValue) + + // check if the client has already executed this named query + // if so...just execute it again - skip the planning phase + if (client.namedQueries[this.name]) { + if (this.text && client.namedQueries[this.name] !== this.text) { + const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`) + return after(err) + } + return client.native.execute(this.name, values, after) + } + // plan the named query the first time, then execute it + return client.native.prepare(this.name, this.text, values.length, function (err) { + if (err) return after(err) + client.namedQueries[self.name] = self.text + return self.native.execute(self.name, values, after) + }) + } else if (this.values) { + if (!Array.isArray(this.values)) { + const err = new Error('Query values must be an array') + return after(err) + } + var vals = this.values.map(utils.prepareValue) + client.native.query(this.text, vals, after) + } else { + client.native.query(this.text, after) + } +} diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/query.js b/server/node_modules/pg-promise/node_modules/pg/lib/query.js new file mode 100644 index 0000000..c0dfedd --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/query.js @@ -0,0 +1,234 @@ +'use strict' + +const { EventEmitter } = require('events') + +const Result = require('./result') +const utils = require('./utils') + +class Query extends EventEmitter { + constructor(config, values, callback) { + super() + + config = utils.normalizeQueryConfig(config, values, callback) + + this.text = config.text + this.values = config.values + this.rows = config.rows + this.types = config.types + this.name = config.name + this.binary = config.binary + // use unique portal name each time + this.portal = config.portal || '' + this.callback = config.callback + this._rowMode = config.rowMode + if (process.domain && config.callback) { + this.callback = process.domain.bind(config.callback) + } + this._result = new Result(this._rowMode, this.types) + + // potential for multiple results + this._results = this._result + this.isPreparedStatement = false + this._canceledDueToError = false + this._promise = null + } + + requiresPreparation() { + // named queries must always be prepared + if (this.name) { + return true + } + // always prepare if there are max number of rows expected per + // portal execution + if (this.rows) { + return true + } + // don't prepare empty text queries + if (!this.text) { + return false + } + // prepare if there are values + if (!this.values) { + return false + } + return this.values.length > 0 + } + + _checkForMultirow() { + // if we already have a result with a command property + // then we've already executed one query in a multi-statement simple query + // turn our results into an array of results + if (this._result.command) { + if (!Array.isArray(this._results)) { + this._results = [this._result] + } + this._result = new Result(this._rowMode, this.types) + this._results.push(this._result) + } + } + + // associates row metadata from the supplied + // message with this query object + // metadata used when parsing row results + handleRowDescription(msg) { + this._checkForMultirow() + this._result.addFields(msg.fields) + this._accumulateRows = this.callback || !this.listeners('row').length + } + + handleDataRow(msg) { + let row + + if (this._canceledDueToError) { + return + } + + try { + row = this._result.parseRow(msg.fields) + } catch (err) { + this._canceledDueToError = err + return + } + + this.emit('row', row, this._result) + if (this._accumulateRows) { + this._result.addRow(row) + } + } + + handleCommandComplete(msg, connection) { + this._checkForMultirow() + this._result.addCommandComplete(msg) + // need to sync after each command complete of a prepared statement + // if we were using a row count which results in multiple calls to _getRows + if (this.rows) { + connection.sync() + } + } + + // if a named prepared statement is created with empty query text + // the backend will send an emptyQuery message but *not* a command complete message + // since we pipeline sync immediately after execute we don't need to do anything here + // unless we have rows specified, in which case we did not pipeline the intial sync call + handleEmptyQuery(connection) { + if (this.rows) { + connection.sync() + } + } + + handleError(err, connection) { + // need to sync after error during a prepared statement + if (this._canceledDueToError) { + err = this._canceledDueToError + this._canceledDueToError = false + } + // if callback supplied do not emit error event as uncaught error + // events will bubble up to node process + if (this.callback) { + return this.callback(err) + } + this.emit('error', err) + } + + handleReadyForQuery(con) { + if (this._canceledDueToError) { + return this.handleError(this._canceledDueToError, con) + } + if (this.callback) { + this.callback(null, this._results) + } + this.emit('end', this._results) + } + + submit(connection) { + if (typeof this.text !== 'string' && typeof this.name !== 'string') { + return new Error('A query must have either text or a name. Supplying neither is unsupported.') + } + const previous = connection.parsedStatements[this.name] + if (this.text && previous && this.text !== previous) { + return new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`) + } + if (this.values && !Array.isArray(this.values)) { + return new Error('Query values must be an array') + } + if (this.requiresPreparation()) { + this.prepare(connection) + } else { + connection.query(this.text) + } + return null + } + + hasBeenParsed(connection) { + return this.name && connection.parsedStatements[this.name] + } + + handlePortalSuspended(connection) { + this._getRows(connection, this.rows) + } + + _getRows(connection, rows) { + connection.execute({ + portal: this.portal, + rows: rows, + }) + // if we're not reading pages of rows send the sync command + // to indicate the pipeline is finished + if (!rows) { + connection.sync() + } else { + // otherwise flush the call out to read more rows + connection.flush() + } + } + + // http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY + prepare(connection) { + // prepared statements need sync to be called after each command + // complete or when an error is encountered + this.isPreparedStatement = true + + // TODO refactor this poor encapsulation + if (!this.hasBeenParsed(connection)) { + connection.parse({ + text: this.text, + name: this.name, + types: this.types, + }) + } + + // because we're mapping user supplied values to + // postgres wire protocol compatible values it could + // throw an exception, so try/catch this section + try { + connection.bind({ + portal: this.portal, + statement: this.name, + values: this.values, + binary: this.binary, + valueMapper: utils.prepareValue, + }) + } catch (err) { + this.handleError(err, connection) + return + } + + connection.describe({ + type: 'P', + name: this.portal || '', + }) + + this._getRows(connection, this.rows) + } + + handleCopyInResponse(connection) { + connection.sendCopyFail('No source stream defined') + } + + // eslint-disable-next-line no-unused-vars + handleCopyData(msg, connection) { + // noop + } +} + +module.exports = Query diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/result.js b/server/node_modules/pg-promise/node_modules/pg/lib/result.js new file mode 100644 index 0000000..3506097 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/result.js @@ -0,0 +1,100 @@ +'use strict' + +var types = require('pg-types') + +var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/ + +// result object returned from query +// in the 'end' event and also +// passed as second argument to provided callback +class Result { + constructor(rowMode, types) { + this.command = null + this.rowCount = null + this.oid = null + this.rows = [] + this.fields = [] + this._parsers = undefined + this._types = types + this.RowCtor = null + this.rowAsArray = rowMode === 'array' + if (this.rowAsArray) { + this.parseRow = this._parseRowAsArray + } + } + + // adds a command complete message + addCommandComplete(msg) { + var match + if (msg.text) { + // pure javascript + match = matchRegexp.exec(msg.text) + } else { + // native bindings + match = matchRegexp.exec(msg.command) + } + if (match) { + this.command = match[1] + if (match[3]) { + // COMMMAND OID ROWS + this.oid = parseInt(match[2], 10) + this.rowCount = parseInt(match[3], 10) + } else if (match[2]) { + // COMMAND ROWS + this.rowCount = parseInt(match[2], 10) + } + } + } + + _parseRowAsArray(rowData) { + var row = new Array(rowData.length) + for (var i = 0, len = rowData.length; i < len; i++) { + var rawValue = rowData[i] + if (rawValue !== null) { + row[i] = this._parsers[i](rawValue) + } else { + row[i] = null + } + } + return row + } + + parseRow(rowData) { + var row = {} + for (var i = 0, len = rowData.length; i < len; i++) { + var rawValue = rowData[i] + var field = this.fields[i].name + if (rawValue !== null) { + row[field] = this._parsers[i](rawValue) + } else { + row[field] = null + } + } + return row + } + + addRow(row) { + this.rows.push(row) + } + + addFields(fieldDescriptions) { + // clears field definitions + // multiple query statements in 1 action can result in multiple sets + // of rowDescriptions...eg: 'select NOW(); select 1::int;' + // you need to reset the fields + this.fields = fieldDescriptions + if (this.fields.length) { + this._parsers = new Array(fieldDescriptions.length) + } + for (var i = 0; i < fieldDescriptions.length; i++) { + var desc = fieldDescriptions[i] + if (this._types) { + this._parsers[i] = this._types.getTypeParser(desc.dataTypeID, desc.format || 'text') + } else { + this._parsers[i] = types.getTypeParser(desc.dataTypeID, desc.format || 'text') + } + } + } +} + +module.exports = Result diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/sasl.js b/server/node_modules/pg-promise/node_modules/pg/lib/sasl.js new file mode 100644 index 0000000..c618047 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/sasl.js @@ -0,0 +1,209 @@ +'use strict' +const crypto = require('crypto') + +function startSession(mechanisms) { + if (mechanisms.indexOf('SCRAM-SHA-256') === -1) { + throw new Error('SASL: Only mechanism SCRAM-SHA-256 is currently supported') + } + + const clientNonce = crypto.randomBytes(18).toString('base64') + + return { + mechanism: 'SCRAM-SHA-256', + clientNonce, + response: 'n,,n=*,r=' + clientNonce, + message: 'SASLInitialResponse', + } +} + +function continueSession(session, password, serverData) { + if (session.message !== 'SASLInitialResponse') { + throw new Error('SASL: Last message was not SASLInitialResponse') + } + if (typeof password !== 'string') { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string') + } + if (typeof serverData !== 'string') { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string') + } + + const sv = parseServerFirstMessage(serverData) + + if (!sv.nonce.startsWith(session.clientNonce)) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce') + } else if (sv.nonce.length === session.clientNonce.length) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short') + } + + var saltBytes = Buffer.from(sv.salt, 'base64') + + var saltedPassword = Hi(password, saltBytes, sv.iteration) + + var clientKey = hmacSha256(saltedPassword, 'Client Key') + var storedKey = sha256(clientKey) + + var clientFirstMessageBare = 'n=*,r=' + session.clientNonce + var serverFirstMessage = 'r=' + sv.nonce + ',s=' + sv.salt + ',i=' + sv.iteration + + var clientFinalMessageWithoutProof = 'c=biws,r=' + sv.nonce + + var authMessage = clientFirstMessageBare + ',' + serverFirstMessage + ',' + clientFinalMessageWithoutProof + + var clientSignature = hmacSha256(storedKey, authMessage) + var clientProofBytes = xorBuffers(clientKey, clientSignature) + var clientProof = clientProofBytes.toString('base64') + + var serverKey = hmacSha256(saltedPassword, 'Server Key') + var serverSignatureBytes = hmacSha256(serverKey, authMessage) + + session.message = 'SASLResponse' + session.serverSignature = serverSignatureBytes.toString('base64') + session.response = clientFinalMessageWithoutProof + ',p=' + clientProof +} + +function finalizeSession(session, serverData) { + if (session.message !== 'SASLResponse') { + throw new Error('SASL: Last message was not SASLResponse') + } + if (typeof serverData !== 'string') { + throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string') + } + + const { serverSignature } = parseServerFinalMessage(serverData) + + if (serverSignature !== session.serverSignature) { + throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match') + } +} + +/** + * printable = %x21-2B / %x2D-7E + * ;; Printable ASCII except ",". + * ;; Note that any "printable" is also + * ;; a valid "value". + */ +function isPrintableChars(text) { + if (typeof text !== 'string') { + throw new TypeError('SASL: text must be a string') + } + return text + .split('') + .map((_, i) => text.charCodeAt(i)) + .every((c) => (c >= 0x21 && c <= 0x2b) || (c >= 0x2d && c <= 0x7e)) +} + +/** + * base64-char = ALPHA / DIGIT / "/" / "+" + * + * base64-4 = 4base64-char + * + * base64-3 = 3base64-char "=" + * + * base64-2 = 2base64-char "==" + * + * base64 = *base64-4 [base64-3 / base64-2] + */ +function isBase64(text) { + return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text) +} + +function parseAttributePairs(text) { + if (typeof text !== 'string') { + throw new TypeError('SASL: attribute pairs text must be a string') + } + + return new Map( + text.split(',').map((attrValue) => { + if (!/^.=/.test(attrValue)) { + throw new Error('SASL: Invalid attribute pair entry') + } + const name = attrValue[0] + const value = attrValue.substring(2) + return [name, value] + }) + ) +} + +function parseServerFirstMessage(data) { + const attrPairs = parseAttributePairs(data) + + const nonce = attrPairs.get('r') + if (!nonce) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing') + } else if (!isPrintableChars(nonce)) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters') + } + const salt = attrPairs.get('s') + if (!salt) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing') + } else if (!isBase64(salt)) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64') + } + const iterationText = attrPairs.get('i') + if (!iterationText) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing') + } else if (!/^[1-9][0-9]*$/.test(iterationText)) { + throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count') + } + const iteration = parseInt(iterationText, 10) + + return { + nonce, + salt, + iteration, + } +} + +function parseServerFinalMessage(serverData) { + const attrPairs = parseAttributePairs(serverData) + const serverSignature = attrPairs.get('v') + if (!serverSignature) { + throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing') + } else if (!isBase64(serverSignature)) { + throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64') + } + return { + serverSignature, + } +} + +function xorBuffers(a, b) { + if (!Buffer.isBuffer(a)) { + throw new TypeError('first argument must be a Buffer') + } + if (!Buffer.isBuffer(b)) { + throw new TypeError('second argument must be a Buffer') + } + if (a.length !== b.length) { + throw new Error('Buffer lengths must match') + } + if (a.length === 0) { + throw new Error('Buffers cannot be empty') + } + return Buffer.from(a.map((_, i) => a[i] ^ b[i])) +} + +function sha256(text) { + return crypto.createHash('sha256').update(text).digest() +} + +function hmacSha256(key, msg) { + return crypto.createHmac('sha256', key).update(msg).digest() +} + +function Hi(password, saltBytes, iterations) { + var ui1 = hmacSha256(password, Buffer.concat([saltBytes, Buffer.from([0, 0, 0, 1])])) + var ui = ui1 + for (var i = 0; i < iterations - 1; i++) { + ui1 = hmacSha256(password, ui1) + ui = xorBuffers(ui, ui1) + } + + return ui +} + +module.exports = { + startSession, + continueSession, + finalizeSession, +} diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/type-overrides.js b/server/node_modules/pg-promise/node_modules/pg/lib/type-overrides.js new file mode 100644 index 0000000..6669348 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/type-overrides.js @@ -0,0 +1,35 @@ +'use strict' + +var types = require('pg-types') + +function TypeOverrides(userTypes) { + this._types = userTypes || types + this.text = {} + this.binary = {} +} + +TypeOverrides.prototype.getOverrides = function (format) { + switch (format) { + case 'text': + return this.text + case 'binary': + return this.binary + default: + return {} + } +} + +TypeOverrides.prototype.setTypeParser = function (oid, format, parseFn) { + if (typeof format === 'function') { + parseFn = format + format = 'text' + } + this.getOverrides(format)[oid] = parseFn +} + +TypeOverrides.prototype.getTypeParser = function (oid, format) { + format = format || 'text' + return this.getOverrides(format)[oid] || this._types.getTypeParser(oid, format) +} + +module.exports = TypeOverrides diff --git a/server/node_modules/pg-promise/node_modules/pg/lib/utils.js b/server/node_modules/pg-promise/node_modules/pg/lib/utils.js new file mode 100644 index 0000000..d63fe68 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/lib/utils.js @@ -0,0 +1,187 @@ +'use strict' + +const crypto = require('crypto') + +const defaults = require('./defaults') + +function escapeElement(elementRepresentation) { + var escaped = elementRepresentation.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + + return '"' + escaped + '"' +} + +// convert a JS array to a postgres array literal +// uses comma separator so won't work for types like box that use +// a different array separator. +function arrayString(val) { + var result = '{' + for (var i = 0; i < val.length; i++) { + if (i > 0) { + result = result + ',' + } + if (val[i] === null || typeof val[i] === 'undefined') { + result = result + 'NULL' + } else if (Array.isArray(val[i])) { + result = result + arrayString(val[i]) + } else if (val[i] instanceof Buffer) { + result += '\\\\x' + val[i].toString('hex') + } else { + result += escapeElement(prepareValue(val[i])) + } + } + result = result + '}' + return result +} + +// converts values from javascript types +// to their 'raw' counterparts for use as a postgres parameter +// note: you can override this function to provide your own conversion mechanism +// for complex types, etc... +var prepareValue = function (val, seen) { + // null and undefined are both null for postgres + if (val == null) { + return null + } + if (val instanceof Buffer) { + return val + } + if (ArrayBuffer.isView(val)) { + var buf = Buffer.from(val.buffer, val.byteOffset, val.byteLength) + if (buf.length === val.byteLength) { + return buf + } + return buf.slice(val.byteOffset, val.byteOffset + val.byteLength) // Node.js v4 does not support those Buffer.from params + } + if (val instanceof Date) { + if (defaults.parseInputDatesAsUTC) { + return dateToStringUTC(val) + } else { + return dateToString(val) + } + } + if (Array.isArray(val)) { + return arrayString(val) + } + if (typeof val === 'object') { + return prepareObject(val, seen) + } + return val.toString() +} + +function prepareObject(val, seen) { + if (val && typeof val.toPostgres === 'function') { + seen = seen || [] + if (seen.indexOf(val) !== -1) { + throw new Error('circular reference detected while preparing "' + val + '" for query') + } + seen.push(val) + + return prepareValue(val.toPostgres(prepareValue), seen) + } + return JSON.stringify(val) +} + +function pad(number, digits) { + number = '' + number + while (number.length < digits) { + number = '0' + number + } + return number +} + +function dateToString(date) { + var offset = -date.getTimezoneOffset() + + var year = date.getFullYear() + var isBCYear = year < 1 + if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation + + var ret = + pad(year, 4) + + '-' + + pad(date.getMonth() + 1, 2) + + '-' + + pad(date.getDate(), 2) + + 'T' + + pad(date.getHours(), 2) + + ':' + + pad(date.getMinutes(), 2) + + ':' + + pad(date.getSeconds(), 2) + + '.' + + pad(date.getMilliseconds(), 3) + + if (offset < 0) { + ret += '-' + offset *= -1 + } else { + ret += '+' + } + + ret += pad(Math.floor(offset / 60), 2) + ':' + pad(offset % 60, 2) + if (isBCYear) ret += ' BC' + return ret +} + +function dateToStringUTC(date) { + var year = date.getUTCFullYear() + var isBCYear = year < 1 + if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation + + var ret = + pad(year, 4) + + '-' + + pad(date.getUTCMonth() + 1, 2) + + '-' + + pad(date.getUTCDate(), 2) + + 'T' + + pad(date.getUTCHours(), 2) + + ':' + + pad(date.getUTCMinutes(), 2) + + ':' + + pad(date.getUTCSeconds(), 2) + + '.' + + pad(date.getUTCMilliseconds(), 3) + + ret += '+00:00' + if (isBCYear) ret += ' BC' + return ret +} + +function normalizeQueryConfig(config, values, callback) { + // can take in strings or config objects + config = typeof config === 'string' ? { text: config } : config + if (values) { + if (typeof values === 'function') { + config.callback = values + } else { + config.values = values + } + } + if (callback) { + config.callback = callback + } + return config +} + +const md5 = function (string) { + return crypto.createHash('md5').update(string, 'utf-8').digest('hex') +} + +// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html +const postgresMd5PasswordHash = function (user, password, salt) { + var inner = md5(password + user) + var outer = md5(Buffer.concat([Buffer.from(inner), salt])) + return 'md5' + outer +} + +module.exports = { + prepareValue: function prepareValueWrapper(value) { + // this ensures that extra arguments do not get passed into prepareValue + // by accident, eg: from calling values.map(utils.prepareValue) + return prepareValue(value) + }, + normalizeQueryConfig, + postgresMd5PasswordHash, + md5, +} diff --git a/server/node_modules/pg-promise/node_modules/pg/package.json b/server/node_modules/pg-promise/node_modules/pg/package.json new file mode 100644 index 0000000..ced4570 --- /dev/null +++ b/server/node_modules/pg-promise/node_modules/pg/package.json @@ -0,0 +1,88 @@ +{ + "_from": "pg@8.7.1", + "_id": "pg@8.7.1", + "_inBundle": false, + "_integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", + "_location": "/pg-promise/pg", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pg@8.7.1", + "name": "pg", + "escapedName": "pg", + "rawSpec": "8.7.1", + "saveSpec": null, + "fetchSpec": "8.7.1" + }, + "_requiredBy": [ + "/pg-promise" + ], + "_resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", + "_shasum": "9ea9d1ec225980c36f94e181d009ab9f4ce4c471", + "_spec": "pg@8.7.1", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise", + "author": { + "name": "Brian Carlson", + "email": "brian.m.carlson@gmail.com" + }, + "bugs": { + "url": "https://github.com/brianc/node-postgres/issues" + }, + "bundleDependencies": false, + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.4.1", + "pg-protocol": "^1.5.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "deprecated": false, + "description": "PostgreSQL client - pure javascript & libpq with the same API", + "devDependencies": { + "async": "0.9.0", + "bluebird": "3.5.2", + "co": "4.6.0", + "pg-copy-streams": "0.3.0" + }, + "engines": { + "node": ">= 8.0.0" + }, + "files": [ + "lib", + "SPONSORS.md" + ], + "gitHead": "92b4d37926c276d343bfe56447ff6f526af757cf", + "homepage": "https://github.com/brianc/node-postgres", + "keywords": [ + "database", + "libpq", + "pg", + "postgre", + "postgres", + "postgresql", + "rdbms" + ], + "license": "MIT", + "main": "./lib", + "name": "pg", + "peerDependencies": { + "pg-native": ">=2.0.0" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + }, + "repository": { + "type": "git", + "url": "git://github.com/brianc/node-postgres.git", + "directory": "packages/pg" + }, + "scripts": { + "test": "make test-all" + }, + "version": "8.7.1" +} diff --git a/server/node_modules/pg-promise/package.json b/server/node_modules/pg-promise/package.json new file mode 100644 index 0000000..1c31df1 --- /dev/null +++ b/server/node_modules/pg-promise/package.json @@ -0,0 +1,91 @@ +{ + "_from": "pg-promise", + "_id": "pg-promise@10.11.1", + "_inBundle": false, + "_integrity": "sha512-HAv32WSKf2m2RqHerW5RmANn/mcXIwWXbg/gOfGQcoS0SE+8iBi3Jj4JmoR4PNzSEozo/y/npy4e6F16psOItw==", + "_location": "/pg-promise", + "_phantomChildren": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-types": "2.2.0", + "pgpass": "1.0.2" + }, + "_requested": { + "type": "tag", + "registry": true, + "raw": "pg-promise", + "name": "pg-promise", + "escapedName": "pg-promise", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/pg-promise/-/pg-promise-10.11.1.tgz", + "_shasum": "62348927da636aa74d2c20510cfbd12e85f104ae", + "_spec": "pg-promise", + "_where": "/home/sigonasr2/divar/server", + "author": { + "name": "Vitaly Tomilov", + "email": "vitaly.tomilov@gmail.com" + }, + "bugs": { + "url": "https://github.com/vitaly-t/pg-promise/issues", + "email": "vitaly.tomilov@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "assert-options": "0.7.0", + "pg": "8.7.1", + "pg-minify": "1.6.2", + "spex": "3.2.0" + }, + "deprecated": false, + "description": "PostgreSQL interface for Node.js", + "devDependencies": { + "@types/node": "16.11.0", + "JSONStream": "1.3.5", + "bluebird": "3.7.2", + "coveralls": "3.1.1", + "eslint": "8.0.1", + "istanbul": "0.4.5", + "jasmine-node": "3.0.0", + "jsdoc": "3.6.7", + "pg-query-stream": "4.2.1", + "tslint": "6.1.3", + "typescript": "4.4.4" + }, + "engines": { + "node": ">=8.0" + }, + "files": [ + "lib", + "typescript" + ], + "homepage": "https://github.com/vitaly-t/pg-promise", + "keywords": [ + "pg", + "promise", + "postgres" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "pg-promise", + "repository": { + "type": "git", + "url": "git+https://github.com/vitaly-t/pg-promise.git" + }, + "scripts": { + "coverage": "istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test", + "doc": "jsdoc -c ./jsdoc/jsdoc.js ./jsdoc/README.md -t ./jsdoc/templates/custom", + "lint": "eslint ./lib ./test/*.js ./test/db --fix", + "test": "jasmine-node --captureExceptions test", + "test:native": "jasmine-node test --config PG_NATIVE true", + "tslint": "tslint ./typescript/*.ts" + }, + "typings": "typescript/pg-promise.d.ts", + "version": "10.11.1" +} diff --git a/server/node_modules/pg-promise/typescript/README.MD b/server/node_modules/pg-promise/typescript/README.MD new file mode 100644 index 0000000..5e17233 --- /dev/null +++ b/server/node_modules/pg-promise/typescript/README.MD @@ -0,0 +1,63 @@ +## TypeScript for pg-promise + +Complete TypeScript declarations for [pg-promise]. + +### Inclusion + +Typescript should be able to pick up the definitions without any manual configuration. + +### Simple Usage + +```ts +import * as pgPromise from 'pg-promise'; + +const pgp = pgPromise({/* Initialization Options */}); + +const db = pgp('postgres://username:password@host:port/database'); + +const {value} = await db.one('SELECT 123 as value'); +``` + +#### With Extensions + +The library supports dynamic protocol extensions, via event [extend], which requires +explicit extension interface to be declared and parameterized, as shown below. + +```ts +import * as pgPromise from 'pg-promise'; + +// your protocol extensions: +interface IExtensions { + findUser(userId: number): Promise; +} + +// pg-promise initialization options: +const options: pgPromise.IInitOptions = { + extend(obj) { + obj.findUser = userId => { + return obj.one('SELECT * FROM Users WHERE id = $1', [userId]); + } + } +}; + +// initializing the library: +const pgp = pgPromise(options); + +// database object: +const db = pgp('postgres://username:password@host:port/database'); + +// protocol is extended on each level: +const user = await db.findUser(123); + +// ...including inside tasks and transactions: +await db.task(async t => { + const user = await t.findUser(123); + // ...etc +}); +``` + +For a comprehensive example, check out [pg-promise-demo]. + +[pg-promise-demo]:https://github.com/vitaly-t/pg-promise-demo +[extend]:http://vitaly-t.github.io/pg-promise/global.html#event:extend +[pg-promise]:https://github.com/vitaly-t/pg-promise diff --git a/server/node_modules/pg-promise/typescript/pg-promise.d.ts b/server/node_modules/pg-promise/typescript/pg-promise.d.ts new file mode 100644 index 0000000..1d4ffa6 --- /dev/null +++ b/server/node_modules/pg-promise/typescript/pg-promise.d.ts @@ -0,0 +1,702 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +///////////////////////////////////////// +// Requires pg-promise v10.5.0 or later. +///////////////////////////////////////// + +// We use ES6 as static promise here, because generic promises are still not supported. +// Follow the links below: +// http://stackoverflow.com/questions/36593087/using-a-custom-promise-as-a-generic-type +// https://github.com/Microsoft/TypeScript/issues/1213 +type XPromise = Promise; + +import * as pg from './pg-subset'; +import * as pgMinify from 'pg-minify'; +import * as spexLib from 'spex'; + +// Main protocol of the library; +// API: http://vitaly-t.github.io/pg-promise/module-pg-promise.html +declare namespace pgPromise { + + interface IQueryFileOptions { + debug?: boolean + minify?: boolean | 'after' + compress?: boolean + params?: any + noWarnings?: boolean + } + + interface IFormattingOptions { + capSQL?: boolean + partial?: boolean + def?: any + } + + interface ILostContext { + cn: string + dc: any + start: Date + client: C + } + + interface IConnectionOptions { + direct?: boolean + + onLost?(err: any, e: ILostContext): void + } + + interface IPreparedStatement { + name?: string + text?: string | QueryFile + values?: any[] + binary?: boolean + rowMode?: 'array' | null | void + rows?: number + } + + interface IParameterizedQuery { + text?: string | QueryFile + values?: any[] + binary?: boolean + rowMode?: void | 'array' + } + + interface IPreparedParsed { + name: string + text: string + values: any[] + binary: boolean + rowMode: void | 'array' + rows: number + } + + interface IParameterizedParsed { + text: string + values: any[] + binary: boolean + rowMode: void | 'array' + } + + interface IColumnDescriptor { + source: T + name: string + value: any + exists: boolean + } + + interface IColumnConfig { + name: string + prop?: string + mod?: FormattingFilter + cast?: string + cnd?: boolean + def?: any + + init?(col: IColumnDescriptor): any + + skip?(col: IColumnDescriptor): boolean + } + + interface IColumnSetOptions { + table?: string | ITable | TableName + inherit?: boolean + } + + interface ITable { + table: string + schema?: string + } + + interface IPromiseConfig { + create(resolve: (value?: any) => void, reject?: (reason?: any) => void): XPromise + + resolve(value?: any): void + + reject(reason?: any): void + + all(iterable: any): XPromise + } + + type FormattingFilter = '^' | '~' | '#' | ':raw' | ':alias' | ':name' | ':json' | ':csv' | ':list' | ':value'; + + type QueryColumns = Column | ColumnSet | Array | Column>; + + type QueryParam = + string + | QueryFile + | IPreparedStatement + | IParameterizedQuery + | PreparedStatement + | ParameterizedQuery + | ((values?: any) => QueryParam); + + type ValidSchema = string | string[] | null | void; + + // helpers.TableName class; + // API: http://vitaly-t.github.io/pg-promise/helpers.TableName.html + class TableName { + constructor(table: string | ITable) + + // these are all read-only: + readonly name: string; + readonly table: string; + readonly schema: string; + + toString(): string + } + + // helpers.Column class; + // API: http://vitaly-t.github.io/pg-promise/helpers.Column.html + class Column { + constructor(col: string | IColumnConfig); + + // these are all read-only: + readonly name: string; + readonly prop: string; + readonly mod: FormattingFilter; + readonly cast: string; + readonly cnd: boolean; + readonly def: any; + readonly castText: string; + readonly escapedName: string; + readonly init: (col: IColumnDescriptor) => any + readonly skip: (col: IColumnDescriptor) => boolean + + toString(level?: number): string + } + + // helpers.Column class; + // API: http://vitaly-t.github.io/pg-promise/helpers.ColumnSet.html + class ColumnSet { + constructor(columns: Column, options?: IColumnSetOptions) + constructor(columns: Array | Column>, options?: IColumnSetOptions) + constructor(columns: object, options?: IColumnSetOptions) + + readonly columns: Column[]; + readonly names: string; + readonly table: TableName; + readonly variables: string; + + assign(source?: { source?: object, prefix?: string }): string + + assignColumns(options?: { from?: string, to?: string, skip?: string | string[] | ((c: Column) => boolean) }): string + + extend(columns: Column | ColumnSet | Array | Column>): ColumnSet + + merge(columns: Column | ColumnSet | Array | Column>): ColumnSet + + prepare(obj: object): object + + toString(level?: number): string + } + + const minify: typeof pgMinify; + + // Query Result Mask; + // API: http://vitaly-t.github.io/pg-promise/global.html#queryResult + enum queryResult { + one = 1, + many = 2, + none = 4, + any = 6 + } + + // PreparedStatement class; + // API: http://vitaly-t.github.io/pg-promise/PreparedStatement.html + class PreparedStatement { + + constructor(options?: IPreparedStatement) + + // standard properties: + name: string; + text: string | QueryFile; + values: any[]; + + // advanced properties: + binary: boolean; + rowMode: void | 'array'; + rows: number; + + parse(): IPreparedParsed | errors.PreparedStatementError + + toString(level?: number): string + } + + // ParameterizedQuery class; + // API: http://vitaly-t.github.io/pg-promise/ParameterizedQuery.html + class ParameterizedQuery { + + constructor(options?: string | QueryFile | IParameterizedQuery) + + // standard properties: + text: string | QueryFile; + values: any[]; + + // advanced properties: + binary: boolean; + rowMode: void | 'array'; + + parse(): IParameterizedParsed | errors.ParameterizedQueryError + + toString(level?: number): string + } + + // QueryFile class; + // API: http://vitaly-t.github.io/pg-promise/QueryFile.html + class QueryFile { + constructor(file: string, options?: IQueryFileOptions) + + readonly error: Error; + readonly file: string; + readonly options: any; + + prepare(): void + + toString(level?: number): string + } + + // PromiseAdapter class; + // API: http://vitaly-t.github.io/pg-promise/PromiseAdapter.html + class PromiseAdapter { + constructor(api: IPromiseConfig) + } + + const txMode: ITXMode; + const utils: IUtils; + const as: IFormatting; + + // Database full protocol; + // API: http://vitaly-t.github.io/pg-promise/Database.html + // + // We export this interface only to be able to help IntelliSense cast extension types correctly, + // which doesn't always work, depending on the version of IntelliSense being used. + interface IDatabase extends IBaseProtocol { + connect(options?: IConnectionOptions): XPromise> + + ///////////////////////////////////////////////////////////////////////////// + // Hidden, read-only properties, for integrating with third-party libraries: + + readonly $config: ILibConfig + readonly $cn: string | pg.IConnectionParameters + readonly $dc: any + readonly $pool: pg.IPool + } + + interface IResultExt extends pg.IResult { + // Property 'duration' exists only in the following context: + // - for single-query events 'receive' + // - for method Database.result + duration?: number + } + + // Post-initialization interface; + // API: http://vitaly-t.github.io/pg-promise/module-pg-promise.html + interface IMain { + (cn: string | pg.IConnectionParameters, dc?: any): IDatabase & T + + readonly PromiseAdapter: typeof PromiseAdapter + readonly PreparedStatement: typeof PreparedStatement + readonly ParameterizedQuery: typeof ParameterizedQuery + readonly QueryFile: typeof QueryFile + readonly queryResult: typeof queryResult + readonly minify: typeof pgMinify + readonly spex: spexLib.ISpex + readonly errors: typeof errors + readonly utils: IUtils + readonly txMode: ITXMode + readonly helpers: IHelpers + readonly as: IFormatting + readonly pg: typeof pg + + end(): void + } + + // Additional methods available inside tasks + transactions; + // API: http://vitaly-t.github.io/pg-promise/Task.html + interface ITask extends IBaseProtocol, spexLib.ISpexBase { + readonly ctx: ITaskContext + } + + // Base database protocol + // API: http://vitaly-t.github.io/pg-promise/Database.html + interface IBaseProtocol { + + // API: http://vitaly-t.github.io/pg-promise/Database.html#query + query(query: QueryParam, values?: any, qrm?: queryResult): XPromise + + // result-specific methods; + + // API: http://vitaly-t.github.io/pg-promise/Database.html#none + none(query: QueryParam, values?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#one + one(query: QueryParam, values?: any, cb?: (value: any) => T, thisArg?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#oneOrNone + oneOrNone(query: QueryParam, values?: any, cb?: (value: any) => T, thisArg?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#many + many(query: QueryParam, values?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#manyOrNone + manyOrNone(query: QueryParam, values?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#any + any(query: QueryParam, values?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#result + result(query: QueryParam, values?: any, cb?: (value: IResultExt) => T, thisArg?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#multiResult + multiResult(query: QueryParam, values?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#multi + multi(query: QueryParam, values?: any): XPromise> + + // API: http://vitaly-t.github.io/pg-promise/Database.html#stream + stream(qs: NodeJS.ReadableStream, init: (stream: NodeJS.ReadableStream) => void): XPromise<{ processed: number, duration: number }> + + // API: http://vitaly-t.github.io/pg-promise/Database.html#func + func(funcName: string, values?: any, qrm?: queryResult): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#proc + proc(procName: string, values?: any, cb?: (value: any) => T, thisArg?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#map + map(query: QueryParam, values: any, cb: (row: any, index: number, data: any[]) => T, thisArg?: any): XPromise + + // API: http://vitaly-t.github.io/pg-promise/Database.html#each + each(query: QueryParam, values: any, cb: (row: any, index: number, data: any[]) => void, thisArg?: any): XPromise + + // Tasks; + // API: http://vitaly-t.github.io/pg-promise/Database.html#task + task(cb: (t: ITask & Ext) => T | XPromise): XPromise + + task(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise + + task(options: { tag?: any }, cb: (t: ITask & Ext) => T | XPromise): XPromise + + // Conditional Tasks; + // API: http://vitaly-t.github.io/pg-promise/Database.html#taskIf + taskIf(cb: (t: ITask & Ext) => T | XPromise): XPromise + + taskIf(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise + + taskIf(options: { tag?: any, cnd?: boolean | ((t: ITask & Ext) => boolean) }, cb: (t: ITask & Ext) => T | XPromise): XPromise + + // Transactions; + // API: http://vitaly-t.github.io/pg-promise/Database.html#tx + tx(cb: (t: ITask & Ext) => T | XPromise): XPromise + + tx(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise + + tx(options: { tag?: any, mode?: TransactionMode | null }, cb: (t: ITask & Ext) => T | XPromise): XPromise + + // Conditional Transactions; + // API: http://vitaly-t.github.io/pg-promise/Database.html#txIf + txIf(cb: (t: ITask & Ext) => T | XPromise): XPromise + + txIf(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise + + txIf(options: { tag?: any, mode?: TransactionMode | null, reusable?: boolean | ((t: ITask & Ext) => boolean), cnd?: boolean | ((t: ITask & Ext) => boolean) }, cb: (t: ITask & Ext) => T | XPromise): XPromise + } + + // Database object in connected state; + // API: https://vitaly-t.github.io/pg-promise/Database.html#connect + interface IConnected extends IBaseProtocol, spexLib.ISpexBase { + readonly client: C + + // Note that for normal connections (working with the pool), method `done` accepts `kill` + // flag to terminate the connection within the pool, so it can be auto-recreated; + // And in this case the method returns nothing / void. + + // But for direct connections (connect({direct: true})), `kill` flag is ignored, because + // the connection is always closed physically, which may take time, and so in this case + // the method returns a Promise, to indicate when the connection finished closing. + done(kill?: boolean): void | XPromise; + + // Repeated calls are not allowed, and will throw an error. + } + + // Event context extension for tasks + transactions; + // See: http://vitaly-t.github.io/pg-promise/global.html#TaskContext + interface ITaskContext { + + // these are set in the beginning of each task/transaction: + readonly context: any + readonly parent: ITaskContext | null + readonly connected: boolean + readonly inTransaction: boolean + readonly level: number + readonly useCount: number + readonly isTX: boolean + readonly start: Date + readonly tag: any + readonly dc: any + + // these are set at the end of each task/transaction: + readonly finish?: Date + readonly duration?: number + readonly success?: boolean + readonly result?: any + + // this exists only inside transactions (isTX = true): + readonly txLevel?: number + + // Version of PostgreSQL Server to which we are connected; + // This property is not available with Native Bindings! + readonly serverVersion: string + } + + // Generic Event Context interface; + // See: http://vitaly-t.github.io/pg-promise/global.html#EventContext + interface IEventContext { + client: C + cn: any + dc: any + query: any + params: any + ctx: ITaskContext + } + + // Errors namespace + // API: http://vitaly-t.github.io/pg-promise/errors.html + namespace errors { + // QueryResultError interface; + // API: http://vitaly-t.github.io/pg-promise/errors.QueryResultError.html + class QueryResultError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + result: pg.IResult; + received: number; + code: queryResultErrorCode; + query: string; + values: any; + + // API: http://vitaly-t.github.io/pg-promise/errors.QueryResultError.html#toString + toString(): string + } + + // QueryFileError interface; + // API: http://vitaly-t.github.io/pg-promise/errors.QueryFileError.html + class QueryFileError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + file: string; + options: IQueryFileOptions; + error: pgMinify.SQLParsingError; + + toString(level?: number): string + } + + // PreparedStatementError interface; + // API: http://vitaly-t.github.io/pg-promise/errors.PreparedStatementError.html + class PreparedStatementError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + error: QueryFileError; + + toString(level?: number): string + } + + // ParameterizedQueryError interface; + // API: http://vitaly-t.github.io/pg-promise/errors.ParameterizedQueryError.html + class ParameterizedQueryError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + error: QueryFileError; + + toString(level?: number): string + } + + // Query Result Error Code; + // API: http://vitaly-t.github.io/pg-promise/errors.html#.queryResultErrorCode + enum queryResultErrorCode { + noData = 0, + notEmpty = 1, + multiple = 2 + } + } + + // Transaction Isolation Level; + // API: http://vitaly-t.github.io/pg-promise/txMode.html#.isolationLevel + enum isolationLevel { + none = 0, + serializable = 1, + repeatableRead = 2, + readCommitted = 3 + } + + // TransactionMode class; + // API: http://vitaly-t.github.io/pg-promise/txMode.TransactionMode.html + class TransactionMode { + constructor(options?: { tiLevel?: isolationLevel, readOnly?: boolean, deferrable?: boolean }) + + begin(cap?: boolean): string + } + + // Library's Initialization Options + // API: http://vitaly-t.github.io/pg-promise/module-pg-promise.html + interface IInitOptions { + noWarnings?: boolean + pgFormatting?: boolean + pgNative?: boolean + promiseLib?: any + noLocking?: boolean + capSQL?: boolean + schema?: ValidSchema | ((dc: any) => ValidSchema) + + connect?(client: C, dc: any, useCount: number): void + + disconnect?(client: C, dc: any): void + + query?(e: IEventContext): void + + // NOTE: result is undefined when data comes from QueryStream, i.e. via method Database.stream + receive?(data: any[], result: IResultExt | void, e: IEventContext): void + + task?(e: IEventContext): void + + transact?(e: IEventContext): void + + error?(err: any, e: IEventContext): void + + extend?(obj: IDatabase & Ext, dc: any): void + } + + // API: http://vitaly-t.github.io/pg-promise/Database.html#$config + interface ILibConfig { + version: string + promiseLib: any + promise: IGenericPromise + options: IInitOptions + pgp: IMain + $npm: any + } + + // Custom-Type Formatting object + // API: https://github.com/vitaly-t/pg-promise#custom-type-formatting + interface ICTFObject { + toPostgres(a: any): any + } + + // Query formatting namespace; + // API: http://vitaly-t.github.io/pg-promise/formatting.html + interface IFormatting { + + ctf: { toPostgres: symbol, rawType: symbol } + + alias(name: string | (() => string)): string + + array(arr: any[] | (() => any[]), options?: { capSQL?: boolean }): string + + bool(value: any | (() => any)): string + + buffer(obj: object | (() => object), raw?: boolean): string + + csv(values: any | (() => any)): string + + date(d: Date | (() => Date), raw?: boolean): string + + format(query: string | QueryFile | ICTFObject, values?: any, options?: IFormattingOptions): string + + func(func: (cc: any) => any, raw?: boolean, cc?: any): string + + json(data: any | (() => any), raw?: boolean): string + + name(name: any | (() => any)): string + + number(value: number | bigint | (() => number | bigint)): string + + text(value: any | (() => any), raw?: boolean): string + + value(value: any | (() => any)): string + } + + // Transaction Mode namespace; + // API: http://vitaly-t.github.io/pg-promise/txMode.html + interface ITXMode { + isolationLevel: typeof isolationLevel + TransactionMode: typeof TransactionMode + } + + interface ITaskArguments extends IArguments { + options: { tag?: any, cnd?: any, mode?: TransactionMode | null } & T + + cb(): any + } + + // General-purpose functions + // API: http://vitaly-t.github.io/pg-promise/utils.html + interface IUtils { + camelize(text: string): string + + camelizeVar(text: string): string + + enumSql(dir: string, options?: { recursive?: boolean, ignoreErrors?: boolean }, cb?: (file: string, name: string, path: string) => any): any + + taskArgs(args: IArguments): ITaskArguments + } + + // Query Formatting Helpers + // API: http://vitaly-t.github.io/pg-promise/helpers.html + interface IHelpers { + + concat(queries: Array): string + + insert(data: object | object[], columns?: QueryColumns | null, table?: string | ITable | TableName): string + + update(data: object | object[], columns?: QueryColumns | null, table?: string | ITable | TableName, options?: { tableAlias?: string, valueAlias?: string, emptyUpdate?: any }): any + + values(data: object | object[], columns?: QueryColumns | null): string + + sets(data: object, columns?: QueryColumns | null): string + + Column: typeof Column + ColumnSet: typeof ColumnSet + TableName: typeof TableName + } + + interface IGenericPromise { + (cb: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void): XPromise + + resolve(value?: any): void + + reject(reason?: any): void + + all(iterable: any): XPromise + } +} + +// Default library interface (before initialization) +// API: http://vitaly-t.github.io/pg-promise/module-pg-promise.html +declare function pgPromise(options?: pgPromise.IInitOptions): pgPromise.IMain + +export = pgPromise; diff --git a/server/node_modules/pg-promise/typescript/pg-subset.d.ts b/server/node_modules/pg-promise/typescript/pg-subset.d.ts new file mode 100644 index 0000000..0e70593 --- /dev/null +++ b/server/node_modules/pg-promise/typescript/pg-subset.d.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) 2015-present, Vitaly Tomilov + * + * See the LICENSE file at the top-level directory of this distribution + * for licensing information. + * + * Removal or modification of this copyright notice is prohibited. + */ + +////////////////////////////////////////////////////////////////////////////// +// Declaring only a subset of the 'pg' module that's useful within pg-promise. +// +// Calling it 'pg-subset' to avoid a conflict in case the application also +// includes the official 'pg' typings. +// +// Supported version of pg: 8.7.1 and later. +// +// pg: https://github.com/brianc/node-postgres +////////////////////////////////////////////////////////////////////////////// + +import {EventEmitter} from 'events'; +import {checkServerIdentity} from 'tls'; + +declare namespace pg { + + import Socket = NodeJS.Socket; + + interface IColumn { + name: string + oid: number + dataTypeID: number + + // NOTE: properties below are not available within Native Bindings: + + tableID: number + columnID: number + dataTypeSize: number + dataTypeModifier: number + format: string + } + + interface IResult { + command: string + rowCount: number + rows: any[] + fields: IColumn[] + + // properties below are not available within Native Bindings: + rowAsArray: boolean + + _types: { + _types: any, + text: any, + binary: any + }; + _parsers: Array; + } + + // SSL configuration; + // For property types and documentation see: + // http://nodejs.org/api/tls.html#tls_tls_connect_options_callback + interface ISSLConfig { + ca?: string | Buffer | Array + pfx?: string | Buffer | Array + cert?: string | Buffer | Array + key?: string | Buffer | Array + passphrase?: string + rejectUnauthorized?: boolean + checkServerIdentity?: typeof checkServerIdentity + secureOptions?: number + NPNProtocols?: string[] | Buffer | Buffer[] | Uint8Array | Uint8Array[] + } + + type DynamicPassword = string | (() => string) | (() => Promise); + + // See: + // 1) https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/defaults.js + // 2) https://github.com/brianc/node-pg-pool + interface IConnectionParameters { + connectionString?: string + host?: string + database?: string + user?: string + password?: DynamicPassword + port?: number + ssl?: boolean | ISSLConfig + binary?: boolean + client_encoding?: string + encoding?: string + application_name?: string + fallback_application_name?: string + isDomainSocket?: boolean + max?: number + maxUses?: number + idleTimeoutMillis?: number + parseInputDatesAsUTC?: boolean + rows?: number + statement_timeout?: boolean | number + query_timeout?: boolean | number + connectionTimeoutMillis?: number + keepAliveInitialDelayMillis?: number + keepAlive?: boolean + keepalives?: number + keepalives_idle?: number + Client?: new(config: string | IConnectionParameters) => C + Promise?: any + types?: ITypeOverrides + allowExitOnIdle?: boolean + } + + // Type id-s supported by PostgreSQL, copied from: + // http://github.com/brianc/node-pg-types/blob/master/lib/builtins.js + enum TypeId { + BOOL = 16, + BYTEA = 17, + CHAR = 18, + INT8 = 20, + INT2 = 21, + INT4 = 23, + REGPROC = 24, + TEXT = 25, + OID = 26, + TID = 27, + XID = 28, + CID = 29, + JSON = 114, + XML = 142, + PG_NODE_TREE = 194, + SMGR = 210, + PATH = 602, + POLYGON = 604, + CIDR = 650, + FLOAT4 = 700, + FLOAT8 = 701, + ABSTIME = 702, + RELTIME = 703, + TINTERVAL = 704, + CIRCLE = 718, + MACADDR8 = 774, + MONEY = 790, + MACADDR = 829, + INET = 869, + ACLITEM = 1033, + BPCHAR = 1042, + VARCHAR = 1043, + DATE = 1082, + TIME = 1083, + TIMESTAMP = 1114, + TIMESTAMPTZ = 1184, + INTERVAL = 1186, + TIMETZ = 1266, + BIT = 1560, + VARBIT = 1562, + NUMERIC = 1700, + REFCURSOR = 1790, + REGPROCEDURE = 2202, + REGOPER = 2203, + REGOPERATOR = 2204, + REGCLASS = 2205, + REGTYPE = 2206, + UUID = 2950, + TXID_SNAPSHOT = 2970, + PG_LSN = 3220, + PG_NDISTINCT = 3361, + PG_DEPENDENCIES = 3402, + TSVECTOR = 3614, + TSQUERY = 3615, + GTSVECTOR = 3642, + REGCONFIG = 3734, + REGDICTIONARY = 3769, + JSONB = 3802, + REGNAMESPACE = 4089, + REGROLE = 4096 + } + + type ParserFormat = 'text' | 'binary'; + + // Interface for TypeOverrides; + // See: https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/type-overrides.js + interface ITypeOverrides { + setTypeParser(id: TypeId, parseFn: string | ((value: string) => any)): void + + setTypeParser(id: TypeId, format: ParserFormat, parseFn: string | ((value: string) => any)): void + + getTypeParser(id: TypeId, format?: ParserFormat): any + } + + // Interface of 'pg-types' module; + // See: https://github.com/brianc/node-pg-types + interface ITypes extends ITypeOverrides { + arrayParser(source: string, transform: (entry: any) => any): any[] + + builtins: typeof TypeId + } + + interface IDefaults { + + // connection string for overriding defaults + connectionString: string + + // database host. defaults to localhost + host: string + + // database user's name + user: string + + // name of database to connect + database: string + + // database user's password + password: DynamicPassword + + // database port + port: number + + // number of rows to return at a time from a prepared statement's + // portal. 0 will return all rows at once + rows: number + + // binary result mode + binary: boolean + + // Connection pool options - see https://github.com/brianc/node-pg-pool + + // number of connections to use in connection pool + // 0 will disable connection pooling + max: number + + // max milliseconds a client can go unused before it is removed from the pool and destroyed; + // + // Made unavailable in v10.5.0, due to the following: + // - https://github.com/brianc/node-postgres/issues/2139 + // - https://github.com/vitaly-t/pg-promise/issues/703 + // + // idleTimeoutMillis: number + + client_encoding: string + + ssl: boolean | ISSLConfig + + application_name: string + + fallback_application_name: string + + parseInputDatesAsUTC: boolean + + // max milliseconds any query using this connection will execute for before timing out in error. + // false=unlimited + statement_timeout: boolean | number + + // max milliseconds to wait for query to complete (client side) + query_timeout: boolean | number + + keepalives: number + + keepalives_idle: number + } + + // interface IPool, as per the following implementation: + // https://github.com/brianc/node-postgres/blob/master/packages/pg-pool/index.js#L61 + // NOTE: We declare only what can be used from pg-promise + interface IPool extends EventEmitter { + end(): Promise; + + end(cb: (err: Error) => any): any; + + readonly options: { [name: string]: any }; // connection options + + readonly ended: boolean; + readonly ending: boolean; + + readonly waitingCount: number; + readonly idleCount: number; + readonly totalCount: number; + } + + interface IQuery { + // this type is not used within pg-promise; + } + + interface IConnection extends EventEmitter { + /* + While there are many other properties exist within the connection, + the only one that may be remotely useful is the stream, to be able + to listen to its events, from within a custom Client class. + */ + stream: Socket + } + + interface IClient extends EventEmitter { + + query(config: any, values: any[], callback: (err: Error, result: IResult) => void): undefined + + query(config: any, callback: (err: Error, result: IResult) => void): undefined + + query(config: any, values: any[]): Promise + + query(config: any): Promise + + connectionParameters: IConnectionParameters + database: string + user: string + password: DynamicPassword + port: number + host: string + + ////////////////////////////////////////////////////////////// + // Properties below are not available within Native Bindings: + + readonly serverVersion: string // PostgreSQL Server to which the client is connected + + connection: IConnection + queryQueue: IQuery[] + binary: boolean + ssl: boolean | ISSLConfig + secretKey: number + processID: number + encoding: string + readyForQuery: boolean + activeQuery: IQuery + } + + const defaults: IDefaults; + const types: ITypes; + const Client: new(config: string | IConnectionParameters) => IClient; +} + +export = pg; diff --git a/server/node_modules/pg-promise/typescript/tslint.json b/server/node_modules/pg-promise/typescript/tslint.json new file mode 100644 index 0000000..85fe422 --- /dev/null +++ b/server/node_modules/pg-promise/typescript/tslint.json @@ -0,0 +1,21 @@ +{ + "rules": { + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "quotemark": [ + true, + "single" + ], + "class-name": true, + "interface-name": [ + true, + "always-prefix" + ], + "no-consecutive-blank-lines": true + } +} \ No newline at end of file diff --git a/server/node_modules/spex/README.md b/server/node_modules/spex/README.md new file mode 100644 index 0000000..585d702 --- /dev/null +++ b/server/node_modules/spex/README.md @@ -0,0 +1,87 @@ +# Specialized Promise Extensions + +[![Build Status](https://travis-ci.org/vitaly-t/spex.svg?branch=master)](https://travis-ci.org/vitaly-t/spex) +[![Coverage Status](https://coveralls.io/repos/vitaly-t/spex/badge.svg?branch=master)](https://coveralls.io/r/vitaly-t/spex?branch=master) +[![Join the chat at https://gitter.im/vitaly-t/spex](https://badges.gitter.im/vitaly-t/spex.svg)](https://gitter.im/vitaly-t/spex?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +[batch], [page], [sequence] - promise methods for the following patterns: +* [Data Throttling & Load Balancing](http://vitaly-t.github.io/spex/tutorial-throttling.html) +* [Linked and Detached Sequencing](http://vitaly-t.github.io/spex/tutorial-sequencing.html) +* [Streaming and Paging](http://vitaly-t.github.io/spex/tutorial-streaming.html) +* [Batch Processing](http://vitaly-t.github.io/spex/tutorial-batch.html) + +## Installing + +``` +$ npm i spex +``` + +## Usage + +* For any [Promises/A+] library: [Promise], [Bluebird], [When], [Q], [RSVP], etc. + +```js +const promise = require('bluebird'); +const spex = require('spex')(promise); +``` + +* For ES6 Promise: + +```js +const spex = require('spex')(Promise); +``` + +See also: [client-side usage](http://vitaly-t.github.io/spex/tutorial-client.html). + +## API + +* [Module] +* Methods + - [batch] + - [page] + - [sequence] + - [stream](http://vitaly-t.github.io/spex/stream.html) + - [read] + +## Testing + +* Clone the repository (or download, if you prefer): + +``` +$ git clone https://github.com/vitaly-t/spex +``` + +* Install the library's DEV dependencies: + +``` +$ npm install +``` + +* To run all tests: + +``` +$ npm test +``` + +* To run all tests with coverage: + +``` +$ npm run coverage +``` + +## License + +Copyright © 2020 [Vitaly Tomilov](https://github.com/vitaly-t); +Released under the MIT license. + +[Module]:http://vitaly-t.github.io/spex/index.html +[batch]:http://vitaly-t.github.io/spex/global.html#batch +[page]:http://vitaly-t.github.io/spex/global.html#page +[sequence]:http://vitaly-t.github.io/spex/global.html#sequence +[read]:http://vitaly-t.github.io/spex/stream.html#.read +[Promises/A+]:https://promisesaplus.com/ +[Promise]:https://github.com/then/promise +[Bluebird]:https://github.com/petkaantonov/bluebird +[When]:https://github.com/cujojs/when +[Q]:https://github.com/kriskowal/q +[RSVP]:https://github.com/tildeio/rsvp.js diff --git a/server/node_modules/spex/lib/adapter.js b/server/node_modules/spex/lib/adapter.js new file mode 100644 index 0000000..55484ec --- /dev/null +++ b/server/node_modules/spex/lib/adapter.js @@ -0,0 +1,68 @@ +/** + * @class PromiseAdapter + * @description + * Adapter for the primary promise operations. + * + * Provides compatibility with promise libraries that cannot be recognized automatically, + * via functions that implement the primary operations with promises: + * + * - construct a new promise with a callback function + * - resolve a promise with some result data + * - reject a promise with a reason + * + * #### Example + * + * Below is an example of setting up a [client-side]{@tutorial client} adapter for AngularJS $q. + * + * ```js + * const spexLib = require('spex'); // or include client-side spex.js + * + * const adapter = new spexLib.PromiseAdapter( + * cb => $q(cb), // creating a new promise; + * data => $q.when(data), // resolving a promise; + * reason => $q.reject(reason) // rejecting a promise; + * ); + * + * const spex = spexLib(adapter); + * ``` + * + * @param {Function} create + * A function that takes a callback parameter and returns a new promise object. + * The callback parameter is expected to be `function(resolve, reject)`. + * + * Passing in anything other than a function will throw `Adapter requires a function to create a promise.` + * + * @param {Function} resolve + * A function that takes an optional data parameter and resolves a promise with it. + * + * Passing in anything other than a function will throw `Adapter requires a function to resolve a promise.` + * + * @param {Function} reject + * A function that takes an optional error parameter and rejects a promise with it. + * + * Passing in anything other than a function will throw `Adapter requires a function to reject a promise.` + * + * @see {@tutorial client} + * + */ +class PromiseAdapter { + constructor(create, resolve, reject) { + this.create = create; + this.resolve = resolve; + this.reject = reject; + + if (typeof create !== 'function') { + throw new TypeError('Adapter requires a function to create a promise.'); + } + + if (typeof resolve !== 'function') { + throw new TypeError('Adapter requires a function to resolve a promise.'); + } + + if (typeof reject !== 'function') { + throw new TypeError('Adapter requires a function to reject a promise.'); + } + } +} + +module.exports = PromiseAdapter; diff --git a/server/node_modules/spex/lib/errors/batch.js b/server/node_modules/spex/lib/errors/batch.js new file mode 100644 index 0000000..35cb5e7 --- /dev/null +++ b/server/node_modules/spex/lib/errors/batch.js @@ -0,0 +1,173 @@ +const npm = { + u: require('util'), + os: require('os'), + utils: require('../utils/static') +}; + +/** + * @class errors.BatchError + * @augments external:Error + * @description + * This type represents all errors rejected by method {@link batch}, except for {@link external:TypeError TypeError} + * when the method receives invalid input parameters. + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `BatchError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * It represents the message of the first error encountered in the batch, and is a safe + * version of using `first.message`. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {array} data + * Array of objects `{success, result, [origin]}`: + * - `success` = true/false, indicates whether the corresponding value in the input array was resolved. + * - `result` = resolved data, if `success`=`true`, or else the rejection reason. + * - `origin` - set only when failed as a result of an unsuccessful call into the notification callback + * (parameter `cb` of method {@link batch}) + * + * The array has the same size as the input one that was passed into method {@link batch}, providing direct mapping. + * + * @property {} stat + * Resolution Statistics. + * + * @property {number} stat.total + * Total number of elements in the batch. + * + * @property {number} stat.succeeded + * Number of resolved values in the batch. + * + * @property {number} stat.failed + * Number of rejected values in the batch. + * + * @property {number} stat.duration + * Time in milliseconds it took to settle all values. + * + * @property {} first + * The very first error within the batch, with support for nested batch results, it is also the same error + * as $[promise.all] would provide. + * + * @see {@link batch} + * + */ +class BatchError extends Error { + + constructor(result, errors, duration) { + + function getErrors() { + const err = new Array(errors.length); + for (let i = 0; i < errors.length; i++) { + err[i] = result[errors[i]].result; + if (err[i] instanceof BatchError) { + err[i] = err[i].getErrors(); + } + } + npm.utils.extend(err, '$isErrorList', true); + return err; + } + + const e = getErrors(); + + let first = e[0]; + + while (first && first.$isErrorList) { + first = first[0]; + } + + let message; + + if (first instanceof Error) { + message = first.message; + } else { + if (typeof first !== 'string') { + first = npm.u.inspect(first); + } + message = first; + } + + super(message); + this.name = this.constructor.name; + + this.data = result; + + // we do not show it within the inspect, because when the error + // happens for a nested result, the output becomes a mess. + this.first = first; + + this.stat = { + total: result.length, + succeeded: result.length - e.length, + failed: e.length, + duration: duration + }; + + this.getErrors = getErrors; + + Error.captureStackTrace(this, this.constructor); + } + + /** + * @method errors.BatchError.getErrors + * @description + * Returns the complete list of errors only. + * + * It supports nested batch results, presented as a sub-array. + * + * @returns {array} + */ +} + +/** + * @method errors.BatchError.toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * The output is an abbreviated version of the error, because the complete error + * is often too much for displaying or even logging, as a batch can be of any size. + * Therefore, only errors are rendered from the `data` property, alongside their indexes, + * and only up to the first 5, to avoid polluting the screen or the log file. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +BatchError.prototype.toString = function (level) { + level = level > 0 ? parseInt(level) : 0; + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + gap2 = npm.utils.messageGap(level + 2), + lines = [ + 'BatchError {', + gap1 + 'stat: { total: ' + this.stat.total + ', succeeded: ' + this.stat.succeeded + + ', failed: ' + this.stat.failed + ', duration: ' + this.stat.duration + ' }', + gap1 + 'errors: [' + ]; + + // In order to avoid polluting the error log or the console, + // we limit the log output to the top 5 errors: + const maxErrors = 5; + let counter = 0; + this.data.forEach((d, index) => { + if (!d.success && counter < maxErrors) { + lines.push(gap2 + index + ': ' + npm.utils.formatError(d.result, level + 2)); + counter++; + } + }); + lines.push(gap1 + ']'); + lines.push(gap0 + '}'); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(BatchError, function () { + return this.toString(); +}); + +module.exports = {BatchError}; + diff --git a/server/node_modules/spex/lib/errors/index.js b/server/node_modules/spex/lib/errors/index.js new file mode 100644 index 0000000..ca1776a --- /dev/null +++ b/server/node_modules/spex/lib/errors/index.js @@ -0,0 +1,36 @@ +const {BatchError} = require('./batch'); +const {PageError} = require('./page'); +const {SequenceError} = require('./sequence'); + + +/** + * @namespace errors + * @description + * Namespace for all custom error types supported by the library. + * + * In addition to the custom error type used by each method (regular error), they can also reject with + * {@link external:TypeError TypeError} when receiving invalid input parameters. + * + * @property {function} BatchError + * {@link errors.BatchError BatchError} class. + * + * Represents regular errors that can be reported by method {@link batch}. + * + * @property {function} PageError + * {@link errors.PageError PageError} class. + * + * Represents regular errors that can be reported by method {@link page}. + * + * @property {function} SequenceError + * {@link errors.SequenceError SequenceError} class. + * + * Represents regular errors that can be reported by method {@link sequence}. + * + */ +module.exports = { + BatchError, + PageError, + SequenceError +}; + +Object.freeze(module.exports); diff --git a/server/node_modules/spex/lib/errors/page.js b/server/node_modules/spex/lib/errors/page.js new file mode 100644 index 0000000..a112380 --- /dev/null +++ b/server/node_modules/spex/lib/errors/page.js @@ -0,0 +1,135 @@ +const npm = { + u: require('util'), + os: require('os'), + utils: require('../utils/static') +}; + +const errorReasons = { + 0: 'Page with index %d rejected.', + 1: 'Source %s returned a rejection at index %d.', + 2: 'Source %s threw an error at index %d.', + 3: 'Destination %s returned a rejection at index %d.', + 4: 'Destination %s threw an error at index %d.', + 5: 'Source %s returned a non-array value at index %d.' +}; + +/** + * @class errors.PageError + * @augments external:Error + * @description + * This type represents all errors rejected by method {@link page}, except for {@link external:TypeError TypeError} + * when the method receives invalid input parameters. + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `PageError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {} error + * The error that was thrown, or the rejection reason. + * + * @property {number} index + * Index of the element in the sequence for which the error/rejection occurred. + * + * @property {number} duration + * Duration (in milliseconds) of processing until the error/rejection occurred. + * + * @property {string} reason + * Textual explanation of why the method failed. + * + * @property {} source + * Resolved `data` parameter that was passed into the `source` function. + * + * It is only set when the error/rejection occurred inside the `source` function. + * + * @property {} dest + * Resolved `data` parameter that was passed into the `dest` function. + * + * It is only set when the error/rejection occurred inside the `dest` function. + * + * @see + * {@link page}, + * {@link batch} + * + */ +class PageError extends Error { + + constructor(e, code, cbName, duration) { + + let message; + if (e.error instanceof Error) { + message = e.error.message; + } else { + message = e.error; + if (typeof message !== 'string') { + message = npm.u.inspect(message); + } + } + super(message); + this.name = this.constructor.name; + + this.index = e.index; + this.duration = duration; + this.error = e.error; + + if ('source' in e) { + this.source = e.source; + } + + if ('dest' in e) { + this.dest = e.dest; + } + + if (code) { + cbName = cbName ? ('\'' + cbName + '\'') : ''; + this.reason = npm.u.format(errorReasons[code], cbName, e.index); + } else { + this.reason = npm.u.format(errorReasons[code], e.index); + } + + Error.captureStackTrace(this, this.constructor); + } + +} + +/** + * @method errors.PageError.toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +PageError.prototype.toString = function (level) { + + level = level > 0 ? parseInt(level) : 0; + + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + 'PageError {', + gap1 + 'message: ' + JSON.stringify(this.message), + gap1 + 'reason: ' + this.reason, + gap1 + 'index: ' + this.index, + gap1 + 'duration: ' + this.duration + ]; + + lines.push(gap1 + 'error: ' + npm.utils.formatError(this.error, level + 1)); + lines.push(gap0 + '}'); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(PageError, function () { + return this.toString(); +}); + +module.exports = {PageError}; + diff --git a/server/node_modules/spex/lib/errors/sequence.js b/server/node_modules/spex/lib/errors/sequence.js new file mode 100644 index 0000000..08765cc --- /dev/null +++ b/server/node_modules/spex/lib/errors/sequence.js @@ -0,0 +1,125 @@ +const npm = { + u: require('util'), + os: require('os'), + utils: require('../utils/static') +}; + +const errorReasons = { + 0: 'Source %s returned a rejection at index %d.', + 1: 'Source %s threw an error at index %d.', + 2: 'Destination %s returned a rejection at index %d.', + 3: 'Destination %s threw an error at index %d.' +}; + +/** + * @class errors.SequenceError + * @augments external:Error + * @description + * This type represents all errors rejected by method {@link sequence}, except for {@link external:TypeError TypeError} + * when the method receives invalid input parameters. + * + * @property {string} name + * Standard {@link external:Error Error} property - error type name = `SequenceError`. + * + * @property {string} message + * Standard {@link external:Error Error} property - the error message. + * + * @property {string} stack + * Standard {@link external:Error Error} property - the stack trace. + * + * @property {} error + * The error that was thrown or the rejection reason. + * + * @property {number} index + * Index of the element in the sequence for which the error/rejection occurred. + * + * @property {number} duration + * Duration (in milliseconds) of processing until the error/rejection occurred. + * + * @property {string} reason + * Textual explanation of why the method failed. + * + * @property {} source + * Resolved `data` parameter that was passed into the `source` function. + * + * It is only set when the error/rejection occurred inside the `source` function. + * + * @property {} dest + * Resolved `data` parameter that was passed into the `dest` function. + * + * It is only set when the error/rejection occurred inside the `dest` function. + * + * @see {@link sequence} + * + */ +class SequenceError extends Error { + + constructor(e, code, cbName, duration) { + + let message; + if (e.error instanceof Error) { + message = e.error.message; + } else { + message = e.error; + if (typeof message !== 'string') { + message = npm.u.inspect(message); + } + } + + super(message); + this.name = this.constructor.name; + + this.index = e.index; + this.duration = duration; + this.error = e.error; + + if ('source' in e) { + this.source = e.source; + } else { + this.dest = e.dest; + } + + cbName = cbName ? ('\'' + cbName + '\'') : ''; + this.reason = npm.u.format(errorReasons[code], cbName, e.index); + + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @method errors.SequenceError.toString + * @description + * Creates a well-formatted multi-line string that represents the error. + * + * It is called automatically when writing the object into the console. + * + * @param {number} [level=0] + * Nested output level, to provide visual offset. + * + * @returns {string} + */ +SequenceError.prototype.toString = function (level) { + + level = level > 0 ? parseInt(level) : 0; + + const gap0 = npm.utils.messageGap(level), + gap1 = npm.utils.messageGap(level + 1), + lines = [ + 'SequenceError {', + gap1 + 'message: ' + JSON.stringify(this.message), + gap1 + 'reason: ' + this.reason, + gap1 + 'index: ' + this.index, + gap1 + 'duration: ' + this.duration + ]; + + lines.push(gap1 + 'error: ' + npm.utils.formatError(this.error, level + 1)); + lines.push(gap0 + '}'); + return lines.join(npm.os.EOL); +}; + +npm.utils.addInspection(SequenceError, function () { + return this.toString(); +}); + +module.exports = {SequenceError}; + diff --git a/server/node_modules/spex/lib/ext/batch.js b/server/node_modules/spex/lib/ext/batch.js new file mode 100644 index 0000000..3b10b2e --- /dev/null +++ b/server/node_modules/spex/lib/ext/batch.js @@ -0,0 +1,151 @@ +const {BatchError} = require('../errors/batch'); + +/** + * @method batch + * @description + * Settles (resolves or rejects) every [mixed value]{@tutorial mixed} in the input array. + * + * The method resolves with an array of results, the same as the standard $[promise.all], + * while providing comprehensive error details in case of a reject, in the form of + * type {@link errors.BatchError BatchError}. + * + * @param {Array} values + * Array of [mixed values]{@tutorial mixed} (it can be empty), to be resolved asynchronously, in no particular order. + * + * Passing in anything other than an array will reject with {@link external:TypeError TypeError} = + * `Method 'batch' requires an array of values.` + * + * @param {Object} [options] + * Optional Parameters. + * + * @param {Function|generator} [options.cb] + * Optional callback (or generator) to receive the result for each settled value. + * + * Callback Parameters: + * - `index` = index of the value in the source array + * - `success` - indicates whether the value was resolved (`true`), or rejected (`false`) + * - `result` = resolved data, if `success`=`true`, or else the rejection reason + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * The function inherits `this` context from the calling method. + * + * It can optionally return a promise to indicate that notifications are handled asynchronously. + * And if the returned promise resolves, it signals a successful handling, while any resolved + * data is ignored. + * + * If the function returns a rejected promise or throws an error, the entire method rejects + * with {@link errors.BatchError BatchError} where the corresponding value in property `data` + * is set to `{success, result, origin}`: + * - `success` = `false` + * - `result` = the rejection reason or the error thrown by the notification callback + * - `origin` = the original data passed into the callback as object `{success, result}` + * + * @returns {external:Promise} + * + * The method resolves with an array of individual resolved results, the same as the standard $[promise.all]. + * In addition, the array is extended with a hidden read-only property `duration` - number of milliseconds + * spent resolving all the data. + * + * The method rejects with {@link errors.BatchError BatchError} when any of the following occurs: + * - one or more values rejected or threw an error while being resolved as a [mixed value]{@tutorial mixed} + * - notification callback `cb` returned a rejected promise or threw an error + * + */ +function batch(values, options, config) { + + const $p = config.promise, utils = config.utils; + + if (!Array.isArray(values)) { + return $p.reject(new TypeError('Method \'batch\' requires an array of values.')); + } + + if (!values.length) { + const empty = []; + utils.extend(empty, 'duration', 0); + return $p.resolve(empty); + } + + options = options || {}; + + const cb = utils.wrap(options.cb), + self = this, start = Date.now(); + + return $p((resolve, reject) => { + let cbTime, remaining = values.length; + const errors = [], result = new Array(remaining); + values.forEach((item, i) => { + utils.resolve.call(self, item, null, data => { + result[i] = data; + step(i, true, data); + }, reason => { + result[i] = {success: false, result: reason}; + errors.push(i); + step(i, false, reason); + }); + }); + + function step(idx, pass, data) { + if (cb) { + const cbNow = Date.now(), + cbDelay = idx ? (cbNow - cbTime) : undefined; + let cbResult; + cbTime = cbNow; + try { + cbResult = cb.call(self, idx, pass, data, cbDelay); + } catch (e) { + setError(e); + } + if (utils.isPromise(cbResult)) { + cbResult + .then(check) + .catch(error => { + setError(error); + check(); + }); + } else { + check(); + } + } else { + check(); + } + + function setError(e) { + const r = pass ? {success: false} : result[idx]; + if (pass) { + result[idx] = r; + errors.push(idx); + } + r.result = e; + r.origin = {success: pass, result: data}; + } + + function check() { + if (!--remaining) { + if (errors.length) { + errors.sort(); + if (errors.length < result.length) { + for (let i = 0, k = 0; i < result.length; i++) { + if (i === errors[k]) { + k++; + } else { + result[i] = {success: true, result: result[i]}; + } + } + } + reject(new BatchError(result, errors, Date.now() - start)); + } else { + utils.extend(result, 'duration', Date.now() - start); + resolve(result); + } + } + return null; // this dummy return is just to prevent Bluebird warnings; + } + } + }); +} + +module.exports = function (config) { + return function (values, options) { + return batch.call(this, values, options, config); + }; +}; diff --git a/server/node_modules/spex/lib/ext/page.js b/server/node_modules/spex/lib/ext/page.js new file mode 100644 index 0000000..f42ec01 --- /dev/null +++ b/server/node_modules/spex/lib/ext/page.js @@ -0,0 +1,182 @@ +const {PageError} = require('../errors/page'); + +/** + * @method page + * @description + * Resolves a dynamic sequence of pages/arrays with [mixed values]{@tutorial mixed}. + * + * The method acquires pages (arrays of [mixed values]{@tutorial mixed}) from the `source` function, one by one, + * and resolves each page as a {@link batch}, till no more pages left or an error/reject occurs. + * + * @param {Function|generator} source + * Expected to return a [mixed value]{@tutorial mixed} that resolves with the next page of data (array of [mixed values]{@tutorial mixed}). + * Returning or resolving with `undefined` ends the sequence, and the method resolves. + * + * The function inherits `this` context from the calling method. + * + * Parameters: + * - `index` = index of the page being requested + * - `data` = previously returned page, resolved as a {@link batch} (`undefined` when `index=0`) + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * If the function throws an error or returns a rejected promise, the method rejects with + * {@link errors.PageError PageError}, which will have property `source` set. + * + * And if the function returns or resolves with anything other than an array or `undefined`, + * the method rejects with the same {@link errors.PageError PageError}, but with `error` set to + * `Unexpected data returned from the source.` + * + * Passing in anything other than a function will reject with {@link external:TypeError TypeError} = `Parameter 'source' must be a function.` + * + * @param {Object} [options] + * Optional Parameters. + * + * @param {Function|generator} [options.dest] + * Optional destination function (or generator), to receive a resolved {@link batch} of data + * for each page, process it and respond as required. + * + * Parameters: + * - `index` = page index in the sequence + * - `data` = page data resolved as a {@link batch} + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * The function inherits `this` context from the calling method. + * + * It can optionally return a promise object, if notifications are handled asynchronously. + * And if a promise is returned, the method will not request another page from the `source` + * function until the promise has been resolved. + * + * If the function throws an error or returns a rejected promise, the sequence terminates, + * and the method rejects with {@link errors.PageError PageError}, which will have property `dest` set. + * + * @param {Number} [options.limit=0] + * Limits the maximum number of pages to be requested from the `source`. If the value is greater + * than 0, the method will successfully resolve once the specified limit has been reached. + * + * When `limit` isn't specified (default), the sequence is unlimited, and it will continue + * till one of the following occurs: + * - `source` returns or resolves with `undefined` or an invalid value (non-array) + * - either `source` or `dest` functions throw an error or return a rejected promise + * + * @returns {external:Promise} + * + * When successful, the method resolves with object `{pages, total, duration}`: + * - `pages` = number of pages resolved + * - `total` = the sum of all page sizes (total number of values resolved) + * - `duration` = number of milliseconds consumed by the method + * + * When the method fails, it rejects with {@link errors.PageError PageError}. + * + */ +function page(source, options, config) { + + const $p = config.promise, spex = config.spex, utils = config.utils; + + if (typeof source !== 'function') { + return $p.reject(new TypeError('Parameter \'source\' must be a function.')); + } + + options = options || {}; + source = utils.wrap(source); + + const limit = (options.limit > 0) ? parseInt(options.limit) : 0, + dest = utils.wrap(options.dest), self = this, start = Date.now(); + let request, srcTime, destTime, total = 0; + + return $p((resolve, reject) => { + + function loop(idx) { + const srcNow = Date.now(), + srcDelay = idx ? (srcNow - srcTime) : undefined; + srcTime = srcNow; + utils.resolve.call(self, source, [idx, request, srcDelay], value => { + if (value === undefined) { + success(); + } else { + if (value instanceof Array) { + spex.batch(value) + .then(data => { + request = data; + total += data.length; + if (dest) { + const destNow = Date.now(), + destDelay = idx ? (destNow - destTime) : undefined; + let destResult; + destTime = destNow; + try { + destResult = dest.call(self, idx, data, destDelay); + } catch (err) { + fail({ + error: err, + dest: data + }, 4, dest.name); + return; + } + if (utils.isPromise(destResult)) { + destResult + .then(next) + .catch(error => { + fail({ + error: error, + dest: data + }, 3, dest.name); + }); + } else { + next(); + } + } else { + next(); + } + return null; // this dummy return is just to prevent Bluebird warnings; + }) + .catch(error => { + fail({ + error: error + }, 0); + }); + } else { + fail({ + error: new Error('Unexpected data returned from the source.'), + source: request + }, 5, source.name); + } + } + }, (reason, isRej) => { + fail({ + error: reason, + source: request + }, isRej ? 1 : 2, source.name); + }); + + function next() { + if (limit === ++idx) { + success(); + } else { + loop(idx); + } + return null; // this dummy return is just to prevent Bluebird warnings; + } + + function success() { + resolve({ + pages: idx, + total: total, + duration: Date.now() - start + }); + } + + function fail(reason, code, cbName) { + reason.index = idx; + reject(new PageError(reason, code, cbName, Date.now() - start)); + } + } + + loop(0); + }); +} + +module.exports = function (config) { + return function (source, options) { + return page.call(this, source, options, config); + }; +}; diff --git a/server/node_modules/spex/lib/ext/sequence.js b/server/node_modules/spex/lib/ext/sequence.js new file mode 100644 index 0000000..50b51f7 --- /dev/null +++ b/server/node_modules/spex/lib/ext/sequence.js @@ -0,0 +1,194 @@ +const {SequenceError} = require('../errors/sequence'); + +/** + * @method sequence + * @description + * Resolves a dynamic sequence of [mixed values]{@tutorial mixed}. + * + * The method acquires [mixed values]{@tutorial mixed} from the `source` function, one at a time, and resolves them, + * till either no more values left in the sequence or an error/reject occurs. + * + * It supports both [linked and detached sequencing]{@tutorial sequencing}. + * + * @param {Function|generator} source + * Expected to return the next [mixed value]{@tutorial mixed} to be resolved. Returning or resolving + * with `undefined` ends the sequence, and the method resolves. + * + * Parameters: + * - `index` = current request index in the sequence + * - `data` = resolved data from the previous call (`undefined` when `index=0`) + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * The function inherits `this` context from the calling method. + * + * If the function throws an error or returns a rejected promise, the sequence terminates, + * and the method rejects with {@link errors.SequenceError SequenceError}, which will have property `source` set. + * + * Passing in anything other than a function will reject with {@link external:TypeError TypeError} = `Parameter 'source' must be a function.` + * + * @param {Object} [options] + * Optional Parameters. + * + * @param {Function|generator} [options.dest=null] + * Optional destination function (or generator), to receive resolved data for each index, + * process it and respond as required. + * + * Parameters: + * - `index` = index of the resolved data in the sequence + * - `data` = the data resolved + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * The function inherits `this` context from the calling method. + * + * It can optionally return a promise object, if data processing is done asynchronously. + * If a promise is returned, the method will not request another value from the `source` function, + * until the promise has been resolved (the resolved value is ignored). + * + * If the function throws an error or returns a rejected promise, the sequence terminates, + * and the method rejects with {@link errors.SequenceError SequenceError}, which will have property `dest` set. + * + * @param {Number} [options.limit=0] + * Limits the maximum size of the sequence. If the value is greater than 0, the method will + * successfully resolve once the specified limit has been reached. + * + * When `limit` isn't specified (default), the sequence is unlimited, and it will continue + * till one of the following occurs: + * - `source` either returns or resolves with `undefined` + * - either `source` or `dest` functions throw an error or return a rejected promise + * + * @param {Boolean} [options.track=false] + * Changes the type of data to be resolved by this method. By default, it is `false` + * (see the return result). When set to be `true`, the method tracks/collects all resolved data + * into an array internally, and resolves with that array once the method has finished successfully. + * + * It must be used with caution, as to the size of the sequence, because accumulating data for + * a very large sequence can result in consuming too much memory. + * + * @returns {external:Promise} + * + * When successful, the resolved data depends on parameter `track`. When `track` is `false` + * (default), the method resolves with object `{total, duration}`: + * - `total` = number of values resolved by the sequence + * - `duration` = number of milliseconds consumed by the method + * + * When `track` is `true`, the method resolves with an array of all the data that has been resolved, + * the same way that the standard $[promise.all] resolves. In addition, the array comes extended with + * a hidden read-only property `duration` - number of milliseconds consumed by the method. + * + * When the method fails, it rejects with {@link errors.SequenceError SequenceError}. + */ +function sequence(source, options, config) { + + const $p = config.promise, utils = config.utils; + + if (typeof source !== 'function') { + return $p.reject(new TypeError('Parameter \'source\' must be a function.')); + } + + source = utils.wrap(source); + + options = options || {}; + + const limit = (options.limit > 0) ? parseInt(options.limit) : 0, + dest = utils.wrap(options.dest), + self = this, start = Date.now(); + let data, srcTime, destTime, result = []; + + return $p((resolve, reject) => { + + function loop(idx) { + const srcNow = Date.now(), + srcDelay = idx ? (srcNow - srcTime) : undefined; + srcTime = srcNow; + utils.resolve.call(self, source, [idx, data, srcDelay], (value, delayed) => { + data = value; + if (data === undefined) { + success(); + } else { + if (options.track) { + result.push(data); + } + if (dest) { + const destNow = Date.now(), + destDelay = idx ? (destNow - destTime) : undefined; + let destResult; + destTime = destNow; + try { + destResult = dest.call(self, idx, data, destDelay); + } catch (e) { + fail({ + error: e, + dest: data + }, 3, dest.name); + return; + } + if (utils.isPromise(destResult)) { + destResult + .then(() => { + next(true); + return null; // this dummy return is just to prevent Bluebird warnings; + }) + .catch(error => { + fail({ + error: error, + dest: data + }, 2, dest.name); + }); + } else { + next(delayed); + } + } else { + next(delayed); + } + } + }, (reason, isRej) => { + fail({ + error: reason, + source: data + }, isRej ? 0 : 1, source.name); + }); + + function next(delayed) { + if (limit === ++idx) { + success(); + } else { + if (delayed) { + loop(idx); + } else { + $p.resolve() + .then(() => { + loop(idx); + return null; // this dummy return is just to prevent Bluebird warnings; + }); + } + } + } + + function success() { + const length = Date.now() - start; + if (options.track) { + utils.extend(result, 'duration', length); + } else { + result = { + total: idx, + duration: length + }; + } + resolve(result); + } + + function fail(reason, code, cbName) { + reason.index = idx; + reject(new SequenceError(reason, code, cbName, Date.now() - start)); + } + } + + loop(0); + }); +} + +module.exports = function (config) { + return function (source, options) { + return sequence.call(this, source, options, config); + }; +}; diff --git a/server/node_modules/spex/lib/ext/stream/index.js b/server/node_modules/spex/lib/ext/stream/index.js new file mode 100644 index 0000000..c7878b8 --- /dev/null +++ b/server/node_modules/spex/lib/ext/stream/index.js @@ -0,0 +1,65 @@ +const npm = { + read: require('./read') +}; + +/** + * @namespace stream + * @description + * Namespace with methods that implement stream operations, and {@link stream.read read} is the only method currently supported. + * + * **Synchronous Stream Processing** + * + * ```js + * const stream = require('spex')(Promise).stream; + * const fs = require('fs'); + * + * const rs = fs.createReadStream('values.txt'); + * + * function receiver(index, data, delay) { + * console.log('RECEIVED:', index, data, delay); + * } + * + * stream.read(rs, receiver) + * .then(data => { + * console.log('DATA:', data); + * }) + * .catch(error => { + * console.log('ERROR:', error); + * }); + * ``` + * + * **Asynchronous Stream Processing** + * + * ```js + * const stream = require('spex')(Promise).stream; + * const fs = require('fs'); + * + * const rs = fs.createReadStream('values.txt'); + * + * function receiver(index, data, delay) { + * return new Promise(resolve => { + * console.log('RECEIVED:', index, data, delay); + * resolve(); + * }); + * } + * + * stream.read(rs, receiver) + * .then(data => { + * console.log('DATA:', data); + * }) + * .catch(error => { + * console.log('ERROR:', error); + * }); + * ``` + * + * @property {function} stream.read + * Consumes and processes data from a $[Readable] stream. + * + */ +module.exports = function (config) { + const res = { + read: npm.read(config) + }; + Object.freeze(res); + return res; +}; diff --git a/server/node_modules/spex/lib/ext/stream/read.js b/server/node_modules/spex/lib/ext/stream/read.js new file mode 100644 index 0000000..7abc901 --- /dev/null +++ b/server/node_modules/spex/lib/ext/stream/read.js @@ -0,0 +1,206 @@ +/** + * @method stream.read + * @description + * Consumes and processes data from a $[Readable] stream. + * + * It reads the entire stream, using either **paused mode** (default), or in chunks (see `options.readChunks`) + * with support for both synchronous and asynchronous data processing. + * + * **NOTE:** Once the method has finished, the onus is on the caller to release the stream + * according to its protocol. + * + * @param {Object} stream + * $[Readable] stream object. + * + * Passing in anything else will throw `Readable stream is required.` + * + * @param {Function|generator} receiver + * Data processing callback (or generator). + * + * Passing in anything else will throw `Invalid stream receiver.` + * + * Parameters: + * - `index` = index of the call made to the function + * - `data` = array of all data reads from the stream's buffer + * - `delay` = number of milliseconds since the last call (`undefined` when `index=0`) + * + * The function is called with the same `this` context as the calling method. + * + * It can optionally return a promise object, if data processing is asynchronous. + * And if a promise is returned, the method will not read data from the stream again, + * until the promise has been resolved. + * + * If the function throws an error or returns a rejected promise, the method rejects + * with the same error / rejection reason. + * + * @param {Object} [options] + * Optional Parameters. + * + * @param {Boolean} [options.closable=false] + * Instructs the method to resolve on event `close` supported by the stream, as opposed to event + * `end` that's used by default. + * + * @param {Boolean} [options.readChunks=false] + * By default, the method handles event `readable` of the stream to consume data in a simplified form, + * item by item. If you enable this option, the method will instead handle event `data` of the stream, + * to consume chunks of data. + * + * @param {Number} [options.readSize] + * When the value is greater than 0, it sets the read size from the stream's buffer + * when the next data is available. By default, the method uses as few reads as possible + * to get all the data currently available in the buffer. + * + * NOTE: This option is ignored when option `readChunks` is enabled. + * + * @returns {external:Promise} + * + * When finished successfully, resolves with object `{calls, reads, length, duration}`: + * - `calls` = number of calls made into the `receiver` + * - `reads` = number of successful reads from the stream + * - `length` = total length for all the data reads from the stream + * - `duration` = number of milliseconds consumed by the method + * + * When it fails, the method rejects with the error/reject specified, + * which can happen as a result of: + * - event `error` emitted by the stream + * - receiver throws an error or returns a rejected promise + */ +function read(stream, receiver, options, config) { + + const $p = config.promise, utils = config.utils; + + if (!utils.isReadableStream(stream)) { + return $p.reject(new TypeError('Readable stream is required.')); + } + + if (typeof receiver !== 'function') { + return $p.reject(new TypeError('Invalid stream receiver.')); + } + + receiver = utils.wrap(receiver); + + options = options || {}; + + const readSize = (options.readSize > 0) ? parseInt(options.readSize) : null, + self = this, start = Date.now(), receiveEvent = options.readChunks ? 'data' : 'readable'; + let cbTime, ready, waiting, stop, reads = 0, length = 0, index = 0; + + return $p((resolve, reject) => { + + function onReceive(data) { + ready = true; + process(data); + } + + function onEnd() { + if (!options.closable) { + success(); + } + } + + function onClose() { + success(); + } + + function onError(error) { + fail(error); + } + + stream.on(receiveEvent, onReceive); + stream.on('end', onEnd); + stream.on('close', onClose); + stream.on('error', onError); + + function process(data) { + if (!ready || stop || waiting) { + return; + } + ready = false; + let cache; + if (options.readChunks) { + cache = data; + // istanbul ignore else; + // we cannot test the else condition, as it requires a special broken stream interface. + if (!Array.isArray(cache)) { + cache = [cache]; + } + length += cache.length; + reads++; + } else { + cache = []; + waiting = true; + let page; + do { + page = stream.read(readSize); + if (page) { + cache.push(page); + // istanbul ignore next: requires a unique stream that + // creates objects without property `length` defined. + length += page.length || 0; + reads++; + } + } while (page); + + if (!cache.length) { + waiting = false; + return; + } + } + + const cbNow = Date.now(), + cbDelay = index ? (cbNow - cbTime) : undefined; + let result; + cbTime = cbNow; + try { + result = receiver.call(self, index++, cache, cbDelay); + } catch (e) { + fail(e); + return; + } + + if (utils.isPromise(result)) { + result + .then(() => { + waiting = false; + process(); + return null; // this dummy return is just to prevent Bluebird warnings; + }) + .catch(error => { + fail(error); + }); + } else { + waiting = false; + process(); + } + } + + function success() { + cleanup(); + resolve({ + calls: index, + reads: reads, + length: length, + duration: Date.now() - start + }); + } + + function fail(error) { + stop = true; + cleanup(); + reject(error); + } + + function cleanup() { + stream.removeListener(receiveEvent, onReceive); + stream.removeListener('close', onClose); + stream.removeListener('error', onError); + stream.removeListener('end', onEnd); + } + }); +} + +module.exports = function (config) { + return function (stream, receiver, options) { + return read.call(this, stream, receiver, options, config); + }; +}; diff --git a/server/node_modules/spex/lib/index.js b/server/node_modules/spex/lib/index.js new file mode 100644 index 0000000..77549c5 --- /dev/null +++ b/server/node_modules/spex/lib/index.js @@ -0,0 +1,123 @@ +const npm = { + utils: require('./utils'), + batch: require('./ext/batch'), + page: require('./ext/page'), + sequence: require('./ext/sequence'), + stream: require('./ext/stream'), + errors: require('./errors') +}; + +/** + * @module spex + * @summary Specialized Promise Extensions + * @author Vitaly Tomilov + * + * @description + * Attaches to an external promise library and provides additional methods built solely + * on the basic promise operations: + * - construct a new promise with a callback function + * - resolve a promise with some result data + * - reject a promise with a reason + * + * ### usage + * For any third-party promise library: + * ```js + * const promise = require('bluebird'); + * const spex = require('spex')(promise); + * ``` + * For ES6 promises: + * ```js + * const spex = require('spex')(Promise); + * ``` + * + * @param {Object|Function} promiseLib + * Instance of a promise library to be used by this module. + * + * Some implementations use `Promise` constructor to create a new promise, while + * others use the module's function for it. Both types are supported the same. + * + * Alternatively, an object of type {@link PromiseAdapter} can be passed in, which provides + * compatibility with any promise library outside of the standard. + * + * Passing in a promise library that cannot be recognized will throw + * `Invalid promise library specified.` + * + * @returns {Object} + * Namespace with all supported methods. + * + * @see {@link PromiseAdapter}, {@link batch}, {@link page}, {@link sequence}, {@link stream} + */ +function main(promiseLib) { + + const spex = {}, // library instance; + promise = parsePromiseLib(promiseLib); // promise library parsing; + + const config = { + spex: spex, + promise: promise, + utils: npm.utils(promise) + }; + + spex.errors = npm.errors; + spex.batch = npm.batch(config); + spex.page = npm.page(config); + spex.sequence = npm.sequence(config); + spex.stream = npm.stream(config); + + config.utils.extend(spex, '$p', promise); + + Object.freeze(spex); + + return spex; +} + +////////////////////////////////////////// +// Parses and validates a promise library; +function parsePromiseLib(lib) { + if (lib) { + let promise; + if (lib instanceof main.PromiseAdapter) { + promise = function (func) { + return lib.create(func); + }; + promise.resolve = lib.resolve; + promise.reject = lib.reject; + return promise; + } + const t = typeof lib; + if (t === 'function' || t === 'object') { + const Root = typeof lib.Promise === 'function' ? lib.Promise : lib; + promise = function (func) { + return new Root(func); + }; + promise.resolve = Root.resolve; + promise.reject = Root.reject; + if (typeof promise.resolve === 'function' && typeof promise.reject === 'function') { + return promise; + } + } + } + throw new TypeError('Invalid promise library specified.'); +} + +main.PromiseAdapter = require('./adapter'); +main.errors = npm.errors; + +Object.freeze(main); + +module.exports = main; + +/** + * @external Error + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error + */ + +/** + * @external TypeError + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError + */ + +/** + * @external Promise + * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise + */ diff --git a/server/node_modules/spex/lib/utils/index.js b/server/node_modules/spex/lib/utils/index.js new file mode 100644 index 0000000..1773a5a --- /dev/null +++ b/server/node_modules/spex/lib/utils/index.js @@ -0,0 +1,94 @@ +const npm = { + stat: require('./static') +}; + +module.exports = function ($p) { + + const exp = { + formatError: npm.stat.formatError, + isPromise: npm.stat.isPromise, + isReadableStream: npm.stat.isReadableStream, + messageGap: npm.stat.messageGap, + extend: npm.stat.extend, + resolve: resolve, + wrap: wrap + }; + + return exp; + + ////////////////////////////////////////// + // Checks if the function is a generator, + // and if so - wraps it up into a promise; + function wrap(func) { + if (typeof func === 'function') { + if (func.constructor.name === 'GeneratorFunction') { + return asyncAdapter(func); + } + return func; + } + return null; + } + + ///////////////////////////////////////////////////// + // Resolves a mixed value into the actual value, + // consistent with the way mixed values are defined: + // https://github.com/vitaly-t/spex/wiki/Mixed-Values + function resolve(value, params, onSuccess, onError) { + + const self = this; + let delayed = false; + + function loop() { + while (typeof value === 'function') { + if (value.constructor.name === 'GeneratorFunction') { + value = asyncAdapter(value); + } + try { + value = params ? value.apply(self, params) : value.call(self); + } catch (e) { + onError(e, false); // false means 'threw an error' + return; + } + } + if (exp.isPromise(value)) { + value + .then(data => { + delayed = true; + value = data; + loop(); + return null; // this dummy return is just to prevent Bluebird warnings; + }) + .catch(error => { + onError(error, true); // true means 'rejected' + }); + } else { + onSuccess(value, delayed); + } + } + + loop(); + } + + // Generator-to-Promise adapter; + // Based on: https://www.promisejs.org/generators/#both + function asyncAdapter(generator) { + return function () { + const g = generator.apply(this, arguments); + + function handle(result) { + if (result.done) { + return $p.resolve(result.value); + } + return $p.resolve(result.value) + .then(res => { + return handle(g.next(res)); + }, err => { + return handle(g.throw(err)); + }); + } + + return handle(g.next()); + }; + } + +}; diff --git a/server/node_modules/spex/lib/utils/static.js b/server/node_modules/spex/lib/utils/static.js new file mode 100644 index 0000000..7911984 --- /dev/null +++ b/server/node_modules/spex/lib/utils/static.js @@ -0,0 +1,75 @@ +const npm = { + stream: require('stream'), + util: require('util') +}; + +///////////////////////////////////// +// Checks if the value is a promise; +function isPromise(value) { + return value && typeof value.then === 'function'; +} + +//////////////////////////////////////////// +// Checks object for being a readable stream; + +function isReadableStream(obj) { + return obj instanceof npm.stream.Stream && + typeof obj._read === 'function' && + typeof obj._readableState === 'object'; +} + +//////////////////////////////////////////////////////////// +// Sets an object property as read-only and non-enumerable. +function extend(obj, name, value) { + Object.defineProperty(obj, name, { + value: value, + configurable: false, + enumerable: false, + writable: false + }); +} + +/////////////////////////////////////////// +// Returns a space gap for console output; +function messageGap(level) { + return ' '.repeat(level * 4); +} + +function formatError(error, level) { + const names = ['BatchError', 'PageError', 'SequenceError']; + let msg = npm.util.inspect(error); + if (error instanceof Error) { + if (names.indexOf(error.name) === -1) { + const gap = messageGap(level); + msg = msg.split('\n').map((line, index) => { + return (index ? gap : '') + line; + }).join('\n'); + } else { + msg = error.toString(level); + } + } + return msg; +} + +//////////////////////////////////////////////////////// +// Adds prototype inspection, with support of the newer +// Custom Inspection, which was added in Node.js 6.x +function addInspection(type, cb) { + // istanbul ignore next; + if (npm.util.inspect.custom) { + // Custom inspection is supported: + type.prototype[npm.util.inspect.custom] = cb; + } else { + // Use classic inspection: + type.prototype.inspect = cb; + } +} + +module.exports = { + addInspection: addInspection, + formatError: formatError, + isPromise: isPromise, + isReadableStream: isReadableStream, + messageGap: messageGap, + extend: extend +}; diff --git a/server/node_modules/spex/package.json b/server/node_modules/spex/package.json new file mode 100644 index 0000000..8e15e21 --- /dev/null +++ b/server/node_modules/spex/package.json @@ -0,0 +1,77 @@ +{ + "_from": "spex@3.2.0", + "_id": "spex@3.2.0", + "_inBundle": false, + "_integrity": "sha512-9srjJM7NaymrpwMHvSmpDeIK5GoRMX/Tq0E8aOlDPS54dDnDUIp30DrP9SphMPEETDLzEM9+4qo+KipmbtPecg==", + "_location": "/spex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "spex@3.2.0", + "name": "spex", + "escapedName": "spex", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/pg-promise" + ], + "_resolved": "https://registry.npmjs.org/spex/-/spex-3.2.0.tgz", + "_shasum": "fa4a21922407e112624977b445a6d634578a1127", + "_spec": "spex@3.2.0", + "_where": "/home/sigonasr2/divar/server/node_modules/pg-promise", + "author": { + "name": "Vitaly Tomilov", + "email": "vitaly.tomilov@gmail.com" + }, + "bugs": { + "url": "https://github.com/vitaly-t/spex/issues", + "email": "vitaly.tomilov@gmail.com" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Specialized Promise Extensions", + "devDependencies": { + "bluebird": "3.7.2", + "browserify": "17.0.0", + "coveralls": "3.1.0", + "eslint": "7.16.0", + "istanbul": "0.4.5", + "jasmine-node": "3.0.0", + "jsdoc": "3.6.6", + "typescript": "4.1.3" + }, + "engines": { + "node": ">=4.5" + }, + "files": [ + "lib", + "typescript" + ], + "homepage": "https://github.com/vitaly-t/spex", + "keywords": [ + "promise", + "throttle", + "throttling", + "load balancing" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "spex", + "repository": { + "type": "git", + "url": "git+https://github.com/vitaly-t/spex.git" + }, + "scripts": { + "browserify": "browserify lib/index.js -s spexLib -o spex.js", + "coverage": "istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test", + "doc": "jsdoc -c ./jsdoc/jsDoc.js ./jsdoc/README.md -u ./jsdoc/tutorials", + "lint": "eslint ./lib ./test/**/*.spec.js", + "test": "jasmine-node test", + "travis": "npm run lint && istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test --captureExceptions && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + }, + "typings": "typescript/spex.d.ts", + "version": "3.2.0" +} diff --git a/server/node_modules/spex/typescript/README.md b/server/node_modules/spex/typescript/README.md new file mode 100644 index 0000000..ae21ef4 --- /dev/null +++ b/server/node_modules/spex/typescript/README.md @@ -0,0 +1,27 @@ +## TypeScript for SPEX + +Complete TypeScript 3.x declarations for the [spex] module. + +### Inclusion + +Typescript should be able to pick up the definitions without any manual configuration. + +### Usage + +```ts +import * as spexLib from "spex"; + +const spex:spexLib.ISpex = spexLib(Promise); + +type BatchError = spexLib.errors.BatchError; + +spex.batch([1, 2, 3]) + .then(data => { + var r = data[0].anything; + }) + .catch(error => { + // error type is either TypeError or BatchError + }); +``` + +[spex]:https://github.com/vitaly-t/spex diff --git a/server/node_modules/spex/typescript/spex.d.ts b/server/node_modules/spex/typescript/spex.d.ts new file mode 100644 index 0000000..fb49aae --- /dev/null +++ b/server/node_modules/spex/typescript/spex.d.ts @@ -0,0 +1,176 @@ +//////////////////////////////////////// +// Requires SPEX v3.1.0 or later. +//////////////////////////////////////// + +declare namespace spex { + + interface IOriginData { + readonly success: boolean; + readonly result: any; + } + + interface IBatchData { + readonly success: boolean; + readonly result: any; + readonly origin?: IOriginData; + } + + interface IBatchStat { + readonly total: number; + readonly succeeded: number; + readonly failed: number; + readonly duration: number; + } + + interface IStreamReadOptions { + closable?: boolean; + readChunks?: boolean; + readSize?: number; + } + + interface IStreamReadResult { + readonly calls: number; + readonly reads: number; + readonly length: number; + readonly duration: number; + } + + interface IPageResult { + readonly pages: number; + readonly total: number; + readonly duration: number; + } + + interface ISequenceResult { + readonly total: number; + readonly duration: number; + } + + interface IArrayExt extends Array { + readonly duration: number; + } + + // Errors namespace + // API: http://vitaly-t.github.io/spex/errors.html + namespace errors { + // API: http://vitaly-t.github.io/spex/errors.BatchError.html + class BatchError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + data: Array; + + stat: IBatchStat; + + first: any; + + // API: http://vitaly-t.github.io/spex/errors.BatchError.html#.getErrors + getErrors(): Array; + + // API: http://vitaly-t.github.io/spex/errors.BatchError.html#.toString + toString(): string; + } + + // API: http://vitaly-t.github.io/spex/errors.PageError.html + class PageError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + error: any; + index: number; + duration: number; + reason: string; + source: any; + dest: any; + + // API: http://vitaly-t.github.io/spex/errors.PageError.html#.toString + toString(): string; + } + + // API: http://vitaly-t.github.io/spex/errors.SequenceError.html + class SequenceError extends Error { + + // standard error properties: + name: string; + message: string; + stack: string; + + // extended properties: + error: any; + index: number; + duration: number; + reason: string; + source: any; + dest: any; + + // API: http://vitaly-t.github.io/spex/errors.SequenceError.html#.toString + toString(): string; + + } + } + + // API: http://vitaly-t.github.io/spex/stream.html + interface IStream { + // API: http://vitaly-t.github.io/spex/stream.html#.read + read(stream: any, receiver: (index: number, data: Array, delay: number) => any, options?: IStreamReadOptions): Promise; + } + + // PromiseAdapter class; + // API: http://vitaly-t.github.io/spex/PromiseAdapter.html + class PromiseAdapter { + constructor(create: (cb: any) => object, resolve: (data: any) => void, reject: (reason: any) => void); + } + + // Subset of the base methods only, to be used by pg-promise + interface ISpexBase { + + // API: http://vitaly-t.github.io/spex/global.html#batch + batch(values: (T | Promise)[], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise>; + + batch(values: [T1 | Promise, T2 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise, T6 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5, T6] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise, T6 | Promise, T7 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5, T6, T7] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise, T6 | Promise, T7 | Promise, T8 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5, T6, T7, T8] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise, T6 | Promise, T7 | Promise, T8 | Promise, T9 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9] & IArrayExt>; + + batch(values: [T1 | Promise, T2 | Promise, T3 | Promise, T4 | Promise, T5 | Promise, T6 | Promise, T7 | Promise, T8 | Promise, T9 | Promise, T10 | Promise], options?: { cb?: (index: number, success: boolean, result: any, delay: number) => any }): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] & IArrayExt>; + + // API: http://vitaly-t.github.io/spex/global.html#page + page(source: (index: number, data: any, delay: number) => any, options?: { dest?: (index: number, data: any, delay: number) => any, limit?: number }): Promise; + + // API: http://vitaly-t.github.io/spex/global.html#sequence + sequence(source: (index: number, data: any, delay: number) => any, options?: { dest?: (index: number, data: any, delay: number) => any, limit?: number, track?: boolean }): Promise>; + } + + interface ISpex extends ISpexBase { + + // API: http://vitaly-t.github.io/spex/stream.html + readonly stream: IStream; + + // API: http://vitaly-t.github.io/spex/errors.html + readonly errors: typeof errors; + } + +} + +declare function spex(promise: any): spex.ISpex; + +export = spex; diff --git a/server/node_modules/unzipper/node_modules/bluebird/LICENSE b/server/node_modules/unzipper/node_modules/bluebird/LICENSE new file mode 100644 index 0000000..4182a1e --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2015 Petka Antonov + +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. diff --git a/server/node_modules/unzipper/node_modules/bluebird/README.md b/server/node_modules/unzipper/node_modules/bluebird/README.md new file mode 100644 index 0000000..3772161 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/README.md @@ -0,0 +1,51 @@ + + Promises/A+ logo + +[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird) +[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html) + +**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises) + +# Introduction + +Bluebird is a fully featured promise library with focus on innovative features and performance + +See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here. + +For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x). + +# Questions and issues + +The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. + + + +## Thanks + +Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8. + +# License + +The MIT License (MIT) + +Copyright (c) 2013-2016 Petka Antonov + +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. + diff --git a/server/node_modules/unzipper/node_modules/bluebird/changelog.md b/server/node_modules/unzipper/node_modules/bluebird/changelog.md new file mode 100644 index 0000000..73b2eb6 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/changelog.md @@ -0,0 +1 @@ +[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html) diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.js b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.js new file mode 100644 index 0000000..ffb6538 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.js @@ -0,0 +1,3739 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.4.7 + * Features enabled: core + * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + continue; + } + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +}; + +Async.prototype._drainQueues = function () { + this._drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + this._drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; + +},{"./queue":17,"./schedule":18,"./util":21}],2:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; + +},{}],3:[function(_dereq_,module,exports){ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = _dereq_("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; + +},{"./promise":15}],4:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; + +},{"./util":21}],5:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = _dereq_("./util"); +var getKeys = _dereq_("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; + +},{"./es5":10,"./util":21}],6:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; + +},{}],7:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = _dereq_("./errors").Warning; +var util = _dereq_("./util"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (true || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + async.invokeLater(this._notifyUnhandledRejection, this, undefined); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new CustomEvent(name.toLowerCase(), { + detail: event, + cancelable: true + }); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = firstLineError.stack.split("\n"); + var lastStackLines = lastLineError.stack.split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; + +},{"./errors":9,"./util":21}],8:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; + +},{}],9:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var Objectfreeze = es5.freeze; +var util = _dereq_("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; + +},{"./es5":10,"./util":21}],10:[function(_dereq_,module,exports){ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} + +},{}],11:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, tryConvertToPromise) { +var util = _dereq_("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +return PassThroughHandlerContext; +}; + +},{"./util":21}],12:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!true) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!true) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var args = [].slice.call(arguments);; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; + +},{"./util":21}],13:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; + +},{"./util":21}],14:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = _dereq_("./errors"); +var OperationalError = errors.OperationalError; +var es5 = _dereq_("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var args = [].slice.call(arguments, 1);; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; + +},{"./errors":9,"./es5":10,"./util":21}],15:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = _dereq_("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = _dereq_("./es5"); +var Async = _dereq_("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = _dereq_("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL); +var PromiseArray = + _dereq_("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = _dereq_("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = _dereq_("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + _dereq_("./finally")(Promise, tryConvertToPromise); +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = _dereq_("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + if (self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +} + +function Promise(executor) { + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + if (executor !== INTERNAL) { + check(this, executor); + this._resolveFromExecutor(executor); + } + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("expecting an object but got " + + "A catch statement predicate " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); +_dereq_("./direct_resolve")(Promise); +_dereq_("./synchronous_inspection")(Promise); +_dereq_("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.4.7"; + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; + +},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = _dereq_("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; + +},{"./util":21}],17:[function(_dereq_,module,exports){ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; + +},{}],18:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova))) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; + +},{"./util":21}],19:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + +},{}],20:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; + +},{"./util":21}],21:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var l = 8; + while (l--) new FakeConstructor(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"; +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version = process.versions.node.split(".").map(Number); + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; + +},{"./es5":10}]},{},[3])(3) +}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.min.js b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.min.js new file mode 100644 index 0000000..84bc422 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.core.min.js @@ -0,0 +1,31 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.4.7 + * Features enabled: core + * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+I.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?I.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new x(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);I.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),I.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=C(s),l=c.length-1;l>=0;--l){var u=c[l];if(!V.test(u)){var p=u.match(Q);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}tt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?w(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(I.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){B.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||k(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():I.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+T(e)+">, no stack trace)"}function T(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(nt=function(t){if(D.test(t))return!0;var e=R(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function x(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,x),e>32&&this.uncycle()}var O,A,L,N=e._getDomain,B=e._async,U=t("./errors").Warning,I=t("./util"),H=I.canAttachTrace,D=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,G=null,M=!1,W=!(0==I.env("BLUEBIRD_DEBUG")||!I.env("BLUEBIRD_DEBUG")&&"development"!==I.env("NODE_ENV")),$=!(0==I.env("BLUEBIRD_WARNINGS")||!W&&!I.env("BLUEBIRD_WARNINGS")),z=!(0==I.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!I.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=I.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!I.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=N();A="function"==typeof t?null===e?t:I.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=N();O="function"==typeof t?null===e?t:I.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),B.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&P()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!I.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!I.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),I.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!I.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return I.isNode?function(){return process.emit.apply(process,arguments)}:I.global?function(t){var e="on"+t.toLowerCase(),n=I.global[e];return n?(n.apply(I.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){B.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){B.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,X=ot.warnings,I.isObject(n)&&"wForgottenReturn"in n&&(X=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;I.inherits(x,Error),n.CapturedTrace=x,x.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;b(r),m(r),I.notEnumerableProp(t,"stack",g(n,r)),I.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,G=e;var n=Error.captureStackTrace;return nt=function(t){return D.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,G=e,M=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},I.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:I.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return z&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return f},checkForgottenReturns:d,setBounds:S,warn:y,deprecated:v,CapturedTrace:x,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":9,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return c.call(this,this.promise._target()._settledValue())}function s(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var f=n(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var h=new u("late cancellation observer");return r._attachExtraTrace(h),p.e=h,p}f.isPending()&&f._attachCancellationCallback(new i(this))}return f._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("expecting an object but got A catch statement predicate "+h.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise(); +},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=x(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,f=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),f=e),v.invoke(d,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:_})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=x(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=x(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===S?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,x(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.4.7",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(d.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return L.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.js b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.js new file mode 100644 index 0000000..dc80cb6 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.js @@ -0,0 +1,5581 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.4.7 + * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + continue; + } + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +}; + +Async.prototype._drainQueues = function () { + this._drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + this._drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; + +},{"./queue":26,"./schedule":29,"./util":36}],3:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; + +},{}],4:[function(_dereq_,module,exports){ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = _dereq_("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; + +},{"./promise":22}],5:[function(_dereq_,module,exports){ +"use strict"; +var cr = Object.create; +if (cr) { + var callerCache = cr(null); + var getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; +} + +module.exports = function(Promise) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var isIdentifier = util.isIdentifier; + +var getMethodCaller; +var getGetter; +if (!true) { +var makeMethodCaller = function (methodName) { + return new Function("ensureMethod", " \n\ + return function(obj) { \n\ + 'use strict' \n\ + var len = this.length; \n\ + ensureMethod(obj, 'methodName'); \n\ + switch(len) { \n\ + case 1: return obj.methodName(this[0]); \n\ + case 2: return obj.methodName(this[0], this[1]); \n\ + case 3: return obj.methodName(this[0], this[1], this[2]); \n\ + case 0: return obj.methodName(); \n\ + default: \n\ + return obj.methodName.apply(obj, this); \n\ + } \n\ + }; \n\ + ".replace(/methodName/g, methodName))(ensureMethod); +}; + +var makeGetter = function (propertyName) { + return new Function("obj", " \n\ + 'use strict'; \n\ + return obj.propertyName; \n\ + ".replace("propertyName", propertyName)); +}; + +var getCompiled = function(name, compiler, cache) { + var ret = cache[name]; + if (typeof ret !== "function") { + if (!isIdentifier(name)) { + return null; + } + ret = compiler(name); + cache[name] = ret; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret; +}; + +getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); +}; + +getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); +}; +} + +function ensureMethod(obj, methodName) { + var fn; + if (obj != null) fn = obj[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util.classString(obj) + " has no method '" + + util.toString(methodName) + "'"; + throw new Promise.TypeError(message); + } + return fn; +} + +function caller(obj) { + var methodName = this.pop(); + var fn = ensureMethod(obj, methodName); + return fn.apply(obj, this); +} +Promise.prototype.call = function (methodName) { + var args = [].slice.call(arguments, 1);; + if (!true) { + if (canEvaluate) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, undefined, undefined, args, undefined); + } + } + } + args.push(methodName); + return this._then(caller, undefined, undefined, args, undefined); +}; + +function namedGetter(obj) { + return obj[this]; +} +function indexedGetter(obj) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj.length); + return obj[index]; +} +Promise.prototype.get = function (propertyName) { + var isIndex = (typeof propertyName === "number"); + var getter; + if (!isIndex) { + if (canEvaluate) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, undefined, undefined, propertyName, undefined); +}; +}; + +},{"./util":36}],6:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; + +},{"./util":36}],7:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = _dereq_("./util"); +var getKeys = _dereq_("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; + +},{"./es5":13,"./util":36}],8:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; + +},{}],9:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = _dereq_("./errors").Warning; +var util = _dereq_("./util"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (true || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + async.invokeLater(this._notifyUnhandledRejection, this, undefined); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new CustomEvent(name.toLowerCase(), { + detail: event, + cancelable: true + }); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = firstLineError.stack.split("\n"); + var lastStackLines = lastLineError.stack.split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; + +},{"./errors":12,"./util":36}],10:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; + +},{}],11:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseReduce = Promise.reduce; +var PromiseAll = Promise.all; + +function promiseAllThis() { + return PromiseAll(this); +} + +function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); +} + +Promise.prototype.each = function (fn) { + return PromiseReduce(this, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, this, undefined); +}; + +Promise.prototype.mapSeries = function (fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); +}; + +Promise.each = function (promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, promises, undefined); +}; + +Promise.mapSeries = PromiseMapSeries; +}; + + +},{}],12:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var Objectfreeze = es5.freeze; +var util = _dereq_("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; + +},{"./es5":13,"./util":36}],13:[function(_dereq_,module,exports){ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} + +},{}],14:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseMap = Promise.map; + +Promise.prototype.filter = function (fn, options) { + return PromiseMap(this, fn, options, INTERNAL); +}; + +Promise.filter = function (promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); +}; +}; + +},{}],15:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, tryConvertToPromise) { +var util = _dereq_("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +return PassThroughHandlerContext; +}; + +},{"./util":36}],16:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + apiRejection, + INTERNAL, + tryConvertToPromise, + Proxyable, + debug) { +var errors = _dereq_("./errors"); +var TypeError = errors.TypeError; +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +var yieldHandlers = []; + +function promiseFromYieldHandler(value, yieldHandlers, traceParent) { + for (var i = 0; i < yieldHandlers.length; ++i) { + traceParent._pushContext(); + var result = tryCatch(yieldHandlers[i])(value); + traceParent._popContext(); + if (result === errorObj) { + traceParent._pushContext(); + var ret = Promise.reject(errorObj.e); + traceParent._popContext(); + return ret; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = undefined; + this._yieldHandlers = typeof yieldHandler === "function" + ? [yieldHandler].concat(yieldHandlers) + : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; +} +util.inherits(PromiseSpawn, Proxyable); + +PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; +}; + +PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } +}; + +PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + + var result; + if (!implementsReturn) { + var reason = new Promise.CancellationError( + "generator .return() sentinel"); + Promise.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch(this._generator["throw"]).call(this._generator, + reason); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch(this._generator["return"]).call(this._generator, + undefined); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); +}; + +PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch(this._generator["throw"]) + .call(this._generator, reason); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } +}; + +PromiseSpawn.prototype.promise = function () { + return this._promise; +}; + +PromiseSpawn.prototype._run = function () { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = undefined; + this._promiseFulfilled(undefined); +}; + +PromiseSpawn.prototype._continue = function (result) { + var promise = this._promise; + if (result === errorObj) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise)) { + maybePromise = + promiseFromYieldHandler(maybePromise, + this._yieldHandlers, + this._promise); + if (maybePromise === null) { + this._promiseRejected( + new TypeError( + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", value) + + "From coroutine:\u000a" + + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if (((bitField & 33554432) !== 0)) { + Promise._async.invoke( + this._promiseFulfilled, this, maybePromise._value() + ); + } else if (((bitField & 16777216) !== 0)) { + Promise._async.invoke( + this._promiseRejected, this, maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } +}; + +Promise.coroutine = function (generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, + stack); + var ret = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(undefined); + return ret; + }; +}; + +Promise.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + yieldHandlers.push(fn); +}; + +Promise.spawn = function (generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; + +},{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!true) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!true) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var args = [].slice.call(arguments);; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; + +},{"./util":36}],18:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL + ? new Array(this.length()) + : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, undefined); +} +util.inherits(MappingPromiseArray, PromiseArray); + +MappingPromiseArray.prototype._asyncInit = function() { + this._init$(undefined, -2); +}; + +MappingPromiseArray.prototype._init = function () {}; + +MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + + if (index < 0) { + index = (index * -1) - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret = tryCatch(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret === errorObj) { + this._reject(ret.e); + return true; + } + + var maybePromise = tryConvertToPromise(ret, this._promise); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if (((bitField & 33554432) !== 0)) { + ret = maybePromise._value(); + } else if (((bitField & 16777216) !== 0)) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; +}; + +MappingPromiseArray.prototype._drainQueue = function () { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } +}; + +MappingPromiseArray.prototype._filter = function (booleans, values) { + var len = values.length; + var ret = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + } + ret.length = j; + this._resolve(ret); +}; + +MappingPromiseArray.prototype.preservedValues = function () { + return this._preservedValues; +}; + +function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + + var limit = 0; + if (options !== undefined) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise.reject( + new TypeError("'concurrency' must be a number but it is " + + util.classString(options.concurrency))); + } + limit = options.concurrency; + } else { + return Promise.reject(new TypeError( + "options argument must be an object but it is " + + util.classString(options))); + } + } + limit = typeof limit === "number" && + isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); +} + +Promise.prototype.map = function (fn, options) { + return map(this, fn, options, null); +}; + +Promise.map = function (promises, fn, options, _filter) { + return map(promises, fn, options, _filter); +}; + + +}; + +},{"./util":36}],19:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; + +},{"./util":36}],20:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = _dereq_("./errors"); +var OperationalError = errors.OperationalError; +var es5 = _dereq_("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var args = [].slice.call(arguments, 1);; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; + +},{"./errors":12,"./es5":13,"./util":36}],21:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var util = _dereq_("./util"); +var async = Promise._async; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function spreadAdapter(val, nodeback) { + var promise = this; + if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret = + tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret = val === undefined + ? tryCatch(nodeback).call(receiver, null) + : tryCatch(nodeback).call(receiver, null, val); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} +function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret = tryCatch(nodeback).call(promise._boundValue(), reason); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, + options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== undefined && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + undefined, + this, + nodeback + ); + } + return this; +}; +}; + +},{"./util":36}],22:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = _dereq_("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = _dereq_("./es5"); +var Async = _dereq_("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = _dereq_("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL); +var PromiseArray = + _dereq_("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = _dereq_("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = _dereq_("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + _dereq_("./finally")(Promise, tryConvertToPromise); +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = _dereq_("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + if (self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +} + +function Promise(executor) { + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + if (executor !== INTERNAL) { + check(this, executor); + this._resolveFromExecutor(executor); + } + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("expecting an object but got " + + "A catch statement predicate " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); +_dereq_("./direct_resolve")(Promise); +_dereq_("./synchronous_inspection")(Promise); +_dereq_("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.4.7"; +_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +_dereq_('./call_get.js')(Promise); +_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); +_dereq_('./timers.js')(Promise, INTERNAL, debug); +_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +_dereq_('./nodeify.js')(Promise); +_dereq_('./promisify.js')(Promise, INTERNAL); +_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); +_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); +_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +_dereq_('./settle.js')(Promise, PromiseArray, debug); +_dereq_('./some.js')(Promise, PromiseArray, apiRejection); +_dereq_('./filter.js')(Promise, INTERNAL); +_dereq_('./each.js')(Promise, INTERNAL); +_dereq_('./any.js')(Promise); + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; + +},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = _dereq_("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; + +},{"./util":36}],24:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = _dereq_("./util"); +var nodebackForPromise = _dereq_("./nodeback"); +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var TypeError = _dereq_("./errors").TypeError; +var defaultSuffix = "Async"; +var defaultPromisified = {__isPromisified__: true}; +var noCopyProps = [ + "arity", "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" +]; +var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + +var defaultFilter = function(name) { + return util.isIdentifier(name) && + name.charAt(0) !== "_" && + name !== "constructor"; +}; + +function propsFilter(key) { + return !noCopyPropsPattern.test(key); +} + +function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } + catch (e) { + return false; + } +} + +function hasPromisified(obj, key, suffix) { + var val = util.getDataPropertyOrDefault(obj, key + suffix, + defaultPromisified); + return val ? isPromisified(val) : false; +} +function checkValid(ret, suffix, suffixRegexp) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a" + .replace("%s", suffix)); + } + } + } + } +} + +function promisifiableMethods(obj, suffix, suffixRegexp, filter) { + var keys = util.inheritedDataKeys(obj); + var ret = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj[key]; + var passesDefaultFilter = filter === defaultFilter + ? true : defaultFilter(key, value, obj); + if (typeof value === "function" && + !isPromisified(value) && + !hasPromisified(obj, key, suffix) && + filter(key, value, obj, passesDefaultFilter)) { + ret.push(key, value); + } + } + checkValid(ret, suffix, suffixRegexp); + return ret; +} + +var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); +}; + +var makeNodePromisifiedEval; +if (!true) { +var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret.push(i); + } + return ret; +}; + +var argumentSequence = function(argumentCount) { + return util.filledRange(argumentCount, "_arg", ""); +}; + +var parameterDeclaration = function(parameterCount) { + return util.filledRange( + Math.max(parameterCount, 3), "_arg", ""); +}; + +var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +}; + +makeNodePromisifiedEval = +function(callback, receiver, originalName, fn, _, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret; + if (shouldProxyThis) { + ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret = receiver === undefined + ? "ret = callback({{args}}, nodeback); break;\n" + : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret.replace("{{args}}", args).replace(", ", comma); + } + + function generateArgumentSwitchCase() { + var ret = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + + ret += " \n\ + default: \n\ + var args = new Array(len + 1); \n\ + var i = 0; \n\ + for (var i = 0; i < len; ++i) { \n\ + args[i] = arguments[i]; \n\ + } \n\ + args[i] = nodeback; \n\ + [CodeForCall] \n\ + break; \n\ + ".replace("[CodeForCall]", (shouldProxyThis + ? "ret = callback.apply(this, args);\n" + : "ret = callback.apply(receiver, args);\n")); + return ret; + } + + var getFunctionCode = typeof callback === "string" + ? ("this != null ? this['"+callback+"'] : fn") + : "fn"; + var body = "'use strict'; \n\ + var ret = function (Parameters) { \n\ + 'use strict'; \n\ + var len = arguments.length; \n\ + var promise = new Promise(INTERNAL); \n\ + promise._captureStackTrace(); \n\ + var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\ + var ret; \n\ + var callback = tryCatch([GetFunctionCode]); \n\ + switch(len) { \n\ + [CodeForSwitchCase] \n\ + } \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ + } \n\ + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\ + return promise; \n\ + }; \n\ + notEnumerableProp(ret, '__isPromisified__', true); \n\ + return ret; \n\ + ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) + .replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function("Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body)( + Promise, + fn, + receiver, + withAppended, + maybeWrapAsError, + nodebackForPromise, + util.tryCatch, + util.errorObj, + util.notEnumerableProp, + INTERNAL); +}; +} + +function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) { + var defaultThis = (function() {return this;})(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis + ? this[method] : callback; + var fn = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended(arguments, fn)); + } catch(e) { + promise._rejectCallback(maybeWrapAsError(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function promisifyAll(obj, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = + promisifiableMethods(obj, suffix, suffixRegexp, filter); + + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj[promisifiedKey] = + makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified(key, THIS, key, + fn, suffix, multiArgs); + }); + util.notEnumerableProp(promisified, "__isPromisified__", true); + obj[promisifiedKey] = promisified; + } + } + util.toFastProperties(obj); + return obj; +} + +function promisify(callback, receiver, multiArgs) { + return makeNodePromisified(callback, receiver, undefined, + callback, null, multiArgs); +} + +Promise.promisify = function (fn, options) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === undefined ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret = promisify(fn, receiver, multiArgs); + util.copyDescriptors(fn, ret, propsFilter); + return ret; +}; + +Promise.promisifyAll = function (target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + + if (!util.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + + var keys = util.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && + util.isClass(value)) { + promisifyAll(value.prototype, suffix, filter, promisifier, + multiArgs); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + + return promisifyAll(target, suffix, filter, promisifier, multiArgs); +}; +}; + + +},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function( + Promise, PromiseArray, tryConvertToPromise, apiRejection) { +var util = _dereq_("./util"); +var isObject = util.isObject; +var es5 = _dereq_("./es5"); +var Es6Map; +if (typeof Map === "function") Es6Map = Map; + +var mapToEntries = (function() { + var index = 0; + var size = 0; + + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + + return function mapToEntries(map) { + size = map.size; + index = 0; + var ret = new Array(map.size * 2); + map.forEach(extractEntry, ret); + return ret; + }; +})(); + +var entriesToMap = function(entries) { + var ret = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret.set(key, value); + } + return ret; +}; + +function PropertiesPromiseArray(obj) { + var isMap = false; + var entries; + if (Es6Map !== undefined && obj instanceof Es6Map) { + entries = mapToEntries(obj); + isMap = true; + } else { + var keys = es5.keys(obj); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(undefined, -3); +} +util.inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = function () {}; + +PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; +}; + +PropertiesPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +PropertiesPromiseArray.prototype.getActualLength = function (len) { + return len >> 1; +}; + +function props(promises) { + var ret; + var castValue = tryConvertToPromise(promises); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } else if (castValue instanceof Promise) { + ret = castValue._then( + Promise.props, undefined, undefined, undefined, undefined); + } else { + ret = new PropertiesPromiseArray(castValue).promise(); + } + + if (castValue instanceof Promise) { + ret._propagateFrom(castValue, 2); + } + return ret; +} + +Promise.prototype.props = function () { + return props(this); +}; + +Promise.props = function (promises) { + return props(promises); +}; +}; + +},{"./es5":13,"./util":36}],26:[function(_dereq_,module,exports){ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; + +},{}],27:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function( + Promise, INTERNAL, tryConvertToPromise, apiRejection) { +var util = _dereq_("./util"); + +var raceLater = function (promise) { + return promise.then(function(array) { + return race(array, promise); + }); +}; + +function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } else { + promises = util.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util.classString(promises)); + } + + var ret = new Promise(INTERNAL); + if (parent !== undefined) { + ret._propagateFrom(parent, 3); + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === undefined && !(i in promises)) { + continue; + } + + Promise.cast(val)._then(fulfill, reject, undefined, ret, null); + } + return ret; +} + +Promise.race = function (promises) { + return race(promises, undefined); +}; + +Promise.prototype.race = function () { + return race(this, undefined); +}; + +}; + +},{"./util":36}],28:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util.domainBind(domain, fn); + if (initialValue !== undefined) { + initialValue = Promise.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if(_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = undefined; + } + this._promise._captureStackTrace(); + this._init$(undefined, -5); +} +util.inherits(ReductionPromiseArray, PromiseArray); + +ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== undefined && + this._eachValues !== null && + accum !== INTERNAL) { + this._eachValues.push(accum); + } +}; + +ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; +}; + +ReductionPromiseArray.prototype._init = function() {}; + +ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== undefined ? this._eachValues + : this._initialValue); +}; + +ReductionPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; +}; + +ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise) { + this._initialValue.cancel(); + } +}; + +ReductionPromiseArray.prototype._iterate = function (values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== undefined) { + value = this._initialValue; + i = 0; + } else { + value = Promise.resolve(values[0]); + i = 1; + } + + this._currentCancellable = value; + + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length: length, + array: this + }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + } + } + + if (this._eachValues !== undefined) { + value = value + ._then(this._eachComplete, undefined, undefined, this, undefined); + } + value._then(completed, completed, undefined, value, this); +}; + +Promise.prototype.reduce = function (fn, initialValue) { + return reduce(this, fn, initialValue, null); +}; + +Promise.reduce = function (promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); +}; + +function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } +} + +function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); +} + +function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise) { + this.array._currentCancellable = value; + return value._then(gotValue, undefined, undefined, this, undefined); + } else { + return gotValue.call(this, value); + } +} + +function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch(array._fn); + promise._pushContext(); + var ret; + if (array._eachValues !== undefined) { + ret = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret = fn.call(promise._boundValue(), + this.accum, value, this.index, this.length); + } + if (ret instanceof Promise) { + array._currentCancellable = ret; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + array._eachValues !== undefined ? "Promise.each" : "Promise.reduce", + promise + ); + return ret; +} +}; + +},{"./util":36}],29:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova))) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; + +},{"./util":36}],30:[function(_dereq_,module,exports){ +"use strict"; +module.exports = + function(Promise, PromiseArray, debug) { +var PromiseInspection = Promise.PromiseInspection; +var util = _dereq_("./util"); + +function SettledPromiseArray(values) { + this.constructor$(values); +} +util.inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = function (index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { + var ret = new PromiseInspection(); + ret._bitField = 33554432; + ret._settledValueField = value; + return this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = function (reason, index) { + var ret = new PromiseInspection(); + ret._bitField = 16777216; + ret._settledValueField = reason; + return this._promiseResolved(index, ret); +}; + +Promise.settle = function (promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); +}; + +Promise.prototype.settle = function () { + return Promise.settle(this); +}; +}; + +},{"./util":36}],31:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, apiRejection) { +var util = _dereq_("./util"); +var RangeError = _dereq_("./errors").RangeError; +var AggregateError = _dereq_("./errors").AggregateError; +var isArray = util.isArray; +var CANCELLATION = {}; + + +function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +util.inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function () { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(undefined, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } +}; + +SomePromiseArray.prototype.init = function () { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function () { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function () { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = function (count) { + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = function (value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + +}; +SomePromiseArray.prototype._promiseRejected = function (reason) { + this._addRejected(reason); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._promiseCancelled = function () { + if (this._values instanceof Promise || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; +}; + +SomePromiseArray.prototype._fulfilled = function () { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function () { + return this._values.length - this.length(); +}; + +SomePromiseArray.prototype._addRejected = function (reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = function (value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = function () { + return this.length() - this._rejected(); +}; + +SomePromiseArray.prototype._getRangeError = function (count) { + var message = "Input array must contain at least " + + this._howMany + " items but contains only " + count + " items"; + return new RangeError(message); +}; + +SomePromiseArray.prototype._resolveEmptyArray = function () { + this._reject(this._getRangeError(0)); +}; + +function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function (promises, howMany) { + return some(promises, howMany); +}; + +Promise.prototype.some = function (howMany) { + return some(this, howMany); +}; + +Promise._SomePromiseArray = SomePromiseArray; +}; + +},{"./errors":12,"./util":36}],32:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + +},{}],33:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; + +},{"./util":36}],34:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, debug) { +var util = _dereq_("./util"); +var TimeoutError = Promise.TimeoutError; + +function HandleWrapper(handle) { + this.handle = handle; +} + +HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); +}; + +var afterValue = function(value) { return delay(+this).thenReturn(value); }; +var delay = Promise.delay = function (ms, value) { + var ret; + var handle; + if (value !== undefined) { + ret = Promise.resolve(value) + ._then(afterValue, null, null, ms, undefined); + if (debug.cancellation() && value instanceof Promise) { + ret._setOnCancel(value); + } + } else { + ret = new Promise(INTERNAL); + handle = setTimeout(function() { ret._fulfill(); }, +ms); + if (debug.cancellation()) { + ret._setOnCancel(new HandleWrapper(handle)); + } + ret._captureStackTrace(); + } + ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.prototype.delay = function (ms) { + return delay(ms, this); +}; + +var afterTimeout = function (promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + + if (parent != null) { + parent.cancel(); + } +}; + +function successClear(value) { + clearTimeout(this.handle); + return value; +} + +function failureClear(reason) { + clearTimeout(this.handle); + throw reason; +} + +Promise.prototype.timeout = function (ms, message) { + ms = +ms; + var ret, parent; + + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret.isPending()) { + afterTimeout(ret, message, parent); + } + }, ms)); + + if (debug.cancellation()) { + parent = this.then(); + ret = parent._then(successClear, failureClear, + undefined, handleWrapper, undefined); + ret._setOnCancel(handleWrapper); + } else { + ret = this._then(successClear, failureClear, + undefined, handleWrapper, undefined); + } + + return ret; +}; + +}; + +},{"./util":36}],35:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function (Promise, apiRejection, tryConvertToPromise, + createContext, INTERNAL, debug) { + var util = _dereq_("./util"); + var TypeError = _dereq_("./errors").TypeError; + var inherits = _dereq_("./util").inherits; + var errorObj = util.errorObj; + var tryCatch = util.tryCatch; + var NULL = {}; + + function thrower(e) { + setTimeout(function(){throw e;}, 0); + } + + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && + typeof thenable._isDisposable === "function" && + typeof thenable._getDisposer === "function" && + thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret = new Promise(INTERNAL); + function iterator() { + if (i >= len) return ret._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise && + maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise); + } catch (e) { + return thrower(e); + } + if (maybePromise instanceof Promise) { + return maybePromise._then(iterator, thrower, + null, null, null); + } + } + iterator(); + } + iterator(); + return ret; + } + + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + + Disposer.prototype.data = function () { + return this._data; + }; + + Disposer.prototype.promise = function () { + return this._promise; + }; + + Disposer.prototype.resource = function () { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== undefined) context._pushContext(); + var ret = resource !== NULL + ? this.doDispose(resource, inspection) : null; + if (context !== undefined) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret; + }; + + Disposer.isDisposer = function (d) { + return (d != null && + typeof d.resource === "function" && + typeof d.tryDispose === "function"); + }; + + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits(FunctionDisposer, Disposer); + + FunctionDisposer.prototype.doDispose = function (resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length-1] = null; + } + + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise) { + item.cancel(); + } + } + }; + + Promise.using = function () { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using"); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise) { + resource = + maybePromise._then(maybeUnwrapDisposer, null, null, { + resources: resources, + index: i + }, undefined); + } + } + resources[i] = resource; + } + + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise.resolve(resources[i]).reflect(); + } + + var resultPromise = Promise.all(reflectedResources) + .then(function(inspections) { + for (var i = 0; i < inspections.length; ++i) { + var inspection = inspections[i]; + if (inspection.isRejected()) { + errorObj.e = inspection.error(); + return errorObj; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i] = inspection.value(); + } + promise._pushContext(); + + fn = tryCatch(fn); + var ret = spreadArgs + ? fn.apply(undefined, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, promiseCreated, "Promise.using", promise); + return ret; + }); + + var promise = resultPromise.lastly(function() { + var inspection = new Promise.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + + Promise.prototype._setDisposable = function (disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + + Promise.prototype._isDisposable = function () { + return (this._bitField & 131072) > 0; + }; + + Promise.prototype._getDisposer = function () { + return this._disposer; + }; + + Promise.prototype._unsetDisposable = function () { + this._bitField = this._bitField & (~131072); + this._disposer = undefined; + }; + + Promise.prototype.disposer = function (fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError(); + }; + +}; + +},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var l = 8; + while (l--) new FakeConstructor(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"; +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version = process.versions.node.split(".").map(Number); + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; + +},{"./es5":13}]},{},[4])(4) +}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.min.js b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.min.js new file mode 100644 index 0000000..242bbfe --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/browser/bluebird.min.js @@ -0,0 +1,31 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.4.7 + * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(N(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function m(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function k(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){I.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,H=t("./util"),N=H.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),z=!(0==H.env("BLUEBIRD_WARNINGS")||!G&&!H.env("BLUEBIRD_WARNINGS")),X=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!H.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),g(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(D=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,E,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,x),t("./settle.js")(i,E,x),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){ +if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/any.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/any.js new file mode 100644 index 0000000..05a6228 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/any.js @@ -0,0 +1,21 @@ +"use strict"; +module.exports = function(Promise) { +var SomePromiseArray = Promise._SomePromiseArray; +function any(promises) { + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(1); + ret.setUnwrap(); + ret.init(); + return promise; +} + +Promise.any = function (promises) { + return any(promises); +}; + +Promise.prototype.any = function () { + return any(this); +}; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/assert.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/assert.js new file mode 100644 index 0000000..4518231 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/assert.js @@ -0,0 +1,55 @@ +"use strict"; +module.exports = (function(){ +var AssertionError = (function() { + function AssertionError(a) { + this.constructor$(a); + this.message = a; + this.name = "AssertionError"; + } + AssertionError.prototype = new Error(); + AssertionError.prototype.constructor = AssertionError; + AssertionError.prototype.constructor$ = Error; + return AssertionError; +})(); + +function getParams(args) { + var params = []; + for (var i = 0; i < args.length; ++i) params.push("arg" + i); + return params; +} + +function nativeAssert(callName, args, expect) { + try { + var params = getParams(args); + var constructorArgs = params; + constructorArgs.push("return " + + callName + "("+ params.join(",") + ");"); + var fn = Function.apply(null, constructorArgs); + return fn.apply(null, args); + } catch (e) { + if (!(e instanceof SyntaxError)) { + throw e; + } else { + return expect; + } + } +} + +return function assert(boolExpr, message) { + if (boolExpr === true) return; + + if (typeof boolExpr === "string" && + boolExpr.charAt(0) === "%") { + var nativeCallName = boolExpr; + var $_len = arguments.length;var args = new Array(Math.max($_len - 2, 0)); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}; + if (nativeAssert(nativeCallName, args, message) === message) return; + message = (nativeCallName + " !== " + message); + } + + var ret = new AssertionError(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(ret, assert); + } + throw ret; +}; +})(); diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/async.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/async.js new file mode 100644 index 0000000..41f6655 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/async.js @@ -0,0 +1,161 @@ +"use strict"; +var firstLineError; +try {throw new Error(); } catch (e) {firstLineError = e;} +var schedule = require("./schedule"); +var Queue = require("./queue"); +var util = require("./util"); + +function Async() { + this._customScheduler = false; + this._isTickUsed = false; + this._lateQueue = new Queue(16); + this._normalQueue = new Queue(16); + this._haveDrainedQueues = false; + this._trampolineEnabled = true; + var self = this; + this.drainQueues = function () { + self._drainQueues(); + }; + this._schedule = schedule; +} + +Async.prototype.setScheduler = function(fn) { + var prev = this._schedule; + this._schedule = fn; + this._customScheduler = true; + return prev; +}; + +Async.prototype.hasCustomScheduler = function() { + return this._customScheduler; +}; + +Async.prototype.enableTrampoline = function() { + this._trampolineEnabled = true; +}; + +Async.prototype.disableTrampolineIfNecessary = function() { + if (util.hasDevTools) { + this._trampolineEnabled = false; + } +}; + +Async.prototype.haveItemsQueued = function () { + return this._isTickUsed || this._haveDrainedQueues; +}; + + +Async.prototype.fatalError = function(e, isNode) { + if (isNode) { + process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + + "\n"); + process.exit(2); + } else { + this.throwLater(e); + } +}; + +Async.prototype.throwLater = function(fn, arg) { + if (arguments.length === 1) { + arg = fn; + fn = function () { throw arg; }; + } + if (typeof setTimeout !== "undefined") { + setTimeout(function() { + fn(arg); + }, 0); + } else try { + this._schedule(function() { + fn(arg); + }); + } catch (e) { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +}; + +function AsyncInvokeLater(fn, receiver, arg) { + this._lateQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncInvoke(fn, receiver, arg) { + this._normalQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncSettlePromises(promise) { + this._normalQueue._pushOne(promise); + this._queueTick(); +} + +if (!util.hasDevTools) { + Async.prototype.invokeLater = AsyncInvokeLater; + Async.prototype.invoke = AsyncInvoke; + Async.prototype.settlePromises = AsyncSettlePromises; +} else { + Async.prototype.invokeLater = function (fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvokeLater.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + setTimeout(function() { + fn.call(receiver, arg); + }, 100); + }); + } + }; + + Async.prototype.invoke = function (fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvoke.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + fn.call(receiver, arg); + }); + } + }; + + Async.prototype.settlePromises = function(promise) { + if (this._trampolineEnabled) { + AsyncSettlePromises.call(this, promise); + } else { + this._schedule(function() { + promise._settlePromises(); + }); + } + }; +} + +Async.prototype._drainQueue = function(queue) { + while (queue.length() > 0) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + continue; + } + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +}; + +Async.prototype._drainQueues = function () { + this._drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + this._drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/bind.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/bind.js new file mode 100644 index 0000000..fc3379d --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/bind.js @@ -0,0 +1,67 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/bluebird.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/bluebird.js new file mode 100644 index 0000000..1c36cf3 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/bluebird.js @@ -0,0 +1,11 @@ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = require("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/call_get.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/call_get.js new file mode 100644 index 0000000..0ed7714 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/call_get.js @@ -0,0 +1,123 @@ +"use strict"; +var cr = Object.create; +if (cr) { + var callerCache = cr(null); + var getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; +} + +module.exports = function(Promise) { +var util = require("./util"); +var canEvaluate = util.canEvaluate; +var isIdentifier = util.isIdentifier; + +var getMethodCaller; +var getGetter; +if (!false) { +var makeMethodCaller = function (methodName) { + return new Function("ensureMethod", " \n\ + return function(obj) { \n\ + 'use strict' \n\ + var len = this.length; \n\ + ensureMethod(obj, 'methodName'); \n\ + switch(len) { \n\ + case 1: return obj.methodName(this[0]); \n\ + case 2: return obj.methodName(this[0], this[1]); \n\ + case 3: return obj.methodName(this[0], this[1], this[2]); \n\ + case 0: return obj.methodName(); \n\ + default: \n\ + return obj.methodName.apply(obj, this); \n\ + } \n\ + }; \n\ + ".replace(/methodName/g, methodName))(ensureMethod); +}; + +var makeGetter = function (propertyName) { + return new Function("obj", " \n\ + 'use strict'; \n\ + return obj.propertyName; \n\ + ".replace("propertyName", propertyName)); +}; + +var getCompiled = function(name, compiler, cache) { + var ret = cache[name]; + if (typeof ret !== "function") { + if (!isIdentifier(name)) { + return null; + } + ret = compiler(name); + cache[name] = ret; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret; +}; + +getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); +}; + +getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); +}; +} + +function ensureMethod(obj, methodName) { + var fn; + if (obj != null) fn = obj[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util.classString(obj) + " has no method '" + + util.toString(methodName) + "'"; + throw new Promise.TypeError(message); + } + return fn; +} + +function caller(obj) { + var methodName = this.pop(); + var fn = ensureMethod(obj, methodName); + return fn.apply(obj, this); +} +Promise.prototype.call = function (methodName) { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + if (!false) { + if (canEvaluate) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, undefined, undefined, args, undefined); + } + } + } + args.push(methodName); + return this._then(caller, undefined, undefined, args, undefined); +}; + +function namedGetter(obj) { + return obj[this]; +} +function indexedGetter(obj) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj.length); + return obj[index]; +} +Promise.prototype.get = function (propertyName) { + var isIndex = (typeof propertyName === "number"); + var getter; + if (!isIndex) { + if (canEvaluate) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, undefined, undefined, propertyName, undefined); +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/cancel.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/cancel.js new file mode 100644 index 0000000..7a12415 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/cancel.js @@ -0,0 +1,129 @@ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = require("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/catch_filter.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/catch_filter.js new file mode 100644 index 0000000..0f24ce2 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/catch_filter.js @@ -0,0 +1,42 @@ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = require("./util"); +var getKeys = require("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/context.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/context.js new file mode 100644 index 0000000..c307414 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/context.js @@ -0,0 +1,69 @@ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/debuggability.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/debuggability.js new file mode 100644 index 0000000..bf0587c --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/debuggability.js @@ -0,0 +1,916 @@ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = require("./errors").Warning; +var util = require("./util"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (false || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + async.invokeLater(this._notifyUnhandledRejection, this, undefined); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new CustomEvent(name.toLowerCase(), { + detail: event, + cancelable: true + }); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = firstLineError.stack.split("\n"); + var lastStackLines = lastLineError.stack.split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/direct_resolve.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/direct_resolve.js new file mode 100644 index 0000000..a890298 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/direct_resolve.js @@ -0,0 +1,46 @@ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/each.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/each.js new file mode 100644 index 0000000..e4f3d05 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/each.js @@ -0,0 +1,30 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseReduce = Promise.reduce; +var PromiseAll = Promise.all; + +function promiseAllThis() { + return PromiseAll(this); +} + +function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); +} + +Promise.prototype.each = function (fn) { + return PromiseReduce(this, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, this, undefined); +}; + +Promise.prototype.mapSeries = function (fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); +}; + +Promise.each = function (promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, promises, undefined); +}; + +Promise.mapSeries = PromiseMapSeries; +}; + diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/errors.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/errors.js new file mode 100644 index 0000000..f62f323 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/errors.js @@ -0,0 +1,116 @@ +"use strict"; +var es5 = require("./es5"); +var Objectfreeze = es5.freeze; +var util = require("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/es5.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/es5.js new file mode 100644 index 0000000..ea41d5a --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/es5.js @@ -0,0 +1,80 @@ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/filter.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/filter.js new file mode 100644 index 0000000..ed57bf0 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/filter.js @@ -0,0 +1,12 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseMap = Promise.map; + +Promise.prototype.filter = function (fn, options) { + return PromiseMap(this, fn, options, INTERNAL); +}; + +Promise.filter = function (promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/finally.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/finally.js new file mode 100644 index 0000000..3717911 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/finally.js @@ -0,0 +1,111 @@ +"use strict"; +module.exports = function(Promise, tryConvertToPromise) { +var util = require("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +return PassThroughHandlerContext; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/generators.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/generators.js new file mode 100644 index 0000000..40e9b1f --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/generators.js @@ -0,0 +1,223 @@ +"use strict"; +module.exports = function(Promise, + apiRejection, + INTERNAL, + tryConvertToPromise, + Proxyable, + debug) { +var errors = require("./errors"); +var TypeError = errors.TypeError; +var util = require("./util"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +var yieldHandlers = []; + +function promiseFromYieldHandler(value, yieldHandlers, traceParent) { + for (var i = 0; i < yieldHandlers.length; ++i) { + traceParent._pushContext(); + var result = tryCatch(yieldHandlers[i])(value); + traceParent._popContext(); + if (result === errorObj) { + traceParent._pushContext(); + var ret = Promise.reject(errorObj.e); + traceParent._popContext(); + return ret; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = undefined; + this._yieldHandlers = typeof yieldHandler === "function" + ? [yieldHandler].concat(yieldHandlers) + : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; +} +util.inherits(PromiseSpawn, Proxyable); + +PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; +}; + +PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } +}; + +PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + + var result; + if (!implementsReturn) { + var reason = new Promise.CancellationError( + "generator .return() sentinel"); + Promise.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch(this._generator["throw"]).call(this._generator, + reason); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch(this._generator["return"]).call(this._generator, + undefined); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); +}; + +PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch(this._generator["throw"]) + .call(this._generator, reason); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } +}; + +PromiseSpawn.prototype.promise = function () { + return this._promise; +}; + +PromiseSpawn.prototype._run = function () { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = undefined; + this._promiseFulfilled(undefined); +}; + +PromiseSpawn.prototype._continue = function (result) { + var promise = this._promise; + if (result === errorObj) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise)) { + maybePromise = + promiseFromYieldHandler(maybePromise, + this._yieldHandlers, + this._promise); + if (maybePromise === null) { + this._promiseRejected( + new TypeError( + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", value) + + "From coroutine:\u000a" + + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if (((bitField & 33554432) !== 0)) { + Promise._async.invoke( + this._promiseFulfilled, this, maybePromise._value() + ); + } else if (((bitField & 16777216) !== 0)) { + Promise._async.invoke( + this._promiseRejected, this, maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } +}; + +Promise.coroutine = function (generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, + stack); + var ret = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(undefined); + return ret; + }; +}; + +Promise.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + yieldHandlers.push(fn); +}; + +Promise.spawn = function (generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/join.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/join.js new file mode 100644 index 0000000..4945e3f --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/join.js @@ -0,0 +1,168 @@ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = require("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!false) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!false) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/map.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/map.js new file mode 100644 index 0000000..976f15e --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/map.js @@ -0,0 +1,168 @@ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = require("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL + ? new Array(this.length()) + : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, undefined); +} +util.inherits(MappingPromiseArray, PromiseArray); + +MappingPromiseArray.prototype._asyncInit = function() { + this._init$(undefined, -2); +}; + +MappingPromiseArray.prototype._init = function () {}; + +MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + + if (index < 0) { + index = (index * -1) - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret = tryCatch(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret === errorObj) { + this._reject(ret.e); + return true; + } + + var maybePromise = tryConvertToPromise(ret, this._promise); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if (((bitField & 33554432) !== 0)) { + ret = maybePromise._value(); + } else if (((bitField & 16777216) !== 0)) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; +}; + +MappingPromiseArray.prototype._drainQueue = function () { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } +}; + +MappingPromiseArray.prototype._filter = function (booleans, values) { + var len = values.length; + var ret = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + } + ret.length = j; + this._resolve(ret); +}; + +MappingPromiseArray.prototype.preservedValues = function () { + return this._preservedValues; +}; + +function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + + var limit = 0; + if (options !== undefined) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise.reject( + new TypeError("'concurrency' must be a number but it is " + + util.classString(options.concurrency))); + } + limit = options.concurrency; + } else { + return Promise.reject(new TypeError( + "options argument must be an object but it is " + + util.classString(options))); + } + } + limit = typeof limit === "number" && + isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); +} + +Promise.prototype.map = function (fn, options) { + return map(this, fn, options, null); +}; + +Promise.map = function (promises, fn, options, _filter) { + return map(promises, fn, options, _filter); +}; + + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/method.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/method.js new file mode 100644 index 0000000..ce9e4db --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/method.js @@ -0,0 +1,55 @@ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = require("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeback.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeback.js new file mode 100644 index 0000000..71e69eb --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeback.js @@ -0,0 +1,51 @@ +"use strict"; +var util = require("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = require("./errors"); +var OperationalError = errors.OperationalError; +var es5 = require("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeify.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeify.js new file mode 100644 index 0000000..ce2b190 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/nodeify.js @@ -0,0 +1,58 @@ +"use strict"; +module.exports = function(Promise) { +var util = require("./util"); +var async = Promise._async; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function spreadAdapter(val, nodeback) { + var promise = this; + if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret = + tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret = val === undefined + ? tryCatch(nodeback).call(receiver, null) + : tryCatch(nodeback).call(receiver, null, val); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} +function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret = tryCatch(nodeback).call(promise._boundValue(), reason); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, + options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== undefined && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + undefined, + this, + nodeback + ); + } + return this; +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/promise.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/promise.js new file mode 100644 index 0000000..f699a53 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/promise.js @@ -0,0 +1,773 @@ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = require("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = require("./es5"); +var Async = require("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = require("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = require("./thenables")(Promise, INTERNAL); +var PromiseArray = + require("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = require("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = require("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + require("./finally")(Promise, tryConvertToPromise); +var catchFilter = require("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = require("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + if (self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +} + +function Promise(executor) { + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + if (executor !== INTERNAL) { + check(this, executor); + this._resolveFromExecutor(executor); + } + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("expecting an object but got " + + "A catch statement predicate " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +require("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +require("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +require("./cancel")(Promise, PromiseArray, apiRejection, debug); +require("./direct_resolve")(Promise); +require("./synchronous_inspection")(Promise); +require("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.4.7"; +require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +require('./call_get.js')(Promise); +require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); +require('./timers.js')(Promise, INTERNAL, debug); +require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +require('./nodeify.js')(Promise); +require('./promisify.js')(Promise, INTERNAL); +require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); +require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); +require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +require('./settle.js')(Promise, PromiseArray, debug); +require('./some.js')(Promise, PromiseArray, apiRejection); +require('./filter.js')(Promise, INTERNAL); +require('./each.js')(Promise, INTERNAL); +require('./any.js')(Promise); + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/promise_array.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/promise_array.js new file mode 100644 index 0000000..f874df3 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/promise_array.js @@ -0,0 +1,184 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = require("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/promisify.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/promisify.js new file mode 100644 index 0000000..aa98e5b --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/promisify.js @@ -0,0 +1,314 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = require("./util"); +var nodebackForPromise = require("./nodeback"); +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var TypeError = require("./errors").TypeError; +var defaultSuffix = "Async"; +var defaultPromisified = {__isPromisified__: true}; +var noCopyProps = [ + "arity", "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" +]; +var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + +var defaultFilter = function(name) { + return util.isIdentifier(name) && + name.charAt(0) !== "_" && + name !== "constructor"; +}; + +function propsFilter(key) { + return !noCopyPropsPattern.test(key); +} + +function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } + catch (e) { + return false; + } +} + +function hasPromisified(obj, key, suffix) { + var val = util.getDataPropertyOrDefault(obj, key + suffix, + defaultPromisified); + return val ? isPromisified(val) : false; +} +function checkValid(ret, suffix, suffixRegexp) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a" + .replace("%s", suffix)); + } + } + } + } +} + +function promisifiableMethods(obj, suffix, suffixRegexp, filter) { + var keys = util.inheritedDataKeys(obj); + var ret = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj[key]; + var passesDefaultFilter = filter === defaultFilter + ? true : defaultFilter(key, value, obj); + if (typeof value === "function" && + !isPromisified(value) && + !hasPromisified(obj, key, suffix) && + filter(key, value, obj, passesDefaultFilter)) { + ret.push(key, value); + } + } + checkValid(ret, suffix, suffixRegexp); + return ret; +} + +var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); +}; + +var makeNodePromisifiedEval; +if (!false) { +var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret.push(i); + } + return ret; +}; + +var argumentSequence = function(argumentCount) { + return util.filledRange(argumentCount, "_arg", ""); +}; + +var parameterDeclaration = function(parameterCount) { + return util.filledRange( + Math.max(parameterCount, 3), "_arg", ""); +}; + +var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +}; + +makeNodePromisifiedEval = +function(callback, receiver, originalName, fn, _, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret; + if (shouldProxyThis) { + ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret = receiver === undefined + ? "ret = callback({{args}}, nodeback); break;\n" + : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret.replace("{{args}}", args).replace(", ", comma); + } + + function generateArgumentSwitchCase() { + var ret = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + + ret += " \n\ + default: \n\ + var args = new Array(len + 1); \n\ + var i = 0; \n\ + for (var i = 0; i < len; ++i) { \n\ + args[i] = arguments[i]; \n\ + } \n\ + args[i] = nodeback; \n\ + [CodeForCall] \n\ + break; \n\ + ".replace("[CodeForCall]", (shouldProxyThis + ? "ret = callback.apply(this, args);\n" + : "ret = callback.apply(receiver, args);\n")); + return ret; + } + + var getFunctionCode = typeof callback === "string" + ? ("this != null ? this['"+callback+"'] : fn") + : "fn"; + var body = "'use strict'; \n\ + var ret = function (Parameters) { \n\ + 'use strict'; \n\ + var len = arguments.length; \n\ + var promise = new Promise(INTERNAL); \n\ + promise._captureStackTrace(); \n\ + var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\ + var ret; \n\ + var callback = tryCatch([GetFunctionCode]); \n\ + switch(len) { \n\ + [CodeForSwitchCase] \n\ + } \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ + } \n\ + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\ + return promise; \n\ + }; \n\ + notEnumerableProp(ret, '__isPromisified__', true); \n\ + return ret; \n\ + ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) + .replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function("Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body)( + Promise, + fn, + receiver, + withAppended, + maybeWrapAsError, + nodebackForPromise, + util.tryCatch, + util.errorObj, + util.notEnumerableProp, + INTERNAL); +}; +} + +function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) { + var defaultThis = (function() {return this;})(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis + ? this[method] : callback; + var fn = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended(arguments, fn)); + } catch(e) { + promise._rejectCallback(maybeWrapAsError(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function promisifyAll(obj, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = + promisifiableMethods(obj, suffix, suffixRegexp, filter); + + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj[promisifiedKey] = + makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified(key, THIS, key, + fn, suffix, multiArgs); + }); + util.notEnumerableProp(promisified, "__isPromisified__", true); + obj[promisifiedKey] = promisified; + } + } + util.toFastProperties(obj); + return obj; +} + +function promisify(callback, receiver, multiArgs) { + return makeNodePromisified(callback, receiver, undefined, + callback, null, multiArgs); +} + +Promise.promisify = function (fn, options) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === undefined ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret = promisify(fn, receiver, multiArgs); + util.copyDescriptors(fn, ret, propsFilter); + return ret; +}; + +Promise.promisifyAll = function (target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + + if (!util.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + + var keys = util.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && + util.isClass(value)) { + promisifyAll(value.prototype, suffix, filter, promisifier, + multiArgs); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + + return promisifyAll(target, suffix, filter, promisifier, multiArgs); +}; +}; + diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/props.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/props.js new file mode 100644 index 0000000..fc981ce --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/props.js @@ -0,0 +1,118 @@ +"use strict"; +module.exports = function( + Promise, PromiseArray, tryConvertToPromise, apiRejection) { +var util = require("./util"); +var isObject = util.isObject; +var es5 = require("./es5"); +var Es6Map; +if (typeof Map === "function") Es6Map = Map; + +var mapToEntries = (function() { + var index = 0; + var size = 0; + + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + + return function mapToEntries(map) { + size = map.size; + index = 0; + var ret = new Array(map.size * 2); + map.forEach(extractEntry, ret); + return ret; + }; +})(); + +var entriesToMap = function(entries) { + var ret = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret.set(key, value); + } + return ret; +}; + +function PropertiesPromiseArray(obj) { + var isMap = false; + var entries; + if (Es6Map !== undefined && obj instanceof Es6Map) { + entries = mapToEntries(obj); + isMap = true; + } else { + var keys = es5.keys(obj); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(undefined, -3); +} +util.inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = function () {}; + +PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; +}; + +PropertiesPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +PropertiesPromiseArray.prototype.getActualLength = function (len) { + return len >> 1; +}; + +function props(promises) { + var ret; + var castValue = tryConvertToPromise(promises); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } else if (castValue instanceof Promise) { + ret = castValue._then( + Promise.props, undefined, undefined, undefined, undefined); + } else { + ret = new PropertiesPromiseArray(castValue).promise(); + } + + if (castValue instanceof Promise) { + ret._propagateFrom(castValue, 2); + } + return ret; +} + +Promise.prototype.props = function () { + return props(this); +}; + +Promise.props = function (promises) { + return props(promises); +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/queue.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/queue.js new file mode 100644 index 0000000..ffd36fd --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/queue.js @@ -0,0 +1,73 @@ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/race.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/race.js new file mode 100644 index 0000000..b862f46 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/race.js @@ -0,0 +1,49 @@ +"use strict"; +module.exports = function( + Promise, INTERNAL, tryConvertToPromise, apiRejection) { +var util = require("./util"); + +var raceLater = function (promise) { + return promise.then(function(array) { + return race(array, promise); + }); +}; + +function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } else { + promises = util.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util.classString(promises)); + } + + var ret = new Promise(INTERNAL); + if (parent !== undefined) { + ret._propagateFrom(parent, 3); + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === undefined && !(i in promises)) { + continue; + } + + Promise.cast(val)._then(fulfill, reject, undefined, ret, null); + } + return ret; +} + +Promise.race = function (promises) { + return race(promises, undefined); +}; + +Promise.prototype.race = function () { + return race(this, undefined); +}; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/reduce.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/reduce.js new file mode 100644 index 0000000..26e2b1a --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/reduce.js @@ -0,0 +1,172 @@ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = require("./util"); +var tryCatch = util.tryCatch; + +function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util.domainBind(domain, fn); + if (initialValue !== undefined) { + initialValue = Promise.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if(_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = undefined; + } + this._promise._captureStackTrace(); + this._init$(undefined, -5); +} +util.inherits(ReductionPromiseArray, PromiseArray); + +ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== undefined && + this._eachValues !== null && + accum !== INTERNAL) { + this._eachValues.push(accum); + } +}; + +ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; +}; + +ReductionPromiseArray.prototype._init = function() {}; + +ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== undefined ? this._eachValues + : this._initialValue); +}; + +ReductionPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; +}; + +ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise) { + this._initialValue.cancel(); + } +}; + +ReductionPromiseArray.prototype._iterate = function (values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== undefined) { + value = this._initialValue; + i = 0; + } else { + value = Promise.resolve(values[0]); + i = 1; + } + + this._currentCancellable = value; + + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length: length, + array: this + }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + } + } + + if (this._eachValues !== undefined) { + value = value + ._then(this._eachComplete, undefined, undefined, this, undefined); + } + value._then(completed, completed, undefined, value, this); +}; + +Promise.prototype.reduce = function (fn, initialValue) { + return reduce(this, fn, initialValue, null); +}; + +Promise.reduce = function (promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); +}; + +function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } +} + +function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); +} + +function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise) { + this.array._currentCancellable = value; + return value._then(gotValue, undefined, undefined, this, undefined); + } else { + return gotValue.call(this, value); + } +} + +function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch(array._fn); + promise._pushContext(); + var ret; + if (array._eachValues !== undefined) { + ret = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret = fn.call(promise._boundValue(), + this.accum, value, this.index, this.length); + } + if (ret instanceof Promise) { + array._currentCancellable = ret; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + array._eachValues !== undefined ? "Promise.each" : "Promise.reduce", + promise + ); + return ret; +} +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/schedule.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/schedule.js new file mode 100644 index 0000000..a190728 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/schedule.js @@ -0,0 +1,61 @@ +"use strict"; +var util = require("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova))) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/settle.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/settle.js new file mode 100644 index 0000000..fade3a1 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/settle.js @@ -0,0 +1,43 @@ +"use strict"; +module.exports = + function(Promise, PromiseArray, debug) { +var PromiseInspection = Promise.PromiseInspection; +var util = require("./util"); + +function SettledPromiseArray(values) { + this.constructor$(values); +} +util.inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = function (index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { + var ret = new PromiseInspection(); + ret._bitField = 33554432; + ret._settledValueField = value; + return this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = function (reason, index) { + var ret = new PromiseInspection(); + ret._bitField = 16777216; + ret._settledValueField = reason; + return this._promiseResolved(index, ret); +}; + +Promise.settle = function (promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); +}; + +Promise.prototype.settle = function () { + return Promise.settle(this); +}; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/some.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/some.js new file mode 100644 index 0000000..400d852 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/some.js @@ -0,0 +1,148 @@ +"use strict"; +module.exports = +function(Promise, PromiseArray, apiRejection) { +var util = require("./util"); +var RangeError = require("./errors").RangeError; +var AggregateError = require("./errors").AggregateError; +var isArray = util.isArray; +var CANCELLATION = {}; + + +function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +util.inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function () { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(undefined, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } +}; + +SomePromiseArray.prototype.init = function () { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function () { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function () { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = function (count) { + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = function (value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + +}; +SomePromiseArray.prototype._promiseRejected = function (reason) { + this._addRejected(reason); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._promiseCancelled = function () { + if (this._values instanceof Promise || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; +}; + +SomePromiseArray.prototype._fulfilled = function () { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function () { + return this._values.length - this.length(); +}; + +SomePromiseArray.prototype._addRejected = function (reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = function (value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = function () { + return this.length() - this._rejected(); +}; + +SomePromiseArray.prototype._getRangeError = function (count) { + var message = "Input array must contain at least " + + this._howMany + " items but contains only " + count + " items"; + return new RangeError(message); +}; + +SomePromiseArray.prototype._resolveEmptyArray = function () { + this._reject(this._getRangeError(0)); +}; + +function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function (promises, howMany) { + return some(promises, howMany); +}; + +Promise.prototype.some = function (howMany) { + return some(this, howMany); +}; + +Promise._SomePromiseArray = SomePromiseArray; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/synchronous_inspection.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/synchronous_inspection.js new file mode 100644 index 0000000..9c49d2e --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/synchronous_inspection.js @@ -0,0 +1,103 @@ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/thenables.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/thenables.js new file mode 100644 index 0000000..d6ab9aa --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/thenables.js @@ -0,0 +1,86 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = require("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/timers.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/timers.js new file mode 100644 index 0000000..cb8f1f4 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/timers.js @@ -0,0 +1,93 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, debug) { +var util = require("./util"); +var TimeoutError = Promise.TimeoutError; + +function HandleWrapper(handle) { + this.handle = handle; +} + +HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); +}; + +var afterValue = function(value) { return delay(+this).thenReturn(value); }; +var delay = Promise.delay = function (ms, value) { + var ret; + var handle; + if (value !== undefined) { + ret = Promise.resolve(value) + ._then(afterValue, null, null, ms, undefined); + if (debug.cancellation() && value instanceof Promise) { + ret._setOnCancel(value); + } + } else { + ret = new Promise(INTERNAL); + handle = setTimeout(function() { ret._fulfill(); }, +ms); + if (debug.cancellation()) { + ret._setOnCancel(new HandleWrapper(handle)); + } + ret._captureStackTrace(); + } + ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.prototype.delay = function (ms) { + return delay(ms, this); +}; + +var afterTimeout = function (promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + + if (parent != null) { + parent.cancel(); + } +}; + +function successClear(value) { + clearTimeout(this.handle); + return value; +} + +function failureClear(reason) { + clearTimeout(this.handle); + throw reason; +} + +Promise.prototype.timeout = function (ms, message) { + ms = +ms; + var ret, parent; + + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret.isPending()) { + afterTimeout(ret, message, parent); + } + }, ms)); + + if (debug.cancellation()) { + parent = this.then(); + ret = parent._then(successClear, failureClear, + undefined, handleWrapper, undefined); + ret._setOnCancel(handleWrapper); + } else { + ret = this._then(successClear, failureClear, + undefined, handleWrapper, undefined); + } + + return ret; +}; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/using.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/using.js new file mode 100644 index 0000000..65de531 --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/using.js @@ -0,0 +1,226 @@ +"use strict"; +module.exports = function (Promise, apiRejection, tryConvertToPromise, + createContext, INTERNAL, debug) { + var util = require("./util"); + var TypeError = require("./errors").TypeError; + var inherits = require("./util").inherits; + var errorObj = util.errorObj; + var tryCatch = util.tryCatch; + var NULL = {}; + + function thrower(e) { + setTimeout(function(){throw e;}, 0); + } + + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && + typeof thenable._isDisposable === "function" && + typeof thenable._getDisposer === "function" && + thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret = new Promise(INTERNAL); + function iterator() { + if (i >= len) return ret._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise && + maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise); + } catch (e) { + return thrower(e); + } + if (maybePromise instanceof Promise) { + return maybePromise._then(iterator, thrower, + null, null, null); + } + } + iterator(); + } + iterator(); + return ret; + } + + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + + Disposer.prototype.data = function () { + return this._data; + }; + + Disposer.prototype.promise = function () { + return this._promise; + }; + + Disposer.prototype.resource = function () { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== undefined) context._pushContext(); + var ret = resource !== NULL + ? this.doDispose(resource, inspection) : null; + if (context !== undefined) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret; + }; + + Disposer.isDisposer = function (d) { + return (d != null && + typeof d.resource === "function" && + typeof d.tryDispose === "function"); + }; + + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits(FunctionDisposer, Disposer); + + FunctionDisposer.prototype.doDispose = function (resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length-1] = null; + } + + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise) { + item.cancel(); + } + } + }; + + Promise.using = function () { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using"); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise) { + resource = + maybePromise._then(maybeUnwrapDisposer, null, null, { + resources: resources, + index: i + }, undefined); + } + } + resources[i] = resource; + } + + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise.resolve(resources[i]).reflect(); + } + + var resultPromise = Promise.all(reflectedResources) + .then(function(inspections) { + for (var i = 0; i < inspections.length; ++i) { + var inspection = inspections[i]; + if (inspection.isRejected()) { + errorObj.e = inspection.error(); + return errorObj; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i] = inspection.value(); + } + promise._pushContext(); + + fn = tryCatch(fn); + var ret = spreadArgs + ? fn.apply(undefined, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, promiseCreated, "Promise.using", promise); + return ret; + }); + + var promise = resultPromise.lastly(function() { + var inspection = new Promise.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + + Promise.prototype._setDisposable = function (disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + + Promise.prototype._isDisposable = function () { + return (this._bitField & 131072) > 0; + }; + + Promise.prototype._getDisposer = function () { + return this._disposer; + }; + + Promise.prototype._unsetDisposable = function () { + this._bitField = this._bitField & (~131072); + this._disposer = undefined; + }; + + Promise.prototype.disposer = function (fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError(); + }; + +}; diff --git a/server/node_modules/unzipper/node_modules/bluebird/js/release/util.js b/server/node_modules/unzipper/node_modules/bluebird/js/release/util.js new file mode 100644 index 0000000..84c28ec --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/js/release/util.js @@ -0,0 +1,379 @@ +"use strict"; +var es5 = require("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var l = 8; + while (l--) new FakeConstructor(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"; +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version = process.versions.node.split(".").map(Number); + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; diff --git a/server/node_modules/unzipper/node_modules/bluebird/package.json b/server/node_modules/unzipper/node_modules/bluebird/package.json new file mode 100644 index 0000000..daa97cf --- /dev/null +++ b/server/node_modules/unzipper/node_modules/bluebird/package.json @@ -0,0 +1,100 @@ +{ + "_from": "bluebird@~3.4.1", + "_id": "bluebird@3.4.7", + "_inBundle": false, + "_integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "_location": "/unzipper/bluebird", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bluebird@~3.4.1", + "name": "bluebird", + "escapedName": "bluebird", + "rawSpec": "~3.4.1", + "saveSpec": null, + "fetchSpec": "~3.4.1" + }, + "_requiredBy": [ + "/unzipper" + ], + "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "_shasum": "f72d760be09b7f76d08ed8fae98b289a8d05fab3", + "_spec": "bluebird@~3.4.1", + "_where": "/home/sigonasr2/divar/server/node_modules/unzipper", + "author": { + "name": "Petka Antonov", + "email": "petka_antonov@hotmail.com", + "url": "http://github.com/petkaantonov/" + }, + "browser": "./js/browser/bluebird.js", + "bugs": { + "url": "http://github.com/petkaantonov/bluebird/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Full featured Promises/A+ implementation with exceptionally good performance", + "devDependencies": { + "acorn": "~0.6.0", + "baconjs": "^0.7.43", + "bluebird": "^2.9.2", + "body-parser": "^1.10.2", + "browserify": "^8.1.1", + "cli-table": "~0.3.1", + "co": "^4.2.0", + "cross-spawn": "^0.2.3", + "glob": "^4.3.2", + "grunt-saucelabs": "~8.4.1", + "highland": "^2.3.0", + "istanbul": "^0.3.5", + "jshint": "^2.6.0", + "jshint-stylish": "~0.2.0", + "kefir": "^2.4.1", + "mkdirp": "~0.5.0", + "mocha": "~2.1", + "open": "~0.0.5", + "optimist": "~0.6.1", + "rimraf": "~2.2.6", + "rx": "^2.3.25", + "serve-static": "^1.7.1", + "sinon": "~1.7.3", + "uglify-js": "~2.4.16" + }, + "files": [ + "js/browser", + "js/release", + "LICENSE" + ], + "homepage": "https://github.com/petkaantonov/bluebird", + "keywords": [ + "promise", + "performance", + "promises", + "promises-a", + "promises-aplus", + "async", + "await", + "deferred", + "deferreds", + "future", + "flow control", + "dsl", + "fluent interface" + ], + "license": "MIT", + "main": "./js/release/bluebird.js", + "name": "bluebird", + "repository": { + "type": "git", + "url": "git://github.com/petkaantonov/bluebird.git" + }, + "scripts": { + "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js", + "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify", + "istanbul": "istanbul", + "lint": "node scripts/jshint.js", + "prepublish": "npm run generate-browser-core && npm run generate-browser-full", + "test": "node tools/test.js" + }, + "version": "3.4.7" +} diff --git a/server/package-lock.json b/server/package-lock.json index d32bf9e..16d4cdc 100755 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -116,6 +116,11 @@ "safer-buffer": "~2.1.0" } }, + "assert-options": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/assert-options/-/assert-options-0.7.0.tgz", + "integrity": "sha512-7q9uNH/Dh8gFgpIIb9ja8PJEWA5AQy3xnBC8jtKs8K/gNVCr1K6kIvlm59HUyYgvM7oEDoLzGgPcGd9FqhtXEQ==" + }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -179,9 +184,9 @@ } }, "bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "body-parser": { "version": "1.19.0", @@ -547,6 +552,16 @@ "busboy": "^0.3.1" } }, + "express-promise-router": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/express-promise-router/-/express-promise-router-4.1.0.tgz", + "integrity": "sha512-nvg0X1Rj8oajPPC+fG3t4e740aNmQZRZY6dRLbiiM56Dvd8213RJ4kaxhZVTdQLut+l4DZdfeJkyx2VENPMBdw==", + "requires": { + "is-promise": "^4.0.0", + "lodash.flattendeep": "^4.0.0", + "methods": "^1.0.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -783,6 +798,11 @@ "number-is-nan": "^1.0.0" } }, + "is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -844,6 +864,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1194,11 +1219,58 @@ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" }, + "pg-minify": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/pg-minify/-/pg-minify-1.6.2.tgz", + "integrity": "sha512-1KdmFGGTP6jplJoI8MfvRlfvMiyBivMRP7/ffh4a11RUFJ7kC2J0ZHlipoKiH/1hz+DVgceon9U2qbaHpPeyPg==" + }, "pg-pool": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.1.tgz", "integrity": "sha512-BQDPWUeKenVrMMDN9opfns/kZo4lxmSWhIqo+cSAF7+lfi9ZclQbr9vfnlNaPr8wYF3UYjm5X0yPAhbcgqNOdA==" }, + "pg-promise": { + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/pg-promise/-/pg-promise-10.11.1.tgz", + "integrity": "sha512-HAv32WSKf2m2RqHerW5RmANn/mcXIwWXbg/gOfGQcoS0SE+8iBi3Jj4JmoR4PNzSEozo/y/npy4e6F16psOItw==", + "requires": { + "assert-options": "0.7.0", + "pg": "8.7.1", + "pg-minify": "1.6.2", + "spex": "3.2.0" + }, + "dependencies": { + "pg": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", + "integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.4.1", + "pg-protocol": "^1.5.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + }, + "pg-pool": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", + "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==" + }, + "pg-protocol": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" + } + } + }, "pg-protocol": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.2.4.tgz", @@ -1519,6 +1591,11 @@ "simple-concat": "^1.0.0" } }, + "spex": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spex/-/spex-3.2.0.tgz", + "integrity": "sha512-9srjJM7NaymrpwMHvSmpDeIK5GoRMX/Tq0E8aOlDPS54dDnDUIp30DrP9SphMPEETDLzEM9+4qo+KipmbtPecg==" + }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -1718,6 +1795,11 @@ "setimmediate": "~1.0.4" }, "dependencies": { + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", diff --git a/server/package.json b/server/package.json index 46b10c3..054e94f 100755 --- a/server/package.json +++ b/server/package.json @@ -10,14 +10,17 @@ "license": "ISC", "dependencies": { "axios": "^0.21.1", + "bluebird": "^3.7.2", "canvas": "^2.6.1", "child_process": "^1.0.2", "connect-timeout": "^1.9.0", "express": "^4.17.1", "express-fileupload": "^1.1.9", + "express-promise-router": "^4.1.0", "moment": "^2.27.0", "nodemailer": "^6.4.11", "pg": "^8.2.1", + "pg-promise": "^10.11.1", "quickchart-js": "^1.0.6", "request": "^2.88.2", "twitch-get-stream": "^0.6.0", diff --git a/server/routes/d4dj-routes.js b/server/routes/d4dj-routes.js old mode 100755 new mode 100644 index 8054f51..620abb0 --- a/server/routes/d4dj-routes.js +++ b/server/routes/d4dj-routes.js @@ -1,1383 +1,584 @@ -const { app } = require("../app.js"); +const { app, db } = require("../app.js"); +const { ScoreIsSanitary } = require("./utils/submit.js"); +const { Prediction } = require("./utils/prediction"); const moment = require("moment"); +const Promise = require("bluebird"); -var lastscores_JP = {}; +var lastscores = { + jp: {}, + en: {} +} +// hi +var tableValues = {}; +var en_tableValues = {}; -var lastscores_EN = {}; -const EVENTID_EN = 23; -var EVENTSTART_EN = moment("2021-06-28 03:00:00+00"); -var EVENTEND_EN = moment("2021-07-06 11:59:59+00"); -app.post("/eventsubmit", async function (req, res) { - db = req.db +var lastCachedDate = moment().add(-1, "hour"); +var en_lastCachedDate = moment().add(-1, "hour"); + +var tiers = [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 50, 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, +]; - const eventData = await req.db.query( - "select eventid, startdate, enddate from event order by id desc limit 1" - ).then((data) => data.rows[0]); +const models = { + jp: new Prediction(), + en: new Prediction() +} - const EVENTID = eventData.eventid; - const EVENTSTART = moment(eventData.startdate); - const EVENTEND = moment(eventData.enddate); +var cachedEvent = { + jp: undefined, + en: undefined +} - const lastscores = req.query.en ? lastscores_EN : lastscores_JP; - function submit() { - if (req.query.en) { - lastscores_EN[req.body.rank] = Number(req.body.points); - } else { - lastscores_JP[req.body.rank] = Number(req.body.points); +const getEventData = async (db, server = "jp") => { + if (cachedEvent[server] && moment().isBefore(cachedEvent[server].EVENTEND)) { + return cachedEvent[server]; } - req.db.query( - "insert into " + - (req.query.en ? "en_" : "") + - "eventdata(eventid,rank,date,name,description,points,playerId) values($1,$2,$3,$4,$5,$6,$7) returning *;", - [ - req.body.eventid, - req.body.rank, - req.body.date - ? req.body.date - : req.body.fin - ? moment(EVENTEND).add(5, "minutes").format("YYYY-MM-DD HH:mm:ssZ") - : new Date(), - req.body.name, - req.body.description, - req.body.points, - req.body.playerid - ] - ) - .then((data) => { - if (data.rows.length > 0) { - res.status(200).send("Submitted."); - } else { - res.status(500).send("Failed to submit."); - } - }) - .catch((err) => { - res.status(500).send(`${err.message}`); - }); - } + const eventData = await db.query( + `select eventid, startdate, enddate, rank_end from ${server === "en" ? "en_" : ""}event order by id desc limit 1` + ).then((data) => data.rows[0]); - //add to table. + if (!eventData) return {}; - function FurtherTierIsOkay(tier, scores, points) { - var tiers = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, - 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, - ]; - if (tier <= 1) { - return true; - } else { - //Find the previous tier. - var previousTier = -1; - for (var i = 0; i < tiers.length; i++) { - if (tiers[i] == tier) { - previousTier = tiers[i - 1]; - } - } - if (previousTier == -1) { - console.log("Something weird happened...."); - return false; //Something terrible happened. - } else if (!scores[tier]) { - return true; //It's okay since no score is submitted yet. - } else { - return points < scores[previousTier]; //If it's greater something's wrong... - } - } - } + const EVENTID = eventData.eventid; + const EVENTSTART = moment(eventData.startdate); + const EVENTEND = moment(eventData.enddate); - function EndsWithZeroes(str) { - var zeroCount = 0; - var string = String(str); - for (var i = 0; i < string.length; i++) { - if (string[i] == "0") { - zeroCount++; - } else { - zeroCount = 0; - } + if (moment().isAfter(EVENTEND)) { + cachedEvent[server] = undefined; + return { EVENTID: EVENTID + 1 } } - return zeroCount >= 2; - } - function ScoreIsSanitary(rank, name, description, points) { - if (Number(rank) <= 20) { - return true; - } else { - if ( - EndsWithZeroes(name) || - EndsWithZeroes(description) || - EndsWithZeroes(points) - ) { - return false; - } else { - return true; - } + const data = { + EVENTID, + EVENTSTART, + EVENTEND, + RANK_END: eventData.rank_end } - } + cachedEvent[server] = data; - //Try to update last scores. - db.query( - "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + - (req.query.en ? "en_" : "") + - "eventdata where eventid=" + - EVENTID + - " order by rank,date desc)t order by rank,date desc" - ).then((data) => { - if ( - !lastscores[req.body.rank] || - /*FurtherTierIsOkay(req.body.rank,lastscores,req.body.points)&&*/ (lastscores[ - req.body.rank - ] < req.body.points && - (req.body.fin || - ScoreIsSanitary( - req.body.rank, - req.body.name, - req.body.description, - req.body.points - ))) /*||(lastscores[req.body.rank] 0) { - data.rows.map((row) => { - lastscores[row.rank] = row.points; - }); + return data +} + +app.post("/create-event", async (req, res) => { + try { + const test = await db.query(`select eventid from ${req.query.en ? "en_" : ""}event where eventid=$1`, [req.body.eventid]) + if (test.rows.length > 0) return res.status(400).send("Sorry bro event exists"); + console.log(req.body); + await db.query( + `insert into ${req.query.en ? "en_" : ""}event (eventid, name, startdate, enddate, rank_end, type) values ($1,$2,$3,$4,$5,$6) returning *;` + , [ + req.body.eventid, + req.body.name, + moment(req.body.startdate).format("YYYY-MM-DD HH:mm:ssZ"), + moment(req.body.enddate).format("YYYY-MM-DD HH:mm:ssZ"), + moment(req.body.rank_end).format("YYYY-MM-DD HH:mm:ssZ"), + req.body.type + ]) + const initialData = tiers.map(t => ({ eventid: req.body.eventid, rank: t, date: moment(req.body.startdate), name: "Towa", description: "TowaTowa", points: 0, playerid: null })) + const promises = initialData.map(data => db.query( + "insert into " + + (req.query.en ? "en_" : "") + + "eventdata(eventid,rank,date,name,description,points,playerId) values ($1,$2,$3,$4,$5,$6,$7) returning *;", + [data.eventid, data.rank, data.date, data.name, data.description, data.points, data.playerid] + )) + + model[req.query.en ? "en" : "jp"] = new Prediction() + + await Promise.all(promises); + return res.status(200).send("Thanks bro"); + } catch (err) { + return res.status(500).send("Something went wrong"); } - }); }); -app.get("/eventdata", function (req, res) { - var eventinfo = []; - db = req.db; - db.query( - "select * from " + - (req.query.en ? "en_" : "") + - "event order by id desc limit 1" - ) - .then((data) => { - eventinfo = data.rows; - if (!req.query.event) { - return db.query( - "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + - (req.query.en ? "en_" : "") + - "eventdata where eventid=$1 order by rank,date desc)t order by rank,date desc;", - [ - moment(eventinfo[0].startdate).isBefore(moment()) - ? eventinfo[0].eventid - : eventinfo[0].eventid - 1, - ] - ); - } else { - } - }) - .then((data) => { - var finaldata = data.rows; - var tiers = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 50, 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, - ]; - for (t of tiers) { - //console.log(t) - //if (finaldata[String(t)]===undefined) {finaldata[String(t)]={"rank":t,"eventid":eventinfo[0].eventid,"name":"","description":"","date":eventinfo[0].startdate,"points":0}} - var found = false; - for (i in finaldata) { - //console.log(finaldata[i].rank) - if (finaldata[i].rank === t) { - found = true; - break; - } +app.post("/eventsubmit", async function (req, res) { + const { EVENTID, EVENTSTART, EVENTEND } = await getEventData(db, req.query.en ? "en" : "jp") + + if (!EVENTID || !EVENTSTART) return res.status(404).send("event_not_found"); + + async function submit(data) { + lastscores[req.query.en ? "en" : "jp"] = Number(req.body.points); + const getInsertData = (obj) => { + return { + eventid: obj.eventid, + rank: obj.rank, + date: obj.date ? obj.date + : obj.fin + ? moment(EVENTEND).add(5, "minutes").format("YYYY-MM-DD HH:mm:ssZ") + : new Date(), + name: obj.name, + description: obj.description, + points: obj.points, + playerid: obj.playerid + } } - if (!found) { - finaldata = [ - ...finaldata, - { - rank: t, - eventid: eventinfo[0].eventid, - name: "", - description: "", - date: eventinfo[0].startdate, - points: 0, - }, - ]; + try { + const toInsert = Array.isArray(data) ? data.map(getInsertData) : getInsertData(data); + const promises = (Array.isArray(toInsert) ? toInsert : [toInsert]).map(data => db.query( + "insert into " + + (req.query.en ? "en_" : "") + + "eventdata(eventid,rank,date,name,description,points,playerId) values ($1,$2,$3,$4,$5,$6,$7) returning *;", + [data.eventid, data.rank, data.date, data.name, data.description, data.points, data.playerid] + )) + + const resData = await Promise.all(promises); + if (resData.every(d => d.rows.length > 0)) { + res.status(200).send("Submitted."); + } else { + res.status(500).send("Failed to submit."); + } + } catch (err) { + res.status(500).send(`${err.stack}`); } - } - res.status(200).json(finaldata); - }) - .catch((err) => { - res.status(500).send(err.message); - }); -}); - -app.get("/eventdata/t50", function (req, res) { - var eventinfo = []; - db = req.db - db.query( - "select * from " + - (req.query.en ? "en_" : "") + - "event order by id desc limit 1" - ) - .then((data) => { - eventinfo = data.rows; - return db.query( + } + const oldData = await db.query( "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + (req.query.en ? "en_" : "") + - "eventdata where rank>20 and eventid=$1 order by rank,date desc)t order by rank,date desc;", - [ - moment(eventinfo[0].rank_end).isBefore(moment()) - ? eventinfo[0].eventid - : eventinfo[0].eventid - 1, - ] - ); - }) - .then((data) => { - return res.status(200).json(data.rows); + "eventdata where eventid=" + + EVENTID + + " order by rank,date desc)t order by rank,date desc" + ); + + const data = req.body.batch ? req.body.batch : [req.body]; + const dataToUpdate = data.filter(d => { + return !lastscores[req.query.en ? "en" : "jp"][d.rank] || + /*FurtherTierIsOkay(req.body.rank,lastscores,req.body.points)&&*/ (lastscores[ + d.rank + ] < d.points && + (d.fin || + ScoreIsSanitary( + d.rank, + d.name, + d.description, + d.points + ))) /*||(lastscores[req.body.rank] { - res.status(500).send(err.message); - }); + if (dataToUpdate && dataToUpdate.length > 0) { + submit(dataToUpdate); + } else { + res.status(200).send("No update required."); + } + if (oldData.rows && oldData.rows.length > 0) { + oldData.rows.map((row) => { + lastscores[req.query.en ? "en" : "jp"][row.rank] = row.points; + }); + } }); -app.get("/eventdata/t20", async function (req, res) { - var eventinfo = []; - var eventinfo_en = []; - - db = req.db - - const eventData = await req.db.query( - "select eventid, startdate, enddate from event order by id desc limit 1" - ).then((data) => data.rows[0]); - - const EVENTID = eventData.eventid; - const EVENTSTART = moment(eventData.startdate); - const EVENTEND = moment(eventData.enddate); - - if (req.query.date && req.query.rank) { - db.query( - "select * from " + - (req.query.en ? "en_" : "") + - "eventdata where date<=$1 and rank=$2 and eventid=$3 order by date desc limit 1;", - [req.query.date, req.query.rank, req.query.eventid] - ) - .then((data) => { - res.status(200).json(data.rows); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } else if (req.query.luminous) { - db.query( - "select * from " + - (req.query.en ? "en_" : "") + - "eventdata where (date>='2021-02-17 23:36:16.383+00' and date<'2021-02-19 15:35:16.716+00' and rank=12) or (date>='2021-02-19 15:35:16.716+00' and rank=11) and eventid=10 order by id asc;" - ) - .then((data) => { - res.status(200).json(data.rows); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } else if (req.query.all && req.query.event) { - db.query( - "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + - (req.query.en ? "en_" : "") + - "eventdata where eventid=$1 order by date asc)t", - [req.query.event] - ) - .then((data) => { - res.status(200).json(data.rows); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } else if (req.query.tier && req.query.event) { +app.get("/eventdata", function (req, res) { + var eventinfo = []; db.query( - "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + - (req.query.en ? "en_" : "") + - "eventdata where eventid=$1 and rank=$2 order by date desc)t", - [req.query.event, req.query.tier] - ) - .then((data) => { - res.status(200).json(data.rows); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } else if (req.query.chart) { - function RandomQuestion() { - var value = Math.random(); - if (value <= 0.7) { - return "???"; - } else if (value <= 0.9) { - return "Miyu"; - } else if (value <= 0.95) { - return "Muni"; - } else { - return "MuniMuni"; - } - } - if ( - req.query.event || - moment().diff(lastCachedDate, "minutes") >= 1 || - (req.query.force && moment().diff(lastCachedDate, "seconds") >= 10) - ) { - chartData = {}; - predictionChartData = {}; - diffData = []; - db.query( "select * from " + (req.query.en ? "en_" : "") + "event order by id desc limit 1" - ) + ) .then((data) => { - eventinfo = data.rows; - return db.query( - "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + - (req.query.en ? "en_" : "") + - "eventdata where eventid=$1 order by date asc)t", - [ - req.query.event - ? req.query.event - : moment(eventinfo[0].rank_end).isBefore(moment()) - ? eventinfo[0].eventid - : eventinfo[0].eventid - 1, - ] - ); + eventinfo = data.rows; + if (!req.query.event) { + return db.query( + "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + + (req.query.en ? "en_" : "") + + "eventdata where eventid=$1 order by rank,date desc)t order by rank,date desc;", + [ + moment(eventinfo[0].startdate).isBefore(moment()) + ? eventinfo[0].eventid + : eventinfo[0].eventid - 1, + ] + ); + } else { + } }) .then((data) => { - if (data && data.rows && data.rows.length > 0) { - data.rows.map((obj) => { - if (req.query.en) { - if (en_chartData[obj.rank]) { - en_chartData[obj.rank] = [...en_chartData[obj.rank], obj]; - } else { - en_chartData[obj.rank] = [obj]; - } - } else { - if (chartData[obj.rank]) { - chartData[obj.rank] = [...chartData[obj.rank], obj]; - } else { - chartData[obj.rank] = [obj]; - } - } - }); - SetupPredictionModel(EVENTSTART); - var tiers = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 50, 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, - ]; - if (req.query.en) { - for (t of tiers) { - CreatePrediction(1, t, req.query.en, EVENTSTART, EVENTSTART_EN, EVENTEND, EVENTEND_EN); - var est = GetEstimate(t, req.query.en); - var temprate = 0; - if (en_chartData[t]) { - temprate = - t <= 20 - ? en_chartData[t] - ? Math.ceil(GetRate(t, req.query.en)) - : undefined - : Math.ceil( - GetRank(t, req.query.en) / - (moment( - en_chartData[t][en_chartData[t].length - 1].date - ).diff(eventStartEn, "minutes") / - 60) - ); - } - var tempname = ""; - if ( - en_chartData[t] && - en_chartData[t][en_chartData[t].length - 1] && - en_chartData[t][en_chartData[t].length - 1].name - ) { - tempname = en_chartData[t][en_chartData[t].length - 1].name; - } - var tempdesc = ""; - if ( - en_chartData[t] && - en_chartData[t][en_chartData[t].length - 1] && - en_chartData[t][en_chartData[t].length - 1].description - ) { - tempdesc = - en_chartData[t][en_chartData[t].length - 1].description; - } - en_tableValues[t] = { - points: GetRank(t, req.query.en), - lastUpdate: GetTime(t, req.query.en), - lastUpdateColor: GetUpdateColor(t, req.query.en), - rate: temprate ? temprate : 0, - count: GetPointCount(t, req.query.en), - name: tempname, - description: tempdesc, - estimate: Number.isInteger(est) ? Math.ceil(est) : est, - prediction: - en_predictionChartData[t] && moment().isBefore(EVENTEND_en) - ? en_predictionChartData[t][ - en_predictionChartData[t].length - 1 - ].y - : RandomQuestion(), - }; - } - lastCachedDate = moment(); - res.status(200).send({ - predictionData: en_predictionChartData, - statistics: tableValues, - }); - } else { - for (t of tiers) { - CreatePrediction(1, t, req.query.en, EVENTSTART, EVENTSTART_EN, EVENTEND, EVENTEND_EN); - var est = GetEstimate(t, req.query.en); - var temprate = 0; - if (chartData[t]) { - temprate = - t <= 20 - ? chartData[t] - ? Math.ceil(GetRate(t)) - : undefined - : Math.ceil( - GetRank(t) / - (moment( - chartData[t][chartData[t].length - 1].date - ).diff(EVENTSTART, "minutes") / - 60) - ); - } - var tempname = ""; - if ( - chartData[t] && - chartData[t][chartData[t].length - 1] && - chartData[t][chartData[t].length - 1].name - ) { - tempname = chartData[t][chartData[t].length - 1].name; - } - var tempdesc = ""; - if ( - chartData[t] && - chartData[t][chartData[t].length - 1] && - chartData[t][chartData[t].length - 1].description - ) { - tempdesc = chartData[t][chartData[t].length - 1].description; + var finaldata = data.rows; + for (t of tiers) { + //console.log(t) + //if (finaldata[String(t)]===undefined) {finaldata[String(t)]={"rank":t,"eventid":eventinfo[0].eventid,"name":"","description":"","date":eventinfo[0].startdate,"points":0}} + const found = finaldata.some(data => data.rank === t); + if (!found) { + finaldata = [ + ...finaldata, + { + rank: t, + eventid: eventinfo[0].eventid, + name: "", + description: "", + date: eventinfo[0].startdate, + points: 0, + }, + ]; } - tableValues[t] = { - points: GetRank(t), - lastUpdate: GetTime(t), - lastUpdateColor: GetUpdateColor(t), - rate: temprate ? temprate : 0, - count: GetPointCount(t), - name: tempname, - description: tempdesc, - estimate: Number.isInteger(est) ? Math.ceil(est) : est, - prediction: - predictionChartData[t] && moment().isBefore(EVENTEND) - ? predictionChartData[t][ - predictionChartData[t].length - 1 - ].y - : RandomQuestion(), - }; - } - lastCachedDate = moment(); - res.status(200).send({ - predictionData: predictionChartData, - statistics: tableValues, - }); } - } else { - if (req.query.en) { - res.status(200).send({ - predictionData: en_predictionChartData, - statistics: en_tableValues, - }); - } else { - res.status(200).send({ - predictionData: predictionChartData, - statistics: tableValues, - }); - } - } + res.status(200).json(finaldata); }) .catch((err) => { - res.status(500).send(err.message); - }); - } else { - if (req.query.en) { - res.status(200).send({ - predictionData: en_predictionChartData, - statistics: en_tableValues, + res.status(500).send(err.message); }); - } else { - res.status(200).send({ - predictionData: predictionChartData, - statistics: tableValues, - }); - } - } - } else { - db.query("select * from event order by id desc limit 1") - .then((data) => { - eventinfo = data.rows; - return db.query( - "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + - (req.query.en ? "en_" : "") + - "eventdata where rank<=20 and eventid=$1 order by rank,date desc)t order by rank,date desc;", - [ - moment(eventinfo[0].rank_end).isBefore(moment()) - ? eventinfo[0].eventid - : eventinfo[0].eventid - 1, - ] - ); - }) - .then((data) => { - var finaldata = data.rows; - var tiers = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - ]; - //RunRankingUpdate() - for (t of tiers) { - //console.log(t) - //if (finaldata[String(t)]===undefined) {finaldata[String(t)]={"rank":t,"eventid":eventinfo[0].eventid,"name":"","description":"","date":eventinfo[0].startdate,"points":0}} - var found = false; - for (i in finaldata) { - //console.log(finaldata[i].rank) - if (finaldata[i].rank === t) { - found = true; - var temprate = chartData[t] ? Math.ceil(GetRate(t)) : undefined; - if (!temprate) { - finaldata[i].rate = "???"; - } else { - finaldata[i].rate = temprate; - } - //finaldata[i].name="Muni"; - /*if (rankings[t]) { - finaldata[i].name=rankings[t] - }*/ - break; - } - } - if (!found) { - finaldata = [ - ...finaldata, - { - rate: 0, - rank: t, - eventid: eventinfo[0].eventid, - name: "", - description: "", - date: eventinfo[0].startdate, - points: 0, - }, - ]; - } - } - if (req.query.maxspeed) { - res.status(200).json([...finaldata, { maxspeed: MAXSPEED }]); - } else { - res.status(200).json(finaldata); - } - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } -}); - -app.get("/ev", function (req, res) { - db = req.db - if (req.query.all) { - db.query( - "select * from " + (req.query.en ? "en_" : "") + "event order by id desc;" - ) - .then((data) => { - res.status(200).send(data.rows); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } else { - db.query( - "select * from " + - (req.query.en ? "en_" : "") + - "event order by id desc limit 1;" - ) - .then((data) => { - res.status(200).send(data.rows[0]); - }) - .catch((err) => { - res.status(500).send(err.message); - }); - } }); -var chartData = {}; -var predictionChartData = {}; - -var diffData = []; - -var en_chartData = {}; -var en_predictionChartData = {}; - -var en_diffData = []; - -const PREDICTIONS = true; - -const en_PREDICTIONS = true; - -var lastCachedDate = moment().add(-1, "hour"); - -var en_lastCachedDate = moment().add(-1, "hour"); - -const nyoomfactor = { - //Percentage of original speed to use when nyoom'ing - 1: 1.0, - 2: 1.0, - 3: 1.0, - 4: 1.0, - 5: 1.0, - 6: 1.0, - 7: 1.0, - 8: 1.0, - 9: 1.0, - 10: 1.0, - 11: 1.0, - 12: 0.9, - 13: 0.7, - 14: 0.5, - 15: 0.3, - 16: 0.3, - 17: 0.3, - 18: 0.3, - 19: 0.3, - 20: 0.3, - 50: 0.81, - 100: 0.76, - 500: 0.28, - 1000: 0.24, - 2000: 0.09, - 5000: 0.07, - 10000: 0.04, - 20000: 0.02, -}; - -const slowdownFactor = { - //Percentage of slowdown per hour. - 1: 0.00001, - 2: 0.00003, - 3: 0.00003, - 4: 0.00005, - 5: 0.00005, - 6: 0.00005, - 7: 0.00005, - 8: 0.00005, - 9: 0.00005, - 10: 0.00005, - 11: 0.00005, - 12: 0.00006, - 13: 0.00007, - 14: 0.00008, - 15: 0.00009, - 16: 0.0001, - 17: 0.0001, - 18: 0.0001, - 19: 0.0001, - 20: 0.0001, - 50: 0.0002, - 100: 0.0003, - 500: 0.0004, - 1000: 0.0005, - 2000: 0.0005, - 5000: 0.0005, - 10000: 0.0005, - 20000: 0.0005, -}; - -var MAXSPEED = 0; - -function SetupPredictionModel(eventStart) { - if (chartData["1"] && chartData["1"].length > 400) { - MAXSPEED = Math.floor( - chartData["1"][400].points / - (moment(chartData["1"][400].date).diff(eventStart, "minutes") / 60) - ); - } else if (chartData["1"] && chartData["1"].length > 0) { - MAXSPEED = Math.floor( - chartData["1"][chartData["1"].length - 1].points / - (moment(chartData["1"][chartData["1"].length - 1].date).diff( - eventStart, - "minutes" - ) / - 60) - ); - } else { - MAXSPEED = 0; - } - if (en_chartData["1"] && en_chartData["1"].length > 400) { - MAXSPEED = Math.floor( - en_chartData["1"][400].points / - (moment(en_chartData["1"][400].date).diff(eventStart, "minutes") / 60) - ); - } else if (en_chartData["1"] && en_chartData["1"].length > 0) { - MAXSPEED = Math.floor( - en_chartData["1"][en_chartData["1"].length - 1].points / - (moment(en_chartData["1"][en_chartData["1"].length - 1].date).diff( - eventStart, - "minutes" - ) / - 60) - ); - } else { - MAXSPEED = 0; - } -} -const RATEDURATION = 2; //In hours. How much EP/hr is shown. - -function GetRate(rank, en, eventStart) { - if (en) { - if (en_chartData[rank].length > 2) { - var lastpoint = en_chartData[rank][en_chartData[rank].length - 1]; - for (var i = en_chartData[rank].length - 1; i >= 0; i--) { - var diff = moment().diff(en_chartData[rank][i].date, "hours"); - if (diff >= RATEDURATION) { - break; - } else { - lastpoint = en_chartData[rank][i]; - } - } - var timediff = moment( - en_chartData[rank][en_chartData[rank].length - 1].date - ).diff(moment(lastpoint.date), "minutes"); - if (timediff < 120) { - if (lastpoint === en_chartData[rank][en_chartData[rank].length - 1]) { - return "???"; - } else - return ( - (en_chartData[rank][en_chartData[rank].length - 1].points - - lastpoint.points) / - RATEDURATION - ); - } else { - return Math.ceil( - (en_chartData[rank][en_chartData[rank].length - 1].points - - lastpoint.points) / - (moment( - en_chartData[rank][en_chartData[rank].length - 1].date - ).diff(moment(lastpoint.date), "minutes") / - 60) - ); - } - } else { - if (en_chartData[rank].length > 0) { - var startPoint = en_chartData[rank][en_chartData[rank].length - 1]; - return Math.ceil( - GetRank(rank) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60) - ); - } else { - return 0; - } - } - } else { - if (chartData[rank].length > 2) { - var lastpoint = chartData[rank][chartData[rank].length - 1]; - for (var i = chartData[rank].length - 1; i >= 0; i--) { - var diff = moment().diff(chartData[rank][i].date, "hours"); - if (diff >= RATEDURATION) { - break; - } else { - lastpoint = chartData[rank][i]; - } - } - var timediff = moment( - chartData[rank][chartData[rank].length - 1].date - ).diff(moment(lastpoint.date), "minutes"); - if (timediff < 120) { - if (lastpoint === chartData[rank][chartData[rank].length - 1]) { - return "???"; - } else - return ( - (chartData[rank][chartData[rank].length - 1].points - - lastpoint.points) / - RATEDURATION - ); - } else { - return Math.ceil( - (chartData[rank][chartData[rank].length - 1].points - - lastpoint.points) / - (moment(chartData[rank][chartData[rank].length - 1].date).diff( - moment(lastpoint.date), - "minutes" - ) / - 60) - ); - } - } else { - if (chartData[rank].length > 0) { - var startPoint = chartData[rank][chartData[rank].length - 1]; - return Math.ceil( - GetRank(rank) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60) +app.get("/eventdata/t50", async function (req, res) { + try { + const { EVENTID, RANK_END } = await getEventData(db, req.query.en ? "en" : "jp") + const data = await db.query( + "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + + (req.query.en ? "en_" : "") + + "eventdata where rank>20 and eventid=$1 order by rank,date desc)t order by rank,date desc;", + [ + moment(RANK_END).isBefore(moment()) + ? EVENTID + : EVENTID - 1, + ] ); - } else { - return 0; - } - } - } -} - -function GetPointCount(rank, en) { - var pointCount = 1; - if (en) { - if (!en_chartData[rank]) { - return pointCount; - } - if (en_chartData[rank].length > 2) { - var lastpoint = en_chartData[rank][en_chartData[rank].length - 1]; - for (var i = en_chartData[rank].length - 1; i >= 0; i--) { - var diff = moment().diff(en_chartData[rank][i].date, "hours"); - if (diff >= RATEDURATION) { - break; - } else { - lastpoint = en_chartData[rank][i]; - pointCount++; - } - } - return pointCount; - } else { - if (en_chartData[rank].length > 0) { - return en_chartData[rank].length; - } else { - return pointCount; - } - } - } else { - if (!chartData[rank]) { - return pointCount; - } - if (chartData[rank].length > 2) { - var lastpoint = chartData[rank][chartData[rank].length - 1]; - for (var i = chartData[rank].length - 1; i >= 0; i--) { - var diff = moment().diff(chartData[rank][i].date, "hours"); - if (diff >= RATEDURATION) { - break; - } else { - lastpoint = chartData[rank][i]; - pointCount++; - } - } - return pointCount; - } else { - if (chartData[rank].length > 0) { - return chartData[rank].length; - } else { - return pointCount; - } + res.status(200).json(data.rows); + } catch (err) { + res.status(500).send(err.message); } - } -} +}); -function CreatePrediction(precision, rank, en, eventStart, eventEnd, eventStartEn, eventEndEn) { - if (en) { - if (!en_chartData[rank]) { - return []; - } - var startPoint = en_chartData[rank][en_chartData[rank].length - 1]; - if (rank <= 20) { - startPoint = { points: startPoint.points, date: moment() }; - } - var startTime = moment(startPoint.date); - if ( - en_PREDICTIONS && - startTime.diff(eventStartEn, "hours") > 36 && - moment(startPoint.date).diff(eventStartEn, "hours") >= 36 - ) { - //console.log(MAXSPEED) - //Precision is in hours. 1 is default - var finalChart = [ - { - y: en_chartData[rank][en_chartData[rank].length - 1].points, - x: en_chartData[rank][en_chartData[rank].length - 1].date, - }, - ]; - //Start from the time of the last reported rank. - var myPoints = startPoint.points; - var pointSpeed = Math.ceil( - GetRank(rank, en) / - (moment(startPoint.date).diff(eventStartEn, "minutes") / 60) - ); - var speedGoal = MAXSPEED * nyoomfactor[rank]; - while (startTime < EVENTEND_en) { - startTime.add(precision, "hours"); - myPoints += Math.floor(pointSpeed); - if (EVENTEND_en.diff(startTime, "hours") > 11) { - pointSpeed -= - pointSpeed * - (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; - } else { - pointSpeed = Math.max( - GetRank(rank, en) / - (moment(startPoint.date).diff(eventStartEn, "minutes") / 60), - Math.min( - (12 - EVENTEND_en.diff(startTime, "hours")) * (speedGoal / 5), - speedGoal - ) - ); - //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. - //console.log(pointSpeed) - } - finalChart = [ - ...finalChart, - { - y: Number.isInteger(myPoints) ? myPoints : "???", - x: moment(startTime), - }, - ]; - } - predictionen_chartData[rank] = finalChart; - return finalChart; - } else if ( - PREDICTIONS_en && - startTime.diff(eventStartEn, "hours") > 24 && - moment(startPoint.date).diff(eventStartEn, "hours") >= 24 - ) { - //console.log(MAXSPEED) - //Precision is in hours. 1 is default - var finalChart = [ - { - y: en_chartData[rank][en_chartData[rank].length - 1].points, - x: en_chartData[rank][en_chartData[rank].length - 1].date, - }, - ]; - //Start from the time of the last reported rank. - var myPoints = startPoint.points; - var pointSpeed = GetRate(rank, en); - var speedGoal = MAXSPEED * nyoomfactor[rank]; - while (startTime < EVENTEND_en) { - startTime.add(precision, "hours"); - myPoints += Math.floor(pointSpeed); - if (EVENTEND_en.diff(startTime, "hours") > 11) { - pointSpeed -= - pointSpeed * - (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; - } else { - pointSpeed = Math.max( - GetRank(rank, en) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60), - Math.min( - (12 - EVENTEND_en.diff(startTime, "hours")) * (speedGoal / 5), - speedGoal +app.get("/eventdata/t20", async function (req, res) { + const { EVENTID, RANK_END, EVENTSTART, EVENTEND } = await getEventData(db, req.query.en ? "en" : "jp") + + try { + if (req.query.date && req.query.rank) { + const data = await db.query( + "select * from " + + (req.query.en ? "en_" : "") + + "eventdata where date<=$1 and rank=$2 and eventid=$3 order by date desc limit 1;", + [req.query.date, req.query.rank, req.query.eventid] ) - ); - //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. - //console.log(pointSpeed) - } - finalChart = [ - ...finalChart, - { - y: Number.isInteger(myPoints) ? myPoints : "???", - x: moment(startTime), - }, - ]; - } - en_predictionChartData[rank] = finalChart; - return finalChart; - } else { - return []; - } - } else { - if (!chartData[rank]) { - return []; - } - var startPoint = chartData[rank][chartData[rank].length - 1]; - if (rank <= 20) { - startPoint = { points: startPoint.points, date: moment() }; - } - var startTime = moment(startPoint.date); - if ( - PREDICTIONS && - startTime.diff(eventStart, "hours") > 36 && - moment(startPoint.date).diff(eventStart, "hours") >= 36 - ) { - //console.log(MAXSPEED) - //Precision is in hours. 1 is default - var finalChart = [ - { - y: chartData[rank][chartData[rank].length - 1].points, - x: chartData[rank][chartData[rank].length - 1].date, - }, - ]; - //Start from the time of the last reported rank. - var myPoints = startPoint.points; - var pointSpeed = Math.ceil( - GetRank(rank) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60) - ); - var speedGoal = MAXSPEED * nyoomfactor[rank]; - while (startTime < EVENTEND) { - startTime.add(precision, "hours"); - myPoints += Math.floor(pointSpeed); - if (EVENTEND.diff(startTime, "hours") > 11) { - pointSpeed -= - pointSpeed * - (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; - } else { - pointSpeed = Math.max( - GetRank(rank) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60), - Math.min( - (12 - EVENTEND.diff(startTime, "hours")) * (speedGoal / 5), - speedGoal + res.status(200).json(data.rows); + } else if (req.query.all && req.query.event) { + const data = await db.query( + "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + + (req.query.en ? "en_" : "") + + "eventdata where eventid=$1 order by date asc)t", + [req.query.event] ) - ); - //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. - //console.log(pointSpeed) - } - finalChart = [ - ...finalChart, - { - y: Number.isInteger(myPoints) ? myPoints : "???", - x: moment(startTime), - }, - ]; - } - predictionChartData[rank] = finalChart; - return finalChart; - } else if ( - PREDICTIONS && - startTime.diff(eventStart, "hours") > 24 && - moment(startPoint.date).diff(eventStart, "hours") >= 24 - ) { - //console.log(MAXSPEED) - //Precision is in hours. 1 is default - var finalChart = [ - { - y: chartData[rank][chartData[rank].length - 1].points, - x: chartData[rank][chartData[rank].length - 1].date, - }, - ]; - //Start from the time of the last reported rank. - var myPoints = startPoint.points; - var pointSpeed = GetRate(rank); - var speedGoal = MAXSPEED * nyoomfactor[rank]; - while (startTime < EVENTEND) { - startTime.add(precision, "hours"); - myPoints += Math.floor(pointSpeed); - if (EVENTEND.diff(startTime, "hours") > 11) { - pointSpeed -= - pointSpeed * - (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; - } else { - pointSpeed = Math.max( - GetRank(rank) / - (moment(startPoint.date).diff(eventStart, "minutes") / 60), - Math.min( - (12 - EVENTEND.diff(startTime, "hours")) * (speedGoal / 5), - speedGoal + res.status(200).json(data.rows); + } else if (req.query.tier && req.query.event) { + const data = await db.query( + "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + + (req.query.en ? "en_" : "") + + "eventdata where eventid=$1 and rank=$2 order by date desc)t", + [req.query.event, req.query.tier] ) - ); - //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. - //console.log(pointSpeed) - } - finalChart = [ - ...finalChart, - { - y: Number.isInteger(myPoints) ? myPoints : "???", - x: moment(startTime), - }, - ]; - } - predictionChartData[rank] = finalChart; - return finalChart; - } else { - return []; - } - } -} - -function numberWithCommas(x) { - if (Number.isInteger(x)) { - var num_parts = x.toString().split("."); - num_parts[0] = num_parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); - return num_parts.join("."); - } else { - return x; - } -} - -function ChartData(rank, en, eventStart, eventEnd) { - if (en) { - if (!en_chartData[rank]) { - return [{ x: 0, y: 0 }]; - } - if (rank <= 20) { - return [ - ...en_chartData[rank].map((data) => { - return { x: data.date, y: data.points }; - }), - { - x: moment().isBefore(eventEnd) ? moment() : eventEnd, - y: en_chartData[rank][en_chartData[rank].length - 1].points, - }, - ]; - } else { - return [ - { x: eventStartEn, y: 0 }, - ...en_chartData[rank].map((data) => { - return { x: data.date, y: data.points }; - }), - ]; - } - } else { - if (!chartData[rank]) { - return [{ x: 0, y: 0 }]; - } - if (rank <= 20) { - return [ - ...chartData[rank].map((data) => { - return { x: data.date, y: data.points }; - }), - { - x: moment().isBefore(eventEnd) ? moment() : eventEnd, - y: chartData[rank][chartData[rank].length - 1].points, - }, - ]; - } else { - return [ - { x: eventStart, y: 0 }, - ...chartData[rank].map((data) => { - return { x: data.date, y: data.points }; - }), - ]; - } - } -} - -function GetRank(rank, en) { - if (en) { - if (en_chartData[rank]) { - return en_chartData[rank][en_chartData[rank].length - 1].points; - } else { - return "???"; - } - } else { - if (chartData[rank]) { - return chartData[rank][chartData[rank].length - 1].points; - } else { - return "???"; - } - } -} - -function GetEstimate(rank, en) { - if (en) { - if (en_predictionChartData[rank]) { - var currentEstimate = 0; - if ( - rank > 20 && - moment().diff( - moment(en_chartData[rank][en_chartData[rank].length - 1].date), - "hours" - ) > 0.5 - ) { - for (var i = en_predictionChartData[rank].length - 1; i >= 0; i--) { - if (moment(en_predictionChartData[rank][i].x).isAfter(moment())) { - currentEstimate = en_predictionChartData[rank][i].y; - } else { - break; - } - } - - return currentEstimate; - } else { - if (rank > 20) { - return GetRank(rank, en); + res.status(200).json(data.rows); + } else if (req.query.chart) { + function RandomQuestion() { + var value = Math.random(); + if (value <= 0.7) { + return "???"; + } else if (value <= 0.9) { + return "Miyu"; + } else if (value <= 0.95) { + return "Muni"; + } else { + return "MuniMuni"; + } + } + const model = models[req.query.en ? "en" : "jp"] + const cachedTime = req.query.en ? en_lastCachedDate : lastCachedDate + if ( + req.query.event || + moment().diff(cachedTime, "minutes") >= 1 || + (req.query.force && moment().diff(cachedTime, "seconds") >= 10) + ) { + data = await db.query( + "select * from (select lag(points) over (partition by rank order by date asc)-points difference,rank,eventid,date,name,points,playerid from " + + (req.query.en ? "en_" : "") + + "eventdata where eventid=$1 order by date asc)t", + [ + req.query.event + ? req.query.event + : moment(RANK_END).isBefore(moment()) + ? EVENTID + : EVENTID - 1, + ] + ); + if (data && data.rows && data.rows.length > 0) { + const newData = {} + + model.SetupPredictionModel(EVENTSTART); + data.rows.forEach((obj) => { + if (!newData[obj.rank]) { + newData[obj.rank] = []; + } + newData[obj.rank].push(obj) + }); + Object.entries(newData).forEach(([rank, values]) => { + model.chartData[rank] = values; + }) + var tiers = [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 50, 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, + ]; + for (t of tiers) { + model.CreatePrediction(1, t, EVENTSTART, EVENTEND); + var est = model.GetEstimate(t, req.query.en); + var temprate = 0; + const chartData = model.chartData; + const predictionChartData = model.predictionChartData; + if (chartData[t]) { + temprate = + t <= 20 + ? chartData[t] + ? Math.ceil(model.GetRate(t)) + : undefined + : Math.ceil( + model.GetRank(t) / + (moment( + chartData[t][chartData[t].length - 1].date + ).diff(EVENTSTART, "minutes") / + 60) + ); + } + const { tempname, tempdesc } = model.GetNameData(t) + if (req.query.en) { + en_tableValues[t] = { + points: model.GetRank(t), + lastUpdate: model.GetTime(t), + lastUpdateColor: model.GetUpdateColor(t), + rate: temprate ? temprate : 0, + count: model.GetPointCount(t), + name: tempname, + description: tempdesc, + estimate: Number.isInteger(est) ? Math.ceil(est) : est, + prediction: + predictionChartData[t] && moment().isBefore(EVENTEND) + ? predictionChartData[t][ + predictionChartData[t].length - 1 + ].y + : RandomQuestion(), + }; + en_lastCachedDate = moment(); + } else { + tableValues[t] = { + points: model.GetRank(t), + lastUpdate: model.GetTime(t), + lastUpdateColor: model.GetUpdateColor(t), + rate: temprate ? temprate : 0, + count: model.GetPointCount(t), + name: tempname, + description: tempdesc, + estimate: Number.isInteger(est) ? Math.ceil(est) : est, + prediction: + predictionChartData[t] && moment().isBefore(EVENTEND) + ? predictionChartData[t][ + predictionChartData[t].length - 1 + ].y + : RandomQuestion(), + }; + lastCachedDate = moment(); + } + } + } + } + res.status(200).send({ + predictionData: model.predictionChartData, + statistics: req.query.en ? en_tableValues : tableValues, + }); } else { - return "---"; + let finaldata = (await db.query( + "select distinct on (rank) rank,eventid,date,name,description,points,difference,playerid from (select lead(points) over (partition by rank order by rank,date desc)-points difference,* from " + + (req.query.en ? "en_" : "") + + "eventdata where rank<=20 and eventid=$1 order by rank,date desc)t order by rank,date desc;", + [ + moment(RANK_END).isBefore(moment()) + ? EVENTID + : EVENTID - 1, + ] + )).rows + var tiers = [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + ]; + const model = models[req.query.en ? "en" : "jp"] + const chartData = model.chartData + for (t of tiers) { + //console.log(t) + //if (finaldata[String(t)]===undefined) {finaldata[String(t)]={"rank":t,"eventid":eventinfo[0].eventid,"name":"","description":"","date":eventinfo[0].startdate,"points":0}} + var found = false; + for (i in finaldata) { + if (finaldata[i].rank === t) { + found = true; + var temprate = chartData[t] ? Math.ceil(model.GetRate(t)) : undefined; + if (!temprate) finaldata[i].rate = "???"; + else finaldata[i].rate = temprate; + break; + } + } + if (!found) { + finaldata = [ + ...finaldata, + { + rate: 0, + rank: t, + eventid: EVENTID, + name: "", + description: "", + date: EVENTSTART, + points: 0, + }, + ]; + } + } + if (req.query.maxspeed) { + res.status(200).json([...finaldata, { maxspeed: model.maxSpeed }]); + } else { + res.status(200).json(finaldata); + } } - } - } else { - return "???"; + } catch (err) { + res.status(500).send(err.stack); } - } else { - if (predictionChartData[rank]) { - var currentEstimate = 0; - if ( - rank > 20 && - moment().diff( - moment(chartData[rank][chartData[rank].length - 1].date), - "hours" - ) > 0.5 - ) { - for (var i = predictionChartData[rank].length - 1; i >= 0; i--) { - if (moment(predictionChartData[rank][i].x).isAfter(moment())) { - currentEstimate = predictionChartData[rank][i].y; - } else { - break; - } - } +}); - return currentEstimate; - } else { - if (rank > 20) { - return GetRank(rank); - } else { - return "---"; - } - } +app.get("/ev", function (req, res) { + if (req.query.all) { + db.query( + "select * from " + (req.query.en ? "en_" : "") + "event order by id desc;" + ) + .then((data) => { + res.status(200).send(data.rows); + }) + .catch((err) => { + res.status(500).send(err.message); + }); } else { - return "???"; + db.query( + "select * from " + + (req.query.en ? "en_" : "") + + "event order by id desc limit 1;" + ) + .then((data) => { + res.status(200).send(data.rows[0]); + }) + .catch((err) => { + res.status(500).send(err.message); + }); } - } -} +}); +app.get("/event/leaderboard", async function (req, res) { + let eventId = req.query.eventId + if (!eventId) { + const { EVENTID } = await getEventData(db, req.query.en ? "en" : "jp"); + eventId = EVENTID; + } + if (req.query.overview) { + const r = await db.query(`select distinct eventid, leaderboardtype,leaderboardid from ${req.query.en ? "en" : ""}event_leaderboards WHERE eventid=$1 ORDER BY eventid, leaderboardtype, leaderboardid`, [eventId]) + return res.status(200).send(r.rows); + } + const QUERY = `select * from ${req.query.en ? "en" : ""}event_leaderboards WHERE eventid=$1 ${req.query.leaderboardType ? "AND leaderboardtype=$2" : ""} ${req.query.leaderboardType && req.query.leaderboardId ? "AND leaderboardid=$3" : ""}` + try { + const data = await db.query(QUERY, [eventId, req.query.leaderboardType, req.query.leaderboardId].filter(e => !!e)); + res.status(200).send(data.rows); + } catch (e) { + console.log(e) + res.status(500).send("Oopsie"); + } +}) +app.post("/event/leaderboard", async function (req, res) { + const { EVENTID } = await getEventData(db, req.query.en ? "en" : "jp"); + if (!EVENTID) return res.status(400).send("Event Not Found") + const dataPoints = req.body.batch; + if (!dataPoints || dataPoints.length === 0) return res.status(401).send("No Data Point") + const QUERY = `insert into ${req.query.en ? "en" : ""}event_leaderboards (eventid, leaderboardtype, leaderboardid, rank, name, description, points, playerid, date) + VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9) + ON CONFLICT (eventid, leaderboardtype, leaderboardid, rank) DO UPDATE + SET name = excluded.name, + description = excluded.description, + points = excluded.points, + playerId = excluded.playerId, + date = excluded.date;` + const promises = dataPoints.forEach(data => { + const { eventId, leaderboardType, leaderboardId, rank, name, description, points, playerId, date } = data; + return db.query(QUERY, [ + eventId, + leaderboardType, + leaderboardId, + rank, + name, + description, + points, + playerId, + date || new Date() + ]) + }) + try { + await Promise.all(promises) + } catch (e) { -function GetTime(rank, en) { - if (en) { - if (en_chartData[rank]) { - return moment( - en_chartData[rank][en_chartData[rank].length - 1].date - ).fromNow(); - } else { - return ""; - } - } else { - if (chartData[rank]) { - return moment(chartData[rank][chartData[rank].length - 1].date).fromNow(); - } else { - return ""; - } - } -} -function GetUpdateColor(rank, en) { - if (en) { - if (en_chartData[rank]) { - return ( - "rgba(255," + - Math.max( - 255 - - moment().diff( - moment(en_chartData[rank][en_chartData[rank].length - 1].date), - "hours" - ) * - 3, - 0 - ) + - "," + - Math.max( - 255 - - moment().diff( - moment(en_chartData[rank][en_chartData[rank].length - 1].date), - "hours" - ) * - 3, - 0 - ) + - ",1)" - ); - } else { - return ""; - } - } else { - if (chartData[rank]) { - return ( - "rgba(255," + - Math.max( - 255 - - moment().diff( - moment(chartData[rank][chartData[rank].length - 1].date), - "hours" - ) * - 3, - 0 - ) + - "," + - Math.max( - 255 - - moment().diff( - moment(chartData[rank][chartData[rank].length - 1].date), - "hours" - ) * - 3, - 0 - ) + - ",1)" - ); - } else { - return ""; } - } -} - -var tableValues = {}; -var en_tableValues = {}; + return res.status(200).send("updated") +}); var rankings = { - 1: "Maho", - 2: "Shinobu", - 3: "Muni", - 4: "Rei", - 5: "Yuka", - 6: "Kyoko", - 7: "Esoran", - 8: "Rinku", - 9: "Ibuki", - 10: "Esora", - 11: "Noa", - 12: "Saki", - 13: "Towa", - 14: "Rika", - 15: "Aoi", - 16: "Kurumi", - 17: "Saori", - 18: "Hiiro", - 19: "Michiru", - 20: "Tsubaki", + 1: "Maho", + 2: "Shinobu", + 3: "Muni", + 4: "Rei", + 5: "Yuka", + 6: "Kyoko", + 7: "Esoran", + 8: "Rinku", + 9: "Ibuki", + 10: "Esora", + 11: "Noa", + 12: "Saki", + 13: "Towa", + 14: "Rika", + 15: "Aoi", + 16: "Kurumi", + 17: "Saori", + 18: "Hiiro", + 19: "Michiru", + 20: "Tsubaki", }; var lastRankingUpdate = moment(); var notPlaying = [ - "Dalia", - "Marika", - "Nyochio", - "Nagisa", - "Miyu", - "Haruna", - "Miiko", - "Airi", - "Mana", - "Shano", - "Touka", + "Dalia", + "Marika", + "Nyochio", + "Nagisa", + "Miyu", + "Haruna", + "Miiko", + "Airi", + "Mana", + "Shano", + "Touka", ]; function RunRankingUpdate() { - if (moment().diff(lastRankingUpdate, "minutes") >= 1) { - for (var i = 0; i < 20; i++) { - //Possibility to switch two positions. - var swap = false; - if (i == 0) { - if (Math.random() <= 0.01) { - swap = true; - } - } else if (Math.random() <= 0.05) { - swap = true; - } - if (swap) { - if (i < 19) { - var previousName = rankings[i + 1]; - var newName = rankings[i + 2]; - rankings[i + 1] = newName; - rankings[i + 2] = previousName; - } else { - //Bring in a new name, swap out the old. - var previousName = rankings[i + 1]; - var newRandomSlot = Math.floor(Math.random() * notPlaying.length); - var newName = notPlaying[newRandomSlot]; - rankings[i + 1] = newName; - notPlaying[newRandomSlot] = previousName; + if (moment().diff(lastRankingUpdate, "minutes") >= 1) { + for (var i = 0; i < 20; i++) { + //Possibility to switch two positions. + var swap = false; + if (i == 0) { + if (Math.random() <= 0.01) { + swap = true; + } + } else if (Math.random() <= 0.05) { + swap = true; + } + if (swap) { + if (i < 19) { + var previousName = rankings[i + 1]; + var newName = rankings[i + 2]; + rankings[i + 1] = newName; + rankings[i + 2] = previousName; + } else { + //Bring in a new name, swap out the old. + var previousName = rankings[i + 1]; + var newRandomSlot = Math.floor(Math.random() * notPlaying.length); + var newName = notPlaying[newRandomSlot]; + rankings[i + 1] = newName; + notPlaying[newRandomSlot] = previousName; + } + } } - } + lastRankingUpdate = moment(); } - lastRankingUpdate = moment(); - } } diff --git a/server/routes/utils/prediction.js b/server/routes/utils/prediction.js new file mode 100644 index 0000000..cbfbfa5 --- /dev/null +++ b/server/routes/utils/prediction.js @@ -0,0 +1,400 @@ +const moment = require("moment"); + +const nyoomfactor = { + //Percentage of original speed to use when nyoom'ing + 1: 1.0, + 2: 1.0, + 3: 1.0, + 4: 1.0, + 5: 1.0, + 6: 1.0, + 7: 1.0, + 8: 1.0, + 9: 1.0, + 10: 1.0, + 11: 1.0, + 12: 0.9, + 13: 0.7, + 14: 0.5, + 15: 0.3, + 16: 0.3, + 17: 0.3, + 18: 0.3, + 19: 0.3, + 20: 0.3, + 50: 0.81, + 100: 0.76, + 500: 0.28, + 1000: 0.24, + 2000: 0.09, + 5000: 0.07, + 10000: 0.04, + 20000: 0.02, +}; + +const slowdownFactor = { + //Percentage of slowdown per hour. + 1: 0.00001, + 2: 0.00003, + 3: 0.00003, + 4: 0.00005, + 5: 0.00005, + 6: 0.00005, + 7: 0.00005, + 8: 0.00005, + 9: 0.00005, + 10: 0.00005, + 11: 0.00005, + 12: 0.00006, + 13: 0.00007, + 14: 0.00008, + 15: 0.00009, + 16: 0.0001, + 17: 0.0001, + 18: 0.0001, + 19: 0.0001, + 20: 0.0001, + 50: 0.0002, + 100: 0.0003, + 500: 0.0004, + 1000: 0.0005, + 2000: 0.0005, + 5000: 0.0005, + 10000: 0.0005, + 20000: 0.0005, +}; + +class Prediction { + chartData = {}; + predictionChartData = {}; + + diffData = []; + + maxSpeed = 0; + + constructor(server) { } + + SetupPredictionModel(eventStart) { + this.chartData = {}; + this.predictionChartData = {}; + if (this.chartData["1"] && this.chartData["1"].length > 400) { + this.maxSpeed = Math.floor( + this.chartData["1"][400].points / + (moment(this.chartData["1"][400].date).diff(eventStart, "minutes") / 60) + ); + } else if (this.chartData["1"] && this.chartData["1"].length > 0) { + this.maxSpeed = Math.floor( + this.chartData["1"][this.chartData["1"].length - 1].points / + (moment(this.chartData["1"][this.chartData["1"].length - 1].date).diff( + eventStart, + "minutes" + ) / + 60) + ); + } else { + this.maxSpeed = 0; + } + } + + CreatePrediction(precision, rank, eventStart, eventEnd) { + if (!this.chartData[rank]) return []; + var startPoint = this.chartData[rank][this.chartData[rank].length - 1]; + if (rank <= 20) startPoint = { points: startPoint.points, date: moment() }; + var startTime = moment(startPoint.date); + if ( + startTime.diff(eventStart, "hours") > 36 && + moment(startPoint.date).diff(eventStart, "hours") >= 36 + ) { + //console.log(this.maxSpeed) + //Precision is in hours. 1 is default + var finalChart = [ + { + y: this.chartData[rank][this.chartData[rank].length - 1].points, + x: this.chartData[rank][this.chartData[rank].length - 1].date, + }, + ]; + //Start from the time of the last reported rank. + var myPoints = startPoint.points; + var pointSpeed = Math.ceil( + this.GetRank(rank) / + (moment(startPoint.date).diff(eventStart, "minutes") / 60) + ); + var speedGoal = this.maxSpeed * nyoomfactor[rank]; + while (startTime < eventEnd) { + startTime.add(precision, "hours"); + myPoints += Math.floor(pointSpeed); + if (eventEnd.diff(startTime, "hours") > 11) { + pointSpeed -= pointSpeed * (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; + } else { + pointSpeed = Math.max( + this.GetRank(rank) / + (moment(startPoint.date).diff(eventStart, "minutes") / 60), + Math.min( + (12 - eventEnd.diff(startTime, "hours")) * (speedGoal / 5), + speedGoal + ) + ); + //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. + //console.log(pointSpeed) + } + finalChart = [ + ...finalChart, + { + y: Number.isInteger(myPoints) ? myPoints : "???", + x: moment(startTime), + }, + ]; + } + this.predictionChartData[rank] = finalChart; + return finalChart; + } else if (startTime.diff(eventStart, "hours") > 24 && + moment(startPoint.date).diff(eventStart, "hours") >= 24 + ) { + //console.log(this.maxSpeed) + //Precision is in hours. 1 is default + var finalChart = [ + { + y: this.chartData[rank][this.chartData[rank].length - 1].points, + x: this.chartData[rank][this.chartData[rank].length - 1].date, + }, + ]; + //Start from the time of the last reported rank. + var myPoints = startPoint.points; + var pointSpeed = this.GetRate(rank); + var speedGoal = this.maxSpeed * nyoomfactor[rank]; + while (startTime < eventEnd) { + startTime.add(precision, "hours"); + myPoints += Math.floor(pointSpeed); + if (eventEnd.diff(startTime, "hours") > 11) { + pointSpeed -= + pointSpeed * + (slowdownFactor[rank] * 10) /*CONSTANT for adjustment*/; + } else { + pointSpeed = Math.max( + this.GetRank(rank) / + (moment(startPoint.date).diff(eventStart, "minutes") / 60), + Math.min( + (12 - eventEnd.diff(startTime, "hours")) * (speedGoal / 5), + speedGoal + ) + ); + //pointSpeed+=(speedGoal-pointSpeed) //Increase towards final goal. + //console.log(pointSpeed) + } + finalChart = [ + ...finalChart, + { + y: Number.isInteger(myPoints) ? myPoints : "???", + x: moment(startTime), + }, + ]; + } + this.predictionChartData[rank] = finalChart; + return finalChart; + } else { + return []; + } + } + + GetRank(rank) { + if (this.chartData[rank]) { + return this.chartData[rank][this.chartData[rank].length - 1].points; + } else { + return "???"; + } + } + + GetEstimate(rank) { + if (this.predictionChartData[rank]) { + var currentEstimate = 0; + if ( + rank > 20 && + moment().diff( + moment(this.chartData[rank][this.chartData[rank].length - 1].date), + "hours" + ) > 0.5 + ) { + for (var i = this.predictionChartData[rank].length - 1; i >= 0; i--) { + if (moment(this.predictionChartData[rank][i].x).isAfter(moment())) { + currentEstimate = this.predictionChartData[rank][i].y; + } else { + break; + } + } + + return currentEstimate; + } else { + if (rank > 20) { + return this.GetRank(rank); + } else { + return "---"; + } + } + } else { + return "???"; + } + } + + GetTime(rank) { + if (this.chartData[rank]) { + return moment(this.chartData[rank][this.chartData[rank].length - 1].date).fromNow(); + } else { + return ""; + } + } + + GetUpdateColor(rank, en) { + if (this.chartData[rank]) { + return ( + "rgba(255," + + Math.max( + 255 - + moment().diff( + moment(this.chartData[rank][this.chartData[rank].length - 1].date), + "hours" + ) * + 3, + 0 + ) + + "," + + Math.max( + 255 - + moment().diff( + moment(this.chartData[rank][this.chartData[rank].length - 1].date), + "hours" + ) * + 3, + 0 + ) + + ",1)" + ); + } else { + return ""; + } + } + + ChartData(rank, eventStart, eventEnd) { + if (!this.chartData[rank]) { + return [{ x: 0, y: 0 }]; + } + if (rank <= 20) { + return [ + ...this.chartData[rank].map((data) => { + return { x: data.date, y: data.points }; + }), + { + x: moment().isBefore(eventEnd) ? moment() : eventEnd, + y: this.chartData[rank][this.chartData[rank].length - 1].points, + }, + ]; + } else { + return [ + { x: eventStart, y: 0 }, + ...this.chartData[rank].map((data) => { + return { x: data.date, y: data.points }; + }), + ]; + } + } + + GetPointCount(rank) { + let pointCount = 1; + const RATEDURATION = 1; + if (!this.chartData[rank]) { + return pointCount; + } + if (this.chartData[rank].length > 2) { + var lastpoint = this.chartData[rank][this.chartData[rank].length - 1]; + for (var i = this.chartData[rank].length - 1; i >= 0; i--) { + var diff = moment().diff(this.chartData[rank][i].date, "hours"); + if (diff >= RATEDURATION) { + break; + } else { + lastpoint = this.chartData[rank][i]; + pointCount++; + } + } + return pointCount; + } else { + if (this.chartData[rank].length > 0) { + return this.chartData[rank].length; + } else { + return pointCount; + } + } + } + + GetNameData = (t) => { + var tempname = ""; + if ( + this.chartData[t] && + this.chartData[t][this.chartData[t].length - 1] && + this.chartData[t][this.chartData[t].length - 1].name + ) { + tempname = this.chartData[t][this.chartData[t].length - 1].name; + } + var tempdesc = ""; + if ( + this.chartData[t] && + this.chartData[t][this.chartData[t].length - 1] && + this.chartData[t][this.chartData[t].length - 1].description + ) { + tempdesc = this.chartData[t][this.chartData[t].length - 1].description; + } + return { tempname, tempdesc } + } + + + GetRate(rank, eventStart) { + + const RATEDURATION = 1; //In hours. How much EP/hr is shown. + + if (this.chartData[rank].length > 2) { + var lastpoint = this.chartData[rank][this.chartData[rank].length - 1]; + for (var i = this.chartData[rank].length - 1; i >= 0; i--) { + var diff = moment().diff(this.chartData[rank][i].date, "hours"); + if (diff >= RATEDURATION) { + break; + } else { + lastpoint = this.chartData[rank][i]; + } + } + var timediff = moment( + this.chartData[rank][this.chartData[rank].length - 1].date + ).diff(moment(lastpoint.date), "minutes"); + if (timediff < 120) { + if (lastpoint === this.chartData[rank][this.chartData[rank].length - 1]) { + return "???"; + } else + return ( + (this.chartData[rank][this.chartData[rank].length - 1].points - + lastpoint.points) / + RATEDURATION + ); + } else { + return Math.ceil( + (this.chartData[rank][this.chartData[rank].length - 1].points - + lastpoint.points) / + (moment(this.chartData[rank][this.chartData[rank].length - 1].date).diff( + moment(lastpoint.date), + "minutes" + ) / + 60) + ); + } + } else { + if (this.chartData[rank].length > 0) { + var startPoint = this.chartData[rank][this.chartData[rank].length - 1]; + return Math.ceil( + this.GetRank(rank) / + (moment(startPoint.date).diff(eventStart, "minutes") / 60) + ); + } else { + return 0; + } + } + + } + +} +exports.Prediction = Prediction \ No newline at end of file diff --git a/server/routes/utils/submit.js b/server/routes/utils/submit.js new file mode 100644 index 0000000..394d800 --- /dev/null +++ b/server/routes/utils/submit.js @@ -0,0 +1,71 @@ +//add to table. + +function FurtherTierIsOkay(tier, scores, points) { + var tiers = [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, + 100, 500, 1000, 2000, 5000, 10000, 20000, 30000, 50000, + ]; + if (tier <= 1) { + return true; + } else { + //Find the previous tier. + var previousTier = -1; + for (var i = 0; i < tiers.length; i++) { + if (tiers[i] == tier) { + previousTier = tiers[i - 1]; + } + } + if (previousTier == -1) { + console.log("Something weird happened...."); + return false; //Something terrible happened. + } else if (!scores[tier]) { + return true; //It's okay since no score is submitted yet. + } else { + return points < scores[previousTier]; //If it's greater something's wrong... + } + } +} + +function EndsWithZeroes(str) { + var zeroCount = 0; + var string = String(str); + for (var i = 0; i < string.length; i++) { + if (string[i] == "0") { + zeroCount++; + } else { + zeroCount = 0; + } + } + return zeroCount >= 2; +} + +function ScoreIsSanitary(rank, name, description, points) { + if (Number(rank) <= 20) { + return true; + } else { + if ( + EndsWithZeroes(name) || + EndsWithZeroes(description) || + EndsWithZeroes(points) + ) { + return false; + } else { + return true; + } + } +} + +function numberWithCommas(x) { + if (Number.isInteger(x)) { + var num_parts = x.toString().split("."); + num_parts[0] = num_parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return num_parts.join("."); + } else { + return x; + } +} + + +exports.ScoreIsSanitary = ScoreIsSanitary +exports.FurtherTierIsOkay = FurtherTierIsOkay +exports.EndsWithZeroes = EndsWithZeroes \ No newline at end of file