├── tempCodeRunnerFile.py ├── requirements.txt ├── logo.jpg ├── main2.py ├── movie_list.pkl ├── users.json ├── Dockerfile ├── frontend ├── public │ ├── build │ │ └── public │ │ │ └── build │ │ │ ├── bundle.css │ │ │ └── bundle.css.map │ └── index.html ├── src │ ├── streamlit │ │ ├── index.ts │ │ ├── setStreamlitLifecycle.ts │ │ ├── WithStreamlitConnection.svelte │ │ ├── ArrowTable.ts │ │ └── streamlit.ts │ ├── main.ts │ └── ImageGallery.svelte ├── tsconfig.json ├── package.json ├── rollup.config.js ├── Streamlit-Image-Carousel-master │ └── __init__.py └── package-lock.json ├── .github └── workflows │ └── deploy.yml ├── auth.py ├── login_page.py ├── app2.py └── ml2.ipynb /tempCodeRunnerFile.py: -------------------------------------------------------------------------------- 1 | import pickle 2 | import requests -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | huggingface-hub 2 | streamlit 3 | requests 4 | pickle-mixin 5 | -------------------------------------------------------------------------------- /logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafigeovazi/Movie-Recommendation/HEAD/logo.jpg -------------------------------------------------------------------------------- /main2.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | data=pd.read_csv('dataset.csv') 4 | 5 | print(data) -------------------------------------------------------------------------------- /movie_list.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafigeovazi/Movie-Recommendation/HEAD/movie_list.pkl -------------------------------------------------------------------------------- /users.json: -------------------------------------------------------------------------------- 1 | {"BruceWayne": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5", "rafigeovazi": "e2217d3e4e120c6a3372a1890f03e232b35ad659d71f7a62501a4ee204a3e66d", "Ryan Gosling": "65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5"} -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim 2 | 3 | WORKDIR /app 4 | 5 | COPY requirements.txt requirements.txt 6 | COPY . . 7 | 8 | RUN pip install --upgrade pip && \ 9 | pip install -r requirements.txt 10 | 11 | CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] 12 | -------------------------------------------------------------------------------- /frontend/public/build/public/build/bundle.css: -------------------------------------------------------------------------------- 1 | .scroller.svelte-1q3l3t1{min-height:100px;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}img.svelte-1q3l3t1{display:inline-block;padding:1%;border-radius:20px;opacity:0.9;transition:all .2s}img.svelte-1q3l3t1:hover{opacity:1;transform:scale(1.05);cursor:pointer} 2 | 3 | /*# sourceMappingURL=bundle.css.map */ -------------------------------------------------------------------------------- /frontend/src/streamlit/index.ts: -------------------------------------------------------------------------------- 1 | import type { RenderData as RenderData_ } from "./streamlit"; 2 | import WithStreamlitConnection from "C:/Users/rafig/Documents/PYMovieRecomendation/frontend/src/streamlit/WithStreamlitConnection.svelte"; 3 | 4 | export { ArrowTable } from "./ArrowTable"; 5 | export { Streamlit } from "./streamlit"; 6 | 7 | export { setStreamlitLifecycle } from "./setStreamlitLifecycle"; 8 | export { WithStreamlitConnection }; 9 | 10 | export type RenderData = RenderData_; 11 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Streamlit Component 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /frontend/src/streamlit/setStreamlitLifecycle.ts: -------------------------------------------------------------------------------- 1 | import { onMount, afterUpdate } from "svelte"; 2 | import { Streamlit } from "./streamlit"; 3 | 4 | export const setStreamlitLifecycle = (): void => { 5 | onMount((): void => { 6 | Streamlit.setFrameHeight(); 7 | }); 8 | 9 | afterUpdate((): void => { 10 | // In here I tell Streamlit to update my frameHeight after each update, in 11 | // case it has changed. (This isn't strictly necessary for the example 12 | // because our height stays fixed, but this is a low-cost function, so 13 | // there's no harm in doing it redundantly.) 14 | Streamlit.setFrameHeight(); 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte/tsconfig.json", 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "lib": ["dom", "dom.iterable", "esnext"], 6 | "allowJs": true, 7 | "skipLibCheck": true, 8 | "esModuleInterop": true, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true 17 | }, 18 | "include": ["src/**/*"], 19 | "exclude": ["node_modules/*", "__sapper__/*", "public/*"] 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Streamlit App 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout Repository 14 | uses: actions/checkout@v3 15 | 16 | - name: Set up Python 17 | uses: actions/setup-python@v4 18 | with: 19 | python-version: '3.12' 20 | 21 | - name: Install dependencies 22 | run: | 23 | python -m pip install --upgrade pip 24 | pip install -r requirements.txt 25 | 26 | - name: Streamlit Deploy (Test Run) 27 | run: | 28 | streamlit run app2.py --server.headless true & 29 | sleep 15 30 | -------------------------------------------------------------------------------- /frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { WithStreamlitConnection } from "./streamlit"; 2 | import ImageGallery from "./ImageGallery.svelte"; 3 | 4 | // "WithStreamlitConnection" is a wrapper component. It bootstraps the 5 | // connection between your component and the Streamlit app, and handles 6 | // passing arguments from Python -> Component. 7 | // 8 | // You don't need to edit withStreamlitConnection (but you're welcome to!). 9 | const imageGallery = new WithStreamlitConnection({ 10 | target: document.body, 11 | props: { 12 | /** 13 | * Custom Streamlit component 14 | */ 15 | component: ImageGallery, 16 | 17 | /** 18 | * Set to false if you want `args` (the named dictionary of arguments passed 19 | * from Python) to be passed as a dictionary to your component. 20 | * 21 | * Default is `true`. 22 | */ 23 | spreadArgs: true, 24 | }, 25 | }); 26 | 27 | export default ImageGallery; 28 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "streamlit_component_svelte_template", 3 | "version": "2.0.0", 4 | "scripts": { 5 | "build": "rollup -c", 6 | "dev": "rollup -c -w", 7 | "start": "sirv public", 8 | "validate": "svelte-check" 9 | }, 10 | "devDependencies": { 11 | "@rollup/plugin-commonjs": "^12.0.0", 12 | "@rollup/plugin-node-resolve": "^8.0.0", 13 | "@rollup/plugin-typescript": "^4.0.0", 14 | "@tsconfig/svelte": "^1.0.0", 15 | "rollup": "^2.3.4", 16 | "rollup-plugin-livereload": "^1.0.0", 17 | "rollup-plugin-svelte": "^6.1.1", 18 | "rollup-plugin-terser": "^5.1.2", 19 | "svelte": "^3.0.0", 20 | "svelte-check": "^1.0.0", 21 | "svelte-preprocess": "^4.0.0", 22 | "tslib": "^2.0.0", 23 | "typescript": "^3.9.3" 24 | }, 25 | "dependencies": { 26 | "apache-arrow": "^0.17.0", 27 | "event-target-shim": "^5.0.1", 28 | "sirv-cli": "^1.0.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | import hashlib 3 | import os 4 | 5 | USER_FILE = "users.json" 6 | 7 | # hash password function 8 | def hash_password(password): 9 | return hashlib.sha256(password.encode()).hexdigest() 10 | 11 | # load user function 12 | def load_users(): 13 | if not os.path.exists(USER_FILE): 14 | with open(USER_FILE, "w") as f: 15 | json.dump({}, f) 16 | with open(USER_FILE, "r") as f: 17 | return json.load(f) 18 | 19 | # save user function 20 | def save_users(users): 21 | with open(USER_FILE, "w") as f: 22 | json.dump(users, f) 23 | 24 | # register user function 25 | def register_user(username, password): 26 | users = load_users() 27 | if username in users: 28 | return False # Username already exists 29 | users[username] = hash_password(password) 30 | save_users(users) 31 | return True 32 | 33 | # Login user function 34 | def login_user(username, password): 35 | users = load_users() 36 | hashed = hash_password(password) 37 | return username in users and users[username] == hashed 38 | -------------------------------------------------------------------------------- /frontend/src/ImageGallery.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 |
18 | {#each imageUrls as imageUrl} 19 | 20 | {/each} 21 |
22 | 23 | 24 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /frontend/public/build/public/build/bundle.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "bundle.css", 4 | "sources": [ 5 | "..\\..\\ImageGallery.svelte" 6 | ], 7 | "sourcesContent": [ 8 | "\n\n\n
\n {#each imageUrls as imageUrl}\n \"\"\n {/each}\n
\n\n\n\n\n\n\n\n\n\n" 9 | ], 10 | "names": [], 11 | "mappings": "AAoBE,SAAS,eAAC,CAAC,AACT,UAAU,CAAE,KAAK,CACjB,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,MAAM,CAClB,WAAW,CAAE,MAAM,AACrB,CAAC,AACF,GAAG,eAAC,CAAC,AACF,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,EAAE,CACX,aAAa,CAAE,IAAI,CACnB,OAAO,CAAE,GAAG,CACZ,UAAU,CAAE,GAAG,CAAC,GAAG,AACrB,CAAC,AAEF,kBAAG,MAAM,AAAC,CAAC,AACR,OAAO,CAAE,CAAC,CACV,SAAS,CAAE,MAAM,IAAI,CAAC,CACtB,MAAM,CAAE,OAAO,AACjB,CAAC" 12 | } -------------------------------------------------------------------------------- /login_page.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | from auth import login_user, register_user 3 | 4 | def login(): 5 | if "logged_in" not in st.session_state: 6 | st.session_state.logged_in = False 7 | 8 | st.image("logo.jpg", width=700) 9 | if not st.session_state.logged_in: 10 | tab1, tab2 = st.tabs(["🔐 Login", "🦇 Register"]) 11 | 12 | with tab1: 13 | st.subheader("Login Page") 14 | username = st.text_input("Username", key="login_user") 15 | password = st.text_input("Password", type="password", key="login_pass") 16 | if st.button("Login", key="login_btn"): 17 | if login_user(username, password): 18 | st.session_state.logged_in = True 19 | st.session_state.just_logged_in = True 20 | st.success("🦸 Login successful!") 21 | else: 22 | st.error("Identity not recognized. Are you a villain?") 23 | 24 | with tab2: 25 | st.subheader("Register as a New Hero") 26 | new_user = st.text_input("Username", key="reg_user") 27 | new_pass = st.text_input("Password", type="password", key="reg_pass") 28 | if st.button("Register"): 29 | if register_user(new_user, new_pass): 30 | st.success("Registration complete! Go to Login page.") 31 | else: 32 | st.warning("Hero already exists. Try a different username.") 33 | return False 34 | 35 | return True 36 | -------------------------------------------------------------------------------- /frontend/rollup.config.js: -------------------------------------------------------------------------------- 1 | import svelte from "rollup-plugin-svelte"; 2 | import resolve from "@rollup/plugin-node-resolve"; 3 | import commonjs from "@rollup/plugin-commonjs"; 4 | import livereload from "rollup-plugin-livereload"; 5 | import { terser } from "rollup-plugin-terser"; 6 | import sveltePreprocess from "svelte-preprocess"; 7 | import typescript from "@rollup/plugin-typescript"; 8 | 9 | const production = !process.env.ROLLUP_WATCH; 10 | 11 | function serve() { 12 | let server; 13 | 14 | function toExit() { 15 | if (server) server.kill(0); 16 | } 17 | 18 | return { 19 | writeBundle() { 20 | if (server) return; 21 | server = require("child_process").spawn( 22 | "npm", 23 | ["run", "start", "--", "--dev"], 24 | { 25 | stdio: ["ignore", "inherit", "inherit"], 26 | shell: true, 27 | } 28 | ); 29 | 30 | process.on("SIGTERM", toExit); 31 | process.on("exit", toExit); 32 | }, 33 | }; 34 | } 35 | 36 | export default { 37 | input: "src/main.ts", 38 | output: { 39 | sourcemap: true, 40 | format: "iife", 41 | name: "app", 42 | file: "public/build/bundle.js", 43 | }, 44 | plugins: [ 45 | svelte({ 46 | // enable run-time checks when not in production 47 | dev: !production, 48 | css: (css) => { 49 | css.write("public/build/bundle.css"); 50 | }, 51 | preprocess: sveltePreprocess(), 52 | }), 53 | 54 | resolve({ 55 | browser: true, 56 | dedupe: ["svelte"], 57 | }), 58 | commonjs(), 59 | typescript({ sourceMap: !production }), 60 | 61 | !production && serve(), 62 | 63 | !production && livereload("public"), 64 | 65 | production && terser(), 66 | ], 67 | watch: { 68 | clearScreen: false, 69 | }, 70 | }; 71 | -------------------------------------------------------------------------------- /frontend/src/streamlit/WithStreamlitConnection.svelte: -------------------------------------------------------------------------------- 1 | 62 | 63 | 64 | 65 | {#if renderData} 66 | {#if spreadArgs} 67 | 68 | {:else} 69 | 70 | {/if} 71 | {/if} 72 | -------------------------------------------------------------------------------- /app2.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | import pickle 3 | import requests 4 | from login_page import login 5 | from huggingface_hub import hf_hub_download 6 | 7 | # Run login page 8 | if "logged_in" not in st.session_state: 9 | st.session_state.logged_in = False 10 | 11 | if not st.session_state.logged_in: 12 | logged_in = login() 13 | if logged_in: 14 | st.experimental_rerun() 15 | else: 16 | # ----------------------------- 17 | # ✅ Main Page 18 | # ----------------------------- 19 | st.title("🎬 Geosling's Movie Recommendation") 20 | st.write(f"Welcome, **{st.session_state.get('username', 'Unemployed')}**!") 21 | 22 | if st.button("Logout"): 23 | st.session_state.logged_in = False 24 | 25 | # Function to fetch movie poster 26 | def fetch_poster(movie_id): 27 | url = f"https://api.themoviedb.org/3/movie/{movie_id}?api_key=c7ec19ffdd3279641fb606d19ceb9bb1&language=en-US" 28 | data = requests.get(url).json() 29 | poster_path = data['poster_path'] 30 | return f"https://image.tmdb.org/t/p/w500/{poster_path}" 31 | 32 | movies = pickle.load(open("movie_list.pkl", 'rb')) 33 | 34 | similarity_path = hf_hub_download( 35 | repo_id="Geosling/MovieRecommendation", 36 | filename="similarity.pkl", 37 | repo_type="dataset" 38 | ) 39 | similarity = pickle.load(open(similarity_path, 'rb')) 40 | 41 | movies_list = movies['title'].values 42 | 43 | st.write("Let's find your new fav movie👊!") 44 | 45 | import streamlit.components.v1 as components 46 | imageCarouselComponent = components.declare_component("image-carousel-component", path="frontend/public") 47 | 48 | imageUrls = [ 49 | fetch_poster(157336), 50 | fetch_poster(155), 51 | fetch_poster(693134), 52 | fetch_poster(244786), 53 | fetch_poster(299534), 54 | ] 55 | 56 | imageCarouselComponent(imageUrls=imageUrls, height=200) 57 | selectvalue = st.selectbox("Select movie from dropdown", movies_list) 58 | 59 | def recommend(movie): 60 | index = movies[movies['title'] == movie].index[0] 61 | distance = sorted(list(enumerate(similarity[index])), reverse=True, key=lambda x: x[1]) 62 | recommended_movies = [] 63 | recommended_posters = [] 64 | for i in distance[1:6]: 65 | movie_id = movies.iloc[i[0]].id 66 | recommended_movies.append(movies.iloc[i[0]].title) 67 | recommended_posters.append(fetch_poster(movie_id)) 68 | return recommended_movies, recommended_posters 69 | 70 | if st.button("Show Recommend"): 71 | names, posters = recommend(selectvalue) 72 | cols = st.columns(5) 73 | for i in range(5): 74 | with cols[i]: 75 | st.text(names[i]) 76 | st.image(posters[i]) 77 | -------------------------------------------------------------------------------- /frontend/Streamlit-Image-Carousel-master/__init__.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | import streamlit.components.v1 as components 3 | 4 | def main(): 5 | 6 | imageCarouselComponent = components.declare_component("image-carousel-component", path="frontend/public") 7 | 8 | imageUrls = [ 9 | "https://images.unsplash.com/photo-1522093007474-d86e9bf7ba6f?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=764&q=80", 10 | "https://images.unsplash.com/photo-1610016302534-6f67f1c968d8?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1075&q=80", 11 | "https://images.unsplash.com/photo-1516550893923-42d28e5677af?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=872&q=80", 12 | "https://images.unsplash.com/photo-1541343672885-9be56236302a?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80", 13 | "https://images.unsplash.com/photo-1512470876302-972faa2aa9a4?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 14 | "https://images.unsplash.com/photo-1528728329032-2972f65dfb3f?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 15 | "https://images.unsplash.com/photo-1557744813-846c28d0d0db?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1118&q=80", 16 | "https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 17 | "https://images.unsplash.com/photo-1595867818082-083862f3d630?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 18 | "https://images.unsplash.com/photo-1622214366189-72b19cc61597?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80", 19 | "https://images.unsplash.com/photo-1558180077-09f158c76707?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=764&q=80", 20 | "https://images.unsplash.com/photo-1520106212299-d99c443e4568?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80", 21 | "https://images.unsplash.com/photo-1534430480872-3498386e7856?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 22 | "https://images.unsplash.com/photo-1571317084911-8899d61cc464?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=870&q=80", 23 | "https://images.unsplash.com/photo-1624704765325-fd4868c9702e?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=764&q=80", 24 | ] 25 | selectedImageUrl = imageCarouselComponent(imageUrls=imageUrls, height=200) 26 | 27 | if selectedImageUrl is not None: 28 | st.image(selectedImageUrl) 29 | 30 | if __name__ == "__main__": 31 | main() -------------------------------------------------------------------------------- /frontend/src/streamlit/ArrowTable.ts: -------------------------------------------------------------------------------- 1 | import { Table, Type } from "apache-arrow"; 2 | 3 | type CellType = "blank" | "index" | "columns" | "data"; 4 | 5 | export interface ArrowDataframeProto { 6 | data: ArrowTableProto; 7 | height: string; 8 | width: string; 9 | } 10 | 11 | export interface ArrowTableProto { 12 | data: Uint8Array; 13 | index: Uint8Array; 14 | columns: Uint8Array; 15 | styler: Styler; 16 | } 17 | 18 | interface Cell { 19 | classNames: string; 20 | content: string; 21 | id?: string; 22 | type: CellType; 23 | } 24 | 25 | interface Styler { 26 | caption?: string; 27 | displayValuesTable: Table; 28 | styles?: string; 29 | uuid: string; 30 | } 31 | 32 | export class ArrowTable { 33 | private readonly dataTable: Table; 34 | private readonly indexTable: Table; 35 | private readonly columnsTable: Table; 36 | private readonly styler?: Styler; 37 | 38 | constructor( 39 | dataBuffer: Uint8Array, 40 | indexBuffer: Uint8Array, 41 | columnsBuffer: Uint8Array, 42 | styler?: any 43 | ) { 44 | this.dataTable = Table.from(dataBuffer); 45 | this.indexTable = Table.from(indexBuffer); 46 | this.columnsTable = Table.from(columnsBuffer); 47 | this.styler = styler 48 | ? { 49 | caption: styler.get("caption"), 50 | displayValuesTable: Table.from(styler.get("displayValues")), 51 | styles: styler.get("styles"), 52 | uuid: styler.get("uuid"), 53 | } 54 | : undefined; 55 | } 56 | 57 | get rows(): number { 58 | return this.indexTable.length + this.columnsTable.numCols; 59 | } 60 | 61 | get columns(): number { 62 | return this.indexTable.numCols + this.columnsTable.length; 63 | } 64 | 65 | get headerRows(): number { 66 | return this.rows - this.dataRows; 67 | } 68 | 69 | get headerColumns(): number { 70 | return this.columns - this.dataColumns; 71 | } 72 | 73 | get dataRows(): number { 74 | return this.dataTable.length; 75 | } 76 | 77 | get dataColumns(): number { 78 | return this.dataTable.numCols; 79 | } 80 | 81 | get uuid(): string | undefined { 82 | return this.styler && this.styler.uuid; 83 | } 84 | 85 | get caption(): string | undefined { 86 | return this.styler && this.styler.caption; 87 | } 88 | 89 | get styles(): string | undefined { 90 | return this.styler && this.styler.styles; 91 | } 92 | 93 | get table(): Table { 94 | return this.dataTable; 95 | } 96 | 97 | get index(): Table { 98 | return this.indexTable; 99 | } 100 | 101 | get columnTable(): Table { 102 | return this.columnsTable; 103 | } 104 | 105 | public getCell = (rowIndex: number, columnIndex: number): Cell => { 106 | const isBlankCell = 107 | rowIndex < this.headerRows && columnIndex < this.headerColumns; 108 | const isIndexCell = 109 | rowIndex >= this.headerRows && columnIndex < this.headerColumns; 110 | const isColumnsCell = 111 | rowIndex < this.headerRows && columnIndex >= this.headerColumns; 112 | 113 | if (isBlankCell) { 114 | const classNames = ["blank"]; 115 | if (columnIndex > 0) { 116 | classNames.push("level" + rowIndex); 117 | } 118 | 119 | return { 120 | type: "blank", 121 | classNames: classNames.join(" "), 122 | content: "", 123 | }; 124 | } else if (isColumnsCell) { 125 | const dataColumnIndex = columnIndex - this.headerColumns; 126 | const classNames = [ 127 | "col_heading", 128 | "level" + rowIndex, 129 | "col" + dataColumnIndex, 130 | ]; 131 | 132 | return { 133 | type: "columns", 134 | classNames: classNames.join(" "), 135 | content: this.getContent(this.columnsTable, dataColumnIndex, rowIndex), 136 | }; 137 | } else if (isIndexCell) { 138 | const dataRowIndex = rowIndex - this.headerRows; 139 | const classNames = [ 140 | "row_heading", 141 | "level" + columnIndex, 142 | "row" + dataRowIndex, 143 | ]; 144 | 145 | return { 146 | type: "index", 147 | id: `T_${this.uuid}level${columnIndex}_row${dataRowIndex}`, 148 | classNames: classNames.join(" "), 149 | content: this.getContent(this.indexTable, dataRowIndex, columnIndex), 150 | }; 151 | } else { 152 | const dataRowIndex = rowIndex - this.headerRows; 153 | const dataColumnIndex = columnIndex - this.headerColumns; 154 | const classNames = [ 155 | "data", 156 | "row" + dataRowIndex, 157 | "col" + dataColumnIndex, 158 | ]; 159 | const content = this.styler 160 | ? this.getContent( 161 | this.styler.displayValuesTable, 162 | dataRowIndex, 163 | dataColumnIndex 164 | ) 165 | : this.getContent(this.dataTable, dataRowIndex, dataColumnIndex); 166 | 167 | return { 168 | type: "data", 169 | id: `T_${this.uuid}row${dataRowIndex}_col${dataColumnIndex}`, 170 | classNames: classNames.join(" "), 171 | content, 172 | }; 173 | } 174 | }; 175 | 176 | public getContent = ( 177 | table: Table, 178 | rowIndex: number, 179 | columnIndex: number 180 | ): any => { 181 | const column = table.getColumnAt(columnIndex); 182 | if (column === null) { 183 | return ""; 184 | } 185 | 186 | const columnTypeId = this.getColumnTypeId(table, columnIndex); 187 | switch (columnTypeId) { 188 | case Type.Timestamp: { 189 | return this.nanosToDate(column.get(rowIndex)); 190 | } 191 | default: { 192 | return column.get(rowIndex); 193 | } 194 | } 195 | }; 196 | 197 | /* Returns apache-arrow specific typeId of column.*/ 198 | private getColumnTypeId(table: Table, columnIndex: number): Type { 199 | return table.schema.fields[columnIndex].type.typeId; 200 | } 201 | 202 | private nanosToDate(nanos: number): Date { 203 | return new Date(nanos / 1e6); 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /frontend/src/streamlit/streamlit.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2018-2020 Streamlit Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | // Safari doesn't support the EventTarget class, so we use a shim. 19 | import { EventTarget } from "event-target-shim"; 20 | import { ArrowDataframeProto, ArrowTable } from "./ArrowTable"; 21 | 22 | /** Data sent in the custom Streamlit render event. */ 23 | export interface RenderData { 24 | args: any; 25 | disabled: boolean; 26 | } 27 | 28 | /** Messages from Component -> Streamlit */ 29 | enum ComponentMessageType { 30 | // A component sends this message when it's ready to receive messages 31 | // from Streamlit. Streamlit won't send any messages until it gets this. 32 | // Data: { apiVersion: number } 33 | COMPONENT_READY = "streamlit:componentReady", 34 | 35 | // The component has a new widget value. Send it back to Streamlit, which 36 | // will then re-run the app. 37 | // Data: { value: any } 38 | SET_COMPONENT_VALUE = "streamlit:setComponentValue", 39 | 40 | // The component has a new height for its iframe. 41 | // Data: { height: number } 42 | SET_FRAME_HEIGHT = "streamlit:setFrameHeight", 43 | } 44 | 45 | /** 46 | * Streamlit communication API. 47 | * 48 | * Components can send data to Streamlit via the functions defined here, 49 | * and receive data from Streamlit via the `events` property. 50 | */ 51 | export class Streamlit { 52 | /** 53 | * The Streamlit component API version we're targetting. 54 | * There's currently only 1! 55 | */ 56 | public static readonly API_VERSION = 1; 57 | 58 | public static readonly RENDER_EVENT = "streamlit:render"; 59 | 60 | /** Dispatches events received from Streamlit. */ 61 | public static readonly events = new EventTarget(); 62 | 63 | private static registeredMessageListener = false; 64 | private static lastFrameHeight?: number; 65 | 66 | /** 67 | * Tell Streamlit that the component is ready to start receiving data. 68 | * Streamlit will defer emitting RENDER events until it receives the 69 | * COMPONENT_READY message. 70 | */ 71 | public static setComponentReady = (): void => { 72 | if (!Streamlit.registeredMessageListener) { 73 | // Register for message events if we haven't already 74 | window.addEventListener("message", Streamlit.onMessageEvent); 75 | Streamlit.registeredMessageListener = true; 76 | } 77 | 78 | Streamlit.sendBackMsg(ComponentMessageType.COMPONENT_READY, { 79 | apiVersion: Streamlit.API_VERSION, 80 | }); 81 | }; 82 | 83 | /** 84 | * Report the component's height to Streamlit. 85 | * This should be called every time the component changes its DOM - that is, 86 | * when it's first loaded, and any time it updates. 87 | */ 88 | public static setFrameHeight = (height?: number): void => { 89 | if (height === undefined) { 90 | // `height` is optional. If undefined, it defaults to scrollHeight, 91 | // which is the entire height of the element minus its border, 92 | // scrollbar, and margin. 93 | height = document.body.scrollHeight; 94 | } 95 | 96 | if (height === Streamlit.lastFrameHeight) { 97 | // Don't bother updating if our height hasn't changed. 98 | return; 99 | } 100 | 101 | Streamlit.lastFrameHeight = height; 102 | Streamlit.sendBackMsg(ComponentMessageType.SET_FRAME_HEIGHT, { height }); 103 | }; 104 | 105 | /** 106 | * Set the component's value. This value will be returned to the Python 107 | * script, and the script will be re-run. 108 | * 109 | * For example: 110 | * 111 | * JavaScript: 112 | * Streamlit.setComponentValue("ahoy!") 113 | * 114 | * Python: 115 | * value = st.my_component(...) 116 | * st.write(value) # -> "ahoy!" 117 | * 118 | * The value must be serializable into JSON. 119 | */ 120 | public static setComponentValue = (value: any): void => { 121 | Streamlit.sendBackMsg(ComponentMessageType.SET_COMPONENT_VALUE, { value }); 122 | }; 123 | 124 | /** Receive a ForwardMsg from the Streamlit app */ 125 | private static onMessageEvent = (event: MessageEvent): void => { 126 | const type = event.data["type"]; 127 | switch (type) { 128 | case Streamlit.RENDER_EVENT: 129 | Streamlit.onRenderMessage(event.data); 130 | break; 131 | } 132 | }; 133 | 134 | /** 135 | * Handle an untyped Streamlit render event and redispatch it as a 136 | * StreamlitRenderEvent. 137 | */ 138 | private static onRenderMessage = (data: any): void => { 139 | let args = data["args"]; 140 | if (args == null) { 141 | console.error( 142 | `Got null args in onRenderMessage. This should never happen` 143 | ); 144 | args = {}; 145 | } 146 | 147 | // Parse our dataframe arguments with arrow, and merge them into our args dict 148 | const dataframeArgs = 149 | data["dfs"] && data["dfs"].length > 0 150 | ? Streamlit.argsDataframeToObject(data["dfs"]) 151 | : {}; 152 | 153 | args = { 154 | ...args, 155 | ...dataframeArgs, 156 | }; 157 | 158 | const disabled = Boolean(data["disabled"]); 159 | 160 | // Dispatch a render event! 161 | const eventData = { disabled, args }; 162 | const event = new CustomEvent(Streamlit.RENDER_EVENT, { 163 | detail: eventData, 164 | }); 165 | Streamlit.events.dispatchEvent(event); 166 | }; 167 | 168 | private static argsDataframeToObject = ( 169 | argsDataframe: ArgsDataframe[] 170 | ): object => { 171 | const argsDataframeArrow = argsDataframe.map( 172 | ({ key, value }: ArgsDataframe) => [key, Streamlit.toArrowTable(value)] 173 | ); 174 | return Object.fromEntries(argsDataframeArrow); 175 | }; 176 | 177 | private static toArrowTable = (df: ArrowDataframeProto): ArrowTable => { 178 | const { data, index, columns } = df.data; 179 | return new ArrowTable(data, index, columns); 180 | }; 181 | 182 | /** Post a message to the Streamlit app. */ 183 | private static sendBackMsg = (type: string, data?: any): void => { 184 | window.parent.postMessage( 185 | { 186 | isStreamlitMessage: true, 187 | type: type, 188 | ...data, 189 | }, 190 | "*" 191 | ); 192 | }; 193 | } 194 | 195 | interface ArgsDataframe { 196 | key: string; 197 | value: ArrowDataframeProto; 198 | } 199 | -------------------------------------------------------------------------------- /frontend/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "streamlit_component_svelte_template", 3 | "version": "2.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "streamlit_component_svelte_template", 9 | "version": "2.0.0", 10 | "dependencies": { 11 | "apache-arrow": "^0.17.0", 12 | "event-target-shim": "^5.0.1", 13 | "sirv-cli": "^1.0.0" 14 | }, 15 | "devDependencies": { 16 | "@rollup/plugin-commonjs": "^12.0.0", 17 | "@rollup/plugin-node-resolve": "^8.0.0", 18 | "@rollup/plugin-typescript": "^4.0.0", 19 | "@tsconfig/svelte": "^1.0.0", 20 | "rollup": "^2.3.4", 21 | "rollup-plugin-livereload": "^1.0.0", 22 | "rollup-plugin-svelte": "^6.1.1", 23 | "rollup-plugin-terser": "^5.1.2", 24 | "svelte": "^3.0.0", 25 | "svelte-check": "^1.0.0", 26 | "svelte-preprocess": "^4.0.0", 27 | "tslib": "^2.0.0", 28 | "typescript": "^3.9.3" 29 | } 30 | }, 31 | "node_modules/@babel/code-frame": { 32 | "version": "7.16.0", 33 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", 34 | "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", 35 | "dev": true, 36 | "dependencies": { 37 | "@babel/highlight": "^7.16.0" 38 | }, 39 | "engines": { 40 | "node": ">=6.9.0" 41 | } 42 | }, 43 | "node_modules/@babel/helper-validator-identifier": { 44 | "version": "7.15.7", 45 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", 46 | "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", 47 | "dev": true, 48 | "engines": { 49 | "node": ">=6.9.0" 50 | } 51 | }, 52 | "node_modules/@babel/highlight": { 53 | "version": "7.16.0", 54 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", 55 | "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", 56 | "dev": true, 57 | "dependencies": { 58 | "@babel/helper-validator-identifier": "^7.15.7", 59 | "chalk": "^2.0.0", 60 | "js-tokens": "^4.0.0" 61 | }, 62 | "engines": { 63 | "node": ">=6.9.0" 64 | } 65 | }, 66 | "node_modules/@polka/url": { 67 | "version": "1.0.0-next.21", 68 | "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", 69 | "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" 70 | }, 71 | "node_modules/@rollup/plugin-commonjs": { 72 | "version": "12.0.0", 73 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-12.0.0.tgz", 74 | "integrity": "sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw==", 75 | "dev": true, 76 | "dependencies": { 77 | "@rollup/pluginutils": "^3.0.8", 78 | "commondir": "^1.0.1", 79 | "estree-walker": "^1.0.1", 80 | "glob": "^7.1.2", 81 | "is-reference": "^1.1.2", 82 | "magic-string": "^0.25.2", 83 | "resolve": "^1.11.0" 84 | }, 85 | "engines": { 86 | "node": ">= 8.0.0" 87 | }, 88 | "peerDependencies": { 89 | "rollup": "^2.3.4" 90 | } 91 | }, 92 | "node_modules/@rollup/plugin-node-resolve": { 93 | "version": "8.4.0", 94 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz", 95 | "integrity": "sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==", 96 | "dev": true, 97 | "dependencies": { 98 | "@rollup/pluginutils": "^3.1.0", 99 | "@types/resolve": "1.17.1", 100 | "builtin-modules": "^3.1.0", 101 | "deep-freeze": "^0.0.1", 102 | "deepmerge": "^4.2.2", 103 | "is-module": "^1.0.0", 104 | "resolve": "^1.17.0" 105 | }, 106 | "engines": { 107 | "node": ">= 8.0.0" 108 | }, 109 | "peerDependencies": { 110 | "rollup": "^1.20.0||^2.0.0" 111 | } 112 | }, 113 | "node_modules/@rollup/plugin-typescript": { 114 | "version": "4.1.2", 115 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-4.1.2.tgz", 116 | "integrity": "sha512-+7UlGat/99e2JbmGNnIauxwEhYLwrL7adO/tSJxUN57xrrS3Ps+ZzYpLCDGPZJ57j+ZJTZLLN89KXW9JMEB+jg==", 117 | "dev": true, 118 | "dependencies": { 119 | "@rollup/pluginutils": "^3.0.1", 120 | "resolve": "^1.14.1" 121 | }, 122 | "engines": { 123 | "node": ">=8.0.0" 124 | }, 125 | "peerDependencies": { 126 | "rollup": "^1.20.0||^2.0.0", 127 | "tslib": "*", 128 | "typescript": ">=2.1.0" 129 | } 130 | }, 131 | "node_modules/@rollup/pluginutils": { 132 | "version": "3.1.0", 133 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 134 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 135 | "dev": true, 136 | "dependencies": { 137 | "@types/estree": "0.0.39", 138 | "estree-walker": "^1.0.1", 139 | "picomatch": "^2.2.2" 140 | }, 141 | "engines": { 142 | "node": ">= 8.0.0" 143 | }, 144 | "peerDependencies": { 145 | "rollup": "^1.20.0||^2.0.0" 146 | } 147 | }, 148 | "node_modules/@tsconfig/svelte": { 149 | "version": "1.0.13", 150 | "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-1.0.13.tgz", 151 | "integrity": "sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==", 152 | "dev": true 153 | }, 154 | "node_modules/@types/estree": { 155 | "version": "0.0.39", 156 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 157 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 158 | "dev": true 159 | }, 160 | "node_modules/@types/flatbuffers": { 161 | "version": "1.10.0", 162 | "resolved": "https://registry.npmjs.org/@types/flatbuffers/-/flatbuffers-1.10.0.tgz", 163 | "integrity": "sha512-7btbphLrKvo5yl/5CC2OCxUSMx1wV1wvGT1qDXkSt7yi00/YW7E8k6qzXqJHsp+WU0eoG7r6MTQQXI9lIvd0qA==" 164 | }, 165 | "node_modules/@types/node": { 166 | "version": "16.11.6", 167 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", 168 | "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", 169 | "dev": true 170 | }, 171 | "node_modules/@types/pug": { 172 | "version": "2.0.5", 173 | "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.5.tgz", 174 | "integrity": "sha512-LOnASQoeNZMkzexRuyqcBBDZ6rS+rQxUMkmj5A0PkhhiSZivLIuz6Hxyr1mkGoEZEkk66faROmpMi4fFkrKsBA==", 175 | "dev": true 176 | }, 177 | "node_modules/@types/resolve": { 178 | "version": "1.17.1", 179 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 180 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 181 | "dev": true, 182 | "dependencies": { 183 | "@types/node": "*" 184 | } 185 | }, 186 | "node_modules/@types/sass": { 187 | "version": "1.43.0", 188 | "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.0.tgz", 189 | "integrity": "sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==", 190 | "dev": true, 191 | "dependencies": { 192 | "@types/node": "*" 193 | } 194 | }, 195 | "node_modules/@types/text-encoding-utf-8": { 196 | "version": "1.0.2", 197 | "resolved": "https://registry.npmjs.org/@types/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", 198 | "integrity": "sha512-AQ6zewa0ucLJvtUi5HsErbOFKAcQfRLt9zFLlUOvcXBy2G36a+ZDpCHSGdzJVUD8aNURtIjh9aSjCStNMRCcRQ==" 199 | }, 200 | "node_modules/ansi-styles": { 201 | "version": "3.2.1", 202 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 203 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 204 | "dependencies": { 205 | "color-convert": "^1.9.0" 206 | }, 207 | "engines": { 208 | "node": ">=4" 209 | } 210 | }, 211 | "node_modules/anymatch": { 212 | "version": "3.1.2", 213 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 214 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 215 | "dev": true, 216 | "dependencies": { 217 | "normalize-path": "^3.0.0", 218 | "picomatch": "^2.0.4" 219 | }, 220 | "engines": { 221 | "node": ">= 8" 222 | } 223 | }, 224 | "node_modules/apache-arrow": { 225 | "version": "0.17.0", 226 | "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-0.17.0.tgz", 227 | "integrity": "sha512-cbgSx/tzGgnC1qeUySXnAsSsoxhDykNINqr1D3U5pRwf0/Q0ztVccV3/VRW6gUR+lcOFawk6FtyYwmU+KjglbQ==", 228 | "dependencies": { 229 | "@types/flatbuffers": "^1.9.1", 230 | "@types/node": "^12.0.4", 231 | "@types/text-encoding-utf-8": "^1.0.1", 232 | "command-line-args": "5.0.2", 233 | "command-line-usage": "5.0.5", 234 | "flatbuffers": "1.11.0", 235 | "json-bignum": "^0.0.3", 236 | "pad-left": "^2.1.0", 237 | "text-encoding-utf-8": "^1.0.2", 238 | "tslib": "^1.9.3" 239 | }, 240 | "bin": { 241 | "arrow2csv": "bin/arrow2csv.js" 242 | } 243 | }, 244 | "node_modules/apache-arrow/node_modules/@types/node": { 245 | "version": "12.20.36", 246 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz", 247 | "integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA==" 248 | }, 249 | "node_modules/apache-arrow/node_modules/tslib": { 250 | "version": "1.14.1", 251 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 252 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" 253 | }, 254 | "node_modules/argv-tools": { 255 | "version": "0.1.2", 256 | "resolved": "https://registry.npmjs.org/argv-tools/-/argv-tools-0.1.2.tgz", 257 | "integrity": "sha512-wxqoymY0BEu9NblZVQiOTOAiJUjPhaa/kbNMjC2h6bnrmUSgnxKgWJo3lzXvi3bHJRwXyqK/dHzMlZVRT89Cxg==", 258 | "dependencies": { 259 | "array-back": "^2.0.0", 260 | "find-replace": "^2.0.1" 261 | }, 262 | "engines": { 263 | "node": ">=4.0.0" 264 | } 265 | }, 266 | "node_modules/array-back": { 267 | "version": "2.0.0", 268 | "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", 269 | "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", 270 | "dependencies": { 271 | "typical": "^2.6.1" 272 | }, 273 | "engines": { 274 | "node": ">=4" 275 | } 276 | }, 277 | "node_modules/balanced-match": { 278 | "version": "1.0.2", 279 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 280 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 281 | "dev": true 282 | }, 283 | "node_modules/binary-extensions": { 284 | "version": "2.2.0", 285 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 286 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 287 | "dev": true, 288 | "engines": { 289 | "node": ">=8" 290 | } 291 | }, 292 | "node_modules/brace-expansion": { 293 | "version": "1.1.11", 294 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 295 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 296 | "dev": true, 297 | "dependencies": { 298 | "balanced-match": "^1.0.0", 299 | "concat-map": "0.0.1" 300 | } 301 | }, 302 | "node_modules/braces": { 303 | "version": "3.0.2", 304 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 305 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 306 | "dev": true, 307 | "dependencies": { 308 | "fill-range": "^7.0.1" 309 | }, 310 | "engines": { 311 | "node": ">=8" 312 | } 313 | }, 314 | "node_modules/buffer-crc32": { 315 | "version": "0.2.13", 316 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 317 | "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", 318 | "dev": true, 319 | "engines": { 320 | "node": "*" 321 | } 322 | }, 323 | "node_modules/buffer-from": { 324 | "version": "1.1.2", 325 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", 326 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", 327 | "dev": true 328 | }, 329 | "node_modules/builtin-modules": { 330 | "version": "3.2.0", 331 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 332 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 333 | "dev": true, 334 | "engines": { 335 | "node": ">=6" 336 | }, 337 | "funding": { 338 | "url": "https://github.com/sponsors/sindresorhus" 339 | } 340 | }, 341 | "node_modules/callsites": { 342 | "version": "3.1.0", 343 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 344 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 345 | "dev": true, 346 | "engines": { 347 | "node": ">=6" 348 | } 349 | }, 350 | "node_modules/chalk": { 351 | "version": "2.4.2", 352 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 353 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 354 | "dependencies": { 355 | "ansi-styles": "^3.2.1", 356 | "escape-string-regexp": "^1.0.5", 357 | "supports-color": "^5.3.0" 358 | }, 359 | "engines": { 360 | "node": ">=4" 361 | } 362 | }, 363 | "node_modules/chokidar": { 364 | "version": "3.5.2", 365 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", 366 | "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", 367 | "dev": true, 368 | "dependencies": { 369 | "anymatch": "~3.1.2", 370 | "braces": "~3.0.2", 371 | "glob-parent": "~5.1.2", 372 | "is-binary-path": "~2.1.0", 373 | "is-glob": "~4.0.1", 374 | "normalize-path": "~3.0.0", 375 | "readdirp": "~3.6.0" 376 | }, 377 | "engines": { 378 | "node": ">= 8.10.0" 379 | }, 380 | "optionalDependencies": { 381 | "fsevents": "~2.3.2" 382 | } 383 | }, 384 | "node_modules/color-convert": { 385 | "version": "1.9.3", 386 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 387 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 388 | "dependencies": { 389 | "color-name": "1.1.3" 390 | } 391 | }, 392 | "node_modules/color-name": { 393 | "version": "1.1.3", 394 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 395 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 396 | }, 397 | "node_modules/command-line-args": { 398 | "version": "5.0.2", 399 | "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.0.2.tgz", 400 | "integrity": "sha512-/qPcbL8zpqg53x4rAaqMFlRV4opN3pbla7I7k9x8kyOBMQoGT6WltjN6sXZuxOXw6DgdK7Ad+ijYS5gjcr7vlA==", 401 | "dependencies": { 402 | "argv-tools": "^0.1.1", 403 | "array-back": "^2.0.0", 404 | "find-replace": "^2.0.1", 405 | "lodash.camelcase": "^4.3.0", 406 | "typical": "^2.6.1" 407 | }, 408 | "engines": { 409 | "node": ">=4.0.0" 410 | } 411 | }, 412 | "node_modules/command-line-usage": { 413 | "version": "5.0.5", 414 | "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-5.0.5.tgz", 415 | "integrity": "sha512-d8NrGylA5oCXSbGoKz05FkehDAzSmIm4K03S5VDh4d5lZAtTWfc3D1RuETtuQCn8129nYfJfDdF7P/lwcz1BlA==", 416 | "dependencies": { 417 | "array-back": "^2.0.0", 418 | "chalk": "^2.4.1", 419 | "table-layout": "^0.4.3", 420 | "typical": "^2.6.1" 421 | }, 422 | "engines": { 423 | "node": ">=4.0.0" 424 | } 425 | }, 426 | "node_modules/commander": { 427 | "version": "2.20.3", 428 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 429 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 430 | "dev": true 431 | }, 432 | "node_modules/commondir": { 433 | "version": "1.0.1", 434 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 435 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", 436 | "dev": true 437 | }, 438 | "node_modules/concat-map": { 439 | "version": "0.0.1", 440 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 441 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 442 | "dev": true 443 | }, 444 | "node_modules/console-clear": { 445 | "version": "1.1.1", 446 | "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", 447 | "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==", 448 | "engines": { 449 | "node": ">=4" 450 | } 451 | }, 452 | "node_modules/deep-extend": { 453 | "version": "0.6.0", 454 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 455 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 456 | "engines": { 457 | "node": ">=4.0.0" 458 | } 459 | }, 460 | "node_modules/deep-freeze": { 461 | "version": "0.0.1", 462 | "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", 463 | "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", 464 | "dev": true 465 | }, 466 | "node_modules/deepmerge": { 467 | "version": "4.2.2", 468 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 469 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 470 | "dev": true, 471 | "engines": { 472 | "node": ">=0.10.0" 473 | } 474 | }, 475 | "node_modules/detect-indent": { 476 | "version": "6.1.0", 477 | "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", 478 | "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", 479 | "dev": true, 480 | "engines": { 481 | "node": ">=8" 482 | } 483 | }, 484 | "node_modules/es6-promise": { 485 | "version": "3.3.1", 486 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", 487 | "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", 488 | "dev": true 489 | }, 490 | "node_modules/escape-string-regexp": { 491 | "version": "1.0.5", 492 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 493 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 494 | "engines": { 495 | "node": ">=0.8.0" 496 | } 497 | }, 498 | "node_modules/estree-walker": { 499 | "version": "1.0.1", 500 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 501 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 502 | "dev": true 503 | }, 504 | "node_modules/event-target-shim": { 505 | "version": "5.0.1", 506 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 507 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", 508 | "engines": { 509 | "node": ">=6" 510 | } 511 | }, 512 | "node_modules/fill-range": { 513 | "version": "7.0.1", 514 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 515 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 516 | "dev": true, 517 | "dependencies": { 518 | "to-regex-range": "^5.0.1" 519 | }, 520 | "engines": { 521 | "node": ">=8" 522 | } 523 | }, 524 | "node_modules/find-replace": { 525 | "version": "2.0.1", 526 | "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-2.0.1.tgz", 527 | "integrity": "sha512-LzDo3Fpa30FLIBsh6DCDnMN1KW2g4QKkqKmejlImgWY67dDFPX/x9Kh/op/GK522DchQXEvDi/wD48HKW49XOQ==", 528 | "dependencies": { 529 | "array-back": "^2.0.0", 530 | "test-value": "^3.0.0" 531 | }, 532 | "engines": { 533 | "node": ">=4.0.0" 534 | } 535 | }, 536 | "node_modules/flatbuffers": { 537 | "version": "1.11.0", 538 | "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.11.0.tgz", 539 | "integrity": "sha512-0PqFKtXI4MjxomI7jO4g5XfLPm/15g2R+5WGCHBGYGh0ihQiypnHlJ6bMmkkrAe0GzZ4d7PDAfCONKIPUxNF+A==" 540 | }, 541 | "node_modules/fs.realpath": { 542 | "version": "1.0.0", 543 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 544 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 545 | "dev": true 546 | }, 547 | "node_modules/fsevents": { 548 | "version": "2.3.2", 549 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 550 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 551 | "dev": true, 552 | "hasInstallScript": true, 553 | "optional": true, 554 | "os": [ 555 | "darwin" 556 | ], 557 | "engines": { 558 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 559 | } 560 | }, 561 | "node_modules/function-bind": { 562 | "version": "1.1.1", 563 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 564 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 565 | "dev": true 566 | }, 567 | "node_modules/get-port": { 568 | "version": "3.2.0", 569 | "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", 570 | "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", 571 | "engines": { 572 | "node": ">=4" 573 | } 574 | }, 575 | "node_modules/glob": { 576 | "version": "7.2.0", 577 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 578 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 579 | "deprecated": "Glob versions prior to v9 are no longer supported", 580 | "dev": true, 581 | "dependencies": { 582 | "fs.realpath": "^1.0.0", 583 | "inflight": "^1.0.4", 584 | "inherits": "2", 585 | "minimatch": "^3.0.4", 586 | "once": "^1.3.0", 587 | "path-is-absolute": "^1.0.0" 588 | }, 589 | "engines": { 590 | "node": "*" 591 | }, 592 | "funding": { 593 | "url": "https://github.com/sponsors/isaacs" 594 | } 595 | }, 596 | "node_modules/glob-parent": { 597 | "version": "5.1.2", 598 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 599 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 600 | "dev": true, 601 | "dependencies": { 602 | "is-glob": "^4.0.1" 603 | }, 604 | "engines": { 605 | "node": ">= 6" 606 | } 607 | }, 608 | "node_modules/graceful-fs": { 609 | "version": "4.2.8", 610 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", 611 | "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", 612 | "dev": true 613 | }, 614 | "node_modules/has": { 615 | "version": "1.0.3", 616 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 617 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 618 | "dev": true, 619 | "dependencies": { 620 | "function-bind": "^1.1.1" 621 | }, 622 | "engines": { 623 | "node": ">= 0.4.0" 624 | } 625 | }, 626 | "node_modules/has-flag": { 627 | "version": "3.0.0", 628 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 629 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 630 | "engines": { 631 | "node": ">=4" 632 | } 633 | }, 634 | "node_modules/import-fresh": { 635 | "version": "3.3.0", 636 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 637 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 638 | "dev": true, 639 | "dependencies": { 640 | "parent-module": "^1.0.0", 641 | "resolve-from": "^4.0.0" 642 | }, 643 | "engines": { 644 | "node": ">=6" 645 | }, 646 | "funding": { 647 | "url": "https://github.com/sponsors/sindresorhus" 648 | } 649 | }, 650 | "node_modules/inflight": { 651 | "version": "1.0.6", 652 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 653 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 654 | "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", 655 | "dev": true, 656 | "dependencies": { 657 | "once": "^1.3.0", 658 | "wrappy": "1" 659 | } 660 | }, 661 | "node_modules/inherits": { 662 | "version": "2.0.4", 663 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 664 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 665 | "dev": true 666 | }, 667 | "node_modules/is-binary-path": { 668 | "version": "2.1.0", 669 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 670 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 671 | "dev": true, 672 | "dependencies": { 673 | "binary-extensions": "^2.0.0" 674 | }, 675 | "engines": { 676 | "node": ">=8" 677 | } 678 | }, 679 | "node_modules/is-core-module": { 680 | "version": "2.8.0", 681 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", 682 | "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", 683 | "dev": true, 684 | "dependencies": { 685 | "has": "^1.0.3" 686 | }, 687 | "funding": { 688 | "url": "https://github.com/sponsors/ljharb" 689 | } 690 | }, 691 | "node_modules/is-extglob": { 692 | "version": "2.1.1", 693 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 694 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 695 | "dev": true, 696 | "engines": { 697 | "node": ">=0.10.0" 698 | } 699 | }, 700 | "node_modules/is-glob": { 701 | "version": "4.0.3", 702 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 703 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 704 | "dev": true, 705 | "dependencies": { 706 | "is-extglob": "^2.1.1" 707 | }, 708 | "engines": { 709 | "node": ">=0.10.0" 710 | } 711 | }, 712 | "node_modules/is-module": { 713 | "version": "1.0.0", 714 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 715 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 716 | "dev": true 717 | }, 718 | "node_modules/is-number": { 719 | "version": "7.0.0", 720 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 721 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 722 | "dev": true, 723 | "engines": { 724 | "node": ">=0.12.0" 725 | } 726 | }, 727 | "node_modules/is-reference": { 728 | "version": "1.2.1", 729 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", 730 | "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", 731 | "dev": true, 732 | "dependencies": { 733 | "@types/estree": "*" 734 | } 735 | }, 736 | "node_modules/jest-worker": { 737 | "version": "24.9.0", 738 | "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", 739 | "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", 740 | "dev": true, 741 | "dependencies": { 742 | "merge-stream": "^2.0.0", 743 | "supports-color": "^6.1.0" 744 | }, 745 | "engines": { 746 | "node": ">= 6" 747 | } 748 | }, 749 | "node_modules/jest-worker/node_modules/supports-color": { 750 | "version": "6.1.0", 751 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", 752 | "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", 753 | "dev": true, 754 | "dependencies": { 755 | "has-flag": "^3.0.0" 756 | }, 757 | "engines": { 758 | "node": ">=6" 759 | } 760 | }, 761 | "node_modules/js-tokens": { 762 | "version": "4.0.0", 763 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 764 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 765 | "dev": true 766 | }, 767 | "node_modules/json-bignum": { 768 | "version": "0.0.3", 769 | "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", 770 | "integrity": "sha1-QRY7UENsdz2CQk28IO1w23YEuNc=", 771 | "engines": { 772 | "node": ">=0.8" 773 | } 774 | }, 775 | "node_modules/kleur": { 776 | "version": "3.0.3", 777 | "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", 778 | "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", 779 | "engines": { 780 | "node": ">=6" 781 | } 782 | }, 783 | "node_modules/livereload": { 784 | "version": "0.9.3", 785 | "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", 786 | "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==", 787 | "dev": true, 788 | "dependencies": { 789 | "chokidar": "^3.5.0", 790 | "livereload-js": "^3.3.1", 791 | "opts": ">= 1.2.0", 792 | "ws": "^7.4.3" 793 | }, 794 | "bin": { 795 | "livereload": "bin/livereload.js" 796 | }, 797 | "engines": { 798 | "node": ">=8.0.0" 799 | } 800 | }, 801 | "node_modules/livereload-js": { 802 | "version": "3.3.2", 803 | "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.3.2.tgz", 804 | "integrity": "sha512-w677WnINxFkuixAoUEXOStewzLYGI76XVag+0JWMMEyjJQKs0ibWZMxkTlB96Lm3EjZ7IeOxVziBEbtxVQqQZA==", 805 | "dev": true 806 | }, 807 | "node_modules/local-access": { 808 | "version": "1.1.0", 809 | "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz", 810 | "integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==", 811 | "engines": { 812 | "node": ">=6" 813 | } 814 | }, 815 | "node_modules/lodash.camelcase": { 816 | "version": "4.3.0", 817 | "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", 818 | "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" 819 | }, 820 | "node_modules/lodash.padend": { 821 | "version": "4.6.1", 822 | "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", 823 | "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" 824 | }, 825 | "node_modules/magic-string": { 826 | "version": "0.25.7", 827 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 828 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 829 | "dev": true, 830 | "dependencies": { 831 | "sourcemap-codec": "^1.4.4" 832 | } 833 | }, 834 | "node_modules/merge-stream": { 835 | "version": "2.0.0", 836 | "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", 837 | "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", 838 | "dev": true 839 | }, 840 | "node_modules/mime": { 841 | "version": "2.5.2", 842 | "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", 843 | "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", 844 | "bin": { 845 | "mime": "cli.js" 846 | }, 847 | "engines": { 848 | "node": ">=4.0.0" 849 | } 850 | }, 851 | "node_modules/min-indent": { 852 | "version": "1.0.1", 853 | "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", 854 | "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", 855 | "dev": true, 856 | "engines": { 857 | "node": ">=4" 858 | } 859 | }, 860 | "node_modules/minimatch": { 861 | "version": "3.0.4", 862 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 863 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 864 | "dev": true, 865 | "dependencies": { 866 | "brace-expansion": "^1.1.7" 867 | }, 868 | "engines": { 869 | "node": "*" 870 | } 871 | }, 872 | "node_modules/minimist": { 873 | "version": "1.2.5", 874 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 875 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 876 | "dev": true 877 | }, 878 | "node_modules/mkdirp": { 879 | "version": "0.5.5", 880 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 881 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 882 | "dev": true, 883 | "dependencies": { 884 | "minimist": "^1.2.5" 885 | }, 886 | "bin": { 887 | "mkdirp": "bin/cmd.js" 888 | } 889 | }, 890 | "node_modules/mri": { 891 | "version": "1.2.0", 892 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", 893 | "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", 894 | "engines": { 895 | "node": ">=4" 896 | } 897 | }, 898 | "node_modules/normalize-path": { 899 | "version": "3.0.0", 900 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 901 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 902 | "dev": true, 903 | "engines": { 904 | "node": ">=0.10.0" 905 | } 906 | }, 907 | "node_modules/once": { 908 | "version": "1.4.0", 909 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 910 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 911 | "dev": true, 912 | "dependencies": { 913 | "wrappy": "1" 914 | } 915 | }, 916 | "node_modules/opts": { 917 | "version": "2.0.2", 918 | "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", 919 | "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", 920 | "dev": true 921 | }, 922 | "node_modules/pad-left": { 923 | "version": "2.1.0", 924 | "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", 925 | "integrity": "sha1-FuajstRKjhOMsIOMx8tAOk/J6ZQ=", 926 | "dependencies": { 927 | "repeat-string": "^1.5.4" 928 | }, 929 | "engines": { 930 | "node": ">=0.10.0" 931 | } 932 | }, 933 | "node_modules/parent-module": { 934 | "version": "1.0.1", 935 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 936 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 937 | "dev": true, 938 | "dependencies": { 939 | "callsites": "^3.0.0" 940 | }, 941 | "engines": { 942 | "node": ">=6" 943 | } 944 | }, 945 | "node_modules/path-is-absolute": { 946 | "version": "1.0.1", 947 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 948 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 949 | "dev": true, 950 | "engines": { 951 | "node": ">=0.10.0" 952 | } 953 | }, 954 | "node_modules/path-parse": { 955 | "version": "1.0.7", 956 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 957 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 958 | "dev": true 959 | }, 960 | "node_modules/picomatch": { 961 | "version": "2.3.0", 962 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", 963 | "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", 964 | "dev": true, 965 | "engines": { 966 | "node": ">=8.6" 967 | }, 968 | "funding": { 969 | "url": "https://github.com/sponsors/jonschlinkert" 970 | } 971 | }, 972 | "node_modules/randombytes": { 973 | "version": "2.1.0", 974 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 975 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 976 | "dev": true, 977 | "dependencies": { 978 | "safe-buffer": "^5.1.0" 979 | } 980 | }, 981 | "node_modules/readdirp": { 982 | "version": "3.6.0", 983 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 984 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 985 | "dev": true, 986 | "dependencies": { 987 | "picomatch": "^2.2.1" 988 | }, 989 | "engines": { 990 | "node": ">=8.10.0" 991 | } 992 | }, 993 | "node_modules/reduce-flatten": { 994 | "version": "1.0.1", 995 | "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", 996 | "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", 997 | "engines": { 998 | "node": ">=0.10.0" 999 | } 1000 | }, 1001 | "node_modules/repeat-string": { 1002 | "version": "1.6.1", 1003 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 1004 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", 1005 | "engines": { 1006 | "node": ">=0.10" 1007 | } 1008 | }, 1009 | "node_modules/require-relative": { 1010 | "version": "0.8.7", 1011 | "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", 1012 | "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", 1013 | "dev": true 1014 | }, 1015 | "node_modules/resolve": { 1016 | "version": "1.20.0", 1017 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 1018 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 1019 | "dev": true, 1020 | "dependencies": { 1021 | "is-core-module": "^2.2.0", 1022 | "path-parse": "^1.0.6" 1023 | }, 1024 | "funding": { 1025 | "url": "https://github.com/sponsors/ljharb" 1026 | } 1027 | }, 1028 | "node_modules/resolve-from": { 1029 | "version": "4.0.0", 1030 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1031 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1032 | "dev": true, 1033 | "engines": { 1034 | "node": ">=4" 1035 | } 1036 | }, 1037 | "node_modules/rimraf": { 1038 | "version": "2.7.1", 1039 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 1040 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 1041 | "deprecated": "Rimraf versions prior to v4 are no longer supported", 1042 | "dev": true, 1043 | "dependencies": { 1044 | "glob": "^7.1.3" 1045 | }, 1046 | "bin": { 1047 | "rimraf": "bin.js" 1048 | } 1049 | }, 1050 | "node_modules/rollup": { 1051 | "version": "2.59.0", 1052 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.59.0.tgz", 1053 | "integrity": "sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==", 1054 | "dev": true, 1055 | "bin": { 1056 | "rollup": "dist/bin/rollup" 1057 | }, 1058 | "engines": { 1059 | "node": ">=10.0.0" 1060 | }, 1061 | "optionalDependencies": { 1062 | "fsevents": "~2.3.2" 1063 | } 1064 | }, 1065 | "node_modules/rollup-plugin-livereload": { 1066 | "version": "1.3.0", 1067 | "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", 1068 | "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", 1069 | "dev": true, 1070 | "dependencies": { 1071 | "livereload": "^0.9.1" 1072 | } 1073 | }, 1074 | "node_modules/rollup-plugin-svelte": { 1075 | "version": "6.1.1", 1076 | "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-6.1.1.tgz", 1077 | "integrity": "sha512-ijnm0pH1ScrY4uxwaNXBpNVejVzpL2769hIEbAlnqNUWZrffLspu5/k9/l/Wsj3NrEHLQ6wCKGagVJonyfN7ow==", 1078 | "dev": true, 1079 | "dependencies": { 1080 | "require-relative": "^0.8.7", 1081 | "rollup-pluginutils": "^2.8.2", 1082 | "sourcemap-codec": "^1.4.8" 1083 | }, 1084 | "peerDependencies": { 1085 | "rollup": ">=1.19.2", 1086 | "svelte": "*" 1087 | } 1088 | }, 1089 | "node_modules/rollup-plugin-terser": { 1090 | "version": "5.3.1", 1091 | "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz", 1092 | "integrity": "sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==", 1093 | "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", 1094 | "dev": true, 1095 | "dependencies": { 1096 | "@babel/code-frame": "^7.5.5", 1097 | "jest-worker": "^24.9.0", 1098 | "rollup-pluginutils": "^2.8.2", 1099 | "serialize-javascript": "^4.0.0", 1100 | "terser": "^4.6.2" 1101 | }, 1102 | "peerDependencies": { 1103 | "rollup": ">=0.66.0 <3" 1104 | } 1105 | }, 1106 | "node_modules/rollup-pluginutils": { 1107 | "version": "2.8.2", 1108 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 1109 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 1110 | "dev": true, 1111 | "dependencies": { 1112 | "estree-walker": "^0.6.1" 1113 | } 1114 | }, 1115 | "node_modules/rollup-pluginutils/node_modules/estree-walker": { 1116 | "version": "0.6.1", 1117 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 1118 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 1119 | "dev": true 1120 | }, 1121 | "node_modules/sade": { 1122 | "version": "1.7.4", 1123 | "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.4.tgz", 1124 | "integrity": "sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA==", 1125 | "dependencies": { 1126 | "mri": "^1.1.0" 1127 | }, 1128 | "engines": { 1129 | "node": ">= 6" 1130 | } 1131 | }, 1132 | "node_modules/safe-buffer": { 1133 | "version": "5.2.1", 1134 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1135 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1136 | "dev": true, 1137 | "funding": [ 1138 | { 1139 | "type": "github", 1140 | "url": "https://github.com/sponsors/feross" 1141 | }, 1142 | { 1143 | "type": "patreon", 1144 | "url": "https://www.patreon.com/feross" 1145 | }, 1146 | { 1147 | "type": "consulting", 1148 | "url": "https://feross.org/support" 1149 | } 1150 | ] 1151 | }, 1152 | "node_modules/sander": { 1153 | "version": "0.5.1", 1154 | "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", 1155 | "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", 1156 | "dev": true, 1157 | "dependencies": { 1158 | "es6-promise": "^3.1.2", 1159 | "graceful-fs": "^4.1.3", 1160 | "mkdirp": "^0.5.1", 1161 | "rimraf": "^2.5.2" 1162 | } 1163 | }, 1164 | "node_modules/semiver": { 1165 | "version": "1.1.0", 1166 | "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz", 1167 | "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==", 1168 | "engines": { 1169 | "node": ">=6" 1170 | } 1171 | }, 1172 | "node_modules/serialize-javascript": { 1173 | "version": "4.0.0", 1174 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", 1175 | "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", 1176 | "dev": true, 1177 | "dependencies": { 1178 | "randombytes": "^2.1.0" 1179 | } 1180 | }, 1181 | "node_modules/sirv": { 1182 | "version": "1.0.18", 1183 | "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.18.tgz", 1184 | "integrity": "sha512-f2AOPogZmXgJ9Ma2M22ZEhc1dNtRIzcEkiflMFeVTRq+OViOZMvH1IPMVOwrKaxpSaHioBJiDR0SluRqGa7atA==", 1185 | "dependencies": { 1186 | "@polka/url": "^1.0.0-next.20", 1187 | "mime": "^2.3.1", 1188 | "totalist": "^1.0.0" 1189 | }, 1190 | "engines": { 1191 | "node": ">= 10" 1192 | } 1193 | }, 1194 | "node_modules/sirv-cli": { 1195 | "version": "1.0.14", 1196 | "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-1.0.14.tgz", 1197 | "integrity": "sha512-yyUTNr984ANKDloqepkYbBSqvx3buwYg2sQKPWjSU+IBia5loaoka2If8N9CMwt8AfP179cdEl7kYJ//iWJHjQ==", 1198 | "dependencies": { 1199 | "console-clear": "^1.1.0", 1200 | "get-port": "^3.2.0", 1201 | "kleur": "^3.0.0", 1202 | "local-access": "^1.0.1", 1203 | "sade": "^1.6.0", 1204 | "semiver": "^1.0.0", 1205 | "sirv": "^1.0.13", 1206 | "tinydate": "^1.0.0" 1207 | }, 1208 | "bin": { 1209 | "sirv": "bin.js" 1210 | }, 1211 | "engines": { 1212 | "node": ">= 10" 1213 | } 1214 | }, 1215 | "node_modules/sorcery": { 1216 | "version": "0.10.0", 1217 | "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", 1218 | "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", 1219 | "dev": true, 1220 | "dependencies": { 1221 | "buffer-crc32": "^0.2.5", 1222 | "minimist": "^1.2.0", 1223 | "sander": "^0.5.0", 1224 | "sourcemap-codec": "^1.3.0" 1225 | }, 1226 | "bin": { 1227 | "sorcery": "bin/index.js" 1228 | } 1229 | }, 1230 | "node_modules/source-map": { 1231 | "version": "0.7.3", 1232 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", 1233 | "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", 1234 | "dev": true, 1235 | "engines": { 1236 | "node": ">= 8" 1237 | } 1238 | }, 1239 | "node_modules/source-map-support": { 1240 | "version": "0.5.20", 1241 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", 1242 | "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", 1243 | "dev": true, 1244 | "dependencies": { 1245 | "buffer-from": "^1.0.0", 1246 | "source-map": "^0.6.0" 1247 | } 1248 | }, 1249 | "node_modules/source-map-support/node_modules/source-map": { 1250 | "version": "0.6.1", 1251 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1252 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1253 | "dev": true, 1254 | "engines": { 1255 | "node": ">=0.10.0" 1256 | } 1257 | }, 1258 | "node_modules/sourcemap-codec": { 1259 | "version": "1.4.8", 1260 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 1261 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 1262 | "deprecated": "Please use @jridgewell/sourcemap-codec instead", 1263 | "dev": true 1264 | }, 1265 | "node_modules/strip-indent": { 1266 | "version": "3.0.0", 1267 | "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", 1268 | "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", 1269 | "dev": true, 1270 | "dependencies": { 1271 | "min-indent": "^1.0.0" 1272 | }, 1273 | "engines": { 1274 | "node": ">=8" 1275 | } 1276 | }, 1277 | "node_modules/supports-color": { 1278 | "version": "5.5.0", 1279 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1280 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1281 | "dependencies": { 1282 | "has-flag": "^3.0.0" 1283 | }, 1284 | "engines": { 1285 | "node": ">=4" 1286 | } 1287 | }, 1288 | "node_modules/svelte": { 1289 | "version": "3.44.1", 1290 | "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.1.tgz", 1291 | "integrity": "sha512-4DrCEJoBvdR689efHNSxIQn2pnFwB7E7j2yLEJtHE/P8hxwZWIphCtJ8are7bjl/iVMlcEf5uh5pJ68IwR09vQ==", 1292 | "dev": true, 1293 | "engines": { 1294 | "node": ">= 8" 1295 | } 1296 | }, 1297 | "node_modules/svelte-check": { 1298 | "version": "1.6.0", 1299 | "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-1.6.0.tgz", 1300 | "integrity": "sha512-nQTlbFJWhwoeLY5rkhgbjzGQSwk5F1pRdEXait0EFaQSrE/iJF+PIjrQlk0BjL/ogk9HaR9ZI0DQSYrl7jl3IQ==", 1301 | "dev": true, 1302 | "dependencies": { 1303 | "chalk": "^4.0.0", 1304 | "chokidar": "^3.4.1", 1305 | "glob": "^7.1.6", 1306 | "import-fresh": "^3.2.1", 1307 | "minimist": "^1.2.5", 1308 | "sade": "^1.7.4", 1309 | "source-map": "^0.7.3", 1310 | "svelte-preprocess": "^4.0.0", 1311 | "typescript": "*" 1312 | }, 1313 | "bin": { 1314 | "svelte-check": "bin/svelte-check" 1315 | }, 1316 | "peerDependencies": { 1317 | "svelte": "^3.24.0" 1318 | } 1319 | }, 1320 | "node_modules/svelte-check/node_modules/ansi-styles": { 1321 | "version": "4.3.0", 1322 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1323 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1324 | "dev": true, 1325 | "dependencies": { 1326 | "color-convert": "^2.0.1" 1327 | }, 1328 | "engines": { 1329 | "node": ">=8" 1330 | }, 1331 | "funding": { 1332 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1333 | } 1334 | }, 1335 | "node_modules/svelte-check/node_modules/chalk": { 1336 | "version": "4.1.2", 1337 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1338 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1339 | "dev": true, 1340 | "dependencies": { 1341 | "ansi-styles": "^4.1.0", 1342 | "supports-color": "^7.1.0" 1343 | }, 1344 | "engines": { 1345 | "node": ">=10" 1346 | }, 1347 | "funding": { 1348 | "url": "https://github.com/chalk/chalk?sponsor=1" 1349 | } 1350 | }, 1351 | "node_modules/svelte-check/node_modules/color-convert": { 1352 | "version": "2.0.1", 1353 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1354 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1355 | "dev": true, 1356 | "dependencies": { 1357 | "color-name": "~1.1.4" 1358 | }, 1359 | "engines": { 1360 | "node": ">=7.0.0" 1361 | } 1362 | }, 1363 | "node_modules/svelte-check/node_modules/color-name": { 1364 | "version": "1.1.4", 1365 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1366 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1367 | "dev": true 1368 | }, 1369 | "node_modules/svelte-check/node_modules/has-flag": { 1370 | "version": "4.0.0", 1371 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1372 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1373 | "dev": true, 1374 | "engines": { 1375 | "node": ">=8" 1376 | } 1377 | }, 1378 | "node_modules/svelte-check/node_modules/supports-color": { 1379 | "version": "7.2.0", 1380 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1381 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1382 | "dev": true, 1383 | "dependencies": { 1384 | "has-flag": "^4.0.0" 1385 | }, 1386 | "engines": { 1387 | "node": ">=8" 1388 | } 1389 | }, 1390 | "node_modules/svelte-preprocess": { 1391 | "version": "4.9.8", 1392 | "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.9.8.tgz", 1393 | "integrity": "sha512-EQS/oRZzMtYdAprppZxY3HcysKh11w54MgA63ybtL+TAZ4hVqYOnhw41JVJjWN9dhPnNjjLzvbZ2tMhTsla1Og==", 1394 | "dev": true, 1395 | "hasInstallScript": true, 1396 | "dependencies": { 1397 | "@types/pug": "^2.0.4", 1398 | "@types/sass": "^1.16.0", 1399 | "detect-indent": "^6.0.0", 1400 | "magic-string": "^0.25.7", 1401 | "sorcery": "^0.10.0", 1402 | "strip-indent": "^3.0.0" 1403 | }, 1404 | "engines": { 1405 | "node": ">= 9.11.2" 1406 | }, 1407 | "peerDependencies": { 1408 | "@babel/core": "^7.10.2", 1409 | "coffeescript": "^2.5.1", 1410 | "less": "^3.11.3", 1411 | "postcss": "^7 || ^8", 1412 | "postcss-load-config": "^2.1.0 || ^3.0.0", 1413 | "pug": "^3.0.0", 1414 | "sass": "^1.26.8", 1415 | "stylus": "^0.54.7", 1416 | "sugarss": "^2.0.0", 1417 | "svelte": "^3.23.0", 1418 | "typescript": "^3.9.5 || ^4.0.0" 1419 | }, 1420 | "peerDependenciesMeta": { 1421 | "@babel/core": { 1422 | "optional": true 1423 | }, 1424 | "coffeescript": { 1425 | "optional": true 1426 | }, 1427 | "less": { 1428 | "optional": true 1429 | }, 1430 | "node-sass": { 1431 | "optional": true 1432 | }, 1433 | "postcss": { 1434 | "optional": true 1435 | }, 1436 | "postcss-load-config": { 1437 | "optional": true 1438 | }, 1439 | "pug": { 1440 | "optional": true 1441 | }, 1442 | "sass": { 1443 | "optional": true 1444 | }, 1445 | "stylus": { 1446 | "optional": true 1447 | }, 1448 | "sugarss": { 1449 | "optional": true 1450 | }, 1451 | "typescript": { 1452 | "optional": true 1453 | } 1454 | } 1455 | }, 1456 | "node_modules/table-layout": { 1457 | "version": "0.4.5", 1458 | "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", 1459 | "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", 1460 | "dependencies": { 1461 | "array-back": "^2.0.0", 1462 | "deep-extend": "~0.6.0", 1463 | "lodash.padend": "^4.6.1", 1464 | "typical": "^2.6.1", 1465 | "wordwrapjs": "^3.0.0" 1466 | }, 1467 | "engines": { 1468 | "node": ">=4.0.0" 1469 | } 1470 | }, 1471 | "node_modules/terser": { 1472 | "version": "4.8.0", 1473 | "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", 1474 | "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", 1475 | "dev": true, 1476 | "dependencies": { 1477 | "commander": "^2.20.0", 1478 | "source-map": "~0.6.1", 1479 | "source-map-support": "~0.5.12" 1480 | }, 1481 | "bin": { 1482 | "terser": "bin/terser" 1483 | }, 1484 | "engines": { 1485 | "node": ">=6.0.0" 1486 | } 1487 | }, 1488 | "node_modules/terser/node_modules/source-map": { 1489 | "version": "0.6.1", 1490 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1491 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1492 | "dev": true, 1493 | "engines": { 1494 | "node": ">=0.10.0" 1495 | } 1496 | }, 1497 | "node_modules/test-value": { 1498 | "version": "3.0.0", 1499 | "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", 1500 | "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", 1501 | "dependencies": { 1502 | "array-back": "^2.0.0", 1503 | "typical": "^2.6.1" 1504 | }, 1505 | "engines": { 1506 | "node": ">=4.0.0" 1507 | } 1508 | }, 1509 | "node_modules/text-encoding-utf-8": { 1510 | "version": "1.0.2", 1511 | "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", 1512 | "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" 1513 | }, 1514 | "node_modules/tinydate": { 1515 | "version": "1.3.0", 1516 | "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz", 1517 | "integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==", 1518 | "engines": { 1519 | "node": ">=4" 1520 | } 1521 | }, 1522 | "node_modules/to-regex-range": { 1523 | "version": "5.0.1", 1524 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1525 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1526 | "dev": true, 1527 | "dependencies": { 1528 | "is-number": "^7.0.0" 1529 | }, 1530 | "engines": { 1531 | "node": ">=8.0" 1532 | } 1533 | }, 1534 | "node_modules/totalist": { 1535 | "version": "1.1.0", 1536 | "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", 1537 | "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", 1538 | "engines": { 1539 | "node": ">=6" 1540 | } 1541 | }, 1542 | "node_modules/tslib": { 1543 | "version": "2.3.1", 1544 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 1545 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", 1546 | "dev": true 1547 | }, 1548 | "node_modules/typescript": { 1549 | "version": "3.9.10", 1550 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", 1551 | "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", 1552 | "dev": true, 1553 | "bin": { 1554 | "tsc": "bin/tsc", 1555 | "tsserver": "bin/tsserver" 1556 | }, 1557 | "engines": { 1558 | "node": ">=4.2.0" 1559 | } 1560 | }, 1561 | "node_modules/typical": { 1562 | "version": "2.6.1", 1563 | "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", 1564 | "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=" 1565 | }, 1566 | "node_modules/wordwrapjs": { 1567 | "version": "3.0.0", 1568 | "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", 1569 | "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", 1570 | "dependencies": { 1571 | "reduce-flatten": "^1.0.1", 1572 | "typical": "^2.6.1" 1573 | }, 1574 | "engines": { 1575 | "node": ">=4.0.0" 1576 | } 1577 | }, 1578 | "node_modules/wrappy": { 1579 | "version": "1.0.2", 1580 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1581 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1582 | "dev": true 1583 | }, 1584 | "node_modules/ws": { 1585 | "version": "7.5.5", 1586 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", 1587 | "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", 1588 | "dev": true, 1589 | "engines": { 1590 | "node": ">=8.3.0" 1591 | }, 1592 | "peerDependencies": { 1593 | "bufferutil": "^4.0.1", 1594 | "utf-8-validate": "^5.0.2" 1595 | }, 1596 | "peerDependenciesMeta": { 1597 | "bufferutil": { 1598 | "optional": true 1599 | }, 1600 | "utf-8-validate": { 1601 | "optional": true 1602 | } 1603 | } 1604 | } 1605 | } 1606 | } 1607 | -------------------------------------------------------------------------------- /ml2.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "7dc091c8", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "import pandas as pd" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 12, 16 | "id": "17b85dae", 17 | "metadata": {}, 18 | "outputs": [], 19 | "source": [ 20 | "movies = pd.read_csv('dataset2.csv')" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "id": "762bd9e1", 27 | "metadata": {}, 28 | "outputs": [ 29 | { 30 | "data": { 31 | "text/html": [ 32 | "
\n", 33 | "\n", 46 | "\n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | "
idtitlegenreoriginal_languageoverviewpopularityrelease_datevote_averagevote_count
0278The Shawshank RedemptionDrama,CrimeenFramed in the 1940s for the double murder of h...94.0751994-09-238.721862
119404Dilwale Dulhania Le JayengeComedy,Drama,RomancehiRaj is a rich, carefree, happy-go-lucky second...25.4081995-10-198.73731
2238The GodfatherDrama,CrimeenSpanning the years 1945 to 1955, a chronicle o...90.5851972-03-148.716280
3424Schindler's ListDrama,History,WarenThe true story of how businessman Oskar Schind...44.7611993-12-158.612959
4240The Godfather: Part IIDrama,CrimeenIn the continuing saga of the Corleone crime f...57.7491974-12-208.69811
5667257Impossible ThingsFamily,DramaesMatilde is a woman who, after the death of her...14.3582021-06-178.6255
6129Spirited AwayAnimation,Family,FantasyjaA young girl, Chihiro, becomes trapped in a st...92.0562001-07-208.513093
7730154Your Eyes TellRomance,DramajaA tragic accident lead to Kaori's blindness, b...51.3452020-10-238.5339
8372754Dou kyu sei – ClassmatesRomance,AnimationjaRihito Sajo, an honor student with a perfect s...14.2852016-02-208.5239
9372058Your Name.Romance,Animation,DramajaHigh schoolers Mitsuha and Taki are complete s...158.2702016-08-268.58895
\n", 184 | "
" 185 | ], 186 | "text/plain": [ 187 | " id title genre \\\n", 188 | "0 278 The Shawshank Redemption Drama,Crime \n", 189 | "1 19404 Dilwale Dulhania Le Jayenge Comedy,Drama,Romance \n", 190 | "2 238 The Godfather Drama,Crime \n", 191 | "3 424 Schindler's List Drama,History,War \n", 192 | "4 240 The Godfather: Part II Drama,Crime \n", 193 | "5 667257 Impossible Things Family,Drama \n", 194 | "6 129 Spirited Away Animation,Family,Fantasy \n", 195 | "7 730154 Your Eyes Tell Romance,Drama \n", 196 | "8 372754 Dou kyu sei – Classmates Romance,Animation \n", 197 | "9 372058 Your Name. Romance,Animation,Drama \n", 198 | "\n", 199 | " original_language overview \\\n", 200 | "0 en Framed in the 1940s for the double murder of h... \n", 201 | "1 hi Raj is a rich, carefree, happy-go-lucky second... \n", 202 | "2 en Spanning the years 1945 to 1955, a chronicle o... \n", 203 | "3 en The true story of how businessman Oskar Schind... \n", 204 | "4 en In the continuing saga of the Corleone crime f... \n", 205 | "5 es Matilde is a woman who, after the death of her... \n", 206 | "6 ja A young girl, Chihiro, becomes trapped in a st... \n", 207 | "7 ja A tragic accident lead to Kaori's blindness, b... \n", 208 | "8 ja Rihito Sajo, an honor student with a perfect s... \n", 209 | "9 ja High schoolers Mitsuha and Taki are complete s... \n", 210 | "\n", 211 | " popularity release_date vote_average vote_count \n", 212 | "0 94.075 1994-09-23 8.7 21862 \n", 213 | "1 25.408 1995-10-19 8.7 3731 \n", 214 | "2 90.585 1972-03-14 8.7 16280 \n", 215 | "3 44.761 1993-12-15 8.6 12959 \n", 216 | "4 57.749 1974-12-20 8.6 9811 \n", 217 | "5 14.358 2021-06-17 8.6 255 \n", 218 | "6 92.056 2001-07-20 8.5 13093 \n", 219 | "7 51.345 2020-10-23 8.5 339 \n", 220 | "8 14.285 2016-02-20 8.5 239 \n", 221 | "9 158.270 2016-08-26 8.5 8895 " 222 | ] 223 | }, 224 | "execution_count": 13, 225 | "metadata": {}, 226 | "output_type": "execute_result" 227 | } 228 | ], 229 | "source": [ 230 | "movies.head(10)" 231 | ] 232 | }, 233 | { 234 | "cell_type": "code", 235 | "execution_count": 15, 236 | "id": "bbaca558", 237 | "metadata": {}, 238 | "outputs": [ 239 | { 240 | "data": { 241 | "text/html": [ 242 | "
\n", 243 | "\n", 256 | "\n", 257 | " \n", 258 | " \n", 259 | " \n", 260 | " \n", 261 | " \n", 262 | " \n", 263 | " \n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | " \n", 285 | " \n", 286 | " \n", 287 | " \n", 288 | " \n", 289 | " \n", 290 | " \n", 291 | " \n", 292 | " \n", 293 | " \n", 294 | " \n", 295 | " \n", 296 | " \n", 297 | " \n", 298 | " \n", 299 | " \n", 300 | " \n", 301 | " \n", 302 | " \n", 303 | " \n", 304 | " \n", 305 | " \n", 306 | " \n", 307 | " \n", 308 | " \n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | "
idpopularityvote_averagevote_count
count10000.00000010000.00000010000.00000010000.000000
mean161243.50500034.6972676.6211501547.309400
std211422.046043211.6841750.7662312648.295789
min5.0000000.6000004.600000200.000000
25%10127.7500009.1547506.100000315.000000
50%30002.50000013.6375006.600000583.500000
75%310133.50000025.6512507.2000001460.000000
max934761.00000010436.9170008.70000031917.000000
\n", 325 | "
" 326 | ], 327 | "text/plain": [ 328 | " id popularity vote_average vote_count\n", 329 | "count 10000.000000 10000.000000 10000.000000 10000.000000\n", 330 | "mean 161243.505000 34.697267 6.621150 1547.309400\n", 331 | "std 211422.046043 211.684175 0.766231 2648.295789\n", 332 | "min 5.000000 0.600000 4.600000 200.000000\n", 333 | "25% 10127.750000 9.154750 6.100000 315.000000\n", 334 | "50% 30002.500000 13.637500 6.600000 583.500000\n", 335 | "75% 310133.500000 25.651250 7.200000 1460.000000\n", 336 | "max 934761.000000 10436.917000 8.700000 31917.000000" 337 | ] 338 | }, 339 | "execution_count": 15, 340 | "metadata": {}, 341 | "output_type": "execute_result" 342 | } 343 | ], 344 | "source": [ 345 | "movies.describe()" 346 | ] 347 | }, 348 | { 349 | "cell_type": "code", 350 | "execution_count": null, 351 | "id": "1cee90f4", 352 | "metadata": {}, 353 | "outputs": [ 354 | { 355 | "data": { 356 | "text/plain": [ 357 | "Index(['id', 'title', 'genre', 'original_language', 'overview', 'popularity',\n", 358 | " 'release_date', 'vote_average', 'vote_count'],\n", 359 | " dtype='object')" 360 | ] 361 | }, 362 | "execution_count": 19, 363 | "metadata": {}, 364 | "output_type": "execute_result" 365 | } 366 | ], 367 | "source": [ 368 | "#Feature selection part\n", 369 | "movies.columns" 370 | ] 371 | }, 372 | { 373 | "cell_type": "code", 374 | "execution_count": 21, 375 | "id": "d8872e2e", 376 | "metadata": {}, 377 | "outputs": [], 378 | "source": [ 379 | "movies = movies[['id', 'title', 'overview', 'genre']]" 380 | ] 381 | }, 382 | { 383 | "cell_type": "code", 384 | "execution_count": 22, 385 | "id": "550df3c5", 386 | "metadata": {}, 387 | "outputs": [ 388 | { 389 | "data": { 390 | "text/html": [ 391 | "
\n", 392 | "\n", 405 | "\n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | " \n", 443 | " \n", 444 | " \n", 445 | " \n", 446 | " \n", 447 | " \n", 448 | " \n", 449 | " \n", 450 | " \n", 451 | " \n", 452 | " \n", 453 | " \n", 454 | " \n", 455 | " \n", 456 | " \n", 457 | " \n", 458 | " \n", 459 | " \n", 460 | " \n", 461 | " \n", 462 | " \n", 463 | " \n", 464 | " \n", 465 | " \n", 466 | " \n", 467 | " \n", 468 | " \n", 469 | " \n", 470 | " \n", 471 | " \n", 472 | " \n", 473 | " \n", 474 | " \n", 475 | " \n", 476 | " \n", 477 | " \n", 478 | " \n", 479 | " \n", 480 | " \n", 481 | " \n", 482 | " \n", 483 | " \n", 484 | " \n", 485 | " \n", 486 | " \n", 487 | " \n", 488 | " \n", 489 | " \n", 490 | " \n", 491 | " \n", 492 | " \n", 493 | " \n", 494 | "
idtitleoverviewgenre
0278The Shawshank RedemptionFramed in the 1940s for the double murder of h...Drama,Crime
119404Dilwale Dulhania Le JayengeRaj is a rich, carefree, happy-go-lucky second...Comedy,Drama,Romance
2238The GodfatherSpanning the years 1945 to 1955, a chronicle o...Drama,Crime
3424Schindler's ListThe true story of how businessman Oskar Schind...Drama,History,War
4240The Godfather: Part IIIn the continuing saga of the Corleone crime f...Drama,Crime
...............
999510196The Last AirbenderThe story follows the adventures of Aang, a yo...Action,Adventure,Fantasy
9996331446Sharknado 3: Oh Hell No!The sharks take bite out of the East Coast whe...Action,TV Movie,Science Fiction,Comedy,Adventure
999713995Captain AmericaDuring World War II, a brave, patriotic Americ...Action,Science Fiction,War
99982312In the Name of the King: A Dungeon Siege TaleA man named Farmer sets out to rescue his kidn...Adventure,Fantasy,Action,Drama
9999455957DominoSeeking justice for his partner’s murder by an...Thriller,Action,Crime
\n", 495 | "

10000 rows × 4 columns

\n", 496 | "
" 497 | ], 498 | "text/plain": [ 499 | " id title \\\n", 500 | "0 278 The Shawshank Redemption \n", 501 | "1 19404 Dilwale Dulhania Le Jayenge \n", 502 | "2 238 The Godfather \n", 503 | "3 424 Schindler's List \n", 504 | "4 240 The Godfather: Part II \n", 505 | "... ... ... \n", 506 | "9995 10196 The Last Airbender \n", 507 | "9996 331446 Sharknado 3: Oh Hell No! \n", 508 | "9997 13995 Captain America \n", 509 | "9998 2312 In the Name of the King: A Dungeon Siege Tale \n", 510 | "9999 455957 Domino \n", 511 | "\n", 512 | " overview \\\n", 513 | "0 Framed in the 1940s for the double murder of h... \n", 514 | "1 Raj is a rich, carefree, happy-go-lucky second... \n", 515 | "2 Spanning the years 1945 to 1955, a chronicle o... \n", 516 | "3 The true story of how businessman Oskar Schind... \n", 517 | "4 In the continuing saga of the Corleone crime f... \n", 518 | "... ... \n", 519 | "9995 The story follows the adventures of Aang, a yo... \n", 520 | "9996 The sharks take bite out of the East Coast whe... \n", 521 | "9997 During World War II, a brave, patriotic Americ... \n", 522 | "9998 A man named Farmer sets out to rescue his kidn... \n", 523 | "9999 Seeking justice for his partner’s murder by an... \n", 524 | "\n", 525 | " genre \n", 526 | "0 Drama,Crime \n", 527 | "1 Comedy,Drama,Romance \n", 528 | "2 Drama,Crime \n", 529 | "3 Drama,History,War \n", 530 | "4 Drama,Crime \n", 531 | "... ... \n", 532 | "9995 Action,Adventure,Fantasy \n", 533 | "9996 Action,TV Movie,Science Fiction,Comedy,Adventure \n", 534 | "9997 Action,Science Fiction,War \n", 535 | "9998 Adventure,Fantasy,Action,Drama \n", 536 | "9999 Thriller,Action,Crime \n", 537 | "\n", 538 | "[10000 rows x 4 columns]" 539 | ] 540 | }, 541 | "execution_count": 22, 542 | "metadata": {}, 543 | "output_type": "execute_result" 544 | } 545 | ], 546 | "source": [ 547 | "movies" 548 | ] 549 | }, 550 | { 551 | "cell_type": "code", 552 | "execution_count": 23, 553 | "id": "0b44fff1", 554 | "metadata": {}, 555 | "outputs": [ 556 | { 557 | "name": "stderr", 558 | "output_type": "stream", 559 | "text": [ 560 | "C:\\Users\\rafig\\AppData\\Local\\Temp\\ipykernel_9828\\104729029.py:1: SettingWithCopyWarning: \n", 561 | "A value is trying to be set on a copy of a slice from a DataFrame.\n", 562 | "Try using .loc[row_indexer,col_indexer] = value instead\n", 563 | "\n", 564 | "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", 565 | " movies['tags'] = movies['overview']+movies['genre']\n" 566 | ] 567 | } 568 | ], 569 | "source": [ 570 | "movies['tags'] = movies['overview']+movies['genre']" 571 | ] 572 | }, 573 | { 574 | "cell_type": "code", 575 | "execution_count": 24, 576 | "id": "d7021f00", 577 | "metadata": {}, 578 | "outputs": [ 579 | { 580 | "data": { 581 | "text/html": [ 582 | "
\n", 583 | "\n", 596 | "\n", 597 | " \n", 598 | " \n", 599 | " \n", 600 | " \n", 601 | " \n", 602 | " \n", 603 | " \n", 604 | " \n", 605 | " \n", 606 | " \n", 607 | " \n", 608 | " \n", 609 | " \n", 610 | " \n", 611 | " \n", 612 | " \n", 613 | " \n", 614 | " \n", 615 | " \n", 616 | " \n", 617 | " \n", 618 | " \n", 619 | " \n", 620 | " \n", 621 | " \n", 622 | " \n", 623 | " \n", 624 | " \n", 625 | " \n", 626 | " \n", 627 | " \n", 628 | " \n", 629 | " \n", 630 | " \n", 631 | " \n", 632 | " \n", 633 | " \n", 634 | " \n", 635 | " \n", 636 | " \n", 637 | " \n", 638 | " \n", 639 | " \n", 640 | " \n", 641 | " \n", 642 | " \n", 643 | " \n", 644 | " \n", 645 | " \n", 646 | " \n", 647 | " \n", 648 | " \n", 649 | " \n", 650 | " \n", 651 | " \n", 652 | " \n", 653 | " \n", 654 | " \n", 655 | " \n", 656 | " \n", 657 | " \n", 658 | " \n", 659 | " \n", 660 | " \n", 661 | " \n", 662 | " \n", 663 | " \n", 664 | " \n", 665 | " \n", 666 | " \n", 667 | " \n", 668 | " \n", 669 | " \n", 670 | " \n", 671 | " \n", 672 | " \n", 673 | " \n", 674 | " \n", 675 | " \n", 676 | " \n", 677 | " \n", 678 | " \n", 679 | " \n", 680 | " \n", 681 | " \n", 682 | " \n", 683 | " \n", 684 | " \n", 685 | " \n", 686 | " \n", 687 | " \n", 688 | " \n", 689 | " \n", 690 | " \n", 691 | " \n", 692 | " \n", 693 | " \n", 694 | " \n", 695 | " \n", 696 | " \n", 697 | "
idtitleoverviewgenretags
0278The Shawshank RedemptionFramed in the 1940s for the double murder of h...Drama,CrimeFramed in the 1940s for the double murder of h...
119404Dilwale Dulhania Le JayengeRaj is a rich, carefree, happy-go-lucky second...Comedy,Drama,RomanceRaj is a rich, carefree, happy-go-lucky second...
2238The GodfatherSpanning the years 1945 to 1955, a chronicle o...Drama,CrimeSpanning the years 1945 to 1955, a chronicle o...
3424Schindler's ListThe true story of how businessman Oskar Schind...Drama,History,WarThe true story of how businessman Oskar Schind...
4240The Godfather: Part IIIn the continuing saga of the Corleone crime f...Drama,CrimeIn the continuing saga of the Corleone crime f...
..................
999510196The Last AirbenderThe story follows the adventures of Aang, a yo...Action,Adventure,FantasyThe story follows the adventures of Aang, a yo...
9996331446Sharknado 3: Oh Hell No!The sharks take bite out of the East Coast whe...Action,TV Movie,Science Fiction,Comedy,AdventureThe sharks take bite out of the East Coast whe...
999713995Captain AmericaDuring World War II, a brave, patriotic Americ...Action,Science Fiction,WarDuring World War II, a brave, patriotic Americ...
99982312In the Name of the King: A Dungeon Siege TaleA man named Farmer sets out to rescue his kidn...Adventure,Fantasy,Action,DramaA man named Farmer sets out to rescue his kidn...
9999455957DominoSeeking justice for his partner’s murder by an...Thriller,Action,CrimeSeeking justice for his partner’s murder by an...
\n", 698 | "

10000 rows × 5 columns

\n", 699 | "
" 700 | ], 701 | "text/plain": [ 702 | " id title \\\n", 703 | "0 278 The Shawshank Redemption \n", 704 | "1 19404 Dilwale Dulhania Le Jayenge \n", 705 | "2 238 The Godfather \n", 706 | "3 424 Schindler's List \n", 707 | "4 240 The Godfather: Part II \n", 708 | "... ... ... \n", 709 | "9995 10196 The Last Airbender \n", 710 | "9996 331446 Sharknado 3: Oh Hell No! \n", 711 | "9997 13995 Captain America \n", 712 | "9998 2312 In the Name of the King: A Dungeon Siege Tale \n", 713 | "9999 455957 Domino \n", 714 | "\n", 715 | " overview \\\n", 716 | "0 Framed in the 1940s for the double murder of h... \n", 717 | "1 Raj is a rich, carefree, happy-go-lucky second... \n", 718 | "2 Spanning the years 1945 to 1955, a chronicle o... \n", 719 | "3 The true story of how businessman Oskar Schind... \n", 720 | "4 In the continuing saga of the Corleone crime f... \n", 721 | "... ... \n", 722 | "9995 The story follows the adventures of Aang, a yo... \n", 723 | "9996 The sharks take bite out of the East Coast whe... \n", 724 | "9997 During World War II, a brave, patriotic Americ... \n", 725 | "9998 A man named Farmer sets out to rescue his kidn... \n", 726 | "9999 Seeking justice for his partner’s murder by an... \n", 727 | "\n", 728 | " genre \\\n", 729 | "0 Drama,Crime \n", 730 | "1 Comedy,Drama,Romance \n", 731 | "2 Drama,Crime \n", 732 | "3 Drama,History,War \n", 733 | "4 Drama,Crime \n", 734 | "... ... \n", 735 | "9995 Action,Adventure,Fantasy \n", 736 | "9996 Action,TV Movie,Science Fiction,Comedy,Adventure \n", 737 | "9997 Action,Science Fiction,War \n", 738 | "9998 Adventure,Fantasy,Action,Drama \n", 739 | "9999 Thriller,Action,Crime \n", 740 | "\n", 741 | " tags \n", 742 | "0 Framed in the 1940s for the double murder of h... \n", 743 | "1 Raj is a rich, carefree, happy-go-lucky second... \n", 744 | "2 Spanning the years 1945 to 1955, a chronicle o... \n", 745 | "3 The true story of how businessman Oskar Schind... \n", 746 | "4 In the continuing saga of the Corleone crime f... \n", 747 | "... ... \n", 748 | "9995 The story follows the adventures of Aang, a yo... \n", 749 | "9996 The sharks take bite out of the East Coast whe... \n", 750 | "9997 During World War II, a brave, patriotic Americ... \n", 751 | "9998 A man named Farmer sets out to rescue his kidn... \n", 752 | "9999 Seeking justice for his partner’s murder by an... \n", 753 | "\n", 754 | "[10000 rows x 5 columns]" 755 | ] 756 | }, 757 | "execution_count": 24, 758 | "metadata": {}, 759 | "output_type": "execute_result" 760 | } 761 | ], 762 | "source": [ 763 | "movies" 764 | ] 765 | }, 766 | { 767 | "cell_type": "code", 768 | "execution_count": 26, 769 | "id": "bfc9c3ab", 770 | "metadata": {}, 771 | "outputs": [], 772 | "source": [ 773 | "new_data = movies.drop(columns=['overview', 'genre'])" 774 | ] 775 | }, 776 | { 777 | "cell_type": "code", 778 | "execution_count": 27, 779 | "id": "a563409f", 780 | "metadata": {}, 781 | "outputs": [ 782 | { 783 | "data": { 784 | "text/html": [ 785 | "
\n", 786 | "\n", 799 | "\n", 800 | " \n", 801 | " \n", 802 | " \n", 803 | " \n", 804 | " \n", 805 | " \n", 806 | " \n", 807 | " \n", 808 | " \n", 809 | " \n", 810 | " \n", 811 | " \n", 812 | " \n", 813 | " \n", 814 | " \n", 815 | " \n", 816 | " \n", 817 | " \n", 818 | " \n", 819 | " \n", 820 | " \n", 821 | " \n", 822 | " \n", 823 | " \n", 824 | " \n", 825 | " \n", 826 | " \n", 827 | " \n", 828 | " \n", 829 | " \n", 830 | " \n", 831 | " \n", 832 | " \n", 833 | " \n", 834 | " \n", 835 | " \n", 836 | " \n", 837 | " \n", 838 | " \n", 839 | " \n", 840 | " \n", 841 | " \n", 842 | " \n", 843 | " \n", 844 | " \n", 845 | " \n", 846 | " \n", 847 | " \n", 848 | " \n", 849 | " \n", 850 | " \n", 851 | " \n", 852 | " \n", 853 | " \n", 854 | " \n", 855 | " \n", 856 | " \n", 857 | " \n", 858 | " \n", 859 | " \n", 860 | " \n", 861 | " \n", 862 | " \n", 863 | " \n", 864 | " \n", 865 | " \n", 866 | " \n", 867 | " \n", 868 | " \n", 869 | " \n", 870 | " \n", 871 | " \n", 872 | " \n", 873 | " \n", 874 | " \n", 875 | " \n", 876 | "
idtitletags
0278The Shawshank RedemptionFramed in the 1940s for the double murder of h...
119404Dilwale Dulhania Le JayengeRaj is a rich, carefree, happy-go-lucky second...
2238The GodfatherSpanning the years 1945 to 1955, a chronicle o...
3424Schindler's ListThe true story of how businessman Oskar Schind...
4240The Godfather: Part IIIn the continuing saga of the Corleone crime f...
............
999510196The Last AirbenderThe story follows the adventures of Aang, a yo...
9996331446Sharknado 3: Oh Hell No!The sharks take bite out of the East Coast whe...
999713995Captain AmericaDuring World War II, a brave, patriotic Americ...
99982312In the Name of the King: A Dungeon Siege TaleA man named Farmer sets out to rescue his kidn...
9999455957DominoSeeking justice for his partner’s murder by an...
\n", 877 | "

10000 rows × 3 columns

\n", 878 | "
" 879 | ], 880 | "text/plain": [ 881 | " id title \\\n", 882 | "0 278 The Shawshank Redemption \n", 883 | "1 19404 Dilwale Dulhania Le Jayenge \n", 884 | "2 238 The Godfather \n", 885 | "3 424 Schindler's List \n", 886 | "4 240 The Godfather: Part II \n", 887 | "... ... ... \n", 888 | "9995 10196 The Last Airbender \n", 889 | "9996 331446 Sharknado 3: Oh Hell No! \n", 890 | "9997 13995 Captain America \n", 891 | "9998 2312 In the Name of the King: A Dungeon Siege Tale \n", 892 | "9999 455957 Domino \n", 893 | "\n", 894 | " tags \n", 895 | "0 Framed in the 1940s for the double murder of h... \n", 896 | "1 Raj is a rich, carefree, happy-go-lucky second... \n", 897 | "2 Spanning the years 1945 to 1955, a chronicle o... \n", 898 | "3 The true story of how businessman Oskar Schind... \n", 899 | "4 In the continuing saga of the Corleone crime f... \n", 900 | "... ... \n", 901 | "9995 The story follows the adventures of Aang, a yo... \n", 902 | "9996 The sharks take bite out of the East Coast whe... \n", 903 | "9997 During World War II, a brave, patriotic Americ... \n", 904 | "9998 A man named Farmer sets out to rescue his kidn... \n", 905 | "9999 Seeking justice for his partner’s murder by an... \n", 906 | "\n", 907 | "[10000 rows x 3 columns]" 908 | ] 909 | }, 910 | "execution_count": 27, 911 | "metadata": {}, 912 | "output_type": "execute_result" 913 | } 914 | ], 915 | "source": [ 916 | "new_data" 917 | ] 918 | }, 919 | { 920 | "cell_type": "code", 921 | "execution_count": 28, 922 | "id": "f0f934d4", 923 | "metadata": {}, 924 | "outputs": [], 925 | "source": [ 926 | "from sklearn.feature_extraction.text import CountVectorizer" 927 | ] 928 | }, 929 | { 930 | "cell_type": "code", 931 | "execution_count": 29, 932 | "id": "2a1785c5", 933 | "metadata": {}, 934 | "outputs": [], 935 | "source": [ 936 | "cv=CountVectorizer(max_features=10000, stop_words='english')" 937 | ] 938 | }, 939 | { 940 | "cell_type": "code", 941 | "execution_count": 30, 942 | "id": "c4c9d675", 943 | "metadata": {}, 944 | "outputs": [ 945 | { 946 | "data": { 947 | "text/html": [ 948 | "
CountVectorizer(max_features=10000, stop_words='english')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" 1353 | ], 1354 | "text/plain": [ 1355 | "CountVectorizer(max_features=10000, stop_words='english')" 1356 | ] 1357 | }, 1358 | "execution_count": 30, 1359 | "metadata": {}, 1360 | "output_type": "execute_result" 1361 | } 1362 | ], 1363 | "source": [ 1364 | "cv" 1365 | ] 1366 | }, 1367 | { 1368 | "cell_type": "code", 1369 | "execution_count": 31, 1370 | "id": "1a129ec8", 1371 | "metadata": {}, 1372 | "outputs": [], 1373 | "source": [ 1374 | "vector = cv.fit_transform(new_data['tags'].values.astype('U')).toarray()" 1375 | ] 1376 | }, 1377 | { 1378 | "cell_type": "code", 1379 | "execution_count": 32, 1380 | "id": "aa03a007", 1381 | "metadata": {}, 1382 | "outputs": [ 1383 | { 1384 | "data": { 1385 | "text/plain": [ 1386 | "(10000, 10000)" 1387 | ] 1388 | }, 1389 | "execution_count": 32, 1390 | "metadata": {}, 1391 | "output_type": "execute_result" 1392 | } 1393 | ], 1394 | "source": [ 1395 | "vector.shape" 1396 | ] 1397 | }, 1398 | { 1399 | "cell_type": "code", 1400 | "execution_count": 33, 1401 | "id": "1d0b682b", 1402 | "metadata": {}, 1403 | "outputs": [], 1404 | "source": [ 1405 | "from sklearn.metrics.pairwise import cosine_similarity" 1406 | ] 1407 | }, 1408 | { 1409 | "cell_type": "code", 1410 | "execution_count": 34, 1411 | "id": "a278544f", 1412 | "metadata": {}, 1413 | "outputs": [], 1414 | "source": [ 1415 | "similarity = cosine_similarity(vector)" 1416 | ] 1417 | }, 1418 | { 1419 | "cell_type": "code", 1420 | "execution_count": 35, 1421 | "id": "17159a6a", 1422 | "metadata": {}, 1423 | "outputs": [ 1424 | { 1425 | "data": { 1426 | "text/plain": [ 1427 | "array([[1. , 0.05634362, 0.13041013, ..., 0.07559289, 0.11065667,\n", 1428 | " 0.06900656],\n", 1429 | " [0.05634362, 1. , 0.07715167, ..., 0. , 0.03636965,\n", 1430 | " 0. ],\n", 1431 | " [0.13041013, 0.07715167, 1. , ..., 0.02300219, 0.0673435 ,\n", 1432 | " 0.09449112],\n", 1433 | " ...,\n", 1434 | " [0.07559289, 0. , 0.02300219, ..., 1. , 0.03253 ,\n", 1435 | " 0.03042903],\n", 1436 | " [0.11065667, 0.03636965, 0.0673435 , ..., 0.03253 , 1. ,\n", 1437 | " 0.04454354],\n", 1438 | " [0.06900656, 0. , 0.09449112, ..., 0.03042903, 0.04454354,\n", 1439 | " 1. ]], shape=(10000, 10000))" 1440 | ] 1441 | }, 1442 | "execution_count": 35, 1443 | "metadata": {}, 1444 | "output_type": "execute_result" 1445 | } 1446 | ], 1447 | "source": [ 1448 | "similarity" 1449 | ] 1450 | }, 1451 | { 1452 | "cell_type": "code", 1453 | "execution_count": 46, 1454 | "id": "2a76d9b0", 1455 | "metadata": {}, 1456 | "outputs": [ 1457 | { 1458 | "data": { 1459 | "text/plain": [ 1460 | "np.int64(49)" 1461 | ] 1462 | }, 1463 | "execution_count": 46, 1464 | "metadata": {}, 1465 | "output_type": "execute_result" 1466 | } 1467 | ], 1468 | "source": [ 1469 | "new_data[new_data['title']==\"Interstellar\"].index[0]" 1470 | ] 1471 | }, 1472 | { 1473 | "cell_type": "code", 1474 | "execution_count": 47, 1475 | "id": "1a7257dd", 1476 | "metadata": {}, 1477 | "outputs": [ 1478 | { 1479 | "name": "stdout", 1480 | "output_type": "stream", 1481 | "text": [ 1482 | "The Godfather\n", 1483 | "The Godfather: Part II\n", 1484 | "Blood Ties\n", 1485 | "Joker\n", 1486 | "Bomb City\n" 1487 | ] 1488 | } 1489 | ], 1490 | "source": [ 1491 | "distance = sorted(list(enumerate(similarity[2])), reverse=True, key=lambda vector:vector[1])[0:5]\n", 1492 | "for i in distance:\n", 1493 | " print(new_data.iloc[i[0]].title)" 1494 | ] 1495 | }, 1496 | { 1497 | "cell_type": "code", 1498 | "execution_count": 48, 1499 | "id": "5db9ab3b", 1500 | "metadata": {}, 1501 | "outputs": [], 1502 | "source": [ 1503 | "def recommend(movie):\n", 1504 | " index=new_data[new_data['title']==movie].index[0]\n", 1505 | " distances=sorted(list(enumerate(similarity[index])), reverse=True, key=lambda vector:vector[1])\n", 1506 | " for i in distance[0:5]:\n", 1507 | " print(new_data.iloc[i[0]].title)" 1508 | ] 1509 | }, 1510 | { 1511 | "cell_type": "code", 1512 | "execution_count": 50, 1513 | "id": "9306e071", 1514 | "metadata": {}, 1515 | "outputs": [ 1516 | { 1517 | "name": "stdout", 1518 | "output_type": "stream", 1519 | "text": [ 1520 | "The Godfather\n", 1521 | "The Godfather: Part II\n", 1522 | "Blood Ties\n", 1523 | "Joker\n", 1524 | "Bomb City\n" 1525 | ] 1526 | } 1527 | ], 1528 | "source": [ 1529 | "recommend('Interstellar')" 1530 | ] 1531 | }, 1532 | { 1533 | "cell_type": "code", 1534 | "execution_count": 51, 1535 | "id": "0d8b200b", 1536 | "metadata": {}, 1537 | "outputs": [], 1538 | "source": [ 1539 | "import pickle" 1540 | ] 1541 | }, 1542 | { 1543 | "cell_type": "code", 1544 | "execution_count": 52, 1545 | "id": "385e1483", 1546 | "metadata": {}, 1547 | "outputs": [], 1548 | "source": [ 1549 | "pickle.dump(new_data, open('movie_list.pkl', 'wb'))" 1550 | ] 1551 | }, 1552 | { 1553 | "cell_type": "code", 1554 | "execution_count": 53, 1555 | "id": "fe2130b1", 1556 | "metadata": {}, 1557 | "outputs": [], 1558 | "source": [ 1559 | "pickle.dump(similarity, open('similarity.pkl', 'wb'))" 1560 | ] 1561 | }, 1562 | { 1563 | "cell_type": "code", 1564 | "execution_count": 54, 1565 | "id": "11a2ff41", 1566 | "metadata": {}, 1567 | "outputs": [ 1568 | { 1569 | "data": { 1570 | "text/html": [ 1571 | "
\n", 1572 | "\n", 1585 | "\n", 1586 | " \n", 1587 | " \n", 1588 | " \n", 1589 | " \n", 1590 | " \n", 1591 | " \n", 1592 | " \n", 1593 | " \n", 1594 | " \n", 1595 | " \n", 1596 | " \n", 1597 | " \n", 1598 | " \n", 1599 | " \n", 1600 | " \n", 1601 | " \n", 1602 | " \n", 1603 | " \n", 1604 | " \n", 1605 | " \n", 1606 | " \n", 1607 | " \n", 1608 | " \n", 1609 | " \n", 1610 | " \n", 1611 | " \n", 1612 | " \n", 1613 | " \n", 1614 | " \n", 1615 | " \n", 1616 | " \n", 1617 | " \n", 1618 | " \n", 1619 | " \n", 1620 | " \n", 1621 | " \n", 1622 | " \n", 1623 | " \n", 1624 | " \n", 1625 | " \n", 1626 | " \n", 1627 | " \n", 1628 | " \n", 1629 | " \n", 1630 | " \n", 1631 | " \n", 1632 | " \n", 1633 | " \n", 1634 | " \n", 1635 | " \n", 1636 | " \n", 1637 | " \n", 1638 | " \n", 1639 | " \n", 1640 | " \n", 1641 | " \n", 1642 | " \n", 1643 | " \n", 1644 | " \n", 1645 | " \n", 1646 | " \n", 1647 | " \n", 1648 | " \n", 1649 | " \n", 1650 | " \n", 1651 | " \n", 1652 | " \n", 1653 | " \n", 1654 | " \n", 1655 | " \n", 1656 | " \n", 1657 | " \n", 1658 | " \n", 1659 | " \n", 1660 | " \n", 1661 | " \n", 1662 | "
idtitletags
0278The Shawshank RedemptionFramed in the 1940s for the double murder of h...
119404Dilwale Dulhania Le JayengeRaj is a rich, carefree, happy-go-lucky second...
2238The GodfatherSpanning the years 1945 to 1955, a chronicle o...
3424Schindler's ListThe true story of how businessman Oskar Schind...
4240The Godfather: Part IIIn the continuing saga of the Corleone crime f...
............
999510196The Last AirbenderThe story follows the adventures of Aang, a yo...
9996331446Sharknado 3: Oh Hell No!The sharks take bite out of the East Coast whe...
999713995Captain AmericaDuring World War II, a brave, patriotic Americ...
99982312In the Name of the King: A Dungeon Siege TaleA man named Farmer sets out to rescue his kidn...
9999455957DominoSeeking justice for his partner’s murder by an...
\n", 1663 | "

10000 rows × 3 columns

\n", 1664 | "
" 1665 | ], 1666 | "text/plain": [ 1667 | " id title \\\n", 1668 | "0 278 The Shawshank Redemption \n", 1669 | "1 19404 Dilwale Dulhania Le Jayenge \n", 1670 | "2 238 The Godfather \n", 1671 | "3 424 Schindler's List \n", 1672 | "4 240 The Godfather: Part II \n", 1673 | "... ... ... \n", 1674 | "9995 10196 The Last Airbender \n", 1675 | "9996 331446 Sharknado 3: Oh Hell No! \n", 1676 | "9997 13995 Captain America \n", 1677 | "9998 2312 In the Name of the King: A Dungeon Siege Tale \n", 1678 | "9999 455957 Domino \n", 1679 | "\n", 1680 | " tags \n", 1681 | "0 Framed in the 1940s for the double murder of h... \n", 1682 | "1 Raj is a rich, carefree, happy-go-lucky second... \n", 1683 | "2 Spanning the years 1945 to 1955, a chronicle o... \n", 1684 | "3 The true story of how businessman Oskar Schind... \n", 1685 | "4 In the continuing saga of the Corleone crime f... \n", 1686 | "... ... \n", 1687 | "9995 The story follows the adventures of Aang, a yo... \n", 1688 | "9996 The sharks take bite out of the East Coast whe... \n", 1689 | "9997 During World War II, a brave, patriotic Americ... \n", 1690 | "9998 A man named Farmer sets out to rescue his kidn... \n", 1691 | "9999 Seeking justice for his partner’s murder by an... \n", 1692 | "\n", 1693 | "[10000 rows x 3 columns]" 1694 | ] 1695 | }, 1696 | "execution_count": 54, 1697 | "metadata": {}, 1698 | "output_type": "execute_result" 1699 | } 1700 | ], 1701 | "source": [ 1702 | "pickle.load(open('movie_list.pkl', 'rb'))" 1703 | ] 1704 | } 1705 | ], 1706 | "metadata": { 1707 | "kernelspec": { 1708 | "display_name": "Python 3", 1709 | "language": "python", 1710 | "name": "python3" 1711 | }, 1712 | "language_info": { 1713 | "codemirror_mode": { 1714 | "name": "ipython", 1715 | "version": 3 1716 | }, 1717 | "file_extension": ".py", 1718 | "mimetype": "text/x-python", 1719 | "name": "python", 1720 | "nbconvert_exporter": "python", 1721 | "pygments_lexer": "ipython3", 1722 | "version": "3.12.4" 1723 | } 1724 | }, 1725 | "nbformat": 4, 1726 | "nbformat_minor": 5 1727 | } 1728 | --------------------------------------------------------------------------------