├── .gitignore ├── webide.png ├── .idea ├── .gitignore ├── vcs.xml ├── inspectionProfiles │ └── Project_Default.xml ├── modules.xml └── webindexeddb.iml ├── babel.config.json ├── package.json ├── rollup.config.js ├── demo_js └── index.js ├── lib ├── bundle.min.js ├── bundle.umd.min.js ├── bundle.js └── bundle.umd.js ├── README.md ├── package ├── IndexedDB.js └── index.js ├── demo.html └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /webide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyangshibolange/webindexeddb/HEAD/webide.png -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "edge": "17", 8 | "firefox": "60", 9 | "chrome": "67", 10 | "safari": "11.1" 11 | } 12 | // , 13 | // "useBuiltIns": "usage", 14 | // "corejs": "3.30.0" 15 | } 16 | ] 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.idea/webindexeddb.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webindexeddb", 3 | "version": "1.0.0", 4 | "description": "indexeddb封装,简单查询,可用于前端mock数据", 5 | "main": "lib/bundle.umd.min.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "rollup": "rollup -c rollup.config.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/yinyangshibolange/webindexeddb.git" 13 | }, 14 | "keywords": [ 15 | "indexeddb", 16 | "mock", 17 | "前端数据库" 18 | ], 19 | "author": "hy", 20 | "license": "ISC", 21 | "bugs": { 22 | "url": "https://github.com/yinyangshibolange/webindexeddb/issues" 23 | }, 24 | "homepage": "https://github.com/yinyangshibolange/webindexeddb#readme", 25 | "devDependencies": { 26 | "@babel/core": "^7.21.4", 27 | "@babel/preset-env": "^7.21.4", 28 | "@rollup/plugin-babel": "^6.0.3", 29 | "@rollup/plugin-node-resolve": "^15.0.2", 30 | "rollup": "^3.20.2", 31 | "rollup-plugin-terser": "^7.0.2" 32 | }, 33 | "files": [ 34 | "lib/bundle.umd.min.js","README.md" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | 2 | const babel = require('@rollup/plugin-babel') 3 | const {terser} = require('rollup-plugin-terser') ; 4 | const path = require("path") 5 | 6 | module.exports = { 7 | input: 'package/index.js', 8 | output: [ 9 | { 10 | // dir: path.resolve(__dirname, './lib'), 11 | file: "./lib/bundle.js", 12 | // name: 'bundle' , 13 | format: 'iife', 14 | globals: { 15 | // window: 'that' 16 | } 17 | },{ 18 | // dir: path.resolve(__dirname, './lib'), 19 | file: "./lib/bundle.min.js", 20 | // name: 'bundle.min' , 21 | format: 'iife', 22 | globals: { 23 | // window: 'that' 24 | }, 25 | plugins: [terser()] 26 | },{ 27 | // dir: path.resolve(__dirname, './lib'), 28 | file: "./lib/bundle.umd.js", 29 | name: 'IndexdbStore' , 30 | format: 'umd', 31 | globals: { 32 | // window: 'that' 33 | }, 34 | }, 35 | { 36 | // dir: path.resolve(__dirname, './lib'), 37 | file: "./lib/bundle.umd.min.js", 38 | name: 'IndexdbStore' , 39 | format: 'umd', 40 | globals: { 41 | // window: 'that' 42 | }, 43 | plugins: [terser()] 44 | },], 45 | plugins: [ 46 | babel({ babelHelpers: 'bundled' }) 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /demo_js/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | let my_table_file = {} 3 | 4 | function dce(tag) { 5 | return document.createElement(tag) 6 | } 7 | 8 | function createFileTable(parent_el, table_id, list, columns) { 9 | if (my_table_file[table_id]) { 10 | parent_el.removeChild(my_table_file[table_id]) 11 | my_table_file[table_id] = null 12 | } 13 | my_table_file[table_id] = dce("table") 14 | my_table_file[table_id].id = table_id 15 | my_table_file[table_id].classList.add("table") 16 | my_table_file[table_id].classList.add("table-striped") 17 | my_table_file[table_id].classList.add("table-hover") 18 | 19 | const thead = dce("thead") 20 | const tr = dce("tr") 21 | 22 | columns.forEach(item => { 23 | const {key, type, name} = item 24 | const th = dce("th") 25 | th.innerText = name 26 | tr.appendChild(th) 27 | }) 28 | thead.appendChild(tr) 29 | my_table_file[table_id].appendChild(thead) 30 | const tbody = dce("tbody") 31 | tbody.classList.add("table-group-divider") 32 | list.forEach(item => { 33 | const tr = dce("tr") 34 | columns.forEach(col => { 35 | const {key, type, name, btns } = col 36 | const td = dce("td") 37 | if(type === 'data') { 38 | td.innerText = item[key] 39 | } else if(type === 'image') { 40 | const img = dce("img") 41 | img.src = item[key] 42 | img.width = 100 43 | img.height = 100 44 | img.style.objectFit = 'cover' 45 | img.classList.add("rounded") 46 | td.appendChild(img) 47 | } else if(type === 'btns') { 48 | btns.forEach(btn_item => { 49 | const {name, click} = btn_item 50 | const btn_el = dce("button") 51 | btn_el.setAttribute("type", "button") 52 | btn_el.innerText = name 53 | btn_el.classList.add("btn") 54 | btn_el.classList.add("btn-danger") 55 | btn_el.addEventListener('click', function(){ 56 | if(typeof click === 'function') { 57 | click(item) 58 | } 59 | }) 60 | td.appendChild(btn_el) 61 | }) 62 | } 63 | 64 | tr.appendChild(td) 65 | }) 66 | tbody.appendChild(tr) 67 | }) 68 | my_table_file[table_id].appendChild(tbody) 69 | parent_el.appendChild(my_table_file[table_id]) 70 | return my_table_file[table_id] 71 | } 72 | 73 | window.createFileTable = createFileTable 74 | 75 | function createPageDot(parent_el, page_id, list, cur_page) { 76 | if (my_table_file[page_id]) { 77 | parent_el.removeChild(my_table_file[page_id]) 78 | my_table_file[page_id] = null 79 | } 80 | my_table_file[page_id] = dce("ul") 81 | my_table_file[page_id].classList.add("pagination") 82 | let lis = [] 83 | list.forEach((item) => { 84 | var li = dce("li") 85 | lis.push(li) 86 | li.classList.add("page-item") 87 | var a_page = dce("a") 88 | a_page.classList.add("page-link") 89 | a_page.innerText = item.name || item.page 90 | if(item.page === cur_page) { 91 | li.classList.add("active") 92 | } 93 | if(item.type === 'prev' || item.type === 'next' || item.type === 'page') { 94 | a_page.addEventListener("click",function () { 95 | if(typeof item.click === 'function') { 96 | item.click(item) 97 | } 98 | if(item.type === 'page') { 99 | lis.forEach(li_el => { 100 | li_el.classList.remove("active") 101 | }) 102 | li.classList.add("active") 103 | } 104 | }) 105 | } 106 | li.appendChild(a_page) 107 | my_table_file[page_id].appendChild(li) 108 | }) 109 | parent_el.appendChild(my_table_file[page_id]) 110 | return my_table_file[page_id] 111 | } 112 | 113 | window.createPageDot = createPageDot 114 | })() 115 | -------------------------------------------------------------------------------- /lib/bundle.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n{const n=window.indexedDB.open(this.dbInfo.name,this.dbInfo.version);n.onsuccess=t=>{this.dbInfo.db=t.target.result,e(this.dbInfo.db)},n.onerror=e=>{r(e)},n.onupgradeneeded=e=>{let r;this.dbInfo.db=e.target.result,Array.isArray(this.dbInfo.stores)&&this.dbInfo.stores.forEach((e=>{const{storeName:n,indexs:o,mainKey:s}=e;this.dbInfo.db.objectStoreNames.contains(n)||(r=this.dbInfo.db.createObjectStore(n,{keyPath:s||"id"})),Array.isArray(o)&&o.forEach((e=>{try{r.createIndex(e.name,e.keyPath,t({unique:!1},e.params))}catch(e){console.error(e)}}))}))}}))}openDB(){return new Promise(((e,t)=>{const r=window.indexedDB.open(this.dbInfo.name,this.dbInfo.version);r.onsuccess=t=>{this.dbInfo.db=t.target.result,e(this.dbInfo.db)},r.onerror=e=>{t(e)}}))}addData(e,t){return new Promise(((r,n)=>{let o=this.dbInfo.db.transaction([e],"readwrite").objectStore(e).add(t);o.onsuccess=e=>{r(e)},o.onerror=e=>{throw new Error(e.target.error)}}))}getDataByKey(e,t){return new Promise(((r,n)=>{let o=this.dbInfo.db.transaction([e]).objectStore(e).get(t);o.onerror=e=>{n(e)},o.onsuccess=e=>{r(o.result)}}))}cursorGetData(e){let t=[],r=this.dbInfo.db.transaction(e,"readwrite").objectStore(e).openCursor();return new Promise(((e,n)=>{r.onsuccess=r=>{let n=r.target.result;n?(t.push(n.value),n.continue()):e(t)},r.onerror=e=>{n(e)}}))}cursorPage(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;return new Promise(((t,o)=>{let s=[],i=this.dbInfo.db.transaction([e],"readonly").objectStore(e),c=i.openCursor(),a=i.count(),u=null;c.onsuccess=e=>{let o=e.target.result;if(o){if(u===n-1){s.push(o.value);try{t({list:s,total:a.result})}catch(e){t({list:[],total:0})}return}null===u&&1!==r?(u=0,o.advance((r-1)*n)):(u++,s.push(o.value),o.continue())}else try{t({list:s,total:a.result})}catch(e){t({list:[],total:0})}},c.onerror=()=>{o("读取数据失败")}}))}getDataByIndex(e,t,r){let n=this.dbInfo.db.transaction(e,"readwrite").objectStore(e).index(t).get(r);return new Promise(((e,t)=>{n.onerror=e=>{t(e)},n.onsuccess=t=>{e(t.target.result)}}))}cursorGetDataByIndex(e,t){let r=[],n=this.dbInfo.db.transaction(e,"readwrite").objectStore(e);return new Promise(((o,s)=>{const{indexs:i}=this.dbInfo.stores.find((t=>t.storeName===e))||{};if(!i)return void o([]);let c="",a=[];for(const e in t)c+=","+e,a.push(t[e]);c=c.substring(1);const{name:u}=i.find((e=>e.keyPath===c))||{};if(!u)return void o([]);let d=n.index(u).openCursor(IDBKeyRange.only(1===a.length?a[0]:a));d.onsuccess=e=>{let t=e.target.result;t?(r.push(t.value),t.continue()):o(r)},d.onerror=e=>{s(e)}}))}updateDB(e,t){let r=this.dbInfo.db.transaction([e],"readwrite").objectStore(e).put(t);return new Promise(((e,t)=>{r.onsuccess=t=>{e(t)},r.onerror=t=>{e(t)}}))}deleteDB(e,t){let r=this.dbInfo.db.transaction([e],"readwrite").objectStore(e).delete(t);return new Promise(((e,t)=>{r.onsuccess=t=>{e(t)},r.onerror=t=>{e(t)}}))}deleteDBAll(e){let t=window.indexedDB.deleteDatabase(e);return new Promise(((e,r)=>{t.onerror=e=>{console.error(e)},t.onsuccess=e=>{console.info(e)}}))}closeDB(){this.dbInfo.db.close(),console.info("数据库已关闭")}}function o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function s(e){const t=[{key:"addtime",type:"desc"},...(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[])||[]];let r=e;return t.forEach((e=>{let t,n;"string"==typeof e?(t="desc",n=e):"object"==typeof e&&(t="string"==typeof e.type?e.type.toLowerCase():"desc",n=e.key),"desc"===t?r=r.sort(((e,t)=>t[n]-e[n])):"asc"===t&&(r=r.sort(((e,t)=>e[n]-t[n])))})),r}function i(e,t){const r=e.find((e=>e.storeName===t));if(r)return r.mainKey||"id"}Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var r in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+r+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[r]:("00"+t[r]).substr((""+t[r]).length)));return e}}(); 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # webindexeddb 2 | 3 | ![展示图](https://yinyangshibolange.github.io/webindexeddb/webide.png) 4 | 5 | - 持久化模拟数据库对象存储,可配合mockjs实现大数据量的数据模拟,可以解决storage可用存储空间小的问题,可以保存图片数据 6 | - 当前版本:v1.0.0 7 | 8 | ## 安装方式 9 | 10 | 1. npm/yarn方式安装 11 | ```shell 12 | npm install webindexeddb --save 13 | or 14 | yarn add webindexeddb 15 | ``` 16 | 17 | 2. cdn方式 18 | ```html 19 | 20 | ``` 21 | 22 | ## demo 23 | demo仓库地址: 24 | 25 | 在线预览地址: 26 | 27 | ## IndexdbStore配置项 28 | | key | type(类型) | Description(描述) | Default(默认) | 29 | |---------|----------|-----------------|-----------------| 30 | | name | String | 数据库名称 | 'indexeddbname' | 31 | | version | Number | 数据库版本 | 1 | 32 | | stores | Array | 数据库表初始化配置 | [] | 33 | 34 | ### stores表配置 35 | | key | type(类型) | Description(描述) | Default(默认) | 36 | |---------|----------|-----------------|-------------| 37 | | storeName | String | 表名 | '' | 38 | | mainKey | String | 主键 | 'id' | 39 | | indexs | Array | 索引配置 | [] | 40 | 41 | ### indexs索引配置 42 | | key | type(类型) | Description(描述) | Default(默认) | 43 | |---------|----------|-----------------------|-------------| 44 | | name | String | 索引名 | '' | 45 | | keyPath | String | 索引字段,多个字段用","分割 | '' | 46 | | params | Object | 索引配置,可设置索引类型,例如unique | {} | 47 | 48 | ## 使用方法 49 | 1. 在html原生js使用方式 50 | ```html 51 | 52 | 53 |
54 | 55 | 80 | ``` 81 | 2. 模块化导入方式 82 | ```javascript 83 | import IndexdbStore from "webindexeddb" 84 | const indexedStore = new IndexdbStore({ 85 | name: "myindexdb", // 你的indexdb数据库名称 86 | version: 7, // 如果修改了options里的stores参数,那么必须修改version版本号,不然stores的修改不会生效 87 | stores: [ 88 | { // 类似数据库表 89 | storeName: "demoStore", 90 | // mainKey: 'id', // 主键,默认为id 91 | // indexs: [] 92 | }, 93 | { // 类似数据库表 94 | storeName: "imageList", 95 | // mainKey: 'id', // 主键,默认为id 96 | indexs: [{ 97 | name: "parentid", // 索引名称 98 | keyPath: "parentid", // 索引字段 99 | params: { 100 | unique: false, 101 | } 102 | }] 103 | } 104 | ] 105 | }) 106 | ``` 107 | ### IndexdbStore对象包含4个属性 108 | 109 | - name 110 | - version 111 | - stores 112 | 113 | 上面3个属性已在上方列出 114 | 115 | - db (IndexedDB对象,无需使用) 116 | 117 | ### IndexdbStore对象包含10个数据库操作函数 118 | 119 | | functionName | desciption(描述) | params(参数) | 120 | |--------------|------------------------------------------------------------------|--------------------------------------------------------| 121 | | addItem | 新增数据,自动添加addtime和addtimeformat字段,会自动添加\[mainKey\](主键)字段 | storeName, data | 122 | | addBatch | 批量新增数据,自动添加addtime和addtimeformat字段,会自动添加\[mainKey\](主键)字段 | storeName, list | 123 | | updateItem | 修改数据,会自动添加updatetime和updatetimeformat | storeName, data | 124 | | updateBatch | 批量修改数据,会自动添加updatetime和updatetimeformat | storeName, list | 125 | | delItem | 删除数据,id是主键值,不一定是id | storeName, id | ' 126 | | delBatch | 批量删除数据,id是主键值,不一定是id | storeName, ids | 127 | | getAll | 查询表中所有数据 | storeName, sortParams = [] | 128 | | queryAll | 条件查询数据 | storeName, params, sortParams = [] | 129 | | queryPage | 条件查询分页数据 | storeName, params, sortParams, page = 1, pagesize = 10 | 130 | | rebuild | 数据库动态升级重构,当name,version,stores修改后调用,options同构造函数参数,但可为空,默认使用当前参数 | options | 131 | 132 | 133 | ## 代码打包工具rollup 134 | -------------------------------------------------------------------------------- /package/IndexedDB.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export class IndexedDB { 4 | dbInfo = { 5 | name: "dbname", 6 | db: null, 7 | version: 1, 8 | stores: [ 9 | ] 10 | } 11 | 12 | constructor(dbInfo) { 13 | this.dbInfo = dbInfo 14 | this.init() 15 | } 16 | 17 | init () { 18 | return new Promise((resolve, reject) => { 19 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version) // 打开数据库连接 20 | request.onsuccess = (event) => { 21 | this.dbInfo.db = event.target.result // 数据库对象 22 | resolve(this.dbInfo.db) 23 | } 24 | 25 | request.onerror = (event) => { 26 | reject(event) 27 | } 28 | 29 | request.onupgradeneeded = (event) => { 30 | // 数据库创建或升级的时候会触发 31 | this.dbInfo.db = event.target.result // 数据库对象 32 | let objectStore 33 | if (Array.isArray(this.dbInfo.stores)) { 34 | this.dbInfo.stores.forEach(db_store => { 35 | const { storeName, indexs, mainKey } = db_store 36 | if (!this.dbInfo.db.objectStoreNames.contains(storeName)) { 37 | objectStore = this.dbInfo.db.createObjectStore(storeName, { keyPath: mainKey || "id" }) // 创建表 38 | } 39 | 40 | if (Array.isArray(indexs)) { 41 | indexs.forEach(item => { 42 | try { 43 | objectStore.createIndex(item.name, item.keyPath, { unique: false, ...item.params }) // 创建索引 可以让你搜索任意字段 44 | } catch (err) { 45 | console.error(err) 46 | } 47 | }) 48 | } 49 | 50 | }) 51 | } 52 | 53 | } 54 | }) 55 | } 56 | 57 | 58 | /** 59 | * 打开数据库 60 | * @param {*} storeName 打开数据库表 61 | * @param {*} indexs 索引列表 62 | * @returns 63 | */ 64 | openDB () { 65 | return new Promise((resolve, reject) => { 66 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version) 67 | request.onsuccess = (event) => { 68 | this.dbInfo.db = event.target.result // 数据库对象 69 | resolve(this.dbInfo.db) 70 | } 71 | 72 | request.onerror = (event) => { 73 | reject(event) 74 | } 75 | 76 | }) 77 | } 78 | 79 | /** 80 | * 新增数据 81 | * @param {*} storeName 打开数据库表 82 | * @param {*} data 数据包含id 83 | * @returns 84 | */ 85 | addData (storeName, data) { 86 | return new Promise((resolve, reject) => { 87 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 指定表格名称和操作模式("只读"或"读写") 88 | .objectStore(storeName) // 仓库对象 89 | .add(data) 90 | 91 | request.onsuccess = (event) => { 92 | resolve(event) 93 | } 94 | 95 | request.onerror = (event) => { 96 | throw new Error(event.target.error) 97 | } 98 | }) 99 | } 100 | 101 | /** 102 | * 通过键查找数据 103 | * @param {*} storeName 打开数据库表 104 | * @param {*} key 键 105 | * @returns 106 | */ 107 | getDataByKey (storeName, key) { 108 | return new Promise((resolve, reject) => { 109 | let transaction = this.dbInfo.db.transaction([storeName]) // 事务 110 | let objectStore = transaction.objectStore(storeName) // 仓库对象 111 | let request = objectStore.get(key) 112 | 113 | request.onerror = (event) => { 114 | reject(event) 115 | } 116 | 117 | request.onsuccess = (event) => { 118 | resolve(request.result) 119 | } 120 | }) 121 | } 122 | 123 | /** 124 | * 遍历所有数据 125 | * @param {*} storeName 打开数据库表 126 | * @returns 127 | */ 128 | cursorGetData (storeName) { 129 | let list = [] 130 | let store = this.dbInfo.db.transaction(storeName, 'readwrite') // 事务 131 | .objectStore(storeName) // 仓库对象 132 | let request = store.openCursor() // 指针对象 133 | return new Promise((resolve, reject) => { 134 | request.onsuccess = (e) => { 135 | let cursor = e.target.result 136 | if (cursor) { 137 | // 必须要检查 138 | list.push(cursor.value) 139 | cursor.continue() // 遍历了存储对象中的所有内容 140 | } else { 141 | resolve(list) 142 | } 143 | } 144 | request.onerror = (e) => { 145 | reject(e) 146 | } 147 | }) 148 | } 149 | 150 | /** 151 | * 分页查找 152 | * @param {*} storeName 打开数据库表 153 | * @param {*} page 当前页 154 | * @param {*} pageSize 分页数 155 | * @returns 156 | */ 157 | cursorPage (storeName, params, page = 1, pageSize = 10) { 158 | return new Promise((resolve, reject) => { 159 | let data = [] 160 | let store = this.dbInfo.db.transaction([storeName], 'readonly').objectStore(storeName) 161 | let requeset = store.openCursor() 162 | let count = store.count() 163 | let index = null 164 | requeset.onsuccess = (event) => { 165 | let res = event.target.result; 166 | if (res) { 167 | if (index === pageSize - 1) { 168 | data.push(res.value); 169 | try { 170 | resolve({ 171 | list: data, 172 | total: count.result 173 | }) 174 | } catch (err) { 175 | resolve({ 176 | list: [], 177 | total: 0 178 | }) 179 | } 180 | 181 | return 182 | } 183 | if (index === null && page !== 1) { 184 | index = 0 185 | res.advance((page - 1) * pageSize) 186 | } else { 187 | index++ 188 | data.push(res.value); 189 | res.continue(); 190 | } 191 | } else { 192 | try { 193 | resolve({ 194 | list: data, 195 | total: count.result 196 | }) 197 | } catch (err) { 198 | resolve({ 199 | list: [], 200 | total: 0 201 | }) 202 | } 203 | } 204 | } 205 | requeset.onerror = () => { 206 | reject('读取数据失败') 207 | } 208 | }) 209 | } 210 | 211 | /** 212 | * 通过索引查找数据 213 | * @param {*} storeName 打开数据库表 214 | * @param {*} indexName 索引名称 215 | * @param {*} indexValue 索引值 216 | * @returns 217 | */ 218 | getDataByIndex (storeName, indexName, indexValue) { 219 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName) 220 | let request = store.index(indexName).get(indexValue) 221 | return new Promise((resolve, reject) => { 222 | request.onerror = (e) => { 223 | reject(e) 224 | } 225 | request.onsuccess = (e) => { 226 | resolve(e.target.result) 227 | } 228 | }) 229 | } 230 | 231 | /** 232 | * 通过索引和游标查找,遍历了存储对象中的所有内容 233 | * @param {*} storeName 打开数据库表 234 | * @param {*} indexName 索引名称 235 | * @param {*} indexValue 索引值 236 | * @returns 237 | */ 238 | cursorGetDataByIndex (storeName, params, ) { 239 | let list = [] 240 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName) // 仓库对象 241 | return new Promise((resolve, reject) => { 242 | const {indexs} = this.dbInfo.stores.find(item => item.storeName === storeName) || {} 243 | if(!indexs) { 244 | resolve([]) 245 | return 246 | } 247 | let keyPath = "", vals = [] 248 | for(const key in params) { 249 | keyPath += "," + key 250 | vals.push(params[key]) 251 | } 252 | keyPath = keyPath.substring(1) 253 | 254 | const {name} = indexs.find(item => item.keyPath === keyPath) || {} 255 | if(!name) { 256 | resolve([]) 257 | return 258 | } 259 | 260 | let total 261 | 262 | let request = store.index(name) // 索引对象 263 | .openCursor(IDBKeyRange.only(vals.length === 1 ? vals[0] :vals)) // 指针对象 264 | 265 | request.onsuccess = (e) => { 266 | let cursor = e.target.result 267 | if (cursor) { 268 | list.push(cursor.value) 269 | cursor.continue() // 遍历了存储对象中的所有内容 270 | } else { 271 | resolve(list) 272 | } 273 | } 274 | request.onerror = (ev) => { 275 | reject(ev) 276 | } 277 | }) 278 | } 279 | 280 | /** 281 | * 修改数据 282 | * @param {*} storeName 打开数据库表 283 | * @param {*} data 数据 284 | * @returns 285 | */ 286 | updateDB (storeName, data) { 287 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 288 | .objectStore(storeName) // 仓库对象 289 | .put(data) 290 | 291 | return new Promise((resolve, reject) => { 292 | request.onsuccess = (ev) => { 293 | resolve(ev) 294 | } 295 | 296 | request.onerror = (ev) => { 297 | resolve(ev) 298 | } 299 | }) 300 | } 301 | 302 | /** 303 | * 删除数据 304 | * @param {*} storeName 打开数据库表 305 | * @param {*} id id 306 | * @returns 307 | */ 308 | deleteDB (storeName, id) { 309 | let request = this.dbInfo.db.transaction([storeName], 'readwrite').objectStore(storeName).delete(id) 310 | 311 | return new Promise((resolve, reject) => { 312 | request.onsuccess = (ev) => { 313 | resolve(ev) 314 | } 315 | 316 | request.onerror = (ev) => { 317 | resolve(ev) 318 | } 319 | }) 320 | } 321 | 322 | /** 323 | * 删除数据库 324 | * @param {String} dbName 数据库表名 325 | * @returns 326 | */ 327 | deleteDBAll (dbName) { 328 | let deleteRequest = window.indexedDB.deleteDatabase(dbName) 329 | return new Promise((resolve, reject) => { 330 | deleteRequest.onerror = (err) => { 331 | console.error(err) 332 | } 333 | deleteRequest.onsuccess = (event) => { 334 | console.info(event) 335 | } 336 | }) 337 | } 338 | 339 | /** 340 | * 关闭数据库 341 | */ 342 | closeDB () { 343 | this.dbInfo.db.close() 344 | console.info('数据库已关闭') 345 | } 346 | 347 | 348 | } 349 | 350 | -------------------------------------------------------------------------------- /lib/bundle.umd.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).IndexdbStore=e()}(this,(function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,s)}return r}function e(e){for(var s=1;s{const s=window.indexedDB.open(this.dbInfo.name,this.dbInfo.version);s.onsuccess=e=>{this.dbInfo.db=e.target.result,t(this.dbInfo.db)},s.onerror=t=>{r(t)},s.onupgradeneeded=t=>{let r;this.dbInfo.db=t.target.result,Array.isArray(this.dbInfo.stores)&&this.dbInfo.stores.forEach((t=>{const{storeName:s,indexs:o,mainKey:n}=t;this.dbInfo.db.objectStoreNames.contains(s)||(r=this.dbInfo.db.createObjectStore(s,{keyPath:n||"id"})),Array.isArray(o)&&o.forEach((t=>{try{r.createIndex(t.name,t.keyPath,e({unique:!1},t.params))}catch(t){console.error(t)}}))}))}}))}openDB(){return new Promise(((t,e)=>{const r=window.indexedDB.open(this.dbInfo.name,this.dbInfo.version);r.onsuccess=e=>{this.dbInfo.db=e.target.result,t(this.dbInfo.db)},r.onerror=t=>{e(t)}}))}addData(t,e){return new Promise(((r,s)=>{let o=this.dbInfo.db.transaction([t],"readwrite").objectStore(t).add(e);o.onsuccess=t=>{r(t)},o.onerror=t=>{throw new Error(t.target.error)}}))}getDataByKey(t,e){return new Promise(((r,s)=>{let o=this.dbInfo.db.transaction([t]).objectStore(t).get(e);o.onerror=t=>{s(t)},o.onsuccess=t=>{r(o.result)}}))}cursorGetData(t){let e=[],r=this.dbInfo.db.transaction(t,"readwrite").objectStore(t).openCursor();return new Promise(((t,s)=>{r.onsuccess=r=>{let s=r.target.result;s?(e.push(s.value),s.continue()):t(e)},r.onerror=t=>{s(t)}}))}cursorPage(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;return new Promise(((e,o)=>{let n=[],i=this.dbInfo.db.transaction([t],"readonly").objectStore(t),a=i.openCursor(),c=i.count(),d=null;a.onsuccess=t=>{let o=t.target.result;if(o){if(d===s-1){n.push(o.value);try{e({list:n,total:c.result})}catch(t){e({list:[],total:0})}return}null===d&&1!==r?(d=0,o.advance((r-1)*s)):(d++,n.push(o.value),o.continue())}else try{e({list:n,total:c.result})}catch(t){e({list:[],total:0})}},a.onerror=()=>{o("读取数据失败")}}))}getDataByIndex(t,e,r){let s=this.dbInfo.db.transaction(t,"readwrite").objectStore(t).index(e).get(r);return new Promise(((t,e)=>{s.onerror=t=>{e(t)},s.onsuccess=e=>{t(e.target.result)}}))}cursorGetDataByIndex(t,e){let r=[],s=this.dbInfo.db.transaction(t,"readwrite").objectStore(t);return new Promise(((o,n)=>{const{indexs:i}=this.dbInfo.stores.find((e=>e.storeName===t))||{};if(!i)return void o([]);let a="",c=[];for(const t in e)a+=","+t,c.push(e[t]);a=a.substring(1);const{name:d}=i.find((t=>t.keyPath===a))||{};if(!d)return void o([]);let u=s.index(d).openCursor(IDBKeyRange.only(1===c.length?c[0]:c));u.onsuccess=t=>{let e=t.target.result;e?(r.push(e.value),e.continue()):o(r)},u.onerror=t=>{n(t)}}))}updateDB(t,e){let r=this.dbInfo.db.transaction([t],"readwrite").objectStore(t).put(e);return new Promise(((t,e)=>{r.onsuccess=e=>{t(e)},r.onerror=e=>{t(e)}}))}deleteDB(t,e){let r=this.dbInfo.db.transaction([t],"readwrite").objectStore(t).delete(e);return new Promise(((t,e)=>{r.onsuccess=e=>{t(e)},r.onerror=e=>{t(e)}}))}deleteDBAll(t){let e=window.indexedDB.deleteDatabase(t);return new Promise(((t,r)=>{e.onerror=t=>{console.error(t)},e.onsuccess=t=>{console.info(t)}}))}closeDB(){this.dbInfo.db.close(),console.info("数据库已关闭")}}function o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function n(t){const e=[{key:"addtime",type:"desc"},...(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[])||[]];let r=t;return e.forEach((t=>{let e,s;"string"==typeof t?(e="desc",s=t):"object"==typeof t&&(e="string"==typeof t.type?t.type.toLowerCase():"desc",s=t.key),"desc"===e?r=r.sort(((t,e)=>e[s]-t[s])):"asc"===e&&(r=r.sort(((t,e)=>t[s]-e[s])))})),r}function i(t,e){const r=t.find((t=>t.storeName===e));if(r)return r.mainKey||"id"}Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[r]:("00"+e[r]).substr((""+e[r]).length)));return t};return class{constructor(t){r(this,"name",null),r(this,"version",null),r(this,"stores",null),r(this,"db",null);let e="indexeddbname",s=1,o=[];t&&(e=t.name||e,s=t.version||s,o=t.stores||o),this.db||this.rebuild({name:e,version:s,stores:o})}rebuild(t){const{name:e,version:r,stores:o}=t||{};this.stores=o||this.stores,this.name=e||this.name,this.version=r||this.version,this.db=new s({name:e||this.name,version:r||this.version,db:null,stores:o||this.stores})}async addItem(t,r){let s=i(this.stores,t);if(!s)return{code:-1,msg:"表不存在,请检查您的配置"};try{await this.db.openDB(t)}catch(t){return{code:-1,msg:t}}const n=new Date;try{const i=await this.db.addData(t,e(e({[s]:o()},r),{},{addtime:n.getTime(),addtimeformat:n.Format("yyyy-MM-dd hh:mm:ss")}));return this.db.closeDB(),{code:0,data:i}}catch(t){return this.db.closeDB(),{code:-1,msg:t}}}async addBatch(t,r){let s=i(this.stores,t);if(!s)return{code:-1,msg:"表不存在,请检查您的配置"};if(!Array.isArray(r)||0===r.length)return{code:-1,msg:"参数错误,批量添加参数应为一个非空列表"};try{await this.db.openDB(t)}catch(t){return{code:-1,msg:t}}const n=new Date;let a=[];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:[];if(!i(this.stores,t))return{code:-1,msg:"表不存在,请检查您的配置"};try{await this.db.openDB(t)}catch(t){return{code:-1,msg:t}}try{let r=await this.db.cursorGetData(t);return r=n(r,e),this.db.closeDB(),{code:0,data:r}}catch(t){return this.db.closeDB(),{code:-1,msg:t}}}async queryAll(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!i(this.stores,t))return{code:-1,msg:"表不存在,请检查您的配置"};try{await this.db.openDB(t)}catch(t){return void console.error(t)}const s=Object.keys(e||{}).length;try{let o;return o=s>0?await this.db.cursorGetDataByIndex(t,e):await this.db.cursorGetData(t),o=n(o,r),this.db.closeDB(),{code:0,data:o}}catch(t){return this.db.closeDB(),{code:-1,msg:t}}}async queryPage(t,e,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10;if(!i(this.stores,t))return{code:-1,msg:"表不存在,请检查您的配置"};try{await this.db.openDB(t)}catch(t){return{code:-1,msg:t}}const a=Object.keys(e||{}).length;try{let i;return i=a>0?await this.db.cursorGetDataByIndex(t,e):await this.db.cursorGetData(t),i=n(i,r),this.db.closeDB(),{code:0,data:{total:i.length,list:i.slice((s-1)*o,s*o)}}}catch(t){return this.db.closeDB(),{code:-1,msg:t}}}}})); 2 | -------------------------------------------------------------------------------- /demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IndexedDb demo 6 | 8 | 11 | 12 | 13 | 28 | 29 | 30 |
31 |

demo中用到了bootstrap,并不是IndexdbStore的依赖

32 | 40 |
41 |
42 |
43 | 45 | 46 |
47 |
48 | 57 | 58 |
59 |
60 |
61 | 62 |
63 |
64 | 65 | 66 |
67 | 86 | 301 | 302 | 401 | 402 | 403 | -------------------------------------------------------------------------------- /package/index.js: -------------------------------------------------------------------------------- 1 | import {IndexedDB} from "./IndexedDB.js" 2 | 3 | function guid() { 4 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { 5 | const r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); 6 | return v.toString(16); 7 | }); 8 | } 9 | 10 | function listSort(list, sortParams = []) { 11 | const sort_params = [{ 12 | key: 'addtime', 13 | type: 'desc' 14 | }, ...(sortParams || [])] 15 | let list_temp = list 16 | sort_params.forEach(item => { 17 | let type, key 18 | if (typeof item === 'string') { 19 | type = 'desc' 20 | key = item 21 | } else if (typeof item === 'object') { 22 | type = typeof item.type === 'string' ? item.type.toLowerCase() : 'desc' 23 | key = item.key 24 | } 25 | if (type === 'desc') { 26 | list_temp = list_temp.sort((a, b) => b[key] - a[key]) 27 | } else if (type === 'asc') { 28 | list_temp = list_temp.sort((a, b) => a[key] - b[key]) 29 | } 30 | }) 31 | return list_temp 32 | } 33 | 34 | Date.prototype.Format = function (fmt) { 35 | var o = { 36 | "M+": this.getMonth() + 1, //月份 37 | "d+": this.getDate(), //日 38 | "h+": this.getHours(), //小时 39 | "m+": this.getMinutes(), //分 40 | "s+": this.getSeconds(), //秒 41 | "q+": Math.floor((this.getMonth() + 3) / 3), //季度 42 | "S": this.getMilliseconds() //毫秒 43 | }; 44 | if (/(y+)/.test(fmt)) 45 | fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 46 | for (var k in o) 47 | if (new RegExp("(" + k + ")").test(fmt)) 48 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); 49 | return fmt; 50 | } 51 | 52 | function findStoreMainKey(stores, storeName) { 53 | const store = stores.find(item => item.storeName === storeName) 54 | if (store) { 55 | return store.mainKey || "id" 56 | } 57 | } 58 | 59 | // mock数据持久化类,当前用indexedDb做持久化 60 | class IndexdbStore { 61 | name = null // 数据库名称 62 | version = null // 数据库版本号 63 | stores = null // 数据库表配置 64 | db = null // IndexedDB 封装对象 65 | 66 | constructor(options) { 67 | let name = 'indexeddbname', version = 1, stores = [] 68 | if(options) { 69 | name = options.name || name 70 | version = options.version || version 71 | stores = options.stores || stores 72 | } 73 | if (!this.db) { 74 | this.rebuild({ 75 | name, version, stores, 76 | }) 77 | } 78 | } 79 | 80 | /** 81 | * 数据库升级重构 82 | * @param options 传入参数,同构造函数参数,可为空 83 | */ 84 | rebuild(options) { 85 | const {name, version, stores} = options || {} 86 | this.stores = stores || this.stores 87 | this.name = name || this.name 88 | this.version = version || this.version 89 | this.db = new IndexedDB({ 90 | name: name || this.name, 91 | version: version || this.version, 92 | db: null, 93 | stores: stores || this.stores, 94 | }) 95 | 96 | } 97 | 98 | 99 | /** 100 | * 新增数据 101 | * 会自动添加addtime和addtimeformat字段 102 | * 会自动添加[mainKey](主键)字段 103 | * @param {String} storeName 表名 104 | * @param {Object} data 数据 105 | * @returns {Object} {code,data,msg} 106 | */ 107 | async addItem(storeName, data) { 108 | let mainKey = findStoreMainKey(this.stores, storeName) 109 | if (!mainKey) { 110 | return { 111 | code: -1, 112 | msg: "表不存在,请检查您的配置", 113 | } 114 | } 115 | try { 116 | await this.db.openDB(storeName) 117 | } catch (err) { 118 | return { 119 | code: -1, 120 | msg: err, 121 | } 122 | } 123 | const now = new Date() 124 | try { 125 | const res = await this.db.addData(storeName, { 126 | [mainKey]: guid(), 127 | ...data, 128 | addtime: now.getTime(), 129 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss"), 130 | }) 131 | this.db.closeDB() 132 | return { 133 | code: 0, 134 | data: res 135 | } 136 | } catch (err) { 137 | this.db.closeDB() 138 | return { 139 | code: -1, 140 | msg: err 141 | } 142 | } 143 | } 144 | 145 | /** 146 | * 批量新增数据 147 | * 会自动添加addtime和addtimeformat字段 148 | * 会自动添加[mainKey](主键)字段 149 | * @param {String} storeName 表名 150 | * @param {Array} list 数据列表 151 | * @returns {Object} {code,data,msg} 152 | */ 153 | async addBatch(storeName, list) { 154 | let mainKey = findStoreMainKey(this.stores, storeName) 155 | if (!mainKey) { 156 | return { 157 | code: -1, 158 | msg: "表不存在,请检查您的配置", 159 | } 160 | } 161 | if (!Array.isArray(list) || list.length === 0) { 162 | return { 163 | code: -1, 164 | msg: "参数错误,批量添加参数应为一个非空列表" 165 | } 166 | } 167 | try { 168 | await this.db.openDB(storeName) 169 | } catch (err) { 170 | return { 171 | code: -1, 172 | msg: err 173 | } 174 | } 175 | const now = new Date() 176 | let resList = [] 177 | for (let i = 0; i < list.length; i++) { 178 | const data = list[i] 179 | try { 180 | const res = await this.db.addData(storeName, { 181 | [mainKey]: guid(), 182 | ...data, 183 | addtime: now.getTime(), 184 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss"), 185 | }) 186 | resList.push({ 187 | code: 0, 188 | origin: data, 189 | data: res 190 | }) 191 | } catch (err) { 192 | resList.push({ 193 | code: -1, 194 | origin: data, 195 | data: err 196 | }) 197 | } 198 | } 199 | this.db.closeDB() 200 | return { 201 | code: 0, 202 | data: resList 203 | } 204 | } 205 | 206 | /** 207 | * 修改数据 208 | * 会自动添加updatetime和updatetimeformat 209 | * @param {String} storeName 表名 210 | * @param {Object} data 数据 211 | * @returns {Object} {code,data,msg} 212 | */ 213 | async updateItem(storeName, data) { 214 | let mainKey = findStoreMainKey(this.stores, storeName) 215 | if (!mainKey) { 216 | return { 217 | code: -1, 218 | msg: "表不存在,请检查您的配置", 219 | } 220 | } 221 | try { 222 | await this.db.openDB(storeName) 223 | } catch (err) { 224 | return { 225 | code: -1, 226 | msg: err 227 | } 228 | } 229 | const now = new Date() 230 | try { 231 | const res = await this.db.updateDB(storeName, { 232 | ...data, 233 | updatetime: now.getTime(), 234 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss"), 235 | }) 236 | this.db.closeDB() 237 | 238 | return { 239 | code: 0, 240 | data: res, 241 | } 242 | } catch (err) { 243 | this.db.closeDB() 244 | return { 245 | code: -1, 246 | msg: err 247 | } 248 | } 249 | 250 | } 251 | 252 | /** 253 | * 批量修改数据 254 | * 会自动添加updatetime和updatetimeformat 255 | * @param {String} storeName 表名 256 | * @param {Array} list 数据列表 257 | * @returns {Object} {code,data,msg} 258 | */ 259 | async updateBatch(storeName, list) { 260 | let mainKey = findStoreMainKey(this.stores, storeName) 261 | if (!mainKey) { 262 | return { 263 | code: -1, 264 | msg: "表不存在,请检查您的配置", 265 | } 266 | } 267 | if (!Array.isArray(list) || list.length === 0) { 268 | return { 269 | code: -1, 270 | msg: "参数错误,批量添加参数应为一个非空列表" 271 | } 272 | } 273 | try { 274 | await this.db.openDB(storeName) 275 | } catch (err) { 276 | return { 277 | code: -1, 278 | msg: err 279 | } 280 | } 281 | const now = new Date() 282 | const resList = [] 283 | for (let i = 0; i < list.length; i++) { 284 | const data = list[i] 285 | try { 286 | const res = await this.db.updateDB(storeName, { 287 | ...data, 288 | updatetime: now.getTime(), 289 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss"), 290 | }) 291 | 292 | resList.push({ 293 | code: 0, 294 | data: res 295 | }) 296 | } catch (err) { 297 | resList.push({ 298 | code: -1, 299 | msg: err 300 | }) 301 | } 302 | } 303 | this.db.closeDB() 304 | return { 305 | code: 0, 306 | data: resList 307 | } 308 | } 309 | 310 | /** 311 | * 删除数据 312 | * @param {String} storeName 表名 313 | * @param {String} id 数据id 314 | * @returns {Object} {code,data,msg} 315 | */ 316 | async delItem(storeName, id) { 317 | let mainKey = findStoreMainKey(this.stores, storeName) 318 | if (!mainKey) { 319 | return { 320 | code: -1, 321 | msg: "表不存在,请检查您的配置", 322 | } 323 | } 324 | try { 325 | await this.db.openDB(storeName) 326 | } catch (err) { 327 | return { 328 | code: -1, 329 | msg: err 330 | } 331 | } 332 | try { 333 | const res = await this.db.deleteDB(storeName, id) 334 | this.db.closeDB() 335 | return { 336 | code: 0, 337 | data: res 338 | } 339 | } catch (err) { 340 | this.db.closeDB() 341 | return { 342 | code: -1, 343 | msg: err 344 | } 345 | } 346 | } 347 | 348 | /** 349 | * 批量删除数据 350 | * @param {String} storeName 表名 351 | * @param {Array} ids id列表 352 | * @returns {Object} {code,data,msg} 353 | */ 354 | async delBatch(storeName, ids) { 355 | let mainKey = findStoreMainKey(this.stores, storeName) 356 | if (!mainKey) { 357 | return { 358 | code: -1, 359 | msg: "表不存在,请检查您的配置", 360 | } 361 | } 362 | if (!Array.isArray(ids) || ids.length === 0) { 363 | return { 364 | code: -1, 365 | msg: "参数错误,批量添加参数应为一个非空列表" 366 | } 367 | } 368 | try { 369 | await this.db.openDB(storeName) 370 | } catch (err) { 371 | return { 372 | code: -1, 373 | msg: err 374 | } 375 | } 376 | const resList = [] 377 | for (let i = 0; i < ids.length; i++) { 378 | try { 379 | const res = await this.db.deleteDB(storeName, ids[i]) 380 | resList.push({ 381 | code: 0, 382 | data: res 383 | }) 384 | } catch (err) { 385 | resList.push({ 386 | code: -1, 387 | msg: err 388 | }) 389 | } 390 | } 391 | this.db.closeDB() 392 | return { 393 | code: 0, 394 | data: resList 395 | } 396 | } 397 | 398 | /** 399 | * 查询表中所有数据 400 | * @param {String} storeName 表名 401 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 402 | * @returns {Object} {code,data,msg} 403 | */ 404 | async getAll(storeName, sortParams = []) { // 查询所有,不分页 405 | let mainKey = findStoreMainKey(this.stores, storeName) 406 | if (!mainKey) { 407 | return { 408 | code: -1, 409 | msg: "表不存在,请检查您的配置", 410 | } 411 | } 412 | try { 413 | await this.db.openDB(storeName) 414 | } catch (err) { 415 | return { 416 | code: -1, 417 | msg: err 418 | } 419 | } 420 | try { 421 | let list = await this.db.cursorGetData(storeName) 422 | list = listSort(list, sortParams) 423 | this.db.closeDB() 424 | return { 425 | code: 0, 426 | data: list, 427 | } 428 | } catch (err) { 429 | this.db.closeDB() 430 | return { 431 | code: -1, 432 | msg: err, 433 | } 434 | } 435 | } 436 | 437 | /** 438 | * 条件查询数据 439 | * @param {String} storeName 表名 440 | * @param {Object} params 查询参数 441 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 442 | * @returns {Object} {code,data,msg} 443 | */ 444 | async queryAll(storeName, params, sortParams = []) { // 条件查询,不分页 445 | let mainKey = findStoreMainKey(this.stores, storeName) 446 | if (!mainKey) { 447 | return { 448 | code: -1, 449 | msg: "表不存在,请检查您的配置", 450 | } 451 | } 452 | try { 453 | await this.db.openDB(storeName) 454 | } catch (err) { 455 | console.error(err) 456 | return 457 | } 458 | const keyLen = Object.keys(params || {}).length 459 | try { 460 | let list 461 | if (keyLen > 0) { 462 | list = await this.db.cursorGetDataByIndex(storeName, params) 463 | } else { 464 | list = await this.db.cursorGetData(storeName) 465 | } 466 | list = listSort(list, sortParams) 467 | this.db.closeDB() 468 | return { 469 | code: 0, 470 | data: list, 471 | } 472 | } catch (err) { 473 | this.db.closeDB() 474 | return { 475 | code: -1, 476 | msg: err, 477 | } 478 | } 479 | } 480 | 481 | /** 482 | * 条件查询分页数据 483 | * @param {String} storeName 表名 484 | * @param {Object} params 查询参数 485 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 486 | * @param {Number} page 当前页 487 | * @param {Number} pagesize 每页的项目数 488 | * @returns {Object} {code,data,msg} 489 | */ 490 | async queryPage(storeName, params, sortParams, page = 1, pagesize = 10,) { // 条件查询,分页 491 | let mainKey = findStoreMainKey(this.stores, storeName) 492 | if (!mainKey) { 493 | return { 494 | code: -1, 495 | msg: "表不存在,请检查您的配置", 496 | } 497 | } 498 | try { 499 | await this.db.openDB(storeName) 500 | } catch (err) { 501 | return { 502 | code: -1, 503 | msg: err 504 | } 505 | } 506 | const keyLen = Object.keys(params || {}).length 507 | try { 508 | let list 509 | if (keyLen > 0) { 510 | list = await this.db.cursorGetDataByIndex(storeName, params) 511 | } else { 512 | list = await this.db.cursorGetData(storeName) 513 | } 514 | list = listSort(list, sortParams) 515 | this.db.closeDB() 516 | return { 517 | code: 0, 518 | data: { 519 | total: list.length, 520 | list: list.slice((page - 1) * pagesize, page * pagesize) 521 | } 522 | } 523 | } catch (err) { 524 | this.db.closeDB() 525 | return { 526 | code: -1, 527 | msg: err, 528 | } 529 | } 530 | 531 | } 532 | 533 | 534 | } 535 | 536 | // window.IndexdbStore = IndexdbStore 537 | 538 | export default IndexdbStore 539 | -------------------------------------------------------------------------------- /lib/bundle.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | function ownKeys(object, enumerableOnly) { 5 | var keys = Object.keys(object); 6 | if (Object.getOwnPropertySymbols) { 7 | var symbols = Object.getOwnPropertySymbols(object); 8 | enumerableOnly && (symbols = symbols.filter(function (sym) { 9 | return Object.getOwnPropertyDescriptor(object, sym).enumerable; 10 | })), keys.push.apply(keys, symbols); 11 | } 12 | return keys; 13 | } 14 | function _objectSpread2(target) { 15 | for (var i = 1; i < arguments.length; i++) { 16 | var source = null != arguments[i] ? arguments[i] : {}; 17 | i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { 18 | _defineProperty(target, key, source[key]); 19 | }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { 20 | Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 21 | }); 22 | } 23 | return target; 24 | } 25 | function _defineProperty(obj, key, value) { 26 | key = _toPropertyKey(key); 27 | if (key in obj) { 28 | Object.defineProperty(obj, key, { 29 | value: value, 30 | enumerable: true, 31 | configurable: true, 32 | writable: true 33 | }); 34 | } else { 35 | obj[key] = value; 36 | } 37 | return obj; 38 | } 39 | function _toPrimitive(input, hint) { 40 | if (typeof input !== "object" || input === null) return input; 41 | var prim = input[Symbol.toPrimitive]; 42 | if (prim !== undefined) { 43 | var res = prim.call(input, hint || "default"); 44 | if (typeof res !== "object") return res; 45 | throw new TypeError("@@toPrimitive must return a primitive value."); 46 | } 47 | return (hint === "string" ? String : Number)(input); 48 | } 49 | function _toPropertyKey(arg) { 50 | var key = _toPrimitive(arg, "string"); 51 | return typeof key === "symbol" ? key : String(key); 52 | } 53 | 54 | class IndexedDB { 55 | constructor(dbInfo) { 56 | _defineProperty(this, "dbInfo", { 57 | name: "dbname", 58 | db: null, 59 | version: 1, 60 | stores: [] 61 | }); 62 | this.dbInfo = dbInfo; 63 | this.init(); 64 | } 65 | init() { 66 | return new Promise((resolve, reject) => { 67 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version); // 打开数据库连接 68 | request.onsuccess = event => { 69 | this.dbInfo.db = event.target.result; // 数据库对象 70 | resolve(this.dbInfo.db); 71 | }; 72 | request.onerror = event => { 73 | reject(event); 74 | }; 75 | request.onupgradeneeded = event => { 76 | // 数据库创建或升级的时候会触发 77 | this.dbInfo.db = event.target.result; // 数据库对象 78 | let objectStore; 79 | if (Array.isArray(this.dbInfo.stores)) { 80 | this.dbInfo.stores.forEach(db_store => { 81 | const { 82 | storeName, 83 | indexs, 84 | mainKey 85 | } = db_store; 86 | if (!this.dbInfo.db.objectStoreNames.contains(storeName)) { 87 | objectStore = this.dbInfo.db.createObjectStore(storeName, { 88 | keyPath: mainKey || "id" 89 | }); // 创建表 90 | } 91 | 92 | if (Array.isArray(indexs)) { 93 | indexs.forEach(item => { 94 | try { 95 | objectStore.createIndex(item.name, item.keyPath, _objectSpread2({ 96 | unique: false 97 | }, item.params)); // 创建索引 可以让你搜索任意字段 98 | } catch (err) { 99 | console.error(err); 100 | } 101 | }); 102 | } 103 | }); 104 | } 105 | }; 106 | }); 107 | } 108 | 109 | /** 110 | * 打开数据库 111 | * @param {*} storeName 打开数据库表 112 | * @param {*} indexs 索引列表 113 | * @returns 114 | */ 115 | openDB() { 116 | return new Promise((resolve, reject) => { 117 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version); 118 | request.onsuccess = event => { 119 | this.dbInfo.db = event.target.result; // 数据库对象 120 | resolve(this.dbInfo.db); 121 | }; 122 | request.onerror = event => { 123 | reject(event); 124 | }; 125 | }); 126 | } 127 | 128 | /** 129 | * 新增数据 130 | * @param {*} storeName 打开数据库表 131 | * @param {*} data 数据包含id 132 | * @returns 133 | */ 134 | addData(storeName, data) { 135 | return new Promise((resolve, reject) => { 136 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 指定表格名称和操作模式("只读"或"读写") 137 | .objectStore(storeName) // 仓库对象 138 | .add(data); 139 | request.onsuccess = event => { 140 | resolve(event); 141 | }; 142 | request.onerror = event => { 143 | throw new Error(event.target.error); 144 | }; 145 | }); 146 | } 147 | 148 | /** 149 | * 通过键查找数据 150 | * @param {*} storeName 打开数据库表 151 | * @param {*} key 键 152 | * @returns 153 | */ 154 | getDataByKey(storeName, key) { 155 | return new Promise((resolve, reject) => { 156 | let transaction = this.dbInfo.db.transaction([storeName]); // 事务 157 | let objectStore = transaction.objectStore(storeName); // 仓库对象 158 | let request = objectStore.get(key); 159 | request.onerror = event => { 160 | reject(event); 161 | }; 162 | request.onsuccess = event => { 163 | resolve(request.result); 164 | }; 165 | }); 166 | } 167 | 168 | /** 169 | * 遍历所有数据 170 | * @param {*} storeName 打开数据库表 171 | * @returns 172 | */ 173 | cursorGetData(storeName) { 174 | let list = []; 175 | let store = this.dbInfo.db.transaction(storeName, 'readwrite') // 事务 176 | .objectStore(storeName); // 仓库对象 177 | let request = store.openCursor(); // 指针对象 178 | return new Promise((resolve, reject) => { 179 | request.onsuccess = e => { 180 | let cursor = e.target.result; 181 | if (cursor) { 182 | // 必须要检查 183 | list.push(cursor.value); 184 | cursor.continue(); // 遍历了存储对象中的所有内容 185 | } else { 186 | resolve(list); 187 | } 188 | }; 189 | request.onerror = e => { 190 | reject(e); 191 | }; 192 | }); 193 | } 194 | 195 | /** 196 | * 分页查找 197 | * @param {*} storeName 打开数据库表 198 | * @param {*} page 当前页 199 | * @param {*} pageSize 分页数 200 | * @returns 201 | */ 202 | cursorPage(storeName, params) { 203 | let page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; 204 | let pageSize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10; 205 | return new Promise((resolve, reject) => { 206 | let data = []; 207 | let store = this.dbInfo.db.transaction([storeName], 'readonly').objectStore(storeName); 208 | let requeset = store.openCursor(); 209 | let count = store.count(); 210 | let index = null; 211 | requeset.onsuccess = event => { 212 | let res = event.target.result; 213 | if (res) { 214 | if (index === pageSize - 1) { 215 | data.push(res.value); 216 | try { 217 | resolve({ 218 | list: data, 219 | total: count.result 220 | }); 221 | } catch (err) { 222 | resolve({ 223 | list: [], 224 | total: 0 225 | }); 226 | } 227 | return; 228 | } 229 | if (index === null && page !== 1) { 230 | index = 0; 231 | res.advance((page - 1) * pageSize); 232 | } else { 233 | index++; 234 | data.push(res.value); 235 | res.continue(); 236 | } 237 | } else { 238 | try { 239 | resolve({ 240 | list: data, 241 | total: count.result 242 | }); 243 | } catch (err) { 244 | resolve({ 245 | list: [], 246 | total: 0 247 | }); 248 | } 249 | } 250 | }; 251 | requeset.onerror = () => { 252 | reject('读取数据失败'); 253 | }; 254 | }); 255 | } 256 | 257 | /** 258 | * 通过索引查找数据 259 | * @param {*} storeName 打开数据库表 260 | * @param {*} indexName 索引名称 261 | * @param {*} indexValue 索引值 262 | * @returns 263 | */ 264 | getDataByIndex(storeName, indexName, indexValue) { 265 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName); 266 | let request = store.index(indexName).get(indexValue); 267 | return new Promise((resolve, reject) => { 268 | request.onerror = e => { 269 | reject(e); 270 | }; 271 | request.onsuccess = e => { 272 | resolve(e.target.result); 273 | }; 274 | }); 275 | } 276 | 277 | /** 278 | * 通过索引和游标查找,遍历了存储对象中的所有内容 279 | * @param {*} storeName 打开数据库表 280 | * @param {*} indexName 索引名称 281 | * @param {*} indexValue 索引值 282 | * @returns 283 | */ 284 | cursorGetDataByIndex(storeName, params) { 285 | let list = []; 286 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName); // 仓库对象 287 | return new Promise((resolve, reject) => { 288 | const { 289 | indexs 290 | } = this.dbInfo.stores.find(item => item.storeName === storeName) || {}; 291 | if (!indexs) { 292 | resolve([]); 293 | return; 294 | } 295 | let keyPath = "", 296 | vals = []; 297 | for (const key in params) { 298 | keyPath += "," + key; 299 | vals.push(params[key]); 300 | } 301 | keyPath = keyPath.substring(1); 302 | const { 303 | name 304 | } = indexs.find(item => item.keyPath === keyPath) || {}; 305 | if (!name) { 306 | resolve([]); 307 | return; 308 | } 309 | let request = store.index(name) // 索引对象 310 | .openCursor(IDBKeyRange.only(vals.length === 1 ? vals[0] : vals)); // 指针对象 311 | 312 | request.onsuccess = e => { 313 | let cursor = e.target.result; 314 | if (cursor) { 315 | list.push(cursor.value); 316 | cursor.continue(); // 遍历了存储对象中的所有内容 317 | } else { 318 | resolve(list); 319 | } 320 | }; 321 | request.onerror = ev => { 322 | reject(ev); 323 | }; 324 | }); 325 | } 326 | 327 | /** 328 | * 修改数据 329 | * @param {*} storeName 打开数据库表 330 | * @param {*} data 数据 331 | * @returns 332 | */ 333 | updateDB(storeName, data) { 334 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 335 | .objectStore(storeName) // 仓库对象 336 | .put(data); 337 | return new Promise((resolve, reject) => { 338 | request.onsuccess = ev => { 339 | resolve(ev); 340 | }; 341 | request.onerror = ev => { 342 | resolve(ev); 343 | }; 344 | }); 345 | } 346 | 347 | /** 348 | * 删除数据 349 | * @param {*} storeName 打开数据库表 350 | * @param {*} id id 351 | * @returns 352 | */ 353 | deleteDB(storeName, id) { 354 | let request = this.dbInfo.db.transaction([storeName], 'readwrite').objectStore(storeName).delete(id); 355 | return new Promise((resolve, reject) => { 356 | request.onsuccess = ev => { 357 | resolve(ev); 358 | }; 359 | request.onerror = ev => { 360 | resolve(ev); 361 | }; 362 | }); 363 | } 364 | 365 | /** 366 | * 删除数据库 367 | * @param {String} dbName 数据库表名 368 | * @returns 369 | */ 370 | deleteDBAll(dbName) { 371 | let deleteRequest = window.indexedDB.deleteDatabase(dbName); 372 | return new Promise((resolve, reject) => { 373 | deleteRequest.onerror = err => { 374 | console.error(err); 375 | }; 376 | deleteRequest.onsuccess = event => { 377 | console.info(event); 378 | }; 379 | }); 380 | } 381 | 382 | /** 383 | * 关闭数据库 384 | */ 385 | closeDB() { 386 | this.dbInfo.db.close(); 387 | console.info('数据库已关闭'); 388 | } 389 | } 390 | 391 | function guid() { 392 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { 393 | const r = Math.random() * 16 | 0, 394 | v = c == 'x' ? r : r & 0x3 | 0x8; 395 | return v.toString(16); 396 | }); 397 | } 398 | function listSort(list) { 399 | let sortParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 400 | const sort_params = [{ 401 | key: 'addtime', 402 | type: 'desc' 403 | }, ...(sortParams || [])]; 404 | let list_temp = list; 405 | sort_params.forEach(item => { 406 | let type, key; 407 | if (typeof item === 'string') { 408 | type = 'desc'; 409 | key = item; 410 | } else if (typeof item === 'object') { 411 | type = typeof item.type === 'string' ? item.type.toLowerCase() : 'desc'; 412 | key = item.key; 413 | } 414 | if (type === 'desc') { 415 | list_temp = list_temp.sort((a, b) => b[key] - a[key]); 416 | } else if (type === 'asc') { 417 | list_temp = list_temp.sort((a, b) => a[key] - b[key]); 418 | } 419 | }); 420 | return list_temp; 421 | } 422 | Date.prototype.Format = function (fmt) { 423 | var o = { 424 | "M+": this.getMonth() + 1, 425 | //月份 426 | "d+": this.getDate(), 427 | //日 428 | "h+": this.getHours(), 429 | //小时 430 | "m+": this.getMinutes(), 431 | //分 432 | "s+": this.getSeconds(), 433 | //秒 434 | "q+": Math.floor((this.getMonth() + 3) / 3), 435 | //季度 436 | "S": this.getMilliseconds() //毫秒 437 | }; 438 | 439 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 440 | for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); 441 | return fmt; 442 | }; 443 | function findStoreMainKey(stores, storeName) { 444 | const store = stores.find(item => item.storeName === storeName); 445 | if (store) { 446 | return store.mainKey || "id"; 447 | } 448 | } 449 | 450 | // mock数据持久化类,当前用indexedDb做持久化 451 | class IndexdbStore { 452 | // IndexedDB 封装对象 453 | 454 | constructor(options) { 455 | _defineProperty(this, "name", null); 456 | // 数据库名称 457 | _defineProperty(this, "version", null); 458 | // 数据库版本号 459 | _defineProperty(this, "stores", null); 460 | // 数据库表配置 461 | _defineProperty(this, "db", null); 462 | let name = 'indexeddbname', 463 | version = 1, 464 | stores = []; 465 | if (options) { 466 | name = options.name || name; 467 | version = options.version || version; 468 | stores = options.stores || stores; 469 | } 470 | if (!this.db) { 471 | this.rebuild({ 472 | name, 473 | version, 474 | stores 475 | }); 476 | } 477 | } 478 | 479 | /** 480 | * 数据库升级重构 481 | * @param options 传入参数,同构造函数参数,可为空 482 | */ 483 | rebuild(options) { 484 | const { 485 | name, 486 | version, 487 | stores 488 | } = options || {}; 489 | this.stores = stores || this.stores; 490 | this.name = name || this.name; 491 | this.version = version || this.version; 492 | this.db = new IndexedDB({ 493 | name: name || this.name, 494 | version: version || this.version, 495 | db: null, 496 | stores: stores || this.stores 497 | }); 498 | } 499 | 500 | /** 501 | * 新增数据 502 | * 会自动添加addtime和addtimeformat字段 503 | * 会自动添加[mainKey](主键)字段 504 | * @param {String} storeName 表名 505 | * @param {Object} data 数据 506 | * @returns {Object} {code,data,msg} 507 | */ 508 | async addItem(storeName, data) { 509 | let mainKey = findStoreMainKey(this.stores, storeName); 510 | if (!mainKey) { 511 | return { 512 | code: -1, 513 | msg: "表不存在,请检查您的配置" 514 | }; 515 | } 516 | try { 517 | await this.db.openDB(storeName); 518 | } catch (err) { 519 | return { 520 | code: -1, 521 | msg: err 522 | }; 523 | } 524 | const now = new Date(); 525 | try { 526 | const res = await this.db.addData(storeName, _objectSpread2(_objectSpread2({ 527 | [mainKey]: guid() 528 | }, data), {}, { 529 | addtime: now.getTime(), 530 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 531 | })); 532 | this.db.closeDB(); 533 | return { 534 | code: 0, 535 | data: res 536 | }; 537 | } catch (err) { 538 | this.db.closeDB(); 539 | return { 540 | code: -1, 541 | msg: err 542 | }; 543 | } 544 | } 545 | 546 | /** 547 | * 批量新增数据 548 | * 会自动添加addtime和addtimeformat字段 549 | * 会自动添加[mainKey](主键)字段 550 | * @param {String} storeName 表名 551 | * @param {Array} list 数据列表 552 | * @returns {Object} {code,data,msg} 553 | */ 554 | async addBatch(storeName, list) { 555 | let mainKey = findStoreMainKey(this.stores, storeName); 556 | if (!mainKey) { 557 | return { 558 | code: -1, 559 | msg: "表不存在,请检查您的配置" 560 | }; 561 | } 562 | if (!Array.isArray(list) || list.length === 0) { 563 | return { 564 | code: -1, 565 | msg: "参数错误,批量添加参数应为一个非空列表" 566 | }; 567 | } 568 | try { 569 | await this.db.openDB(storeName); 570 | } catch (err) { 571 | return { 572 | code: -1, 573 | msg: err 574 | }; 575 | } 576 | const now = new Date(); 577 | let resList = []; 578 | for (let i = 0; i < list.length; i++) { 579 | const data = list[i]; 580 | try { 581 | const res = await this.db.addData(storeName, _objectSpread2(_objectSpread2({ 582 | [mainKey]: guid() 583 | }, data), {}, { 584 | addtime: now.getTime(), 585 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 586 | })); 587 | resList.push({ 588 | code: 0, 589 | origin: data, 590 | data: res 591 | }); 592 | } catch (err) { 593 | resList.push({ 594 | code: -1, 595 | origin: data, 596 | data: err 597 | }); 598 | } 599 | } 600 | this.db.closeDB(); 601 | return { 602 | code: 0, 603 | data: resList 604 | }; 605 | } 606 | 607 | /** 608 | * 修改数据 609 | * 会自动添加updatetime和updatetimeformat 610 | * @param {String} storeName 表名 611 | * @param {Object} data 数据 612 | * @returns {Object} {code,data,msg} 613 | */ 614 | async updateItem(storeName, data) { 615 | let mainKey = findStoreMainKey(this.stores, storeName); 616 | if (!mainKey) { 617 | return { 618 | code: -1, 619 | msg: "表不存在,请检查您的配置" 620 | }; 621 | } 622 | try { 623 | await this.db.openDB(storeName); 624 | } catch (err) { 625 | return { 626 | code: -1, 627 | msg: err 628 | }; 629 | } 630 | const now = new Date(); 631 | try { 632 | const res = await this.db.updateDB(storeName, _objectSpread2(_objectSpread2({}, data), {}, { 633 | updatetime: now.getTime(), 634 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 635 | })); 636 | this.db.closeDB(); 637 | return { 638 | code: 0, 639 | data: res 640 | }; 641 | } catch (err) { 642 | this.db.closeDB(); 643 | return { 644 | code: -1, 645 | msg: err 646 | }; 647 | } 648 | } 649 | 650 | /** 651 | * 批量修改数据 652 | * 会自动添加updatetime和updatetimeformat 653 | * @param {String} storeName 表名 654 | * @param {Array} list 数据列表 655 | * @returns {Object} {code,data,msg} 656 | */ 657 | async updateBatch(storeName, list) { 658 | let mainKey = findStoreMainKey(this.stores, storeName); 659 | if (!mainKey) { 660 | return { 661 | code: -1, 662 | msg: "表不存在,请检查您的配置" 663 | }; 664 | } 665 | if (!Array.isArray(list) || list.length === 0) { 666 | return { 667 | code: -1, 668 | msg: "参数错误,批量添加参数应为一个非空列表" 669 | }; 670 | } 671 | try { 672 | await this.db.openDB(storeName); 673 | } catch (err) { 674 | return { 675 | code: -1, 676 | msg: err 677 | }; 678 | } 679 | const now = new Date(); 680 | const resList = []; 681 | for (let i = 0; i < list.length; i++) { 682 | const data = list[i]; 683 | try { 684 | const res = await this.db.updateDB(storeName, _objectSpread2(_objectSpread2({}, data), {}, { 685 | updatetime: now.getTime(), 686 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 687 | })); 688 | resList.push({ 689 | code: 0, 690 | data: res 691 | }); 692 | } catch (err) { 693 | resList.push({ 694 | code: -1, 695 | msg: err 696 | }); 697 | } 698 | } 699 | this.db.closeDB(); 700 | return { 701 | code: 0, 702 | data: resList 703 | }; 704 | } 705 | 706 | /** 707 | * 删除数据 708 | * @param {String} storeName 表名 709 | * @param {String} id 数据id 710 | * @returns {Object} {code,data,msg} 711 | */ 712 | async delItem(storeName, id) { 713 | let mainKey = findStoreMainKey(this.stores, storeName); 714 | if (!mainKey) { 715 | return { 716 | code: -1, 717 | msg: "表不存在,请检查您的配置" 718 | }; 719 | } 720 | try { 721 | await this.db.openDB(storeName); 722 | } catch (err) { 723 | return { 724 | code: -1, 725 | msg: err 726 | }; 727 | } 728 | try { 729 | const res = await this.db.deleteDB(storeName, id); 730 | this.db.closeDB(); 731 | return { 732 | code: 0, 733 | data: res 734 | }; 735 | } catch (err) { 736 | this.db.closeDB(); 737 | return { 738 | code: -1, 739 | msg: err 740 | }; 741 | } 742 | } 743 | 744 | /** 745 | * 批量删除数据 746 | * @param {String} storeName 表名 747 | * @param {Array} ids id列表 748 | * @returns {Object} {code,data,msg} 749 | */ 750 | async delBatch(storeName, ids) { 751 | let mainKey = findStoreMainKey(this.stores, storeName); 752 | if (!mainKey) { 753 | return { 754 | code: -1, 755 | msg: "表不存在,请检查您的配置" 756 | }; 757 | } 758 | if (!Array.isArray(ids) || ids.length === 0) { 759 | return { 760 | code: -1, 761 | msg: "参数错误,批量添加参数应为一个非空列表" 762 | }; 763 | } 764 | try { 765 | await this.db.openDB(storeName); 766 | } catch (err) { 767 | return { 768 | code: -1, 769 | msg: err 770 | }; 771 | } 772 | const resList = []; 773 | for (let i = 0; i < ids.length; i++) { 774 | try { 775 | const res = await this.db.deleteDB(storeName, ids[i]); 776 | resList.push({ 777 | code: 0, 778 | data: res 779 | }); 780 | } catch (err) { 781 | resList.push({ 782 | code: -1, 783 | msg: err 784 | }); 785 | } 786 | } 787 | this.db.closeDB(); 788 | return { 789 | code: 0, 790 | data: resList 791 | }; 792 | } 793 | 794 | /** 795 | * 查询表中所有数据 796 | * @param {String} storeName 表名 797 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 798 | * @returns {Object} {code,data,msg} 799 | */ 800 | async getAll(storeName) { 801 | let sortParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 802 | // 查询所有,不分页 803 | let mainKey = findStoreMainKey(this.stores, storeName); 804 | if (!mainKey) { 805 | return { 806 | code: -1, 807 | msg: "表不存在,请检查您的配置" 808 | }; 809 | } 810 | try { 811 | await this.db.openDB(storeName); 812 | } catch (err) { 813 | return { 814 | code: -1, 815 | msg: err 816 | }; 817 | } 818 | try { 819 | let list = await this.db.cursorGetData(storeName); 820 | list = listSort(list, sortParams); 821 | this.db.closeDB(); 822 | return { 823 | code: 0, 824 | data: list 825 | }; 826 | } catch (err) { 827 | this.db.closeDB(); 828 | return { 829 | code: -1, 830 | msg: err 831 | }; 832 | } 833 | } 834 | 835 | /** 836 | * 条件查询数据 837 | * @param {String} storeName 表名 838 | * @param {Object} params 查询参数 839 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 840 | * @returns {Object} {code,data,msg} 841 | */ 842 | async queryAll(storeName, params) { 843 | let sortParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; 844 | // 条件查询,不分页 845 | let mainKey = findStoreMainKey(this.stores, storeName); 846 | if (!mainKey) { 847 | return { 848 | code: -1, 849 | msg: "表不存在,请检查您的配置" 850 | }; 851 | } 852 | try { 853 | await this.db.openDB(storeName); 854 | } catch (err) { 855 | console.error(err); 856 | return; 857 | } 858 | const keyLen = Object.keys(params || {}).length; 859 | try { 860 | let list; 861 | if (keyLen > 0) { 862 | list = await this.db.cursorGetDataByIndex(storeName, params); 863 | } else { 864 | list = await this.db.cursorGetData(storeName); 865 | } 866 | list = listSort(list, sortParams); 867 | this.db.closeDB(); 868 | return { 869 | code: 0, 870 | data: list 871 | }; 872 | } catch (err) { 873 | this.db.closeDB(); 874 | return { 875 | code: -1, 876 | msg: err 877 | }; 878 | } 879 | } 880 | 881 | /** 882 | * 条件查询分页数据 883 | * @param {String} storeName 表名 884 | * @param {Object} params 查询参数 885 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 886 | * @param {Number} page 当前页 887 | * @param {Number} pagesize 每页的项目数 888 | * @returns {Object} {code,data,msg} 889 | */ 890 | async queryPage(storeName, params, sortParams) { 891 | let page = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; 892 | let pagesize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10; 893 | // 条件查询,分页 894 | let mainKey = findStoreMainKey(this.stores, storeName); 895 | if (!mainKey) { 896 | return { 897 | code: -1, 898 | msg: "表不存在,请检查您的配置" 899 | }; 900 | } 901 | try { 902 | await this.db.openDB(storeName); 903 | } catch (err) { 904 | return { 905 | code: -1, 906 | msg: err 907 | }; 908 | } 909 | const keyLen = Object.keys(params || {}).length; 910 | try { 911 | let list; 912 | if (keyLen > 0) { 913 | list = await this.db.cursorGetDataByIndex(storeName, params); 914 | } else { 915 | list = await this.db.cursorGetData(storeName); 916 | } 917 | list = listSort(list, sortParams); 918 | this.db.closeDB(); 919 | return { 920 | code: 0, 921 | data: { 922 | total: list.length, 923 | list: list.slice((page - 1) * pagesize, page * pagesize) 924 | } 925 | }; 926 | } catch (err) { 927 | this.db.closeDB(); 928 | return { 929 | code: -1, 930 | msg: err 931 | }; 932 | } 933 | } 934 | } 935 | 936 | return IndexdbStore; 937 | 938 | })(); 939 | -------------------------------------------------------------------------------- /lib/bundle.umd.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 3 | typeof define === 'function' && define.amd ? define(factory) : 4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.IndexdbStore = factory()); 5 | })(this, (function () { 'use strict'; 6 | 7 | function ownKeys(object, enumerableOnly) { 8 | var keys = Object.keys(object); 9 | if (Object.getOwnPropertySymbols) { 10 | var symbols = Object.getOwnPropertySymbols(object); 11 | enumerableOnly && (symbols = symbols.filter(function (sym) { 12 | return Object.getOwnPropertyDescriptor(object, sym).enumerable; 13 | })), keys.push.apply(keys, symbols); 14 | } 15 | return keys; 16 | } 17 | function _objectSpread2(target) { 18 | for (var i = 1; i < arguments.length; i++) { 19 | var source = null != arguments[i] ? arguments[i] : {}; 20 | i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { 21 | _defineProperty(target, key, source[key]); 22 | }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { 23 | Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 24 | }); 25 | } 26 | return target; 27 | } 28 | function _defineProperty(obj, key, value) { 29 | key = _toPropertyKey(key); 30 | if (key in obj) { 31 | Object.defineProperty(obj, key, { 32 | value: value, 33 | enumerable: true, 34 | configurable: true, 35 | writable: true 36 | }); 37 | } else { 38 | obj[key] = value; 39 | } 40 | return obj; 41 | } 42 | function _toPrimitive(input, hint) { 43 | if (typeof input !== "object" || input === null) return input; 44 | var prim = input[Symbol.toPrimitive]; 45 | if (prim !== undefined) { 46 | var res = prim.call(input, hint || "default"); 47 | if (typeof res !== "object") return res; 48 | throw new TypeError("@@toPrimitive must return a primitive value."); 49 | } 50 | return (hint === "string" ? String : Number)(input); 51 | } 52 | function _toPropertyKey(arg) { 53 | var key = _toPrimitive(arg, "string"); 54 | return typeof key === "symbol" ? key : String(key); 55 | } 56 | 57 | class IndexedDB { 58 | constructor(dbInfo) { 59 | _defineProperty(this, "dbInfo", { 60 | name: "dbname", 61 | db: null, 62 | version: 1, 63 | stores: [] 64 | }); 65 | this.dbInfo = dbInfo; 66 | this.init(); 67 | } 68 | init() { 69 | return new Promise((resolve, reject) => { 70 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version); // 打开数据库连接 71 | request.onsuccess = event => { 72 | this.dbInfo.db = event.target.result; // 数据库对象 73 | resolve(this.dbInfo.db); 74 | }; 75 | request.onerror = event => { 76 | reject(event); 77 | }; 78 | request.onupgradeneeded = event => { 79 | // 数据库创建或升级的时候会触发 80 | this.dbInfo.db = event.target.result; // 数据库对象 81 | let objectStore; 82 | if (Array.isArray(this.dbInfo.stores)) { 83 | this.dbInfo.stores.forEach(db_store => { 84 | const { 85 | storeName, 86 | indexs, 87 | mainKey 88 | } = db_store; 89 | if (!this.dbInfo.db.objectStoreNames.contains(storeName)) { 90 | objectStore = this.dbInfo.db.createObjectStore(storeName, { 91 | keyPath: mainKey || "id" 92 | }); // 创建表 93 | } 94 | 95 | if (Array.isArray(indexs)) { 96 | indexs.forEach(item => { 97 | try { 98 | objectStore.createIndex(item.name, item.keyPath, _objectSpread2({ 99 | unique: false 100 | }, item.params)); // 创建索引 可以让你搜索任意字段 101 | } catch (err) { 102 | console.error(err); 103 | } 104 | }); 105 | } 106 | }); 107 | } 108 | }; 109 | }); 110 | } 111 | 112 | /** 113 | * 打开数据库 114 | * @param {*} storeName 打开数据库表 115 | * @param {*} indexs 索引列表 116 | * @returns 117 | */ 118 | openDB() { 119 | return new Promise((resolve, reject) => { 120 | const request = window.indexedDB.open(this.dbInfo.name, this.dbInfo.version); 121 | request.onsuccess = event => { 122 | this.dbInfo.db = event.target.result; // 数据库对象 123 | resolve(this.dbInfo.db); 124 | }; 125 | request.onerror = event => { 126 | reject(event); 127 | }; 128 | }); 129 | } 130 | 131 | /** 132 | * 新增数据 133 | * @param {*} storeName 打开数据库表 134 | * @param {*} data 数据包含id 135 | * @returns 136 | */ 137 | addData(storeName, data) { 138 | return new Promise((resolve, reject) => { 139 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 指定表格名称和操作模式("只读"或"读写") 140 | .objectStore(storeName) // 仓库对象 141 | .add(data); 142 | request.onsuccess = event => { 143 | resolve(event); 144 | }; 145 | request.onerror = event => { 146 | throw new Error(event.target.error); 147 | }; 148 | }); 149 | } 150 | 151 | /** 152 | * 通过键查找数据 153 | * @param {*} storeName 打开数据库表 154 | * @param {*} key 键 155 | * @returns 156 | */ 157 | getDataByKey(storeName, key) { 158 | return new Promise((resolve, reject) => { 159 | let transaction = this.dbInfo.db.transaction([storeName]); // 事务 160 | let objectStore = transaction.objectStore(storeName); // 仓库对象 161 | let request = objectStore.get(key); 162 | request.onerror = event => { 163 | reject(event); 164 | }; 165 | request.onsuccess = event => { 166 | resolve(request.result); 167 | }; 168 | }); 169 | } 170 | 171 | /** 172 | * 遍历所有数据 173 | * @param {*} storeName 打开数据库表 174 | * @returns 175 | */ 176 | cursorGetData(storeName) { 177 | let list = []; 178 | let store = this.dbInfo.db.transaction(storeName, 'readwrite') // 事务 179 | .objectStore(storeName); // 仓库对象 180 | let request = store.openCursor(); // 指针对象 181 | return new Promise((resolve, reject) => { 182 | request.onsuccess = e => { 183 | let cursor = e.target.result; 184 | if (cursor) { 185 | // 必须要检查 186 | list.push(cursor.value); 187 | cursor.continue(); // 遍历了存储对象中的所有内容 188 | } else { 189 | resolve(list); 190 | } 191 | }; 192 | request.onerror = e => { 193 | reject(e); 194 | }; 195 | }); 196 | } 197 | 198 | /** 199 | * 分页查找 200 | * @param {*} storeName 打开数据库表 201 | * @param {*} page 当前页 202 | * @param {*} pageSize 分页数 203 | * @returns 204 | */ 205 | cursorPage(storeName, params) { 206 | let page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; 207 | let pageSize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10; 208 | return new Promise((resolve, reject) => { 209 | let data = []; 210 | let store = this.dbInfo.db.transaction([storeName], 'readonly').objectStore(storeName); 211 | let requeset = store.openCursor(); 212 | let count = store.count(); 213 | let index = null; 214 | requeset.onsuccess = event => { 215 | let res = event.target.result; 216 | if (res) { 217 | if (index === pageSize - 1) { 218 | data.push(res.value); 219 | try { 220 | resolve({ 221 | list: data, 222 | total: count.result 223 | }); 224 | } catch (err) { 225 | resolve({ 226 | list: [], 227 | total: 0 228 | }); 229 | } 230 | return; 231 | } 232 | if (index === null && page !== 1) { 233 | index = 0; 234 | res.advance((page - 1) * pageSize); 235 | } else { 236 | index++; 237 | data.push(res.value); 238 | res.continue(); 239 | } 240 | } else { 241 | try { 242 | resolve({ 243 | list: data, 244 | total: count.result 245 | }); 246 | } catch (err) { 247 | resolve({ 248 | list: [], 249 | total: 0 250 | }); 251 | } 252 | } 253 | }; 254 | requeset.onerror = () => { 255 | reject('读取数据失败'); 256 | }; 257 | }); 258 | } 259 | 260 | /** 261 | * 通过索引查找数据 262 | * @param {*} storeName 打开数据库表 263 | * @param {*} indexName 索引名称 264 | * @param {*} indexValue 索引值 265 | * @returns 266 | */ 267 | getDataByIndex(storeName, indexName, indexValue) { 268 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName); 269 | let request = store.index(indexName).get(indexValue); 270 | return new Promise((resolve, reject) => { 271 | request.onerror = e => { 272 | reject(e); 273 | }; 274 | request.onsuccess = e => { 275 | resolve(e.target.result); 276 | }; 277 | }); 278 | } 279 | 280 | /** 281 | * 通过索引和游标查找,遍历了存储对象中的所有内容 282 | * @param {*} storeName 打开数据库表 283 | * @param {*} indexName 索引名称 284 | * @param {*} indexValue 索引值 285 | * @returns 286 | */ 287 | cursorGetDataByIndex(storeName, params) { 288 | let list = []; 289 | let store = this.dbInfo.db.transaction(storeName, 'readwrite').objectStore(storeName); // 仓库对象 290 | return new Promise((resolve, reject) => { 291 | const { 292 | indexs 293 | } = this.dbInfo.stores.find(item => item.storeName === storeName) || {}; 294 | if (!indexs) { 295 | resolve([]); 296 | return; 297 | } 298 | let keyPath = "", 299 | vals = []; 300 | for (const key in params) { 301 | keyPath += "," + key; 302 | vals.push(params[key]); 303 | } 304 | keyPath = keyPath.substring(1); 305 | const { 306 | name 307 | } = indexs.find(item => item.keyPath === keyPath) || {}; 308 | if (!name) { 309 | resolve([]); 310 | return; 311 | } 312 | let request = store.index(name) // 索引对象 313 | .openCursor(IDBKeyRange.only(vals.length === 1 ? vals[0] : vals)); // 指针对象 314 | 315 | request.onsuccess = e => { 316 | let cursor = e.target.result; 317 | if (cursor) { 318 | list.push(cursor.value); 319 | cursor.continue(); // 遍历了存储对象中的所有内容 320 | } else { 321 | resolve(list); 322 | } 323 | }; 324 | request.onerror = ev => { 325 | reject(ev); 326 | }; 327 | }); 328 | } 329 | 330 | /** 331 | * 修改数据 332 | * @param {*} storeName 打开数据库表 333 | * @param {*} data 数据 334 | * @returns 335 | */ 336 | updateDB(storeName, data) { 337 | let request = this.dbInfo.db.transaction([storeName], 'readwrite') // 事务对象 338 | .objectStore(storeName) // 仓库对象 339 | .put(data); 340 | return new Promise((resolve, reject) => { 341 | request.onsuccess = ev => { 342 | resolve(ev); 343 | }; 344 | request.onerror = ev => { 345 | resolve(ev); 346 | }; 347 | }); 348 | } 349 | 350 | /** 351 | * 删除数据 352 | * @param {*} storeName 打开数据库表 353 | * @param {*} id id 354 | * @returns 355 | */ 356 | deleteDB(storeName, id) { 357 | let request = this.dbInfo.db.transaction([storeName], 'readwrite').objectStore(storeName).delete(id); 358 | return new Promise((resolve, reject) => { 359 | request.onsuccess = ev => { 360 | resolve(ev); 361 | }; 362 | request.onerror = ev => { 363 | resolve(ev); 364 | }; 365 | }); 366 | } 367 | 368 | /** 369 | * 删除数据库 370 | * @param {String} dbName 数据库表名 371 | * @returns 372 | */ 373 | deleteDBAll(dbName) { 374 | let deleteRequest = window.indexedDB.deleteDatabase(dbName); 375 | return new Promise((resolve, reject) => { 376 | deleteRequest.onerror = err => { 377 | console.error(err); 378 | }; 379 | deleteRequest.onsuccess = event => { 380 | console.info(event); 381 | }; 382 | }); 383 | } 384 | 385 | /** 386 | * 关闭数据库 387 | */ 388 | closeDB() { 389 | this.dbInfo.db.close(); 390 | console.info('数据库已关闭'); 391 | } 392 | } 393 | 394 | function guid() { 395 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { 396 | const r = Math.random() * 16 | 0, 397 | v = c == 'x' ? r : r & 0x3 | 0x8; 398 | return v.toString(16); 399 | }); 400 | } 401 | function listSort(list) { 402 | let sortParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 403 | const sort_params = [{ 404 | key: 'addtime', 405 | type: 'desc' 406 | }, ...(sortParams || [])]; 407 | let list_temp = list; 408 | sort_params.forEach(item => { 409 | let type, key; 410 | if (typeof item === 'string') { 411 | type = 'desc'; 412 | key = item; 413 | } else if (typeof item === 'object') { 414 | type = typeof item.type === 'string' ? item.type.toLowerCase() : 'desc'; 415 | key = item.key; 416 | } 417 | if (type === 'desc') { 418 | list_temp = list_temp.sort((a, b) => b[key] - a[key]); 419 | } else if (type === 'asc') { 420 | list_temp = list_temp.sort((a, b) => a[key] - b[key]); 421 | } 422 | }); 423 | return list_temp; 424 | } 425 | Date.prototype.Format = function (fmt) { 426 | var o = { 427 | "M+": this.getMonth() + 1, 428 | //月份 429 | "d+": this.getDate(), 430 | //日 431 | "h+": this.getHours(), 432 | //小时 433 | "m+": this.getMinutes(), 434 | //分 435 | "s+": this.getSeconds(), 436 | //秒 437 | "q+": Math.floor((this.getMonth() + 3) / 3), 438 | //季度 439 | "S": this.getMilliseconds() //毫秒 440 | }; 441 | 442 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 443 | for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); 444 | return fmt; 445 | }; 446 | function findStoreMainKey(stores, storeName) { 447 | const store = stores.find(item => item.storeName === storeName); 448 | if (store) { 449 | return store.mainKey || "id"; 450 | } 451 | } 452 | 453 | // mock数据持久化类,当前用indexedDb做持久化 454 | class IndexdbStore { 455 | // IndexedDB 封装对象 456 | 457 | constructor(options) { 458 | _defineProperty(this, "name", null); 459 | // 数据库名称 460 | _defineProperty(this, "version", null); 461 | // 数据库版本号 462 | _defineProperty(this, "stores", null); 463 | // 数据库表配置 464 | _defineProperty(this, "db", null); 465 | let name = 'indexeddbname', 466 | version = 1, 467 | stores = []; 468 | if (options) { 469 | name = options.name || name; 470 | version = options.version || version; 471 | stores = options.stores || stores; 472 | } 473 | if (!this.db) { 474 | this.rebuild({ 475 | name, 476 | version, 477 | stores 478 | }); 479 | } 480 | } 481 | 482 | /** 483 | * 数据库升级重构 484 | * @param options 传入参数,同构造函数参数,可为空 485 | */ 486 | rebuild(options) { 487 | const { 488 | name, 489 | version, 490 | stores 491 | } = options || {}; 492 | this.stores = stores || this.stores; 493 | this.name = name || this.name; 494 | this.version = version || this.version; 495 | this.db = new IndexedDB({ 496 | name: name || this.name, 497 | version: version || this.version, 498 | db: null, 499 | stores: stores || this.stores 500 | }); 501 | } 502 | 503 | /** 504 | * 新增数据 505 | * 会自动添加addtime和addtimeformat字段 506 | * 会自动添加[mainKey](主键)字段 507 | * @param {String} storeName 表名 508 | * @param {Object} data 数据 509 | * @returns {Object} {code,data,msg} 510 | */ 511 | async addItem(storeName, data) { 512 | let mainKey = findStoreMainKey(this.stores, storeName); 513 | if (!mainKey) { 514 | return { 515 | code: -1, 516 | msg: "表不存在,请检查您的配置" 517 | }; 518 | } 519 | try { 520 | await this.db.openDB(storeName); 521 | } catch (err) { 522 | return { 523 | code: -1, 524 | msg: err 525 | }; 526 | } 527 | const now = new Date(); 528 | try { 529 | const res = await this.db.addData(storeName, _objectSpread2(_objectSpread2({ 530 | [mainKey]: guid() 531 | }, data), {}, { 532 | addtime: now.getTime(), 533 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 534 | })); 535 | this.db.closeDB(); 536 | return { 537 | code: 0, 538 | data: res 539 | }; 540 | } catch (err) { 541 | this.db.closeDB(); 542 | return { 543 | code: -1, 544 | msg: err 545 | }; 546 | } 547 | } 548 | 549 | /** 550 | * 批量新增数据 551 | * 会自动添加addtime和addtimeformat字段 552 | * 会自动添加[mainKey](主键)字段 553 | * @param {String} storeName 表名 554 | * @param {Array} list 数据列表 555 | * @returns {Object} {code,data,msg} 556 | */ 557 | async addBatch(storeName, list) { 558 | let mainKey = findStoreMainKey(this.stores, storeName); 559 | if (!mainKey) { 560 | return { 561 | code: -1, 562 | msg: "表不存在,请检查您的配置" 563 | }; 564 | } 565 | if (!Array.isArray(list) || list.length === 0) { 566 | return { 567 | code: -1, 568 | msg: "参数错误,批量添加参数应为一个非空列表" 569 | }; 570 | } 571 | try { 572 | await this.db.openDB(storeName); 573 | } catch (err) { 574 | return { 575 | code: -1, 576 | msg: err 577 | }; 578 | } 579 | const now = new Date(); 580 | let resList = []; 581 | for (let i = 0; i < list.length; i++) { 582 | const data = list[i]; 583 | try { 584 | const res = await this.db.addData(storeName, _objectSpread2(_objectSpread2({ 585 | [mainKey]: guid() 586 | }, data), {}, { 587 | addtime: now.getTime(), 588 | addtimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 589 | })); 590 | resList.push({ 591 | code: 0, 592 | origin: data, 593 | data: res 594 | }); 595 | } catch (err) { 596 | resList.push({ 597 | code: -1, 598 | origin: data, 599 | data: err 600 | }); 601 | } 602 | } 603 | this.db.closeDB(); 604 | return { 605 | code: 0, 606 | data: resList 607 | }; 608 | } 609 | 610 | /** 611 | * 修改数据 612 | * 会自动添加updatetime和updatetimeformat 613 | * @param {String} storeName 表名 614 | * @param {Object} data 数据 615 | * @returns {Object} {code,data,msg} 616 | */ 617 | async updateItem(storeName, data) { 618 | let mainKey = findStoreMainKey(this.stores, storeName); 619 | if (!mainKey) { 620 | return { 621 | code: -1, 622 | msg: "表不存在,请检查您的配置" 623 | }; 624 | } 625 | try { 626 | await this.db.openDB(storeName); 627 | } catch (err) { 628 | return { 629 | code: -1, 630 | msg: err 631 | }; 632 | } 633 | const now = new Date(); 634 | try { 635 | const res = await this.db.updateDB(storeName, _objectSpread2(_objectSpread2({}, data), {}, { 636 | updatetime: now.getTime(), 637 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 638 | })); 639 | this.db.closeDB(); 640 | return { 641 | code: 0, 642 | data: res 643 | }; 644 | } catch (err) { 645 | this.db.closeDB(); 646 | return { 647 | code: -1, 648 | msg: err 649 | }; 650 | } 651 | } 652 | 653 | /** 654 | * 批量修改数据 655 | * 会自动添加updatetime和updatetimeformat 656 | * @param {String} storeName 表名 657 | * @param {Array} list 数据列表 658 | * @returns {Object} {code,data,msg} 659 | */ 660 | async updateBatch(storeName, list) { 661 | let mainKey = findStoreMainKey(this.stores, storeName); 662 | if (!mainKey) { 663 | return { 664 | code: -1, 665 | msg: "表不存在,请检查您的配置" 666 | }; 667 | } 668 | if (!Array.isArray(list) || list.length === 0) { 669 | return { 670 | code: -1, 671 | msg: "参数错误,批量添加参数应为一个非空列表" 672 | }; 673 | } 674 | try { 675 | await this.db.openDB(storeName); 676 | } catch (err) { 677 | return { 678 | code: -1, 679 | msg: err 680 | }; 681 | } 682 | const now = new Date(); 683 | const resList = []; 684 | for (let i = 0; i < list.length; i++) { 685 | const data = list[i]; 686 | try { 687 | const res = await this.db.updateDB(storeName, _objectSpread2(_objectSpread2({}, data), {}, { 688 | updatetime: now.getTime(), 689 | updatetimeformat: now.Format("yyyy-MM-dd hh:mm:ss") 690 | })); 691 | resList.push({ 692 | code: 0, 693 | data: res 694 | }); 695 | } catch (err) { 696 | resList.push({ 697 | code: -1, 698 | msg: err 699 | }); 700 | } 701 | } 702 | this.db.closeDB(); 703 | return { 704 | code: 0, 705 | data: resList 706 | }; 707 | } 708 | 709 | /** 710 | * 删除数据 711 | * @param {String} storeName 表名 712 | * @param {String} id 数据id 713 | * @returns {Object} {code,data,msg} 714 | */ 715 | async delItem(storeName, id) { 716 | let mainKey = findStoreMainKey(this.stores, storeName); 717 | if (!mainKey) { 718 | return { 719 | code: -1, 720 | msg: "表不存在,请检查您的配置" 721 | }; 722 | } 723 | try { 724 | await this.db.openDB(storeName); 725 | } catch (err) { 726 | return { 727 | code: -1, 728 | msg: err 729 | }; 730 | } 731 | try { 732 | const res = await this.db.deleteDB(storeName, id); 733 | this.db.closeDB(); 734 | return { 735 | code: 0, 736 | data: res 737 | }; 738 | } catch (err) { 739 | this.db.closeDB(); 740 | return { 741 | code: -1, 742 | msg: err 743 | }; 744 | } 745 | } 746 | 747 | /** 748 | * 批量删除数据 749 | * @param {String} storeName 表名 750 | * @param {Array} ids id列表 751 | * @returns {Object} {code,data,msg} 752 | */ 753 | async delBatch(storeName, ids) { 754 | let mainKey = findStoreMainKey(this.stores, storeName); 755 | if (!mainKey) { 756 | return { 757 | code: -1, 758 | msg: "表不存在,请检查您的配置" 759 | }; 760 | } 761 | if (!Array.isArray(ids) || ids.length === 0) { 762 | return { 763 | code: -1, 764 | msg: "参数错误,批量添加参数应为一个非空列表" 765 | }; 766 | } 767 | try { 768 | await this.db.openDB(storeName); 769 | } catch (err) { 770 | return { 771 | code: -1, 772 | msg: err 773 | }; 774 | } 775 | const resList = []; 776 | for (let i = 0; i < ids.length; i++) { 777 | try { 778 | const res = await this.db.deleteDB(storeName, ids[i]); 779 | resList.push({ 780 | code: 0, 781 | data: res 782 | }); 783 | } catch (err) { 784 | resList.push({ 785 | code: -1, 786 | msg: err 787 | }); 788 | } 789 | } 790 | this.db.closeDB(); 791 | return { 792 | code: 0, 793 | data: resList 794 | }; 795 | } 796 | 797 | /** 798 | * 查询表中所有数据 799 | * @param {String} storeName 表名 800 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 801 | * @returns {Object} {code,data,msg} 802 | */ 803 | async getAll(storeName) { 804 | let sortParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; 805 | // 查询所有,不分页 806 | let mainKey = findStoreMainKey(this.stores, storeName); 807 | if (!mainKey) { 808 | return { 809 | code: -1, 810 | msg: "表不存在,请检查您的配置" 811 | }; 812 | } 813 | try { 814 | await this.db.openDB(storeName); 815 | } catch (err) { 816 | return { 817 | code: -1, 818 | msg: err 819 | }; 820 | } 821 | try { 822 | let list = await this.db.cursorGetData(storeName); 823 | list = listSort(list, sortParams); 824 | this.db.closeDB(); 825 | return { 826 | code: 0, 827 | data: list 828 | }; 829 | } catch (err) { 830 | this.db.closeDB(); 831 | return { 832 | code: -1, 833 | msg: err 834 | }; 835 | } 836 | } 837 | 838 | /** 839 | * 条件查询数据 840 | * @param {String} storeName 表名 841 | * @param {Object} params 查询参数 842 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 843 | * @returns {Object} {code,data,msg} 844 | */ 845 | async queryAll(storeName, params) { 846 | let sortParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; 847 | // 条件查询,不分页 848 | let mainKey = findStoreMainKey(this.stores, storeName); 849 | if (!mainKey) { 850 | return { 851 | code: -1, 852 | msg: "表不存在,请检查您的配置" 853 | }; 854 | } 855 | try { 856 | await this.db.openDB(storeName); 857 | } catch (err) { 858 | console.error(err); 859 | return; 860 | } 861 | const keyLen = Object.keys(params || {}).length; 862 | try { 863 | let list; 864 | if (keyLen > 0) { 865 | list = await this.db.cursorGetDataByIndex(storeName, params); 866 | } else { 867 | list = await this.db.cursorGetData(storeName); 868 | } 869 | list = listSort(list, sortParams); 870 | this.db.closeDB(); 871 | return { 872 | code: 0, 873 | data: list 874 | }; 875 | } catch (err) { 876 | this.db.closeDB(); 877 | return { 878 | code: -1, 879 | msg: err 880 | }; 881 | } 882 | } 883 | 884 | /** 885 | * 条件查询分页数据 886 | * @param {String} storeName 表名 887 | * @param {Object} params 查询参数 888 | * @param {Array} sortParams 排序参数[{key,type}],默认有一个{key:'addtime',type:'desc'}参数 889 | * @param {Number} page 当前页 890 | * @param {Number} pagesize 每页的项目数 891 | * @returns {Object} {code,data,msg} 892 | */ 893 | async queryPage(storeName, params, sortParams) { 894 | let page = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; 895 | let pagesize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10; 896 | // 条件查询,分页 897 | let mainKey = findStoreMainKey(this.stores, storeName); 898 | if (!mainKey) { 899 | return { 900 | code: -1, 901 | msg: "表不存在,请检查您的配置" 902 | }; 903 | } 904 | try { 905 | await this.db.openDB(storeName); 906 | } catch (err) { 907 | return { 908 | code: -1, 909 | msg: err 910 | }; 911 | } 912 | const keyLen = Object.keys(params || {}).length; 913 | try { 914 | let list; 915 | if (keyLen > 0) { 916 | list = await this.db.cursorGetDataByIndex(storeName, params); 917 | } else { 918 | list = await this.db.cursorGetData(storeName); 919 | } 920 | list = listSort(list, sortParams); 921 | this.db.closeDB(); 922 | return { 923 | code: 0, 924 | data: { 925 | total: list.length, 926 | list: list.slice((page - 1) * pagesize, page * pagesize) 927 | } 928 | }; 929 | } catch (err) { 930 | this.db.closeDB(); 931 | return { 932 | code: -1, 933 | msg: err 934 | }; 935 | } 936 | } 937 | } 938 | 939 | return IndexdbStore; 940 | 941 | })); 942 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@ampproject/remapping@^2.2.0": 6 | version "2.2.1" 7 | resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" 8 | integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== 9 | dependencies: 10 | "@jridgewell/gen-mapping" "^0.3.0" 11 | "@jridgewell/trace-mapping" "^0.3.9" 12 | 13 | "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.21.4": 14 | version "7.21.4" 15 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" 16 | integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== 17 | dependencies: 18 | "@babel/highlight" "^7.18.6" 19 | 20 | "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.21.4": 21 | version "7.21.4" 22 | resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.4.tgz#457ffe647c480dff59c2be092fc3acf71195c87f" 23 | integrity sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g== 24 | 25 | "@babel/core@^7.21.4": 26 | version "7.21.4" 27 | resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.4.tgz#c6dc73242507b8e2a27fd13a9c1814f9fa34a659" 28 | integrity sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA== 29 | dependencies: 30 | "@ampproject/remapping" "^2.2.0" 31 | "@babel/code-frame" "^7.21.4" 32 | "@babel/generator" "^7.21.4" 33 | "@babel/helper-compilation-targets" "^7.21.4" 34 | "@babel/helper-module-transforms" "^7.21.2" 35 | "@babel/helpers" "^7.21.0" 36 | "@babel/parser" "^7.21.4" 37 | "@babel/template" "^7.20.7" 38 | "@babel/traverse" "^7.21.4" 39 | "@babel/types" "^7.21.4" 40 | convert-source-map "^1.7.0" 41 | debug "^4.1.0" 42 | gensync "^1.0.0-beta.2" 43 | json5 "^2.2.2" 44 | semver "^6.3.0" 45 | 46 | "@babel/generator@^7.21.4": 47 | version "7.21.4" 48 | resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.4.tgz#64a94b7448989f421f919d5239ef553b37bb26bc" 49 | integrity sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA== 50 | dependencies: 51 | "@babel/types" "^7.21.4" 52 | "@jridgewell/gen-mapping" "^0.3.2" 53 | "@jridgewell/trace-mapping" "^0.3.17" 54 | jsesc "^2.5.1" 55 | 56 | "@babel/helper-annotate-as-pure@^7.18.6": 57 | version "7.18.6" 58 | resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" 59 | integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== 60 | dependencies: 61 | "@babel/types" "^7.18.6" 62 | 63 | "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": 64 | version "7.18.9" 65 | resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" 66 | integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== 67 | dependencies: 68 | "@babel/helper-explode-assignable-expression" "^7.18.6" 69 | "@babel/types" "^7.18.9" 70 | 71 | "@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.21.4": 72 | version "7.21.4" 73 | resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz#770cd1ce0889097ceacb99418ee6934ef0572656" 74 | integrity sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg== 75 | dependencies: 76 | "@babel/compat-data" "^7.21.4" 77 | "@babel/helper-validator-option" "^7.21.0" 78 | browserslist "^4.21.3" 79 | lru-cache "^5.1.1" 80 | semver "^6.3.0" 81 | 82 | "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": 83 | version "7.21.4" 84 | resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz#3a017163dc3c2ba7deb9a7950849a9586ea24c18" 85 | integrity sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q== 86 | dependencies: 87 | "@babel/helper-annotate-as-pure" "^7.18.6" 88 | "@babel/helper-environment-visitor" "^7.18.9" 89 | "@babel/helper-function-name" "^7.21.0" 90 | "@babel/helper-member-expression-to-functions" "^7.21.0" 91 | "@babel/helper-optimise-call-expression" "^7.18.6" 92 | "@babel/helper-replace-supers" "^7.20.7" 93 | "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" 94 | "@babel/helper-split-export-declaration" "^7.18.6" 95 | 96 | "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": 97 | version "7.21.4" 98 | resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.4.tgz#40411a8ab134258ad2cf3a3d987ec6aa0723cee5" 99 | integrity sha512-M00OuhU+0GyZ5iBBN9czjugzWrEq2vDpf/zCYHxxf93ul/Q5rv+a5h+/+0WnI1AebHNVtl5bFV0qsJoH23DbfA== 100 | dependencies: 101 | "@babel/helper-annotate-as-pure" "^7.18.6" 102 | regexpu-core "^5.3.1" 103 | 104 | "@babel/helper-define-polyfill-provider@^0.3.3": 105 | version "0.3.3" 106 | resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" 107 | integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== 108 | dependencies: 109 | "@babel/helper-compilation-targets" "^7.17.7" 110 | "@babel/helper-plugin-utils" "^7.16.7" 111 | debug "^4.1.1" 112 | lodash.debounce "^4.0.8" 113 | resolve "^1.14.2" 114 | semver "^6.1.2" 115 | 116 | "@babel/helper-environment-visitor@^7.18.9": 117 | version "7.18.9" 118 | resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" 119 | integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== 120 | 121 | "@babel/helper-explode-assignable-expression@^7.18.6": 122 | version "7.18.6" 123 | resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" 124 | integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== 125 | dependencies: 126 | "@babel/types" "^7.18.6" 127 | 128 | "@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": 129 | version "7.21.0" 130 | resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" 131 | integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== 132 | dependencies: 133 | "@babel/template" "^7.20.7" 134 | "@babel/types" "^7.21.0" 135 | 136 | "@babel/helper-hoist-variables@^7.18.6": 137 | version "7.18.6" 138 | resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" 139 | integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== 140 | dependencies: 141 | "@babel/types" "^7.18.6" 142 | 143 | "@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": 144 | version "7.21.0" 145 | resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" 146 | integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== 147 | dependencies: 148 | "@babel/types" "^7.21.0" 149 | 150 | "@babel/helper-module-imports@^7.18.6": 151 | version "7.21.4" 152 | resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" 153 | integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== 154 | dependencies: 155 | "@babel/types" "^7.21.4" 156 | 157 | "@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": 158 | version "7.21.2" 159 | resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" 160 | integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== 161 | dependencies: 162 | "@babel/helper-environment-visitor" "^7.18.9" 163 | "@babel/helper-module-imports" "^7.18.6" 164 | "@babel/helper-simple-access" "^7.20.2" 165 | "@babel/helper-split-export-declaration" "^7.18.6" 166 | "@babel/helper-validator-identifier" "^7.19.1" 167 | "@babel/template" "^7.20.7" 168 | "@babel/traverse" "^7.21.2" 169 | "@babel/types" "^7.21.2" 170 | 171 | "@babel/helper-optimise-call-expression@^7.18.6": 172 | version "7.18.6" 173 | resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" 174 | integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== 175 | dependencies: 176 | "@babel/types" "^7.18.6" 177 | 178 | "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": 179 | version "7.20.2" 180 | resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" 181 | integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== 182 | 183 | "@babel/helper-remap-async-to-generator@^7.18.9": 184 | version "7.18.9" 185 | resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" 186 | integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== 187 | dependencies: 188 | "@babel/helper-annotate-as-pure" "^7.18.6" 189 | "@babel/helper-environment-visitor" "^7.18.9" 190 | "@babel/helper-wrap-function" "^7.18.9" 191 | "@babel/types" "^7.18.9" 192 | 193 | "@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": 194 | version "7.20.7" 195 | resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" 196 | integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== 197 | dependencies: 198 | "@babel/helper-environment-visitor" "^7.18.9" 199 | "@babel/helper-member-expression-to-functions" "^7.20.7" 200 | "@babel/helper-optimise-call-expression" "^7.18.6" 201 | "@babel/template" "^7.20.7" 202 | "@babel/traverse" "^7.20.7" 203 | "@babel/types" "^7.20.7" 204 | 205 | "@babel/helper-simple-access@^7.20.2": 206 | version "7.20.2" 207 | resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" 208 | integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== 209 | dependencies: 210 | "@babel/types" "^7.20.2" 211 | 212 | "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": 213 | version "7.20.0" 214 | resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" 215 | integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== 216 | dependencies: 217 | "@babel/types" "^7.20.0" 218 | 219 | "@babel/helper-split-export-declaration@^7.18.6": 220 | version "7.18.6" 221 | resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" 222 | integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== 223 | dependencies: 224 | "@babel/types" "^7.18.6" 225 | 226 | "@babel/helper-string-parser@^7.19.4": 227 | version "7.19.4" 228 | resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" 229 | integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== 230 | 231 | "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": 232 | version "7.19.1" 233 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" 234 | integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== 235 | 236 | "@babel/helper-validator-option@^7.21.0": 237 | version "7.21.0" 238 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" 239 | integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== 240 | 241 | "@babel/helper-wrap-function@^7.18.9": 242 | version "7.20.5" 243 | resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" 244 | integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== 245 | dependencies: 246 | "@babel/helper-function-name" "^7.19.0" 247 | "@babel/template" "^7.18.10" 248 | "@babel/traverse" "^7.20.5" 249 | "@babel/types" "^7.20.5" 250 | 251 | "@babel/helpers@^7.21.0": 252 | version "7.21.0" 253 | resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" 254 | integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== 255 | dependencies: 256 | "@babel/template" "^7.20.7" 257 | "@babel/traverse" "^7.21.0" 258 | "@babel/types" "^7.21.0" 259 | 260 | "@babel/highlight@^7.18.6": 261 | version "7.18.6" 262 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" 263 | integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== 264 | dependencies: 265 | "@babel/helper-validator-identifier" "^7.18.6" 266 | chalk "^2.0.0" 267 | js-tokens "^4.0.0" 268 | 269 | "@babel/parser@^7.20.7", "@babel/parser@^7.21.4": 270 | version "7.21.4" 271 | resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.4.tgz#94003fdfc520bbe2875d4ae557b43ddb6d880f17" 272 | integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== 273 | 274 | "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": 275 | version "7.18.6" 276 | resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" 277 | integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== 278 | dependencies: 279 | "@babel/helper-plugin-utils" "^7.18.6" 280 | 281 | "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.20.7": 282 | version "7.20.7" 283 | resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" 284 | integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== 285 | dependencies: 286 | "@babel/helper-plugin-utils" "^7.20.2" 287 | "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" 288 | "@babel/plugin-proposal-optional-chaining" "^7.20.7" 289 | 290 | "@babel/plugin-proposal-async-generator-functions@^7.20.7": 291 | version "7.20.7" 292 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" 293 | integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== 294 | dependencies: 295 | "@babel/helper-environment-visitor" "^7.18.9" 296 | "@babel/helper-plugin-utils" "^7.20.2" 297 | "@babel/helper-remap-async-to-generator" "^7.18.9" 298 | "@babel/plugin-syntax-async-generators" "^7.8.4" 299 | 300 | "@babel/plugin-proposal-class-properties@^7.18.6": 301 | version "7.18.6" 302 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" 303 | integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== 304 | dependencies: 305 | "@babel/helper-create-class-features-plugin" "^7.18.6" 306 | "@babel/helper-plugin-utils" "^7.18.6" 307 | 308 | "@babel/plugin-proposal-class-static-block@^7.21.0": 309 | version "7.21.0" 310 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" 311 | integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== 312 | dependencies: 313 | "@babel/helper-create-class-features-plugin" "^7.21.0" 314 | "@babel/helper-plugin-utils" "^7.20.2" 315 | "@babel/plugin-syntax-class-static-block" "^7.14.5" 316 | 317 | "@babel/plugin-proposal-dynamic-import@^7.18.6": 318 | version "7.18.6" 319 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" 320 | integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== 321 | dependencies: 322 | "@babel/helper-plugin-utils" "^7.18.6" 323 | "@babel/plugin-syntax-dynamic-import" "^7.8.3" 324 | 325 | "@babel/plugin-proposal-export-namespace-from@^7.18.9": 326 | version "7.18.9" 327 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" 328 | integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== 329 | dependencies: 330 | "@babel/helper-plugin-utils" "^7.18.9" 331 | "@babel/plugin-syntax-export-namespace-from" "^7.8.3" 332 | 333 | "@babel/plugin-proposal-json-strings@^7.18.6": 334 | version "7.18.6" 335 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" 336 | integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== 337 | dependencies: 338 | "@babel/helper-plugin-utils" "^7.18.6" 339 | "@babel/plugin-syntax-json-strings" "^7.8.3" 340 | 341 | "@babel/plugin-proposal-logical-assignment-operators@^7.20.7": 342 | version "7.20.7" 343 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" 344 | integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== 345 | dependencies: 346 | "@babel/helper-plugin-utils" "^7.20.2" 347 | "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" 348 | 349 | "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": 350 | version "7.18.6" 351 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" 352 | integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== 353 | dependencies: 354 | "@babel/helper-plugin-utils" "^7.18.6" 355 | "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" 356 | 357 | "@babel/plugin-proposal-numeric-separator@^7.18.6": 358 | version "7.18.6" 359 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" 360 | integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== 361 | dependencies: 362 | "@babel/helper-plugin-utils" "^7.18.6" 363 | "@babel/plugin-syntax-numeric-separator" "^7.10.4" 364 | 365 | "@babel/plugin-proposal-object-rest-spread@^7.20.7": 366 | version "7.20.7" 367 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" 368 | integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== 369 | dependencies: 370 | "@babel/compat-data" "^7.20.5" 371 | "@babel/helper-compilation-targets" "^7.20.7" 372 | "@babel/helper-plugin-utils" "^7.20.2" 373 | "@babel/plugin-syntax-object-rest-spread" "^7.8.3" 374 | "@babel/plugin-transform-parameters" "^7.20.7" 375 | 376 | "@babel/plugin-proposal-optional-catch-binding@^7.18.6": 377 | version "7.18.6" 378 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" 379 | integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== 380 | dependencies: 381 | "@babel/helper-plugin-utils" "^7.18.6" 382 | "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" 383 | 384 | "@babel/plugin-proposal-optional-chaining@^7.20.7", "@babel/plugin-proposal-optional-chaining@^7.21.0": 385 | version "7.21.0" 386 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" 387 | integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== 388 | dependencies: 389 | "@babel/helper-plugin-utils" "^7.20.2" 390 | "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" 391 | "@babel/plugin-syntax-optional-chaining" "^7.8.3" 392 | 393 | "@babel/plugin-proposal-private-methods@^7.18.6": 394 | version "7.18.6" 395 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" 396 | integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== 397 | dependencies: 398 | "@babel/helper-create-class-features-plugin" "^7.18.6" 399 | "@babel/helper-plugin-utils" "^7.18.6" 400 | 401 | "@babel/plugin-proposal-private-property-in-object@^7.21.0": 402 | version "7.21.0" 403 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" 404 | integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== 405 | dependencies: 406 | "@babel/helper-annotate-as-pure" "^7.18.6" 407 | "@babel/helper-create-class-features-plugin" "^7.21.0" 408 | "@babel/helper-plugin-utils" "^7.20.2" 409 | "@babel/plugin-syntax-private-property-in-object" "^7.14.5" 410 | 411 | "@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": 412 | version "7.18.6" 413 | resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" 414 | integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== 415 | dependencies: 416 | "@babel/helper-create-regexp-features-plugin" "^7.18.6" 417 | "@babel/helper-plugin-utils" "^7.18.6" 418 | 419 | "@babel/plugin-syntax-async-generators@^7.8.4": 420 | version "7.8.4" 421 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" 422 | integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== 423 | dependencies: 424 | "@babel/helper-plugin-utils" "^7.8.0" 425 | 426 | "@babel/plugin-syntax-class-properties@^7.12.13": 427 | version "7.12.13" 428 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" 429 | integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== 430 | dependencies: 431 | "@babel/helper-plugin-utils" "^7.12.13" 432 | 433 | "@babel/plugin-syntax-class-static-block@^7.14.5": 434 | version "7.14.5" 435 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" 436 | integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== 437 | dependencies: 438 | "@babel/helper-plugin-utils" "^7.14.5" 439 | 440 | "@babel/plugin-syntax-dynamic-import@^7.8.3": 441 | version "7.8.3" 442 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" 443 | integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== 444 | dependencies: 445 | "@babel/helper-plugin-utils" "^7.8.0" 446 | 447 | "@babel/plugin-syntax-export-namespace-from@^7.8.3": 448 | version "7.8.3" 449 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" 450 | integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== 451 | dependencies: 452 | "@babel/helper-plugin-utils" "^7.8.3" 453 | 454 | "@babel/plugin-syntax-import-assertions@^7.20.0": 455 | version "7.20.0" 456 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" 457 | integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== 458 | dependencies: 459 | "@babel/helper-plugin-utils" "^7.19.0" 460 | 461 | "@babel/plugin-syntax-json-strings@^7.8.3": 462 | version "7.8.3" 463 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" 464 | integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== 465 | dependencies: 466 | "@babel/helper-plugin-utils" "^7.8.0" 467 | 468 | "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": 469 | version "7.10.4" 470 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" 471 | integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== 472 | dependencies: 473 | "@babel/helper-plugin-utils" "^7.10.4" 474 | 475 | "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": 476 | version "7.8.3" 477 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" 478 | integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== 479 | dependencies: 480 | "@babel/helper-plugin-utils" "^7.8.0" 481 | 482 | "@babel/plugin-syntax-numeric-separator@^7.10.4": 483 | version "7.10.4" 484 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" 485 | integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== 486 | dependencies: 487 | "@babel/helper-plugin-utils" "^7.10.4" 488 | 489 | "@babel/plugin-syntax-object-rest-spread@^7.8.3": 490 | version "7.8.3" 491 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" 492 | integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== 493 | dependencies: 494 | "@babel/helper-plugin-utils" "^7.8.0" 495 | 496 | "@babel/plugin-syntax-optional-catch-binding@^7.8.3": 497 | version "7.8.3" 498 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" 499 | integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== 500 | dependencies: 501 | "@babel/helper-plugin-utils" "^7.8.0" 502 | 503 | "@babel/plugin-syntax-optional-chaining@^7.8.3": 504 | version "7.8.3" 505 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" 506 | integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== 507 | dependencies: 508 | "@babel/helper-plugin-utils" "^7.8.0" 509 | 510 | "@babel/plugin-syntax-private-property-in-object@^7.14.5": 511 | version "7.14.5" 512 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" 513 | integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== 514 | dependencies: 515 | "@babel/helper-plugin-utils" "^7.14.5" 516 | 517 | "@babel/plugin-syntax-top-level-await@^7.14.5": 518 | version "7.14.5" 519 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" 520 | integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== 521 | dependencies: 522 | "@babel/helper-plugin-utils" "^7.14.5" 523 | 524 | "@babel/plugin-transform-arrow-functions@^7.20.7": 525 | version "7.20.7" 526 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" 527 | integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== 528 | dependencies: 529 | "@babel/helper-plugin-utils" "^7.20.2" 530 | 531 | "@babel/plugin-transform-async-to-generator@^7.20.7": 532 | version "7.20.7" 533 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" 534 | integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== 535 | dependencies: 536 | "@babel/helper-module-imports" "^7.18.6" 537 | "@babel/helper-plugin-utils" "^7.20.2" 538 | "@babel/helper-remap-async-to-generator" "^7.18.9" 539 | 540 | "@babel/plugin-transform-block-scoped-functions@^7.18.6": 541 | version "7.18.6" 542 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" 543 | integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== 544 | dependencies: 545 | "@babel/helper-plugin-utils" "^7.18.6" 546 | 547 | "@babel/plugin-transform-block-scoping@^7.21.0": 548 | version "7.21.0" 549 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" 550 | integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== 551 | dependencies: 552 | "@babel/helper-plugin-utils" "^7.20.2" 553 | 554 | "@babel/plugin-transform-classes@^7.21.0": 555 | version "7.21.0" 556 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" 557 | integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== 558 | dependencies: 559 | "@babel/helper-annotate-as-pure" "^7.18.6" 560 | "@babel/helper-compilation-targets" "^7.20.7" 561 | "@babel/helper-environment-visitor" "^7.18.9" 562 | "@babel/helper-function-name" "^7.21.0" 563 | "@babel/helper-optimise-call-expression" "^7.18.6" 564 | "@babel/helper-plugin-utils" "^7.20.2" 565 | "@babel/helper-replace-supers" "^7.20.7" 566 | "@babel/helper-split-export-declaration" "^7.18.6" 567 | globals "^11.1.0" 568 | 569 | "@babel/plugin-transform-computed-properties@^7.20.7": 570 | version "7.20.7" 571 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" 572 | integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== 573 | dependencies: 574 | "@babel/helper-plugin-utils" "^7.20.2" 575 | "@babel/template" "^7.20.7" 576 | 577 | "@babel/plugin-transform-destructuring@^7.21.3": 578 | version "7.21.3" 579 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" 580 | integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== 581 | dependencies: 582 | "@babel/helper-plugin-utils" "^7.20.2" 583 | 584 | "@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": 585 | version "7.18.6" 586 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" 587 | integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== 588 | dependencies: 589 | "@babel/helper-create-regexp-features-plugin" "^7.18.6" 590 | "@babel/helper-plugin-utils" "^7.18.6" 591 | 592 | "@babel/plugin-transform-duplicate-keys@^7.18.9": 593 | version "7.18.9" 594 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" 595 | integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== 596 | dependencies: 597 | "@babel/helper-plugin-utils" "^7.18.9" 598 | 599 | "@babel/plugin-transform-exponentiation-operator@^7.18.6": 600 | version "7.18.6" 601 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" 602 | integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== 603 | dependencies: 604 | "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" 605 | "@babel/helper-plugin-utils" "^7.18.6" 606 | 607 | "@babel/plugin-transform-for-of@^7.21.0": 608 | version "7.21.0" 609 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" 610 | integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== 611 | dependencies: 612 | "@babel/helper-plugin-utils" "^7.20.2" 613 | 614 | "@babel/plugin-transform-function-name@^7.18.9": 615 | version "7.18.9" 616 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" 617 | integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== 618 | dependencies: 619 | "@babel/helper-compilation-targets" "^7.18.9" 620 | "@babel/helper-function-name" "^7.18.9" 621 | "@babel/helper-plugin-utils" "^7.18.9" 622 | 623 | "@babel/plugin-transform-literals@^7.18.9": 624 | version "7.18.9" 625 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" 626 | integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== 627 | dependencies: 628 | "@babel/helper-plugin-utils" "^7.18.9" 629 | 630 | "@babel/plugin-transform-member-expression-literals@^7.18.6": 631 | version "7.18.6" 632 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" 633 | integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== 634 | dependencies: 635 | "@babel/helper-plugin-utils" "^7.18.6" 636 | 637 | "@babel/plugin-transform-modules-amd@^7.20.11": 638 | version "7.20.11" 639 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" 640 | integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== 641 | dependencies: 642 | "@babel/helper-module-transforms" "^7.20.11" 643 | "@babel/helper-plugin-utils" "^7.20.2" 644 | 645 | "@babel/plugin-transform-modules-commonjs@^7.21.2": 646 | version "7.21.2" 647 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" 648 | integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== 649 | dependencies: 650 | "@babel/helper-module-transforms" "^7.21.2" 651 | "@babel/helper-plugin-utils" "^7.20.2" 652 | "@babel/helper-simple-access" "^7.20.2" 653 | 654 | "@babel/plugin-transform-modules-systemjs@^7.20.11": 655 | version "7.20.11" 656 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" 657 | integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== 658 | dependencies: 659 | "@babel/helper-hoist-variables" "^7.18.6" 660 | "@babel/helper-module-transforms" "^7.20.11" 661 | "@babel/helper-plugin-utils" "^7.20.2" 662 | "@babel/helper-validator-identifier" "^7.19.1" 663 | 664 | "@babel/plugin-transform-modules-umd@^7.18.6": 665 | version "7.18.6" 666 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" 667 | integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== 668 | dependencies: 669 | "@babel/helper-module-transforms" "^7.18.6" 670 | "@babel/helper-plugin-utils" "^7.18.6" 671 | 672 | "@babel/plugin-transform-named-capturing-groups-regex@^7.20.5": 673 | version "7.20.5" 674 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" 675 | integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== 676 | dependencies: 677 | "@babel/helper-create-regexp-features-plugin" "^7.20.5" 678 | "@babel/helper-plugin-utils" "^7.20.2" 679 | 680 | "@babel/plugin-transform-new-target@^7.18.6": 681 | version "7.18.6" 682 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" 683 | integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== 684 | dependencies: 685 | "@babel/helper-plugin-utils" "^7.18.6" 686 | 687 | "@babel/plugin-transform-object-super@^7.18.6": 688 | version "7.18.6" 689 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" 690 | integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== 691 | dependencies: 692 | "@babel/helper-plugin-utils" "^7.18.6" 693 | "@babel/helper-replace-supers" "^7.18.6" 694 | 695 | "@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.21.3": 696 | version "7.21.3" 697 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" 698 | integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== 699 | dependencies: 700 | "@babel/helper-plugin-utils" "^7.20.2" 701 | 702 | "@babel/plugin-transform-property-literals@^7.18.6": 703 | version "7.18.6" 704 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" 705 | integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== 706 | dependencies: 707 | "@babel/helper-plugin-utils" "^7.18.6" 708 | 709 | "@babel/plugin-transform-regenerator@^7.20.5": 710 | version "7.20.5" 711 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" 712 | integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== 713 | dependencies: 714 | "@babel/helper-plugin-utils" "^7.20.2" 715 | regenerator-transform "^0.15.1" 716 | 717 | "@babel/plugin-transform-reserved-words@^7.18.6": 718 | version "7.18.6" 719 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" 720 | integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== 721 | dependencies: 722 | "@babel/helper-plugin-utils" "^7.18.6" 723 | 724 | "@babel/plugin-transform-shorthand-properties@^7.18.6": 725 | version "7.18.6" 726 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" 727 | integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== 728 | dependencies: 729 | "@babel/helper-plugin-utils" "^7.18.6" 730 | 731 | "@babel/plugin-transform-spread@^7.20.7": 732 | version "7.20.7" 733 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" 734 | integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== 735 | dependencies: 736 | "@babel/helper-plugin-utils" "^7.20.2" 737 | "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" 738 | 739 | "@babel/plugin-transform-sticky-regex@^7.18.6": 740 | version "7.18.6" 741 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" 742 | integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== 743 | dependencies: 744 | "@babel/helper-plugin-utils" "^7.18.6" 745 | 746 | "@babel/plugin-transform-template-literals@^7.18.9": 747 | version "7.18.9" 748 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" 749 | integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== 750 | dependencies: 751 | "@babel/helper-plugin-utils" "^7.18.9" 752 | 753 | "@babel/plugin-transform-typeof-symbol@^7.18.9": 754 | version "7.18.9" 755 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" 756 | integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== 757 | dependencies: 758 | "@babel/helper-plugin-utils" "^7.18.9" 759 | 760 | "@babel/plugin-transform-unicode-escapes@^7.18.10": 761 | version "7.18.10" 762 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" 763 | integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== 764 | dependencies: 765 | "@babel/helper-plugin-utils" "^7.18.9" 766 | 767 | "@babel/plugin-transform-unicode-regex@^7.18.6": 768 | version "7.18.6" 769 | resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" 770 | integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== 771 | dependencies: 772 | "@babel/helper-create-regexp-features-plugin" "^7.18.6" 773 | "@babel/helper-plugin-utils" "^7.18.6" 774 | 775 | "@babel/preset-env@^7.21.4": 776 | version "7.21.4" 777 | resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.4.tgz#a952482e634a8dd8271a3fe5459a16eb10739c58" 778 | integrity sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw== 779 | dependencies: 780 | "@babel/compat-data" "^7.21.4" 781 | "@babel/helper-compilation-targets" "^7.21.4" 782 | "@babel/helper-plugin-utils" "^7.20.2" 783 | "@babel/helper-validator-option" "^7.21.0" 784 | "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" 785 | "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.20.7" 786 | "@babel/plugin-proposal-async-generator-functions" "^7.20.7" 787 | "@babel/plugin-proposal-class-properties" "^7.18.6" 788 | "@babel/plugin-proposal-class-static-block" "^7.21.0" 789 | "@babel/plugin-proposal-dynamic-import" "^7.18.6" 790 | "@babel/plugin-proposal-export-namespace-from" "^7.18.9" 791 | "@babel/plugin-proposal-json-strings" "^7.18.6" 792 | "@babel/plugin-proposal-logical-assignment-operators" "^7.20.7" 793 | "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" 794 | "@babel/plugin-proposal-numeric-separator" "^7.18.6" 795 | "@babel/plugin-proposal-object-rest-spread" "^7.20.7" 796 | "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" 797 | "@babel/plugin-proposal-optional-chaining" "^7.21.0" 798 | "@babel/plugin-proposal-private-methods" "^7.18.6" 799 | "@babel/plugin-proposal-private-property-in-object" "^7.21.0" 800 | "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" 801 | "@babel/plugin-syntax-async-generators" "^7.8.4" 802 | "@babel/plugin-syntax-class-properties" "^7.12.13" 803 | "@babel/plugin-syntax-class-static-block" "^7.14.5" 804 | "@babel/plugin-syntax-dynamic-import" "^7.8.3" 805 | "@babel/plugin-syntax-export-namespace-from" "^7.8.3" 806 | "@babel/plugin-syntax-import-assertions" "^7.20.0" 807 | "@babel/plugin-syntax-json-strings" "^7.8.3" 808 | "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" 809 | "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" 810 | "@babel/plugin-syntax-numeric-separator" "^7.10.4" 811 | "@babel/plugin-syntax-object-rest-spread" "^7.8.3" 812 | "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" 813 | "@babel/plugin-syntax-optional-chaining" "^7.8.3" 814 | "@babel/plugin-syntax-private-property-in-object" "^7.14.5" 815 | "@babel/plugin-syntax-top-level-await" "^7.14.5" 816 | "@babel/plugin-transform-arrow-functions" "^7.20.7" 817 | "@babel/plugin-transform-async-to-generator" "^7.20.7" 818 | "@babel/plugin-transform-block-scoped-functions" "^7.18.6" 819 | "@babel/plugin-transform-block-scoping" "^7.21.0" 820 | "@babel/plugin-transform-classes" "^7.21.0" 821 | "@babel/plugin-transform-computed-properties" "^7.20.7" 822 | "@babel/plugin-transform-destructuring" "^7.21.3" 823 | "@babel/plugin-transform-dotall-regex" "^7.18.6" 824 | "@babel/plugin-transform-duplicate-keys" "^7.18.9" 825 | "@babel/plugin-transform-exponentiation-operator" "^7.18.6" 826 | "@babel/plugin-transform-for-of" "^7.21.0" 827 | "@babel/plugin-transform-function-name" "^7.18.9" 828 | "@babel/plugin-transform-literals" "^7.18.9" 829 | "@babel/plugin-transform-member-expression-literals" "^7.18.6" 830 | "@babel/plugin-transform-modules-amd" "^7.20.11" 831 | "@babel/plugin-transform-modules-commonjs" "^7.21.2" 832 | "@babel/plugin-transform-modules-systemjs" "^7.20.11" 833 | "@babel/plugin-transform-modules-umd" "^7.18.6" 834 | "@babel/plugin-transform-named-capturing-groups-regex" "^7.20.5" 835 | "@babel/plugin-transform-new-target" "^7.18.6" 836 | "@babel/plugin-transform-object-super" "^7.18.6" 837 | "@babel/plugin-transform-parameters" "^7.21.3" 838 | "@babel/plugin-transform-property-literals" "^7.18.6" 839 | "@babel/plugin-transform-regenerator" "^7.20.5" 840 | "@babel/plugin-transform-reserved-words" "^7.18.6" 841 | "@babel/plugin-transform-shorthand-properties" "^7.18.6" 842 | "@babel/plugin-transform-spread" "^7.20.7" 843 | "@babel/plugin-transform-sticky-regex" "^7.18.6" 844 | "@babel/plugin-transform-template-literals" "^7.18.9" 845 | "@babel/plugin-transform-typeof-symbol" "^7.18.9" 846 | "@babel/plugin-transform-unicode-escapes" "^7.18.10" 847 | "@babel/plugin-transform-unicode-regex" "^7.18.6" 848 | "@babel/preset-modules" "^0.1.5" 849 | "@babel/types" "^7.21.4" 850 | babel-plugin-polyfill-corejs2 "^0.3.3" 851 | babel-plugin-polyfill-corejs3 "^0.6.0" 852 | babel-plugin-polyfill-regenerator "^0.4.1" 853 | core-js-compat "^3.25.1" 854 | semver "^6.3.0" 855 | 856 | "@babel/preset-modules@^0.1.5": 857 | version "0.1.5" 858 | resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" 859 | integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== 860 | dependencies: 861 | "@babel/helper-plugin-utils" "^7.0.0" 862 | "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" 863 | "@babel/plugin-transform-dotall-regex" "^7.4.4" 864 | "@babel/types" "^7.4.4" 865 | esutils "^2.0.2" 866 | 867 | "@babel/regjsgen@^0.8.0": 868 | version "0.8.0" 869 | resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" 870 | integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== 871 | 872 | "@babel/runtime@^7.8.4": 873 | version "7.21.0" 874 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" 875 | integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== 876 | dependencies: 877 | regenerator-runtime "^0.13.11" 878 | 879 | "@babel/template@^7.18.10", "@babel/template@^7.20.7": 880 | version "7.20.7" 881 | resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" 882 | integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== 883 | dependencies: 884 | "@babel/code-frame" "^7.18.6" 885 | "@babel/parser" "^7.20.7" 886 | "@babel/types" "^7.20.7" 887 | 888 | "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.4": 889 | version "7.21.4" 890 | resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.4.tgz#a836aca7b116634e97a6ed99976236b3282c9d36" 891 | integrity sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q== 892 | dependencies: 893 | "@babel/code-frame" "^7.21.4" 894 | "@babel/generator" "^7.21.4" 895 | "@babel/helper-environment-visitor" "^7.18.9" 896 | "@babel/helper-function-name" "^7.21.0" 897 | "@babel/helper-hoist-variables" "^7.18.6" 898 | "@babel/helper-split-export-declaration" "^7.18.6" 899 | "@babel/parser" "^7.21.4" 900 | "@babel/types" "^7.21.4" 901 | debug "^4.1.0" 902 | globals "^11.1.0" 903 | 904 | "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.4", "@babel/types@^7.4.4": 905 | version "7.21.4" 906 | resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.4.tgz#2d5d6bb7908699b3b416409ffd3b5daa25b030d4" 907 | integrity sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA== 908 | dependencies: 909 | "@babel/helper-string-parser" "^7.19.4" 910 | "@babel/helper-validator-identifier" "^7.19.1" 911 | to-fast-properties "^2.0.0" 912 | 913 | "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": 914 | version "0.3.3" 915 | resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" 916 | integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== 917 | dependencies: 918 | "@jridgewell/set-array" "^1.0.1" 919 | "@jridgewell/sourcemap-codec" "^1.4.10" 920 | "@jridgewell/trace-mapping" "^0.3.9" 921 | 922 | "@jridgewell/resolve-uri@3.1.0": 923 | version "3.1.0" 924 | resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" 925 | integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== 926 | 927 | "@jridgewell/set-array@^1.0.1": 928 | version "1.1.2" 929 | resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" 930 | integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== 931 | 932 | "@jridgewell/source-map@^0.3.2": 933 | version "0.3.3" 934 | resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" 935 | integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== 936 | dependencies: 937 | "@jridgewell/gen-mapping" "^0.3.0" 938 | "@jridgewell/trace-mapping" "^0.3.9" 939 | 940 | "@jridgewell/sourcemap-codec@1.4.14": 941 | version "1.4.14" 942 | resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" 943 | integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== 944 | 945 | "@jridgewell/sourcemap-codec@^1.4.10": 946 | version "1.4.15" 947 | resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" 948 | integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== 949 | 950 | "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": 951 | version "0.3.18" 952 | resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" 953 | integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== 954 | dependencies: 955 | "@jridgewell/resolve-uri" "3.1.0" 956 | "@jridgewell/sourcemap-codec" "1.4.14" 957 | 958 | "@rollup/plugin-babel@^6.0.3": 959 | version "6.0.3" 960 | resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-6.0.3.tgz#07ccde15de278c581673034ad6accdb4a153dfeb" 961 | integrity sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg== 962 | dependencies: 963 | "@babel/helper-module-imports" "^7.18.6" 964 | "@rollup/pluginutils" "^5.0.1" 965 | 966 | "@rollup/plugin-node-resolve@^15.0.2": 967 | version "15.0.2" 968 | resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.2.tgz#8183a80c2cbf7b471f5ac86b16747997f3b5d185" 969 | integrity sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg== 970 | dependencies: 971 | "@rollup/pluginutils" "^5.0.1" 972 | "@types/resolve" "1.20.2" 973 | deepmerge "^4.2.2" 974 | is-builtin-module "^3.2.1" 975 | is-module "^1.0.0" 976 | resolve "^1.22.1" 977 | 978 | "@rollup/pluginutils@^5.0.1": 979 | version "5.0.2" 980 | resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" 981 | integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== 982 | dependencies: 983 | "@types/estree" "^1.0.0" 984 | estree-walker "^2.0.2" 985 | picomatch "^2.3.1" 986 | 987 | "@types/estree@^1.0.0": 988 | version "1.0.0" 989 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" 990 | integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== 991 | 992 | "@types/node@*": 993 | version "18.15.11" 994 | resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" 995 | integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== 996 | 997 | "@types/resolve@1.20.2": 998 | version "1.20.2" 999 | resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" 1000 | integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== 1001 | 1002 | acorn@^8.5.0: 1003 | version "8.8.2" 1004 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" 1005 | integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== 1006 | 1007 | ansi-styles@^3.2.1: 1008 | version "3.2.1" 1009 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 1010 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 1011 | dependencies: 1012 | color-convert "^1.9.0" 1013 | 1014 | babel-plugin-polyfill-corejs2@^0.3.3: 1015 | version "0.3.3" 1016 | resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" 1017 | integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== 1018 | dependencies: 1019 | "@babel/compat-data" "^7.17.7" 1020 | "@babel/helper-define-polyfill-provider" "^0.3.3" 1021 | semver "^6.1.1" 1022 | 1023 | babel-plugin-polyfill-corejs3@^0.6.0: 1024 | version "0.6.0" 1025 | resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" 1026 | integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== 1027 | dependencies: 1028 | "@babel/helper-define-polyfill-provider" "^0.3.3" 1029 | core-js-compat "^3.25.1" 1030 | 1031 | babel-plugin-polyfill-regenerator@^0.4.1: 1032 | version "0.4.1" 1033 | resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" 1034 | integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== 1035 | dependencies: 1036 | "@babel/helper-define-polyfill-provider" "^0.3.3" 1037 | 1038 | browserslist@^4.21.3, browserslist@^4.21.5: 1039 | version "4.21.5" 1040 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" 1041 | integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== 1042 | dependencies: 1043 | caniuse-lite "^1.0.30001449" 1044 | electron-to-chromium "^1.4.284" 1045 | node-releases "^2.0.8" 1046 | update-browserslist-db "^1.0.10" 1047 | 1048 | buffer-from@^1.0.0: 1049 | version "1.1.2" 1050 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" 1051 | integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== 1052 | 1053 | builtin-modules@^3.3.0: 1054 | version "3.3.0" 1055 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" 1056 | integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== 1057 | 1058 | caniuse-lite@^1.0.30001449: 1059 | version "1.0.30001477" 1060 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e" 1061 | integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ== 1062 | 1063 | chalk@^2.0.0: 1064 | version "2.4.2" 1065 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 1066 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 1067 | dependencies: 1068 | ansi-styles "^3.2.1" 1069 | escape-string-regexp "^1.0.5" 1070 | supports-color "^5.3.0" 1071 | 1072 | color-convert@^1.9.0: 1073 | version "1.9.3" 1074 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 1075 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 1076 | dependencies: 1077 | color-name "1.1.3" 1078 | 1079 | color-name@1.1.3: 1080 | version "1.1.3" 1081 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 1082 | integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== 1083 | 1084 | commander@^2.20.0: 1085 | version "2.20.3" 1086 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 1087 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 1088 | 1089 | convert-source-map@^1.7.0: 1090 | version "1.9.0" 1091 | resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" 1092 | integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== 1093 | 1094 | core-js-compat@^3.25.1: 1095 | version "3.30.0" 1096 | resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.30.0.tgz#99aa2789f6ed2debfa1df3232784126ee97f4d80" 1097 | integrity sha512-P5A2h/9mRYZFIAP+5Ab8ns6083IyVpSclU74UNvbGVQ8VM7n3n3/g2yF3AkKQ9NXz2O+ioxLbEWKnDtgsFamhg== 1098 | dependencies: 1099 | browserslist "^4.21.5" 1100 | 1101 | core-js@^3.30.0: 1102 | version "3.30.0" 1103 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.30.0.tgz#64ac6f83bc7a49fd42807327051701d4b1478dea" 1104 | integrity sha512-hQotSSARoNh1mYPi9O2YaWeiq/cEB95kOrFb4NCrO4RIFt1qqNpKsaE+vy/L3oiqvND5cThqXzUU3r9F7Efztg== 1105 | 1106 | debug@^4.1.0, debug@^4.1.1: 1107 | version "4.3.4" 1108 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" 1109 | integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== 1110 | dependencies: 1111 | ms "2.1.2" 1112 | 1113 | deepmerge@^4.2.2: 1114 | version "4.3.1" 1115 | resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" 1116 | integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== 1117 | 1118 | electron-to-chromium@^1.4.284: 1119 | version "1.4.356" 1120 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.356.tgz#b75a8a8c31d571f6024310cc980a08cd6c15a8c5" 1121 | integrity sha512-nEftV1dRX3omlxAj42FwqRZT0i4xd2dIg39sog/CnCJeCcL1TRd2Uh0i9Oebgv8Ou0vzTPw++xc+Z20jzS2B6A== 1122 | 1123 | escalade@^3.1.1: 1124 | version "3.1.1" 1125 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" 1126 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== 1127 | 1128 | escape-string-regexp@^1.0.5: 1129 | version "1.0.5" 1130 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 1131 | integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== 1132 | 1133 | estree-walker@^2.0.2: 1134 | version "2.0.2" 1135 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" 1136 | integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== 1137 | 1138 | esutils@^2.0.2: 1139 | version "2.0.3" 1140 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" 1141 | integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== 1142 | 1143 | fsevents@~2.3.2: 1144 | version "2.3.2" 1145 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" 1146 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== 1147 | 1148 | function-bind@^1.1.1: 1149 | version "1.1.1" 1150 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 1151 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 1152 | 1153 | gensync@^1.0.0-beta.2: 1154 | version "1.0.0-beta.2" 1155 | resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" 1156 | integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== 1157 | 1158 | globals@^11.1.0: 1159 | version "11.12.0" 1160 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" 1161 | integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== 1162 | 1163 | has-flag@^3.0.0: 1164 | version "3.0.0" 1165 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 1166 | integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== 1167 | 1168 | has-flag@^4.0.0: 1169 | version "4.0.0" 1170 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 1171 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 1172 | 1173 | has@^1.0.3: 1174 | version "1.0.3" 1175 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 1176 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 1177 | dependencies: 1178 | function-bind "^1.1.1" 1179 | 1180 | is-builtin-module@^3.2.1: 1181 | version "3.2.1" 1182 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" 1183 | integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== 1184 | dependencies: 1185 | builtin-modules "^3.3.0" 1186 | 1187 | is-core-module@^2.11.0: 1188 | version "2.11.0" 1189 | resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" 1190 | integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== 1191 | dependencies: 1192 | has "^1.0.3" 1193 | 1194 | is-module@^1.0.0: 1195 | version "1.0.0" 1196 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" 1197 | integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== 1198 | 1199 | jest-worker@^26.2.1: 1200 | version "26.6.2" 1201 | resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" 1202 | integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== 1203 | dependencies: 1204 | "@types/node" "*" 1205 | merge-stream "^2.0.0" 1206 | supports-color "^7.0.0" 1207 | 1208 | js-tokens@^4.0.0: 1209 | version "4.0.0" 1210 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 1211 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 1212 | 1213 | jsesc@^2.5.1: 1214 | version "2.5.2" 1215 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" 1216 | integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== 1217 | 1218 | jsesc@~0.5.0: 1219 | version "0.5.0" 1220 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" 1221 | integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== 1222 | 1223 | json5@^2.2.2: 1224 | version "2.2.3" 1225 | resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" 1226 | integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== 1227 | 1228 | lodash.debounce@^4.0.8: 1229 | version "4.0.8" 1230 | resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" 1231 | integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== 1232 | 1233 | lru-cache@^5.1.1: 1234 | version "5.1.1" 1235 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" 1236 | integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== 1237 | dependencies: 1238 | yallist "^3.0.2" 1239 | 1240 | merge-stream@^2.0.0: 1241 | version "2.0.0" 1242 | resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" 1243 | integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== 1244 | 1245 | ms@2.1.2: 1246 | version "2.1.2" 1247 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 1248 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 1249 | 1250 | node-releases@^2.0.8: 1251 | version "2.0.10" 1252 | resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" 1253 | integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== 1254 | 1255 | path-parse@^1.0.7: 1256 | version "1.0.7" 1257 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" 1258 | integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== 1259 | 1260 | picocolors@^1.0.0: 1261 | version "1.0.0" 1262 | resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" 1263 | integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== 1264 | 1265 | picomatch@^2.3.1: 1266 | version "2.3.1" 1267 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 1268 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 1269 | 1270 | randombytes@^2.1.0: 1271 | version "2.1.0" 1272 | resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" 1273 | integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== 1274 | dependencies: 1275 | safe-buffer "^5.1.0" 1276 | 1277 | regenerate-unicode-properties@^10.1.0: 1278 | version "10.1.0" 1279 | resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" 1280 | integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== 1281 | dependencies: 1282 | regenerate "^1.4.2" 1283 | 1284 | regenerate@^1.4.2: 1285 | version "1.4.2" 1286 | resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" 1287 | integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== 1288 | 1289 | regenerator-runtime@^0.13.11: 1290 | version "0.13.11" 1291 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" 1292 | integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== 1293 | 1294 | regenerator-transform@^0.15.1: 1295 | version "0.15.1" 1296 | resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" 1297 | integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== 1298 | dependencies: 1299 | "@babel/runtime" "^7.8.4" 1300 | 1301 | regexpu-core@^5.3.1: 1302 | version "5.3.2" 1303 | resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" 1304 | integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== 1305 | dependencies: 1306 | "@babel/regjsgen" "^0.8.0" 1307 | regenerate "^1.4.2" 1308 | regenerate-unicode-properties "^10.1.0" 1309 | regjsparser "^0.9.1" 1310 | unicode-match-property-ecmascript "^2.0.0" 1311 | unicode-match-property-value-ecmascript "^2.1.0" 1312 | 1313 | regjsparser@^0.9.1: 1314 | version "0.9.1" 1315 | resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" 1316 | integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== 1317 | dependencies: 1318 | jsesc "~0.5.0" 1319 | 1320 | resolve@^1.14.2, resolve@^1.22.1: 1321 | version "1.22.2" 1322 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" 1323 | integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== 1324 | dependencies: 1325 | is-core-module "^2.11.0" 1326 | path-parse "^1.0.7" 1327 | supports-preserve-symlinks-flag "^1.0.0" 1328 | 1329 | rollup-plugin-terser@^7.0.2: 1330 | version "7.0.2" 1331 | resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" 1332 | integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== 1333 | dependencies: 1334 | "@babel/code-frame" "^7.10.4" 1335 | jest-worker "^26.2.1" 1336 | serialize-javascript "^4.0.0" 1337 | terser "^5.0.0" 1338 | 1339 | rollup@^3.20.2: 1340 | version "3.20.2" 1341 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.20.2.tgz#f798c600317f216de2e4ad9f4d9ab30a89b690ff" 1342 | integrity sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg== 1343 | optionalDependencies: 1344 | fsevents "~2.3.2" 1345 | 1346 | safe-buffer@^5.1.0: 1347 | version "5.2.1" 1348 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 1349 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 1350 | 1351 | semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: 1352 | version "6.3.0" 1353 | resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" 1354 | integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== 1355 | 1356 | serialize-javascript@^4.0.0: 1357 | version "4.0.0" 1358 | resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" 1359 | integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== 1360 | dependencies: 1361 | randombytes "^2.1.0" 1362 | 1363 | source-map-support@~0.5.20: 1364 | version "0.5.21" 1365 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" 1366 | integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== 1367 | dependencies: 1368 | buffer-from "^1.0.0" 1369 | source-map "^0.6.0" 1370 | 1371 | source-map@^0.6.0: 1372 | version "0.6.1" 1373 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 1374 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 1375 | 1376 | supports-color@^5.3.0: 1377 | version "5.5.0" 1378 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 1379 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 1380 | dependencies: 1381 | has-flag "^3.0.0" 1382 | 1383 | supports-color@^7.0.0: 1384 | version "7.2.0" 1385 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 1386 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 1387 | dependencies: 1388 | has-flag "^4.0.0" 1389 | 1390 | supports-preserve-symlinks-flag@^1.0.0: 1391 | version "1.0.0" 1392 | resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" 1393 | integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== 1394 | 1395 | terser@^5.0.0: 1396 | version "5.16.9" 1397 | resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.9.tgz#7a28cb178e330c484369886f2afd623d9847495f" 1398 | integrity sha512-HPa/FdTB9XGI2H1/keLFZHxl6WNvAI4YalHGtDQTlMnJcoqSab1UwL4l1hGEhs6/GmLHBZIg/YgB++jcbzoOEg== 1399 | dependencies: 1400 | "@jridgewell/source-map" "^0.3.2" 1401 | acorn "^8.5.0" 1402 | commander "^2.20.0" 1403 | source-map-support "~0.5.20" 1404 | 1405 | to-fast-properties@^2.0.0: 1406 | version "2.0.0" 1407 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" 1408 | integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== 1409 | 1410 | unicode-canonical-property-names-ecmascript@^2.0.0: 1411 | version "2.0.0" 1412 | resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" 1413 | integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== 1414 | 1415 | unicode-match-property-ecmascript@^2.0.0: 1416 | version "2.0.0" 1417 | resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" 1418 | integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== 1419 | dependencies: 1420 | unicode-canonical-property-names-ecmascript "^2.0.0" 1421 | unicode-property-aliases-ecmascript "^2.0.0" 1422 | 1423 | unicode-match-property-value-ecmascript@^2.1.0: 1424 | version "2.1.0" 1425 | resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" 1426 | integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== 1427 | 1428 | unicode-property-aliases-ecmascript@^2.0.0: 1429 | version "2.1.0" 1430 | resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" 1431 | integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== 1432 | 1433 | update-browserslist-db@^1.0.10: 1434 | version "1.0.10" 1435 | resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" 1436 | integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== 1437 | dependencies: 1438 | escalade "^3.1.1" 1439 | picocolors "^1.0.0" 1440 | 1441 | yallist@^3.0.2: 1442 | version "3.1.1" 1443 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" 1444 | integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== 1445 | --------------------------------------------------------------------------------