diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..86cf8936f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "ts-node", + "type": "node", + "request": "launch", + "args": [ + "${relativeFile}" + ], + "runtimeArgs": [ + "-r", + "ts-node/register" + ], + "cwd": "${workspaceRoot}", + "protocol": "inspector", + "internalConsoleOptions": "openOnSessionStart" + } + ] +} \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/01-\344\272\213\344\273\266\345\276\252\347\216\257.md" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/01-\344\272\213\344\273\266\345\276\252\347\216\257.md" new file mode 100644 index 000000000..6b6e08b8a --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/01-\344\272\213\344\273\266\345\276\252\347\216\257.md" @@ -0,0 +1,115 @@ +# 事件循环 + +事件循环,在W3C中描述为 `Event Loop`,Chrome的实现源码中定义为 `Message Loop`,因此事件循环也称为消息循环,是**浏览器渲染主线程**的工作方式。 + + + +## 1. 浏览器的进程模型 + +浏览器是一个多进程多线程的应用程序,核心的进程是**浏览器进程**、**网络进程**、**渲染进程** + +**浏览器进程**:负责浏览器软件的UI界面显示、用户交互、子进程管理等。浏览器进程内部会启动多个线程处理不同任务。 + +**网络进程**:负责加载网络资源。 + +**渲染进程**:(重点) 渲染进程启动后,会开启一个**渲染主线程**,主线程负责执行 HTML、CSS、JS。默认情况下,浏览器会为每个标签页开启一个**新的渲染进程**,以保证标签页隔离 (未来可能改为一个站点一个进程)。 + + + +## 2. 渲染主线程的异步处理 + +渲染主线程是浏览器中最繁忙的线程,处理的任务包括但不限于: + ++ 解析 HTML ++ 解析 CSS ++ 计算样式 ++ 布局 ++ 处理图层 ++ 帧绘制 ++ 执行全局 JS 代码 ++ 执行事件处理函数 ++ 执行计时器的回调函数 ++ ...... + +JS运行在浏览器的单个渲染进程的渲染主线程中,而渲染主线程只有一个!注意,js的单线程,是因为执行在浏览器的渲染主线程,并不代表浏览器是单进程/线程的。 + +因此,JS是一门 **单线程** 的语言,浏览器采用异步而非同步的方式来避免阻塞,如计时器、网络、事件监听。 + +主线程将任务交给其他线程处理,完成后将事先传递的回调函数包装成任务,加入到消息队列的末尾排队,等待主线程调度执行。 + +**总结**: + +1. **单线程是异步产生的原因** + +2. **事件循环是异步的实现方式** + + + +**异步的场景**:`setTimeout`、`setInterval`、`XHR`、`Fetch`、`addEventListener` 等 + +![](./img/01-event_loop.jpg) + + + +## 3. JS 阻塞渲染 + +如下面的案例,虽然 h1 已经设置了 text 内容,但会在 3s 后才显示,因为 **JS执行和渲染都在浏览器的渲染主线程上执行**,在执行了 h1 内容设置后,向消息队列(message queue)中插入了新的渲染任务,但需要在 delay 完成后,渲染主线程才会执行渲染。 + +```javascript +var h1 = document.querySelector(...); +var btn = document.querySelector(...); + +// 死循环一段时间 +function delay(duration) { + var start = Date.now(); + while(Date.now() - start < duration) {} +} + +btn.onclick = function() { + h1.textContent = 'xxx'; + delay(3000); +} +``` + + + +## 4. 任务没有优先级,但消息队列有优先级 + +每个任务都有一个任务类型,同一类型的任务必须在一个队列,一个队列可能有多种类型的任务,在一次事件循环中,浏览器可以根据实际情况从不同的队列中取出任务执行。 + +浏览器必须准备好一个**微队列**(microTask),微队列中的任务优先于所有其他任务执行。 + +随着浏览器复杂度急剧提升,W3C不再使用宏队列的说法。 + +目前 chrome 中至少包含了以下队列: + ++ **微队列**:[最高] 存放需要最快执行的任务 ++ **交互队列**:[高] 存放用户交互后产生的事件处理任务 ++ **延时队列**:[中] 存放定时器回调 + +添加任务到微队列的方式主要为:`Promise`、`MutationObserver`,如 + +```javascript +// 立即添加函数到微队列 +Promise.resolve().then(函数) +``` + +案例: + +```javascript +function delay(duration) { + var start = Date.now(); + while(Date.now() - start < duration) {} +} +setTimeout(function() { // 添加到延迟队列 + console.log(1); +}, 0); +Promise.resolve().then(function() { // 添加到微队列 + console.log(2); +}); +delay(1000); // 死循环1s +console.log(3); // 当前任务中执行 +// 1s 后输出 3 2 1 +``` + + diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/02-\346\265\217\350\247\210\345\231\250\346\270\262\346\237\223\345\216\237\347\220\206.md" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/02-\346\265\217\350\247\210\345\231\250\346\270\262\346\237\223\345\216\237\347\220\206.md" new file mode 100644 index 000000000..fe6725d8e --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/02-\346\265\217\350\247\210\345\231\250\346\270\262\346\237\223\345\216\237\347\220\206.md" @@ -0,0 +1,78 @@ +# 浏览器渲染原理 + +## 1. 渲染过程 + +![](./img/02.jpg) + +### 1.1 【解析 HTML】 为 DOM 和 CSSOM + +首先解析 HTML,解析过程中遇到 CSS 解析 CSS,遇到 JS 执行 JS。为提高解析效率,浏览器在开始解析前,会启动一个预解析线程,率先下载 HTML 中的外部 CSS 文件和 JS 文件。 + +若主线程解析到 link 位置时 CSS 文件还未下载解析完成则会跳过。因为下载和解析 CSS 是在预解析线程中进行的,所以 **CSS 不会阻塞渲染主线程对 HTML 的解析**。 + +主线程解析到 script 位置时会停止解析 HTML,等待 JS 文件下载结束,并将全局代码解析执行完成后,才继续解析 HTML。这是因为 JS 代码的执行过程可能会修改当前的 DOM 树,所以 DOM 树的生成必须暂停,所以 **JS 会阻塞渲染主线程对 HTML 的解析**。 + +解析 HTML 完成后,会得到 **DOM 树** 和 **CSSOM 树**,浏览器的默认样式、内部样式、外部样式、行内样式均会包含在 CSSOM 树中。 + +### 1.2 【样式计算】得到带样式的 DOM + +主线程会遍历得到的 DOM 树,依次为树中的每个节点计算出最终样式,称之为 **Computed Style**。在此过程中,很多预设值会变成绝对值,比如 red 会变成 rgb(255,0,0); 相对单位会变成绝对单位,比如 em 会变成 px。 + +样式计算完成后,会得到一棵带有样式的 DOM 树。 + +> js 操作 stylesheet +> +> ```javascript +> document.styleSheets +> getComputedStyle(document.body) +> ``` + +### 1.3 【布局】生成 layout 布局树 + +布局阶段会依次遍历 DOM 树的每一个节点,计算每个节点的几何信息,如节点的宽高、相对包含块的位置。 + +大部分时候,DOM 树和布局树并非一一对应。比如 `display:none` 节点不会生成到布局树;比如使用了伪元素选择器,虽然 DOM 树中不存在这些伪元素节点,但它们拥有几何信息,所以会生成到布局树中;还有匿名行盒、匿名块盒等等都会导致 DOM 树和布局树无法一一对应。 + +![](./img/03.jpg) + +### 1.4 【分层】 + +主线程会使用一套复杂的策略对整个布局树进行分层。分层会影响后续的布局树变化的处理,当某层变动只改某层能提升性能,但层次过多也会消耗性能。滚动条、堆叠上下文、transform、opacity 等样式都会或多或少的影响分层结果,可以通过 `will-change` 属性更大程度的影响分层结果,如在css中添加 `will-change: transform` 属性告诉浏览器将来 transform 可能变化,由浏览器决定是否分层。 + +### 1.5 【绘制】生成绘制指令集传递给合成线程 + +主线程会为每个层单独生成绘制指令集,完成后主线程将每个图层的绘制信息提交给合成线程,剩余工作将由合成线程完成。 + +### 1.6 【分块】合成线程分块 + +合成线程首先将每个图层划分为更多的小区域,它会从线程池中拿取多个线程来完成分块工作。 + +### 1.7 【光栅化】GPU光栅化 + +合成线程会将块信息交给 GPU 进程,GPU 进程会开启多个线程极速完成光栅化,得到一块一块的位图,默认会优先处理靠近视口区域的块。 + +### 1.8 【draw】合成线程根据位图生成指引并由GPU绘制到屏幕 + +合成线程拿到每个层、每个块的位图后,生成一个个"指引(quad)"信息,用于标识出每个位图在屏幕的绘制位置,以及旋转、缩放等变形的处理。 + +由于 `transform` 变形发生在合成线程,与渲染主线程无关,所以效率高。 + +最后合成线程会把 quad 提交给 GPU 进程,由 GPU 进程产生系统调用,提交给 GPU 硬件,完成最终的屏幕成像。 + + + +## 2. transform 高效的原因 + +如前面说述,transform 既不影响布局也不影响绘制指令,只影响渲染流程最后的绘制阶段。由于 draw 阶段在合成线程中,所以 transform 的变化几乎不会影响忙碌的渲染主线程。 + + + +## 3. reflow(重排) & repaint(重绘) + +`reflow`:当进行了影响布局树的操作后,需要重新计算 layout 布局树。浏览器会合并布局属性的修改操作,当 JS 代码全部完成后再异步统一计算。但为了让 JS 获取布局属性时取到最新的布局信息,在获取属性时会立即 reflow。 + +`repaint`:当修改了可见样式后需要重新计算绘制指令。 + +由于元素的布局信息也属于可见样式,所以 **reflow 一定会引起 repaint**,要尽量减少 reflow。 + +![](./img/04.jpg) diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/03-\345\261\236\346\200\247\346\217\217\350\277\260\347\254\246.md" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/03-\345\261\236\346\200\247\346\217\217\350\277\260\347\254\246.md" new file mode 100755 index 000000000..19db7be31 --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/03-\345\261\236\346\200\247\346\217\217\350\277\260\347\254\246.md" @@ -0,0 +1,62 @@ +# 属性描述符 + +## 1. 属性描述符的获取与设置 + +```javascript +var obj = { a: 1, b: 2 }; + +// 获取属性描述符 +Object.getOwnPropertyDescriptor(obj, 'a'); +// { value: 1, writable: true, enumerable: true, configurable: true } + +// 设置属性描述符 +Object.defineProperty(obj, 'a', { + // value: 3, // Cannot both specify accessors and a value or writable attribute + // writable: false, // 不可重写 + enumerable: false, // 不可遍历 + configurable: false, // 属性描述符不可再修改 + get: function() { // getter + return 4; + }, + set: function() { // setter + throw new Error('属性只读'); + }, +}); +``` + +## 2. 案例:属性描述符的应用 + +```javascript +class Demo { + constructor (g) { + g = { ...g }; + Object.freeze(g); //【1】clone后冻结,避免改变原对象 + Object.defineProperty(this, 'data', { + get: function() { + return g; + }, + set: function() { + throw new Error('data 属性只读'); + }, + configurable: false, // 属性描述符不可再修改 + }); + + this.testForFreeze = 1; + // Object.freeze(this); //【2】冻结,但也会影响现有的属性方法 + Object.seal(this); //【3】密封,不能给对象添加/删除属性和方法,不能修改现有属性和方法的配置 + } +} + +var g = new Demo({ + price: 1, +}); + +g.data.price = 2; +g.testForFreeze = 2; // Object.freeze 后不会生效,但 Object.seal 不影响 +g.testForSeal = 2; // Object.freeze 和 Object.seal 后都不会生效 + +Object.freeze(Demo.prototype); //【4】冻结原型链 +Demo.prototype.testForPrototype = 1; +console.log(g.testForPrototype); // undefined +``` + diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/04-CSS\345\214\205\345\220\253\345\235\227.md" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/04-CSS\345\214\205\345\220\253\345\235\227.md" new file mode 100644 index 000000000..330dde7dc --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/04-CSS\345\214\205\345\220\253\345\235\227.md" @@ -0,0 +1,132 @@ +# CSS包含块 + +元素的尺寸和位置,会受它的包含块影响。对于一些属性,例如 width, height, padding, margin,当绝对定位元素(position: absolute/fixed)的偏移值为百分比值时,由元素的包含块计算得来。 + +包含块分两种: + ++ **初始包含块(initial containing block)**,即根元素(HTML元素)所在的包含块,浏览器中等于视口 viewport 大小,定位基点在画布原点(视口左上角)。 + ++ **非根元素包含块**,判定方式分以下规则: + +1. 元素 `position: relative/static`,包含块为最近的**块容器** (block container) 的**内容区域**(content area) + +2. 元素 `position: fixed`,包含块为视口 + +3. 元素 `position: absolute`,包含块为最近的 `position` 的值非 `static` (即值为 `fixed`/`absolute`/`relative`/`sticky`) 的祖先元素的内边距区域 + +案例: + +```html + +
+
+
+
+
+ +``` + +`div.item2` 的包含块为 `div.container` 而非 `div.item`。 + +此外,对于非根元素,包含块还有一种规则:元素 `position: absolute/fixed`,包含块也可能为满足以下条件的最近父级元素的内边距区域: + +- `transform` 或 `perspective` 值不为 `none` +- `will-change: transform/perspective;` +- `filter` 值不为 `none` 或 `will-change: filter;`(仅 Firefox) +- `contain: paint;` + +案例: + +```html + +
+
+
+
+
+ +``` + +此时,`div.item2` 的包含块为 `div.item`。 + + + +CSS 规范中所举的例子如下: + +```html + + + Illustration of containing blocks + + +
+

This is text in the first paragraph...

+

+ This is text + + in the + second + paragraph. + +

+
+ + +``` + +在没有添加任何 CSS 代码的情况下,元素对应的包含块为: + +| 元素 | 包含块 | 参照规则 | 说明 | +| ------- | --------------------------- | -------- | ------------------ | +| html | initial C.B. (UA-dependent) | 0 | | +| body | html | 1 | | +| div1 | body | 1 | | +| p1 | div1 | 1 | | +| p2 | div1 | 1 | | +| em1 | p2 | 1 | | +| strong1 | **p2** | 1 | 最近块容器的内容区 | + +接下来添加如下 CSS: + +```css +#div1 { + position: absolute; + left: 50px; +} +``` + +变化如下: + +| 元素 | 包含块 | 参照规则 | 说明 | +| ---- | --------------------------- | -------- | -------------------------------- | +| div1 | initial C.B. (UA-dependent) | 3 | 最近的非static祖先元素内边距区域 | + +继续修改 CSS: + +```css +#div1 { + position: absolute; + left: 50px; +} +#em1 { + position: absolute; + left: 100px; +} +``` + +变化如下: + +| 元素 | 包含块 | 参照规则 | 说明 | +| ------- | --------------------------- | -------- | -------------------------------- | +| div1 | initial C.B. (UA-dependent) | | | +| em1 | div1 | 3 | 最近的非static祖先元素内边距区域 | +| strong1 | em1 | 1 | 最近块容器的内容区 | + +其他参考案例:*https://developer.mozilla.org/zh-CN/docs/Web/CSS/Containing_block* + + + + + + + diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/05-\350\264\255\347\211\251\350\275\246\345\212\250\347\224\273.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/05-\350\264\255\347\211\251\350\275\246\345\212\250\347\224\273.html" new file mode 100755 index 000000000..53a7eee38 --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/05-\350\264\255\347\211\251\350\275\246\345\212\250\347\224\273.html" @@ -0,0 +1,162 @@ + + + + + + 购物车动画 + + + +
+ + + + \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/06-vue\344\274\230\345\214\226.md" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/06-vue\344\274\230\345\214\226.md" new file mode 100755 index 000000000..ed7a9059f --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/06-vue\344\274\230\345\214\226.md" @@ -0,0 +1,154 @@ +# vue优化 + +## 1. 使用key + +为循环生成的列表指定稳定且唯一的key,减少删除、新增、改动元素 + + + +## 2. 使用冻结的对象 + +使用 chrome 性能工具分析,若在 Main 渲染主线程中黄色的js响应化执行时间过长,可以使用冻结避免对象响应化。 + +```javascript +var obj = { a: 1, b: 2 } +Object.freeze(obj); +obj.a = 3; +console.log(obj.a); // 1 +Object.isFrozen(obj); // true + +// 在vue中使用 + +export default { + data() { + frozenData: [] + }, + methods: { + setData() { + var obj = {}; + ... + this.frozenData = Object.freeze(obj); // 避免了 proxySetter + } + } +} +``` + + + +## 3. 使用函数式组件 + +[函数式组件](https://v2.cn.vuejs.org/v2/guide/render-function.html#%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6),主要减少内存占用,不会调用 `new VueComponent`,不会出现在组件树中 + +添加 `functional: true` 配置,用于纯渲染组件,无data,只有props + + + +## 4. 使用计算属性和变量本地化 + +缓存在模板中多次使用的数据,可以使用计算属性,因为会自动缓存,对于会多次引用的变量可以保存起来,减少 `this.xxx` 的使用,减少依赖收集次数。因为响应式对象每次使用 `this.xxx` 都会触发 `getter`,然后执行依赖收集的相关代码 + + + +## 5. 非实时绑定的表单项 + +在没有必要使用 `v-model` (oninput)时使用 `v-model.lazy` (onchange) 或使用单向 value 代替 + + + +## 6. 保持对象引用稳定 + +尽量避免上层组件的数据变动,vue的判定变化源码: + +```javascript +function hasChanged(x, y) { + if (x === y) { + return x === 0 && 1 / x !== 1 / y; // +0 === -0 为 true,但 1/+0=Infinity, 1/-0=-Infinity,所以 1/+!==1/-0 + } else { + return x === x || y === y; // 不能直接返回 true,因为 NaN === NaN 为 false,x === x 可以排除 NaN + } +} +``` + +也要注意细分组件避免多余的渲染 + + + +## 7. v-show 替代 v-if + +对于内部包含大量dom节点的元素效果明显 + + + +## 8. 使用延迟装载(defer) + +对于重组件,初始化时分批绘制,在重组件上使用 `v-if="defer(n)"` 表示在第n帧后绘制。 + +defer函数记录当前执行 `requestAnimationFrame` 的次数 + + + +## 9. 子组件分割 + +对于耗费性能的部分可以分割为子组件,在子组件内部未发生变化时,不会触发耗费性能的逻辑执行。 + +```vue + + +``` + + + +## 10. 第三方插件按需引入 + + + +## 11. 路由懒加载 + +```javascript +const router = new VueRouter({ + routes: [ + { path: '/home', component: () => import('@/components/Home') }, + { path: '/login', component: require('@/components/Home').default } + ] +}); +``` + + + +## 12. 使用 keep-alive + +在路由来回跳转时,可以通过内置组件 `` 来把组件缓存起来,在组件切换的时候不进行卸载,提升性能 + +- 也可以用 `include/exclude` 来 缓存/不缓存 指定组件 +- 可通过两个生命周期 `activated/deactivated` 来获取当前组件状态 + + + +## 10. 长列表优化 + +根据索引,只渲染可视区域的dom元素 + + + +## 11. 打包体积优化 + + + + + + + + + diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/01-event_loop.jpg" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/01-event_loop.jpg" new file mode 100644 index 000000000..a01027c6f Binary files /dev/null and "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/01-event_loop.jpg" differ diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/02.jpg" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/02.jpg" new file mode 100644 index 000000000..d7a98e857 Binary files /dev/null and "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/02.jpg" differ diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/03.jpg" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/03.jpg" new file mode 100644 index 000000000..1b0e95dd4 Binary files /dev/null and "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/03.jpg" differ diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/04.jpg" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/04.jpg" new file mode 100644 index 000000000..8178427d7 Binary files /dev/null and "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/04.jpg" differ diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/img.pptx" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/img.pptx" new file mode 100755 index 000000000..a740cba95 Binary files /dev/null and "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/2023\345\274\272\345\214\226/img/img.pptx" differ diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\346\240\274\345\274\217\345\244\204\347\220\206/01-\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\346\240\274\345\274\217\345\244\204\347\220\206/01-\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.html" index 03cd0332d..368e2b1db 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\346\240\274\345\274\217\345\244\204\347\220\206/01-\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\346\240\274\345\274\217\345\244\204\347\220\206/01-\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.html" @@ -7,28 +7,34 @@ \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/06-\344\274\252\346\225\260\347\273\204.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/06-\344\274\252\346\225\260\347\273\204.html" index 3197fd1da..426b2e47a 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/06-\344\274\252\346\225\260\347\273\204.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/06-\344\274\252\346\225\260\347\273\204.html" @@ -1,3 +1,10 @@ + @@ -6,6 +13,9 @@ \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Number.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Number.html" index f89fbfa62..a16ddafe8 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Number.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Number.html" @@ -45,6 +45,26 @@ console.log(Number.NaN);//NaN console.log(Number.constructor);//function Function() { [native code] } console.log(Number.prototype);//Number {[[PrimitiveValue]]: 0} +/** + * 属性 (es6) + */ +// Number.EPSILON 极小的常量,表示 1 与大于 1 的最小浮点数之间的差 +// MAX_SAFE_INTEGER / MIN_SAFE_INTEGER 最大/最小安全整数 + +// Number.EPSILON +// 极小的常量,表示 1 与大于 1 的最小浮点数之间的差,实际上是 JavaScript 能够表示的最小精度 +// 它的值接近于 2.2204460492503130808472633361816E-16,或者 2-52 +0.1 + 0.2 === 0.3; // false +equal = (Math.abs(0.1 - 0.3 + 0.2) < Number.EPSILON); // true 在误差范围内即视为相等 + +// MAX_SAFE_INTEGER / MIN_SAFE_INTEGER 最大/最小安全整数 +// 安全整数表示在 JavaScript 中能够精确表示的整数,安全整数的范围在 2 的 -53 次方到 2 的 53 次方之间(不包括两个端点),超过这个范围的整数无法精确表示 +// 最大安全整数,2^53-1 +Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2; // true +Number.MAX_SAFE_INTEGER === Number.MAX_SAFE_INTEGER + 1; // false +// 最小安全整数,-(2^53-1) +Number.MIN_SAFE_INTEGER + 1 === Number.MIN_SAFE_INTEGER + 2; // false +Number.MIN_SAFE_INTEGER === Number.MIN_SAFE_INTEGER - 1; // false /** * isNaN @@ -86,6 +106,38 @@ console.log(Number(7777).toPrecision(5));//7777.0 var str = num.toString(2); // 二进制 console.log(str); // 11.00100100001111110011111000000011011100001100110111 +/** + * 方法 (es6) + */ +// Number.isFinite() 检查一个数值是否为有限(finite),即不是Infinity +// Number.isNaN() 检查一个值是否为NaN +// Number.parseInt() 和全局方法相同,用于全局变量的模块化 +// Number.parseFloat() 和全局方法相同,用于全局变量的模块化 +// Number.isInteger() 判断一个数值是否为整数 +// Number.isSafeInteger() 判断一个整数是否在安全范围内 +Number.isFinite(0.8); // true +Number.isFinite(NaN); // false +Number.isFinite(Infinity); // false +Number.isFinite(-Infinity); // false +Number.isFinite('15'); // false +Number.isFinite(true); // false +Number.isNaN(NaN) // true +Number.isNaN(15) // false +Number.isNaN('15') // false +Number.isNaN(true) // false +Number.isNaN(9/NaN) // true +Number.isNaN('true' / 0) // true +Number.isNaN('true' / 'true') // true +Number.parseInt === parseInt // true +Number.parseFloat === parseFloat // true + +/** + * 进制 (es6) + * 二进制表示法新写法: 前缀 0b 或 0B + * 八进制表示法新写法: 前缀 0o 或 0O + */ +0b111110111 === 503 // true 二进制0b +0o767 === 503 // true 八进制0o /** * 类型转换,转换成数字 diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Object.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Object.html" index 2cabf3650..4725619ba 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Object.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/Object.html" @@ -8,6 +8,7 @@ \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/arguments.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/arguments.html" index 84d4a8f06..4050c6a83 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/arguments.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\346\225\260\346\215\256\347\261\273\345\236\213\344\270\216\350\275\254\346\215\242/arguments.html" @@ -1,3 +1,10 @@ + @@ -7,17 +14,6 @@ //函数内部的一个对象 arguments //当函数调用的时候,系统会将所有传入的实参,依次存入这个数组对象 -//【要求】允许函数调用时传入任意个数参数,并且函数返回这些数字中最大的数字 -function max(){ - // console.log(arguments); - var maxNum = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - maxNum = maxNum > arguments[i] ? maxNum :arguments[i]; - } - return maxNum; -} -console.log(max(1, 2, 34, 5, 6));//34 - //【要求】数组去重 var distinct = new Function(` var arr = []; @@ -30,6 +26,31 @@ `); console.log(distinct(1, 2, 34, 34, 5, 5));//[1, 2, 34, 5] +/** + * 默认参数表达式 & 参数长度 + */ +function f (x, y = 7, z = x + y) { // 默认参数表达式 + console.log(arguments.length) // 4 传入的参数个数,和形参无关 + console.log(f.length) // 1 第一个带默认参数前的参数个数 + return x * 10 + z +} +console.log(f(1, undefined, 3, 4)) // 13 + +/** + * 参数遍历 + */ +function sum () { + let num = 0 + Array.prototype.forEach.call(arguments, function (item) { + num += item * 2 + }) + Array.from(arguments).forEach(function (item) { + num += item * 2 + }) + return num +} +console.log(sum(1,2,3)) // 24 + diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\350\257\255\350\250\200\347\211\271\346\200\247/07-\344\275\234\347\224\250\345\237\237.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\350\257\255\350\250\200\347\211\271\346\200\247/07-\344\275\234\347\224\250\345\237\237.html" index 000c90fb4..e7da2b31b 100644 --- "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\350\257\255\350\250\200\347\211\271\346\200\247/07-\344\275\234\347\224\250\345\237\237.html" +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\350\257\255\350\250\200\347\211\271\346\200\247/07-\344\275\234\347\224\250\345\237\237.html" @@ -4,6 +4,13 @@ Title - - - -
-
-

-

- - \ No newline at end of file diff --git "a/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\351\253\230\347\272\247\347\211\271\346\200\247/03-\344\270\212\344\270\213\346\226\207\350\260\203\347\224\250\346\250\241\345\274\217call&apply&bind.html" "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\351\253\230\347\272\247\347\211\271\346\200\247/03-\344\270\212\344\270\213\346\226\207\350\260\203\347\224\250\346\250\241\345\274\217call&apply&bind.html" new file mode 100644 index 000000000..e564ab07b --- /dev/null +++ "b/01-JS\350\257\255\350\250\200\345\237\272\347\241\200/\351\253\230\347\272\247\347\211\271\346\200\247/03-\344\270\212\344\270\213\346\226\207\350\260\203\347\224\250\346\250\241\345\274\217call&apply&bind.html" @@ -0,0 +1,114 @@ + + + + +Title + + + + + +
+
+

+

+ + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/01-let&const.html" "b/02-ES\346\226\260\347\211\271\346\200\247/01-let&const.html" new file mode 100644 index 000000000..cae7957e3 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/01-let&const.html" @@ -0,0 +1,50 @@ + + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/02-\350\247\243\346\236\204\350\265\213\345\200\274.html" "b/02-ES\346\226\260\347\211\271\346\200\247/02-\350\247\243\346\236\204\350\265\213\345\200\274.html" new file mode 100644 index 000000000..9a4ac7881 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/02-\350\247\243\346\236\204\350\265\213\345\200\274.html" @@ -0,0 +1,82 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/03-Symbol.html" "b/02-ES\346\226\260\347\211\271\346\200\247/03-Symbol.html" new file mode 100644 index 000000000..07bdf1095 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/03-Symbol.html" @@ -0,0 +1,107 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/04-Map&Set.html" "b/02-ES\346\226\260\347\211\271\346\200\247/04-Map&Set.html" new file mode 100644 index 000000000..3ff0bc29b --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/04-Map&Set.html" @@ -0,0 +1,153 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/05-Proxy.html" "b/02-ES\346\226\260\347\211\271\346\200\247/05-Proxy.html" new file mode 100644 index 000000000..1e8c61cfb --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/05-Proxy.html" @@ -0,0 +1,155 @@ + + + + + + + + + es6 + + + + 详细 api 参考 Reflect & Proxy + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect&Proxy.html" "b/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect&Proxy.html" new file mode 100644 index 000000000..8d4ba8cb4 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect&Proxy.html" @@ -0,0 +1,521 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect.html" "b/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect.html" new file mode 100644 index 000000000..fdaad880f --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/05-Reflect.html" @@ -0,0 +1,91 @@ + + + + + + + + + es6 + + + + 详细 api 参考 Reflect & Proxy + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/06-String\345\255\227\347\254\246\344\270\262.html" "b/02-ES\346\226\260\347\211\271\346\200\247/06-String\345\255\227\347\254\246\344\270\262.html" new file mode 100644 index 000000000..04819b274 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/06-String\345\255\227\347\254\246\344\270\262.html" @@ -0,0 +1 @@ +见基础总结总结 \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/07-ES6\346\225\260\345\200\274.html" "b/02-ES\346\226\260\347\211\271\346\200\247/07-ES6\346\225\260\345\200\274.html" new file mode 100644 index 000000000..dd8913bd0 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/07-ES6\346\225\260\345\200\274.html" @@ -0,0 +1,8 @@ + +见基础总结 \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/08-Object\345\257\271\350\261\241.html" "b/02-ES\346\226\260\347\211\271\346\200\247/08-Object\345\257\271\350\261\241.html" new file mode 100644 index 000000000..8cfdccdc9 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/08-Object\345\257\271\350\261\241.html" @@ -0,0 +1,150 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/09-Array\346\225\260\347\273\204.html" "b/02-ES\346\226\260\347\211\271\346\200\247/09-Array\346\225\260\347\273\204.html" new file mode 100644 index 000000000..690bb8523 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/09-Array\346\225\260\347\273\204.html" @@ -0,0 +1,290 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/10-ES6\345\207\275\346\225\260.html" "b/02-ES\346\226\260\347\211\271\346\200\247/10-ES6\345\207\275\346\225\260.html" new file mode 100644 index 000000000..0610af9ad --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/10-ES6\345\207\275\346\225\260.html" @@ -0,0 +1,96 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/11-ES6-iterator\350\277\255\344\273\243\345\231\250.html" "b/02-ES\346\226\260\347\211\271\346\200\247/11-ES6-iterator\350\277\255\344\273\243\345\231\250.html" new file mode 100644 index 000000000..74a67b168 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/11-ES6-iterator\350\277\255\344\273\243\345\231\250.html" @@ -0,0 +1,192 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/12-ES6-Class\347\261\273.html" "b/02-ES\346\226\260\347\211\271\346\200\247/12-ES6-Class\347\261\273.html" new file mode 100644 index 000000000..99c08f55f --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/12-ES6-Class\347\261\273.html" @@ -0,0 +1,284 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/13-ES6\346\250\241\345\235\227.html" "b/02-ES\346\226\260\347\211\271\346\200\247/13-ES6\346\250\241\345\235\227.html" new file mode 100644 index 000000000..5928b157b --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/13-ES6\346\250\241\345\235\227.html" @@ -0,0 +1,81 @@ + + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/14-ES6-Promise\345\257\271\350\261\241.html" "b/02-ES\346\226\260\347\211\271\346\200\247/14-ES6-Promise\345\257\271\350\261\241.html" new file mode 100644 index 000000000..8d0c6c2af --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/14-ES6-Promise\345\257\271\350\261\241.html" @@ -0,0 +1,101 @@ + + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/15-ES6-Generator\345\207\275\346\225\260.html" "b/02-ES\346\226\260\347\211\271\346\200\247/15-ES6-Generator\345\207\275\346\225\260.html" new file mode 100644 index 000000000..3ebd635fd --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/15-ES6-Generator\345\207\275\346\225\260.html" @@ -0,0 +1,148 @@ + + + + + + +es6 + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/16-ES8-async\345\207\275\346\225\260.html" "b/02-ES\346\226\260\347\211\271\346\200\247/16-ES8-async\345\207\275\346\225\260.html" new file mode 100644 index 000000000..6a01abaa2 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/16-ES8-async\345\207\275\346\225\260.html" @@ -0,0 +1,51 @@ + + + + + + + +es + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/17-ES9-for-await-of.html" "b/02-ES\346\226\260\347\211\271\346\200\247/17-ES9-for-await-of.html" new file mode 100644 index 000000000..20f43f3bb --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/17-ES9-for-await-of.html" @@ -0,0 +1,86 @@ + + + + + + + +es + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/18-ES10-JSON.html" "b/02-ES\346\226\260\347\211\271\346\200\247/18-ES10-JSON.html" new file mode 100644 index 000000000..750664e5a --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/18-ES10-JSON.html" @@ -0,0 +1,24 @@ + + + + + + +es + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/19-ES10-BigInt.html" "b/02-ES\346\226\260\347\211\271\346\200\247/19-ES10-BigInt.html" new file mode 100644 index 000000000..53f27f37d --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/19-ES10-BigInt.html" @@ -0,0 +1,25 @@ + + + + + + +es + + + + + \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/.gitignore" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/.gitignore" deleted file mode 100644 index c8f50f7cd..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/.gitignore" +++ /dev/null @@ -1 +0,0 @@ -npm-debug.log diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/README.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/README.md" deleted file mode 100644 index 0dcb559b9..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/README.md" +++ /dev/null @@ -1,26 +0,0 @@ -# ECMAScript 6 入门 - -《ECMAScript 6 入门》是一本开源的 JavaScript 语言教程,全面介绍 ECMAScript 6 新引入的语法特性。 - -[![cover](images/cover_thumbnail.jpg)](images/cover-2nd.jpg) - -本书覆盖 ES6 与上一个版本 ES5 的所有不同之处,对涉及的语法知识给予详细介绍,并给出大量简洁易懂的示例代码。 - -本书为中级难度,适合已经掌握 ES5 的读者,用来了解这门语言的最新发展;也可当作参考手册,查寻新增的语法点。 - -全书已由电子工业出版社出版,目前是第二版,书名为《ES6 标准入门》。纸版是基于网站内容排版印刷的。 - -感谢张春雨编辑支持我将全书开源的做法。如果您认可这本书,建议购买纸版。这样可以使出版社不因出版开源书籍而亏钱,进而鼓励更多的作者开源自己的书籍。 - -- [京东](http://item.jd.com/11849235.html) -- [当当](http://product.dangdang.com/23840431.html) -- [亚马逊](http://www.amazon.cn/ES6-%E6%A0%87%E5%87%86%E5%85%A5%E9%97%A8-%E9%98%AE%E4%B8%80%E5%B3%B0/dp/B01A18WWAG/) -- [China-pub](http://product.china-pub.com/4904712) - -### 版权许可 - -本书采用“保持署名—非商用”创意共享4.0许可证。 - -只要保持原作者署名和非商用,您可以自由地阅读、分享、修改本书。 - -详细的法律条文请参见[创意共享](http://creativecommons.org/licenses/by-nc/4.0/)网站。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/config.js" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/config.js" deleted file mode 100644 index 2ea5eb093..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/config.js" +++ /dev/null @@ -1,26 +0,0 @@ -var CONFIG = { - // your website's title - document_title: "ECMAScript 6入门", - - // index page - index: "README.md", - - // sidebar file - sidebar_file: "sidebar.md", - - // where the docs are actually stored on github - so you can edit - base_url: "https://github.com/ruanyf/es6tutorial/edit/gh-pages", -}; - -// ************************** -// DON'T EDIT FOLLOWING CODES -// ************************** - -addConfig(ditto, CONFIG); - -function addConfig(obj, conf) { - Object.keys(conf).forEach(function (key) { - obj[key] = conf[key]; - }); -} - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/normalize.css" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/normalize.css" deleted file mode 100644 index 3d9454653..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/normalize.css" +++ /dev/null @@ -1 +0,0 @@ -../app/bower_components/normalize-css/normalize.css \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/array.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/array.md" deleted file mode 100644 index f3626270b..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/array.md" +++ /dev/null @@ -1,499 +0,0 @@ -# 数组的扩展 - -## Array.from() - -`Array.from`方法用于将两类对象转为真正的数组:类似数组的对象(array-like object)和可遍历(iterable)的对象(包括ES6新增的数据结构Set和Map)。 - -下面是一个类似数组的对象,`Array.from`将它转为真正的数组。 - -```javascript -let arrayLike = { - '0': 'a', - '1': 'b', - '2': 'c', - length: 3 -}; - -// ES5的写法 -var arr1 = [].slice.call(arrayLike); // ['a', 'b', 'c'] - -// ES6的写法 -let arr2 = Array.from(arrayLike); // ['a', 'b', 'c'] -``` - -实际应用中,常见的类似数组的对象是DOM操作返回的NodeList集合,以及函数内部的`arguments`对象。`Array.from`都可以将它们转为真正的数组。 - -```javascript -// NodeList对象 -let ps = document.querySelectorAll('p'); -Array.from(ps).forEach(function (p) { - console.log(p); -}); - -// arguments对象 -function foo() { - var args = Array.from(arguments); - // ... -} -``` - -上面代码中,`querySelectorAll`方法返回的是一个类似数组的对象,只有将这个对象转为真正的数组,才能使用`forEach`方法。 - -只要是部署了Iterator接口的数据结构,`Array.from`都能将其转为数组。 - -```javascript -Array.from('hello') -// ['h', 'e', 'l', 'l', 'o'] - -let namesSet = new Set(['a', 'b']) -Array.from(namesSet) // ['a', 'b'] -``` - -上面代码中,字符串和Set结构都具有Iterator接口,因此可以被`Array.from`转为真正的数组。 - -如果参数是一个真正的数组,`Array.from`会返回一个一模一样的新数组。 - -```javascript -Array.from([1, 2, 3]) -// [1, 2, 3] -``` - -值得提醒的是,扩展运算符(`...`)也可以将某些数据结构转为数组。 - -```javascript -// arguments对象 -function foo() { - var args = [...arguments]; -} - -// NodeList对象 -[...document.querySelectorAll('div')] -``` - -扩展运算符背后调用的是遍历器接口(`Symbol.iterator`),如果一个对象没有部署这个接口,就无法转换。`Array.from`方法则是还支持类似数组的对象。所谓类似数组的对象,本质特征只有一点,即必须有`length`属性。因此,任何有`length`属性的对象,都可以通过`Array.from`方法转为数组,而此时扩展运算符就无法转换。 - -```javascript -Array.from({ length: 3 }); -// [ undefined, undefined, undefined ] -``` - -上面代码中,`Array.from`返回了一个具有三个成员的数组,每个位置的值都是`undefined`。扩展运算符转换不了这个对象。 - -对于还没有部署该方法的浏览器,可以用`Array.prototype.slice`方法替代。 - -```javascript -const toArray = (() => - Array.from ? Array.from : obj => [].slice.call(obj) -)(); -``` - -`Array.from`还可以接受第二个参数,作用类似于数组的`map`方法,用来对每个元素进行处理,将处理后的值放入返回的数组。 - -```javascript -Array.from(arrayLike, x => x * x); -// 等同于 -Array.from(arrayLike).map(x => x * x); - -Array.from([1, 2, 3], (x) => x * x) -// [1, 4, 9] -``` - -下面的例子是取出一组DOM节点的文本内容。 - -```javascript -let spans = document.querySelectorAll('span.name'); - -// map() -let names1 = Array.prototype.map.call(spans, s => s.textContent); - -// Array.from() -let names2 = Array.from(spans, s => s.textContent) -``` - -下面的例子将数组中布尔值为`false`的成员转为`0`。 - -```javascript -Array.from([1, , 2, , 3], (n) => n || 0) -// [1, 0, 2, 0, 3] -``` - -另一个例子是返回各种数据的类型。 - -```javascript -function typesOf () { - return Array.from(arguments, value => typeof value) -} -typesOf(null, [], NaN) -// ['object', 'object', 'number'] -``` - -如果`map`函数里面用到了`this`关键字,还可以传入`Array.from`的第三个参数,用来绑定`this`。 - -`Array.from()`可以将各种值转为真正的数组,并且还提供`map`功能。这实际上意味着,只要有一个原始的数据结构,你就可以先对它的值进行处理,然后转成规范的数组结构,进而就可以使用数量众多的数组方法。 - -```javascript -Array.from({ length: 2 }, () => 'jack') -// ['jack', 'jack'] -``` - -上面代码中,`Array.from`的第一个参数指定了第二个参数运行的次数。这种特性可以让该方法的用法变得非常灵活。 - -`Array.from()`的另一个应用是,将字符串转为数组,然后返回字符串的长度。因为它能正确处理各种Unicode字符,可以避免JavaScript将大于`\uFFFF`的Unicode字符,算作两个字符的bug。 - -```javascript -function countSymbols(string) { - return Array.from(string).length; -} -``` - -## Array.of() - -`Array.of`方法用于将一组值,转换为数组。 - -```javascript -Array.of(3, 11, 8) // [3,11,8] -Array.of(3) // [3] -Array.of(3).length // 1 -``` - -这个方法的主要目的,是弥补数组构造函数`Array()`的不足。因为参数个数的不同,会导致`Array()`的行为有差异。 - -```javascript -Array() // [] -Array(3) // [, , ,] -Array(3, 11, 8) // [3, 11, 8] -``` - -上面代码中,`Array`方法没有参数、一个参数、三个参数时,返回结果都不一样。只有当参数个数不少于2个时,`Array()`才会返回由参数组成的新数组。参数个数只有一个时,实际上是指定数组的长度。 - -`Array.of`基本上可以用来替代`Array()`或`new Array()`,并且不存在由于参数不同而导致的重载。它的行为非常统一。 - -```javascript -Array.of() // [] -Array.of(undefined) // [undefined] -Array.of(1) // [1] -Array.of(1, 2) // [1, 2] -``` - -`Array.of`总是返回参数值组成的数组。如果没有参数,就返回一个空数组。 - -`Array.of`方法可以用下面的代码模拟实现。 - -```javascript -function ArrayOf(){ - return [].slice.call(arguments); -} -``` - -## 数组实例的copyWithin() - -数组实例的`copyWithin`方法,在当前数组内部,将指定位置的成员复制到其他位置(会覆盖原有成员),然后返回当前数组。也就是说,使用这个方法,会修改当前数组。 - -```javascript -Array.prototype.copyWithin(target, start = 0, end = this.length) -``` - -它接受三个参数。 - -- target(必需):从该位置开始替换数据。 -- start(可选):从该位置开始读取数据,默认为0。如果为负值,表示倒数。 -- end(可选):到该位置前停止读取数据,默认等于数组长度。如果为负值,表示倒数。 - -这三个参数都应该是数值,如果不是,会自动转为数值。 - -```javascript -[1, 2, 3, 4, 5].copyWithin(0, 3) -// [4, 5, 3, 4, 5] -``` - -上面代码表示将从3号位直到数组结束的成员(4和5),复制到从0号位开始的位置,结果覆盖了原来的1和2。 - -下面是更多例子。 - -```javascript -// 将3号位复制到0号位 -[1, 2, 3, 4, 5].copyWithin(0, 3, 4) -// [4, 2, 3, 4, 5] - -// -2相当于3号位,-1相当于4号位 -[1, 2, 3, 4, 5].copyWithin(0, -2, -1) -// [4, 2, 3, 4, 5] - -// 将3号位复制到0号位 -[].copyWithin.call({length: 5, 3: 1}, 0, 3) -// {0: 1, 3: 1, length: 5} - -// 将2号位到数组结束,复制到0号位 -var i32a = new Int32Array([1, 2, 3, 4, 5]); -i32a.copyWithin(0, 2); -// Int32Array [3, 4, 5, 4, 5] - -// 对于没有部署TypedArray的copyWithin方法的平台 -// 需要采用下面的写法 -[].copyWithin.call(new Int32Array([1, 2, 3, 4, 5]), 0, 3, 4); -// Int32Array [4, 2, 3, 4, 5] -``` - -## 数组实例的find()和findIndex() - -数组实例的`find`方法,用于找出第一个符合条件的数组成员。它的参数是一个回调函数,所有数组成员依次执行该回调函数,直到找出第一个返回值为`true`的成员,然后返回该成员。如果没有符合条件的成员,则返回`undefined`。 - -```javascript -[1, 4, -5, 10].find((n) => n < 0) -// -5 -``` - -上面代码找出数组中第一个小于0的成员。 - -```javascript -[1, 5, 10, 15].find(function(value, index, arr) { - return value > 9; -}) // 10 -``` - -上面代码中,`find`方法的回调函数可以接受三个参数,依次为当前的值、当前的位置和原数组。 - -数组实例的`findIndex`方法的用法与`find`方法非常类似,返回第一个符合条件的数组成员的位置,如果所有成员都不符合条件,则返回`-1`。 - -```javascript -[1, 5, 10, 15].findIndex(function(value, index, arr) { - return value > 9; -}) // 2 -``` - -这两个方法都可以接受第二个参数,用来绑定回调函数的`this`对象。 - -另外,这两个方法都可以发现`NaN`,弥补了数组的`IndexOf`方法的不足。 - -```javascript -[NaN].indexOf(NaN) -// -1 - -[NaN].findIndex(y => Object.is(NaN, y)) -// 0 -``` - -上面代码中,`indexOf`方法无法识别数组的`NaN`成员,但是`findIndex`方法可以借助`Object.is`方法做到。 - -## 数组实例的fill() - -`fill`方法使用给定值,填充一个数组。 - -```javascript -['a', 'b', 'c'].fill(7) -// [7, 7, 7] - -new Array(3).fill(7) -// [7, 7, 7] -``` - -上面代码表明,`fill`方法用于空数组的初始化非常方便。数组中已有的元素,会被全部抹去。 - -`fill`方法还可以接受第二个和第三个参数,用于指定填充的起始位置和结束位置。 - -```javascript -['a', 'b', 'c'].fill(7, 1, 2) -// ['a', 7, 'c'] -``` - -上面代码表示,`fill`方法从1号位开始,向原数组填充7,到2号位之前结束。 - -## 数组实例的entries(),keys()和values() - -ES6提供三个新的方法——`entries()`,`keys()`和`values()`——用于遍历数组。它们都返回一个遍历器对象(详见《Iterator》一章),可以用`for...of`循环进行遍历,唯一的区别是`keys()`是对键名的遍历、`values()`是对键值的遍历,`entries()`是对键值对的遍历。 - -```javascript -for (let index of ['a', 'b'].keys()) { - console.log(index); -} -// 0 -// 1 - -for (let elem of ['a', 'b'].values()) { - console.log(elem); -} -// 'a' -// 'b' - -for (let [index, elem] of ['a', 'b'].entries()) { - console.log(index, elem); -} -// 0 "a" -// 1 "b" -``` - -如果不使用`for...of`循环,可以手动调用遍历器对象的`next`方法,进行遍历。 - -```javascript -let letter = ['a', 'b', 'c']; -let entries = letter.entries(); -console.log(entries.next().value); // [0, 'a'] -console.log(entries.next().value); // [1, 'b'] -console.log(entries.next().value); // [2, 'c'] -``` - -## 数组实例的includes() - -`Array.prototype.includes`方法返回一个布尔值,表示某个数组是否包含给定的值,与字符串的`includes`方法类似。该方法属于ES7,但Babel转码器已经支持。 - -```javascript -[1, 2, 3].includes(2); // true -[1, 2, 3].includes(4); // false -[1, 2, NaN].includes(NaN); // true -``` - -该方法的第二个参数表示搜索的起始位置,默认为0。如果第二个参数为负数,则表示倒数的位置,如果这时它大于数组长度(比如第二个参数为-4,但数组长度为3),则会重置为从0开始。 - -```javascript -[1, 2, 3].includes(3, 3); // false -[1, 2, 3].includes(3, -1); // true -``` - -没有该方法之前,我们通常使用数组的`indexOf`方法,检查是否包含某个值。 - -```javascript -if (arr.indexOf(el) !== -1) { - // ... -} -``` - -`indexOf`方法有两个缺点,一是不够语义化,它的含义是找到参数值的第一个出现位置,所以要去比较是否不等于-1,表达起来不够直观。二是,它内部使用严格相当运算符(===)进行判断,这会导致对`NaN`的误判。 - -```javascript -[NaN].indexOf(NaN) -// -1 -``` - -`includes`使用的是不一样的判断算法,就没有这个问题。 - -```javascript -[NaN].includes(NaN) -// true -``` - -下面代码用来检查当前环境是否支持该方法,如果不支持,部署一个简易的替代版本。 - -```javascript -const contains = (() => - Array.prototype.includes - ? (arr, value) => arr.includes(value) - : (arr, value) => arr.some(el => el === value) -)(); -contains(["foo", "bar"], "baz"); // => false -``` - -另外,Map和Set数据结构有一个`has`方法,需要注意与`includes`区分。 - -- Map结构的`has`方法,是用来查找键名的,比如`Map.prototype.has(key)`、`WeakMap.prototype.has(key)`、`Reflect.has(target, propertyKey)`。 -- Set结构的`has`方法,是用来查找值的,比如`Set.prototype.has(value)`、`WeakSet.prototype.has(value)`。 - -## 数组的空位 - -数组的空位指,数组的某一个位置没有任何值。比如,`Array`构造函数返回的数组都是空位。 - -```javascript -Array(3) // [, , ,] -``` - -上面代码中,`Array(3)`返回一个具有3个空位的数组。 - -注意,空位不是`undefined`,一个位置的值等于`undefined`,依然是有值的。空位是没有任何值,`in`运算符可以说明这一点。 - -```javascript -0 in [undefined, undefined, undefined] // true -0 in [, , ,] // false -``` - -上面代码说明,第一个数组的0号位置是有值的,第二个数组的0号位置没有值。 - -ES5对空位的处理,已经很不一致了,大多数情况下会忽略空位。 - -- `forEach()`, `filter()`, `every()` 和`some()`都会跳过空位。 -- `map()`会跳过空位,但会保留这个值 -- `join()`和`toString()`会将空位视为`undefined`,而`undefined`和`null`会被处理成空字符串。 - -```javascript -// forEach方法 -[,'a'].forEach((x,i) => console.log(i)); // 1 - -// filter方法 -['a',,'b'].filter(x => true) // ['a','b'] - -// every方法 -[,'a'].every(x => x==='a') // true - -// some方法 -[,'a'].some(x => x !== 'a') // false - -// map方法 -[,'a'].map(x => 1) // [,1] - -// join方法 -[,'a',undefined,null].join('#') // "#a##" - -// toString方法 -[,'a',undefined,null].toString() // ",a,," -``` - -ES6则是明确将空位转为`undefined`。 - -`Array.from`方法会将数组的空位,转为`undefined`,也就是说,这个方法不会忽略空位。 - -```javascript -Array.from(['a',,'b']) -// [ "a", undefined, "b" ] -``` - -扩展运算符(`...`)也会将空位转为`undefined`。 - -```javascript -[...['a',,'b']] -// [ "a", undefined, "b" ] -``` - -`copyWithin()`会连空位一起拷贝。 - -```javascript -[,'a','b',,].copyWithin(2,0) // [,"a",,"a"] -``` - -`fill()`会将空位视为正常的数组位置。 - -```javascript -new Array(3).fill('a') // ["a","a","a"] -``` - -`for...of`循环也会遍历空位。 - -```javascript -let arr = [, ,]; -for (let i of arr) { - console.log(1); -} -// 1 -// 1 -``` - -上面代码中,数组`arr`有两个空位,`for...of`并没有忽略它们。如果改成`map`方法遍历,空位是会跳过的。 - -`entries()`、`keys()`、`values()`、`find()`和`findIndex()`会将空位处理成`undefined`。 - -```javascript -// entries() -[...[,'a'].entries()] // [[0,undefined], [1,"a"]] - -// keys() -[...[,'a'].keys()] // [0,1] - -// values() -[...[,'a'].values()] // [undefined,"a"] - -// find() -[,'a'].find(x => true) // undefined - -// findIndex() -[,'a'].findIndex(x => true) // 0 -``` - -由于空位的处理规则非常不统一,所以建议避免出现空位。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/arraybuffer.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/arraybuffer.md" deleted file mode 100644 index 9f74d2905..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/arraybuffer.md" +++ /dev/null @@ -1,1110 +0,0 @@ -# 二进制数组 - -二进制数组(`ArrayBuffer`对象、`TypedArray`视图和`DataView`视图)是 JavaScript 操作二进制数据的一个接口。这些对象早就存在,属于独立的规格(2011年2月发布),ES6 将它们纳入了 ECMAScript 规格,并且增加了新的方法。 - -这个接口的原始设计目的,与 WebGL 项目有关。所谓WebGL,就是指浏览器与显卡之间的通信接口,为了满足 JavaScript 与显卡之间大量的、实时的数据交换,它们之间的数据通信必须是二进制的,而不能是传统的文本格式。文本格式传递一个32位整数,两端的 JavaScript 脚本与显卡都要进行格式转化,将非常耗时。这时要是存在一种机制,可以像 C 语言那样,直接操作字节,将4个字节的32位整数,以二进制形式原封不动地送入显卡,脚本的性能就会大幅提升。 - -二进制数组就是在这种背景下诞生的。它很像C语言的数组,允许开发者以数组下标的形式,直接操作内存,大大增强了JavaScript处理二进制数据的能力,使得开发者有可能通过JavaScript与操作系统的原生接口进行二进制通信。 - -二进制数组由三类对象组成。 - -**(1)`ArrayBuffer`对象**:代表内存之中的一段二进制数据,可以通过“视图”进行操作。“视图”部署了数组接口,这意味着,可以用数组的方法操作内存。 - -**(2)TypedArray视图**:共包括9种类型的视图,比如`Uint8Array`(无符号8位整数)数组视图, `Int16Array`(16位整数)数组视图, `Float32Array`(32位浮点数)数组视图等等。 - -**(3)`DataView`视图**:可以自定义复合格式的视图,比如第一个字节是Uint8(无符号8位整数)、第二、三个字节是Int16(16位整数)、第四个字节开始是Float32(32位浮点数)等等,此外还可以自定义字节序。 - -简单说,`ArrayBuffer`对象代表原始的二进制数据,TypedArray视图用来读写简单类型的二进制数据,`DataView`视图用来读写复杂类型的二进制数据。 - -TypedArray视图支持的数据类型一共有9种(`DataView`视图支持除`Uint8C`以外的其他8种)。 - -数据类型 | 字节长度 | 含义 | 对应的C语言类型 ---------|--------|----|--------------- -Int8|1|8位带符号整数|signed char -Uint8|1|8位不带符号整数|unsigned char -Uint8C|1|8位不带符号整数(自动过滤溢出)|unsigned char -Int16|2|16位带符号整数|short -Uint16|2|16位不带符号整数|unsigned short -Int32|4|32位带符号整数|int -Uint32|4|32位不带符号的整数|unsigned int -Float32|4|32位浮点数|float -Float64|8|64位浮点数|double - -注意,二进制数组并不是真正的数组,而是类似数组的对象。 - -很多浏览器操作的API,用到了二进制数组操作二进制数据,下面是其中的几个。 - -- File API -- XMLHttpRequest -- Fetch API -- Canvas -- WebSockets - -## ArrayBuffer对象 - -### 概述 - -`ArrayBuffer`对象代表储存二进制数据的一段内存,它不能直接读写,只能通过视图(TypedArray视图和`DataView`视图)来读写,视图的作用是以指定格式解读二进制数据。 - -`ArrayBuffer`也是一个构造函数,可以分配一段可以存放数据的连续内存区域。 - -```javascript -var buf = new ArrayBuffer(32); -``` - -上面代码生成了一段32字节的内存区域,每个字节的值默认都是0。可以看到,`ArrayBuffer`构造函数的参数是所需要的内存大小(单位字节)。 - -为了读写这段内容,需要为它指定视图。`DataView`视图的创建,需要提供`ArrayBuffer`对象实例作为参数。 - -```javascript -var buf = new ArrayBuffer(32); -var dataView = new DataView(buf); -dataView.getUint8(0) // 0 -``` - -上面代码对一段32字节的内存,建立`DataView`视图,然后以不带符号的8位整数格式,读取第一个元素,结果得到0,因为原始内存的`ArrayBuffer`对象,默认所有位都是0。 - -另一种TypedArray视图,与`DataView`视图的一个区别是,它不是一个构造函数,而是一组构造函数,代表不同的数据格式。 - -```javascript -var buffer = new ArrayBuffer(12); - -var x1 = new Int32Array(buffer); -x1[0] = 1; -var x2 = new Uint8Array(buffer); -x2[0] = 2; - -x1[0] // 2 -``` - -上面代码对同一段内存,分别建立两种视图:32位带符号整数(`Int32Array`构造函数)和8位不带符号整数(`Uint8Array`构造函数)。由于两个视图对应的是同一段内存,一个视图修改底层内存,会影响到另一个视图。 - -TypedArray视图的构造函数,除了接受`ArrayBuffer`实例作为参数,还可以接受普通数组作为参数,直接分配内存生成底层的`ArrayBuffer`实例,并同时完成对这段内存的赋值。 - -```javascript -var typedArray = new Uint8Array([0,1,2]); -typedArray.length // 3 - -typedArray[0] = 5; -typedArray // [5, 1, 2] -``` - -上面代码使用TypedArray视图的`Uint8Array`构造函数,新建一个不带符号的8位整数视图。可以看到,`Uint8Array`直接使用普通数组作为参数,对底层内存的赋值同时完成。 - -### ArrayBuffer.prototype.byteLength - -`ArrayBuffer`实例的`byteLength`属性,返回所分配的内存区域的字节长度。 - -```javascript -var buffer = new ArrayBuffer(32); -buffer.byteLength -// 32 -``` - -如果要分配的内存区域很大,有可能分配失败(因为没有那么多的连续空余内存),所以有必要检查是否分配成功。 - -```javascript -if (buffer.byteLength === n) { - // 成功 -} else { - // 失败 -} -``` - -### ArrayBuffer.prototype.slice() - -`ArrayBuffer`实例有一个`slice`方法,允许将内存区域的一部分,拷贝生成一个新的`ArrayBuffer`对象。 - -```javascript -var buffer = new ArrayBuffer(8); -var newBuffer = buffer.slice(0, 3); -``` - -上面代码拷贝`buffer`对象的前3个字节(从0开始,到第3个字节前面结束),生成一个新的`ArrayBuffer`对象。`slice`方法其实包含两步,第一步是先分配一段新内存,第二步是将原来那个`ArrayBuffer`对象拷贝过去。 - -`slice`方法接受两个参数,第一个参数表示拷贝开始的字节序号(含该字节),第二个参数表示拷贝截止的字节序号(不含该字节)。如果省略第二个参数,则默认到原`ArrayBuffer`对象的结尾。 - -除了`slice`方法,`ArrayBuffer`对象不提供任何直接读写内存的方法,只允许在其上方建立视图,然后通过视图读写。 - -### ArrayBuffer.isView() - -`ArrayBuffer`有一个静态方法`isView`,返回一个布尔值,表示参数是否为`ArrayBuffer`的视图实例。这个方法大致相当于判断参数,是否为TypedArray实例或`DataView`实例。 - -```javascript -var buffer = new ArrayBuffer(8); -ArrayBuffer.isView(buffer) // false - -var v = new Int32Array(buffer); -ArrayBuffer.isView(v) // true -``` - -## TypedArray视图 - -### 概述 - -`ArrayBuffer`对象作为内存区域,可以存放多种类型的数据。同一段内存,不同数据有不同的解读方式,这就叫做“视图”(view)。`ArrayBuffer`有两种视图,一种是TypedArray视图,另一种是`DataView`视图。前者的数组成员都是同一个数据类型,后者的数组成员可以是不同的数据类型。 - -目前,TypedArray视图一共包括9种类型,每一种视图都是一种构造函数。 - -- **`Int8Array`**:8位有符号整数,长度1个字节。 -- **`Uint8Array`**:8位无符号整数,长度1个字节。 -- **`Uint8ClampedArray`**:8位无符号整数,长度1个字节,溢出处理不同。 -- **`Int16Array`**:16位有符号整数,长度2个字节。 -- **`Uint16Array`**:16位无符号整数,长度2个字节。 -- **`Int32Array`**:32位有符号整数,长度4个字节。 -- **`Uint32Array`**:32位无符号整数,长度4个字节。 -- **`Float32Array`**:32位浮点数,长度4个字节。 -- **`Float64Array`**:64位浮点数,长度8个字节。 - -这9个构造函数生成的数组,统称为TypedArray视图。它们很像普通数组,都有`length`属性,都能用方括号运算符(`[]`)获取单个元素,所有数组的方法,在它们上面都能使用。普通数组与TypedArray数组的差异主要在以下方面。 - -- TypedArray数组的所有成员,都是同一种类型。 -- TypedArray数组的成员是连续的,不会有空位。 -- TypedArray数组成员的默认值为0。比如,`new Array(10)`返回一个普通数组,里面没有任何成员,只是10个空位;`new Uint8Array(10)`返回一个TypedArray数组,里面10个成员都是0。 -- TypedArray数组只是一层视图,本身不储存数据,它的数据都储存在底层的`ArrayBuffer`对象之中,要获取底层对象必须使用`buffer`属性。 - -### 构造函数 - -TypedArray数组提供9种构造函数,用来生成相应类型的数组实例。 - -构造函数有多种用法。 - -**(1)TypedArray(buffer, byteOffset=0, length?)** - -同一个`ArrayBuffer`对象之上,可以根据不同的数据类型,建立多个视图。 - -```javascript -// 创建一个8字节的ArrayBuffer -var b = new ArrayBuffer(8); - -// 创建一个指向b的Int32视图,开始于字节0,直到缓冲区的末尾 -var v1 = new Int32Array(b); - -// 创建一个指向b的Uint8视图,开始于字节2,直到缓冲区的末尾 -var v2 = new Uint8Array(b, 2); - -// 创建一个指向b的Int16视图,开始于字节2,长度为2 -var v3 = new Int16Array(b, 2, 2); -``` - -上面代码在一段长度为8个字节的内存(`b`)之上,生成了三个视图:`v1`、`v2`和`v3`。 - -视图的构造函数可以接受三个参数: - -- 第一个参数(必需):视图对应的底层`ArrayBuffer`对象。 -- 第二个参数(可选):视图开始的字节序号,默认从0开始。 -- 第三个参数(可选):视图包含的数据个数,默认直到本段内存区域结束。 - -因此,`v1`、`v2`和`v3`是重叠的:`v1[0]`是一个32位整数,指向字节0~字节3;`v2[0]`是一个8位无符号整数,指向字节2;`v3[0]`是一个16位整数,指向字节2~字节3。只要任何一个视图对内存有所修改,就会在另外两个视图上反应出来。 - -注意,`byteOffset`必须与所要建立的数据类型一致,否则会报错。 - -```javascript -var buffer = new ArrayBuffer(8); -var i16 = new Int16Array(buffer, 1); -// Uncaught RangeError: start offset of Int16Array should be a multiple of 2 -``` - -上面代码中,新生成一个8个字节的`ArrayBuffer`对象,然后在这个对象的第一个字节,建立带符号的16位整数视图,结果报错。因为,带符号的16位整数需要两个字节,所以`byteOffset`参数必须能够被2整除。 - -如果想从任意字节开始解读`ArrayBuffer`对象,必须使用`DataView`视图,因为TypedArray视图只提供9种固定的解读格式。 - -**(2)TypedArray(length)** - -视图还可以不通过`ArrayBuffer`对象,直接分配内存而生成。 - -```javascript -var f64a = new Float64Array(8); -f64a[0] = 10; -f64a[1] = 20; -f64a[2] = f64a[0] + f64a[1]; -``` - -上面代码生成一个8个成员的`Float64Array`数组(共64字节),然后依次对每个成员赋值。这时,视图构造函数的参数就是成员的个数。可以看到,视图数组的赋值操作与普通数组的操作毫无两样。 - -**(3)TypedArray(typedArray)** - -TypedArray数组的构造函数,可以接受另一个TypedArray实例作为参数。 - -```javascript -var typedArray = new Int8Array(new Uint8Array(4)); -``` - -上面代码中,`Int8Array`构造函数接受一个`Uint8Array`实例作为参数。 - -注意,此时生成的新数组,只是复制了参数数组的值,对应的底层内存是不一样的。新数组会开辟一段新的内存储存数据,不会在原数组的内存之上建立视图。 - -```javascript -var x = new Int8Array([1, 1]); -var y = new Int8Array(x); -x[0] // 1 -y[0] // 1 - -x[0] = 2; -y[0] // 1 -``` - -上面代码中,数组`y`是以数组`x`为模板而生成的,当`x`变动的时候,`y`并没有变动。 - -如果想基于同一段内存,构造不同的视图,可以采用下面的写法。 - -```javascript -var x = new Int8Array([1, 1]); -var y = new Int8Array(x.buffer); -x[0] // 1 -y[0] // 1 - -x[0] = 2; -y[0] // 2 -``` - -**(4)TypedArray(arrayLikeObject)** - -构造函数的参数也可以是一个普通数组,然后直接生成TypedArray实例。 - -```javascript -var typedArray = new Uint8Array([1, 2, 3, 4]); -``` - -注意,这时TypedArray视图会重新开辟内存,不会在原数组的内存上建立视图。 - -上面代码从一个普通的数组,生成一个8位无符号整数的TypedArray实例。 - -TypedArray数组也可以转换回普通数组。 - -```javascript -var normalArray = Array.prototype.slice.call(typedArray); -``` - -### 数组方法 - -普通数组的操作方法和属性,对TypedArray数组完全适用。 - -- `TypedArray.prototype.copyWithin(target, start[, end = this.length])` -- `TypedArray.prototype.entries()` -- `TypedArray.prototype.every(callbackfn, thisArg?)` -- `TypedArray.prototype.fill(value, start=0, end=this.length)` -- `TypedArray.prototype.filter(callbackfn, thisArg?)` -- `TypedArray.prototype.find(predicate, thisArg?)` -- `TypedArray.prototype.findIndex(predicate, thisArg?)` -- `TypedArray.prototype.forEach(callbackfn, thisArg?)` -- `TypedArray.prototype.indexOf(searchElement, fromIndex=0)` -- `TypedArray.prototype.join(separator)` -- `TypedArray.prototype.keys()` -- `TypedArray.prototype.lastIndexOf(searchElement, fromIndex?)` -- `TypedArray.prototype.map(callbackfn, thisArg?)` -- `TypedArray.prototype.reduce(callbackfn, initialValue?)` -- `TypedArray.prototype.reduceRight(callbackfn, initialValue?)` -- `TypedArray.prototype.reverse()` -- `TypedArray.prototype.slice(start=0, end=this.length)` -- `TypedArray.prototype.some(callbackfn, thisArg?)` -- `TypedArray.prototype.sort(comparefn)` -- `TypedArray.prototype.toLocaleString(reserved1?, reserved2?)` -- `TypedArray.prototype.toString()` -- `TypedArray.prototype.values()` - -上面所有方法的用法,请参阅数组方法的介绍,这里不再重复了。 - -注意,TypedArray数组没有`concat`方法。如果想要合并多个TypedArray数组,可以用下面这个函数。 - -```javascript -function concatenate(resultConstructor, ...arrays) { - let totalLength = 0; - for (let arr of arrays) { - totalLength += arr.length; - } - let result = new resultConstructor(totalLength); - let offset = 0; - for (let arr of arrays) { - result.set(arr, offset); - offset += arr.length; - } - return result; -} - -concatenate(Uint8Array, Uint8Array.of(1, 2), Uint8Array.of(3, 4)) -// Uint8Array [1, 2, 3, 4] -``` - -另外,TypedArray数组与普通数组一样,部署了Iterator接口,所以可以被遍历。 - -```javascript -let ui8 = Uint8Array.of(0, 1, 2); -for (let byte of ui8) { - console.log(byte); -} -// 0 -// 1 -// 2 -``` - -### 字节序 - -字节序指的是数值在内存中的表示方式。 - -```javascript -var buffer = new ArrayBuffer(16); -var int32View = new Int32Array(buffer); - -for (var i = 0; i < int32View.length; i++) { - int32View[i] = i * 2; -} -``` - -上面代码生成一个16字节的`ArrayBuffer`对象,然后在它的基础上,建立了一个32位整数的视图。由于每个32位整数占据4个字节,所以一共可以写入4个整数,依次为0,2,4,6。 - -如果在这段数据上接着建立一个16位整数的视图,则可以读出完全不一样的结果。 - -```javascript -var int16View = new Int16Array(buffer); - -for (var i = 0; i < int16View.length; i++) { - console.log("Entry " + i + ": " + int16View[i]); -} -// Entry 0: 0 -// Entry 1: 0 -// Entry 2: 2 -// Entry 3: 0 -// Entry 4: 4 -// Entry 5: 0 -// Entry 6: 6 -// Entry 7: 0 -``` - -由于每个16位整数占据2个字节,所以整个`ArrayBuffer`对象现在分成8段。然后,由于x86体系的计算机都采用小端字节序(little endian),相对重要的字节排在后面的内存地址,相对不重要字节排在前面的内存地址,所以就得到了上面的结果。 - -比如,一个占据四个字节的16进制数`0x12345678`,决定其大小的最重要的字节是“12”,最不重要的是“78”。小端字节序将最不重要的字节排在前面,储存顺序就是`78563412`;大端字节序则完全相反,将最重要的字节排在前面,储存顺序就是`12345678`。目前,所有个人电脑几乎都是小端字节序,所以TypedArray数组内部也采用小端字节序读写数据,或者更准确的说,按照本机操作系统设定的字节序读写数据。 - -这并不意味大端字节序不重要,事实上,很多网络设备和特定的操作系统采用的是大端字节序。这就带来一个严重的问题:如果一段数据是大端字节序,TypedArray数组将无法正确解析,因为它只能处理小端字节序!为了解决这个问题,JavaScript引入`DataView`对象,可以设定字节序,下文会详细介绍。 - -下面是另一个例子。 - -```javascript -// 假定某段buffer包含如下字节 [0x02, 0x01, 0x03, 0x07] -var buffer = new ArrayBuffer(4); -var v1 = new Uint8Array(buffer); -v1[0] = 2; -v1[1] = 1; -v1[2] = 3; -v1[3] = 7; - -var uInt16View = new Uint16Array(buffer); - -// 计算机采用小端字节序 -// 所以头两个字节等于258 -if (uInt16View[0] === 258) { - console.log('OK'); // "OK" -} - -// 赋值运算 -uInt16View[0] = 255; // 字节变为[0xFF, 0x00, 0x03, 0x07] -uInt16View[0] = 0xff05; // 字节变为[0x05, 0xFF, 0x03, 0x07] -uInt16View[1] = 0x0210; // 字节变为[0x05, 0xFF, 0x10, 0x02] -``` - -下面的函数可以用来判断,当前视图是小端字节序,还是大端字节序。 - -```javascript -const BIG_ENDIAN = Symbol('BIG_ENDIAN'); -const LITTLE_ENDIAN = Symbol('LITTLE_ENDIAN'); - -function getPlatformEndianness() { - let arr32 = Uint32Array.of(0x12345678); - let arr8 = new Uint8Array(arr32.buffer); - switch ((arr8[0]*0x1000000) + (arr8[1]*0x10000) + (arr8[2]*0x100) + (arr8[3])) { - case 0x12345678: - return BIG_ENDIAN; - case 0x78563412: - return LITTLE_ENDIAN; - default: - throw new Error('Unknown endianness'); - } -} -``` - -总之,与普通数组相比,TypedArray数组的最大优点就是可以直接操作内存,不需要数据类型转换,所以速度快得多。 - -### BYTES_PER_ELEMENT属性 - -每一种视图的构造函数,都有一个`BYTES_PER_ELEMENT`属性,表示这种数据类型占据的字节数。 - -```javascript -Int8Array.BYTES_PER_ELEMENT // 1 -Uint8Array.BYTES_PER_ELEMENT // 1 -Int16Array.BYTES_PER_ELEMENT // 2 -Uint16Array.BYTES_PER_ELEMENT // 2 -Int32Array.BYTES_PER_ELEMENT // 4 -Uint32Array.BYTES_PER_ELEMENT // 4 -Float32Array.BYTES_PER_ELEMENT // 4 -Float64Array.BYTES_PER_ELEMENT // 8 -``` - -这个属性在TypedArray实例上也能获取,即有`TypedArray.prototype.BYTES_PER_ELEMENT`。 - -### ArrayBuffer与字符串的互相转换 - -`ArrayBuffer`转为字符串,或者字符串转为`ArrayBuffer`,有一个前提,即字符串的编码方法是确定的。假定字符串采用UTF-16编码(JavaScript的内部编码方式),可以自己编写转换函数。 - -```javascript -// ArrayBuffer转为字符串,参数为ArrayBuffer对象 -function ab2str(buf) { - return String.fromCharCode.apply(null, new Uint16Array(buf)); -} - -// 字符串转为ArrayBuffer对象,参数为字符串 -function str2ab(str) { - var buf = new ArrayBuffer(str.length * 2); // 每个字符占用2个字节 - var bufView = new Uint16Array(buf); - for (var i = 0, strLen = str.length; i < strLen; i++) { - bufView[i] = str.charCodeAt(i); - } - return buf; -} -``` - -### 溢出 - -不同的视图类型,所能容纳的数值范围是确定的。超出这个范围,就会出现溢出。比如,8位视图只能容纳一个8位的二进制值,如果放入一个9位的值,就会溢出。 - -TypedArray数组的溢出处理规则,简单来说,就是抛弃溢出的位,然后按照视图类型进行解释。 - -```javascript -var uint8 = new Uint8Array(1); - -uint8[0] = 256; -uint8[0] // 0 - -uint8[0] = -1; -uint8[0] // 255 -``` - -上面代码中,`uint8`是一个8位视图,而256的二进制形式是一个9位的值`100000000`,这时就会发生溢出。根据规则,只会保留后8位,即`00000000`。`uint8`视图的解释规则是无符号的8位整数,所以`00000000`就是`0`。 - -负数在计算机内部采用“2的补码”表示,也就是说,将对应的正数值进行否运算,然后加`1`。比如,`-1`对应的正值是`1`,进行否运算以后,得到`11111110`,再加上`1`就是补码形式`11111111`。`uint8`按照无符号的8位整数解释`11111111`,返回结果就是`255`。 - -一个简单转换规则,可以这样表示。 - -- 正向溢出(overflow):当输入值大于当前数据类型的最大值,结果等于当前数据类型的最小值加上余值,再减去1。 -- 负向溢出(underflow):当输入值小于当前数据类型的最小值,结果等于当前数据类型的最大值减去余值,再加上1。 - -上面的“余值”就是模运算的结果,即 JavaScript 里面的`%`运算符的结果。 - -```javascript -12 % 4 // 0 -12 % 5 // 2 -``` - -上面代码中,12除以4是没有余值的,而除以5会得到余值2。 - -请看下面的例子。 - -```javascript -var int8 = new Int8Array(1); - -int8[0] = 128; -int8[0] // -128 - -int8[0] = -129; -int8[0] // 127 -``` - -上面例子中,`int8`是一个带符号的8位整数视图,它的最大值是127,最小值是-128。输入值为`128`时,相当于正向溢出`1`,根据“最小值加上余值(128除以127的余值是1),再减去1”的规则,就会返回`-128`;输入值为`-129`时,相当于负向溢出`1`,根据“最大值减去余值(-129除以-128的余值是1),再加上1”的规则,就会返回`127`。 - -`Uint8ClampedArray`视图的溢出规则,与上面的规则不同。它规定,凡是发生正向溢出,该值一律等于当前数据类型的最大值,即255;如果发生负向溢出,该值一律等于当前数据类型的最小值,即0。 - -```javascript -var uint8c = new Uint8ClampedArray(1); - -uint8c[0] = 256; -uint8c[0] // 255 - -uint8c[0] = -1; -uint8c[0] // 0 -``` - -上面例子中,`uint8C`是一个`Uint8ClampedArray`视图,正向溢出时都返回255,负向溢出都返回0。 - -### TypedArray.prototype.buffer - -TypedArray实例的`buffer`属性,返回整段内存区域对应的`ArrayBuffer`对象。该属性为只读属性。 - -```javascript -var a = new Float32Array(64); -var b = new Uint8Array(a.buffer); -``` - -上面代码的`a`视图对象和`b`视图对象,对应同一个`ArrayBuffer`对象,即同一段内存。 - -### TypedArray.prototype.byteLength,TypedArray.prototype.byteOffset - -`byteLength`属性返回TypedArray数组占据的内存长度,单位为字节。`byteOffset`属性返回TypedArray数组从底层`ArrayBuffer`对象的哪个字节开始。这两个属性都是只读属性。 - -```javascript -var b = new ArrayBuffer(8); - -var v1 = new Int32Array(b); -var v2 = new Uint8Array(b, 2); -var v3 = new Int16Array(b, 2, 2); - -v1.byteLength // 8 -v2.byteLength // 6 -v3.byteLength // 4 - -v1.byteOffset // 0 -v2.byteOffset // 2 -v3.byteOffset // 2 -``` - -### TypedArray.prototype.length - -`length`属性表示TypedArray数组含有多少个成员。注意将`byteLength`属性和`length`属性区分,前者是字节长度,后者是成员长度。 - -```javascript -var a = new Int16Array(8); - -a.length // 8 -a.byteLength // 16 -``` - -### TypedArray.prototype.set() - -TypedArray数组的`set`方法用于复制数组(普通数组或TypedArray数组),也就是将一段内容完全复制到另一段内存。 - -```javascript -var a = new Uint8Array(8); -var b = new Uint8Array(8); - -b.set(a); -``` - -上面代码复制`a`数组的内容到`b`数组,它是整段内存的复制,比一个个拷贝成员的那种复制快得多。 - -`set`方法还可以接受第二个参数,表示从`b`对象的哪一个成员开始复制`a`对象。 - -```javascript -var a = new Uint16Array(8); -var b = new Uint16Array(10); - -b.set(a, 2) -``` - -上面代码的`b`数组比`a`数组多两个成员,所以从`b[2]`开始复制。 - -### TypedArray.prototype.subarray() - -`subarray`方法是对于TypedArray数组的一部分,再建立一个新的视图。 - -```javascript -var a = new Uint16Array(8); -var b = a.subarray(2,3); - -a.byteLength // 16 -b.byteLength // 2 -``` - -`subarray`方法的第一个参数是起始的成员序号,第二个参数是结束的成员序号(不含该成员),如果省略则包含剩余的全部成员。所以,上面代码的`a.subarray(2,3)`,意味着b只包含`a[2]`一个成员,字节长度为2。 - -### TypedArray.prototype.slice() - -TypeArray实例的`slice`方法,可以返回一个指定位置的新的TypedArray实例。 - -```javascript -let ui8 = Uint8Array.of(0, 1, 2); -ui8.slice(-1) -// Uint8Array [ 2 ] -``` - -上面代码中,`ui8`是8位无符号整数数组视图的一个实例。它的`slice`方法可以从当前视图之中,返回一个新的视图实例。 - -`slice`方法的参数,表示原数组的具体位置,开始生成新数组。负值表示逆向的位置,即-1为倒数第一个位置,-2表示倒数第二个位置,以此类推。 - -### TypedArray.of() - -TypedArray数组的所有构造函数,都有一个静态方法`of`,用于将参数转为一个TypedArray实例。 - -```javascript -Float32Array.of(0.151, -8, 3.7) -// Float32Array [ 0.151, -8, 3.7 ] -``` - -下面三种方法都会生成同样一个TypedArray数组。 - -```javascript -// 方法一 -let tarr = new Uint8Array([1,2,3]); - -// 方法二 -let tarr = Uint8Array.of(1,2,3); - -// 方法三 -let tarr = new Uint8Array(3); -tarr[0] = 1; -tarr[1] = 2; -tarr[2] = 3; -``` - -### TypedArray.from() - -静态方法`from`接受一个可遍历的数据结构(比如数组)作为参数,返回一个基于这个结构的TypedArray实例。 - -```javascript -Uint16Array.from([0, 1, 2]) -// Uint16Array [ 0, 1, 2 ] -``` - -这个方法还可以将一种TypedArray实例,转为另一种。 - -```javascript -var ui16 = Uint16Array.from(Uint8Array.of(0, 1, 2)); -ui16 instanceof Uint16Array // true -``` - -`from`方法还可以接受一个函数,作为第二个参数,用来对每个元素进行遍历,功能类似`map`方法。 - -```javascript -Int8Array.of(127, 126, 125).map(x => 2 * x) -// Int8Array [ -2, -4, -6 ] - -Int16Array.from(Int8Array.of(127, 126, 125), x => 2 * x) -// Int16Array [ 254, 252, 250 ] -``` - -上面的例子中,`from`方法没有发生溢出,这说明遍历不是针对原来的8位整数数组。也就是说,`from`会将第一个参数指定的TypedArray数组,拷贝到另一段内存之中,处理之后再将结果转成指定的数组格式。 - -## 复合视图 - -由于视图的构造函数可以指定起始位置和长度,所以在同一段内存之中,可以依次存放不同类型的数据,这叫做“复合视图”。 - -```javascript -var buffer = new ArrayBuffer(24); - -var idView = new Uint32Array(buffer, 0, 1); -var usernameView = new Uint8Array(buffer, 4, 16); -var amountDueView = new Float32Array(buffer, 20, 1); -``` - -上面代码将一个24字节长度的`ArrayBuffer`对象,分成三个部分: - -- 字节0到字节3:1个32位无符号整数 -- 字节4到字节19:16个8位整数 -- 字节20到字节23:1个32位浮点数 - -这种数据结构可以用如下的C语言描述: - -```c -struct someStruct { - unsigned long id; - char username[16]; - float amountDue; -}; -``` - -## DataView视图 - -如果一段数据包括多种类型(比如服务器传来的HTTP数据),这时除了建立`ArrayBuffer`对象的复合视图以外,还可以通过`DataView`视图进行操作。 - -`DataView`视图提供更多操作选项,而且支持设定字节序。本来,在设计目的上,`ArrayBuffer`对象的各种TypedArray视图,是用来向网卡、声卡之类的本机设备传送数据,所以使用本机的字节序就可以了;而`DataView`视图的设计目的,是用来处理网络设备传来的数据,所以大端字节序或小端字节序是可以自行设定的。 - -`DataView`视图本身也是构造函数,接受一个`ArrayBuffer`对象作为参数,生成视图。 - -```javascript -DataView(ArrayBuffer buffer [, 字节起始位置 [, 长度]]); -``` - -下面是一个例子。 - -```javascript -var buffer = new ArrayBuffer(24); -var dv = new DataView(buffer); -``` - -`DataView`实例有以下属性,含义与TypedArray实例的同名方法相同。 - -- `DataView.prototype.buffer`:返回对应的ArrayBuffer对象 -- `DataView.prototype.byteLength`:返回占据的内存字节长度 -- `DataView.prototype.byteOffset`:返回当前视图从对应的ArrayBuffer对象的哪个字节开始 - -`DataView`实例提供8个方法读取内存。 - -- **`getInt8`**:读取1个字节,返回一个8位整数。 -- **`getUint8`**:读取1个字节,返回一个无符号的8位整数。 -- **`getInt16`**:读取2个字节,返回一个16位整数。 -- **`getUint16`**:读取2个字节,返回一个无符号的16位整数。 -- **`getInt32`**:读取4个字节,返回一个32位整数。 -- **`getUint32`**:读取4个字节,返回一个无符号的32位整数。 -- **`getFloat32`**:读取4个字节,返回一个32位浮点数。 -- **`getFloat64`**:读取8个字节,返回一个64位浮点数。 - -这一系列`get`方法的参数都是一个字节序号(不能是负数,否则会报错),表示从哪个字节开始读取。 - -```javascript -var buffer = new ArrayBuffer(24); -var dv = new DataView(buffer); - -// 从第1个字节读取一个8位无符号整数 -var v1 = dv.getUint8(0); - -// 从第2个字节读取一个16位无符号整数 -var v2 = dv.getUint16(1); - -// 从第4个字节读取一个16位无符号整数 -var v3 = dv.getUint16(3); -``` - -上面代码读取了`ArrayBuffer`对象的前5个字节,其中有一个8位整数和两个十六位整数。 - -如果一次读取两个或两个以上字节,就必须明确数据的存储方式,到底是小端字节序还是大端字节序。默认情况下,`DataView`的`get`方法使用大端字节序解读数据,如果需要使用小端字节序解读,必须在`get`方法的第二个参数指定`true`。 - -```javascript -// 小端字节序 -var v1 = dv.getUint16(1, true); - -// 大端字节序 -var v2 = dv.getUint16(3, false); - -// 大端字节序 -var v3 = dv.getUint16(3); -``` - -DataView视图提供8个方法写入内存。 - -- **`setInt8`**:写入1个字节的8位整数。 -- **`setUint8`**:写入1个字节的8位无符号整数。 -- **`setInt16`**:写入2个字节的16位整数。 -- **`setUint16`**:写入2个字节的16位无符号整数。 -- **`setInt32`**:写入4个字节的32位整数。 -- **`setUint32`**:写入4个字节的32位无符号整数。 -- **`setFloat32`**:写入4个字节的32位浮点数。 -- **`setFloat64`**:写入8个字节的64位浮点数。 - -这一系列`set`方法,接受两个参数,第一个参数是字节序号,表示从哪个字节开始写入,第二个参数为写入的数据。对于那些写入两个或两个以上字节的方法,需要指定第三个参数,`false`或者`undefined`表示使用大端字节序写入,`true`表示使用小端字节序写入。 - -```javascript -// 在第1个字节,以大端字节序写入值为25的32位整数 -dv.setInt32(0, 25, false); - -// 在第5个字节,以大端字节序写入值为25的32位整数 -dv.setInt32(4, 25); - -// 在第9个字节,以小端字节序写入值为2.5的32位浮点数 -dv.setFloat32(8, 2.5, true); -``` - -如果不确定正在使用的计算机的字节序,可以采用下面的判断方式。 - -```javascript -var littleEndian = (function() { - var buffer = new ArrayBuffer(2); - new DataView(buffer).setInt16(0, 256, true); - return new Int16Array(buffer)[0] === 256; -})(); -``` - -如果返回`true`,就是小端字节序;如果返回`false`,就是大端字节序。 - -## 二进制数组的应用 - -大量的Web API用到了`ArrayBuffer`对象和它的视图对象。 - -### AJAX - -传统上,服务器通过AJAX操作只能返回文本数据,即`responseType`属性默认为`text`。`XMLHttpRequest`第二版`XHR2`允许服务器返回二进制数据,这时分成两种情况。如果明确知道返回的二进制数据类型,可以把返回类型(`responseType`)设为`arraybuffer`;如果不知道,就设为`blob`。 - -```javascript -var xhr = new XMLHttpRequest(); -xhr.open('GET', someUrl); -xhr.responseType = 'arraybuffer'; - -xhr.onload = function () { - let arrayBuffer = xhr.response; - // ··· -}; - -xhr.send(); -``` - -如果知道传回来的是32位整数,可以像下面这样处理。 - -```javascript -xhr.onreadystatechange = function () { - if (req.readyState === 4 ) { - var arrayResponse = xhr.response; - var dataView = new DataView(arrayResponse); - var ints = new Uint32Array(dataView.byteLength / 4); - - xhrDiv.style.backgroundColor = "#00FF00"; - xhrDiv.innerText = "Array is " + ints.length + "uints long"; - } -} -``` - -### Canvas - -网页`Canvas`元素输出的二进制像素数据,就是TypedArray数组。 - -```javascript -var canvas = document.getElementById('myCanvas'); -var ctx = canvas.getContext('2d'); - -var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); -var uint8ClampedArray = imageData.data; -``` - -需要注意的是,上面代码的`uint8ClampedArray`虽然是一个TypedArray数组,但是它的视图类型是一种针对`Canvas`元素的专有类型`Uint8ClampedArray`。这个视图类型的特点,就是专门针对颜色,把每个字节解读为无符号的8位整数,即只能取值0~255,而且发生运算的时候自动过滤高位溢出。这为图像处理带来了巨大的方便。 - -举例来说,如果把像素的颜色值设为`Uint8Array`类型,那么乘以一个gamma值的时候,就必须这样计算: - -```javascript -u8[i] = Math.min(255, Math.max(0, u8[i] * gamma)); -``` - -因为`Uint8Array`类型对于大于255的运算结果(比如`0xFF+1`),会自动变为`0x00`,所以图像处理必须要像上面这样算。这样做很麻烦,而且影响性能。如果将颜色值设为`Uint8ClampedArray`类型,计算就简化许多。 - -```javascript -pixels[i] *= gamma; -``` - -`Uint8ClampedArray`类型确保将小于0的值设为0,将大于255的值设为255。注意,IE 10不支持该类型。 - -### WebSocket - -`WebSocket`可以通过`ArrayBuffer`,发送或接收二进制数据。 - -```javascript -var socket = new WebSocket('ws://127.0.0.1:8081'); -socket.binaryType = 'arraybuffer'; - -// Wait until socket is open -socket.addEventListener('open', function (event) { - // Send binary data - var typedArray = new Uint8Array(4); - socket.send(typedArray.buffer); -}); - -// Receive binary data -socket.addEventListener('message', function (event) { - var arrayBuffer = event.data; - // ··· -}); -``` - -### Fetch API - -Fetch API取回的数据,就是`ArrayBuffer`对象。 - -```javascript -fetch(url) -.then(function(request){ - return request.arrayBuffer() -}) -.then(function(arrayBuffer){ - // ... -}); -``` - -### File API - -如果知道一个文件的二进制数据类型,也可以将这个文件读取为`ArrayBuffer`对象。 - -```javascript -var fileInput = document.getElementById('fileInput'); -var file = fileInput.files[0]; -var reader = new FileReader(); -reader.readAsArrayBuffer(file); -reader.onload = function () { - var arrayBuffer = reader.result; - // ··· -}; -``` - -下面以处理bmp文件为例。假定`file`变量是一个指向bmp文件的文件对象,首先读取文件。 - -```javascript -var reader = new FileReader(); -reader.addEventListener("load", processimage, false); -reader.readAsArrayBuffer(file); -``` - -然后,定义处理图像的回调函数:先在二进制数据之上建立一个`DataView`视图,再建立一个`bitmap`对象,用于存放处理后的数据,最后将图像展示在`Canvas`元素之中。 - -```javascript -function processimage(e) { - var buffer = e.target.result; - var datav = new DataView(buffer); - var bitmap = {}; - // 具体的处理步骤 -} -``` - -具体处理图像数据时,先处理bmp的文件头。具体每个文件头的格式和定义,请参阅有关资料。 - -```javascript -bitmap.fileheader = {}; -bitmap.fileheader.bfType = datav.getUint16(0, true); -bitmap.fileheader.bfSize = datav.getUint32(2, true); -bitmap.fileheader.bfReserved1 = datav.getUint16(6, true); -bitmap.fileheader.bfReserved2 = datav.getUint16(8, true); -bitmap.fileheader.bfOffBits = datav.getUint32(10, true); -``` - -接着处理图像元信息部分。 - -```javascript -bitmap.infoheader = {}; -bitmap.infoheader.biSize = datav.getUint32(14, true); -bitmap.infoheader.biWidth = datav.getUint32(18, true); -bitmap.infoheader.biHeight = datav.getUint32(22, true); -bitmap.infoheader.biPlanes = datav.getUint16(26, true); -bitmap.infoheader.biBitCount = datav.getUint16(28, true); -bitmap.infoheader.biCompression = datav.getUint32(30, true); -bitmap.infoheader.biSizeImage = datav.getUint32(34, true); -bitmap.infoheader.biXPelsPerMeter = datav.getUint32(38, true); -bitmap.infoheader.biYPelsPerMeter = datav.getUint32(42, true); -bitmap.infoheader.biClrUsed = datav.getUint32(46, true); -bitmap.infoheader.biClrImportant = datav.getUint32(50, true); -``` - -最后处理图像本身的像素信息。 - -```javascript -var start = bitmap.fileheader.bfOffBits; -bitmap.pixels = new Uint8Array(buffer, start); -``` - -至此,图像文件的数据全部处理完成。下一步,可以根据需要,进行图像变形,或者转换格式,或者展示在`Canvas`网页元素之中。 - -## SharedArrayBuffer - -JavaScript 是单线程的,web worker 引入了多进程,每个进程的数据都是隔离的,通过`postMessage()`通信,即通信的数据是复制的。如果数据量比较大,这种通信的效率显然比较低。 - -```javascript -var w = new Worker('myworker.js'); -``` - -上面代码中,主进程新建了一个 Worker 进程。该进程与主进程之间会有一个通信渠道,主进程通过`w.postMessage`向 Worker 进程发消息,同时通过`message`事件监听 Worker 进程的回应。 - -```javascript -w.postMessage('hi'); -w.onmessage = function (ev) { - console.log(ev.data); -} -``` - -上面代码中,主进程先发一个消息`hi`,然后在监听到 Worker 进程的回应后,就将其打印出来。 - -Worker 进程也是通过监听`message`事件,来获取主进程发来的消息,并作出反应。 - -```javascript -onmessage = function (ev) { - console.log(ev.data); - postMessage('ho'); -} -``` - -主进程与 Worker 进程之间,可以传送各种数据,不仅仅是字符串,还可以传送二进制数据。很容易想到,如果有大量数据要传送,留出一块内存区域,主进程与 Worker 进程共享,两方都可以读写,那么就会大大提高效率。 - -ES2017 引入[`SharedArrayBuffer`](https://github.com/tc39/ecmascript_sharedmem/blob/master/TUTORIAL.md),允许多个 Worker 进程与主进程共享内存数据。`SharedArrayBuffer`的 API 与`ArrayBuffer`一模一样,唯一的区别是后者无法共享。 - -```javascript -// 新建 1KB 共享内存 -var sharedBuffer = new SharedArrayBuffer(1024); - -// 主窗口发送数据 -w.postMessage(sharedBuffer); - -// 本地写入数据 -const sharedArray = new Int32Array(sharedBuffer); -``` - -上面代码中,`postMessage`方法的参数是`SharedArrayBuffer`对象。 - -Worker 进程从事件的`data`属性上面取到数据。 - -```javascript -var sharedBuffer; -onmessage = function (ev) { - sharedBuffer = ev.data; // 1KB 的共享内存,就是主窗口共享出来的那块内存 -}; -``` - -共享内存也可以在 Worker 进程创建,发给主进程。 - -`SharedArrayBuffer`与`SharedArray`一样,本身是无法读写,必须在上面建立视图,然后通过视图读写。 - -```javascript -// 分配 10 万个 32 位整数占据的内存空间 -var sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 100000); - -// 建立 32 位整数视图 -var ia = new Int32Array(sab); // ia.length == 100000 - -// 新建一个质数生成器 -var primes = new PrimeGenerator(); - -// 将 10 万个质数,写入这段内存空间 -for ( let i=0 ; i < ia.length ; i++ ) - ia[i] = primes.next(); - -// 向 Worker 进程发送这段共享内存 -w.postMessage(ia); -``` - -Worker 进程收到数据后的处理如下。 - -```javascript -var ia; -onmessage = function (ev) { - ia = ev.data; - console.log(ia.length); // 100000 - console.log(ia[37]); // 输出 163,因为这是第138个质数 -}; -``` - -多个进程共享内存,最大的问题就是如何防止两个进程同时修改某个地址,或者说,当一个进程修改共享内存以后,必须有一个机制让其他进程同步。SharedArrayBuffer API 提供`Atomics`对象,保证所有共享内存的操作都是“原子性”的,并且可以在所有进程内同步。 - -```javascript -// 主进程 -var sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 100000); -var ia = new Int32Array(sab); - -for (let i = 0; i < ia.length; i++) { - ia[i] = primes.next(); // 将质数放入 ia -} - -// worker 进程 -ia[112]++; // 错误 -Atomics.add(ia, 112, 1); // 正确 -``` - -上面代码中,Worker 进程直接改写共享内存是不正确的。有两个原因,一是可能发生两个进程同时改写该地址,二是改写以后无法同步到其他 Worker 进程。所以,必须使用`Atomics.add()`方法进行改写。 - -下面是另一个例子。 - -```javascript -// 进程一 -console.log(ia[37]); // 163 -Atomics.store(ia, 37, 123456); -Atomics.wake(ia, 37, 1); - -// 进程二 -Atomics.wait(ia, 37, 163); -console.log(ia[37]); // 123456 -``` - -上面代码中,共享内存`ia`的第37号位置,原来的值是`163`。进程二使用`Atomics.wait()`方法,指定只要`ia[37]`等于`163`,就处于“等待”状态。进程一使用`Atomics.store()`方法,将`123456`放入`ia[37]`,然后使用`Atomics.wake()`方法将监视`ia[37]`的一个进程唤醒。 - -`Atomics`对象有以下方法。 - -- `Atomics.load(array, index)`:返回`array[index]`的值。 -- `Atomics.store(array, index, value)`:设置`array[index]`的值,返回这个值。 -- `Atomics.compareExchange(array, index, oldval, newval)`:如果`array[index]`等于`oldval`,就写入`newval`,返回`oldval`。 -- `Atomics.exchange(array, index, value)`:设置`array[index]`的值,返回旧的值。 -- `Atomics.add(array, index, value)`:将`value`加到`array[index]`,返回`array[index]`旧的值。 -- `Atomics.sub(array, index, value)`:将`value`从`array[index]`减去,返回`array[index]`旧的值。 -- `Atomics.and(array, index, value)`:将`value`与`array[index]`进行位运算`and`,放入`array[index]`,并返回旧的值。 -- `Atomics.or(array, index, value)`:将`value`与`array[index]`进行位运算`or`,放入`array[index]`,并返回旧的值。 -- `Atomics.xor(array, index, value)`:将`vaule`与`array[index]`进行位运算`xor`,放入`array[index]`,并返回旧的值。 -- `Atomics.wait(array, index, value, timeout)`:如果`array[index]`等于`value`,进程就进入休眠状态,必须通过`Atomics.wake()`唤醒。`timeout`指定多少毫秒之后,进入休眠。返回值是三个字符串(ok、not-equal、timed-out)中的一个。 -- `Atomics.wake(array, index, count)`:唤醒指定数目在某个位置休眠的进程。 -- `Atomics.isLockFree(size)`:返回一个布尔值,表示`Atomics`对象是否可以处理某个`size`的内存锁定。如果返回`false`,应用程序就需要自己来实现锁定。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/async.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/async.md" deleted file mode 100644 index de1bc598d..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/async.md" +++ /dev/null @@ -1,882 +0,0 @@ -# async 函数 - -## 含义 - -ES2017 标准引入了 async 函数,使得异步操作变得更加方便。 - -async 函数是什么?一句话,它就是 Generator 函数的语法糖。 - -前文有一个 Generator 函数,依次读取两个文件。 - -```javascript -var fs = require('fs'); - -var readFile = function (fileName) { - return new Promise(function (resolve, reject) { - fs.readFile(fileName, function(error, data) { - if (error) reject(error); - resolve(data); - }); - }); -}; - -var gen = function* () { - var f1 = yield readFile('/etc/fstab'); - var f2 = yield readFile('/etc/shells'); - console.log(f1.toString()); - console.log(f2.toString()); -}; -``` - -写成`async`函数,就是下面这样。 - -```javascript -var asyncReadFile = async function () { - var f1 = await readFile('/etc/fstab'); - var f2 = await readFile('/etc/shells'); - console.log(f1.toString()); - console.log(f2.toString()); -}; -``` - -一比较就会发现,`async`函数就是将 Generator 函数的星号(`*`)替换成`async`,将`yield`替换成`await`,仅此而已。 - -`async`函数对 Generator 函数的改进,体现在以下四点。 - -(1)内置执行器。 - -Generator 函数的执行必须靠执行器,所以才有了`co`模块,而`async`函数自带执行器。也就是说,`async`函数的执行,与普通函数一模一样,只要一行。 - -```javascript -var result = asyncReadFile(); -``` - -上面的代码调用了`asyncReadFile`函数,然后它就会自动执行,输出最后结果。这完全不像 Generator 函数,需要调用`next`方法,或者用`co`模块,才能真正执行,得到最后结果。 - -(2)更好的语义。 - -`async`和`await`,比起星号和`yield`,语义更清楚了。`async`表示函数里有异步操作,`await`表示紧跟在后面的表达式需要等待结果。 - -(3)更广的适用性。 - -`co`模块约定,`yield`命令后面只能是 Thunk 函数或 Promise 对象,而`async`函数的`await`命令后面,可以是Promise 对象和原始类型的值(数值、字符串和布尔值,但这时等同于同步操作)。 - -(4)返回值是 Promise。 - -`async`函数的返回值是 Promise 对象,这比 Generator 函数的返回值是 Iterator 对象方便多了。你可以用`then`方法指定下一步的操作。 - -进一步说,`async`函数完全可以看作多个异步操作,包装成的一个 Promise 对象,而`await`命令就是内部`then`命令的语法糖。 - -## 用法 - -### 基本用法 - -`async`函数返回一个 Promise 对象,可以使用`then`方法添加回调函数。当函数执行的时候,一旦遇到`await`就会先返回,等到异步操作完成,再接着执行函数体内后面的语句。 - -下面是一个例子。 - -```javascript -async function getStockPriceByName(name) { - var symbol = await getStockSymbol(name); - var stockPrice = await getStockPrice(symbol); - return stockPrice; -} - -getStockPriceByName('goog').then(function (result) { - console.log(result); -}); -``` - -上面代码是一个获取股票报价的函数,函数前面的`async`关键字,表明该函数内部有异步操作。调用该函数时,会立即返回一个`Promise`对象。 - -下面是另一个例子,指定多少毫秒后输出一个值。 - -```javascript -function timeout(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); -} - -async function asyncPrint(value, ms) { - await timeout(ms); - console.log(value) -} - -asyncPrint('hello world', 50); -``` - -上面代码指定50毫秒以后,输出`hello world`。 - -async 函数有多种使用形式。 - -```javascript -// 函数声明 -async function foo() {} - -// 函数表达式 -const foo = async function () {}; - -// 对象的方法 -let obj = { async foo() {} }; -obj.foo().then(...) - -// Class 的方法 -class Storage { - constructor() { - this.cachePromise = caches.open('avatars'); - } - - async getAvatar(name) { - const cache = await this.cachePromise; - return cache.match(`/avatars/${name}.jpg`); - } -} - -const storage = new Storage(); -storage.getAvatar('jake').then(…); - -// 箭头函数 -const foo = async () => {}; -``` - -## 语法 - -`async`函数的语法规则总体上比较简单,难点是错误处理机制。 - -### 返回 Promise 对象 - -`async`函数返回一个 Promise 对象。 - -`async`函数内部`return`语句返回的值,会成为`then`方法回调函数的参数。 - -```javascript -async function f() { - return 'hello world'; -} - -f().then(v => console.log(v)) -// "hello world" -``` - -上面代码中,函数`f`内部`return`命令返回的值,会被`then`方法回调函数接收到。 - -`async`函数内部抛出错误,会导致返回的 Promise 对象变为`reject`状态。抛出的错误对象会被`catch`方法回调函数接收到。 - -```javascript -async function f() { - throw new Error('出错了'); -} - -f().then( - v => console.log(v), - e => console.log(e) -) -// Error: 出错了 -``` - -### Promise 对象的状态变化 - -`async`函数返回的 Promise 对象,必须等到内部所有`await`命令后面的 Promise 对象执行完,才会发生状态改变,除非遇到`return`语句或者抛出错误。也就是说,只有`async`函数内部的异步操作执行完,才会执行`then`方法指定的回调函数。 - -下面是一个例子。 - -```javascript -async function getTitle(url) { - let response = await fetch(url); - let html = await response.text(); - return html.match(/([\s\S]+)<\/title>/i)[1]; -} -getTitle('https://tc39.github.io/ecma262/').then(console.log) -// "ECMAScript 2017 Language Specification" -``` - -上面代码中,函数`getTitle`内部有三个操作:抓取网页、取出文本、匹配页面标题。只有这三个操作全部完成,才会执行`then`方法里面的`console.log`。 - -### await 命令 - -正常情况下,`await`命令后面是一个 Promise 对象。如果不是,会被转成一个立即`resolve`的 Promise 对象。 - -```javascript -async function f() { - return await 123; -} - -f().then(v => console.log(v)) -// 123 -``` - -上面代码中,`await`命令的参数是数值`123`,它被转成 Promise 对象,并立即`resolve`。 - -`await`命令后面的 Promise 对象如果变为`reject`状态,则`reject`的参数会被`catch`方法的回调函数接收到。 - -```javascript -async function f() { - await Promise.reject('出错了'); -} - -f() -.then(v => console.log(v)) -.catch(e => console.log(e)) -// 出错了 -``` - -注意,上面代码中,`await`语句前面没有`return`,但是`reject`方法的参数依然传入了`catch`方法的回调函数。这里如果在`await`前面加上`return`,效果是一样的。 - -只要一个`await`语句后面的 Promise 变为`reject`,那么整个`async`函数都会中断执行。 - -```javascript -async function f() { - await Promise.reject('出错了'); - await Promise.resolve('hello world'); // 不会执行 -} -``` - -上面代码中,第二个`await`语句是不会执行的,因为第一个`await`语句状态变成了`reject`。 - -有时,我们希望即使前一个异步操作失败,也不要中断后面的异步操作。这时可以将第一个`await`放在`try...catch`结构里面,这样不管这个异步操作是否成功,第二个`await`都会执行。 - -```javascript -async function f() { - try { - await Promise.reject('出错了'); - } catch(e) { - } - return await Promise.resolve('hello world'); -} - -f() -.then(v => console.log(v)) -// hello world -``` - -另一种方法是`await`后面的 Promise 对象再跟一个`catch`方法,处理前面可能出现的错误。 - -```javascript -async function f() { - await Promise.reject('出错了') - .catch(e => console.log(e)); - return await Promise.resolve('hello world'); -} - -f() -.then(v => console.log(v)) -// 出错了 -// hello world -``` - -### 错误处理 - -如果`await`后面的异步操作出错,那么等同于`async`函数返回的 Promise 对象被`reject`。 - -```javascript -async function f() { - await new Promise(function (resolve, reject) { - throw new Error('出错了'); - }); -} - -f() -.then(v => console.log(v)) -.catch(e => console.log(e)) -// Error:出错了 -``` - -上面代码中,`async`函数`f`执行后,`await`后面的 Promise 对象会抛出一个错误对象,导致`catch`方法的回调函数被调用,它的参数就是抛出的错误对象。具体的执行机制,可以参考后文的“async 函数的实现原理”。 - -防止出错的方法,也是将其放在`try...catch`代码块之中。 - -```javascript -async function f() { - try { - await new Promise(function (resolve, reject) { - throw new Error('出错了'); - }); - } catch(e) { - } - return await('hello world'); -} -``` - -如果有多个`await`命令,可以统一放在`try...catch`结构中。 - -```javascript -async function main() { - try { - var val1 = await firstStep(); - var val2 = await secondStep(val1); - var val3 = await thirdStep(val1, val2); - - console.log('Final: ', val3); - } - catch (err) { - console.error(err); - } -} -``` - -### 使用注意点 - -第一点,前面已经说过,`await`命令后面的`Promise`对象,运行结果可能是`rejected`,所以最好把`await`命令放在`try...catch`代码块中。 - -```javascript -async function myFunction() { - try { - await somethingThatReturnsAPromise(); - } catch (err) { - console.log(err); - } -} - -// 另一种写法 - -async function myFunction() { - await somethingThatReturnsAPromise() - .catch(function (err) { - console.log(err); - }; -} -``` - -第二点,多个`await`命令后面的异步操作,如果不存在继发关系,最好让它们同时触发。 - -```javascript -let foo = await getFoo(); -let bar = await getBar(); -``` - -上面代码中,`getFoo`和`getBar`是两个独立的异步操作(即互不依赖),被写成继发关系。这样比较耗时,因为只有`getFoo`完成以后,才会执行`getBar`,完全可以让它们同时触发。 - -```javascript -// 写法一 -let [foo, bar] = await Promise.all([getFoo(), getBar()]); - -// 写法二 -let fooPromise = getFoo(); -let barPromise = getBar(); -let foo = await fooPromise; -let bar = await barPromise; -``` - -上面两种写法,`getFoo`和`getBar`都是同时触发,这样就会缩短程序的执行时间。 - -第三点,`await`命令只能用在`async`函数之中,如果用在普通函数,就会报错。 - -```javascript -async function dbFuc(db) { - let docs = [{}, {}, {}]; - - // 报错 - docs.forEach(function (doc) { - await db.post(doc); - }); -} -``` - -上面代码会报错,因为`await`用在普通函数之中了。但是,如果将`forEach`方法的参数改成`async`函数,也有问题。 - -```javascript -function dbFuc(db) { //这里不需要 async -  let docs = [{}, {}, {}]; - - // 可能得到错误结果 - docs.forEach(async function (doc) { - await db.post(doc); - }); -} -``` - -上面代码可能不会正常工作,原因是这时三个`db.post`操作将是并发执行,也就是同时执行,而不是继发执行。正确的写法是采用`for`循环。 - -```javascript -async function dbFuc(db) { - let docs = [{}, {}, {}]; - - for (let doc of docs) { - await db.post(doc); - } -} -``` - -如果确实希望多个请求并发执行,可以使用`Promise.all`方法。 - -```javascript -async function dbFuc(db) { - let docs = [{}, {}, {}]; - let promises = docs.map((doc) => db.post(doc)); - - let results = await Promise.all(promises); - console.log(results); -} - -// 或者使用下面的写法 - -async function dbFuc(db) { - let docs = [{}, {}, {}]; - let promises = docs.map((doc) => db.post(doc)); - - let results = []; - for (let promise of promises) { - results.push(await promise); - } - console.log(results); -} -``` - -## async 函数的实现原理 - -async 函数的实现原理,就是将 Generator 函数和自动执行器,包装在一个函数里。 - -```javascript -async function fn(args) { - // ... -} - -// 等同于 - -function fn(args) { - return spawn(function* () { - // ... - }); -} -``` - -所有的`async`函数都可以写成上面的第二种形式,其中的`spawn`函数就是自动执行器。 - -下面给出`spawn`函数的实现,基本就是前文自动执行器的翻版。 - -```javascript -function spawn(genF) { - return new Promise(function(resolve, reject) { - var gen = genF(); - function step(nextF) { - try { - var next = nextF(); - } catch(e) { - return reject(e); - } - if(next.done) { - return resolve(next.value); - } - Promise.resolve(next.value).then(function(v) { - step(function() { return gen.next(v); }); - }, function(e) { - step(function() { return gen.throw(e); }); - }); - } - step(function() { return gen.next(undefined); }); - }); -} -``` - -## 与其他异步处理方法的比较 - -我们通过一个例子,来看 async 函数与 Promise、Generator 函数的比较。 - -假定某个 DOM 元素上面,部署了一系列的动画,前一个动画结束,才能开始后一个。如果当中有一个动画出错,就不再往下执行,返回上一个成功执行的动画的返回值。 - -首先是 Promise 的写法。 - -```javascript -function chainAnimationsPromise(elem, animations) { - - // 变量ret用来保存上一个动画的返回值 - var ret = null; - - // 新建一个空的Promise - var p = Promise.resolve(); - - // 使用then方法,添加所有动画 - for(var anim of animations) { - p = p.then(function(val) { - ret = val; - return anim(elem); - }); - } - - // 返回一个部署了错误捕捉机制的Promise - return p.catch(function(e) { - /* 忽略错误,继续执行 */ - }).then(function() { - return ret; - }); - -} -``` - -虽然 Promise 的写法比回调函数的写法大大改进,但是一眼看上去,代码完全都是 Promise 的 API(`then`、`catch`等等),操作本身的语义反而不容易看出来。 - -接着是 Generator 函数的写法。 - -```javascript -function chainAnimationsGenerator(elem, animations) { - - return spawn(function*() { - var ret = null; - try { - for(var anim of animations) { - ret = yield anim(elem); - } - } catch(e) { - /* 忽略错误,继续执行 */ - } - return ret; - }); - -} -``` - -上面代码使用 Generator 函数遍历了每个动画,语义比 Promise 写法更清晰,用户定义的操作全部都出现在`spawn`函数的内部。这个写法的问题在于,必须有一个任务运行器,自动执行 Generator 函数,上面代码的`spawn`函数就是自动执行器,它返回一个 Promise 对象,而且必须保证`yield`语句后面的表达式,必须返回一个 Promise。 - -最后是 async 函数的写法。 - -```javascript -async function chainAnimationsAsync(elem, animations) { - var ret = null; - try { - for(var anim of animations) { - ret = await anim(elem); - } - } catch(e) { - /* 忽略错误,继续执行 */ - } - return ret; -} -``` - -可以看到Async函数的实现最简洁,最符合语义,几乎没有语义不相关的代码。它将Generator写法中的自动执行器,改在语言层面提供,不暴露给用户,因此代码量最少。如果使用Generator写法,自动执行器需要用户自己提供。 - -## 实例:按顺序完成异步操作 - -实际开发中,经常遇到一组异步操作,需要按照顺序完成。比如,依次远程读取一组 URL,然后按照读取的顺序输出结果。 - -Promise 的写法如下。 - -```javascript -function logInOrder(urls) { - // 远程读取所有URL - const textPromises = urls.map(url => { - return fetch(url).then(response => response.text()); - }); - - // 按次序输出 - textPromises.reduce((chain, textPromise) => { - return chain.then(() => textPromise) - .then(text => console.log(text)); - }, Promise.resolve()); -} -``` - -上面代码使用`fetch`方法,同时远程读取一组 URL。每个`fetch`操作都返回一个 Promise 对象,放入`textPromises`数组。然后,`reduce`方法依次处理每个 Promise 对象,然后使用`then`,将所有 Promise 对象连起来,因此就可以依次输出结果。 - -这种写法不太直观,可读性比较差。下面是 async 函数实现。 - -```javascript -async function logInOrder(urls) { - for (const url of urls) { - const response = await fetch(url); - console.log(await response.text()); - } -} -``` - -上面代码确实大大简化,问题是所有远程操作都是继发。只有前一个URL返回结果,才会去读取下一个URL,这样做效率很差,非常浪费时间。我们需要的是并发发出远程请求。 - -```javascript -async function logInOrder(urls) { - // 并发读取远程URL - const textPromises = urls.map(async url => { - const response = await fetch(url); - return response.text(); - }); - - // 按次序输出 - for (const textPromise of textPromises) { - console.log(await textPromise); - } -} -``` - -上面代码中,虽然`map`方法的参数是`async`函数,但它是并发执行的,因为只有`async`函数内部是继发执行,外部不受影响。后面的`for..of`循环内部使用了`await`,因此实现了按顺序输出。 - -## 异步遍历器 - -《遍历器》一章说过,Iterator 接口是一种数据遍历的协议,只要调用遍历器对象的`next`方法,就会得到一个对象,表示当前遍历指针所在的那个位置的信息。`next`方法返回的对象的结构是`{value, done}`,其中`value`表示当前的数据的值,`done`是一个布尔值,表示遍历是否结束。 - -这里隐含着一个规定,`next`方法必须是同步的,只要调用就必须立刻返回值。也就是说,一旦执行`next`方法,就必须同步地得到`value`和`done`这两个属性。如果遍历指针正好指向同步操作,当然没有问题,但对于异步操作,就不太合适了。目前的解决方法是,Generator 函数里面的异步操作,返回一个 Thunk 函数或者 Promise 对象,即`value`属性是一个 Thunk 函数或者 Promise 对象,等待以后返回真正的值,而`done`属性则还是同步产生的。 - -目前,有一个[提案](https://github.com/tc39/proposal-async-iteration),为异步操作提供原生的遍历器接口,即`value`和`done`这两个属性都是异步产生,这称为”异步遍历器“(Async Iterator)。 - -### 异步遍历的接口 - -异步遍历器的最大的语法特点,就是调用遍历器的`next`方法,返回的是一个 Promise 对象。 - -```javascript -asyncIterator - .next() - .then( - ({ value, done }) => /* ... */ - ); -``` - -上面代码中,`asyncIterator`是一个异步遍历器,调用`next`方法以后,返回一个 Promise 对象。因此,可以使用`then`方法指定,这个 Promise 对象的状态变为`resolve`以后的回调函数。回调函数的参数,则是一个具有`value`和`done`两个属性的对象,这个跟同步遍历器是一样的。 - -我们知道,一个对象的同步遍历器的接口,部署在`Symbol.iterator`属性上面。同样地,对象的异步遍历器接口,部署在`Symbol.asyncIterator`属性上面。不管是什么样的对象,只要它的`Symbol.asyncIterator`属性有值,就表示应该对它进行异步遍历。 - -下面是一个异步遍历器的例子。 - -```javascript -const asyncIterable = createAsyncIterable(['a', 'b']); -const asyncIterator = asyncIterable[Symbol.asyncIterator](); - -asyncIterator -.next() -.then(iterResult1 => { - console.log(iterResult1); // { value: 'a', done: false } - return asyncIterator.next(); -}) -.then(iterResult2 => { - console.log(iterResult2); // { value: 'b', done: false } - return asyncIterator.next(); -}) -.then(iterResult3 => { - console.log(iterResult3); // { value: undefined, done: true } -}); -``` - -上面代码中,异步遍历器其实返回了两次值。第一次调用的时候,返回一个 Promise 对象;等到 Promise 对象`resolve`了,再返回一个表示当前数据成员信息的对象。这就是说,异步遍历器与同步遍历器最终行为是一致的,只是会先返回 Promise 对象,作为中介。 - -由于异步遍历器的`next`方法,返回的是一个 Promise 对象。因此,可以把它放在`await`命令后面。 - -```javascript -async function f() { - const asyncIterable = createAsyncIterable(['a', 'b']); - const asyncIterator = asyncIterable[Symbol.asyncIterator](); - console.log(await asyncIterator.next()); - // { value: 'a', done: false } - console.log(await asyncIterator.next()); - // { value: 'b', done: false } - console.log(await asyncIterator.next()); - // { value: undefined, done: true } -} -``` - -上面代码中,`next`方法用`await`处理以后,就不必使用`then`方法了。整个流程已经很接近同步处理了。 - -注意,异步遍历器的`next`方法是可以连续调用的,不必等到上一步产生的Promise对象`resolve`以后再调用。这种情况下,`next`方法会累积起来,自动按照每一步的顺序运行下去。下面是一个例子,把所有的`next`方法放在`Promise.all`方法里面。 - -```javascript -const asyncGenObj = createAsyncIterable(['a', 'b']); -const [{value: v1}, {value: v2}] = await Promise.all([ - asyncGenObj.next(), asyncGenObj.next() -]); - -console.log(v1, v2); // a b -``` - -另一种用法是一次性调用所有的`next`方法,然后`await`最后一步操作。 - -```javascript -const writer = openFile('someFile.txt'); -writer.next('hello'); -writer.next('world'); -await writer.return(); -``` - -### for await...of - -前面介绍过,`for...of`循环用于遍历同步的 Iterator 接口。新引入的`for await...of`循环,则是用于遍历异步的 Iterator 接口。 - -```javascript -async function f() { - for await (const x of createAsyncIterable(['a', 'b'])) { - console.log(x); - } -} -// a -// b -``` - -上面代码中,`createAsyncIterable()`返回一个异步遍历器,`for...of`循环自动调用这个遍历器的`next`方法,会得到一个Promise对象。`await`用来处理这个Promise对象,一旦`resolve`,就把得到的值(`x`)传入`for...of`的循环体。 - -`for await...of`循环的一个用途,是部署了 asyncIterable 操作的异步接口,可以直接放入这个循环。 - -```javascript -let body = ''; -for await(const data of req) body += data; -const parsed = JSON.parse(body); -console.log('got', parsed); -``` - -上面代码中,`req`是一个 asyncIterable 对象,用来异步读取数据。可以看到,使用`for await...of`循环以后,代码会非常简洁。 - -如果`next`方法返回的Promise对象被`reject`,那么就要用`try...catch`捕捉。 - -```javascript -async function () { - try { - for await (const x of createRejectingIterable()) { - console.log(x); - } - } catch (e) { - console.error(e); - } -} -``` - -注意,`for await...of`循环也可以用于同步遍历器。 - -```javascript -(async function () { - for await (const x of ['a', 'b']) { - console.log(x); - } -})(); -// a -// b -``` - -### 异步Generator函数 - -就像 Generator 函数返回一个同步遍历器对象一样,异步 Generator 函数的作用,是返回一个异步遍历器对象。 - -在语法上,异步 Generator 函数就是`async`函数与 Generator 函数的结合。 - -```javascript -async function* readLines(path) { - let file = await fileOpen(path); - - try { - while (!file.EOF) { - yield await file.readLine(); - } - } finally { - await file.close(); - } -} -``` - -上面代码中,异步操作前面使用`await`关键字标明,即`await`后面的操作,应该返回Promise对象。凡是使用`yield`关键字的地方,就是`next`方法的停下来的地方,它后面的表达式的值(即`await file.readLine()`的值),会作为`next()`返回对象的`value`属性,这一点是于同步Generator函数一致的。 - -可以像下面这样,使用上面代码定义的异步Generator函数。 - -```javascript -for await (const line of readLines(filePath)) { - console.log(line); -} -``` - -异步 Generator 函数可以与`for await...of`循环结合起来使用。 - -```javascript -async function* prefixLines(asyncIterable) { - for await (const line of asyncIterable) { - yield '> ' + line; - } -} -``` - -`yield`命令依然是立刻返回的,但是返回的是一个Promise对象。 - -```javascript -async function* asyncGenerator() { - console.log('Start'); - const result = await doSomethingAsync(); // (A) - yield 'Result: '+ result; // (B) - console.log('Done'); -} -``` - -上面代码中,调用`next`方法以后,会在`B`处暂停执行,`yield`命令立刻返回一个Promise对象。这个Promise对象不同于`A`处`await`命令后面的那个 Promise 对象。主要有两点不同,一是`A`处的Promise对象`resolve`以后产生的值,会放入`result`变量;二是`B`处的Promise对象`resolve`以后产生的值,是表达式`'Result: ' + result`的值;二是`A`处的 Promise 对象一定先于`B`处的 Promise 对象`resolve`。 - -如果异步 Generator 函数抛出错误,会被 Promise 对象`reject`,然后抛出的错误被`catch`方法捕获。 - -```javascript -async function* asyncGenerator() { - throw new Error('Problem!'); -} - -asyncGenerator() -.next() -.catch(err => console.log(err)); // Error: Problem! -``` - -注意,普通的 async 函数返回的是一个 Promise 对象,而异步 Generator 函数返回的是一个异步Iterator对象。基本上,可以这样理解,`async`函数和异步 Generator 函数,是封装异步操作的两种方法,都用来达到同一种目的。区别在于,前者自带执行器,后者通过`for await...of`执行,或者自己编写执行器。下面就是一个异步 Generator 函数的执行器。 - -```javascript -async function takeAsync(asyncIterable, count=Infinity) { - const result = []; - const iterator = asyncIterable[Symbol.asyncIterator](); - while (result.length < count) { - const {value,done} = await iterator.next(); - if (done) break; - result.push(value); - } - return result; -} -``` - -上面代码中,异步Generator函数产生的异步遍历器,会通过`while`循环自动执行,每当`await iterator.next()`完成,就会进入下一轮循环。 - -下面是这个自动执行器的一个使用实例。 - -```javascript -async function f() { - async function* gen() { - yield 'a'; - yield 'b'; - yield 'c'; - } - - return await takeAsync(gen()); -} - -f().then(function (result) { - console.log(result); // ['a', 'b', 'c'] -}) -``` - -异步 Generator 函数出现以后,JavaScript就有了四种函数形式:普通函数、async 函数、Generator 函数和异步 Generator 函数。请注意区分每种函数的不同之处。 - -最后,同步的数据结构,也可以使用异步 Generator 函数。 - -```javascript -async function* createAsyncIterable(syncIterable) { - for (const elem of syncIterable) { - yield elem; - } -} -``` - -上面代码中,由于没有异步操作,所以也就没有使用`await`关键字。 - -### yield* 语句 - -`yield*`语句也可以跟一个异步遍历器。 - -```javascript -async function* gen1() { - yield 'a'; - yield 'b'; - return 2; -} - -async function* gen2() { - const result = yield* gen1(); -} -``` - -上面代码中,`gen2`函数里面的`result`变量,最后的值是`2`。 - -与同步Generator函数一样,`for await...of`循环会展开`yield*`。 - -```javascript -(async function () { - for await (const x of gen2()) { - console.log(x); - } -})(); -// a -// b -``` - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/class.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/class.md" deleted file mode 100644 index 92811f8a6..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/class.md" +++ /dev/null @@ -1,1536 +0,0 @@ -# Class - -## Class基本语法 - -### 概述 - -JavaScript语言的传统方法是通过构造函数,定义并生成新对象。下面是一个例子。 - -```javascript -function Point(x, y) { - this.x = x; - this.y = y; -} - -Point.prototype.toString = function () { - return '(' + this.x + ', ' + this.y + ')'; -}; - -var p = new Point(1, 2); -``` - -上面这种写法跟传统的面向对象语言(比如C++和Java)差异很大,很容易让新学习这门语言的程序员感到困惑。 - -ES6提供了更接近传统语言的写法,引入了Class(类)这个概念,作为对象的模板。通过`class`关键字,可以定义类。基本上,ES6的`class`可以看作只是一个语法糖,它的绝大部分功能,ES5都可以做到,新的`class`写法只是让对象原型的写法更加清晰、更像面向对象编程的语法而已。上面的代码用ES6的“类”改写,就是下面这样。 - -```javascript -//定义类 -class Point { - constructor(x, y) { - this.x = x; - this.y = y; - } - - toString() { - return '(' + this.x + ', ' + this.y + ')'; - } -} -``` - -上面代码定义了一个“类”,可以看到里面有一个`constructor`方法,这就是构造方法,而`this`关键字则代表实例对象。也就是说,ES5的构造函数`Point`,对应ES6的`Point`类的构造方法。 - -`Point`类除了构造方法,还定义了一个`toString`方法。注意,定义“类”的方法的时候,前面不需要加上`function`这个关键字,直接把函数定义放进去了就可以了。另外,方法之间不需要逗号分隔,加了会报错。 - -ES6的类,完全可以看作构造函数的另一种写法。 - -```javascript -class Point { - // ... -} - -typeof Point // "function" -Point === Point.prototype.constructor // true -``` - -上面代码表明,类的数据类型就是函数,类本身就指向构造函数。 - -使用的时候,也是直接对类使用`new`命令,跟构造函数的用法完全一致。 - -```javascript -class Bar { - doStuff() { - console.log('stuff'); - } -} - -var b = new Bar(); -b.doStuff() // "stuff" -``` - -构造函数的`prototype`属性,在ES6的“类”上面继续存在。事实上,类的所有方法都定义在类的`prototype`属性上面。 - -```javascript -class Point { - constructor(){ - // ... - } - - toString(){ - // ... - } - - toValue(){ - // ... - } -} - -// 等同于 - -Point.prototype = { - toString(){}, - toValue(){} -}; -``` - -在类的实例上面调用方法,其实就是调用原型上的方法。 - -```javascript -class B {} -let b = new B(); - -b.constructor === B.prototype.constructor // true -``` - -上面代码中,`b`是B类的实例,它的`constructor`方法就是B类原型的`constructor`方法。 - -由于类的方法都定义在`prototype`对象上面,所以类的新方法可以添加在`prototype`对象上面。`Object.assign`方法可以很方便地一次向类添加多个方法。 - -```javascript -class Point { - constructor(){ - // ... - } -} - -Object.assign(Point.prototype, { - toString(){}, - toValue(){} -}); -``` - -`prototype`对象的`constructor`属性,直接指向“类”的本身,这与ES5的行为是一致的。 - -```javascript -Point.prototype.constructor === Point // true -``` - -另外,类的内部所有定义的方法,都是不可枚举的(non-enumerable)。 - -```javascript -class Point { - constructor(x, y) { - // ... - } - - toString() { - // ... - } -} - -Object.keys(Point.prototype) -// [] -Object.getOwnPropertyNames(Point.prototype) -// ["constructor","toString"] -``` - -上面代码中,`toString`方法是`Point`类内部定义的方法,它是不可枚举的。这一点与ES5的行为不一致。 - -```javascript -var Point = function (x, y) { - // ... -}; - -Point.prototype.toString = function() { - // ... -}; - -Object.keys(Point.prototype) -// ["toString"] -Object.getOwnPropertyNames(Point.prototype) -// ["constructor","toString"] -``` - -上面代码采用ES5的写法,`toString`方法就是可枚举的。 - -类的属性名,可以采用表达式。 - -```javascript -let methodName = "getArea"; -class Square{ - constructor(length) { - // ... - } - - [methodName]() { - // ... - } -} -``` - -上面代码中,`Square`类的方法名`getArea`,是从表达式得到的。 - -### constructor方法 - -`constructor`方法是类的默认方法,通过`new`命令生成对象实例时,自动调用该方法。一个类必须有`constructor`方法,如果没有显式定义,一个空的`constructor`方法会被默认添加。 - -```javascript -constructor() {} -``` - -`constructor`方法默认返回实例对象(即`this`),完全可以指定返回另外一个对象。 - -```javascript -class Foo { - constructor() { - return Object.create(null); - } -} - -new Foo() instanceof Foo -// false -``` - -上面代码中,`constructor`函数返回一个全新的对象,结果导致实例对象不是`Foo`类的实例。 - -类的构造函数,不使用`new`是没法调用的,会报错。这是它跟普通构造函数的一个主要区别,后者不用`new`也可以执行。 - -```javascript -class Foo { - constructor() { - return Object.create(null); - } -} - -Foo() -// TypeError: Class constructor Foo cannot be invoked without 'new' -``` - -### 类的实例对象 - -生成类的实例对象的写法,与ES5完全一样,也是使用`new`命令。如果忘记加上`new`,像函数那样调用`Class`,将会报错。 - -```javascript -// 报错 -var point = Point(2, 3); - -// 正确 -var point = new Point(2, 3); -``` - -与ES5一样,实例的属性除非显式定义在其本身(即定义在`this`对象上),否则都是定义在原型上(即定义在`class`上)。 - -```javascript -//定义类 -class Point { - - constructor(x, y) { - this.x = x; - this.y = y; - } - - toString() { - return '(' + this.x + ', ' + this.y + ')'; - } - -} - -var point = new Point(2, 3); - -point.toString() // (2, 3) - -point.hasOwnProperty('x') // true -point.hasOwnProperty('y') // true -point.hasOwnProperty('toString') // false -point.__proto__.hasOwnProperty('toString') // true -``` - -上面代码中,`x`和`y`都是实例对象`point`自身的属性(因为定义在`this`变量上),所以`hasOwnProperty`方法返回`true`,而`toString`是原型对象的属性(因为定义在`Point`类上),所以`hasOwnProperty`方法返回`false`。这些都与ES5的行为保持一致。 - -与ES5一样,类的所有实例共享一个原型对象。 - -```javascript -var p1 = new Point(2,3); -var p2 = new Point(3,2); - -p1.__proto__ === p2.__proto__ -//true -``` - -上面代码中,`p1`和`p2`都是Point的实例,它们的原型都是Point.prototype,所以`__proto__`属性是相等的。 - -这也意味着,可以通过实例的`__proto__`属性为Class添加方法。 - -```javascript -var p1 = new Point(2,3); -var p2 = new Point(3,2); - -p1.__proto__.printName = function () { return 'Oops' }; - -p1.printName() // "Oops" -p2.printName() // "Oops" - -var p3 = new Point(4,2); -p3.printName() // "Oops" -``` - -上面代码在`p1`的原型上添加了一个`printName`方法,由于`p1`的原型就是`p2`的原型,因此`p2`也可以调用这个方法。而且,此后新建的实例`p3`也可以调用这个方法。这意味着,使用实例的`__proto__`属性改写原型,必须相当谨慎,不推荐使用,因为这会改变Class的原始定义,影响到所有实例。 - -### 不存在变量提升 - -Class不存在变量提升(hoist),这一点与ES5完全不同。 - -```javascript -new Foo(); // ReferenceError -class Foo {} -``` - -上面代码中,`Foo`类使用在前,定义在后,这样会报错,因为ES6不会把类的声明提升到代码头部。这种规定的原因与下文要提到的继承有关,必须保证子类在父类之后定义。 - -```javascript -{ - let Foo = class {}; - class Bar extends Foo { - } -} -``` - -上面的代码不会报错,因为`Bar`继承`Foo`的时候,`Foo`已经有定义了。但是,如果存在`class`的提升,上面代码就会报错,因为`class`会被提升到代码头部,而`let`命令是不提升的,所以导致`Bar`继承`Foo`的时候,`Foo`还没有定义。 - -### Class表达式 - -与函数一样,类也可以使用表达式的形式定义。 - -```javascript -const MyClass = class Me { - getClassName() { - return Me.name; - } -}; -``` - -上面代码使用表达式定义了一个类。需要注意的是,这个类的名字是`MyClass`而不是`Me`,`Me`只在Class的内部代码可用,指代当前类。 - -```javascript -let inst = new MyClass(); -inst.getClassName() // Me -Me.name // ReferenceError: Me is not defined -``` - -上面代码表示,`Me`只在Class内部有定义。 - -如果类的内部没用到的话,可以省略`Me`,也就是可以写成下面的形式。 - -```javascript -const MyClass = class { /* ... */ }; -``` - -采用Class表达式,可以写出立即执行的Class。 - -```javascript -let person = new class { - constructor(name) { - this.name = name; - } - - sayName() { - console.log(this.name); - } -}('张三'); - -person.sayName(); // "张三" -``` - -上面代码中,`person`是一个立即执行的类的实例。 - -### 私有方法 - -私有方法是常见需求,但 ES6 不提供,只能通过变通方法模拟实现。 - -一种做法是在命名上加以区别。 - -```javascript -class Widget { - - // 公有方法 - foo (baz) { - this._bar(baz); - } - - // 私有方法 - _bar(baz) { - return this.snaf = baz; - } - - // ... -} -``` - -上面代码中,`_bar`方法前面的下划线,表示这是一个只限于内部使用的私有方法。但是,这种命名是不保险的,在类的外部,还是可以调用到这个方法。 - -另一种方法就是索性将私有方法移出模块,因为模块内部的所有方法都是对外可见的。 - -```javascript -class Widget { - foo (baz) { - bar.call(this, baz); - } - - // ... -} - -function bar(baz) { - return this.snaf = baz; -} -``` - -上面代码中,`foo`是公有方法,内部调用了`bar.call(this, baz)`。这使得`bar`实际上成为了当前模块的私有方法。 - -还有一种方法是利用`Symbol`值的唯一性,将私有方法的名字命名为一个`Symbol`值。 - -```javascript -const bar = Symbol('bar'); -const snaf = Symbol('snaf'); - -export default class myClass{ - - // 公有方法 - foo(baz) { - this[bar](baz); - } - - // 私有方法 - [bar](baz) { - return this[snaf] = baz; - } - - // ... -}; -``` - -上面代码中,`bar`和`snaf`都是`Symbol`值,导致第三方无法获取到它们,因此达到了私有方法和私有属性的效果。 - -### this的指向 - -类的方法内部如果含有`this`,它默认指向类的实例。但是,必须非常小心,一旦单独使用该方法,很可能报错。 - -```javascript -class Logger { - printName(name = 'there') { - this.print(`Hello ${name}`); - } - - print(text) { - console.log(text); - } -} - -const logger = new Logger(); -const { printName } = logger; -printName(); // TypeError: Cannot read property 'print' of undefined -``` - -上面代码中,`printName`方法中的`this`,默认指向`Logger`类的实例。但是,如果将这个方法提取出来单独使用,`this`会指向该方法运行时所在的环境,因为找不到`print`方法而导致报错。 - -一个比较简单的解决方法是,在构造方法中绑定`this`,这样就不会找不到`print`方法了。 - -```javascript -class Logger { - constructor() { - this.printName = this.printName.bind(this); - } - - // ... -} -``` - -另一种解决方法是使用箭头函数。 - -```javascript -class Logger { - constructor() { - this.printName = (name = 'there') => { - this.print(`Hello ${name}`); - }; - } - - // ... -} -``` - -还有一种解决方法是使用`Proxy`,获取方法的时候,自动绑定`this`。 - -```javascript -function selfish (target) { - const cache = new WeakMap(); - const handler = { - get (target, key) { - const value = Reflect.get(target, key); - if (typeof value !== 'function') { - return value; - } - if (!cache.has(value)) { - cache.set(value, value.bind(target)); - } - return cache.get(value); - } - }; - const proxy = new Proxy(target, handler); - return proxy; -} - -const logger = selfish(new Logger()); -``` - -### 严格模式 - -类和模块的内部,默认就是严格模式,所以不需要使用`use strict`指定运行模式。只要你的代码写在类或模块之中,就只有严格模式可用。 - -考虑到未来所有的代码,其实都是运行在模块之中,所以ES6实际上把整个语言升级到了严格模式。 - -### name属性 - -由于本质上,ES6的类只是ES5的构造函数的一层包装,所以函数的许多特性都被`Class`继承,包括`name`属性。 - -```javascript -class Point {} -Point.name // "Point" -``` - -`name`属性总是返回紧跟在`class`关键字后面的类名。 - -## Class的继承 - -### 基本用法 - -Class之间可以通过`extends`关键字实现继承,这比ES5的通过修改原型链实现继承,要清晰和方便很多。 - -```javascript -class ColorPoint extends Point {} -``` - -上面代码定义了一个`ColorPoint`类,该类通过`extends`关键字,继承了`Point`类的所有属性和方法。但是由于没有部署任何代码,所以这两个类完全一样,等于复制了一个`Point`类。下面,我们在`ColorPoint`内部加上代码。 - -```javascript -class ColorPoint extends Point { - constructor(x, y, color) { - super(x, y); // 调用父类的constructor(x, y) - this.color = color; - } - - toString() { - return this.color + ' ' + super.toString(); // 调用父类的toString() - } -} -``` - -上面代码中,`constructor`方法和`toString`方法之中,都出现了`super`关键字,它在这里表示父类的构造函数,用来新建父类的`this`对象。 - -子类必须在`constructor`方法中调用`super`方法,否则新建实例时会报错。这是因为子类没有自己的`this`对象,而是继承父类的`this`对象,然后对其进行加工。如果不调用`super`方法,子类就得不到`this`对象。 - -```javascript -class Point { /* ... */ } - -class ColorPoint extends Point { - constructor() { - } -} - -let cp = new ColorPoint(); // ReferenceError -``` - -上面代码中,`ColorPoint`继承了父类`Point`,但是它的构造函数没有调用`super`方法,导致新建实例时报错。 - -ES5的继承,实质是先创造子类的实例对象`this`,然后再将父类的方法添加到`this`上面(`Parent.apply(this)`)。ES6的继承机制完全不同,实质是先创造父类的实例对象`this`(所以必须先调用`super`方法),然后再用子类的构造函数修改`this`。 - -如果子类没有定义`constructor`方法,这个方法会被默认添加,代码如下。也就是说,不管有没有显式定义,任何一个子类都有`constructor`方法。 - -```javascript -constructor(...args) { - super(...args); -} -``` - -另一个需要注意的地方是,在子类的构造函数中,只有调用`super`之后,才可以使用`this`关键字,否则会报错。这是因为子类实例的构建,是基于对父类实例加工,只有`super`方法才能返回父类实例。 - -```javascript -class Point { - constructor(x, y) { - this.x = x; - this.y = y; - } -} - -class ColorPoint extends Point { - constructor(x, y, color) { - this.color = color; // ReferenceError - super(x, y); - this.color = color; // 正确 - } -} -``` - -上面代码中,子类的`constructor`方法没有调用`super`之前,就使用`this`关键字,结果报错,而放在`super`方法之后就是正确的。 - -下面是生成子类实例的代码。 - -```javascript -let cp = new ColorPoint(25, 8, 'green'); - -cp instanceof ColorPoint // true -cp instanceof Point // true -``` - -上面代码中,实例对象`cp`同时是`ColorPoint`和`Point`两个类的实例,这与ES5的行为完全一致。 - -### 类的prototype属性和\_\_proto\_\_属性 - -大多数浏览器的ES5实现之中,每一个对象都有`__proto__`属性,指向对应的构造函数的prototype属性。Class作为构造函数的语法糖,同时有prototype属性和`__proto__`属性,因此同时存在两条继承链。 - -(1)子类的`__proto__`属性,表示构造函数的继承,总是指向父类。 - -(2)子类`prototype`属性的`__proto__`属性,表示方法的继承,总是指向父类的`prototype`属性。 - -```javascript -class A { -} - -class B extends A { -} - -B.__proto__ === A // true -B.prototype.__proto__ === A.prototype // true -``` - -上面代码中,子类`B`的`__proto__`属性指向父类`A`,子类`B`的`prototype`属性的`__proto__`属性指向父类`A`的`prototype`属性。 - -这样的结果是因为,类的继承是按照下面的模式实现的。 - -```javascript -class A { -} - -class B { -} - -// B的实例继承A的实例 -Object.setPrototypeOf(B.prototype, A.prototype); -const b = new B(); - -// B的实例继承A的静态属性 -Object.setPrototypeOf(B, A); -const b = new B(); -``` - -《对象的扩展》一章给出过`Object.setPrototypeOf`方法的实现。 - -```javascript -Object.setPrototypeOf = function (obj, proto) { - obj.__proto__ = proto; - return obj; -} -``` - -因此,就得到了上面的结果。 - -```javascript -Object.setPrototypeOf(B.prototype, A.prototype); -// 等同于 -B.prototype.__proto__ = A.prototype; - -Object.setPrototypeOf(B, A); -// 等同于 -B.__proto__ = A; -``` - -这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`)的原型(`prototype`属性)是父类的实例。 - -```javascript -Object.create(A.prototype); -// 等同于 -B.prototype.__proto__ = A.prototype; -``` - -### Extends 的继承目标 - -`extends`关键字后面可以跟多种类型的值。 - -```javascript -class B extends A { -} -``` - -上面代码的`A`,只要是一个有`prototype`属性的函数,就能被`B`继承。由于函数都有`prototype`属性(除了`Function.prototype`函数),因此`A`可以是任意函数。 - -下面,讨论三种特殊情况。 - -第一种特殊情况,子类继承Object类。 - -```javascript -class A extends Object { -} - -A.__proto__ === Object // true -A.prototype.__proto__ === Object.prototype // true -``` - -这种情况下,`A`其实就是构造函数`Object`的复制,`A`的实例就是`Object`的实例。 - -第二种特殊情况,不存在任何继承。 - -```javascript -class A { -} - -A.__proto__ === Function.prototype // true -A.prototype.__proto__ === Object.prototype // true -``` - -这种情况下,A作为一个基类(即不存在任何继承),就是一个普通函数,所以直接继承`Funciton.prototype`。但是,`A`调用后返回一个空对象(即`Object`实例),所以`A.prototype.__proto__`指向构造函数(`Object`)的`prototype`属性。 - -第三种特殊情况,子类继承`null`。 - -```javascript -class A extends null { -} - -A.__proto__ === Function.prototype // true -A.prototype.__proto__ === undefined // true -``` - -这种情况与第二种情况非常像。`A`也是一个普通函数,所以直接继承`Funciton.prototype`。但是,A调用后返回的对象不继承任何方法,所以它的`__proto__`指向`Function.prototype`,即实质上执行了下面的代码。 - -```javascript -class C extends null { - constructor() { return Object.create(null); } -} -``` - -### Object.getPrototypeOf() - -`Object.getPrototypeOf`方法可以用来从子类上获取父类。 - -```javascript -Object.getPrototypeOf(ColorPoint) === Point -// true -``` - -因此,可以使用这个方法判断,一个类是否继承了另一个类。 - -### super 关键字 - -`super`这个关键字,既可以当作函数使用,也可以当作对象使用。在这两种情况下,它的用法完全不同。 - -第一种情况,`super`作为函数调用时,代表父类的构造函数。ES6 要求,子类的构造函数必须执行一次`super`函数。 - -```javascript -class A {} - -class B extends A { - constructor() { - super(); - } -} -``` - -上面代码中,子类`B`的构造函数之中的`super()`,代表调用父类的构造函数。这是必须的,否则 JavaScript 引擎会报错。 - -注意,`super`虽然代表了父类`A`的构造函数,但是返回的是子类`B`的实例,即`super`内部的`this`指的是`B`,因此`super()`在这里相当于`A.prototype.constructor.call(this)`。 - -```javascript -class A { - constructor() { - console.log(new.target.name); - } -} -class B extends A { - constructor() { - super(); - } -} -new A() // A -new B() // B -``` - -上面代码中,`new.target`指向当前正在执行的函数。可以看到,在`super()`执行时,它指向的是子类`B`的构造函数,而不是父类`A`的构造函数。也就是说,`super()`内部的`this`指向的是`B`。 - -作为函数时,`super()`只能用在子类的构造函数之中,用在其他地方就会报错。 - -```javascript -class A {} - -class B extends A { - m() { - super(); // 报错 - } -} -``` - -上面代码中,`super()`用在`B`类的`m`方法之中,就会造成句法错误。 - -第二种情况,`super`作为对象时,指向父类的原型对象。 - -```javascript -class A { - p() { - return 2; - } -} - -class B extends A { - constructor() { - super(); - console.log(super.p()); // 2 - } -} - -let b = new B(); -``` - -上面代码中,子类`B`当中的`super.p()`,就是将`super`当作一个对象使用。这时,`super`指向`A.prototype`,所以`super.p()`就相当于`A.prototype.p()`。 - -这里需要注意,由于`super`指向父类的原型对象,所以定义在父类实例上的方法或属性,是无法通过`super`调用的。 - -```javascript -class A { - constructor() { - this.p = 2; - } -} - -class B extends A { - get m() { - return super.p; - } -} - -let b = new B(); -b.m // undefined -``` - -上面代码中,`p`是父类`A`实例的属性,`super.p`就引用不到它。 - -如果属性定义在父类的原型对象上,`super`就可以取到。 - -```javascript -class A {} -A.prototype.x = 2; - -class B extends A { - constructor() { - super(); - console.log(super.x) // 2 - } -} - -let b = new B(); -``` - -上面代码中,属性`x`是定义在`A.prototype`上面的,所以`super.x`可以取到它的值。 - -ES6 规定,通过`super`调用父类的方法时,`super`会绑定子类的`this`。 - -```javascript -class A { - constructor() { - this.x = 1; - } - print() { - console.log(this.x); - } -} - -class B extends A { - constructor() { - super(); - this.x = 2; - } - m() { - super.print(); - } -} - -let b = new B(); -b.m() // 2 -``` - -上面代码中,`super.print()`虽然调用的是`A.prototype.print()`,但是`A.prototype.print()`会绑定子类`B`的`this`,导致输出的是`2`,而不是`1`。也就是说,实际上执行的是`super.print.call(this)`。 - -由于绑定子类的`this`,所以如果通过`super`对某个属性赋值,这时`super`就是`this`,赋值的属性会变成子类实例的属性。 - -```javascript -class A { - constructor() { - this.x = 1; - } -} - -class B extends A { - constructor() { - super(); - this.x = 2; - super.x = 3; - console.log(super.x); // undefined - console.log(this.x); // 3 - } -} - -let b = new B(); -``` - -上面代码中,`super.x`赋值为`3`,这时等同于对`this.x`赋值为`3`。而当读取`super.x`的时候,读的是`A.prototype.x`,所以返回`undefined`。 - -注意,使用`super`的时候,必须显式指定是作为函数、还是作为对象使用,否则会报错。 - -```javascript -class A {} - -class B extends A { - constructor() { - super(); - console.log(super); // 报错 - } -} -``` - -上面代码中,`console.log(super)`当中的`super`,无法看出是作为函数使用,还是作为对象使用,所以 JavaScript 引擎解析代码的时候就会报错。这时,如果能清晰地表明`super`的数据类型,就不会报错。 - -```javascript -class A {} - -class B extends A { - constructor() { - super(); - console.log(super.valueOf() instanceof B); // true - } -} - -let b = new B(); -``` - -上面代码中,`super.valueOf()`表明`super`是一个对象,因此就不会报错。同时,由于`super`绑定`B`的`this`,所以`super.valueOf()`返回的是一个`B`的实例。 - -最后,由于对象总是继承其他对象的,所以可以在任意一个对象中,使用`super`关键字。 - -```javascript -var obj = { - toString() { - return "MyObject: " + super.toString(); - } -}; - -obj.toString(); // MyObject: [object Object] -``` - -### 实例的\_\_proto\_\_属性 - -子类实例的\_\_proto\_\_属性的\_\_proto\_\_属性,指向父类实例的\_\_proto\_\_属性。也就是说,子类的原型的原型,是父类的原型。 - -```javascript -var p1 = new Point(2, 3); -var p2 = new ColorPoint(2, 3, 'red'); - -p2.__proto__ === p1.__proto__ // false -p2.__proto__.__proto__ === p1.__proto__ // true -``` - -上面代码中,`ColorPoint`继承了`Point`,导致前者原型的原型是后者的原型。 - -因此,通过子类实例的`__proto__.__proto__`属性,可以修改父类实例的行为。 - -```javascript -p2.__proto__.__proto__.printName = function () { - console.log('Ha'); -}; - -p1.printName() // "Ha" -``` - -上面代码在`ColorPoint`的实例`p2`上向`Point`类添加方法,结果影响到了`Point`的实例`p1`。 - -## 原生构造函数的继承 - -原生构造函数是指语言内置的构造函数,通常用来生成数据结构。ECMAScript的原生构造函数大致有下面这些。 - -- Boolean() -- Number() -- String() -- Array() -- Date() -- Function() -- RegExp() -- Error() -- Object() - -以前,这些原生构造函数是无法继承的,比如,不能自己定义一个`Array`的子类。 - -```javascript -function MyArray() { - Array.apply(this, arguments); -} - -MyArray.prototype = Object.create(Array.prototype, { - constructor: { - value: MyArray, - writable: true, - configurable: true, - enumerable: true - } -}); -``` - -上面代码定义了一个继承Array的`MyArray`类。但是,这个类的行为与`Array`完全不一致。 - -```javascript -var colors = new MyArray(); -colors[0] = "red"; -colors.length // 0 - -colors.length = 0; -colors[0] // "red" -``` - -之所以会发生这种情况,是因为子类无法获得原生构造函数的内部属性,通过`Array.apply()`或者分配给原型对象都不行。原生构造函数会忽略`apply`方法传入的`this`,也就是说,原生构造函数的`this`无法绑定,导致拿不到内部属性。 - -ES5是先新建子类的实例对象`this`,再将父类的属性添加到子类上,由于父类的内部属性无法获取,导致无法继承原生的构造函数。比如,Array构造函数有一个内部属性`[[DefineOwnProperty]]`,用来定义新属性时,更新`length`属性,这个内部属性无法在子类获取,导致子类的`length`属性行为不正常。 - -下面的例子中,我们想让一个普通对象继承`Error`对象。 - -```javascript -var e = {}; - -Object.getOwnPropertyNames(Error.call(e)) -// [ 'stack' ] - -Object.getOwnPropertyNames(e) -// [] -``` - -上面代码中,我们想通过`Error.call(e)`这种写法,让普通对象`e`具有`Error`对象的实例属性。但是,`Error.call()`完全忽略传入的第一个参数,而是返回一个新对象,`e`本身没有任何变化。这证明了`Error.call(e)`这种写法,无法继承原生构造函数。 - -ES6允许继承原生构造函数定义子类,因为ES6是先新建父类的实例对象`this`,然后再用子类的构造函数修饰`this`,使得父类的所有行为都可以继承。下面是一个继承`Array`的例子。 - -```javascript -class MyArray extends Array { - constructor(...args) { - super(...args); - } -} - -var arr = new MyArray(); -arr[0] = 12; -arr.length // 1 - -arr.length = 0; -arr[0] // undefined -``` - -上面代码定义了一个`MyArray`类,继承了`Array`构造函数,因此就可以从`MyArray`生成数组的实例。这意味着,ES6可以自定义原生数据结构(比如Array、String等)的子类,这是ES5无法做到的。 - -上面这个例子也说明,`extends`关键字不仅可以用来继承类,还可以用来继承原生的构造函数。因此可以在原生数据结构的基础上,定义自己的数据结构。下面就是定义了一个带版本功能的数组。 - -```javascript -class VersionedArray extends Array { - constructor() { - super(); - this.history = [[]]; - } - commit() { - this.history.push(this.slice()); - } - revert() { - this.splice(0, this.length, ...this.history[this.history.length - 1]); - } -} - -var x = new VersionedArray(); - -x.push(1); -x.push(2); -x // [1, 2] -x.history // [[]] - -x.commit(); -x.history // [[], [1, 2]] -x.push(3); -x // [1, 2, 3] - -x.revert(); -x // [1, 2] -``` - -上面代码中,`VersionedArray`结构会通过`commit`方法,将自己的当前状态存入`history`属性,然后通过`revert`方法,可以撤销当前版本,回到上一个版本。除此之外,`VersionedArray`依然是一个数组,所有原生的数组方法都可以在它上面调用。 - -下面是一个自定义`Error`子类的例子。 - -```javascript -class ExtendableError extends Error { - constructor(message) { - super(); - this.message = message; - this.stack = (new Error()).stack; - this.name = this.constructor.name; - } -} - -class MyError extends ExtendableError { - constructor(m) { - super(m); - } -} - -var myerror = new MyError('ll'); -myerror.message // "ll" -myerror instanceof Error // true -myerror.name // "MyError" -myerror.stack -// Error -// at MyError.ExtendableError -// ... -``` - -注意,继承`Object`的子类,有一个[行为差异](http://stackoverflow.com/questions/36203614/super-does-not-pass-arguments-when-instantiating-a-class-extended-from-object)。 - -```javascript -class NewObj extends Object{ - constructor(){ - super(...arguments); - } -} -var o = new NewObj({attr: true}); -console.log(o.attr === true); // false -``` - -上面代码中,`NewObj`继承了`Object`,但是无法通过`super`方法向父类`Object`传参。这是因为ES6改变了`Object`构造函数的行为,一旦发现`Object`方法不是通过`new Object()`这种形式调用,ES6规定`Object`构造函数会忽略参数。 - -## Class的取值函数(getter)和存值函数(setter) - -与ES5一样,在Class内部可以使用`get`和`set`关键字,对某个属性设置存值函数和取值函数,拦截该属性的存取行为。 - -```javascript -class MyClass { - constructor() { - // ... - } - get prop() { - return 'getter'; - } - set prop(value) { - console.log('setter: '+value); - } -} - -let inst = new MyClass(); - -inst.prop = 123; -// setter: 123 - -inst.prop -// 'getter' -``` - -上面代码中,`prop`属性有对应的存值函数和取值函数,因此赋值和读取行为都被自定义了。 - -存值函数和取值函数是设置在属性的descriptor对象上的。 - -```javascript -class CustomHTMLElement { - constructor(element) { - this.element = element; - } - - get html() { - return this.element.innerHTML; - } - - set html(value) { - this.element.innerHTML = value; - } -} - -var descriptor = Object.getOwnPropertyDescriptor( - CustomHTMLElement.prototype, "html"); -"get" in descriptor // true -"set" in descriptor // true -``` - -上面代码中,存值函数和取值函数是定义在`html`属性的描述对象上面,这与ES5完全一致。 - -## Class 的 Generator 方法 - -如果某个方法之前加上星号(`*`),就表示该方法是一个 Generator 函数。 - -```javascript -class Foo { - constructor(...args) { - this.args = args; - } - * [Symbol.iterator]() { - for (let arg of this.args) { - yield arg; - } - } -} - -for (let x of new Foo('hello', 'world')) { - console.log(x); -} -// hello -// world -``` - -上面代码中,`Foo`类的`Symbol.iterator`方法前有一个星号,表示该方法是一个 Generator 函数。`Symbol.iterator`方法返回一个`Foo`类的默认遍历器,`for...of`循环会自动调用这个遍历器。 - -## Class 的静态方法 - -类相当于实例的原型,所有在类中定义的方法,都会被实例继承。如果在一个方法前,加上`static`关键字,就表示该方法不会被实例继承,而是直接通过类来调用,这就称为“静态方法”。 - -```javascript -class Foo { - static classMethod() { - return 'hello'; - } -} - -Foo.classMethod() // 'hello' - -var foo = new Foo(); -foo.classMethod() -// TypeError: foo.classMethod is not a function -``` - -上面代码中,`Foo`类的`classMethod`方法前有`static`关键字,表明该方法是一个静态方法,可以直接在`Foo`类上调用(`Foo.classMethod()`),而不是在`Foo`类的实例上调用。如果在实例上调用静态方法,会抛出一个错误,表示不存在该方法。 - -父类的静态方法,可以被子类继承。 - -```javascript -class Foo { - static classMethod() { - return 'hello'; - } -} - -class Bar extends Foo { -} - -Bar.classMethod(); // 'hello' -``` - -上面代码中,父类`Foo`有一个静态方法,子类`Bar`可以调用这个方法。 - -静态方法也是可以从`super`对象上调用的。 - -```javascript -class Foo { - static classMethod() { - return 'hello'; - } -} - -class Bar extends Foo { - static classMethod() { - return super.classMethod() + ', too'; - } -} - -Bar.classMethod(); -``` - -## Class的静态属性和实例属性 - -静态属性指的是Class本身的属性,即`Class.propname`,而不是定义在实例对象(`this`)上的属性。 - -```javascript -class Foo { -} - -Foo.prop = 1; -Foo.prop // 1 -``` - -上面的写法为`Foo`类定义了一个静态属性`prop`。 - -目前,只有这种写法可行,因为ES6明确规定,Class内部只有静态方法,没有静态属性。 - -```javascript -// 以下两种写法都无效 -class Foo { - // 写法一 - prop: 2 - - // 写法二 - static prop: 2 -} - -Foo.prop // undefined -``` - -ES7有一个静态属性的[提案](https://github.com/jeffmo/es-class-properties),目前Babel转码器支持。 - -这个提案对实例属性和静态属性,都规定了新的写法。 - -(1)类的实例属性 - -类的实例属性可以用等式,写入类的定义之中。 - -```javascript -class MyClass { - myProp = 42; - - constructor() { - console.log(this.myProp); // 42 - } -} -``` - -上面代码中,`myProp`就是`MyClass`的实例属性。在`MyClass`的实例上,可以读取这个属性。 - -以前,我们定义实例属性,只能写在类的`constructor`方法里面。 - -```javascript -class ReactCounter extends React.Component { - constructor(props) { - super(props); - this.state = { - count: 0 - }; - } -} -``` - -上面代码中,构造方法`constructor`里面,定义了`this.state`属性。 - -有了新的写法以后,可以不在`constructor`方法里面定义。 - -```javascript -class ReactCounter extends React.Component { - state = { - count: 0 - }; -} -``` - -这种写法比以前更清晰。 - -为了可读性的目的,对于那些在`constructor`里面已经定义的实例属性,新写法允许直接列出。 - -```javascript -class ReactCounter extends React.Component { - constructor(props) { - super(props); - this.state = { - count: 0 - }; - } - state; -} -``` - -(2)类的静态属性 - -类的静态属性只要在上面的实例属性写法前面,加上`static`关键字就可以了。 - -```javascript -class MyClass { - static myStaticProp = 42; - - constructor() { - console.log(MyClass.myStaticProp); // 42 - } -} -``` - -同样的,这个新写法大大方便了静态属性的表达。 - -```javascript -// 老写法 -class Foo { -} -Foo.prop = 1; - -// 新写法 -class Foo { - static prop = 1; -} -``` - -上面代码中,老写法的静态属性定义在类的外部。整个类生成以后,再生成静态属性。这样让人很容易忽略这个静态属性,也不符合相关代码应该放在一起的代码组织原则。另外,新写法是显式声明(declarative),而不是赋值处理,语义更好。 - -## 类的私有属性 - -目前,有一个[提案](https://github.com/tc39/proposal-private-fields),为`class`加了私有属性。方法是在属性名之前,使用`#`表示。 - -```javascript -class Point { - #x; - - constructor(x = 0) { - #x = +x; - } - - get x() { return #x } - set x(value) { #x = +value } -} -``` - -上面代码中,`#x`就表示私有属性`x`,在`Point`类之外是读取不到这个属性的。还可以看到,私有属性与实例的属性是可以同名的(比如,`#x`与`get x()`)。 - -私有属性可以指定初始值,在构造函数执行时进行初始化。 - -```javascript -class Point { - #x = 0; - constructor() { - #x; // 0 - } -} -``` - -之所以要引入一个新的前缀`#`表示私有属性,而没有采用`private`关键字,是因为 JavaScript 是一门动态语言,使用独立的符号似乎是唯一的可靠方法,能够准确地区分一种属性是私有属性。另外,Ruby 语言使用`@`表示私有属性,ES6 没有用这个符号而使用`#`,是因为`@`已经被留给了 Decorator。 - -该提案只规定了私有属性的写法。但是,很自然地,它也可以用来写私有方法。 - -```javascript -class Foo { - #a; - #b; - #sum() { return #a + #b; } - printSum() { console.log(#sum()); } - constructor(a, b) { #a = a; #b = b; } -} -``` - -## new.target属性 - -`new`是从构造函数生成实例的命令。ES6为`new`命令引入了一个`new.target`属性,(在构造函数中)返回`new`命令作用于的那个构造函数。如果构造函数不是通过`new`命令调用的,`new.target`会返回`undefined`,因此这个属性可以用来确定构造函数是怎么调用的。 - -```javascript -function Person(name) { - if (new.target !== undefined) { - this.name = name; - } else { - throw new Error('必须使用new生成实例'); - } -} - -// 另一种写法 -function Person(name) { - if (new.target === Person) { - this.name = name; - } else { - throw new Error('必须使用new生成实例'); - } -} - -var person = new Person('张三'); // 正确 -var notAPerson = Person.call(person, '张三'); // 报错 -``` - -上面代码确保构造函数只能通过`new`命令调用。 - -Class内部调用`new.target`,返回当前Class。 - -```javascript -class Rectangle { - constructor(length, width) { - console.log(new.target === Rectangle); - this.length = length; - this.width = width; - } -} - -var obj = new Rectangle(3, 4); // 输出 true -``` - -需要注意的是,子类继承父类时,`new.target`会返回子类。 - -```javascript -class Rectangle { - constructor(length, width) { - console.log(new.target === Rectangle); - // ... - } -} - -class Square extends Rectangle { - constructor(length) { - super(length, length); - } -} - -var obj = new Square(3); // 输出 false -``` - -上面代码中,`new.target`会返回子类。 - -利用这个特点,可以写出不能独立使用、必须继承后才能使用的类。 - -```javascript -class Shape { - constructor() { - if (new.target === Shape) { - throw new Error('本类不能实例化'); - } - } -} - -class Rectangle extends Shape { - constructor(length, width) { - super(); - // ... - } -} - -var x = new Shape(); // 报错 -var y = new Rectangle(3, 4); // 正确 -``` - -上面代码中,`Shape`类不能被实例化,只能用于继承。 - -注意,在函数外部,使用`new.target`会报错。 - -## Mixin模式的实现 - -Mixin模式指的是,将多个类的接口“混入”(mix in)另一个类。它在ES6的实现如下。 - -```javascript -function mix(...mixins) { - class Mix {} - - for (let mixin of mixins) { - copyProperties(Mix, mixin); - copyProperties(Mix.prototype, mixin.prototype); - } - - return Mix; -} - -function copyProperties(target, source) { - for (let key of Reflect.ownKeys(source)) { - if ( key !== "constructor" - && key !== "prototype" - && key !== "name" - ) { - let desc = Object.getOwnPropertyDescriptor(source, key); - Object.defineProperty(target, key, desc); - } - } -} -``` - -上面代码的`mix`函数,可以将多个对象合成为一个类。使用的时候,只要继承这个类即可。 - -```javascript -class DistributedEdit extends mix(Loggable, Serializable) { - // ... -} -``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/decorator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/decorator.md" deleted file mode 100644 index 690370f38..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/decorator.md" +++ /dev/null @@ -1,738 +0,0 @@ -# 修饰器 - -## 类的修饰 - -修饰器(Decorator)是一个函数,用来修改类的行为。这是ES7的一个[提案](https://github.com/wycats/javascript-decorators),目前Babel转码器已经支持。 - -修饰器对类的行为的改变,是代码编译时发生的,而不是在运行时。这意味着,修饰器能在编译阶段运行代码。 - -```javascript -function testable(target) { - target.isTestable = true; -} - -@testable -class MyTestableClass {} - -console.log(MyTestableClass.isTestable) // true -``` - -上面代码中,`@testable`就是一个修饰器。它修改了`MyTestableClass`这个类的行为,为它加上了静态属性`isTestable`。 - -基本上,修饰器的行为就是下面这样。 - -```javascript -@decorator -class A {} - -// 等同于 - -class A {} -A = decorator(A) || A; -``` - -也就是说,修饰器本质就是编译时执行的函数。 - -修饰器函数的第一个参数,就是所要修饰的目标类。 - -```javascript -function testable(target) { - // ... -} -``` - -上面代码中,`testable`函数的参数`target`,就是会被修饰的类。 - -如果觉得一个参数不够用,可以在修饰器外面再封装一层函数。 - -```javascript -function testable(isTestable) { - return function(target) { - target.isTestable = isTestable; - } -} - -@testable(true) -class MyTestableClass {} -MyTestableClass.isTestable // true - -@testable(false) -class MyClass {} -MyClass.isTestable // false -``` - -上面代码中,修饰器`testable`可以接受参数,这就等于可以修改修饰器的行为。 - -前面的例子是为类添加一个静态属性,如果想添加实例属性,可以通过目标类的`prototype`对象操作。 - -```javascript -function testable(target) { - target.prototype.isTestable = true; -} - -@testable -class MyTestableClass {} - -let obj = new MyTestableClass(); -obj.isTestable // true -``` - -上面代码中,修饰器函数`testable`是在目标类的`prototype`对象上添加属性,因此就可以在实例上调用。 - -下面是另外一个例子。 - -```javascript -// mixins.js -export function mixins(...list) { - return function (target) { - Object.assign(target.prototype, ...list) - } -} - -// main.js -import { mixins } from './mixins' - -const Foo = { - foo() { console.log('foo') } -}; - -@mixins(Foo) -class MyClass {} - -let obj = new MyClass(); -obj.foo() // 'foo' -``` - -上面代码通过修饰器`mixins`,把`Foo`类的方法添加到了`MyClass`的实例上面。可以用`Object.assign()`模拟这个功能。 - -```javascript -const Foo = { - foo() { console.log('foo') } -}; - -class MyClass {} - -Object.assign(MyClass.prototype, Foo); - -let obj = new MyClass(); -obj.foo() // 'foo' -``` - -## 方法的修饰 - -修饰器不仅可以修饰类,还可以修饰类的属性。 - -```javascript -class Person { - @readonly - name() { return `${this.first} ${this.last}` } -} -``` - -上面代码中,修饰器`readonly`用来修饰“类”的`name`方法。 - -此时,修饰器函数一共可以接受三个参数,第一个参数是所要修饰的目标对象,第二个参数是所要修饰的属性名,第三个参数是该属性的描述对象。 - -```javascript -function readonly(target, name, descriptor){ - // descriptor对象原来的值如下 - // { - // value: specifiedFunction, - // enumerable: false, - // configurable: true, - // writable: true - // }; - descriptor.writable = false; - return descriptor; -} - -readonly(Person.prototype, 'name', descriptor); -// 类似于 -Object.defineProperty(Person.prototype, 'name', descriptor); -``` - -上面代码说明,修饰器(readonly)会修改属性的描述对象(descriptor),然后被修改的描述对象再用来定义属性。 - -下面是另一个例子,修改属性描述对象的`enumerable`属性,使得该属性不可遍历。 - -```javascript -class Person { - @nonenumerable - get kidCount() { return this.children.length; } -} - -function nonenumerable(target, name, descriptor) { - descriptor.enumerable = false; - return descriptor; -} -``` - -下面的`@log`修饰器,可以起到输出日志的作用。 - -```javascript -class Math { - @log - add(a, b) { - return a + b; - } -} - -function log(target, name, descriptor) { - var oldValue = descriptor.value; - - descriptor.value = function() { - console.log(`Calling "${name}" with`, arguments); - return oldValue.apply(null, arguments); - }; - - return descriptor; -} - -const math = new Math(); - -// passed parameters should get logged now -math.add(2, 4); -``` - -上面代码中,`@log`修饰器的作用就是在执行原始的操作之前,执行一次`console.log`,从而达到输出日志的目的。 - -修饰器有注释的作用。 - -```javascript -@testable -class Person { - @readonly - @nonenumerable - name() { return `${this.first} ${this.last}` } -} -``` - -从上面代码中,我们一眼就能看出,`Person`类是可测试的,而`name`方法是只读和不可枚举的。 - -如果同一个方法有多个修饰器,会像剥洋葱一样,先从外到内进入,然后由内向外执行。 - -```javascript -function dec(id){ - console.log('evaluated', id); - return (target, property, descriptor) => console.log('executed', id); -} - -class Example { - @dec(1) - @dec(2) - method(){} -} -// evaluated 1 -// evaluated 2 -// executed 2 -// executed 1 -``` - -上面代码中,外层修饰器`@dec(1)`先进入,但是内层修饰器`@dec(2)`先执行。 - -除了注释,修饰器还能用来类型检查。所以,对于类来说,这项功能相当有用。从长期来看,它将是JavaScript代码静态分析的重要工具。 - -## 为什么修饰器不能用于函数? - -修饰器只能用于类和类的方法,不能用于函数,因为存在函数提升。 - -```javascript -var counter = 0; - -var add = function () { - counter++; -}; - -@add -function foo() { -} -``` - -上面的代码,意图是执行后`counter`等于1,但是实际上结果是`counter`等于0。因为函数提升,使得实际执行的代码是下面这样。 - -```javascript -@add -function foo() { -} - -var counter; -var add; - -counter = 0; - -add = function () { - counter++; -}; -``` - -下面是另一个例子。 - -```javascript -var readOnly = require("some-decorator"); - -@readOnly -function foo() { -} -``` - -上面代码也有问题,因为实际执行是下面这样。 - -```javascript -var readOnly; - -@readOnly -function foo() { -} - -readOnly = require("some-decorator"); -``` - -总之,由于存在函数提升,使得修饰器不能用于函数。类是不会提升的,所以就没有这方面的问题。 - -## core-decorators.js - -[core-decorators.js](https://github.com/jayphelps/core-decorators.js)是一个第三方模块,提供了几个常见的修饰器,通过它可以更好地理解修饰器。 - -**(1)@autobind** - -`autobind`修饰器使得方法中的`this`对象,绑定原始对象。 - -```javascript -import { autobind } from 'core-decorators'; - -class Person { - @autobind - getPerson() { - return this; - } -} - -let person = new Person(); -let getPerson = person.getPerson; - -getPerson() === person; -// true -``` - -**(2)@readonly** - -`readonly`修饰器使得属性或方法不可写。 - -```javascript -import { readonly } from 'core-decorators'; - -class Meal { - @readonly - entree = 'steak'; -} - -var dinner = new Meal(); -dinner.entree = 'salmon'; -// Cannot assign to read only property 'entree' of [object Object] -``` - -**(3)@override** - -`override`修饰器检查子类的方法,是否正确覆盖了父类的同名方法,如果不正确会报错。 - -```javascript -import { override } from 'core-decorators'; - -class Parent { - speak(first, second) {} -} - -class Child extends Parent { - @override - speak() {} - // SyntaxError: Child#speak() does not properly override Parent#speak(first, second) -} - -// or - -class Child extends Parent { - @override - speaks() {} - // SyntaxError: No descriptor matching Child#speaks() was found on the prototype chain. - // - // Did you mean "speak"? -} -``` - -**(4)@deprecate (别名@deprecated)** - -`deprecate`或`deprecated`修饰器在控制台显示一条警告,表示该方法将废除。 - -```javascript -import { deprecate } from 'core-decorators'; - -class Person { - @deprecate - facepalm() {} - - @deprecate('We stopped facepalming') - facepalmHard() {} - - @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' }) - facepalmHarder() {} -} - -let person = new Person(); - -person.facepalm(); -// DEPRECATION Person#facepalm: This function will be removed in future versions. - -person.facepalmHard(); -// DEPRECATION Person#facepalmHard: We stopped facepalming - -person.facepalmHarder(); -// DEPRECATION Person#facepalmHarder: We stopped facepalming -// -// See http://knowyourmeme.com/memes/facepalm for more details. -// -``` - -**(5)@suppressWarnings** - -`suppressWarnings`修饰器抑制`decorated`修饰器导致的`console.warn()`调用。但是,异步代码发出的调用除外。 - -```javascript -import { suppressWarnings } from 'core-decorators'; - -class Person { - @deprecated - facepalm() {} - - @suppressWarnings - facepalmWithoutWarning() { - this.facepalm(); - } -} - -let person = new Person(); - -person.facepalmWithoutWarning(); -// no warning is logged -``` - -## 使用修饰器实现自动发布事件 - -我们可以使用修饰器,使得对象的方法被调用时,自动发出一个事件。 - -```javascript -import postal from "postal/lib/postal.lodash"; - -export default function publish(topic, channel) { - return function(target, name, descriptor) { - const fn = descriptor.value; - - descriptor.value = function() { - let value = fn.apply(this, arguments); - postal.channel(channel || target.channel || "/").publish(topic, value); - }; - }; -} -``` - -上面代码定义了一个名为`publish`的修饰器,它通过改写`descriptor.value`,使得原方法被调用时,会自动发出一个事件。它使用的事件“发布/订阅”库是[Postal.js](https://github.com/postaljs/postal.js)。 - -它的用法如下。 - -```javascript -import publish from "path/to/decorators/publish"; - -class FooComponent { - @publish("foo.some.message", "component") - someMethod() { - return { - my: "data" - }; - } - @publish("foo.some.other") - anotherMethod() { - // ... - } -} -``` - -以后,只要调用`someMethod`或者`anotherMethod`,就会自动发出一个事件。 - -```javascript -let foo = new FooComponent(); - -foo.someMethod() // 在"component"频道发布"foo.some.message"事件,附带的数据是{ my: "data" } -foo.anotherMethod() // 在"/"频道发布"foo.some.other"事件,不附带数据 -``` - -## Mixin - -在修饰器的基础上,可以实现`Mixin`模式。所谓`Mixin`模式,就是对象继承的一种替代方案,中文译为“混入”(mix in),意为在一个对象之中混入另外一个对象的方法。 - -请看下面的例子。 - -```javascript -const Foo = { - foo() { console.log('foo') } -}; - -class MyClass {} - -Object.assign(MyClass.prototype, Foo); - -let obj = new MyClass(); -obj.foo() // 'foo' -``` - -上面代码之中,对象`Foo`有一个`foo`方法,通过`Object.assign`方法,可以将`foo`方法“混入”`MyClass`类,导致`MyClass`的实例`obj`对象都具有`foo`方法。这就是“混入”模式的一个简单实现。 - -下面,我们部署一个通用脚本`mixins.js`,将mixin写成一个修饰器。 - -```javascript -export function mixins(...list) { - return function (target) { - Object.assign(target.prototype, ...list); - }; -} -``` - -然后,就可以使用上面这个修饰器,为类“混入”各种方法。 - -```javascript -import { mixins } from './mixins'; - -const Foo = { - foo() { console.log('foo') } -}; - -@mixins(Foo) -class MyClass {} - -let obj = new MyClass(); -obj.foo() // "foo" -``` - -通过mixins这个修饰器,实现了在MyClass类上面“混入”Foo对象的`foo`方法。 - -不过,上面的方法会改写`MyClass`类的`prototype`对象,如果不喜欢这一点,也可以通过类的继承实现mixin。 - -```javascript -class MyClass extends MyBaseClass { - /* ... */ -} -``` - -上面代码中,`MyClass`继承了`MyBaseClass`。如果我们想在`MyClass`里面“混入”一个`foo`方法,一个办法是在`MyClass`和`MyBaseClass`之间插入一个混入类,这个类具有`foo`方法,并且继承了`MyBaseClass`的所有方法,然后`MyClass`再继承这个类。 - -```javascript -let MyMixin = (superclass) => class extends superclass { - foo() { - console.log('foo from MyMixin'); - } -}; -``` - -上面代码中,`MyMixin`是一个混入类生成器,接受`superclass`作为参数,然后返回一个继承`superclass`的子类,该子类包含一个`foo`方法。 - -接着,目标类再去继承这个混入类,就达到了“混入”`foo`方法的目的。 - -```javascript -class MyClass extends MyMixin(MyBaseClass) { - /* ... */ -} - -let c = new MyClass(); -c.foo(); // "foo from MyMixin" -``` - -如果需要“混入”多个方法,就生成多个混入类。 - -```javascript -class MyClass extends Mixin1(Mixin2(MyBaseClass)) { - /* ... */ -} -``` - -这种写法的一个好处,是可以调用`super`,因此可以避免在“混入”过程中覆盖父类的同名方法。 - -```javascript -let Mixin1 = (superclass) => class extends superclass { - foo() { - console.log('foo from Mixin1'); - if (super.foo) super.foo(); - } -}; - -let Mixin2 = (superclass) => class extends superclass { - foo() { - console.log('foo from Mixin2'); - if (super.foo) super.foo(); - } -}; - -class S { - foo() { - console.log('foo from S'); - } -} - -class C extends Mixin1(Mixin2(S)) { - foo() { - console.log('foo from C'); - super.foo(); - } -} -``` - -上面代码中,每一次`混入`发生时,都调用了父类的`super.foo`方法,导致父类的同名方法没有被覆盖,行为被保留了下来。 - -```javascript -new C().foo() -// foo from C -// foo from Mixin1 -// foo from Mixin2 -// foo from S -``` - -## Trait - -Trait也是一种修饰器,效果与Mixin类似,但是提供更多功能,比如防止同名方法的冲突、排除混入某些方法、为混入的方法起别名等等。 - -下面采用[traits-decorator](https://github.com/CocktailJS/traits-decorator)这个第三方模块作为例子。这个模块提供的traits修饰器,不仅可以接受对象,还可以接受ES6类作为参数。 - -```javascript -import { traits } from 'traits-decorator'; - -class TFoo { - foo() { console.log('foo') } -} - -const TBar = { - bar() { console.log('bar') } -}; - -@traits(TFoo, TBar) -class MyClass { } - -let obj = new MyClass(); -obj.foo() // foo -obj.bar() // bar -``` - -上面代码中,通过traits修饰器,在`MyClass`类上面“混入”了`TFoo`类的`foo`方法和`TBar`对象的`bar`方法。 - -Trait不允许“混入”同名方法。 - -```javascript -import { traits } from 'traits-decorator'; - -class TFoo { - foo() { console.log('foo') } -} - -const TBar = { - bar() { console.log('bar') }, - foo() { console.log('foo') } -}; - -@traits(TFoo, TBar) -class MyClass { } -// 报错 -// throw new Error('Method named: ' + methodName + ' is defined twice.'); -// ^ -// Error: Method named: foo is defined twice. -``` - -上面代码中,TFoo和TBar都有foo方法,结果traits修饰器报错。 - -一种解决方法是排除TBar的foo方法。 - -```javascript -import { traits, excludes } from 'traits-decorator'; - -class TFoo { - foo() { console.log('foo') } -} - -const TBar = { - bar() { console.log('bar') }, - foo() { console.log('foo') } -}; - -@traits(TFoo, TBar::excludes('foo')) -class MyClass { } - -let obj = new MyClass(); -obj.foo() // foo -obj.bar() // bar -``` - -上面代码使用绑定运算符(::)在TBar上排除foo方法,混入时就不会报错了。 - -另一种方法是为TBar的foo方法起一个别名。 - -```javascript -import { traits, alias } from 'traits-decorator'; - -class TFoo { - foo() { console.log('foo') } -} - -const TBar = { - bar() { console.log('bar') }, - foo() { console.log('foo') } -}; - -@traits(TFoo, TBar::alias({foo: 'aliasFoo'})) -class MyClass { } - -let obj = new MyClass(); -obj.foo() // foo -obj.aliasFoo() // foo -obj.bar() // bar -``` - -上面代码为TBar的foo方法起了别名aliasFoo,于是MyClass也可以混入TBar的foo方法了。 - -alias和excludes方法,可以结合起来使用。 - -```javascript -@traits(TExample::excludes('foo','bar')::alias({baz:'exampleBaz'})) -class MyClass {} -``` - -上面代码排除了TExample的foo方法和bar方法,为baz方法起了别名exampleBaz。 - -as方法则为上面的代码提供了另一种写法。 - -```javascript -@traits(TExample::as({excludes:['foo', 'bar'], alias: {baz: 'exampleBaz'}})) -class MyClass {} -``` - -## Babel转码器的支持 - -目前,Babel转码器已经支持Decorator。 - -首先,安装`babel-core`和`babel-plugin-transform-decorators`。由于后者包括在`babel-preset-stage-0`之中,所以改为安装`babel-preset-stage-0`亦可。 - -```bash -$ npm install babel-core babel-plugin-transform-decorators -``` - -然后,设置配置文件`.babelrc`。 - -```javascript -{ - "plugins": ["transform-decorators"] -} -``` - -这时,Babel就可以对Decorator转码了。 - -脚本中打开的命令如下。 - -```javascript -babel.transform("code", {plugins: ["transform-decorators"]}) -``` - -Babel的官方网站提供一个[在线转码器](https://babeljs.io/repl/),只要勾选Experimental,就能支持Decorator的在线转码。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/function.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/function.md" deleted file mode 100644 index 3f3c61acf..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/function.md" +++ /dev/null @@ -1,1585 +0,0 @@ -# 函数的扩展 - -## 函数参数的默认值 - -### 基本用法 - -在ES6之前,不能直接为函数的参数指定默认值,只能采用变通的方法。 - -```javascript -function log(x, y) { - y = y || 'World'; - console.log(x, y); -} - -log('Hello') // Hello World -log('Hello', 'China') // Hello China -log('Hello', '') // Hello World -``` - -上面代码检查函数`log`的参数`y`有没有赋值,如果没有,则指定默认值为`World`。这种写法的缺点在于,如果参数`y`赋值了,但是对应的布尔值为`false`,则该赋值不起作用。就像上面代码的最后一行,参数`y`等于空字符,结果被改为默认值。 - -为了避免这个问题,通常需要先判断一下参数`y`是否被赋值,如果没有,再等于默认值。 - -```javascript -if (typeof y === 'undefined') { - y = 'World'; -} -``` - -ES6 允许为函数的参数设置默认值,即直接写在参数定义的后面。 - -```javascript -function log(x, y = 'World') { - console.log(x, y); -} - -log('Hello') // Hello World -log('Hello', 'China') // Hello China -log('Hello', '') // Hello -``` - -可以看到,ES6 的写法比 ES5 简洁许多,而且非常自然。下面是另一个例子。 - -```javascript -function Point(x = 0, y = 0) { - this.x = x; - this.y = y; -} - -var p = new Point(); -p // { x: 0, y: 0 } -``` - -除了简洁,ES6 的写法还有两个好处:首先,阅读代码的人,可以立刻意识到哪些参数是可以省略的,不用查看函数体或文档;其次,有利于将来的代码优化,即使未来的版本在对外接口中,彻底拿掉这个参数,也不会导致以前的代码无法运行。 - -参数变量是默认声明的,所以不能用`let`或`const`再次声明。 - -```javascript -function foo(x = 5) { - let x = 1; // error - const x = 2; // error -} -``` - -上面代码中,参数变量`x`是默认声明的,在函数体中,不能用`let`或`const`再次声明,否则会报错。 - -使用参数默认值时,函数不能有同名参数。 - -```javascript -function foo(x, x, y = 1) { - // ... -} -// SyntaxError: Duplicate parameter name not allowed in this context -``` - -另外,一个容易忽略的地方是,如果参数默认值是变量,那么参数就不是传值的,而是每次都重新计算默认值表达式的值。也就是说,参数默认值是惰性求值的。 - -```javascript -let x = 99; -function foo(p = x + 1) { - console.log(p); -} - -foo() // 100 - -x = 100; -foo() // 101 -``` - -上面代码中,参数`p`的默认值是`x + 1`。这时,每次调用函数`foo`,都会重新计算`x + 1`,而不是默认`p`等于 100。 - -### 与解构赋值默认值结合使用 - -参数默认值可以与解构赋值的默认值,结合起来使用。 - -```javascript -function foo({x, y = 5}) { - console.log(x, y); -} - -foo({}) // undefined, 5 -foo({x: 1}) // 1, 5 -foo({x: 1, y: 2}) // 1, 2 -foo() // TypeError: Cannot read property 'x' of undefined -``` - -上面代码使用了对象的解构赋值默认值,而没有使用函数参数的默认值。只有当函数`foo`的参数是一个对象时,变量`x`和`y`才会通过解构赋值而生成。如果函数`foo`调用时参数不是对象,变量`x`和`y`就不会生成,从而报错。如果参数对象没有`y`属性,`y`的默认值5才会生效。 - -下面是另一个对象的解构赋值默认值的例子。 - -```javascript -function fetch(url, { body = '', method = 'GET', headers = {} }) { - console.log(method); -} - -fetch('http://example.com', {}) -// "GET" - -fetch('http://example.com') -// 报错 -``` - -上面代码中,如果函数`fetch`的第二个参数是一个对象,就可以为它的三个属性设置默认值。 - -上面的写法不能省略第二个参数,如果结合函数参数的默认值,就可以省略第二个参数。这时,就出现了双重默认值。 - -```javascript -function fetch(url, { method = 'GET' } = {}) { - console.log(method); -} - -fetch('http://example.com') -// "GET" -``` - -上面代码中,函数`fetch`没有第二个参数时,函数参数的默认值就会生效,然后才是解构赋值的默认值生效,变量`method`才会取到默认值`GET`。 - -再请问下面两种写法有什么差别? - -```javascript -// 写法一 -function m1({x = 0, y = 0} = {}) { - return [x, y]; -} - -// 写法二 -function m2({x, y} = { x: 0, y: 0 }) { - return [x, y]; -} -``` - -上面两种写法都对函数的参数设定了默认值,区别是写法一函数参数的默认值是空对象,但是设置了对象解构赋值的默认值;写法二函数参数的默认值是一个有具体属性的对象,但是没有设置对象解构赋值的默认值。 - -```javascript -// 函数没有参数的情况 -m1() // [0, 0] -m2() // [0, 0] - -// x和y都有值的情况 -m1({x: 3, y: 8}) // [3, 8] -m2({x: 3, y: 8}) // [3, 8] - -// x有值,y无值的情况 -m1({x: 3}) // [3, 0] -m2({x: 3}) // [3, undefined] - -// x和y都无值的情况 -m1({}) // [0, 0]; -m2({}) // [undefined, undefined] - -m1({z: 3}) // [0, 0] -m2({z: 3}) // [undefined, undefined] -``` - -### 参数默认值的位置 - -通常情况下,定义了默认值的参数,应该是函数的尾参数。因为这样比较容易看出来,到底省略了哪些参数。如果非尾部的参数设置默认值,实际上这个参数是没法省略的。 - -```javascript -// 例一 -function f(x = 1, y) { - return [x, y]; -} - -f() // [1, undefined] -f(2) // [2, undefined]) -f(, 1) // 报错 -f(undefined, 1) // [1, 1] - -// 例二 -function f(x, y = 5, z) { - return [x, y, z]; -} - -f() // [undefined, 5, undefined] -f(1) // [1, 5, undefined] -f(1, ,2) // 报错 -f(1, undefined, 2) // [1, 5, 2] -``` - -上面代码中,有默认值的参数都不是尾参数。这时,无法只省略该参数,而不省略它后面的参数,除非显式输入`undefined`。 - -如果传入`undefined`,将触发该参数等于默认值,`null`则没有这个效果。 - -```javascript -function foo(x = 5, y = 6) { - console.log(x, y); -} - -foo(undefined, null) -// 5 null -``` - -上面代码中,`x`参数对应`undefined`,结果触发了默认值,`y`参数等于`null`,就没有触发默认值。 - -### 函数的 length 属性 - -指定了默认值以后,函数的`length`属性,将返回没有指定默认值的参数个数。也就是说,指定了默认值后,`length`属性将失真。 - -```javascript -(function (a) {}).length // 1 -(function (a = 5) {}).length // 0 -(function (a, b, c = 5) {}).length // 2 -``` - -上面代码中,`length`属性的返回值,等于函数的参数个数减去指定了默认值的参数个数。比如,上面最后一个函数,定义了3个参数,其中有一个参数`c`指定了默认值,因此`length`属性等于`3`减去`1`,最后得到`2`。 - -这是因为`length`属性的含义是,该函数预期传入的参数个数。某个参数指定默认值以后,预期传入的参数个数就不包括这个参数了。同理,rest参数也不会计入`length`属性。 - -```javascript -(function(...args) {}).length // 0 -``` - -如果设置了默认值的参数不是尾参数,那么`length`属性也不再计入后面的参数了。 - -```javascript -(function (a = 0, b, c) {}).length // 0 -(function (a, b = 1, c) {}).length // 1 -``` - -### 作用域 - -一旦设置了参数的默认值,函数进行声明初始化时,参数会形成一个单独的作用域(context)。等到初始化结束,这个作用域就会消失。这种语法行为,在不设置参数默认值时,是不会出现的。 - -```javascript -var x = 1; - -function f(x, y = x) { - console.log(y); -} - -f(2) // 2 -``` - -上面代码中,参数`y`的默认值等于变量`x`。调用函数`f`时,参数形成一个单独的作用域。在这个作用域里面,默认值变量`x`指向第一个参数`x`,而不是全局变量`x`,所以输出是`2`。 - -再看下面的例子。 - -```javascript -let x = 1; - -function f(y = x) { - let x = 2; - console.log(y); -} - -f() // 1 -``` - -上面代码中,函数`f`调用时,参数`y = x`形成一个单独的作用域。这个作用域里面,变量`x`本身没有定义,所以指向外层的全局变量`x`。函数调用时,函数体内部的局部变量`x`影响不到默认值变量`x`。 - -如果此时,全局变量`x`不存在,就会报错。 - -```javascript -function f(y = x) { - let x = 2; - console.log(y); -} - -f() // ReferenceError: x is not defined -``` - -下面这样写,也会报错。 - -```javascript -var x = 1; - -function foo(x = x) { - // ... -} - -foo() // ReferenceError: x is not defined -``` - -上面代码中,参数`x = x`形成一个单独作用域。实际执行的是`let x = x`,由于暂时性死区的原因,这行代码会报错”x 未定义“。 - -如果参数的默认值是一个函数,该函数的作用域也遵守这个规则。请看下面的例子。 - -```javascript -let foo = 'outer'; - -function bar(func = x => foo) { - let foo = 'inner'; - console.log(func()); // outer -} - -bar(); -``` - -上面代码中,函数`bar`的参数`func`的默认值是一个匿名函数,返回值为变量`foo`。函数参数形成的单独作用域里面,并没有定义变量`foo`,所以`foo`指向外层的全局变量`foo`,因此输出`outer`。 - -如果写成下面这样,就会报错。 - -```javascript -function bar(func = () => foo) { - let foo = 'inner'; - console.log(func()); -} - -bar() // ReferenceError: foo is not defined -``` - -上面代码中,匿名函数里面的`foo`指向函数外层,但是函数外层并没有声明变量`foo`,所以就报错了。 - -下面是一个更复杂的例子。 - -```javascript -var x = 1; -function foo(x, y = function() { x = 2; }) { - var x = 3; - y(); - console.log(x); -} - -foo() // 3 -x // 1 -``` - -上面代码中,函数`foo`的参数形成一个单独作用域。这个作用域里面,首先声明了变量`x`,然后声明了变量`y`,`y`的默认值是一个匿名函数。这个匿名函数内部的变量`x`,指向同一个作用域的第一个参数`x`。函数`foo`内部又声明了一个内部变量`x`,该变量与第一个参数`x`由于不是同一个作用域,所以不是同一个变量,因此执行`y`后,内部变量`x`和外部全局变量`x`的值都没变。 - -如果将`var x = 3`的`var`去除,函数`foo`的内部变量`x`就指向第一个参数`x`,与匿名函数内部的`x`是一致的,所以最后输出的就是`2`,而外层的全局变量`x`依然不受影响。 - -```javascript -var x = 1; -function foo(x, y = function() { x = 2; }) { - x = 3; - y(); - console.log(x); -} - -foo() // 2 -x // 1 -``` - -### 应用 - -利用参数默认值,可以指定某一个参数不得省略,如果省略就抛出一个错误。 - -```javascript -function throwIfMissing() { - throw new Error('Missing parameter'); -} - -function foo(mustBeProvided = throwIfMissing()) { - return mustBeProvided; -} - -foo() -// Error: Missing parameter -``` - -上面代码的`foo`函数,如果调用的时候没有参数,就会调用默认值`throwIfMissing`函数,从而抛出一个错误。 - -从上面代码还可以看到,参数`mustBeProvided`的默认值等于`throwIfMissing`函数的运行结果(即函数名之后有一对圆括号),这表明参数的默认值不是在定义时执行,而是在运行时执行(即如果参数已经赋值,默认值中的函数就不会运行),这与 Python 语言不一样。 - -另外,可以将参数默认值设为`undefined`,表明这个参数是可以省略的。 - -```javascript -function foo(optional = undefined) { ··· } -``` - -## rest参数 - -ES6 引入 rest 参数(形式为“...变量名”),用于获取函数的多余参数,这样就不需要使用`arguments`对象了。rest 参数搭配的变量是一个数组,该变量将多余的参数放入数组中。 - -```javascript -function add(...values) { - let sum = 0; - - for (var val of values) { - sum += val; - } - - return sum; -} - -add(2, 5, 3) // 10 -``` - -上面代码的`add`函数是一个求和函数,利用 rest 参数,可以向该函数传入任意数目的参数。 - -下面是一个 rest 参数代替`arguments`变量的例子。 - -```javascript -// arguments变量的写法 -function sortNumbers() { - return Array.prototype.slice.call(arguments).sort(); -} - -// rest参数的写法 -const sortNumbers = (...numbers) => numbers.sort(); -``` - -上面代码的两种写法,比较后可以发现,rest 参数的写法更自然也更简洁。 - -rest 参数中的变量代表一个数组,所以数组特有的方法都可以用于这个变量。下面是一个利用 rest 参数改写数组`push`方法的例子。 - -```javascript -function push(array, ...items) { - items.forEach(function(item) { - array.push(item); - console.log(item); - }); -} - -var a = []; -push(a, 1, 2, 3) -``` - -注意,rest 参数之后不能再有其他参数(即只能是最后一个参数),否则会报错。 - -```javascript -// 报错 -function f(a, ...b, c) { - // ... -} -``` - -函数的`length`属性,不包括 rest 参数。 - -```javascript -(function(a) {}).length // 1 -(function(...a) {}).length // 0 -(function(a, ...b) {}).length // 1 -``` - -## 扩展运算符 - -### 含义 - -扩展运算符(spread)是三个点(`...`)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。 - -```javascript -console.log(...[1, 2, 3]) -// 1 2 3 - -console.log(1, ...[2, 3, 4], 5) -// 1 2 3 4 5 - -[...document.querySelectorAll('div')] -// [<div>, <div>, <div>] -``` - -该运算符主要用于函数调用。 - -```javascript -function push(array, ...items) { - array.push(...items); -} - -function add(x, y) { - return x + y; -} - -var numbers = [4, 38]; -add(...numbers) // 42 -``` - -上面代码中,`array.push(...items)`和`add(...numbers)`这两行,都是函数的调用,它们的都使用了扩展运算符。该运算符将一个数组,变为参数序列。 - -扩展运算符与正常的函数参数可以结合使用,非常灵活。 - -```javascript -function f(v, w, x, y, z) { } -var args = [0, 1]; -f(-1, ...args, 2, ...[3]); -``` - -### 替代数组的apply方法 - -由于扩展运算符可以展开数组,所以不再需要`apply`方法,将数组转为函数的参数了。 - -```javascript -// ES5的写法 -function f(x, y, z) { - // ... -} -var args = [0, 1, 2]; -f.apply(null, args); - -// ES6的写法 -function f(x, y, z) { - // ... -} -var args = [0, 1, 2]; -f(...args); -``` - -下面是扩展运算符取代`apply`方法的一个实际的例子,应用`Math.max`方法,简化求出一个数组最大元素的写法。 - -```javascript -// ES5的写法 -Math.max.apply(null, [14, 3, 77]) - -// ES6的写法 -Math.max(...[14, 3, 77]) - -// 等同于 -Math.max(14, 3, 77); -``` - -上面代码表示,由于JavaScript不提供求数组最大元素的函数,所以只能套用`Math.max`函数,将数组转为一个参数序列,然后求最大值。有了扩展运算符以后,就可以直接用`Math.max`了。 - -另一个例子是通过`push`函数,将一个数组添加到另一个数组的尾部。 - -```javascript -// ES5的写法 -var arr1 = [0, 1, 2]; -var arr2 = [3, 4, 5]; -Array.prototype.push.apply(arr1, arr2); - -// ES6的写法 -var arr1 = [0, 1, 2]; -var arr2 = [3, 4, 5]; -arr1.push(...arr2); -``` - -上面代码的ES5写法中,`push`方法的参数不能是数组,所以只好通过`apply`方法变通使用`push`方法。有了扩展运算符,就可以直接将数组传入`push`方法。 - -下面是另外一个例子。 - -```javascript -// ES5 -new (Date.bind.apply(Date, [null, 2015, 1, 1])) -// ES6 -new Date(...[2015, 1, 1]); -``` - -### 扩展运算符的应用 - -**(1)合并数组** - -扩展运算符提供了数组合并的新写法。 - -```javascript -// ES5 -[1, 2].concat(more) -// ES6 -[1, 2, ...more] - -var arr1 = ['a', 'b']; -var arr2 = ['c']; -var arr3 = ['d', 'e']; - -// ES5的合并数组 -arr1.concat(arr2, arr3); -// [ 'a', 'b', 'c', 'd', 'e' ] - -// ES6的合并数组 -[...arr1, ...arr2, ...arr3] -// [ 'a', 'b', 'c', 'd', 'e' ] -``` - -**(2)与解构赋值结合** - -扩展运算符可以与解构赋值结合起来,用于生成数组。 - -```javascript -// ES5 -a = list[0], rest = list.slice(1) -// ES6 -[a, ...rest] = list -``` - -下面是另外一些例子。 - -```javascript -const [first, ...rest] = [1, 2, 3, 4, 5]; -first // 1 -rest // [2, 3, 4, 5] - -const [first, ...rest] = []; -first // undefined -rest // []: - -const [first, ...rest] = ["foo"]; -first // "foo" -rest // [] -``` - -如果将扩展运算符用于数组赋值,只能放在参数的最后一位,否则会报错。 - -```javascript -const [...butLast, last] = [1, 2, 3, 4, 5]; -// 报错 - -const [first, ...middle, last] = [1, 2, 3, 4, 5]; -// 报错 -``` - -**(3)函数的返回值** - -JavaScript的函数只能返回一个值,如果需要返回多个值,只能返回数组或对象。扩展运算符提供了解决这个问题的一种变通方法。 - -```javascript -var dateFields = readDateFields(database); -var d = new Date(...dateFields); -``` - -上面代码从数据库取出一行数据,通过扩展运算符,直接将其传入构造函数`Date`。 - -**(4)字符串** - -扩展运算符还可以将字符串转为真正的数组。 - -```javascript -[...'hello'] -// [ "h", "e", "l", "l", "o" ] -``` - -上面的写法,有一个重要的好处,那就是能够正确识别32位的Unicode字符。 - -```javascript -'x\uD83D\uDE80y'.length // 4 -[...'x\uD83D\uDE80y'].length // 3 -``` - -上面代码的第一种写法,JavaScript会将32位Unicode字符,识别为2个字符,采用扩展运算符就没有这个问题。因此,正确返回字符串长度的函数,可以像下面这样写。 - -```javascript -function length(str) { - return [...str].length; -} - -length('x\uD83D\uDE80y') // 3 -``` - -凡是涉及到操作32位Unicode字符的函数,都有这个问题。因此,最好都用扩展运算符改写。 - -```javascript -let str = 'x\uD83D\uDE80y'; - -str.split('').reverse().join('') -// 'y\uDE80\uD83Dx' - -[...str].reverse().join('') -// 'y\uD83D\uDE80x' -``` - -上面代码中,如果不用扩展运算符,字符串的`reverse`操作就不正确。 - -**(5)实现了Iterator接口的对象** - -任何Iterator接口的对象,都可以用扩展运算符转为真正的数组。 - -```javascript -var nodeList = document.querySelectorAll('div'); -var array = [...nodeList]; -``` - -上面代码中,`querySelectorAll`方法返回的是一个`nodeList`对象。它不是数组,而是一个类似数组的对象。这时,扩展运算符可以将其转为真正的数组,原因就在于`NodeList`对象实现了Iterator接口。 - -对于那些没有部署Iterator接口的类似数组的对象,扩展运算符就无法将其转为真正的数组。 - -```javascript -let arrayLike = { - '0': 'a', - '1': 'b', - '2': 'c', - length: 3 -}; - -// TypeError: Cannot spread non-iterable object. -let arr = [...arrayLike]; -``` - -上面代码中,`arrayLike`是一个类似数组的对象,但是没有部署Iterator接口,扩展运算符就会报错。这时,可以改为使用`Array.from`方法将`arrayLike`转为真正的数组。 - -**(6)Map和Set结构,Generator函数** - -扩展运算符内部调用的是数据结构的Iterator接口,因此只要具有Iterator接口的对象,都可以使用扩展运算符,比如Map结构。 - -```javascript -let map = new Map([ - [1, 'one'], - [2, 'two'], - [3, 'three'], -]); - -let arr = [...map.keys()]; // [1, 2, 3] -``` - -Generator函数运行后,返回一个遍历器对象,因此也可以使用扩展运算符。 - -```javascript -var go = function*(){ - yield 1; - yield 2; - yield 3; -}; - -[...go()] // [1, 2, 3] -``` - -上面代码中,变量`go`是一个Generator函数,执行后返回的是一个遍历器对象,对这个遍历器对象执行扩展运算符,就会将内部遍历得到的值,转为一个数组。 - -如果对没有`iterator`接口的对象,使用扩展运算符,将会报错。 - -```javascript -var obj = {a: 1, b: 2}; -let arr = [...obj]; // TypeError: Cannot spread non-iterable object -``` - -## 严格模式 - -从ES5开始,函数内部可以设定为严格模式。 - -```javascript -function doSomething(a, b) { - 'use strict'; - // code -} -``` - -《ECMAScript 2016标准》做了一点修改,规定只要函数参数使用了默认值、解构赋值、或者扩展运算符,那么函数内部就不能显式设定为严格模式,否则会报错。 - -```javascript -// 报错 -function doSomething(a, b = a) { - 'use strict'; - // code -} - -// 报错 -const doSomething = function ({a, b}) { - 'use strict'; - // code -}; - -// 报错 -const doSomething = (...a) => { - 'use strict'; - // code -}; - -const obj = { - // 报错 - doSomething({a, b}) { - 'use strict'; - // code - } -}; -``` - -这样规定的原因是,函数内部的严格模式,同时适用于函数体代码和函数参数代码。但是,函数执行的时候,先执行函数参数代码,然后再执行函数体代码。这样就有一个不合理的地方,只有从函数体代码之中,才能知道参数代码是否应该以严格模式执行,但是参数代码却应该先于函数体代码执行。 - -```javascript -// 报错 -function doSomething(value = 070) { - 'use strict'; - return value; -} -``` - -上面代码中,参数`value`的默认值是八进制数`070`,但是严格模式下不能用前缀`0`表示八进制,所以应该报错。但是实际上,JavaScript引擎会先成功执行`value = 070`,然后进入函数体内部,发现需要用严格模式执行,这时才会报错。 - -虽然可以先解析函数体代码,再执行参数代码,但是这样无疑就增加了复杂性。因此,标准索性禁止了这种用法,只要参数使用了默认值、解构赋值、或者扩展运算符,就不能显式指定严格模式。 - -两种方法可以规避这种限制。第一种是设定全局性的严格模式,这是合法的。 - -```javascript -'use strict'; - -function doSomething(a, b = a) { - // code -} -``` - -第二种是把函数包在一个无参数的立即执行函数里面。 - -```javascript -const doSomething = (function () { - 'use strict'; - return function(value = 42) { - return value; - }; -}()); -``` - -## name 属性 - -函数的`name`属性,返回该函数的函数名。 - -```javascript -function foo() {} -foo.name // "foo" -``` - -这个属性早就被浏览器广泛支持,但是直到 ES6,才将其写入了标准。 - -需要注意的是,ES6 对这个属性的行为做出了一些修改。如果将一个匿名函数赋值给一个变量,ES5 的`name`属性,会返回空字符串,而 ES6 的`name`属性会返回实际的函数名。 - -```javascript -var f = function () {}; - -// ES5 -f.name // "" - -// ES6 -f.name // "f" -``` - -上面代码中,变量`f`等于一个匿名函数,ES5 和 ES6 的`name`属性返回的值不一样。 - -如果将一个具名函数赋值给一个变量,则 ES5 和 ES6 的`name`属性都返回这个具名函数原本的名字。 - -```javascript -const bar = function baz() {}; - -// ES5 -bar.name // "baz" - -// ES6 -bar.name // "baz" -``` - -`Function`构造函数返回的函数实例,`name`属性的值为`anonymous`。 - -```javascript -(new Function).name // "anonymous" -``` - -`bind`返回的函数,`name`属性值会加上`bound `前缀。 - -```javascript -function foo() {}; -foo.bind({}).name // "bound foo" - -(function(){}).bind({}).name // "bound " -``` - -## 箭头函数 - -### 基本用法 - -ES6允许使用“箭头”(`=>`)定义函数。 - -```javascript -var f = v => v; -``` - -上面的箭头函数等同于: - -```javascript -var f = function(v) { - return v; -}; -``` - -如果箭头函数不需要参数或需要多个参数,就使用一个圆括号代表参数部分。 - -```javascript -var f = () => 5; -// 等同于 -var f = function () { return 5 }; - -var sum = (num1, num2) => num1 + num2; -// 等同于 -var sum = function(num1, num2) { - return num1 + num2; -}; -``` - -如果箭头函数的代码块部分多于一条语句,就要使用大括号将它们括起来,并且使用`return`语句返回。 - -```javascript -var sum = (num1, num2) => { return num1 + num2; } -``` - -由于大括号被解释为代码块,所以如果箭头函数直接返回一个对象,必须在对象外面加上括号。 - -```javascript -var getTempItem = id => ({ id: id, name: "Temp" }); -``` - -箭头函数可以与变量解构结合使用。 - -```javascript -const full = ({ first, last }) => first + ' ' + last; - -// 等同于 -function full(person) { - return person.first + ' ' + person.last; -} -``` - -箭头函数使得表达更加简洁。 - -```javascript -const isEven = n => n % 2 == 0; -const square = n => n * n; -``` - -上面代码只用了两行,就定义了两个简单的工具函数。如果不用箭头函数,可能就要占用多行,而且还不如现在这样写醒目。 - -箭头函数的一个用处是简化回调函数。 - -```javascript -// 正常函数写法 -[1,2,3].map(function (x) { - return x * x; -}); - -// 箭头函数写法 -[1,2,3].map(x => x * x); -``` - -另一个例子是 - -```javascript -// 正常函数写法 -var result = values.sort(function (a, b) { - return a - b; -}); - -// 箭头函数写法 -var result = values.sort((a, b) => a - b); -``` - -下面是rest参数与箭头函数结合的例子。 - -```javascript -const numbers = (...nums) => nums; - -numbers(1, 2, 3, 4, 5) -// [1,2,3,4,5] - -const headAndTail = (head, ...tail) => [head, tail]; - -headAndTail(1, 2, 3, 4, 5) -// [1,[2,3,4,5]] -``` - -### 使用注意点 - -箭头函数有几个使用注意点。 - -(1)函数体内的`this`对象,就是定义时所在的对象,而不是使用时所在的对象。 - -(2)不可以当作构造函数,也就是说,不可以使用`new`命令,否则会抛出一个错误。 - -(3)不可以使用`arguments`对象,该对象在函数体内不存在。如果要用,可以用Rest参数代替。 - -(4)不可以使用`yield`命令,因此箭头函数不能用作Generator函数。 - -上面四点中,第一点尤其值得注意。`this`对象的指向是可变的,但是在箭头函数中,它是固定的。 - -```javascript -function foo() { - setTimeout(() => { - console.log('id:', this.id); - }, 100); -} - -var id = 21; - -foo.call({ id: 42 }); -// id: 42 -``` - -上面代码中,`setTimeout`的参数是一个箭头函数,这个箭头函数的定义生效是在`foo`函数生成时,而它的真正执行要等到100毫秒后。如果是普通函数,执行时`this`应该指向全局对象`window`,这时应该输出`21`。但是,箭头函数导致`this`总是指向函数定义生效时所在的对象(本例是`{id: 42}`),所以输出的是`42`。 - -箭头函数可以让`setTimeout`里面的`this`,绑定定义时所在的作用域,而不是指向运行时所在的作用域。下面是另一个例子。 - -```javascript -function Timer() { - this.s1 = 0; - this.s2 = 0; - // 箭头函数 - setInterval(() => this.s1++, 1000); - // 普通函数 - setInterval(function () { - this.s2++; - }, 1000); -} - -var timer = new Timer(); - -setTimeout(() => console.log('s1: ', timer.s1), 3100); -setTimeout(() => console.log('s2: ', timer.s2), 3100); -// s1: 3 -// s2: 0 -``` - -上面代码中,`Timer`函数内部设置了两个定时器,分别使用了箭头函数和普通函数。前者的`this`绑定定义时所在的作用域(即`Timer`函数),后者的`this`指向运行时所在的作用域(即全局对象)。所以,3100毫秒之后,`timer.s1`被更新了3次,而`timer.s2`一次都没更新。 - -箭头函数可以让`this`指向固定化,这种特性很有利于封装回调函数。下面是一个例子,DOM事件的回调函数封装在一个对象里面。 - -```javascript -var handler = { - id: '123456', - - init: function() { - document.addEventListener('click', - event => this.doSomething(event.type), false); - }, - - doSomething: function(type) { - console.log('Handling ' + type + ' for ' + this.id); - } -}; -``` - -上面代码的`init`方法中,使用了箭头函数,这导致这个箭头函数里面的`this`,总是指向`handler`对象。否则,回调函数运行时,`this.doSomething`这一行会报错,因为此时`this`指向`document`对象。 - -`this`指向的固定化,并不是因为箭头函数内部有绑定`this`的机制,实际原因是箭头函数根本没有自己的`this`,导致内部的`this`就是外层代码块的`this`。正是因为它没有`this`,所以也就不能用作构造函数。 - -所以,箭头函数转成ES5的代码如下。 - -```javascript -// ES6 -function foo() { - setTimeout(() => { - console.log('id:', this.id); - }, 100); -} - -// ES5 -function foo() { - var _this = this; - - setTimeout(function () { - console.log('id:', _this.id); - }, 100); -} -``` - -上面代码中,转换后的ES5版本清楚地说明了,箭头函数里面根本没有自己的`this`,而是引用外层的`this`。 - -请问下面的代码之中有几个`this`? - -```javascript -function foo() { - return () => { - return () => { - return () => { - console.log('id:', this.id); - }; - }; - }; -} - -var f = foo.call({id: 1}); - -var t1 = f.call({id: 2})()(); // id: 1 -var t2 = f().call({id: 3})(); // id: 1 -var t3 = f()().call({id: 4}); // id: 1 -``` - -上面代码之中,只有一个`this`,就是函数`foo`的`this`,所以`t1`、`t2`、`t3`都输出同样的结果。因为所有的内层函数都是箭头函数,都没有自己的`this`,它们的`this`其实都是最外层`foo`函数的`this`。 - -除了`this`,以下三个变量在箭头函数之中也是不存在的,指向外层函数的对应变量:`arguments`、`super`、`new.target`。 - -```javascript -function foo() { - setTimeout(() => { - console.log('args:', arguments); - }, 100); -} - -foo(2, 4, 6, 8) -// args: [2, 4, 6, 8] -``` - -上面代码中,箭头函数内部的变量`arguments`,其实是函数`foo`的`arguments`变量。 - -另外,由于箭头函数没有自己的`this`,所以当然也就不能用`call()`、`apply()`、`bind()`这些方法去改变`this`的指向。 - -```javascript -(function() { - return [ - (() => this.x).bind({ x: 'inner' })() - ]; -}).call({ x: 'outer' }); -// ['outer'] -``` - -上面代码中,箭头函数没有自己的`this`,所以`bind`方法无效,内部的`this`指向外部的`this`。 - -长期以来,JavaScript语言的`this`对象一直是一个令人头痛的问题,在对象方法中使用`this`,必须非常小心。箭头函数”绑定”`this`,很大程度上解决了这个困扰。 - -### 嵌套的箭头函数 - -箭头函数内部,还可以再使用箭头函数。下面是一个ES5语法的多重嵌套函数。 - -```javascript -function insert(value) { - return {into: function (array) { - return {after: function (afterValue) { - array.splice(array.indexOf(afterValue) + 1, 0, value); - return array; - }}; - }}; -} - -insert(2).into([1, 3]).after(1); //[1, 2, 3] -``` - -上面这个函数,可以使用箭头函数改写。 - -```javascript -let insert = (value) => ({into: (array) => ({after: (afterValue) => { - array.splice(array.indexOf(afterValue) + 1, 0, value); - return array; -}})}); - -insert(2).into([1, 3]).after(1); //[1, 2, 3] -``` - -下面是一个部署管道机制(pipeline)的例子,即前一个函数的输出是后一个函数的输入。 - -```javascript -const pipeline = (...funcs) => - val => funcs.reduce((a, b) => b(a), val); - -const plus1 = a => a + 1; -const mult2 = a => a * 2; -const addThenMult = pipeline(plus1, mult2); - -addThenMult(5) -// 12 -``` - -如果觉得上面的写法可读性比较差,也可以采用下面的写法。 - -```javascript -const plus1 = a => a + 1; -const mult2 = a => a * 2; - -mult2(plus1(5)) -// 12 -``` - -箭头函数还有一个功能,就是可以很方便地改写λ演算。 - -```javascript -// λ演算的写法 -fix = λf.(λx.f(λv.x(x)(v)))(λx.f(λv.x(x)(v))) - -// ES6的写法 -var fix = f => (x => f(v => x(x)(v))) - (x => f(v => x(x)(v))); -``` - -上面两种写法,几乎是一一对应的。由于λ演算对于计算机科学非常重要,这使得我们可以用ES6作为替代工具,探索计算机科学。 - -## 绑定 this - -箭头函数可以绑定`this`对象,大大减少了显式绑定`this`对象的写法(`call`、`apply`、`bind`)。但是,箭头函数并不适用于所有场合,所以ES7提出了“函数绑定”(function bind)运算符,用来取代`call`、`apply`、`bind`调用。虽然该语法还是ES7的一个[提案](https://github.com/zenparsing/es-function-bind),但是Babel转码器已经支持。 - -函数绑定运算符是并排的两个双冒号(::),双冒号左边是一个对象,右边是一个函数。该运算符会自动将左边的对象,作为上下文环境(即this对象),绑定到右边的函数上面。 - -```javascript -foo::bar; -// 等同于 -bar.bind(foo); - -foo::bar(...arguments); -// 等同于 -bar.apply(foo, arguments); - -const hasOwnProperty = Object.prototype.hasOwnProperty; -function hasOwn(obj, key) { - return obj::hasOwnProperty(key); -} -``` - -如果双冒号左边为空,右边是一个对象的方法,则等于将该方法绑定在该对象上面。 - -```javascript -var method = obj::obj.foo; -// 等同于 -var method = ::obj.foo; - -let log = ::console.log; -// 等同于 -var log = console.log.bind(console); -``` - -由于双冒号运算符返回的还是原对象,因此可以采用链式写法。 - -```javascript -// 例一 -import { map, takeWhile, forEach } from "iterlib"; - -getPlayers() -::map(x => x.character()) -::takeWhile(x => x.strength > 100) -::forEach(x => console.log(x)); - -// 例二 -let { find, html } = jake; - -document.querySelectorAll("div.myClass") -::find("p") -::html("hahaha"); -``` - -## 尾调用优化 - -### 什么是尾调用? - -尾调用(Tail Call)是函数式编程的一个重要概念,本身非常简单,一句话就能说清楚,就是指某个函数的最后一步是调用另一个函数。 - -```javascript -function f(x){ - return g(x); -} -``` - -上面代码中,函数f的最后一步是调用函数g,这就叫尾调用。 - -以下三种情况,都不属于尾调用。 - -```javascript -// 情况一 -function f(x){ - let y = g(x); - return y; -} - -// 情况二 -function f(x){ - return g(x) + 1; -} - -// 情况三 -function f(x){ - g(x); -} -``` - -上面代码中,情况一是调用函数g之后,还有赋值操作,所以不属于尾调用,即使语义完全一样。情况二也属于调用后还有操作,即使写在一行内。情况三等同于下面的代码。 - -```javascript -function f(x){ - g(x); - return undefined; -} -``` - -尾调用不一定出现在函数尾部,只要是最后一步操作即可。 - -```javascript -function f(x) { - if (x > 0) { - return m(x) - } - return n(x); -} -``` - -上面代码中,函数m和n都属于尾调用,因为它们都是函数f的最后一步操作。 - -### 尾调用优化 - -尾调用之所以与其他调用不同,就在于它的特殊的调用位置。 - -我们知道,函数调用会在内存形成一个“调用记录”,又称“调用帧”(call frame),保存调用位置和内部变量等信息。如果在函数A的内部调用函数B,那么在A的调用帧上方,还会形成一个B的调用帧。等到B运行结束,将结果返回到A,B的调用帧才会消失。如果函数B内部还调用函数C,那就还有一个C的调用帧,以此类推。所有的调用帧,就形成一个“调用栈”(call stack)。 - -尾调用由于是函数的最后一步操作,所以不需要保留外层函数的调用帧,因为调用位置、内部变量等信息都不会再用到了,只要直接用内层函数的调用帧,取代外层函数的调用帧就可以了。 - -```javascript -function f() { - let m = 1; - let n = 2; - return g(m + n); -} -f(); - -// 等同于 -function f() { - return g(3); -} -f(); - -// 等同于 -g(3); -``` - -上面代码中,如果函数g不是尾调用,函数f就需要保存内部变量m和n的值、g的调用位置等信息。但由于调用g之后,函数f就结束了,所以执行到最后一步,完全可以删除 f(x) 的调用帧,只保留 g(3) 的调用帧。 - -这就叫做“尾调用优化”(Tail call optimization),即只保留内层函数的调用帧。如果所有函数都是尾调用,那么完全可以做到每次执行时,调用帧只有一项,这将大大节省内存。这就是“尾调用优化”的意义。 - -注意,只有不再用到外层函数的内部变量,内层函数的调用帧才会取代外层函数的调用帧,否则就无法进行“尾调用优化”。 - -```javascript -function addOne(a){ - var one = 1; - function inner(b){ - return b + one; - } - return inner(a); -} -``` - -上面的函数不会进行尾调用优化,因为内层函数`inner`用到了外层函数`addOne`的内部变量`one`。 - -### 尾递归 - -函数调用自身,称为递归。如果尾调用自身,就称为尾递归。 - -递归非常耗费内存,因为需要同时保存成千上百个调用帧,很容易发生“栈溢出”错误(stack overflow)。但对于尾递归来说,由于只存在一个调用帧,所以永远不会发生“栈溢出”错误。 - -```javascript -function factorial(n) { - if (n === 1) return 1; - return n * factorial(n - 1); -} - -factorial(5) // 120 -``` - -上面代码是一个阶乘函数,计算n的阶乘,最多需要保存n个调用记录,复杂度 O(n) 。 - -如果改写成尾递归,只保留一个调用记录,复杂度 O(1) 。 - -```javascript -function factorial(n, total) { - if (n === 1) return total; - return factorial(n - 1, n * total); -} - -factorial(5, 1) // 120 -``` - -还有一个比较著名的例子,就是计算fibonacci 数列,也能充分说明尾递归优化的重要性 - -如果是非尾递归的fibonacci 递归方法 - -```javascript -function Fibonacci (n) { - if ( n <= 1 ) {return 1}; - - return Fibonacci(n - 1) + Fibonacci(n - 2); -} - -Fibonacci(10); // 89 -// Fibonacci(100) -// Fibonacci(500) -// 堆栈溢出了 -``` - -如果我们使用尾递归优化过的fibonacci 递归算法 - -```javascript -function Fibonacci2 (n , ac1 = 1 , ac2 = 1) { - if( n <= 1 ) {return ac2}; - - return Fibonacci2 (n - 1, ac2, ac1 + ac2); -} - -Fibonacci2(100) // 573147844013817200000 -Fibonacci2(1000) // 7.0330367711422765e+208 -Fibonacci2(10000) // Infinity -``` - -由此可见,“尾调用优化”对递归操作意义重大,所以一些函数式编程语言将其写入了语言规格。ES6也是如此,第一次明确规定,所有ECMAScript的实现,都必须部署“尾调用优化”。这就是说,在ES6中,只要使用尾递归,就不会发生栈溢出,相对节省内存。 - -### 递归函数的改写 - -尾递归的实现,往往需要改写递归函数,确保最后一步只调用自身。做到这一点的方法,就是把所有用到的内部变量改写成函数的参数。比如上面的例子,阶乘函数 factorial 需要用到一个中间变量 total ,那就把这个中间变量改写成函数的参数。这样做的缺点就是不太直观,第一眼很难看出来,为什么计算5的阶乘,需要传入两个参数5和1? - -两个方法可以解决这个问题。方法一是在尾递归函数之外,再提供一个正常形式的函数。 - -```javascript -function tailFactorial(n, total) { - if (n === 1) return total; - return tailFactorial(n - 1, n * total); -} - -function factorial(n) { - return tailFactorial(n, 1); -} - -factorial(5) // 120 -``` - -上面代码通过一个正常形式的阶乘函数 factorial ,调用尾递归函数 tailFactorial ,看起来就正常多了。 - -函数式编程有一个概念,叫做柯里化(currying),意思是将多参数的函数转换成单参数的形式。这里也可以使用柯里化。 - -```javascript -function currying(fn, n) { - return function (m) { - return fn.call(this, m, n); - }; -} - -function tailFactorial(n, total) { - if (n === 1) return total; - return tailFactorial(n - 1, n * total); -} - -const factorial = currying(tailFactorial, 1); - -factorial(5) // 120 -``` - -上面代码通过柯里化,将尾递归函数 tailFactorial 变为只接受1个参数的 factorial 。 - -第二种方法就简单多了,就是采用ES6的函数默认值。 - -```javascript -function factorial(n, total = 1) { - if (n === 1) return total; - return factorial(n - 1, n * total); -} - -factorial(5) // 120 -``` - -上面代码中,参数 total 有默认值1,所以调用时不用提供这个值。 - -总结一下,递归本质上是一种循环操作。纯粹的函数式编程语言没有循环操作命令,所有的循环都用递归实现,这就是为什么尾递归对这些语言极其重要。对于其他支持“尾调用优化”的语言(比如Lua,ES6),只需要知道循环可以用递归代替,而一旦使用递归,就最好使用尾递归。 - -### 严格模式 - -ES6的尾调用优化只在严格模式下开启,正常模式是无效的。 - -这是因为在正常模式下,函数内部有两个变量,可以跟踪函数的调用栈。 - -- `func.arguments`:返回调用时函数的参数。 -- `func.caller`:返回调用当前函数的那个函数。 - -尾调用优化发生时,函数的调用栈会改写,因此上面两个变量就会失真。严格模式禁用这两个变量,所以尾调用模式仅在严格模式下生效。 - -```javascript -function restricted() { - "use strict"; - restricted.caller; // 报错 - restricted.arguments; // 报错 -} -restricted(); -``` - -### 尾递归优化的实现 - -尾递归优化只在严格模式下生效,那么正常模式下,或者那些不支持该功能的环境中,有没有办法也使用尾递归优化呢?回答是可以的,就是自己实现尾递归优化。 - -它的原理非常简单。尾递归之所以需要优化,原因是调用栈太多,造成溢出,那么只要减少调用栈,就不会溢出。怎么做可以减少调用栈呢?就是采用“循环”换掉“递归”。 - -下面是一个正常的递归函数。 - -```javascript -function sum(x, y) { - if (y > 0) { - return sum(x + 1, y - 1); - } else { - return x; - } -} - -sum(1, 100000) -// Uncaught RangeError: Maximum call stack size exceeded(…) -``` - -上面代码中,`sum`是一个递归函数,参数`x`是需要累加的值,参数`y`控制递归次数。一旦指定`sum`递归100000次,就会报错,提示超出调用栈的最大次数。 - -蹦床函数(trampoline)可以将递归执行转为循环执行。 - -```javascript -function trampoline(f) { - while (f && f instanceof Function) { - f = f(); - } - return f; -} -``` - -上面就是蹦床函数的一个实现,它接受一个函数`f`作为参数。只要`f`执行后返回一个函数,就继续执行。注意,这里是返回一个函数,然后执行该函数,而不是函数里面调用函数,这样就避免了递归执行,从而就消除了调用栈过大的问题。 - -然后,要做的就是将原来的递归函数,改写为每一步返回另一个函数。 - -```javascript -function sum(x, y) { - if (y > 0) { - return sum.bind(null, x + 1, y - 1); - } else { - return x; - } -} -``` - -上面代码中,`sum`函数的每次执行,都会返回自身的另一个版本。 - -现在,使用蹦床函数执行`sum`,就不会发生调用栈溢出。 - -```javascript -trampoline(sum(1, 100000)) -// 100001 -``` - -蹦床函数并不是真正的尾递归优化,下面的实现才是。 - -```javascript -function tco(f) { - var value; - var active = false; - var accumulated = []; - - return function accumulator() { - accumulated.push(arguments); - if (!active) { - active = true; - while (accumulated.length) { - value = f.apply(this, accumulated.shift()); - } - active = false; - return value; - } - }; -} - -var sum = tco(function(x, y) { - if (y > 0) { - return sum(x + 1, y - 1) - } - else { - return x - } -}); - -sum(1, 100000) -// 100001 -``` - -上面代码中,`tco`函数是尾递归优化的实现,它的奥妙就在于状态变量`active`。默认情况下,这个变量是不激活的。一旦进入尾递归优化的过程,这个变量就激活了。然后,每一轮递归`sum`返回的都是`undefined`,所以就避免了递归执行;而`accumulated`数组存放每一轮`sum`执行的参数,总是有值的,这就保证了`accumulator`函数内部的`while`循环总是会执行。这样就很巧妙地将“递归”改成了“循环”,而后一轮的参数会取代前一轮的参数,保证了调用栈只有一层。 - -## 函数参数的尾逗号 - -ES2017 [允许](https://github.com/jeffmo/es-trailing-function-commas)函数的最后一个参数有尾逗号(trailing comma)。 - -此前,函数定义和调用时,都不允许最后一个参数后面出现逗号。 - -```javascript -function clownsEverywhere( - param1, - param2 -) { /* ... */ } - -clownsEverywhere( - 'foo', - 'bar' -); -``` - -上面代码中,如果在`param2`或`bar`后面加一个逗号,就会报错。 - -如果像上面这样,将参数写成多行(即每个参数占据一行),以后修改代码的时候,想为函数`clownsEverywhere`添加第三个参数,或者调整参数的次序,就势必要在原来最后一个参数后面添加一个逗号。这对于版本管理系统来说,就会显示添加逗号的那一行也发生了变动。这看上去有点冗余,因此新的语法允许定义和调用时,尾部直接有一个逗号。 - -```javascript -function clownsEverywhere( - param1, - param2, -) { /* ... */ } - -clownsEverywhere( - 'foo', - 'bar', -); -``` - -这样的规定也使得,函数参数与数组和对象的尾逗号规则,保持一致了。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator.md" deleted file mode 100644 index b2b388aaf..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator.md" +++ /dev/null @@ -1,1439 +0,0 @@ -# Generator 函数的语法 - -## 简介 - -### 基本概念 - -Generator 函数是 ES6 提供的一种异步编程解决方案,语法行为与传统函数完全不同。本章详细介绍Generator 函数的语法和 API,它的异步编程应用请看《Generator 函数的异步应用》一章。 - -Generator 函数有多种理解角度。从语法上,首先可以把它理解成,Generator 函数是一个状态机,封装了多个内部状态。 - -执行 Generator 函数会返回一个遍历器对象,也就是说,Generator 函数除了状态机,还是一个遍历器对象生成函数。返回的遍历器对象,可以依次遍历 Generator 函数内部的每一个状态。 - -形式上,Generator 函数是一个普通函数,但是有两个特征。一是,`function`关键字与函数名之间有一个星号;二是,函数体内部使用`yield`语句,定义不同的内部状态(`yield`在英语里的意思就是“产出”)。 - -```javascript -function* helloWorldGenerator() { - yield 'hello'; - yield 'world'; - return 'ending'; -} - -var hw = helloWorldGenerator(); -``` - -上面代码定义了一个Generator函数`helloWorldGenerator`,它内部有两个`yield`语句“hello”和“world”,即该函数有三个状态:hello,world和return语句(结束执行)。 - -然后,Generator函数的调用方法与普通函数一样,也是在函数名后面加上一对圆括号。不同的是,调用Generator函数后,该函数并不执行,返回的也不是函数运行结果,而是一个指向内部状态的指针对象,也就是上一章介绍的遍历器对象(Iterator Object)。 - -下一步,必须调用遍历器对象的next方法,使得指针移向下一个状态。也就是说,每次调用`next`方法,内部指针就从函数头部或上一次停下来的地方开始执行,直到遇到下一个`yield`语句(或`return`语句)为止。换言之,Generator函数是分段执行的,`yield`语句是暂停执行的标记,而`next`方法可以恢复执行。 - -```javascript -hw.next() -// { value: 'hello', done: false } - -hw.next() -// { value: 'world', done: false } - -hw.next() -// { value: 'ending', done: true } - -hw.next() -// { value: undefined, done: true } -``` - -上面代码一共调用了四次`next`方法。 - -第一次调用,Generator函数开始执行,直到遇到第一个`yield`语句为止。`next`方法返回一个对象,它的`value`属性就是当前`yield`语句的值hello,`done`属性的值false,表示遍历还没有结束。 - -第二次调用,Generator函数从上次`yield`语句停下的地方,一直执行到下一个`yield`语句。`next`方法返回的对象的`value`属性就是当前`yield`语句的值world,`done`属性的值false,表示遍历还没有结束。 - -第三次调用,Generator函数从上次`yield`语句停下的地方,一直执行到`return`语句(如果没有return语句,就执行到函数结束)。`next`方法返回的对象的`value`属性,就是紧跟在`return`语句后面的表达式的值(如果没有`return`语句,则`value`属性的值为undefined),`done`属性的值true,表示遍历已经结束。 - -第四次调用,此时Generator函数已经运行完毕,`next`方法返回对象的`value`属性为undefined,`done`属性为true。以后再调用`next`方法,返回的都是这个值。 - -总结一下,调用Generator函数,返回一个遍历器对象,代表Generator函数的内部指针。以后,每次调用遍历器对象的`next`方法,就会返回一个有着`value`和`done`两个属性的对象。`value`属性表示当前的内部状态的值,是`yield`语句后面那个表达式的值;`done`属性是一个布尔值,表示是否遍历结束。 - -ES6没有规定,`function`关键字与函数名之间的星号,写在哪个位置。这导致下面的写法都能通过。 - -```javascript -function * foo(x, y) { ··· } - -function *foo(x, y) { ··· } - -function* foo(x, y) { ··· } - -function*foo(x, y) { ··· } -``` - -由于Generator函数仍然是普通函数,所以一般的写法是上面的第三种,即星号紧跟在`function`关键字后面。本书也采用这种写法。 - -### yield语句 - -由于Generator函数返回的遍历器对象,只有调用`next`方法才会遍历下一个内部状态,所以其实提供了一种可以暂停执行的函数。`yield`语句就是暂停标志。 - -遍历器对象的`next`方法的运行逻辑如下。 - -(1)遇到`yield`语句,就暂停执行后面的操作,并将紧跟在`yield`后面的那个表达式的值,作为返回的对象的`value`属性值。 - -(2)下一次调用`next`方法时,再继续往下执行,直到遇到下一个`yield`语句。 - -(3)如果没有再遇到新的`yield`语句,就一直运行到函数结束,直到`return`语句为止,并将`return`语句后面的表达式的值,作为返回的对象的`value`属性值。 - -(4)如果该函数没有`return`语句,则返回的对象的`value`属性值为`undefined`。 - -需要注意的是,`yield`语句后面的表达式,只有当调用`next`方法、内部指针指向该语句时才会执行,因此等于为JavaScript提供了手动的“惰性求值”(Lazy Evaluation)的语法功能。 - -```javascript -function* gen() { - yield 123 + 456; -} -``` - -上面代码中,yield后面的表达式`123 + 456`,不会立即求值,只会在`next`方法将指针移到这一句时,才会求值。 - -`yield`语句与`return`语句既有相似之处,也有区别。相似之处在于,都能返回紧跟在语句后面的那个表达式的值。区别在于每次遇到`yield`,函数暂停执行,下一次再从该位置继续向后执行,而`return`语句不具备位置记忆的功能。一个函数里面,只能执行一次(或者说一个)`return`语句,但是可以执行多次(或者说多个)`yield`语句。正常函数只能返回一个值,因为只能执行一次`return`;Generator函数可以返回一系列的值,因为可以有任意多个`yield`。从另一个角度看,也可以说Generator生成了一系列的值,这也就是它的名称的来历(在英语中,generator这个词是“生成器”的意思)。 - -Generator函数可以不用`yield`语句,这时就变成了一个单纯的暂缓执行函数。 - -```javascript -function* f() { - console.log('执行了!') -} - -var generator = f(); - -setTimeout(function () { - generator.next() -}, 2000); -``` - -上面代码中,函数`f`如果是普通函数,在为变量`generator`赋值时就会执行。但是,函数`f`是一个 Generator 函数,就变成只有调用`next`方法时,函数`f`才会执行。 - -另外需要注意,`yield`语句只能用在 Generator 函数里面,用在其他地方都会报错。 - -```javascript -(function (){ - yield 1; -})() -// SyntaxError: Unexpected number -``` - -上面代码在一个普通函数中使用`yield`语句,结果产生一个句法错误。 - -下面是另外一个例子。 - -```javascript -var arr = [1, [[2, 3], 4], [5, 6]]; - -var flat = function* (a) { - a.forEach(function (item) { - if (typeof item !== 'number') { - yield* flat(item); - } else { - yield item; - } - } -}; - -for (var f of flat(arr)){ - console.log(f); -} -``` - -上面代码也会产生句法错误,因为`forEach`方法的参数是一个普通函数,但是在里面使用了`yield`语句(这个函数里面还使用了`yield*`语句,详细介绍见后文)。一种修改方法是改用`for`循环。 - -```javascript -var arr = [1, [[2, 3], 4], [5, 6]]; - -var flat = function* (a) { - var length = a.length; - for (var i = 0; i < length; i++) { - var item = a[i]; - if (typeof item !== 'number') { - yield* flat(item); - } else { - yield item; - } - } -}; - -for (var f of flat(arr)) { - console.log(f); -} -// 1, 2, 3, 4, 5, 6 -``` - -另外,`yield`语句如果用在一个表达式之中,必须放在圆括号里面。 - -```javascript -function* demo() { - console.log('Hello' + yield); // SyntaxError - console.log('Hello' + yield 123); // SyntaxError - - console.log('Hello' + (yield)); // OK - console.log('Hello' + (yield 123)); // OK -} -``` - -`yield`语句用作函数参数或放在赋值表达式的右边,可以不加括号。 - -```javascript -function* demo() { - foo(yield 'a', yield 'b'); // OK - let input = yield; // OK -} -``` - -### 与 Iterator 接口的关系 - -上一章说过,任意一个对象的`Symbol.iterator`方法,等于该对象的遍历器生成函数,调用该函数会返回该对象的一个遍历器对象。 - -由于Generator函数就是遍历器生成函数,因此可以把Generator赋值给对象的`Symbol.iterator`属性,从而使得该对象具有Iterator接口。 - -```javascript -var myIterable = {}; -myIterable[Symbol.iterator] = function* () { - yield 1; - yield 2; - yield 3; -}; - -[...myIterable] // [1, 2, 3] -``` - -上面代码中,Generator函数赋值给`Symbol.iterator`属性,从而使得`myIterable`对象具有了Iterator接口,可以被`...`运算符遍历了。 - -Generator函数执行后,返回一个遍历器对象。该对象本身也具有`Symbol.iterator`属性,执行后返回自身。 - -```javascript -function* gen(){ - // some code -} - -var g = gen(); - -g[Symbol.iterator]() === g -// true -``` - -上面代码中,`gen`是一个Generator函数,调用它会生成一个遍历器对象`g`。它的`Symbol.iterator`属性,也是一个遍历器对象生成函数,执行后返回它自己。 - -## next方法的参数 - -`yield`句本身没有返回值,或者说总是返回`undefined`。`next`方法可以带一个参数,该参数就会被当作上一个`yield`语句的返回值。 - -```javascript -function* f() { - for(var i = 0; true; i++) { - var reset = yield i; - if(reset) { i = -1; } - } -} - -var g = f(); - -g.next() // { value: 0, done: false } -g.next() // { value: 1, done: false } -g.next(true) // { value: 0, done: false } -``` - -上面代码先定义了一个可以无限运行的 Generator 函数`f`,如果`next`方法没有参数,每次运行到`yield`语句,变量`reset`的值总是`undefined`。当`next`方法带一个参数`true`时,变量`reset`就被重置为这个参数(即`true`),因此`i`会等于`-1`,下一轮循环就会从`-1`开始递增。 - -这个功能有很重要的语法意义。Generator 函数从暂停状态到恢复运行,它的上下文状态(context)是不变的。通过`next`方法的参数,就有办法在 Generator 函数开始运行之后,继续向函数体内部注入值。也就是说,可以在 Generator 函数运行的不同阶段,从外部向内部注入不同的值,从而调整函数行为。 - -再看一个例子。 - -```javascript -function* foo(x) { - var y = 2 * (yield (x + 1)); - var z = yield (y / 3); - return (x + y + z); -} - -var a = foo(5); -a.next() // Object{value:6, done:false} -a.next() // Object{value:NaN, done:false} -a.next() // Object{value:NaN, done:true} - -var b = foo(5); -b.next() // { value:6, done:false } -b.next(12) // { value:8, done:false } -b.next(13) // { value:42, done:true } -``` - -上面代码中,第二次运行`next`方法的时候不带参数,导致y的值等于`2 * undefined`(即`NaN`),除以3以后还是`NaN`,因此返回对象的`value`属性也等于`NaN`。第三次运行`Next`方法的时候不带参数,所以`z`等于`undefined`,返回对象的`value`属性等于`5 + NaN + undefined`,即`NaN`。 - -如果向`next`方法提供参数,返回结果就完全不一样了。上面代码第一次调用`b`的`next`方法时,返回`x+1`的值6;第二次调用`next`方法,将上一次`yield`语句的值设为12,因此`y`等于24,返回`y / 3`的值8;第三次调用`next`方法,将上一次`yield`语句的值设为13,因此`z`等于13,这时`x`等于5,`y`等于24,所以`return`语句的值等于42。 - -注意,由于`next`方法的参数表示上一个`yield`语句的返回值,所以第一次使用`next`方法时,不能带有参数。V8引擎直接忽略第一次使用`next`方法时的参数,只有从第二次使用`next`方法开始,参数才是有效的。从语义上讲,第一个`next`方法用来启动遍历器对象,所以不用带有参数。 - -如果想要第一次调用`next`方法时,就能够输入值,可以在Generator函数外面再包一层。 - -```javascript -function wrapper(generatorFunction) { - return function (...args) { - let generatorObject = generatorFunction(...args); - generatorObject.next(); - return generatorObject; - }; -} - -const wrapped = wrapper(function* () { - console.log(`First input: ${yield}`); - return 'DONE'; -}); - -wrapped().next('hello!') -// First input: hello! -``` - -上面代码中,Generator函数如果不用`wrapper`先包一层,是无法第一次调用`next`方法,就输入参数的。 - -再看一个通过`next`方法的参数,向Generator函数内部输入值的例子。 - -```javascript -function* dataConsumer() { - console.log('Started'); - console.log(`1. ${yield}`); - console.log(`2. ${yield}`); - return 'result'; -} - -let genObj = dataConsumer(); -genObj.next(); -// Started -genObj.next('a') -// 1. a -genObj.next('b') -// 2. b -``` - -上面代码是一个很直观的例子,每次通过`next`方法向Generator函数输入值,然后打印出来。 - -## for...of循环 - -`for...of`循环可以自动遍历Generator函数时生成的`Iterator`对象,且此时不再需要调用`next`方法。 - -```javascript -function *foo() { - yield 1; - yield 2; - yield 3; - yield 4; - yield 5; - return 6; -} - -for (let v of foo()) { - console.log(v); -} -// 1 2 3 4 5 -``` - -上面代码使用`for...of`循环,依次显示5个`yield`语句的值。这里需要注意,一旦`next`方法的返回对象的`done`属性为`true`,`for...of`循环就会中止,且不包含该返回对象,所以上面代码的`return`语句返回的6,不包括在`for...of`循环之中。 - -下面是一个利用Generator函数和`for...of`循环,实现斐波那契数列的例子。 - -```javascript -function* fibonacci() { - let [prev, curr] = [0, 1]; - for (;;) { - [prev, curr] = [curr, prev + curr]; - yield curr; - } -} - -for (let n of fibonacci()) { - if (n > 1000) break; - console.log(n); -} -``` - -从上面代码可见,使用`for...of`语句时不需要使用`next`方法。 - -利用`for...of`循环,可以写出遍历任意对象(object)的方法。原生的JavaScript对象没有遍历接口,无法使用`for...of`循环,通过Generator函数为它加上这个接口,就可以用了。 - -```javascript -function* objectEntries(obj) { - let propKeys = Reflect.ownKeys(obj); - - for (let propKey of propKeys) { - yield [propKey, obj[propKey]]; - } -} - -let jane = { first: 'Jane', last: 'Doe' }; - -for (let [key, value] of objectEntries(jane)) { - console.log(`${key}: ${value}`); -} -// first: Jane -// last: Doe -``` - -上面代码中,对象`jane`原生不具备Iterator接口,无法用`for...of`遍历。这时,我们通过Generator函数`objectEntries`为它加上遍历器接口,就可以用`for...of`遍历了。加上遍历器接口的另一种写法是,将Generator函数加到对象的`Symbol.iterator`属性上面。 - -```javascript -function* objectEntries() { - let propKeys = Object.keys(this); - - for (let propKey of propKeys) { - yield [propKey, this[propKey]]; - } -} - -let jane = { first: 'Jane', last: 'Doe' }; - -jane[Symbol.iterator] = objectEntries; - -for (let [key, value] of jane) { - console.log(`${key}: ${value}`); -} -// first: Jane -// last: Doe -``` - -除了`for...of`循环以外,扩展运算符(`...`)、解构赋值和`Array.from`方法内部调用的,都是遍历器接口。这意味着,它们都可以将Generator函数返回的Iterator对象,作为参数。 - -```javascript -function* numbers () { - yield 1 - yield 2 - return 3 - yield 4 -} - -// 扩展运算符 -[...numbers()] // [1, 2] - -// Array.from 方法 -Array.from(numbers()) // [1, 2] - -// 解构赋值 -let [x, y] = numbers(); -x // 1 -y // 2 - -// for...of 循环 -for (let n of numbers()) { - console.log(n) -} -// 1 -// 2 -``` - -## Generator.prototype.throw() - -Generator函数返回的遍历器对象,都有一个`throw`方法,可以在函数体外抛出错误,然后在Generator函数体内捕获。 - -```javascript -var g = function* () { - try { - yield; - } catch (e) { - console.log('内部捕获', e); - } -}; - -var i = g(); -i.next(); - -try { - i.throw('a'); - i.throw('b'); -} catch (e) { - console.log('外部捕获', e); -} -// 内部捕获 a -// 外部捕获 b -``` - -上面代码中,遍历器对象`i`连续抛出两个错误。第一个错误被Generator函数体内的`catch`语句捕获。`i`第二次抛出错误,由于Generator函数内部的`catch`语句已经执行过了,不会再捕捉到这个错误了,所以这个错误就被抛出了Generator函数体,被函数体外的`catch`语句捕获。 - -`throw`方法可以接受一个参数,该参数会被`catch`语句接收,建议抛出`Error`对象的实例。 - -```javascript -var g = function* () { - try { - yield; - } catch (e) { - console.log(e); - } -}; - -var i = g(); -i.next(); -i.throw(new Error('出错了!')); -// Error: 出错了!(…) -``` - -注意,不要混淆遍历器对象的`throw`方法和全局的`throw`命令。上面代码的错误,是用遍历器对象的`throw`方法抛出的,而不是用`throw`命令抛出的。后者只能被函数体外的`catch`语句捕获。 - -```javascript -var g = function* () { - while (true) { - try { - yield; - } catch (e) { - if (e != 'a') throw e; - console.log('内部捕获', e); - } - } -}; - -var i = g(); -i.next(); - -try { - throw new Error('a'); - throw new Error('b'); -} catch (e) { - console.log('外部捕获', e); -} -// 外部捕获 [Error: a] -``` - -上面代码之所以只捕获了`a`,是因为函数体外的`catch`语句块,捕获了抛出的`a`错误以后,就不会再继续`try`代码块里面剩余的语句了。 - -如果Generator函数内部没有部署`try...catch`代码块,那么`throw`方法抛出的错误,将被外部`try...catch`代码块捕获。 - -```javascript -var g = function* () { - while (true) { - yield; - console.log('内部捕获', e); - } -}; - -var i = g(); -i.next(); - -try { - i.throw('a'); - i.throw('b'); -} catch (e) { - console.log('外部捕获', e); -} -// 外部捕获 a -``` - -上面代码中,Generator函数`g`内部没有部署`try...catch`代码块,所以抛出的错误直接被外部`catch`代码块捕获。 - -如果Generator函数内部和外部,都没有部署`try...catch`代码块,那么程序将报错,直接中断执行。 - -```javascript -var gen = function* gen(){ - yield console.log('hello'); - yield console.log('world'); -} - -var g = gen(); -g.next(); -g.throw(); -// hello -// Uncaught undefined -``` - -上面代码中,`g.throw`抛出错误以后,没有任何`try...catch`代码块可以捕获这个错误,导致程序报错,中断执行。 - -`throw`方法被捕获以后,会附带执行下一条`yield`语句。也就是说,会附带执行一次`next`方法。 - -```javascript -var gen = function* gen(){ - try { - yield console.log('a'); - } catch (e) { - // ... - } - yield console.log('b'); - yield console.log('c'); -} - -var g = gen(); -g.next() // a -g.throw() // b -g.next() // c -``` - -上面代码中,`g.throw`方法被捕获以后,自动执行了一次`next`方法,所以会打印`b`。另外,也可以看到,只要Generator函数内部部署了`try...catch`代码块,那么遍历器的`throw`方法抛出的错误,不影响下一次遍历。 - -另外,`throw`命令与`g.throw`方法是无关的,两者互不影响。 - -```javascript -var gen = function* gen(){ - yield console.log('hello'); - yield console.log('world'); -} - -var g = gen(); -g.next(); - -try { - throw new Error(); -} catch (e) { - g.next(); -} -// hello -// world -``` - -上面代码中,`throw`命令抛出的错误不会影响到遍历器的状态,所以两次执行`next`方法,都进行了正确的操作。 - -这种函数体内捕获错误的机制,大大方便了对错误的处理。多个`yield`语句,可以只用一个`try...catch`代码块来捕获错误。如果使用回调函数的写法,想要捕获多个错误,就不得不为每个函数内部写一个错误处理语句,现在只在Generator函数内部写一次`catch`语句就可以了。 - -Generator函数体外抛出的错误,可以在函数体内捕获;反过来,Generator函数体内抛出的错误,也可以被函数体外的`catch`捕获。 - -```javascript -function *foo() { - var x = yield 3; - var y = x.toUpperCase(); - yield y; -} - -var it = foo(); - -it.next(); // { value:3, done:false } - -try { - it.next(42); -} catch (err) { - console.log(err); -} -``` - -上面代码中,第二个`next`方法向函数体内传入一个参数42,数值是没有`toUpperCase`方法的,所以会抛出一个TypeError错误,被函数体外的`catch`捕获。 - -一旦Generator执行过程中抛出错误,且没有被内部捕获,就不会再执行下去了。如果此后还调用`next`方法,将返回一个`value`属性等于`undefined`、`done`属性等于`true`的对象,即JavaScript引擎认为这个Generator已经运行结束了。 - -```javascript -function* g() { - yield 1; - console.log('throwing an exception'); - throw new Error('generator broke!'); - yield 2; - yield 3; -} - -function log(generator) { - var v; - console.log('starting generator'); - try { - v = generator.next(); - console.log('第一次运行next方法', v); - } catch (err) { - console.log('捕捉错误', v); - } - try { - v = generator.next(); - console.log('第二次运行next方法', v); - } catch (err) { - console.log('捕捉错误', v); - } - try { - v = generator.next(); - console.log('第三次运行next方法', v); - } catch (err) { - console.log('捕捉错误', v); - } - console.log('caller done'); -} - -log(g()); -// starting generator -// 第一次运行next方法 { value: 1, done: false } -// throwing an exception -// 捕捉错误 { value: 1, done: false } -// 第三次运行next方法 { value: undefined, done: true } -// caller done -``` - -上面代码一共三次运行`next`方法,第二次运行的时候会抛出错误,然后第三次运行的时候,Generator函数就已经结束了,不再执行下去了。 - -## Generator.prototype.return() - -Generator函数返回的遍历器对象,还有一个`return`方法,可以返回给定的值,并且终结遍历Generator函数。 - -```javascript -function* gen() { - yield 1; - yield 2; - yield 3; -} - -var g = gen(); - -g.next() // { value: 1, done: false } -g.return('foo') // { value: "foo", done: true } -g.next() // { value: undefined, done: true } -``` - -上面代码中,遍历器对象`g`调用`return`方法后,返回值的`value`属性就是`return`方法的参数`foo`。并且,Generator函数的遍历就终止了,返回值的`done`属性为`true`,以后再调用`next`方法,`done`属性总是返回`true`。 - -如果`return`方法调用时,不提供参数,则返回值的`value`属性为`undefined`。 - -```javascript -function* gen() { - yield 1; - yield 2; - yield 3; -} - -var g = gen(); - -g.next() // { value: 1, done: false } -g.return() // { value: undefined, done: true } -``` - -如果Generator函数内部有`try...finally`代码块,那么`return`方法会推迟到`finally`代码块执行完再执行。 - -```javascript -function* numbers () { - yield 1; - try { - yield 2; - yield 3; - } finally { - yield 4; - yield 5; - } - yield 6; -} -var g = numbers() -g.next() // { done: false, value: 1 } -g.next() // { done: false, value: 2 } -g.return(7) // { done: false, value: 4 } -g.next() // { done: false, value: 5 } -g.next() // { done: true, value: 7 } -``` - -上面代码中,调用`return`方法后,就开始执行`finally`代码块,然后等到`finally`代码块执行完,再执行`return`方法。 - -## yield* 语句 - -如果在 Generator 函数内部,调用另一个 Generator 函数,默认情况下是没有效果的。 - -```javascript -function* foo() { - yield 'a'; - yield 'b'; -} - -function* bar() { - yield 'x'; - foo(); - yield 'y'; -} - -for (let v of bar()){ - console.log(v); -} -// "x" -// "y" -``` - -上面代码中,`foo`和`bar`都是 Generator 函数,在`bar`里面调用`foo`,是不会有效果的。 - -这个就需要用到`yield*`语句,用来在一个 Generator 函数里面执行另一个 Generator 函数。 - -```javascript -function* bar() { - yield 'x'; - yield* foo(); - yield 'y'; -} - -// 等同于 -function* bar() { - yield 'x'; - yield 'a'; - yield 'b'; - yield 'y'; -} - -// 等同于 -function* bar() { - yield 'x'; - for (let v of foo()) { - yield v; - } - yield 'y'; -} - -for (let v of bar()){ - console.log(v); -} -// "x" -// "a" -// "b" -// "y" -``` - -再来看一个对比的例子。 - -```javascript -function* inner() { - yield 'hello!'; -} - -function* outer1() { - yield 'open'; - yield inner(); - yield 'close'; -} - -var gen = outer1() -gen.next().value // "open" -gen.next().value // 返回一个遍历器对象 -gen.next().value // "close" - -function* outer2() { - yield 'open' - yield* inner() - yield 'close' -} - -var gen = outer2() -gen.next().value // "open" -gen.next().value // "hello!" -gen.next().value // "close" -``` - -上面例子中,`outer2`使用了`yield*`,`outer1`没使用。结果就是,`outer1`返回一个遍历器对象,`outer2`返回该遍历器对象的内部值。 - -从语法角度看,如果`yield`命令后面跟的是一个遍历器对象,需要在`yield`命令后面加上星号,表明它返回的是一个遍历器对象。这被称为`yield*`语句。 - -```javascript -let delegatedIterator = (function* () { - yield 'Hello!'; - yield 'Bye!'; -}()); - -let delegatingIterator = (function* () { - yield 'Greetings!'; - yield* delegatedIterator; - yield 'Ok, bye.'; -}()); - -for(let value of delegatingIterator) { - console.log(value); -} -// "Greetings! -// "Hello!" -// "Bye!" -// "Ok, bye." -``` - -上面代码中,`delegatingIterator`是代理者,`delegatedIterator`是被代理者。由于`yield* delegatedIterator`语句得到的值,是一个遍历器,所以要用星号表示。运行结果就是使用一个遍历器,遍历了多个Generator函数,有递归的效果。 - -`yield*`后面的Generator函数(没有`return`语句时),等同于在Generator函数内部,部署一个`for...of`循环。 - -```javascript -function* concat(iter1, iter2) { - yield* iter1; - yield* iter2; -} - -// 等同于 - -function* concat(iter1, iter2) { - for (var value of iter1) { - yield value; - } - for (var value of iter2) { - yield value; - } -} -``` - -上面代码说明,`yield*`后面的Generator函数(没有`return`语句时),不过是`for...of`的一种简写形式,完全可以用后者替代前者。反之,则需要用`var value = yield* iterator`的形式获取`return`语句的值。 - -如果`yield*`后面跟着一个数组,由于数组原生支持遍历器,因此就会遍历数组成员。 - -```javascript -function* gen(){ - yield* ["a", "b", "c"]; -} - -gen().next() // { value:"a", done:false } -``` - -上面代码中,`yield`命令后面如果不加星号,返回的是整个数组,加了星号就表示返回的是数组的遍历器对象。 - -实际上,任何数据结构只要有Iterator接口,就可以被`yield*`遍历。 - -```javascript -let read = (function* () { - yield 'hello'; - yield* 'hello'; -})(); - -read.next().value // "hello" -read.next().value // "h" -``` - -上面代码中,`yield`语句返回整个字符串,`yield*`语句返回单个字符。因为字符串具有Iterator接口,所以被`yield*`遍历。 - -如果被代理的Generator函数有`return`语句,那么就可以向代理它的Generator函数返回数据。 - -```javascript -function *foo() { - yield 2; - yield 3; - return "foo"; -} - -function *bar() { - yield 1; - var v = yield *foo(); - console.log( "v: " + v ); - yield 4; -} - -var it = bar(); - -it.next() -// {value: 1, done: false} -it.next() -// {value: 2, done: false} -it.next() -// {value: 3, done: false} -it.next(); -// "v: foo" -// {value: 4, done: false} -it.next() -// {value: undefined, done: true} -``` - -上面代码在第四次调用`next`方法的时候,屏幕上会有输出,这是因为函数`foo`的`return`语句,向函数`bar`提供了返回值。 - -再看一个例子。 - -```javascript -function* genFuncWithReturn() { - yield 'a'; - yield 'b'; - return 'The result'; -} -function* logReturned(genObj) { - let result = yield* genObj; - console.log(result); -} - -[...logReturned(genFuncWithReturn())] -// The result -// 值为 [ 'a', 'b' ] -``` - -上面代码中,存在两次遍历。第一次是扩展运算符遍历函数`logReturned`返回的遍历器对象,第二次是`yield*`语句遍历函数`genFuncWithReturn`返回的遍历器对象。这两次遍历的效果是叠加的,最终表现为扩展运算符遍历函数`genFuncWithReturn`返回的遍历器对象。所以,最后的数据表达式得到的值等于`[ 'a', 'b' ]`。但是,函数`genFuncWithReturn`的`return`语句的返回值`The result`,会返回给函数`logReturned`内部的`result`变量,因此会有终端输出。 - -`yield*`命令可以很方便地取出嵌套数组的所有成员。 - -```javascript -function* iterTree(tree) { - if (Array.isArray(tree)) { - for(let i=0; i < tree.length; i++) { - yield* iterTree(tree[i]); - } - } else { - yield tree; - } -} - -const tree = [ 'a', ['b', 'c'], ['d', 'e'] ]; - -for(let x of iterTree(tree)) { - console.log(x); -} -// a -// b -// c -// d -// e -``` - -下面是一个稍微复杂的例子,使用`yield*`语句遍历完全二叉树。 - -```javascript -// 下面是二叉树的构造函数, -// 三个参数分别是左树、当前节点和右树 -function Tree(left, label, right) { - this.left = left; - this.label = label; - this.right = right; -} - -// 下面是中序(inorder)遍历函数。 -// 由于返回的是一个遍历器,所以要用generator函数。 -// 函数体内采用递归算法,所以左树和右树要用yield*遍历 -function* inorder(t) { - if (t) { - yield* inorder(t.left); - yield t.label; - yield* inorder(t.right); - } -} - -// 下面生成二叉树 -function make(array) { - // 判断是否为叶节点 - if (array.length == 1) return new Tree(null, array[0], null); - return new Tree(make(array[0]), array[1], make(array[2])); -} -let tree = make([[['a'], 'b', ['c']], 'd', [['e'], 'f', ['g']]]); - -// 遍历二叉树 -var result = []; -for (let node of inorder(tree)) { - result.push(node); -} - -result -// ['a', 'b', 'c', 'd', 'e', 'f', 'g'] -``` - -## 作为对象属性的Generator函数 - -如果一个对象的属性是Generator函数,可以简写成下面的形式。 - -```javascript -let obj = { - * myGeneratorMethod() { - ··· - } -}; -``` - -上面代码中,`myGeneratorMethod`属性前面有一个星号,表示这个属性是一个Generator函数。 - -它的完整形式如下,与上面的写法是等价的。 - -```javascript -let obj = { - myGeneratorMethod: function* () { - // ··· - } -}; -``` - -## Generator函数的`this` - -Generator函数总是返回一个遍历器,ES6规定这个遍历器是Generator函数的实例,也继承了Generator函数的`prototype`对象上的方法。 - -```javascript -function* g() {} - -g.prototype.hello = function () { - return 'hi!'; -}; - -let obj = g(); - -obj instanceof g // true -obj.hello() // 'hi!' -``` - -上面代码表明,Generator函数`g`返回的遍历器`obj`,是`g`的实例,而且继承了`g.prototype`。但是,如果把`g`当作普通的构造函数,并不会生效,因为`g`返回的总是遍历器对象,而不是`this`对象。 - -```javascript -function* g() { - this.a = 11; -} - -let obj = g(); -obj.a // undefined -``` - -上面代码中,Generator函数`g`在`this`对象上面添加了一个属性`a`,但是`obj`对象拿不到这个属性。 - -Generator函数也不能跟`new`命令一起用,会报错。 - -```javascript -function* F() { - yield this.x = 2; - yield this.y = 3; -} - -new F() -// TypeError: F is not a constructor -``` - -上面代码中,`new`命令跟构造函数`F`一起使用,结果报错,因为`F`不是构造函数。 - -那么,有没有办法让Generator函数返回一个正常的对象实例,既可以用`next`方法,又可以获得正常的`this`? - -下面是一个变通方法。首先,生成一个空对象,使用`call`方法绑定Generator函数内部的`this`。这样,构造函数调用以后,这个空对象就是Generator函数的实例对象了。 - -```javascript -function* F() { - this.a = 1; - yield this.b = 2; - yield this.c = 3; -} -var obj = {}; -var f = F.call(obj); - -f.next(); // Object {value: 2, done: false} -f.next(); // Object {value: 3, done: false} -f.next(); // Object {value: undefined, done: true} - -obj.a // 1 -obj.b // 2 -obj.c // 3 -``` - -上面代码中,首先是`F`内部的`this`对象绑定`obj`对象,然后调用它,返回一个Iterator对象。这个对象执行三次`next`方法(因为`F`内部有两个`yield`语句),完成F内部所有代码的运行。这时,所有内部属性都绑定在`obj`对象上了,因此`obj`对象也就成了`F`的实例。 - -上面代码中,执行的是遍历器对象`f`,但是生成的对象实例是`obj`,有没有办法将这两个对象统一呢? - -一个办法就是将`obj`换成`F.prototype`。 - -```javascript -function* F() { - this.a = 1; - yield this.b = 2; - yield this.c = 3; -} -var f = F.call(F.prototype); - -f.next(); // Object {value: 2, done: false} -f.next(); // Object {value: 3, done: false} -f.next(); // Object {value: undefined, done: true} - -f.a // 1 -f.b // 2 -f.c // 3 -``` - -再将`F`改成构造函数,就可以对它执行`new`命令了。 - -```javascript -function* gen() { - this.a = 1; - yield this.b = 2; - yield this.c = 3; -} - -function F() { - return gen.call(gen.prototype); -} - -var f = new F(); - -f.next(); // Object {value: 2, done: false} -f.next(); // Object {value: 3, done: false} -f.next(); // Object {value: undefined, done: true} - -f.a // 1 -f.b // 2 -f.c // 3 -``` - -## 含义 - -### Generator与状态机 - -Generator是实现状态机的最佳结构。比如,下面的clock函数就是一个状态机。 - -```javascript -var ticking = true; -var clock = function() { - if (ticking) - console.log('Tick!'); - else - console.log('Tock!'); - ticking = !ticking; -} -``` - -上面代码的clock函数一共有两种状态(Tick和Tock),每运行一次,就改变一次状态。这个函数如果用Generator实现,就是下面这样。 - -```javascript -var clock = function*() { - while (true) { - console.log('Tick!'); - yield; - console.log('Tock!'); - yield; - } -}; -``` - -上面的Generator实现与ES5实现对比,可以看到少了用来保存状态的外部变量`ticking`,这样就更简洁,更安全(状态不会被非法篡改)、更符合函数式编程的思想,在写法上也更优雅。Generator之所以可以不用外部变量保存状态,是因为它本身就包含了一个状态信息,即目前是否处于暂停态。 - -### Generator与协程 - -协程(coroutine)是一种程序运行的方式,可以理解成“协作的线程”或“协作的函数”。协程既可以用单线程实现,也可以用多线程实现。前者是一种特殊的子例程,后者是一种特殊的线程。 - -**(1)协程与子例程的差异** - -传统的“子例程”(subroutine)采用堆栈式“后进先出”的执行方式,只有当调用的子函数完全执行完毕,才会结束执行父函数。协程与其不同,多个线程(单线程情况下,即多个函数)可以并行执行,但是只有一个线程(或函数)处于正在运行的状态,其他线程(或函数)都处于暂停态(suspended),线程(或函数)之间可以交换执行权。也就是说,一个线程(或函数)执行到一半,可以暂停执行,将执行权交给另一个线程(或函数),等到稍后收回执行权的时候,再恢复执行。这种可以并行执行、交换执行权的线程(或函数),就称为协程。 - -从实现上看,在内存中,子例程只使用一个栈(stack),而协程是同时存在多个栈,但只有一个栈是在运行状态,也就是说,协程是以多占用内存为代价,实现多任务的并行。 - -**(2)协程与普通线程的差异** - -不难看出,协程适合用于多任务运行的环境。在这个意义上,它与普通的线程很相似,都有自己的执行上下文、可以分享全局变量。它们的不同之处在于,同一时间可以有多个线程处于运行状态,但是运行的协程只能有一个,其他协程都处于暂停状态。此外,普通的线程是抢先式的,到底哪个线程优先得到资源,必须由运行环境决定,但是协程是合作式的,执行权由协程自己分配。 - -由于ECMAScript是单线程语言,只能保持一个调用栈。引入协程以后,每个任务可以保持自己的调用栈。这样做的最大好处,就是抛出错误的时候,可以找到原始的调用栈。不至于像异步操作的回调函数那样,一旦出错,原始的调用栈早就结束。 - -Generator函数是ECMAScript 6对协程的实现,但属于不完全实现。Generator函数被称为“半协程”(semi-coroutine),意思是只有Generator函数的调用者,才能将程序的执行权还给Generator函数。如果是完全执行的协程,任何函数都可以让暂停的协程继续执行。 - -如果将Generator函数当作协程,完全可以将多个需要互相协作的任务写成Generator函数,它们之间使用yield语句交换控制权。 - -## 应用 - -Generator可以暂停函数执行,返回任意表达式的值。这种特点使得Generator有多种应用场景。 - -### (1)异步操作的同步化表达 - -Generator函数的暂停执行的效果,意味着可以把异步操作写在yield语句里面,等到调用next方法时再往后执行。这实际上等同于不需要写回调函数了,因为异步操作的后续操作可以放在yield语句下面,反正要等到调用next方法时再执行。所以,Generator函数的一个重要实际意义就是用来处理异步操作,改写回调函数。 - -```javascript -function* loadUI() { - showLoadingScreen(); - yield loadUIDataAsynchronously(); - hideLoadingScreen(); -} -var loader = loadUI(); -// 加载UI -loader.next() - -// 卸载UI -loader.next() -``` - -上面代码表示,第一次调用loadUI函数时,该函数不会执行,仅返回一个遍历器。下一次对该遍历器调用next方法,则会显示Loading界面,并且异步加载数据。等到数据加载完成,再一次使用next方法,则会隐藏Loading界面。可以看到,这种写法的好处是所有Loading界面的逻辑,都被封装在一个函数,按部就班非常清晰。 - -Ajax是典型的异步操作,通过Generator函数部署Ajax操作,可以用同步的方式表达。 - -```javascript -function* main() { - var result = yield request("http://some.url"); - var resp = JSON.parse(result); - console.log(resp.value); -} - -function request(url) { - makeAjaxCall(url, function(response){ - it.next(response); - }); -} - -var it = main(); -it.next(); -``` - -上面代码的main函数,就是通过Ajax操作获取数据。可以看到,除了多了一个yield,它几乎与同步操作的写法完全一样。注意,makeAjaxCall函数中的next方法,必须加上response参数,因为yield语句构成的表达式,本身是没有值的,总是等于undefined。 - -下面是另一个例子,通过Generator函数逐行读取文本文件。 - -```javascript -function* numbers() { - let file = new FileReader("numbers.txt"); - try { - while(!file.eof) { - yield parseInt(file.readLine(), 10); - } - } finally { - file.close(); - } -} -``` - -上面代码打开文本文件,使用yield语句可以手动逐行读取文件。 - -### (2)控制流管理 - -如果有一个多步操作非常耗时,采用回调函数,可能会写成下面这样。 - -```javascript -step1(function (value1) { - step2(value1, function(value2) { - step3(value2, function(value3) { - step4(value3, function(value4) { - // Do something with value4 - }); - }); - }); -}); -``` - -采用Promise改写上面的代码。 - -```javascript -Promise.resolve(step1) - .then(step2) - .then(step3) - .then(step4) - .then(function (value4) { - // Do something with value4 - }, function (error) { - // Handle any error from step1 through step4 - }) - .done(); -``` - -上面代码已经把回调函数,改成了直线执行的形式,但是加入了大量Promise的语法。Generator函数可以进一步改善代码运行流程。 - -```javascript -function* longRunningTask(value1) { - try { - var value2 = yield step1(value1); - var value3 = yield step2(value2); - var value4 = yield step3(value3); - var value5 = yield step4(value4); - // Do something with value4 - } catch (e) { - // Handle any error from step1 through step4 - } -} -``` - -然后,使用一个函数,按次序自动执行所有步骤。 - -```javascript -scheduler(longRunningTask(initialValue)); - -function scheduler(task) { - var taskObj = task.next(task.value); - // 如果Generator函数未结束,就继续调用 - if (!taskObj.done) { - task.value = taskObj.value - scheduler(task); - } -} -``` - -注意,上面这种做法,只适合同步操作,即所有的`task`都必须是同步的,不能有异步操作。因为这里的代码一得到返回值,就继续往下执行,没有判断异步操作何时完成。如果要控制异步的操作流程,详见后面的《异步操作》一章。 - -下面,利用`for...of`循环会自动依次执行`yield`命令的特性,提供一种更一般的控制流管理的方法。 - -```javascript -let steps = [step1Func, step2Func, step3Func]; - -function *iterateSteps(steps){ - for (var i=0; i< steps.length; i++){ - var step = steps[i]; - yield step(); - } -} -``` - -上面代码中,数组`steps`封装了一个任务的多个步骤,Generator函数`iterateSteps`则是依次为这些步骤加上`yield`命令。 - -将任务分解成步骤之后,还可以将项目分解成多个依次执行的任务。 - -```javascript -let jobs = [job1, job2, job3]; - -function *iterateJobs(jobs){ - for (var i=0; i< jobs.length; i++){ - var job = jobs[i]; - yield *iterateSteps(job.steps); - } -} -``` - -上面代码中,数组`jobs`封装了一个项目的多个任务,Generator函数`iterateJobs`则是依次为这些任务加上`yield *`命令。 - -最后,就可以用`for...of`循环一次性依次执行所有任务的所有步骤。 - -```javascript -for (var step of iterateJobs(jobs)){ - console.log(step.id); -} -``` - -再次提醒,上面的做法只能用于所有步骤都是同步操作的情况,不能有异步操作的步骤。如果想要依次执行异步的步骤,必须使用后面的《异步操作》一章介绍的方法。 - -`for...of`的本质是一个`while`循环,所以上面的代码实质上执行的是下面的逻辑。 - -```javascript -var it = iterateJobs(jobs); -var res = it.next(); - -while (!res.done){ - var result = res.value; - // ... - res = it.next(); -} -``` - -### (3)部署Iterator接口 - -利用Generator函数,可以在任意对象上部署Iterator接口。 - -```javascript -function* iterEntries(obj) { - let keys = Object.keys(obj); - for (let i=0; i < keys.length; i++) { - let key = keys[i]; - yield [key, obj[key]]; - } -} - -let myObj = { foo: 3, bar: 7 }; - -for (let [key, value] of iterEntries(myObj)) { - console.log(key, value); -} - -// foo 3 -// bar 7 -``` - -上述代码中,`myObj`是一个普通对象,通过`iterEntries`函数,就有了Iterator接口。也就是说,可以在任意对象上部署`next`方法。 - -下面是一个对数组部署Iterator接口的例子,尽管数组原生具有这个接口。 - -```javascript -function* makeSimpleGenerator(array){ - var nextIndex = 0; - - while(nextIndex < array.length){ - yield array[nextIndex++]; - } -} - -var gen = makeSimpleGenerator(['yo', 'ya']); - -gen.next().value // 'yo' -gen.next().value // 'ya' -gen.next().done // true -``` - -### (4)作为数据结构 - -Generator可以看作是数据结构,更确切地说,可以看作是一个数组结构,因为Generator函数可以返回一系列的值,这意味着它可以对任意表达式,提供类似数组的接口。 - -```javascript -function *doStuff() { - yield fs.readFile.bind(null, 'hello.txt'); - yield fs.readFile.bind(null, 'world.txt'); - yield fs.readFile.bind(null, 'and-such.txt'); -} -``` - -上面代码就是依次返回三个函数,但是由于使用了Generator函数,导致可以像处理数组那样,处理这三个返回的函数。 - -```javascript -for (task of doStuff()) { - // task是一个函数,可以像回调函数那样使用它 -} -``` - -实际上,如果用ES5表达,完全可以用数组模拟Generator的这种用法。 - -```javascript -function doStuff() { - return [ - fs.readFile.bind(null, 'hello.txt'), - fs.readFile.bind(null, 'world.txt'), - fs.readFile.bind(null, 'and-such.txt') - ]; -} -``` - -上面的函数,可以用一模一样的for...of循环处理!两相一比较,就不难看出Generator使得数据或者操作,具备了类似数组的接口。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/intro.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/intro.md" deleted file mode 100644 index f3d5dec25..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/intro.md" +++ /dev/null @@ -1,651 +0,0 @@ -# ECMAScript 6简介 - -ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在2015年6月正式发布了。它的目标,是使得 JavaScript 语言可以用来编写复杂的大型应用程序,成为企业级开发语言。 - -## ECMAScript 和 JavaScript 的关系 - -一个常见的问题是,ECMAScript 和 JavaScript 到底是什么关系? - -要讲清楚这个问题,需要回顾历史。1996年11月,JavaScript 的创造者 Netscape 公司,决定将 JavaScript 提交给国际标准化组织ECMA,希望这种语言能够成为国际标准。次年,ECMA 发布262号标准文件(ECMA-262)的第一版,规定了浏览器脚本语言的标准,并将这种语言称为 ECMAScript,这个版本就是1.0版。 - -该标准从一开始就是针对 JavaScript 语言制定的,但是之所以不叫 JavaScript,有两个原因。一是商标,Java 是 Sun 公司的商标,根据授权协议,只有 Netscape 公司可以合法地使用 JavaScript 这个名字,且 JavaScript 本身也已经被 Netscape 公司注册为商标。二是想体现这门语言的制定者是 ECMA,不是 Netscape,这样有利于保证这门语言的开放性和中立性。 - -因此,ECMAScript 和 JavaScript 的关系是,前者是后者的规格,后者是前者的一种实现(另外的 ECMAScript 方言还有 Jscript 和 ActionScript)。日常场合,这两个词是可以互换的。 - -## ES6 与 ECMAScript 2015 的关系 - -ECMAScript 2015(简称 ES2015)这个词,也是经常可以看到的。它与 ES6 是什么关系呢? - -2011年,ECMAScript 5.1版发布后,就开始制定6.0版了。因此,ES6 这个词的原意,就是指 JavaScript 语言的下一个版本。 - -但是,因为这个版本引入的语法功能太多,而且制定过程当中,还有很多组织和个人不断提交新功能。事情很快就变得清楚了,不可能在一个版本里面包括所有将要引入的功能。常规的做法是先发布6.0版,过一段时间再发6.1版,然后是6.2版、6.3版等等。 - -但是,标准的制定者不想这样做。他们想让标准的升级成为常规流程:任何人在任何时候,都可以向标准委员会提交新语法的提案,然后标准委员会每个月开一次会,评估这些提案是否可以接受,需要哪些改进。如果经过多次会议以后,一个提案足够成熟了,就可以正式进入标准了。这就是说,标准的版本升级成为了一个不断滚动的流程,每个月都会有变动。 - -标准委员会最终决定,标准在每年的6月份正式发布一次,作为当年的正式版本。接下来的时间,就在这个版本的基础上做改动,直到下一年的6月份,草案就自然变成了新一年的版本。这样一来,就不需要以前的版本号了,只要用年份标记就可以了。 - -ES6 的第一个版本,就这样在2015年6月发布了,正式名称就是《ECMAScript 2015标准》(简称 ES2015)。2016年6月,小幅修订的《ECMAScript 2016标准》(简称 ES2016)如期发布,这个版本可以看作是 ES6.1 版,因为两者的差异非常小(只新增了数组实例的`includes`方法和指数运算符),基本上是同一个标准。根据计划,2017年6月发布 ES2017 标准。 - -因此,ES6 既是一个历史名词,也是一个泛指,含义是5.1版以后的 JavaScript 的下一代标准,涵盖了ES2015、ES2016、ES2017等等,而ES2015 则是正式名称,特指该年发布的正式版本的语言标准。本书中提到 ES6 的地方,一般是指 ES2015 标准,但有时也是泛指“下一代 JavaScript 语言”。 - -## 语法提案的批准流程 - -任何人都可以向标准委员会(又称 TC39 委员会)提案,要求修改语言标准。 - -一种新的语法从提案到变成正式标准,需要经历五个阶段。每个阶段的变动都需要由 TC39 委员会批准。 - -- Stage 0 - Strawman(展示阶段) -- Stage 1 - Proposal(征求意见阶段) -- Stage 2 - Draft(草案阶段) -- Stage 3 - Candidate(候选人阶段) -- Stage 4 - Finished(定案阶段) - -一个提案只要能进入 Stage 2,就差不多肯定会包括在以后的正式标准里面。ECMAScript 当前的所有提案,可以在 TC39 的官方网站[Github.com/tc39/ecma262](https://github.com/tc39/ecma262)查看。 - -本书的写作目标之一,是跟踪 ECMAScript 语言的最新进展,介绍5.1版本以后所有的新语法。对于那些明确或很有希望,将要列入标准的新语法,都将予以介绍。 - -## ECMAScript 的历史 - -ES6 从开始制定到最后发布,整整用了15年。 - -前面提到,ECMAScript 1.0是1997年发布的,接下来的两年,连续发布了 ECMAScript 2.0(1998年6月)和 ECMAScript 3.0(1999年12月)。3.0版是一个巨大的成功,在业界得到广泛支持,成为通行标准,奠定了 JavaScript 语言的基本语法,以后的版本完全继承。直到今天,初学者一开始学习 JavaScript,其实就是在学3.0版的语法。 - -2000年,ECMAScript 4.0开始酝酿。这个版本最后没有通过,但是它的大部分内容被ES6继承了。因此,ES6制定的起点其实是2000年。 - -为什么ES4没有通过呢?因为这个版本太激进了,对ES3做了彻底升级,导致标准委员会的一些成员不愿意接受。ECMA的第39号技术专家委员会(Technical Committee 39,简称TC39)负责制订ECMAScript标准,成员包括Microsoft、Mozilla、Google等大公司。 - -2007年10月,ECMAScript 4.0版草案发布,本来预计次年8月发布正式版本。但是,各方对于是否通过这个标准,发生了严重分歧。以Yahoo、Microsoft、Google为首的大公司,反对JavaScript的大幅升级,主张小幅改动;以JavaScript创造者Brendan Eich为首的Mozilla公司,则坚持当前的草案。 - -2008年7月,由于对于下一个版本应该包括哪些功能,各方分歧太大,争论过于激烈,ECMA开会决定,中止ECMAScript 4.0的开发,将其中涉及现有功能改善的一小部分,发布为ECMAScript 3.1,而将其他激进的设想扩大范围,放入以后的版本,由于会议的气氛,该版本的项目代号起名为Harmony(和谐)。会后不久,ECMAScript 3.1就改名为ECMAScript 5。 - -2009年12月,ECMAScript 5.0版正式发布。Harmony项目则一分为二,一些较为可行的设想定名为JavaScript.next继续开发,后来演变成ECMAScript 6;一些不是很成熟的设想,则被视为JavaScript.next.next,在更远的将来再考虑推出。TC39委员会的总体考虑是,ES5与ES3基本保持兼容,较大的语法修正和新功能加入,将由JavaScript.next完成。当时,JavaScript.next指的是ES6,第六版发布以后,就指ES7。TC39的判断是,ES5会在2013年的年中成为JavaScript开发的主流标准,并在此后五年中一直保持这个位置。 - -2011年6月,ECMAscript 5.1版发布,并且成为ISO国际标准(ISO/IEC 16262:2011)。 - -2013年3月,ECMAScript 6草案冻结,不再添加新功能。新的功能设想将被放到ECMAScript 7。 - -2013年12月,ECMAScript 6草案发布。然后是12个月的讨论期,听取各方反馈。 - -2015年6月,ECMAScript 6正式通过,成为国际标准。从2000年算起,这时已经过去了15年。 - -## 部署进度 - -各大浏览器的最新版本,对ES6的支持可以查看[kangax.github.io/es5-compat-table/es6/](http://kangax.github.io/es5-compat-table/es6/)。随着时间的推移,支持度已经越来越高了,ES6的大部分特性都实现了。 - -Node.js是JavaScript语言的服务器运行环境,对ES6的支持度比浏览器更高。通过Node,可以体验更多ES6的特性。建议使用版本管理工具[nvm](https://github.com/creationix/nvm),来安装Node,因为可以自由切换版本。不过,`nvm`不支持Windows系统,如果你使用Windows系统,下面的操作可以改用[nvmw](https://github.com/hakobera/nvmw)或[nvm-windows](https://github.com/coreybutler/nvm-windows)代替。 - -安装nvm需要打开命令行窗口,运行下面的命令。 - -```bash -$ curl -o- https://raw.githubusercontent.com/creationix/nvm/<version number>/install.sh | bash -``` - -上面命令的`version number`处,需要用版本号替换。本节写作时的版本号是`v0.29.0`。该命令运行后,`nvm`会默认安装在用户主目录的`.nvm`子目录。 - -然后,激活`nvm`。 - -```bash -$ source ~/.nvm/nvm.sh -``` - -激活以后,安装Node的最新版。 - -```bash -$ nvm install node -``` - -安装完成后,切换到该版本。 - -```bash -$ nvm use node -``` - -使用下面的命令,可以查看Node所有已经实现的ES6特性。 - -```bash -$ node --v8-options | grep harmony - - --harmony_typeof - --harmony_scoping - --harmony_modules - --harmony_symbols - --harmony_proxies - --harmony_collections - --harmony_observation - --harmony_generators - --harmony_iteration - --harmony_numeric_literals - --harmony_strings - --harmony_arrays - --harmony_maths - --harmony -``` - -上面命令的输出结果,会因为版本的不同而有所不同。 - -我写了一个[ES-Checker](https://github.com/ruanyf/es-checker)模块,用来检查各种运行环境对ES6的支持情况。访问[ruanyf.github.io/es-checker](http://ruanyf.github.io/es-checker),可以看到您的浏览器支持ES6的程度。运行下面的命令,可以查看你正在使用的Node环境对ES6的支持程度。 - -```bash -$ npm install -g es-checker -$ es-checker - -========================================= -Passes 24 feature Dectations -Your runtime supports 57% of ECMAScript 6 -========================================= -``` - -## Babel转码器 - -[Babel](https://babeljs.io/)是一个广泛使用的ES6转码器,可以将ES6代码转为ES5代码,从而在现有环境执行。这意味着,你可以用ES6的方式编写程序,又不用担心现有环境是否支持。下面是一个例子。 - -```javascript -// 转码前 -input.map(item => item + 1); - -// 转码后 -input.map(function (item) { - return item + 1; -}); -``` - -上面的原始代码用了箭头函数,这个特性还没有得到广泛支持,Babel将其转为普通函数,就能在现有的JavaScript环境执行了。 - -### 配置文件`.babelrc` - -Babel的配置文件是`.babelrc`,存放在项目的根目录下。使用Babel的第一步,就是配置这个文件。 - -该文件用来设置转码规则和插件,基本格式如下。 - -```javascript -{ - "presets": [], - "plugins": [] -} -``` - -`presets`字段设定转码规则,官方提供以下的规则集,你可以根据需要安装。 - -```bash -# ES2015转码规则 -$ npm install --save-dev babel-preset-es2015 - -# react转码规则 -$ npm install --save-dev babel-preset-react - -# ES7不同阶段语法提案的转码规则(共有4个阶段),选装一个 -$ npm install --save-dev babel-preset-stage-0 -$ npm install --save-dev babel-preset-stage-1 -$ npm install --save-dev babel-preset-stage-2 -$ npm install --save-dev babel-preset-stage-3 -``` - -然后,将这些规则加入`.babelrc`。 - -```javascript - { - "presets": [ - "es2015", - "react", - "stage-2" - ], - "plugins": [] - } -``` - -注意,以下所有Babel工具和模块的使用,都必须先写好`.babelrc`。 - -### 命令行转码`babel-cli` - -Babel提供`babel-cli`工具,用于命令行转码。 - -它的安装命令如下。 - -```bash -$ npm install --global babel-cli -``` - -基本用法如下。 - -```bash -# 转码结果输出到标准输出 -$ babel example.js - -# 转码结果写入一个文件 -# --out-file 或 -o 参数指定输出文件 -$ babel example.js --out-file compiled.js -# 或者 -$ babel example.js -o compiled.js - -# 整个目录转码 -# --out-dir 或 -d 参数指定输出目录 -$ babel src --out-dir lib -# 或者 -$ babel src -d lib - -# -s 参数生成source map文件 -$ babel src -d lib -s -``` - -上面代码是在全局环境下,进行Babel转码。这意味着,如果项目要运行,全局环境必须有Babel,也就是说项目产生了对环境的依赖。另一方面,这样做也无法支持不同项目使用不同版本的Babel。 - -一个解决办法是将`babel-cli`安装在项目之中。 - -```bash -# 安装 -$ npm install --save-dev babel-cli -``` - -然后,改写`package.json`。 - -```javascript -{ - // ... - "devDependencies": { - "babel-cli": "^6.0.0" - }, - "scripts": { - "build": "babel src -d lib" - }, -} -``` - -转码的时候,就执行下面的命令。 - -```javascript -$ npm run build -``` - -### babel-node - -`babel-cli`工具自带一个`babel-node`命令,提供一个支持ES6的REPL环境。它支持Node的REPL环境的所有功能,而且可以直接运行ES6代码。 - -它不用单独安装,而是随`babel-cli`一起安装。然后,执行`babel-node`就进入REPL环境。 - -```bash -$ babel-node -> (x => x * 2)(1) -2 -``` - -`babel-node`命令可以直接运行ES6脚本。将上面的代码放入脚本文件`es6.js`,然后直接运行。 - -```bash -$ babel-node es6.js -2 -``` - -`babel-node`也可以安装在项目中。 - -```bash -$ npm install --save-dev babel-cli -``` - -然后,改写`package.json`。 - -```javascript -{ - "scripts": { - "script-name": "babel-node script.js" - } -} -``` - -上面代码中,使用`babel-node`替代`node`,这样`script.js`本身就不用做任何转码处理。 - -### babel-register - -`babel-register`模块改写`require`命令,为它加上一个钩子。此后,每当使用`require`加载`.js`、`.jsx`、`.es`和`.es6`后缀名的文件,就会先用Babel进行转码。 - -```bash -$ npm install --save-dev babel-register -``` - -使用时,必须首先加载`babel-register`。 - -```bash -require("babel-register"); -require("./index.js"); -``` - -然后,就不需要手动对`index.js`转码了。 - -需要注意的是,`babel-register`只会对`require`命令加载的文件转码,而不会对当前文件转码。另外,由于它是实时转码,所以只适合在开发环境使用。 - -### babel-core - -如果某些代码需要调用Babel的API进行转码,就要使用`babel-core`模块。 - -安装命令如下。 - -```bash -$ npm install babel-core --save -``` - -然后,在项目中就可以调用`babel-core`。 - -```javascript -var babel = require('babel-core'); - -// 字符串转码 -babel.transform('code();', options); -// => { code, map, ast } - -// 文件转码(异步) -babel.transformFile('filename.js', options, function(err, result) { - result; // => { code, map, ast } -}); - -// 文件转码(同步) -babel.transformFileSync('filename.js', options); -// => { code, map, ast } - -// Babel AST转码 -babel.transformFromAst(ast, code, options); -// => { code, map, ast } -``` - -配置对象`options`,可以参看官方文档[http://babeljs.io/docs/usage/options/](http://babeljs.io/docs/usage/options/)。 - -下面是一个例子。 - -```javascript -var es6Code = 'let x = n => n + 1'; -var es5Code = require('babel-core') - .transform(es6Code, { - presets: ['es2015'] - }) - .code; -// '"use strict";\n\nvar x = function x(n) {\n return n + 1;\n};' -``` - -上面代码中,`transform`方法的第一个参数是一个字符串,表示需要被转换的ES6代码,第二个参数是转换的配置对象。 - -### babel-polyfill - -Babel默认只转换新的JavaScript句法(syntax),而不转换新的API,比如Iterator、Generator、Set、Maps、Proxy、Reflect、Symbol、Promise等全局对象,以及一些定义在全局对象上的方法(比如`Object.assign`)都不会转码。 - -举例来说,ES6在`Array`对象上新增了`Array.from`方法。Babel就不会转码这个方法。如果想让这个方法运行,必须使用`babel-polyfill`,为当前环境提供一个垫片。 - -安装命令如下。 - -```bash -$ npm install --save babel-polyfill -``` - -然后,在脚本头部,加入如下一行代码。 - -```javascript -import 'babel-polyfill'; -// 或者 -require('babel-polyfill'); -``` - -Babel默认不转码的API非常多,详细清单可以查看`babel-plugin-transform-runtime`模块的[definitions.js](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-runtime/src/definitions.js)文件。 - -### 浏览器环境 - -Babel也可以用于浏览器环境。但是,从Babel 6.0开始,不再直接提供浏览器版本,而是要用构建工具构建出来。如果你没有或不想使用构建工具,可以通过安装5.x版本的`babel-core`模块获取。 - -```bash -$ npm install babel-core@5 -``` - -运行上面的命令以后,就可以在当前目录的`node_modules/babel-core/`子目录里面,找到`babel`的浏览器版本`browser.js`(未精简)和`browser.min.js`(已精简)。 - -然后,将下面的代码插入网页。 - -```html -<script src="node_modules/babel-core/browser.js"></script> -<script type="text/babel"> -// Your ES6 code -</script> -``` - -上面代码中,`browser.js`是Babel提供的转换器脚本,可以在浏览器运行。用户的ES6脚本放在`script`标签之中,但是要注明`type="text/babel"`。 - -另一种方法是使用[babel-standalone](https://github.com/Daniel15/babel-standalone)模块提供的浏览器版本,将其插入网页。 - -```html -<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.4.4/babel.min.js"></script> -<script type="text/babel"> -// Your ES6 code -</script> -``` - -注意,网页中实时将ES6代码转为ES5,对性能会有影响。生产环境需要加载已经转码完成的脚本。 - -下面是如何将代码打包成浏览器可以使用的脚本,以`Babel`配合`Browserify`为例。首先,安装`babelify`模块。 - -```bash -$ npm install --save-dev babelify babel-preset-es2015 -``` - -然后,再用命令行转换ES6脚本。 - -```bash -$ browserify script.js -o bundle.js \ - -t [ babelify --presets [ es2015 ] ] -``` - -上面代码将ES6脚本`script.js`,转为`bundle.js`,浏览器直接加载后者就可以了。 - -在`package.json`设置下面的代码,就不用每次命令行都输入参数了。 - -```javascript -{ - "browserify": { - "transform": [["babelify", { "presets": ["es2015"] }]] - } -} -``` - -### 在线转换 - -Babel提供一个[REPL在线编译器](https://babeljs.io/repl/),可以在线将ES6代码转为ES5代码。转换后的代码,可以直接作为ES5代码插入网页运行。 - -### 与其他工具的配合 - -许多工具需要Babel进行前置转码,这里举两个例子:ESLint和Mocha。 - -ESLint用于静态检查代码的语法和风格,安装命令如下。 - -```bash -$ npm install --save-dev eslint babel-eslint -``` - -然后,在项目根目录下,新建一个配置文件`.eslintrc`,在其中加入`parser`字段。 - -```javascript -{ - "parser": "babel-eslint", - "rules": { - ... - } -} -``` - -再在`package.json`之中,加入相应的`scripts`脚本。 - -```javascript - { - "name": "my-module", - "scripts": { - "lint": "eslint my-files.js" - }, - "devDependencies": { - "babel-eslint": "...", - "eslint": "..." - } - } -``` - -Mocha则是一个测试框架,如果需要执行使用ES6语法的测试脚本,可以修改`package.json`的`scripts.test`。 - -```javascript -"scripts": { - "test": "mocha --ui qunit --compilers js:babel-core/register" -} -``` - -上面命令中,`--compilers`参数指定脚本的转码器,规定后缀名为`js`的文件,都需要使用`babel-core/register`先转码。 - -## Traceur转码器 - -Google公司的[Traceur](https://github.com/google/traceur-compiler)转码器,也可以将ES6代码转为ES5代码。 - -### 直接插入网页 - -Traceur允许将ES6代码直接插入网页。首先,必须在网页头部加载Traceur库文件。 - -```html -<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script> -<script src="https://google.github.io/traceur-compiler/bin/BrowserSystem.js"></script> -<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script> -<script type="module"> - import './Greeter.js'; -</script> -``` - -上面代码中,一共有4个`script`标签。第一个是加载Traceur的库文件,第二个和第三个是将这个库文件用于浏览器环境,第四个则是加载用户脚本,这个脚本里面可以使用ES6代码。 - -注意,第四个`script`标签的`type`属性的值是`module`,而不是`text/javascript`。这是Traceur编译器识别ES6代码的标志,编译器会自动将所有`type=module`的代码编译为ES5,然后再交给浏览器执行。 - -除了引用外部ES6脚本,也可以直接在网页中放置ES6代码。 - -```javascript -<script type="module"> - class Calc { - constructor(){ - console.log('Calc constructor'); - } - add(a, b){ - return a + b; - } - } - - var c = new Calc(); - console.log(c.add(4,5)); -</script> -``` - -正常情况下,上面代码会在控制台打印出9。 - -如果想对Traceur的行为有精确控制,可以采用下面参数配置的写法。 - -```javascript -<script> - // Create the System object - window.System = new traceur.runtime.BrowserTraceurLoader(); - // Set some experimental options - var metadata = { - traceurOptions: { - experimental: true, - properTailCalls: true, - symbols: true, - arrayComprehension: true, - asyncFunctions: true, - asyncGenerators: exponentiation, - forOn: true, - generatorComprehension: true - } - }; - // Load your module - System.import('./myModule.js', {metadata: metadata}).catch(function(ex) { - console.error('Import failed', ex.stack || ex); - }); -</script> -``` - -上面代码中,首先生成Traceur的全局对象`window.System`,然后`System.import`方法可以用来加载ES6模块。加载的时候,需要传入一个配置对象`metadata`,该对象的`traceurOptions`属性可以配置支持ES6功能。如果设为`experimental: true`,就表示除了ES6以外,还支持一些实验性的新功能。 - -### 在线转换 - -Traceur也提供一个[在线编译器](http://google.github.io/traceur-compiler/demo/repl.html),可以在线将ES6代码转为ES5代码。转换后的代码,可以直接作为ES5代码插入网页运行。 - -上面的例子转为ES5代码运行,就是下面这个样子。 - -```javascript -<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script> -<script src="https://google.github.io/traceur-compiler/bin/BrowserSystem.js"></script> -<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script> -<script> -$traceurRuntime.ModuleStore.getAnonymousModule(function() { - "use strict"; - - var Calc = function Calc() { - console.log('Calc constructor'); - }; - - ($traceurRuntime.createClass)(Calc, {add: function(a, b) { - return a + b; - }}, {}); - - var c = new Calc(); - console.log(c.add(4, 5)); - return {}; -}); -</script> -``` - -### 命令行转换 - -作为命令行工具使用时,Traceur是一个Node的模块,首先需要用Npm安装。 - -```bash -$ npm install -g traceur -``` - -安装成功后,就可以在命令行下使用Traceur了。 - -Traceur直接运行es6脚本文件,会在标准输出显示运行结果,以前面的`calc.js`为例。 - -```bash -$ traceur calc.js -Calc constructor -9 -``` - -如果要将ES6脚本转为ES5保存,要采用下面的写法。 - -```bash -$ traceur --script calc.es6.js --out calc.es5.js -``` - -上面代码的`--script`选项表示指定输入文件,`--out`选项表示指定输出文件。 - -为了防止有些特性编译不成功,最好加上`--experimental`选项。 - -```bash -$ traceur --script calc.es6.js --out calc.es5.js --experimental -``` - -命令行下转换生成的文件,就可以直接放到浏览器中运行。 - -### Node.js环境的用法 - -Traceur的Node.js用法如下(假定已安装traceur模块)。 - -```javascript -var traceur = require('traceur'); -var fs = require('fs'); - -// 将ES6脚本转为字符串 -var contents = fs.readFileSync('es6-file.js').toString(); - -var result = traceur.compile(contents, { - filename: 'es6-file.js', - sourceMap: true, - // 其他设置 - modules: 'commonjs' -}); - -if (result.error) - throw result.error; - -// result对象的js属性就是转换后的ES5代码 -fs.writeFileSync('out.js', result.js); -// sourceMap属性对应map文件 -fs.writeFileSync('out.js.map', result.sourceMap); -``` - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/iterator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/iterator.md" deleted file mode 100644 index 62c388f2c..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/iterator.md" +++ /dev/null @@ -1,809 +0,0 @@ -# Iterator和for...of循环 - -## Iterator(遍历器)的概念 - -JavaScript原有的表示“集合”的数据结构,主要是数组(Array)和对象(Object),ES6又添加了Map和Set。这样就有了四种数据集合,用户还可以组合使用它们,定义自己的数据结构,比如数组的成员是Map,Map的成员是对象。这样就需要一种统一的接口机制,来处理所有不同的数据结构。 - -遍历器(Iterator)就是这样一种机制。它是一种接口,为各种不同的数据结构提供统一的访问机制。任何数据结构只要部署Iterator接口,就可以完成遍历操作(即依次处理该数据结构的所有成员)。 - -Iterator的作用有三个:一是为各种数据结构,提供一个统一的、简便的访问接口;二是使得数据结构的成员能够按某种次序排列;三是ES6创造了一种新的遍历命令`for...of`循环,Iterator接口主要供`for...of`消费。 - -Iterator的遍历过程是这样的。 - -(1)创建一个指针对象,指向当前数据结构的起始位置。也就是说,遍历器对象本质上,就是一个指针对象。 - -(2)第一次调用指针对象的`next`方法,可以将指针指向数据结构的第一个成员。 - -(3)第二次调用指针对象的`next`方法,指针就指向数据结构的第二个成员。 - -(4)不断调用指针对象的`next`方法,直到它指向数据结构的结束位置。 - -每一次调用`next`方法,都会返回数据结构的当前成员的信息。具体来说,就是返回一个包含`value`和`done`两个属性的对象。其中,`value`属性是当前成员的值,`done`属性是一个布尔值,表示遍历是否结束。 - -下面是一个模拟`next`方法返回值的例子。 - -```javascript -var it = makeIterator(['a', 'b']); - -it.next() // { value: "a", done: false } -it.next() // { value: "b", done: false } -it.next() // { value: undefined, done: true } - -function makeIterator(array) { - var nextIndex = 0; - return { - next: function() { - return nextIndex < array.length ? - {value: array[nextIndex++], done: false} : - {value: undefined, done: true}; - } - }; -} -``` - -上面代码定义了一个`makeIterator`函数,它是一个遍历器生成函数,作用就是返回一个遍历器对象。对数组`['a', 'b']`执行这个函数,就会返回该数组的遍历器对象(即指针对象)`it`。 - -指针对象的`next`方法,用来移动指针。开始时,指针指向数组的开始位置。然后,每次调用`next`方法,指针就会指向数组的下一个成员。第一次调用,指向`a`;第二次调用,指向`b`。 - -`next`方法返回一个对象,表示当前数据成员的信息。这个对象具有`value`和`done`两个属性,`value`属性返回当前位置的成员,`done`属性是一个布尔值,表示遍历是否结束,即是否还有必要再一次调用`next`方法。 - -总之,调用指针对象的`next`方法,就可以遍历事先给定的数据结构。 - -对于遍历器对象来说,`done: false`和`value: undefined`属性都是可以省略的,因此上面的`makeIterator`函数可以简写成下面的形式。 - -```javascript -function makeIterator(array) { - var nextIndex = 0; - return { - next: function() { - return nextIndex < array.length ? - {value: array[nextIndex++]} : - {done: true}; - } - }; -} -``` - -由于Iterator只是把接口规格加到数据结构之上,所以,遍历器与它所遍历的那个数据结构,实际上是分开的,完全可以写出没有对应数据结构的遍历器对象,或者说用遍历器对象模拟出数据结构。下面是一个无限运行的遍历器对象的例子。 - -```javascript -var it = idMaker(); - -it.next().value // '0' -it.next().value // '1' -it.next().value // '2' -// ... - -function idMaker() { - var index = 0; - - return { - next: function() { - return {value: index++, done: false}; - } - }; -} -``` - -上面的例子中,遍历器生成函数`idMaker`,返回一个遍历器对象(即指针对象)。但是并没有对应的数据结构,或者说,遍历器对象自己描述了一个数据结构出来。 - -在ES6中,有些数据结构原生具备Iterator接口(比如数组),即不用任何处理,就可以被`for...of`循环遍历,有些就不行(比如对象)。原因在于,这些数据结构原生部署了`Symbol.iterator`属性(详见下文),另外一些数据结构没有。凡是部署了`Symbol.iterator`属性的数据结构,就称为部署了遍历器接口。调用这个接口,就会返回一个遍历器对象。 - -如果使用TypeScript的写法,遍历器接口(Iterable)、指针对象(Iterator)和next方法返回值的规格可以描述如下。 - -```javascript -interface Iterable { - [Symbol.iterator]() : Iterator, -} - -interface Iterator { - next(value?: any) : IterationResult, -} - -interface IterationResult { - value: any, - done: boolean, -} -``` - -## 数据结构的默认Iterator接口 - -Iterator接口的目的,就是为所有数据结构,提供了一种统一的访问机制,即`for...of`循环(详见下文)。当使用`for...of`循环遍历某种数据结构时,该循环会自动去寻找Iterator接口。 - -一种数据结构只要部署了Iterator接口,我们就称这种数据结构是”可遍历的“(iterable)。 - -ES6规定,默认的Iterator接口部署在数据结构的`Symbol.iterator`属性,或者说,一个数据结构只要具有`Symbol.iterator`属性,就可以认为是“可遍历的”(iterable)。`Symbol.iterator`属性本身是一个函数,就是当前数据结构默认的遍历器生成函数。执行这个函数,就会返回一个遍历器。至于属性名`Symbol.iterator`,它是一个表达式,返回`Symbol`对象的`iterator`属性,这是一个预定义好的、类型为Symbol的特殊值,所以要放在方括号内。(参见Symbol一章)。 - -```javascript -const obj = { - [Symbol.iterator] : function () { - return { - next: function () { - return { - value: 1, - done: true - }; - } - }; - } -}; -``` - -上面代码中,对象`obj`是可遍历的(iterable),因为具有`Symbol.iterator`属性。执行这个属性,会返回一个遍历器对象。该对象的根本特征就是具有`next`方法。每次调用`next`方法,都会返回一个代表当前成员的信息对象,具有`value`和`done`两个属性。 - -在ES6中,有三类数据结构原生具备Iterator接口:数组、某些类似数组的对象、Set和Map结构。 - -```javascript -let arr = ['a', 'b', 'c']; -let iter = arr[Symbol.iterator](); - -iter.next() // { value: 'a', done: false } -iter.next() // { value: 'b', done: false } -iter.next() // { value: 'c', done: false } -iter.next() // { value: undefined, done: true } -``` - -上面代码中,变量`arr`是一个数组,原生就具有遍历器接口,部署在`arr`的`Symbol.iterator`属性上面。所以,调用这个属性,就得到遍历器对象。 - -上面提到,原生就部署Iterator接口的数据结构有三类,对于这三类数据结构,不用自己写遍历器生成函数,`for...of`循环会自动遍历它们。除此之外,其他数据结构(主要是对象)的Iterator接口,都需要自己在`Symbol.iterator`属性上面部署,这样才会被`for...of`循环遍历。 - -对象(Object)之所以没有默认部署Iterator接口,是因为对象的哪个属性先遍历,哪个属性后遍历是不确定的,需要开发者手动指定。本质上,遍历器是一种线性处理,对于任何非线性的数据结构,部署遍历器接口,就等于部署一种线性转换。不过,严格地说,对象部署遍历器接口并不是很必要,因为这时对象实际上被当作Map结构使用,ES5没有Map结构,而ES6原生提供了。 - -一个对象如果要有可被`for...of`循环调用的Iterator接口,就必须在`Symbol.iterator`的属性上部署遍历器生成方法(原型链上的对象具有该方法也可)。 - -```javascript -class RangeIterator { - constructor(start, stop) { - this.value = start; - this.stop = stop; - } - - [Symbol.iterator]() { return this; } - - next() { - var value = this.value; - if (value < this.stop) { - this.value++; - return {done: false, value: value}; - } - return {done: true, value: undefined}; - } -} - -function range(start, stop) { - return new RangeIterator(start, stop); -} - -for (var value of range(0, 3)) { - console.log(value); -} -``` - -上面代码是一个类部署Iterator接口的写法。`Symbol.iterator`属性对应一个函数,执行后返回当前对象的遍历器对象。 - -下面是通过遍历器实现指针结构的例子。 - -```javascript -function Obj(value) { - this.value = value; - this.next = null; -} - -Obj.prototype[Symbol.iterator] = function() { - var iterator = { - next: next - }; - - var current = this; - - function next() { - if (current) { - var value = current.value; - current = current.next; - return { - done: false, - value: value - }; - } else { - return { - done: true - }; - } - } - return iterator; -} - -var one = new Obj(1); -var two = new Obj(2); -var three = new Obj(3); - -one.next = two; -two.next = three; - -for (var i of one){ - console.log(i); -} -// 1 -// 2 -// 3 -``` - -上面代码首先在构造函数的原型链上部署`Symbol.iterator`方法,调用该方法会返回遍历器对象`iterator`,调用该对象的`next`方法,在返回一个值的同时,自动将内部指针移到下一个实例。 - -下面是另一个为对象添加Iterator接口的例子。 - -```javascript -let obj = { - data: [ 'hello', 'world' ], - [Symbol.iterator]() { - const self = this; - let index = 0; - return { - next() { - if (index < self.data.length) { - return { - value: self.data[index++], - done: false - }; - } else { - return { value: undefined, done: true }; - } - } - }; - } -}; -``` - -对于类似数组的对象(存在数值键名和length属性),部署Iterator接口,有一个简便方法,就是`Symbol.iterator`方法直接引用数组的Iterator接口。 - -```javascript -NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; -// 或者 -NodeList.prototype[Symbol.iterator] = [][Symbol.iterator]; - -[...document.querySelectorAll('div')] // 可以执行了 -``` - -下面是类似数组的对象调用数组的`Symbol.iterator`方法的例子。 - -```javascript -let iterable = { - 0: 'a', - 1: 'b', - 2: 'c', - length: 3, - [Symbol.iterator]: Array.prototype[Symbol.iterator] -}; -for (let item of iterable) { - console.log(item); // 'a', 'b', 'c' -} -``` - -注意,普通对象部署数组的`Symbol.iterator`方法,并无效果。 - -```javascript -let iterable = { - a: 'a', - b: 'b', - c: 'c', - length: 3, - [Symbol.iterator]: Array.prototype[Symbol.iterator] -}; -for (let item of iterable) { - console.log(item); // undefined, undefined, undefined -} -``` - -如果`Symbol.iterator`方法对应的不是遍历器生成函数(即会返回一个遍历器对象),解释引擎将会报错。 - -```javascript -var obj = {}; - -obj[Symbol.iterator] = () => 1; - -[...obj] // TypeError: [] is not a function -``` - -上面代码中,变量obj的Symbol.iterator方法对应的不是遍历器生成函数,因此报错。 - -有了遍历器接口,数据结构就可以用`for...of`循环遍历(详见下文),也可以使用`while`循环遍历。 - -```javascript -var $iterator = ITERABLE[Symbol.iterator](); -var $result = $iterator.next(); -while (!$result.done) { - var x = $result.value; - // ... - $result = $iterator.next(); -} -``` - -上面代码中,`ITERABLE`代表某种可遍历的数据结构,`$iterator`是它的遍历器对象。遍历器对象每次移动指针(`next`方法),都检查一下返回值的`done`属性,如果遍历还没结束,就移动遍历器对象的指针到下一步(`next`方法),不断循环。 - -## 调用Iterator接口的场合 - -有一些场合会默认调用Iterator接口(即`Symbol.iterator`方法),除了下文会介绍的`for...of`循环,还有几个别的场合。 - -**(1)解构赋值** - -对数组和Set结构进行解构赋值时,会默认调用`Symbol.iterator`方法。 - -```javascript -let set = new Set().add('a').add('b').add('c'); - -let [x,y] = set; -// x='a'; y='b' - -let [first, ...rest] = set; -// first='a'; rest=['b','c']; -``` - -**(2)扩展运算符** - -扩展运算符(...)也会调用默认的iterator接口。 - -```javascript -// 例一 -var str = 'hello'; -[...str] // ['h','e','l','l','o'] - -// 例二 -let arr = ['b', 'c']; -['a', ...arr, 'd'] -// ['a', 'b', 'c', 'd'] -``` - -上面代码的扩展运算符内部就调用Iterator接口。 - -实际上,这提供了一种简便机制,可以将任何部署了Iterator接口的数据结构,转为数组。也就是说,只要某个数据结构部署了Iterator接口,就可以对它使用扩展运算符,将其转为数组。 - -```javascript -let arr = [...iterable]; -``` - -**(3)yield* ** - -yield*后面跟的是一个可遍历的结构,它会调用该结构的遍历器接口。 - -```javascript -let generator = function* () { - yield 1; - yield* [2,3,4]; - yield 5; -}; - -var iterator = generator(); - -iterator.next() // { value: 1, done: false } -iterator.next() // { value: 2, done: false } -iterator.next() // { value: 3, done: false } -iterator.next() // { value: 4, done: false } -iterator.next() // { value: 5, done: false } -iterator.next() // { value: undefined, done: true } -``` - -**(4)其他场合** - -由于数组的遍历会调用遍历器接口,所以任何接受数组作为参数的场合,其实都调用了遍历器接口。下面是一些例子。 - -- for...of -- Array.from() -- Map(), Set(), WeakMap(), WeakSet()(比如`new Map([['a',1],['b',2]])`) -- Promise.all() -- Promise.race() - -## 字符串的Iterator接口 - -字符串是一个类似数组的对象,也原生具有Iterator接口。 - -```javascript -var someString = "hi"; -typeof someString[Symbol.iterator] -// "function" - -var iterator = someString[Symbol.iterator](); - -iterator.next() // { value: "h", done: false } -iterator.next() // { value: "i", done: false } -iterator.next() // { value: undefined, done: true } -``` - -上面代码中,调用`Symbol.iterator`方法返回一个遍历器对象,在这个遍历器上可以调用next方法,实现对于字符串的遍历。 - -可以覆盖原生的`Symbol.iterator`方法,达到修改遍历器行为的目的。 - -```javascript -var str = new String("hi"); - -[...str] // ["h", "i"] - -str[Symbol.iterator] = function() { - return { - next: function() { - if (this._first) { - this._first = false; - return { value: "bye", done: false }; - } else { - return { done: true }; - } - }, - _first: true - }; -}; - -[...str] // ["bye"] -str // "hi" -``` - -上面代码中,字符串str的`Symbol.iterator`方法被修改了,所以扩展运算符(`...`)返回的值变成了`bye`,而字符串本身还是`hi`。 - -## Iterator接口与Generator函数 - -`Symbol.iterator`方法的最简单实现,还是使用下一章要介绍的Generator函数。 - -```javascript -var myIterable = {}; - -myIterable[Symbol.iterator] = function* () { - yield 1; - yield 2; - yield 3; -}; -[...myIterable] // [1, 2, 3] - -// 或者采用下面的简洁写法 - -let obj = { - * [Symbol.iterator]() { - yield 'hello'; - yield 'world'; - } -}; - -for (let x of obj) { - console.log(x); -} -// hello -// world -``` - -上面代码中,`Symbol.iterator`方法几乎不用部署任何代码,只要用yield命令给出每一步的返回值即可。 - -## 遍历器对象的return(),throw() - -遍历器对象除了具有`next`方法,还可以具有`return`方法和`throw`方法。如果你自己写遍历器对象生成函数,那么`next`方法是必须部署的,`return`方法和`throw`方法是否部署是可选的。 - -`return`方法的使用场合是,如果`for...of`循环提前退出(通常是因为出错,或者有`break`语句或`continue`语句),就会调用`return`方法。如果一个对象在完成遍历前,需要清理或释放资源,就可以部署`return`方法。 - -```javascript -function readLinesSync(file) { - return { - next() { - if (file.isAtEndOfFile()) { - file.close(); - return { done: true }; - } - }, - return() { - file.close(); - return { done: true }; - }, - }; -} -``` - -上面代码中,函数`readLinesSync`接受一个文件对象作为参数,返回一个遍历器对象,其中除了`next`方法,还部署了`return`方法。下面,我们让文件的遍历提前返回,这样就会触发执行`return`方法。 - -```javascript -for (let line of readLinesSync(fileName)) { - console.log(line); - break; -} -``` - -注意,`return`方法必须返回一个对象,这是Generator规格决定的。 - -`throw`方法主要是配合Generator函数使用,一般的遍历器对象用不到这个方法。请参阅《Generator函数》一章。 - -## for...of循环 - -ES6 借鉴 C++、Java、C# 和 Python 语言,引入了`for...of`循环,作为遍历所有数据结构的统一的方法。 - -一个数据结构只要部署了`Symbol.iterator`属性,就被视为具有iterator接口,就可以用`for...of`循环遍历它的成员。也就是说,`for...of`循环内部调用的是数据结构的`Symbol.iterator`方法。 - -`for...of`循环可以使用的范围包括数组、Set 和 Map 结构、某些类似数组的对象(比如`arguments`对象、DOM NodeList 对象)、后文的 Generator 对象,以及字符串。 - -### 数组 - -数组原生具备`iterator`接口(即默认部署了`Symbol.iterator`属性),`for...of`循环本质上就是调用这个接口产生的遍历器,可以用下面的代码证明。 - -```javascript -const arr = ['red', 'green', 'blue']; - -for(let v of arr) { - console.log(v); // red green blue -} - -const obj = {}; -obj[Symbol.iterator] = arr[Symbol.iterator].bind(arr); - -for(let v of obj) { - console.log(v); // red green blue -} -``` - -上面代码中,空对象`obj`部署了数组`arr`的`Symbol.iterator`属性,结果`obj`的`for...of`循环,产生了与`arr`完全一样的结果。 - -`for...of`循环可以代替数组实例的`forEach`方法。 - -```javascript -const arr = ['red', 'green', 'blue']; - -arr.forEach(function (element, index) { - console.log(element); // red green blue - console.log(index); // 0 1 2 -}); -``` - -JavaScript原有的`for...in`循环,只能获得对象的键名,不能直接获取键值。ES6提供`for...of`循环,允许遍历获得键值。 - -```javascript -var arr = ['a', 'b', 'c', 'd']; - -for (let a in arr) { - console.log(a); // 0 1 2 3 -} - -for (let a of arr) { - console.log(a); // a b c d -} -``` - -上面代码表明,`for...in`循环读取键名,`for...of`循环读取键值。如果要通过`for...of`循环,获取数组的索引,可以借助数组实例的`entries`方法和`keys`方法,参见《数组的扩展》章节。 - -`for...of`循环调用遍历器接口,数组的遍历器接口只返回具有数字索引的属性。这一点跟`for...in`循环也不一样。 - -```javascript -let arr = [3, 5, 7]; -arr.foo = 'hello'; - -for (let i in arr) { - console.log(i); // "0", "1", "2", "foo" -} - -for (let i of arr) { - console.log(i); // "3", "5", "7" -} -``` - -上面代码中,`for...of`循环不会返回数组`arr`的`foo`属性。 - -### Set和Map结构 - -Set 和 Map 结构也原生具有 Iterator 接口,可以直接使用`for...of`循环。 - -```javascript -var engines = new Set(["Gecko", "Trident", "Webkit", "Webkit"]); -for (var e of engines) { - console.log(e); -} -// Gecko -// Trident -// Webkit - -var es6 = new Map(); -es6.set("edition", 6); -es6.set("committee", "TC39"); -es6.set("standard", "ECMA-262"); -for (var [name, value] of es6) { - console.log(name + ": " + value); -} -// edition: 6 -// committee: TC39 -// standard: ECMA-262 -``` - -上面代码演示了如何遍历 Set 结构和 Map 结构。值得注意的地方有两个,首先,遍历的顺序是按照各个成员被添加进数据结构的顺序。其次,Set 结构遍历时,返回的是一个值,而 Map 结构遍历时,返回的是一个数组,该数组的两个成员分别为当前 Map 成员的键名和键值。 - -```javascript -let map = new Map().set('a', 1).set('b', 2); -for (let pair of map) { - console.log(pair); -} -// ['a', 1] -// ['b', 2] - -for (let [key, value] of map) { - console.log(key + ' : ' + value); -} -// a : 1 -// b : 2 -``` - -### 计算生成的数据结构 - -有些数据结构是在现有数据结构的基础上,计算生成的。比如,ES6的数组、Set、Map 都部署了以下三个方法,调用后都返回遍历器对象。 - -- `entries()` 返回一个遍历器对象,用来遍历`[键名, 键值]`组成的数组。对于数组,键名就是索引值;对于 Set,键名与键值相同。Map 结构的 Iterator 接口,默认就是调用`entries`方法。 -- `keys()` 返回一个遍历器对象,用来遍历所有的键名。 -- `values()` 返回一个遍历器对象,用来遍历所有的键值。 - -这三个方法调用后生成的遍历器对象,所遍历的都是计算生成的数据结构。 - -```javascript -let arr = ['a', 'b', 'c']; -for (let pair of arr.entries()) { - console.log(pair); -} -// [0, 'a'] -// [1, 'b'] -// [2, 'c'] -``` - -### 类似数组的对象 - -类似数组的对象包括好几类。下面是`for...of`循环用于字符串、DOM NodeList 对象、`arguments`对象的例子。 - -```javascript -// 字符串 -let str = "hello"; - -for (let s of str) { - console.log(s); // h e l l o -} - -// DOM NodeList对象 -let paras = document.querySelectorAll("p"); - -for (let p of paras) { - p.classList.add("test"); -} - -// arguments对象 -function printArgs() { - for (let x of arguments) { - console.log(x); - } -} -printArgs('a', 'b'); -// 'a' -// 'b' -``` - -对于字符串来说,`for...of`循环还有一个特点,就是会正确识别32位 UTF-16 字符。 - -```javascript -for (let x of 'a\uD83D\uDC0A') { - console.log(x); -} -// 'a' -// '\uD83D\uDC0A' -``` - -并不是所有类似数组的对象都具有 Iterator 接口,一个简便的解决方法,就是使用`Array.from`方法将其转为数组。 - -```javascript -let arrayLike = { length: 2, 0: 'a', 1: 'b' }; - -// 报错 -for (let x of arrayLike) { - console.log(x); -} - -// 正确 -for (let x of Array.from(arrayLike)) { - console.log(x); -} -``` - -### 对象 - -对于普通的对象,`for...of`结构不能直接使用,会报错,必须部署了 Iterator 接口后才能使用。但是,这样情况下,`for...in`循环依然可以用来遍历键名。 - -```javascript -let es6 = { - edition: 6, - committee: "TC39", - standard: "ECMA-262" -}; - -for (let e in es6) { - console.log(e); -} -// edition -// committee -// standard - -for (let e of es6) { - console.log(e); -} -// TypeError: es6 is not iterable -``` - -上面代码表示,对于普通的对象,`for...in`循环可以遍历键名,`for...of`循环会报错。 - -一种解决方法是,使用`Object.keys`方法将对象的键名生成一个数组,然后遍历这个数组。 - -```javascript -for (var key of Object.keys(someObject)) { - console.log(key + ': ' + someObject[key]); -} -``` - -另一个方法是使用 Generator 函数将对象重新包装一下。 - -```javascript -function* entries(obj) { - for (let key of Object.keys(obj)) { - yield [key, obj[key]]; - } -} - -for (let [key, value] of entries(obj)) { - console.log(key, '->', value); -} -// a -> 1 -// b -> 2 -// c -> 3 -``` - -### 与其他遍历语法的比较 - -以数组为例,JavaScript 提供多种遍历语法。最原始的写法就是`for`循环。 - -```javascript -for (var index = 0; index < myArray.length; index++) { - console.log(myArray[index]); -} -``` - -这种写法比较麻烦,因此数组提供内置的`forEach`方法。 - -```javascript -myArray.forEach(function (value) { - console.log(value); -}); -``` - -这种写法的问题在于,无法中途跳出`forEach`循环,`break`命令或`return`命令都不能奏效。 - -`for...in`循环可以遍历数组的键名。 - -```javascript -for (var index in myArray) { - console.log(myArray[index]); -} -``` - -`for...in`循环有几个缺点。 - -- 数组的键名是数字,但是`for...in`循环是以字符串作为键名“0”、“1”、“2”等等。 -- `for...in`循环不仅遍历数字键名,还会遍历手动添加的其他键,甚至包括原型链上的键。 -- 某些情况下,`for...in`循环会以任意顺序遍历键名。 - -总之,`for...in`循环主要是为遍历对象而设计的,不适用于遍历数组。 - -`for...of`循环相比上面几种做法,有一些显著的优点。 - -```javascript -for (let value of myArray) { - console.log(value); -} -``` - -- 有着同`for...in`一样的简洁语法,但是没有`for...in`那些缺点。 -- 不同用于`forEach`方法,它可以与`break`、`continue`和`return`配合使用。 -- 提供了遍历所有数据结构的统一操作接口。 - -下面是一个使用break语句,跳出`for...of`循环的例子。 - -```javascript -for (var n of fibonacci) { - if (n > 1000) - break; - console.log(n); -} -``` - -上面的例子,会输出斐波纳契数列小于等于1000的项。如果当前项大于1000,就会使用`break`语句跳出`for...of`循环。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/mixin.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/mixin.md" deleted file mode 100644 index 0c00d57c5..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/mixin.md" +++ /dev/null @@ -1,96 +0,0 @@ -# Mixin - -JavaScript语言的设计是单一继承,即子类只能继承一个父类,不允许继承多个父类。这种设计保证了对象继承的层次结构是树状的,而不是复杂的[网状结构](https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem)。 - -但是,这大大降低了编程的灵活性。因为实际开发中,有时不可避免,子类需要继承多个父类。举例来说,“猫”可以继承“哺乳类动物”,也可以继承“宠物”。 - -各种单一继承的编程语言,有不同的多重继承解决方案。比如,Java语言也是子类只能继承一个父类,但是还允许继承多个界面(interface),这样就间接实现了多重继承。Interface与父类一样,也是一个类,只不过它只定义接口(method signature),不定义实现,因此又被称为“抽象类”。凡是继承于Interface的方法,都必须自己定义实现,否则就会报错。这样就避免了多重继承的最大问题:多个父类的同名方法的碰撞(naming collision)。 - -JavaScript语言没有采用Interface的方案,而是通过代理(delegation)实现了从其他类引入方法。 - -```javascript -var Enumerable_first = function () { - this.first = function () { - return this[0]; - }; -}; - -var list = ["foo", "bar", "baz"]; -Enumerable_first.call(list); // explicit delegation -list.first() // "foo" -``` - -上面代码中,`list`是一个数组,本身并没有`first`方法。通过`call`方法,可以把`Enumerable_first`里面的方法,绑定到`list`,从而`list`就具有`first`方法。这就叫做“代理”(delegation),`list`对象代理了`Enumerable_first`的`first`方法。 - -## 含义 - -Mixin这个名字来自于冰淇淋,在基本口味的冰淇淋上面混入其他口味,这就叫做Mix-in。 - -它允许向一个类里面注入一些代码,使得一个类的功能能够“混入”另一个类。实质上是多重继承的一种解决方案,但是避免了多重继承的复杂性,而且有利于代码复用。 - -Mixin就是一个正常的类,不仅定义了接口,还定义了接口的实现。 - -子类通过在`this`对象上面绑定方法,达到多重继承的目的。 - -很多库提供了Mixin功能。下面以Lodash为例。 - -```javascript -function vowels(string) { - return /[aeiou]/i.test(this.value); -} - -var obj = { value: 'hello' }; -_.mixin(obj, {vowels: vowels}) -obj.vowels() // true -``` - -上面代码通过Lodash库的`_.mixin`方法,让`obj`对象继承了`vowels`方法。 - -Underscore的类似方法是`_.extend`。 - -```javascript -var Person = function (fName, lName) { - this.firstName = fName; - this.lastName = lName; -} - -var sam = new Person('Sam', 'Lowry'); - -var NameMixin = { - fullName: function () { - return this.firstName + ' ' + this.lastName; - }, - rename: function(first, last) { - this.firstName = first; - this.lastName = last; - return this; - } -}; -_.extend(Person.prototype, NameMixin); -sam.rename('Samwise', 'Gamgee'); -sam.fullName() // "Samwise Gamgee" -``` - -上面代码通过`_.extend`方法,在`sam`对象上面(准确说是它的原型对象`Person.prototype`上面),混入了`NameMixin`类。 - -`extend`方法的实现非常简单。 - -```javascript -function extend(destination, source) { - for (var k in source) { - if (source.hasOwnProperty(k)) { - destination[k] = source[k]; - } - } - return destination; -} -``` - -上面代码将`source`对象的所有方法,添加到`destination`对象。 - -## Trait - -Trait是另外一种多重继承的解决方案。它与Mixin很相似,但是有一些细微的差别。 - -- Mixin可以包含状态(state),Trait不包含,即Trait里面的方法都是互不相干,可以线性包含的。比如,`Trait1`包含方法`A`和`B`,`Trait2`继承了`Trait1`,同时还包含一个自己的方法`C`,实际上就等同于直接包含方法`A`、`B`、`C`。 -- 对于同名方法的碰撞,Mixin包含了解决规则,Trait则是报错。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module-loader.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module-loader.md" deleted file mode 100644 index 036f9c01b..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module-loader.md" +++ /dev/null @@ -1,806 +0,0 @@ -# Module 的加载实现 - -上一章介绍了模块的语法,本章介绍如何在浏览器和 Node 之中加载 ES6 模块,以及实际开发中经常遇到的一些问题(比如循环加载)。 - -## 浏览器加载 - -### 传统方法 - -在 HTML 网页中,浏览器通过`<script>`标签加载 JavaScript 脚本。 - -```html -<!-- 页面内嵌的脚本 --> -<script type="application/javascript"> - // module code -</script> - -<!-- 外部脚本 --> -<script type="application/javascript" src="path/to/myModule.js"> -</script> -``` - -上面代码中,由于浏览器脚本的默认语言是 JavaScript,因此`type="application/javascript"`可以省略。 - -默认情况下,浏览器是同步加载 JavaScript 脚本,即渲染引擎遇到`<script>`标签就会停下来,等到执行完脚本,再继续向下渲染。如果是外部脚本,还必须加入脚本下载的时间。 - -如果脚本体积很大,下载和执行的时间就会很长,因此成浏览器堵塞,用户会感觉到浏览器“卡死”了,没有任何响应。这显然是很不好的体验,所以浏览器允许脚本异步加载,下面就是两种异步加载的语法。 - -```html -<script src="path/to/myModule.js" defer></script> -<script src="path/to/myModule.js" async></script> -``` - -上面代码中,`<script>`标签打开`defer`或`async`属性,脚本就会异步加载。渲染引擎遇到这一行命令,就会开始下载外部脚本,但不会等它下载和执行,而是直接执行后面的命令。 - -`defer`与`async`的区别是:前者要等到整个页面正常渲染结束,才会执行;后者一旦下载完,渲染引擎就会中断渲染,执行这个脚本以后,再继续渲染。一句话,`defer`是“渲染完再执行”,`async`是“下载完就执行”。另外,如果有多个`defer`脚本,会按照它们在页面出现的顺序加载,而多个`async`脚本是不能保证加载顺序的。 - -### 加载规则 - -浏览器加载 ES6 模块,也使用`<script>`标签,但是要加入`type="module"`属性。 - -```html -<script type="module" src="foo.js"></script> -``` - -上面代码在网页中插入一个模块`foo.js`,由于`type`属性设为`module`,所以浏览器知道这是一个 ES6 模块。 - -浏览器对于带有`type="module"`的`<script>`,都是异步加载,不会造成堵塞浏览器,即等到整个页面渲染完,再执行模块脚本,等同于打开了`<script>`标签的`defer`属性。 - -```html -<script type="module" src="foo.js"></script> -<!-- 等同于 --> -<script type="module" src="foo.js" defer></script> -``` - -`<script>`标签的`async`属性也可以打开,这时只要加载完成,渲染引擎就会中断渲染立即执行。执行完成后,再恢复渲染。 - -```html -<script type="module" src="foo.js" async></script> -``` - -ES6 模块也允许内嵌在网页中,语法行为与加载外部脚本完全一致。 - -```html -<script type="module"> - import utils from "./utils.js"; - - // other code -</script> -``` - -对于外部的模块脚本(上例是`foo.js`),有几点需要注意。 - -- 代码是在模块作用域之中运行,而不是在全局作用域运行。模块内部的顶层变量,外部不可见。 -- 模块脚本自动采用严格模式,不管有没有声明`use strict`。 -- 模块之中,可以使用`import`命令加载其他模块(`.js`后缀不可省略,需要提供绝对 URL 或相对 URL),也可以使用`export`命令输出对外接口。 -- 模块之中,顶层的`this`关键字返回`undefined`,而不是指向`window`。也就是说,在模块顶层使用`this`关键字,是无意义的。 -- 同一个模块如果加载多次,将只执行一次。 - -下面是一个示例模块。 - -```javascript -import utils from 'https://example.com/js/utils.js'; - -const x = 1; - -console.log(x === window.x); //false -console.log(this === undefined); // true - -delete x; // 句法错误,严格模式禁止删除变量 -``` - -利用顶层的`this`等于`undefined`这个语法点,可以侦测当前代码是否在 ES6 模块之中。 - -```javascript -const isNotModuleScript = this !== undefined; -``` - -## ES6 模块与 CommonJS 模块的差异 - -讨论 Node 加载 ES6 模块之前,必须了解 ES6 模块与 CommonJS 模块完全不同。 - -它们有两个重大差异。 - -- CommonJS 模块输出的是一个值的拷贝,ES6 模块输出的是值的引用。 -- CommonJS 模块是运行时加载,ES6 模块是编译时输出接口。 - -第二个差异是因为 CommonJS 加载的是一个对象(即`module.exports`属性),该对象只有在脚本运行完才会生成。而 ES6 模块不是对象,它的对外接口只是一种静态定义,在代码静态解析阶段就会生成。 - -下面重点解释第一个差异。 - -CommonJS 模块输出的是值的拷贝,也就是说,一旦输出一个值,模块内部的变化就影响不到这个值。请看下面这个模块文件`lib.js`的例子。 - -```javascript -// lib.js -var counter = 3; -function incCounter() { - counter++; -} -module.exports = { - counter: counter, - incCounter: incCounter, -}; -``` - -上面代码输出内部变量`counter`和改写这个变量的内部方法`incCounter`。然后,在`main.js`里面加载这个模块。 - -```javascript -// main.js -var mod = require('./lib'); - -console.log(mod.counter); // 3 -mod.incCounter(); -console.log(mod.counter); // 3 -``` - -上面代码说明,`lib.js`模块加载以后,它的内部变化就影响不到输出的`mod.counter`了。这是因为`mod.counter`是一个原始类型的值,会被缓存。除非写成一个函数,才能得到内部变动后的值。 - -```javascript -// lib.js -var counter = 3; -function incCounter() { - counter++; -} -module.exports = { - get counter() { - return counter - }, - incCounter: incCounter, -}; -``` - -上面代码中,输出的`counter`属性实际上是一个取值器函数。现在再执行`main.js`,就可以正确读取内部变量`counter`的变动了。 - -```bash -$ node main.js -3 -4 -``` - -ES6 模块的运行机制与 CommonJS 不一样。JS 引擎对脚本静态分析的时候,遇到模块加载命令`import`,就会生成一个只读引用。等到脚本真正执行时,再根据这个只读引用,到被加载的那个模块里面去取值。换句话说,ES6 的`import`有点像 Unix 系统的“符号连接”,原始值变了,`import`加载的值也会跟着变。因此,ES6 模块是动态引用,并且不会缓存值,模块里面的变量绑定其所在的模块。 - -还是举上面的例子。 - -```javascript -// lib.js -export let counter = 3; -export function incCounter() { - counter++; -} - -// main.js -import { counter, incCounter } from './lib'; -console.log(counter); // 3 -incCounter(); -console.log(counter); // 4 -``` - -上面代码说明,ES6 模块输入的变量`counter`是活的,完全反应其所在模块`lib.js`内部的变化。 - -再举一个出现在`export`一节中的例子。 - -```javascript -// m1.js -export var foo = 'bar'; -setTimeout(() => foo = 'baz', 500); - -// m2.js -import {foo} from './m1.js'; -console.log(foo); -setTimeout(() => console.log(foo), 500); -``` - -上面代码中,`m1.js`的变量`foo`,在刚加载时等于`bar`,过了500毫秒,又变为等于`baz`。 - -让我们看看,`m2.js`能否正确读取这个变化。 - -```bash -$ babel-node m2.js - -bar -baz -``` - -上面代码表明,ES6 模块不会缓存运行结果,而是动态地去被加载的模块取值,并且变量总是绑定其所在的模块。 - -由于 ES6 输入的模块变量,只是一个“符号连接”,所以这个变量是只读的,对它进行重新赋值会报错。 - -```javascript -// lib.js -export let obj = {}; - -// main.js -import { obj } from './lib'; - -obj.prop = 123; // OK -obj = {}; // TypeError -``` - -上面代码中,`main.js`从`lib.js`输入变量`obj`,可以对`obj`添加属性,但是重新赋值就会报错。因为变量`obj`指向的地址是只读的,不能重新赋值,这就好比`main.js`创造了一个名为`obj`的`const`变量。 - -最后,`export`通过接口,输出的是同一个值。不同的脚本加载这个接口,得到的都是同样的实例。 - -```javascript -// mod.js -function C() { - this.sum = 0; - this.add = function () { - this.sum += 1; - }; - this.show = function () { - console.log(this.sum); - }; -} - -export let c = new C(); -``` - -上面的脚本`mod.js`,输出的是一个`C`的实例。不同的脚本加载这个模块,得到的都是同一个实例。 - -```javascript -// x.js -import {c} from './mod'; -c.add(); - -// y.js -import {c} from './mod'; -c.show(); - -// main.js -import './x'; -import './y'; -``` - -现在执行`main.js`,输出的是`1`。 - -```bash -$ babel-node main.js -1 -``` - -这就证明了`x.js`和`y.js`加载的都是`C`的同一个实例。 - -## Node 加载 - -### 概述 - -Node 对 ES6 模块的处理比较麻烦,因为它有自己的 CommonJS 模块格式,与 ES6 模块格式是不兼容的。目前的解决方案是,将两者分开,ES6 模块和 CommonJS 采用各自的加载方案。 - -在静态分析阶段,一个模块脚本只要有一行`import`或`export`语句,Node 就会认为该脚本为 ES6 模块,否则就为 CommonJS 模块。如果不输出任何接口,但是希望被 Node 认为是 ES6 模块,可以在脚本中加一行语句。 - -```javascript -export {}; -``` - -上面的命令并不是输出一个空对象,而是不输出任何接口的 ES6 标准写法。 - -如何不指定绝对路径,Node 加载 ES6 模块会依次寻找以下脚本,与`require()`的规则一致。 - -```javascript -import './foo'; -// 依次寻找 -// ./foo.js -// ./foo/package.json -// ./foo/index.js - -import 'baz'; -// 依次寻找 -// ./node_modules/baz.js -// ./node_modules/baz/package.json -// ./node_modules/baz/index.js -// 寻找上一级目录 -// ../node_modules/baz.js -// ../node_modules/baz/package.json -// ../node_modules/baz/index.js -// 再上一级目录 -``` - -ES6 模块之中,顶层的`this`指向`undefined`;CommonJS 模块的顶层`this`指向当前模块,这是两者的一个重大差异。 - -### import 命令加载 CommonJS 模块 - -Node 采用 CommonJS 模块格式,模块的输出都定义在`module.exports`这个属性上面。在 Node 环境中,使用`import`命令加载 CommonJS 模块,Node 会自动将`module.exports`属性,当作模块的默认输出,即等同于`export default`。 - -下面是一个 CommonJS 模块。 - -```javascript -// a.js -module.exports = { - foo: 'hello', - bar: 'world' -}; - -// 等同于 -export default { - foo: 'hello', - bar: 'world' -}; -``` - -`import`命令加载上面的模块,`module.exports`会被视为默认输出。 - -```javascript -// 写法一 -import baz from './a'; -// baz = {foo: 'hello', bar: 'world'}; - -// 写法二 -import {default as baz} from './a'; -// baz = {foo: 'hello', bar: 'world'}; -``` - -如果采用整体输入的写法(`import * as xxx from someModule`),`default`会取代`module.exports`,作为输入的接口。 - -```javascript -import * as baz from './a'; -// baz = { -// get default() {return module.exports;}, -// get foo() {return this.default.foo}.bind(baz), -// get bar() {return this.default.bar}.bind(baz) -// } -``` - -上面代码中,`this.default`取代了`module.exports`。需要注意的是,Node 会自动为`baz`添加`default`属性,通过`baz.default`拿到`module.exports`。 - -```javascript -// b.js -module.exports = null; - -// es.js -import foo from './b'; -// foo = null; - -import * as bar from './b'; -// bar = {default:null}; -``` - -上面代码中,`es.js`采用第二种写法时,要通过`bar.default`这样的写法,才能拿到`module.exports`。 - -下面是另一个例子。 - -```javascript -// c.js -module.exports = function two() { - return 2; -}; - -// es.js -import foo from './c'; -foo(); // 2 - -import * as bar from './c'; -bar.default(); // 2 -bar(); // throws, bar is not a function -``` - -上面代码中,`bar`本身是一个对象,不能当作函数调用,只能通过`bar.default`调用。 - -CommonJS 模块的输出缓存机制,在 ES6 加载方式下依然有效。 - -```javascript -// foo.js -module.exports = 123; -setTimeout(_ => module.exports = null); -``` - -上面代码中,对于加载`foo.js`的脚本,`module.exports`将一直是`123`,而不会变成`null`。 - -由于 ES6 模块是编译时确定输出接口,CommonJS 模块是运行时确定输出接口,所以采用`import`命令加载 CommonJS 模块时,不允许采用下面的写法。 - -```javascript -import {readfile} from 'fs'; -``` - -上面的写法不正确,因为`fs`是 CommonJS 格式,只有在运行时才能确定`readfile`接口,而`import`命令要求编译时就确定这个接口。解决方法就是改为整体输入。 - -```javascript -import * as express from 'express'; -const app = express.default(); - -import express from 'express'; -const app = express(); -``` - -### require 命令加载 ES6 模块 - -采用`require`命令加载 ES6 模块时,ES6 模块的所有输出接口,会成为输入对象的属性。 - -```javascript -// es.js -let foo = {bar:'my-default'}; -export default foo; -foo = null; - -// cjs.js -const es_namespace = require('./es'); -console.log(es_namespace.default); -// {bar:'my-default'} -``` - -上面代码中,`default`接口变成了`es_namespace.default`属性。另外,由于存在缓存机制,`es.js`对`foo`的重新赋值没有在模块外部反映出来。 - -下面是另一个例子。 - -```javascript -// es.js -export let foo = {bar:'my-default'}; -export {foo as bar}; -export function f() {}; -export class c {}; - -// cjs.js -const es_namespace = require('./es'); -// es_namespace = { -// get foo() {return foo;} -// get bar() {return foo;} -// get f() {return f;} -// get c() {return c;} -// } -``` - -## 循环加载 - -“循环加载”(circular dependency)指的是,`a`脚本的执行依赖`b`脚本,而`b`脚本的执行又依赖`a`脚本。 - -```javascript -// a.js -var b = require('b'); - -// b.js -var a = require('a'); -``` - -通常,“循环加载”表示存在强耦合,如果处理不好,还可能导致递归加载,使得程序无法执行,因此应该避免出现。 - -但是实际上,这是很难避免的,尤其是依赖关系复杂的大项目,很容易出现`a`依赖`b`,`b`依赖`c`,`c`又依赖`a`这样的情况。这意味着,模块加载机制必须考虑“循环加载”的情况。 - -对于JavaScript语言来说,目前最常见的两种模块格式CommonJS和ES6,处理“循环加载”的方法是不一样的,返回的结果也不一样。 - -### CommonJS模块的加载原理 - -介绍ES6如何处理"循环加载"之前,先介绍目前最流行的CommonJS模块格式的加载原理。 - -CommonJS的一个模块,就是一个脚本文件。`require`命令第一次加载该脚本,就会执行整个脚本,然后在内存生成一个对象。 - -```javascript -{ - id: '...', - exports: { ... }, - loaded: true, - ... -} -``` - -上面代码就是Node内部加载模块后生成的一个对象。该对象的`id`属性是模块名,`exports`属性是模块输出的各个接口,`loaded`属性是一个布尔值,表示该模块的脚本是否执行完毕。其他还有很多属性,这里都省略了。 - -以后需要用到这个模块的时候,就会到`exports`属性上面取值。即使再次执行`require`命令,也不会再次执行该模块,而是到缓存之中取值。也就是说,CommonJS模块无论加载多少次,都只会在第一次加载时运行一次,以后再加载,就返回第一次运行的结果,除非手动清除系统缓存。 - -### CommonJS模块的循环加载 - -CommonJS模块的重要特性是加载时执行,即脚本代码在`require`的时候,就会全部执行。一旦出现某个模块被"循环加载",就只输出已经执行的部分,还未执行的部分不会输出。 - -让我们来看,Node[官方文档](https://nodejs.org/api/modules.html#modules_cycles)里面的例子。脚本文件`a.js`代码如下。 - -```javascript -exports.done = false; -var b = require('./b.js'); -console.log('在 a.js 之中,b.done = %j', b.done); -exports.done = true; -console.log('a.js 执行完毕'); -``` - -上面代码之中,`a.js`脚本先输出一个`done`变量,然后加载另一个脚本文件`b.js`。注意,此时`a.js`代码就停在这里,等待`b.js`执行完毕,再往下执行。 - -再看`b.js`的代码。 - -```javascript -exports.done = false; -var a = require('./a.js'); -console.log('在 b.js 之中,a.done = %j', a.done); -exports.done = true; -console.log('b.js 执行完毕'); -``` - -上面代码之中,`b.js`执行到第二行,就会去加载`a.js`,这时,就发生了“循环加载”。系统会去`a.js`模块对应对象的`exports`属性取值,可是因为`a.js`还没有执行完,从`exports`属性只能取回已经执行的部分,而不是最后的值。 - -`a.js`已经执行的部分,只有一行。 - -```javascript -exports.done = false; -``` - -因此,对于`b.js`来说,它从`a.js`只输入一个变量`done`,值为`false`。 - -然后,`b.js`接着往下执行,等到全部执行完毕,再把执行权交还给`a.js`。于是,`a.js`接着往下执行,直到执行完毕。我们写一个脚本`main.js`,验证这个过程。 - -```javascript -var a = require('./a.js'); -var b = require('./b.js'); -console.log('在 main.js 之中, a.done=%j, b.done=%j', a.done, b.done); -``` - -执行`main.js`,运行结果如下。 - -```bash -$ node main.js - -在 b.js 之中,a.done = false -b.js 执行完毕 -在 a.js 之中,b.done = true -a.js 执行完毕 -在 main.js 之中, a.done=true, b.done=true -``` - -上面的代码证明了两件事。一是,在`b.js`之中,`a.js`没有执行完毕,只执行了第一行。二是,`main.js`执行到第二行时,不会再次执行`b.js`,而是输出缓存的`b.js`的执行结果,即它的第四行。 - -```javascript -exports.done = true; -``` - -总之,CommonJS输入的是被输出值的拷贝,不是引用。 - -另外,由于CommonJS模块遇到循环加载时,返回的是当前已经执行的部分的值,而不是代码全部执行后的值,两者可能会有差异。所以,输入变量的时候,必须非常小心。 - -```javascript -var a = require('a'); // 安全的写法 -var foo = require('a').foo; // 危险的写法 - -exports.good = function (arg) { - return a.foo('good', arg); // 使用的是 a.foo 的最新值 -}; - -exports.bad = function (arg) { - return foo('bad', arg); // 使用的是一个部分加载时的值 -}; -``` - -上面代码中,如果发生循环加载,`require('a').foo`的值很可能后面会被改写,改用`require('a')`会更保险一点。 - -### ES6模块的循环加载 - -ES6处理“循环加载”与CommonJS有本质的不同。ES6模块是动态引用,如果使用`import`从一个模块加载变量(即`import foo from 'foo'`),那些变量不会被缓存,而是成为一个指向被加载模块的引用,需要开发者自己保证,真正取值的时候能够取到值。 - -请看下面这个例子。 - -```javascript -// a.js如下 -import {bar} from './b.js'; -console.log('a.js'); -console.log(bar); -export let foo = 'foo'; - -// b.js -import {foo} from './a.js'; -console.log('b.js'); -console.log(foo); -export let bar = 'bar'; -``` - -上面代码中,`a.js`加载`b.js`,`b.js`又加载`a.js`,构成循环加载。执行`a.js`,结果如下。 - -```bash -$ babel-node a.js -b.js -undefined -a.js -bar -``` - -上面代码中,由于`a.js`的第一行是加载`b.js`,所以先执行的是`b.js`。而`b.js`的第一行又是加载`a.js`,这时由于`a.js`已经开始执行了,所以不会重复执行,而是继续往下执行`b.js`,所以第一行输出的是`b.js`。 - -接着,`b.js`要打印变量`foo`,这时`a.js`还没执行完,取不到`foo`的值,导致打印出来是`undefined`。`b.js`执行完,开始执行`a.js`,这时就一切正常了。 - -再看一个稍微复杂的例子(摘自 Dr. Axel Rauschmayer 的[《Exploring ES6》](http://exploringjs.com/es6/ch_modules.html))。 - -```javascript -// a.js -import {bar} from './b.js'; -export function foo() { - console.log('foo'); - bar(); - console.log('执行完毕'); -} -foo(); - -// b.js -import {foo} from './a.js'; -export function bar() { - console.log('bar'); - if (Math.random() > 0.5) { - foo(); - } -} -``` - -按照CommonJS规范,上面的代码是没法执行的。`a`先加载`b`,然后`b`又加载`a`,这时`a`还没有任何执行结果,所以输出结果为`null`,即对于`b.js`来说,变量`foo`的值等于`null`,后面的`foo()`就会报错。 - -但是,ES6可以执行上面的代码。 - -```bash -$ babel-node a.js -foo -bar -执行完毕 - -// 执行结果也有可能是 -foo -bar -foo -bar -执行完毕 -执行完毕 -``` - -上面代码中,`a.js`之所以能够执行,原因就在于ES6加载的变量,都是动态引用其所在的模块。只要引用存在,代码就能执行。 - -下面,我们详细分析这段代码的运行过程。 - -```javascript -// a.js - -// 这一行建立一个引用, -// 从`b.js`引用`bar` -import {bar} from './b.js'; - -export function foo() { - // 执行时第一行输出 foo - console.log('foo'); - // 到 b.js 执行 bar - bar(); - console.log('执行完毕'); -} -foo(); - -// b.js - -// 建立`a.js`的`foo`引用 -import {foo} from './a.js'; - -export function bar() { - // 执行时,第二行输出 bar - console.log('bar'); - // 递归执行 foo,一旦随机数 - // 小于等于0.5,就停止执行 - if (Math.random() > 0.5) { - foo(); - } -} -``` - -我们再来看ES6模块加载器[SystemJS](https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/circular-references-bindings.md)给出的一个例子。 - -```javascript -// even.js -import { odd } from './odd' -export var counter = 0; -export function even(n) { - counter++; - return n == 0 || odd(n - 1); -} - -// odd.js -import { even } from './even'; -export function odd(n) { - return n != 0 && even(n - 1); -} -``` - -上面代码中,`even.js`里面的函数`even`有一个参数`n`,只要不等于0,就会减去1,传入加载的`odd()`。`odd.js`也会做类似操作。 - -运行上面这段代码,结果如下。 - -```javascript -$ babel-node -> import * as m from './even.js'; -> m.even(10); -true -> m.counter -6 -> m.even(20) -true -> m.counter -17 -``` - -上面代码中,参数`n`从10变为0的过程中,`even()`一共会执行6次,所以变量`counter`等于6。第二次调用`even()`时,参数`n`从20变为0,`even()`一共会执行11次,加上前面的6次,所以变量`counter`等于17。 - -这个例子要是改写成CommonJS,就根本无法执行,会报错。 - -```javascript -// even.js -var odd = require('./odd'); -var counter = 0; -exports.counter = counter; -exports.even = function(n) { - counter++; - return n == 0 || odd(n - 1); -} - -// odd.js -var even = require('./even').even; -module.exports = function(n) { - return n != 0 && even(n - 1); -} -``` - -上面代码中,`even.js`加载`odd.js`,而`odd.js`又去加载`even.js`,形成“循环加载”。这时,执行引擎就会输出`even.js`已经执行的部分(不存在任何结果),所以在`odd.js`之中,变量`even`等于`null`,等到后面调用`even(n-1)`就会报错。 - -```bash -$ node -> var m = require('./even'); -> m.even(10) -TypeError: even is not a function -``` - -## ES6模块的转码 - -浏览器目前还不支持ES6模块,为了现在就能使用,可以将转为ES5的写法。除了Babel可以用来转码之外,还有以下两个方法,也可以用来转码。 - -### ES6 module transpiler - -[ES6 module transpiler](https://github.com/esnext/es6-module-transpiler)是 square 公司开源的一个转码器,可以将 ES6 模块转为 CommonJS 模块或 AMD 模块的写法,从而在浏览器中使用。 - -首先,安装这个转码器。 - -```bash -$ npm install -g es6-module-transpiler -``` - -然后,使用`compile-modules convert`命令,将 ES6 模块文件转码。 - -```bash -$ compile-modules convert file1.js file2.js -``` - -`-o`参数可以指定转码后的文件名。 - -```bash -$ compile-modules convert -o out.js file1.js -``` - -### SystemJS - -另一种解决方法是使用 [SystemJS](https://github.com/systemjs/systemjs)。它是一个垫片库(polyfill),可以在浏览器内加载 ES6 模块、AMD 模块和 CommonJS 模块,将其转为 ES5 格式。它在后台调用的是 Google 的 Traceur 转码器。 - -使用时,先在网页内载入`system.js`文件。 - -```html -<script src="system.js"></script> -``` - -然后,使用`System.import`方法加载模块文件。 - -```html -<script> - System.import('./app.js'); -</script> -``` - -上面代码中的`./app`,指的是当前目录下的app.js文件。它可以是ES6模块文件,`System.import`会自动将其转码。 - -需要注意的是,`System.import`使用异步加载,返回一个 Promise 对象,可以针对这个对象编程。下面是一个模块文件。 - -```javascript -// app/es6-file.js: - -export class q { - constructor() { - this.es6 = 'hello'; - } -} -``` - -然后,在网页内加载这个模块文件。 - -```html -<script> - -System.import('app/es6-file').then(function(m) { - console.log(new m.q().es6); // hello -}); - -</script> -``` - -上面代码中,`System.import`方法返回的是一个 Promise 对象,所以可以用`then`方法指定回调函数。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/number.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/number.md" deleted file mode 100644 index ea152a1b6..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/number.md" +++ /dev/null @@ -1,680 +0,0 @@ -# 数值的扩展 - -## 二进制和八进制表示法 - -ES6 提供了二进制和八进制数值的新的写法,分别用前缀`0b`(或`0B`)和`0o`(或`0O`)表示。 - -```javascript -0b111110111 === 503 // true -0o767 === 503 // true -``` - -从 ES5 开始,在严格模式之中,八进制就不再允许使用前缀`0`表示,ES6 进一步明确,要使用前缀`0o`表示。 - -```javascript -// 非严格模式 -(function(){ - console.log(0o11 === 011); -})() // true - -// 严格模式 -(function(){ - 'use strict'; - console.log(0o11 === 011); -})() // Uncaught SyntaxError: Octal literals are not allowed in strict mode. -``` - -如果要将`0b`和`0o`前缀的字符串数值转为十进制,要使用`Number`方法。 - -```javascript -Number('0b111') // 7 -Number('0o10') // 8 -``` - -## Number.isFinite(), Number.isNaN() - -ES6在Number对象上,新提供了`Number.isFinite()`和`Number.isNaN()`两个方法。 - -`Number.isFinite()`用来检查一个数值是否为有限的(finite)。 - -```javascript -Number.isFinite(15); // true -Number.isFinite(0.8); // true -Number.isFinite(NaN); // false -Number.isFinite(Infinity); // false -Number.isFinite(-Infinity); // false -Number.isFinite('foo'); // false -Number.isFinite('15'); // false -Number.isFinite(true); // false -``` - -ES5可以通过下面的代码,部署`Number.isFinite`方法。 - -```javascript -(function (global) { - var global_isFinite = global.isFinite; - - Object.defineProperty(Number, 'isFinite', { - value: function isFinite(value) { - return typeof value === 'number' && global_isFinite(value); - }, - configurable: true, - enumerable: false, - writable: true - }); -})(this); -``` - -`Number.isNaN()`用来检查一个值是否为`NaN`。 - -```javascript -Number.isNaN(NaN) // true -Number.isNaN(15) // false -Number.isNaN('15') // false -Number.isNaN(true) // false -Number.isNaN(9/NaN) // true -Number.isNaN('true'/0) // true -Number.isNaN('true'/'true') // true -``` - -ES5通过下面的代码,部署`Number.isNaN()`。 - -```javascript -(function (global) { - var global_isNaN = global.isNaN; - - Object.defineProperty(Number, 'isNaN', { - value: function isNaN(value) { - return typeof value === 'number' && global_isNaN(value); - }, - configurable: true, - enumerable: false, - writable: true - }); -})(this); -``` - -它们与传统的全局方法`isFinite()`和`isNaN()`的区别在于,传统方法先调用`Number()`将非数值的值转为数值,再进行判断,而这两个新方法只对数值有效,非数值一律返回`false`。 - -```javascript -isFinite(25) // true -isFinite("25") // true -Number.isFinite(25) // true -Number.isFinite("25") // false - -isNaN(NaN) // true -isNaN("NaN") // true -Number.isNaN(NaN) // true -Number.isNaN("NaN") // false -``` - -## Number.parseInt(), Number.parseFloat() - -ES6将全局方法`parseInt()`和`parseFloat()`,移植到Number对象上面,行为完全保持不变。 - -```javascript -// ES5的写法 -parseInt('12.34') // 12 -parseFloat('123.45#') // 123.45 - -// ES6的写法 -Number.parseInt('12.34') // 12 -Number.parseFloat('123.45#') // 123.45 -``` - -这样做的目的,是逐步减少全局性方法,使得语言逐步模块化。 - -```javascript -Number.parseInt === parseInt // true -Number.parseFloat === parseFloat // true -``` - -## Number.isInteger() - -`Number.isInteger()`用来判断一个值是否为整数。需要注意的是,在JavaScript内部,整数和浮点数是同样的储存方法,所以3和3.0被视为同一个值。 - -```javascript -Number.isInteger(25) // true -Number.isInteger(25.0) // true -Number.isInteger(25.1) // false -Number.isInteger("15") // false -Number.isInteger(true) // false -``` - -ES5可以通过下面的代码,部署`Number.isInteger()`。 - -```javascript -(function (global) { - var floor = Math.floor, - isFinite = global.isFinite; - - Object.defineProperty(Number, 'isInteger', { - value: function isInteger(value) { - return typeof value === 'number' && isFinite(value) && - value > -9007199254740992 && value < 9007199254740992 && - floor(value) === value; - }, - configurable: true, - enumerable: false, - writable: true - }); -})(this); -``` - -## Number.EPSILON - -ES6在Number对象上面,新增一个极小的常量`Number.EPSILON`。 - -```javascript -Number.EPSILON -// 2.220446049250313e-16 -Number.EPSILON.toFixed(20) -// '0.00000000000000022204' -``` - -引入一个这么小的量的目的,在于为浮点数计算,设置一个误差范围。我们知道浮点数计算是不精确的。 - -```javascript -0.1 + 0.2 -// 0.30000000000000004 - -0.1 + 0.2 - 0.3 -// 5.551115123125783e-17 - -5.551115123125783e-17.toFixed(20) -// '0.00000000000000005551' -``` - -但是如果这个误差能够小于`Number.EPSILON`,我们就可以认为得到了正确结果。 - -```javascript -5.551115123125783e-17 < Number.EPSILON -// true -``` - -因此,`Number.EPSILON`的实质是一个可以接受的误差范围。 - -```javascript -function withinErrorMargin (left, right) { - return Math.abs(left - right) < Number.EPSILON; -} -withinErrorMargin(0.1 + 0.2, 0.3) -// true -withinErrorMargin(0.2 + 0.2, 0.3) -// false -``` - -上面的代码为浮点数运算,部署了一个误差检查函数。 - -## 安全整数和Number.isSafeInteger() - -JavaScript能够准确表示的整数范围在`-2^53`到`2^53`之间(不含两个端点),超过这个范围,无法精确表示这个值。 - -```javascript -Math.pow(2, 53) // 9007199254740992 - -9007199254740992 // 9007199254740992 -9007199254740993 // 9007199254740992 - -Math.pow(2, 53) === Math.pow(2, 53) + 1 -// true -``` - -上面代码中,超出2的53次方之后,一个数就不精确了。 - -ES6引入了`Number.MAX_SAFE_INTEGER`和`Number.MIN_SAFE_INTEGER`这两个常量,用来表示这个范围的上下限。 - -```javascript -Number.MAX_SAFE_INTEGER === Math.pow(2, 53) - 1 -// true -Number.MAX_SAFE_INTEGER === 9007199254740991 -// true - -Number.MIN_SAFE_INTEGER === -Number.MAX_SAFE_INTEGER -// true -Number.MIN_SAFE_INTEGER === -9007199254740991 -// true -``` - -上面代码中,可以看到JavaScript能够精确表示的极限。 - -`Number.isSafeInteger()`则是用来判断一个整数是否落在这个范围之内。 - -```javascript -Number.isSafeInteger('a') // false -Number.isSafeInteger(null) // false -Number.isSafeInteger(NaN) // false -Number.isSafeInteger(Infinity) // false -Number.isSafeInteger(-Infinity) // false - -Number.isSafeInteger(3) // true -Number.isSafeInteger(1.2) // false -Number.isSafeInteger(9007199254740990) // true -Number.isSafeInteger(9007199254740992) // false - -Number.isSafeInteger(Number.MIN_SAFE_INTEGER - 1) // false -Number.isSafeInteger(Number.MIN_SAFE_INTEGER) // true -Number.isSafeInteger(Number.MAX_SAFE_INTEGER) // true -Number.isSafeInteger(Number.MAX_SAFE_INTEGER + 1) // false -``` - -这个函数的实现很简单,就是跟安全整数的两个边界值比较一下。 - -```javascript -Number.isSafeInteger = function (n) { - return (typeof n === 'number' && - Math.round(n) === n && - Number.MIN_SAFE_INTEGER <= n && - n <= Number.MAX_SAFE_INTEGER); -} -``` - -实际使用这个函数时,需要注意。验证运算结果是否落在安全整数的范围内,不要只验证运算结果,而要同时验证参与运算的每个值。 - -```javascript -Number.isSafeInteger(9007199254740993) -// false -Number.isSafeInteger(990) -// true -Number.isSafeInteger(9007199254740993 - 990) -// true -9007199254740993 - 990 -// 返回结果 9007199254740002 -// 正确答案应该是 9007199254740003 -``` - -上面代码中,`9007199254740993`不是一个安全整数,但是`Number.isSafeInteger`会返回结果,显示计算结果是安全的。这是因为,这个数超出了精度范围,导致在计算机内部,以`9007199254740992`的形式储存。 - -```javascript -9007199254740993 === 9007199254740992 -// true -``` - -所以,如果只验证运算结果是否为安全整数,很可能得到错误结果。下面的函数可以同时验证两个运算数和运算结果。 - -```javascript -function trusty (left, right, result) { - if ( - Number.isSafeInteger(left) && - Number.isSafeInteger(right) && - Number.isSafeInteger(result) - ) { - return result; - } - throw new RangeError('Operation cannot be trusted!'); -} - -trusty(9007199254740993, 990, 9007199254740993 - 990) -// RangeError: Operation cannot be trusted! - -trusty(1, 2, 3) -// 3 -``` - -## Math对象的扩展 - -ES6在Math对象上新增了17个与数学相关的方法。所有这些方法都是静态方法,只能在Math对象上调用。 - -### Math.trunc() - -`Math.trunc`方法用于去除一个数的小数部分,返回整数部分。 - -```javascript -Math.trunc(4.1) // 4 -Math.trunc(4.9) // 4 -Math.trunc(-4.1) // -4 -Math.trunc(-4.9) // -4 -Math.trunc(-0.1234) // -0 -``` - -对于非数值,`Math.trunc`内部使用`Number`方法将其先转为数值。 - -```javascript -Math.trunc('123.456') -// 123 -``` - -对于空值和无法截取整数的值,返回NaN。 - -```javascript -Math.trunc(NaN); // NaN -Math.trunc('foo'); // NaN -Math.trunc(); // NaN -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.trunc = Math.trunc || function(x) { - return x < 0 ? Math.ceil(x) : Math.floor(x); -}; -``` - -### Math.sign() - -`Math.sign`方法用来判断一个数到底是正数、负数、还是零。 - -它会返回五种值。 - -- 参数为正数,返回+1; -- 参数为负数,返回-1; -- 参数为0,返回0; -- 参数为-0,返回-0; -- 其他值,返回NaN。 - -```javascript -Math.sign(-5) // -1 -Math.sign(5) // +1 -Math.sign(0) // +0 -Math.sign(-0) // -0 -Math.sign(NaN) // NaN -Math.sign('foo'); // NaN -Math.sign(); // NaN -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.sign = Math.sign || function(x) { - x = +x; // convert to a number - if (x === 0 || isNaN(x)) { - return x; - } - return x > 0 ? 1 : -1; -}; -``` - -### Math.cbrt() - -`Math.cbrt`方法用于计算一个数的立方根。 - -```javascript -Math.cbrt(-1) // -1 -Math.cbrt(0) // 0 -Math.cbrt(1) // 1 -Math.cbrt(2) // 1.2599210498948734 -``` - -对于非数值,`Math.cbrt`方法内部也是先使用`Number`方法将其转为数值。 - -```javascript -Math.cbrt('8') // 2 -Math.cbrt('hello') // NaN -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.cbrt = Math.cbrt || function(x) { - var y = Math.pow(Math.abs(x), 1/3); - return x < 0 ? -y : y; -}; -``` - -### Math.clz32() - -JavaScript的整数使用32位二进制形式表示,`Math.clz32`方法返回一个数的32位无符号整数形式有多少个前导0。 - -```javascript -Math.clz32(0) // 32 -Math.clz32(1) // 31 -Math.clz32(1000) // 22 -Math.clz32(0b01000000000000000000000000000000) // 1 -Math.clz32(0b00100000000000000000000000000000) // 2 -``` - -上面代码中,0的二进制形式全为0,所以有32个前导0;1的二进制形式是`0b1`,只占1位,所以32位之中有31个前导0;1000的二进制形式是`0b1111101000`,一共有10位,所以32位之中有22个前导0。 - -`clz32`这个函数名就来自”count leading zero bits in 32-bit binary representations of a number“(计算32位整数的前导0)的缩写。 - -左移运算符(`<<`)与`Math.clz32`方法直接相关。 - -```javascript -Math.clz32(0) // 32 -Math.clz32(1) // 31 -Math.clz32(1 << 1) // 30 -Math.clz32(1 << 2) // 29 -Math.clz32(1 << 29) // 2 -``` - -对于小数,`Math.clz32`方法只考虑整数部分。 - -```javascript -Math.clz32(3.2) // 30 -Math.clz32(3.9) // 30 -``` - -对于空值或其他类型的值,`Math.clz32`方法会将它们先转为数值,然后再计算。 - -```javascript -Math.clz32() // 32 -Math.clz32(NaN) // 32 -Math.clz32(Infinity) // 32 -Math.clz32(null) // 32 -Math.clz32('foo') // 32 -Math.clz32([]) // 32 -Math.clz32({}) // 32 -Math.clz32(true) // 31 -``` - -### Math.imul() - -`Math.imul`方法返回两个数以32位带符号整数形式相乘的结果,返回的也是一个32位的带符号整数。 - -```javascript -Math.imul(2, 4) // 8 -Math.imul(-1, 8) // -8 -Math.imul(-2, -2) // 4 -``` - -如果只考虑最后32位,大多数情况下,`Math.imul(a, b)`与`a * b`的结果是相同的,即该方法等同于`(a * b)|0`的效果(超过32位的部分溢出)。之所以需要部署这个方法,是因为JavaScript有精度限制,超过2的53次方的值无法精确表示。这就是说,对于那些很大的数的乘法,低位数值往往都是不精确的,`Math.imul`方法可以返回正确的低位数值。 - -```javascript -(0x7fffffff * 0x7fffffff)|0 // 0 -``` - -上面这个乘法算式,返回结果为0。但是由于这两个二进制数的最低位都是1,所以这个结果肯定是不正确的,因为根据二进制乘法,计算结果的二进制最低位应该也是1。这个错误就是因为它们的乘积超过了2的53次方,JavaScript无法保存额外的精度,就把低位的值都变成了0。`Math.imul`方法可以返回正确的值1。 - -```javascript -Math.imul(0x7fffffff, 0x7fffffff) // 1 -``` - -### Math.fround() - -Math.fround方法返回一个数的单精度浮点数形式。 - -```javascript -Math.fround(0) // 0 -Math.fround(1) // 1 -Math.fround(1.337) // 1.3370000123977661 -Math.fround(1.5) // 1.5 -Math.fround(NaN) // NaN -``` - -对于整数来说,`Math.fround`方法返回结果不会有任何不同,区别主要是那些无法用64个二进制位精确表示的小数。这时,`Math.fround`方法会返回最接近这个小数的单精度浮点数。 - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.fround = Math.fround || function(x) { - return new Float32Array([x])[0]; -}; -``` - -### Math.hypot() - -`Math.hypot`方法返回所有参数的平方和的平方根。 - -```javascript -Math.hypot(3, 4); // 5 -Math.hypot(3, 4, 5); // 7.0710678118654755 -Math.hypot(); // 0 -Math.hypot(NaN); // NaN -Math.hypot(3, 4, 'foo'); // NaN -Math.hypot(3, 4, '5'); // 7.0710678118654755 -Math.hypot(-3); // 3 -``` - -上面代码中,3的平方加上4的平方,等于5的平方。 - -如果参数不是数值,`Math.hypot`方法会将其转为数值。只要有一个参数无法转为数值,就会返回NaN。 - -### 对数方法 - -ES6新增了4个对数相关方法。 - -**(1) Math.expm1()** - -`Math.expm1(x)`返回e<sup>x</sup> - 1,即`Math.exp(x) - 1`。 - -```javascript -Math.expm1(-1) // -0.6321205588285577 -Math.expm1(0) // 0 -Math.expm1(1) // 1.718281828459045 -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.expm1 = Math.expm1 || function(x) { - return Math.exp(x) - 1; -}; -``` - -**(2)Math.log1p()** - -`Math.log1p(x)`方法返回`1 + x`的自然对数,即`Math.log(1 + x)`。如果`x`小于-1,返回`NaN`。 - -```javascript -Math.log1p(1) // 0.6931471805599453 -Math.log1p(0) // 0 -Math.log1p(-1) // -Infinity -Math.log1p(-2) // NaN -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.log1p = Math.log1p || function(x) { - return Math.log(1 + x); -}; -``` - -**(3)Math.log10()** - -`Math.log10(x)`返回以10为底的`x`的对数。如果`x`小于0,则返回NaN。 - -```javascript -Math.log10(2) // 0.3010299956639812 -Math.log10(1) // 0 -Math.log10(0) // -Infinity -Math.log10(-2) // NaN -Math.log10(100000) // 5 -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.log10 = Math.log10 || function(x) { - return Math.log(x) / Math.LN10; -}; -``` - -**(4)Math.log2()** - -`Math.log2(x)`返回以2为底的`x`的对数。如果`x`小于0,则返回NaN。 - -```javascript -Math.log2(3) // 1.584962500721156 -Math.log2(2) // 1 -Math.log2(1) // 0 -Math.log2(0) // -Infinity -Math.log2(-2) // NaN -Math.log2(1024) // 10 -Math.log2(1 << 29) // 29 -``` - -对于没有部署这个方法的环境,可以用下面的代码模拟。 - -```javascript -Math.log2 = Math.log2 || function(x) { - return Math.log(x) / Math.LN2; -}; -``` - -### 三角函数方法 - -ES6新增了6个三角函数方法。 - -- `Math.sinh(x)` 返回`x`的双曲正弦(hyperbolic sine) -- `Math.cosh(x)` 返回`x`的双曲余弦(hyperbolic cosine) -- `Math.tanh(x)` 返回`x`的双曲正切(hyperbolic tangent) -- `Math.asinh(x)` 返回`x`的反双曲正弦(inverse hyperbolic sine) -- `Math.acosh(x)` 返回`x`的反双曲余弦(inverse hyperbolic cosine) -- `Math.atanh(x)` 返回`x`的反双曲正切(inverse hyperbolic tangent) - -## Math.signbit() - -`Math.sign()`用来判断一个值的正负,但是如果参数是`-0`,它会返回`-0`。 - -```javascript -Math.sign(-0) // -0 -``` - -这导致对于判断符号位的正负,`Math.sign()`不是很有用。JavaScript 内部使用64位浮点数(国际标准IEEE 754)表示数值,IEEE 754规定第一位是符号位,`0`表示正数,`1`表示负数。所以会有两种零,`+0`是符号位为`0`时的零值,`-0`是符号位为`1`时的零值。实际编程中,判断一个值是`+0`还是`-0`非常麻烦,因为它们是相等的。 - -```javascript -+0 === -0 // true -``` - -目前,有一个[提案](http://jfbastien.github.io/papers/Math.signbit.html),引入了`Math.signbit()`方法判断一个数的符号位是否设置了。 - -```javascript -Math.signbit(2) //false -Math.signbit(-2) //true -Math.signbit(0) //false -Math.signbit(-0) //true -``` - -可以看到,该方法正确返回了`-0`的符号位是设置了的。 - -该方法的算法如下。 - -- 如果参数是`NaN`,返回`false` -- 如果参数是`-0`,返回`true` -- 如果参数是负值,返回`true` -- 其他情况返回`false` - -## 指数运算符 - -ES2016 新增了一个指数运算符(`**`)。 - -```javascript -2 ** 2 // 4 -2 ** 3 // 8 -``` - -指数运算符可以与等号结合,形成一个新的赋值运算符(`**=`)。 - -```javascript -let a = 2; -a **= 2; -// 等同于 a = a * a; - -let b = 3; -b **= 3; -// 等同于 b = b * b * b; -``` - -注意,在 V8 引擎中,指数运算符与`Math.pow`的实现不相同,对于特别大的运算结果,两者会有细微的差异。 - -```javascript -Math.pow(99, 99) -// 3.697296376497263e+197 - -99 ** 99 -// 3.697296376497268e+197 -``` - -上面代码中,两个运算结果的最后一位有效数字是有差异的。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/object.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/object.md" deleted file mode 100644 index 8ac6d75d3..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/object.md" +++ /dev/null @@ -1,1387 +0,0 @@ -# 对象的扩展 - -## 属性的简洁表示法 - -ES6允许直接写入变量和函数,作为对象的属性和方法。这样的书写更加简洁。 - -```javascript -var foo = 'bar'; -var baz = {foo}; -baz // {foo: "bar"} - -// 等同于 -var baz = {foo: foo}; -``` - -上面代码表明,ES6 允许在对象之中,直接写变量。这时,属性名为变量名, 属性值为变量的值。下面是另一个例子。 - -```javascript -function f(x, y) { - return {x, y}; -} - -// 等同于 - -function f(x, y) { - return {x: x, y: y}; -} - -f(1, 2) // Object {x: 1, y: 2} -``` - -除了属性简写,方法也可以简写。 - -```javascript -var o = { - method() { - return "Hello!"; - } -}; - -// 等同于 - -var o = { - method: function() { - return "Hello!"; - } -}; -``` - -下面是一个实际的例子。 - -```javascript -var birth = '2000/01/01'; - -var Person = { - - name: '张三', - - //等同于birth: birth - birth, - - // 等同于hello: function ()... - hello() { console.log('我的名字是', this.name); } - -}; -``` - -这种写法用于函数的返回值,将会非常方便。 - -```javascript -function getPoint() { - var x = 1; - var y = 10; - return {x, y}; -} - -getPoint() -// {x:1, y:10} -``` - -CommonJS模块输出变量,就非常合适使用简洁写法。 - -```javascript -var ms = {}; - -function getItem (key) { - return key in ms ? ms[key] : null; -} - -function setItem (key, value) { - ms[key] = value; -} - -function clear () { - ms = {}; -} - -module.exports = { getItem, setItem, clear }; -// 等同于 -module.exports = { - getItem: getItem, - setItem: setItem, - clear: clear -}; -``` - -属性的赋值器(setter)和取值器(getter),事实上也是采用这种写法。 - -```javascript -var cart = { - _wheels: 4, - - get wheels () { - return this._wheels; - }, - - set wheels (value) { - if (value < this._wheels) { - throw new Error('数值太小了!'); - } - this._wheels = value; - } -} -``` - -注意,简洁写法的属性名总是字符串,这会导致一些看上去比较奇怪的结果。 - -```javascript -var obj = { - class () {} -}; - -// 等同于 - -var obj = { - 'class': function() {} -}; -``` - -上面代码中,`class`是字符串,所以不会因为它属于关键字,而导致语法解析报错。 - -如果某个方法的值是一个Generator函数,前面需要加上星号。 - -```javascript -var obj = { - * m(){ - yield 'hello world'; - } -}; -``` - -## 属性名表达式 - -JavaScript语言定义对象的属性,有两种方法。 - -```javascript -// 方法一 -obj.foo = true; - -// 方法二 -obj['a' + 'bc'] = 123; -``` - -上面代码的方法一是直接用标识符作为属性名,方法二是用表达式作为属性名,这时要将表达式放在方括号之内。 - -但是,如果使用字面量方式定义对象(使用大括号),在 ES5 中只能使用方法一(标识符)定义属性。 - -```javascript -var obj = { - foo: true, - abc: 123 -}; -``` - -ES6 允许字面量定义对象时,用方法二(表达式)作为对象的属性名,即把表达式放在方括号内。 - -```javascript -let propKey = 'foo'; - -let obj = { - [propKey]: true, - ['a' + 'bc']: 123 -}; -``` - -下面是另一个例子。 - -```javascript -var lastWord = 'last word'; - -var a = { - 'first word': 'hello', - [lastWord]: 'world' -}; - -a['first word'] // "hello" -a[lastWord] // "world" -a['last word'] // "world" -``` - -表达式还可以用于定义方法名。 - -```javascript -let obj = { - ['h' + 'ello']() { - return 'hi'; - } -}; - -obj.hello() // hi -``` - -注意,属性名表达式与简洁表示法,不能同时使用,会报错。 - -```javascript -// 报错 -var foo = 'bar'; -var bar = 'abc'; -var baz = { [foo] }; - -// 正确 -var foo = 'bar'; -var baz = { [foo]: 'abc'}; -``` - -注意,属性名表达式如果是一个对象,默认情况下会自动将对象转为字符串`[object Object]`,这一点要特别小心。 - -```javascript -const keyA = {a: 1}; -const keyB = {b: 2}; - -const myObject = { - [keyA]: 'valueA', - [keyB]: 'valueB' -}; - -myObject // Object {[object Object]: "valueB"} -``` - -上面代码中,`[keyA]`和`[keyB]`得到的都是`[object Object]`,所以`[keyB]`会把`[keyA]`覆盖掉,而`myObject`最后只有一个`[object Object]`属性。 - -## 方法的 name 属性 - -函数的`name`属性,返回函数名。对象方法也是函数,因此也有`name`属性。 - -```javascript -const person = { - sayName() { -    console.log('hello!'); - }, -}; - -person.sayName.name // "sayName" -``` - -上面代码中,方法的`name`属性返回函数名(即方法名)。 - -如果对象的方法使用了取值函数(`getter`)和存值函数(`setter`),则`name`属性不是在该方法上面,而是该方法的属性的描述对象的`get`和`set`属性上面,返回值是方法名前加上`get`和`set`。 - -```javascript -const obj = { - get foo() {}, - set foo(x) {} -}; - -obj.foo.name -// TypeError: Cannot read property 'name' of undefined - -const descriptor = Object.getOwnPropertyDescriptor(obj, 'foo'); - -descriptor.get.name // "get foo" -descriptor.set.name // "set foo" -``` - -有两种特殊情况:`bind`方法创造的函数,`name`属性返回`bound`加上原函数的名字;`Function`构造函数创造的函数,`name`属性返回`anonymous`。 - -```javascript -(new Function()).name // "anonymous" - -var doSomething = function() { - // ... -}; -doSomething.bind().name // "bound doSomething" -``` - -如果对象的方法是一个 Symbol 值,那么`name`属性返回的是这个 Symbol 值的描述。 - -```javascript -const key1 = Symbol('description'); -const key2 = Symbol(); -let obj = { - [key1]() {}, - [key2]() {}, -}; -obj[key1].name // "[description]" -obj[key2].name // "" -``` - -上面代码中,`key1`对应的 Symbol 值有描述,`key2`没有。 - -## Object.is() - -ES5比较两个值是否相等,只有两个运算符:相等运算符(`==`)和严格相等运算符(`===`)。它们都有缺点,前者会自动转换数据类型,后者的`NaN`不等于自身,以及`+0`等于`-0`。JavaScript缺乏一种运算,在所有环境中,只要两个值是一样的,它们就应该相等。 - -ES6提出“Same-value equality”(同值相等)算法,用来解决这个问题。`Object.is`就是部署这个算法的新方法。它用来比较两个值是否严格相等,与严格比较运算符(===)的行为基本一致。 - -```javascript -Object.is('foo', 'foo') -// true -Object.is({}, {}) -// false -``` - -不同之处只有两个:一是`+0`不等于`-0`,二是`NaN`等于自身。 - -```javascript -+0 === -0 //true -NaN === NaN // false - -Object.is(+0, -0) // false -Object.is(NaN, NaN) // true -``` - -ES5可以通过下面的代码,部署`Object.is`。 - -```javascript -Object.defineProperty(Object, 'is', { - value: function(x, y) { - if (x === y) { - // 针对+0 不等于 -0的情况 - return x !== 0 || 1 / x === 1 / y; - } - // 针对NaN的情况 - return x !== x && y !== y; - }, - configurable: true, - enumerable: false, - writable: true -}); -``` - -## Object.assign() - -### 基本用法 - -`Object.assign`方法用于对象的合并,将源对象(source)的所有可枚举属性,复制到目标对象(target)。 - -```javascript -var target = { a: 1 }; - -var source1 = { b: 2 }; -var source2 = { c: 3 }; - -Object.assign(target, source1, source2); -target // {a:1, b:2, c:3} -``` - -`Object.assign`方法的第一个参数是目标对象,后面的参数都是源对象。 - -注意,如果目标对象与源对象有同名属性,或多个源对象有同名属性,则后面的属性会覆盖前面的属性。 - -```javascript -var target = { a: 1, b: 1 }; - -var source1 = { b: 2, c: 2 }; -var source2 = { c: 3 }; - -Object.assign(target, source1, source2); -target // {a:1, b:2, c:3} -``` - -如果只有一个参数,`Object.assign`会直接返回该参数。 - -```javascript -var obj = {a: 1}; -Object.assign(obj) === obj // true -``` - -如果该参数不是对象,则会先转成对象,然后返回。 - -```javascript -typeof Object.assign(2) // "object" -``` - -由于`undefined`和`null`无法转成对象,所以如果它们作为参数,就会报错。 - -```javascript -Object.assign(undefined) // 报错 -Object.assign(null) // 报错 -``` - -如果非对象参数出现在源对象的位置(即非首参数),那么处理规则有所不同。首先,这些参数都会转成对象,如果无法转成对象,就会跳过。这意味着,如果`undefined`和`null`不在首参数,就不会报错。 - -```javascript -let obj = {a: 1}; -Object.assign(obj, undefined) === obj // true -Object.assign(obj, null) === obj // true -``` - -其他类型的值(即数值、字符串和布尔值)不在首参数,也不会报错。但是,除了字符串会以数组形式,拷贝入目标对象,其他值都不会产生效果。 - -```javascript -var v1 = 'abc'; -var v2 = true; -var v3 = 10; - -var obj = Object.assign({}, v1, v2, v3); -console.log(obj); // { "0": "a", "1": "b", "2": "c" } -``` - -上面代码中,`v1`、`v2`、`v3`分别是字符串、布尔值和数值,结果只有字符串合入目标对象(以字符数组的形式),数值和布尔值都会被忽略。这是因为只有字符串的包装对象,会产生可枚举属性。 - -```javascript -Object(true) // {[[PrimitiveValue]]: true} -Object(10) // {[[PrimitiveValue]]: 10} -Object('abc') // {0: "a", 1: "b", 2: "c", length: 3, [[PrimitiveValue]]: "abc"} -``` - -上面代码中,布尔值、数值、字符串分别转成对应的包装对象,可以看到它们的原始值都在包装对象的内部属性`[[PrimitiveValue]]`上面,这个属性是不会被`Object.assign`拷贝的。只有字符串的包装对象,会产生可枚举的实义属性,那些属性则会被拷贝。 - -`Object.assign`拷贝的属性是有限制的,只拷贝源对象的自身属性(不拷贝继承属性),也不拷贝不可枚举的属性(`enumerable: false`)。 - -```javascript -Object.assign({b: 'c'}, - Object.defineProperty({}, 'invisible', { - enumerable: false, - value: 'hello' - }) -) -// { b: 'c' } -``` - -上面代码中,`Object.assign`要拷贝的对象只有一个不可枚举属性`invisible`,这个属性并没有被拷贝进去。 - -属性名为Symbol值的属性,也会被`Object.assign`拷贝。 - -```javascript -Object.assign({ a: 'b' }, { [Symbol('c')]: 'd' }) -// { a: 'b', Symbol(c): 'd' } -``` - -### 注意点 - -`Object.assign`方法实行的是浅拷贝,而不是深拷贝。也就是说,如果源对象某个属性的值是对象,那么目标对象拷贝得到的是这个对象的引用。 - -```javascript -var obj1 = {a: {b: 1}}; -var obj2 = Object.assign({}, obj1); - -obj1.a.b = 2; -obj2.a.b // 2 -``` - -上面代码中,源对象`obj1`的`a`属性的值是一个对象,`Object.assign`拷贝得到的是这个对象的引用。这个对象的任何变化,都会反映到目标对象上面。 - -对于这种嵌套的对象,一旦遇到同名属性,`Object.assign`的处理方法是替换,而不是添加。 - -```javascript -var target = { a: { b: 'c', d: 'e' } } -var source = { a: { b: 'hello' } } -Object.assign(target, source) -// { a: { b: 'hello' } } -``` - -上面代码中,`target`对象的`a`属性被`source`对象的`a`属性整个替换掉了,而不会得到`{ a: { b: 'hello', d: 'e' } }`的结果。这通常不是开发者想要的,需要特别小心。 - -有一些函数库提供`Object.assign`的定制版本(比如Lodash的`_.defaultsDeep`方法),可以解决浅拷贝的问题,得到深拷贝的合并。 - -注意,`Object.assign`可以用来处理数组,但是会把数组视为对象。 - -```javascript -Object.assign([1, 2, 3], [4, 5]) -// [4, 5, 3] -``` - -上面代码中,`Object.assign`把数组视为属性名为0、1、2的对象,因此源数组的0号属性`4`覆盖了目标数组的0号属性`1`。 - -### 常见用途 - -`Object.assign`方法有很多用处。 - -**(1)为对象添加属性** - -```javascript -class Point { - constructor(x, y) { - Object.assign(this, {x, y}); - } -} -``` - -上面方法通过`Object.assign`方法,将`x`属性和`y`属性添加到`Point`类的对象实例。 - -**(2)为对象添加方法** - -```javascript -Object.assign(SomeClass.prototype, { - someMethod(arg1, arg2) { - ··· - }, - anotherMethod() { - ··· - } -}); - -// 等同于下面的写法 -SomeClass.prototype.someMethod = function (arg1, arg2) { - ··· -}; -SomeClass.prototype.anotherMethod = function () { - ··· -}; -``` - -上面代码使用了对象属性的简洁表示法,直接将两个函数放在大括号中,再使用assign方法添加到SomeClass.prototype之中。 - -**(3)克隆对象** - -```javascript -function clone(origin) { - return Object.assign({}, origin); -} -``` - -上面代码将原始对象拷贝到一个空对象,就得到了原始对象的克隆。 - -不过,采用这种方法克隆,只能克隆原始对象自身的值,不能克隆它继承的值。如果想要保持继承链,可以采用下面的代码。 - -```javascript -function clone(origin) { - let originProto = Object.getPrototypeOf(origin); - return Object.assign(Object.create(originProto), origin); -} -``` - -**(4)合并多个对象** - -将多个对象合并到某个对象。 - -```javascript -const merge = - (target, ...sources) => Object.assign(target, ...sources); -``` - -如果希望合并后返回一个新对象,可以改写上面函数,对一个空对象合并。 - -```javascript -const merge = - (...sources) => Object.assign({}, ...sources); -``` - -**(5)为属性指定默认值** - -```javascript -const DEFAULTS = { - logLevel: 0, - outputFormat: 'html' -}; - -function processContent(options) { - options = Object.assign({}, DEFAULTS, options); - console.log(options); - // ... -} -``` - -上面代码中,`DEFAULTS`对象是默认值,`options`对象是用户提供的参数。`Object.assign`方法将`DEFAULTS`和`options`合并成一个新对象,如果两者有同名属性,则`option`的属性值会覆盖`DEFAULTS`的属性值。 - -注意,由于存在深拷贝的问题,`DEFAULTS`对象和`options`对象的所有属性的值,最好都是简单类型,不要指向另一个对象。否则,`DEFAULTS`对象的该属性很可能不起作用。 - -```javascript -const DEFAULTS = { - url: { - host: 'example.com', - port: 7070 - }, -}; - -processContent({ url: {port: 8000} }) -// { -// url: {port: 8000} -// } -``` - -上面代码的原意是将`url.port`改成8000,`url.host`不变。实际结果却是`options.url`覆盖掉`DEFAULTS.url`,所以`url.host`就不存在了。 - -## 属性的可枚举性 - -对象的每个属性都有一个描述对象(Descriptor),用来控制该属性的行为。`Object.getOwnPropertyDescriptor`方法可以获取该属性的描述对象。 - -```javascript -let obj = { foo: 123 }; -Object.getOwnPropertyDescriptor(obj, 'foo') -// { -// value: 123, -// writable: true, -// enumerable: true, -// configurable: true -// } -``` - -描述对象的`enumerable`属性,称为”可枚举性“,如果该属性为`false`,就表示某些操作会忽略当前属性。 - -ES5有三个操作会忽略`enumerable`为`false`的属性。 - -- `for...in`循环:只遍历对象自身的和继承的可枚举的属性 -- `Object.keys()`:返回对象自身的所有可枚举的属性的键名 -- `JSON.stringify()`:只串行化对象自身的可枚举的属性 - -ES6新增了一个操作`Object.assign()`,会忽略`enumerable`为`false`的属性,只拷贝对象自身的可枚举的属性。 - -这四个操作之中,只有`for...in`会返回继承的属性。实际上,引入`enumerable`的最初目的,就是让某些属性可以规避掉`for...in`操作。比如,对象原型的`toString`方法,以及数组的`length`属性,就通过这种手段,不会被`for...in`遍历到。 - -```javascript -Object.getOwnPropertyDescriptor(Object.prototype, 'toString').enumerable -// false - -Object.getOwnPropertyDescriptor([], 'length').enumerable -// false -``` - -上面代码中,`toString`和`length`属性的`enumerable`都是`false`,因此`for...in`不会遍历到这两个继承自原型的属性。 - -另外,ES6规定,所有Class的原型的方法都是不可枚举的。 - -```javascript -Object.getOwnPropertyDescriptor(class {foo() {}}.prototype, 'foo').enumerable -// false -``` - -总的来说,操作中引入继承的属性会让问题复杂化,大多数时候,我们只关心对象自身的属性。所以,尽量不要用`for...in`循环,而用`Object.keys()`代替。 - -## 属性的遍历 - -ES6一共有5种方法可以遍历对象的属性。 - -**(1)for...in** - -`for...in`循环遍历对象自身的和继承的可枚举属性(不含Symbol属性)。 - -**(2)Object.keys(obj)** - -`Object.keys`返回一个数组,包括对象自身的(不含继承的)所有可枚举属性(不含Symbol属性)。 - -**(3)Object.getOwnPropertyNames(obj)** - -`Object.getOwnPropertyNames`返回一个数组,包含对象自身的所有属性(不含Symbol属性,但是包括不可枚举属性)。 - -**(4)Object.getOwnPropertySymbols(obj)** - -`Object.getOwnPropertySymbols`返回一个数组,包含对象自身的所有Symbol属性。 - -**(5)Reflect.ownKeys(obj)** - -`Reflect.ownKeys`返回一个数组,包含对象自身的所有属性,不管是属性名是Symbol或字符串,也不管是否可枚举。 - -以上的5种方法遍历对象的属性,都遵守同样的属性遍历的次序规则。 - -- 首先遍历所有属性名为数值的属性,按照数字排序。 -- 其次遍历所有属性名为字符串的属性,按照生成时间排序。 -- 最后遍历所有属性名为Symbol值的属性,按照生成时间排序。 - -```javascript -Reflect.ownKeys({ [Symbol()]:0, b:0, 10:0, 2:0, a:0 }) -// ['2', '10', 'b', 'a', Symbol()] -``` - -上面代码中,`Reflect.ownKeys`方法返回一个数组,包含了参数对象的所有属性。这个数组的属性次序是这样的,首先是数值属性`2`和`10`,其次是字符串属性`b`和`a`,最后是Symbol属性。 - -## `__proto__`属性,Object.setPrototypeOf(),Object.getPrototypeOf() - -### `__proto__`属性 - -`__proto__`属性(前后各两个下划线),用来读取或设置当前对象的`prototype`对象。目前,所有浏览器(包括 IE11)都部署了这个属性。 - -```javascript -// es6的写法 -var obj = { - method: function() { ... } -}; -obj.__proto__ = someOtherObj; - -// es5的写法 -var obj = Object.create(someOtherObj); -obj.method = function() { ... }; -``` - -该属性没有写入 ES6 的正文,而是写入了附录,原因是`__proto__`前后的双下划线,说明它本质上是一个内部属性,而不是一个正式的对外的 API,只是由于浏览器广泛支持,才被加入了 ES6。标准明确规定,只有浏览器必须部署这个属性,其他运行环境不一定需要部署,而且新的代码最好认为这个属性是不存在的。因此,无论从语义的角度,还是从兼容性的角度,都不要使用这个属性,而是使用下面的`Object.setPrototypeOf()`(写操作)、`Object.getPrototypeOf()`(读操作)、`Object.create()`(生成操作)代替。 - -在实现上,`__proto__`调用的是`Object.prototype.__proto__`,具体实现如下。 - -```javascript -Object.defineProperty(Object.prototype, '__proto__', { - get() { - let _thisObj = Object(this); - return Object.getPrototypeOf(_thisObj); - }, - set(proto) { - if (this === undefined || this === null) { - throw new TypeError(); - } - if (!isObject(this)) { - return undefined; - } - if (!isObject(proto)) { - return undefined; - } - let status = Reflect.setPrototypeOf(this, proto); - if (!status) { - throw new TypeError(); - } - }, -}); -function isObject(value) { - return Object(value) === value; -} -``` - -如果一个对象本身部署了`__proto__`属性,则该属性的值就是对象的原型。 - -```javascript -Object.getPrototypeOf({ __proto__: null }) -// null -``` - -### Object.setPrototypeOf() - -`Object.setPrototypeOf`方法的作用与`__proto__`相同,用来设置一个对象的`prototype`对象,返回参数对象本身。它是 ES6 正式推荐的设置原型对象的方法。 - -```javascript -// 格式 -Object.setPrototypeOf(object, prototype) - -// 用法 -var o = Object.setPrototypeOf({}, null); -``` - -该方法等同于下面的函数。 - -```javascript -function (obj, proto) { - obj.__proto__ = proto; - return obj; -} -``` - -下面是一个例子。 - -```javascript -let proto = {}; -let obj = { x: 10 }; -Object.setPrototypeOf(obj, proto); - -proto.y = 20; -proto.z = 40; - -obj.x // 10 -obj.y // 20 -obj.z // 40 -``` - -上面代码将`proto`对象设为`obj`对象的原型,所以从`obj`对象可以读取`proto`对象的属性。 - -如果第一个参数不是对象,会自动转为对象。但是由于返回的还是第一个参数,所以这个操作不会产生任何效果。 - -```javascript -Object.setPrototypeOf(1, {}) === 1 // true -Object.setPrototypeOf('foo', {}) === 'foo' // true -Object.setPrototypeOf(true, {}) === true // true -``` - -由于`undefined`和`null`无法转为对象,所以如果第一个参数是`undefined`或`null`,就会报错。 - -```javascript -Object.setPrototypeOf(undefined, {}) -// TypeError: Object.setPrototypeOf called on null or undefined - -Object.setPrototypeOf(null, {}) -// TypeError: Object.setPrototypeOf called on null or undefined -``` - -### Object.getPrototypeOf() - -该方法与`Object.setPrototypeOf`方法配套,用于读取一个对象的原型对象。 - -```javascript -Object.getPrototypeOf(obj); -``` - -下面是一个例子。 - -```javascript -function Rectangle() { - // ... -} - -var rec = new Rectangle(); - -Object.getPrototypeOf(rec) === Rectangle.prototype -// true - -Object.setPrototypeOf(rec, Object.prototype); -Object.getPrototypeOf(rec) === Rectangle.prototype -// false -``` - -如果参数不是对象,会被自动转为对象。 - -```javascript -// 等同于 Object.getPrototypeOf(Number(1)) -Object.getPrototypeOf(1) -// Number {[[PrimitiveValue]]: 0} - -// 等同于 Object.getPrototypeOf(String('foo')) -Object.getPrototypeOf('foo') -// String {length: 0, [[PrimitiveValue]]: ""} - -// 等同于 Object.getPrototypeOf(Boolean(true)) -Object.getPrototypeOf(true) -// Boolean {[[PrimitiveValue]]: false} - -Object.getPrototypeOf(1) === Number.prototype // true -Object.getPrototypeOf('foo') === String.prototype // true -Object.getPrototypeOf(true) === Boolean.prototype // true -``` - -如果参数是`undefined`或`null`,它们无法转为对象,所以会报错。 - -```javascript -Object.getPrototypeOf(null) -// TypeError: Cannot convert undefined or null to object - -Object.getPrototypeOf(undefined) -// TypeError: Cannot convert undefined or null to object -``` - -## Object.keys(),Object.values(),Object.entries() - -### Object.keys() - -ES5 引入了`Object.keys`方法,返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键名。 - -```javascript -var obj = { foo: 'bar', baz: 42 }; -Object.keys(obj) -// ["foo", "baz"] -``` - -ES2017 [引入](https://github.com/tc39/proposal-object-values-entries)了跟`Object.keys`配套的`Object.values`和`Object.entries`,作为遍历一个对象的补充手段,供`for...of`循环使用。 - -```javascript -let {keys, values, entries} = Object; -let obj = { a: 1, b: 2, c: 3 }; - -for (let key of keys(obj)) { - console.log(key); // 'a', 'b', 'c' -} - -for (let value of values(obj)) { - console.log(value); // 1, 2, 3 -} - -for (let [key, value] of entries(obj)) { - console.log([key, value]); // ['a', 1], ['b', 2], ['c', 3] -} -``` - -### Object.values() - -`Object.values`方法返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键值。 - -```javascript -var obj = { foo: 'bar', baz: 42 }; -Object.values(obj) -// ["bar", 42] -``` - -返回数组的成员顺序,与本章的《属性的遍历》部分介绍的排列规则一致。 - -```javascript -var obj = { 100: 'a', 2: 'b', 7: 'c' }; -Object.values(obj) -// ["b", "c", "a"] -``` - -上面代码中,属性名为数值的属性,是按照数值大小,从小到大遍历的,因此返回的顺序是`b`、`c`、`a`。 - -`Object.values`只返回对象自身的可遍历属性。 - -```javascript -var obj = Object.create({}, {p: {value: 42}}); -Object.values(obj) // [] -``` - -上面代码中,`Object.create`方法的第二个参数添加的对象属性(属性`p`),如果不显式声明,默认是不可遍历的,因为`p`的属性描述对象的`enumerable`默认是`false`,`Object.values`不会返回这个属性。只要把`enumerable`改成`true`,`Object.values`就会返回属性`p`的值。 - -```javascript -var obj = Object.create({}, {p: - { -    value: 42, -    enumerable: true -  } -}); -Object.values(obj) // [42] -``` - -`Object.values`会过滤属性名为 Symbol 值的属性。 - -```javascript -Object.values({ [Symbol()]: 123, foo: 'abc' }); -// ['abc'] -``` - -如果`Object.values`方法的参数是一个字符串,会返回各个字符组成的一个数组。 - -```javascript -Object.values('foo') -// ['f', 'o', 'o'] -``` - -上面代码中,字符串会先转成一个类似数组的对象。字符串的每个字符,就是该对象的一个属性。因此,`Object.values`返回每个属性的键值,就是各个字符组成的一个数组。 - -如果参数不是对象,`Object.values`会先将其转为对象。由于数值和布尔值的包装对象,都不会为实例添加非继承的属性。所以,`Object.values`会返回空数组。 - -```javascript -Object.values(42) // [] -Object.values(true) // [] -``` - -### Object.entries - -`Object.entries`方法返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键值对数组。 - -```javascript -var obj = { foo: 'bar', baz: 42 }; -Object.entries(obj) -// [ ["foo", "bar"], ["baz", 42] ] -``` - -除了返回值不一样,该方法的行为与`Object.values`基本一致。 - -如果原对象的属性名是一个 Symbol 值,该属性会被忽略。 - -```javascript -Object.entries({ [Symbol()]: 123, foo: 'abc' }); -// [ [ 'foo', 'abc' ] ] -``` - -上面代码中,原对象有两个属性,`Object.entries`只输出属性名非 Symbol 值的属性。将来可能会有`Reflect.ownEntries()`方法,返回对象自身的所有属性。 - -`Object.entries`的基本用途是遍历对象的属性。 - -```javascript -let obj = { one: 1, two: 2 }; -for (let [k, v] of Object.entries(obj)) { - console.log( - `${JSON.stringify(k)}: ${JSON.stringify(v)}` - ); -} -// "one": 1 -// "two": 2 -``` - -`Object.entries`方法的另一个用处是,将对象转为真正的`Map`结构。 - -```javascript -var obj = { foo: 'bar', baz: 42 }; -var map = new Map(Object.entries(obj)); -map // Map { foo: "bar", baz: 42 } -``` - -自己实现`Object.entries`方法,非常简单。 - -```javascript -// Generator函数的版本 -function* entries(obj) { - for (let key of Object.keys(obj)) { - yield [key, obj[key]]; - } -} - -// 非Generator函数的版本 -function entries(obj) { - let arr = []; - for (let key of Object.keys(obj)) { - arr.push([key, obj[key]]); - } - return arr; -} -``` - -## 对象的扩展运算符 - -《数组的扩展》一章中,已经介绍过扩展预算符(`...`)。 - -```javascript -const [a, ...b] = [1, 2, 3]; -a // 1 -b // [2, 3] -``` - -ES2017 将这个运算符[引入](https://github.com/sebmarkbage/ecmascript-rest-spread)了对象。 - -**(1)解构赋值** - -对象的解构赋值用于从一个对象取值,相当于将所有可遍历的、但尚未被读取的属性,分配到指定的对象上面。所有的键和它们的值,都会拷贝到新对象上面。 - -```javascript -let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; -x // 1 -y // 2 -z // { a: 3, b: 4 } -``` - -上面代码中,变量`z`是解构赋值所在的对象。它获取等号右边的所有尚未读取的键(`a`和`b`),将它们连同值一起拷贝过来。 - -由于解构赋值要求等号右边是一个对象,所以如果等号右边是`undefined`或`null`,就会报错,因为它们无法转为对象。 - -```javascript -let { x, y, ...z } = null; // 运行时错误 -let { x, y, ...z } = undefined; // 运行时错误 -``` - -解构赋值必须是最后一个参数,否则会报错。 - -```javascript -let { ...x, y, z } = obj; // 句法错误 -let { x, ...y, ...z } = obj; // 句法错误 -``` - -上面代码中,解构赋值不是最后一个参数,所以会报错。 - -注意,解构赋值的拷贝是浅拷贝,即如果一个键的值是复合类型的值(数组、对象、函数)、那么解构赋值拷贝的是这个值的引用,而不是这个值的副本。 - -```javascript -let obj = { a: { b: 1 } }; -let { ...x } = obj; -obj.a.b = 2; -x.a.b // 2 -``` - -上面代码中,`x`是解构赋值所在的对象,拷贝了对象`obj`的`a`属性。`a`属性引用了一个对象,修改这个对象的值,会影响到解构赋值对它的引用。 - -另外,解构赋值不会拷贝继承自原型对象的属性。 - -```javascript -let o1 = { a: 1 }; -let o2 = { b: 2 }; -o2.__proto__ = o1; -let o3 = { ...o2 }; -o3 // { b: 2 } -``` - -上面代码中,对象`o3`是`o2`的拷贝,但是只复制了`o2`自身的属性,没有复制它的原型对象`o1`的属性。 - -下面是另一个例子。 - -```javascript -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -let { x, ...{ y, z } } = o; -x // 1 -y // undefined -z // 3 -``` - -上面代码中,变量`x`是单纯的解构赋值,所以可以读取继承的属性;解构赋值产生的变量`y`和`z`,只能读取对象自身的属性,所以只有变量`z`可以赋值成功。 - -解构赋值的一个用处,是扩展某个函数的参数,引入其他操作。 - -```javascript -function baseFunction({ a, b }) { - // ... -} -function wrapperFunction({ x, y, ...restConfig }) { - // 使用x和y参数进行操作 - // 其余参数传给原始函数 - return baseFunction(restConfig); -} -``` - -上面代码中,原始函数`baseFunction`接受`a`和`b`作为参数,函数`wrapperFunction`在`baseFunction`的基础上进行了扩展,能够接受多余的参数,并且保留原始函数的行为。 - -**(2)扩展运算符** - -扩展运算符(`...`)用于取出参数对象的所有可遍历属性,拷贝到当前对象之中。 - -```javascript -let z = { a: 3, b: 4 }; -let n = { ...z }; -n // { a: 3, b: 4 } -``` - -这等同于使用`Object.assign`方法。 - -```javascript -let aClone = { ...a }; -// 等同于 -let aClone = Object.assign({}, a); -``` - -扩展运算符可以用于合并两个对象。 - -```javascript -let ab = { ...a, ...b }; -// 等同于 -let ab = Object.assign({}, a, b); -``` - -如果用户自定义的属性,放在扩展运算符后面,则扩展运算符内部的同名属性会被覆盖掉。 - -```javascript -let aWithOverrides = { ...a, x: 1, y: 2 }; -// 等同于 -let aWithOverrides = { ...a, ...{ x: 1, y: 2 } }; -// 等同于 -let x = 1, y = 2, aWithOverrides = { ...a, x, y }; -// 等同于 -let aWithOverrides = Object.assign({}, a, { x: 1, y: 2 }); -``` - -上面代码中,`a`对象的`x`属性和`y`属性,拷贝到新对象后会被覆盖掉。 - -这用来修改现有对象部分的部分属性就很方便了。 - -```javascript -let newVersion = { - ...previousVersion, - name: 'New Name' // Override the name property -}; -``` - -上面代码中,`newVersion`对象自定义了`name`属性,其他属性全部复制自`previousVersion`对象。 - -如果把自定义属性放在扩展运算符前面,就变成了设置新对象的默认属性值。 - -```javascript -let aWithDefaults = { x: 1, y: 2, ...a }; -// 等同于 -let aWithDefaults = Object.assign({}, { x: 1, y: 2 }, a); -// 等同于 -let aWithDefaults = Object.assign({ x: 1, y: 2 }, a); -``` - -扩展运算符的参数对象之中,如果有取值函数`get`,这个函数是会执行的。 - -```javascript -// 并不会抛出错误,因为x属性只是被定义,但没执行 -let aWithXGetter = { - ...a, - get x() { - throws new Error('not thrown yet'); - } -}; - -// 会抛出错误,因为x属性被执行了 -let runtimeError = { - ...a, - ...{ - get x() { - throws new Error('thrown now'); - } - } -}; -``` - -如果扩展运算符的参数是`null`或`undefined`,这个两个值会被忽略,不会报错。 - -```javascript -let emptyObject = { ...null, ...undefined }; // 不报错 -``` - -## Object.getOwnPropertyDescriptors() - -ES5有一个`Object.getOwnPropertyDescriptor`方法,返回某个对象属性的描述对象(descriptor)。 - -```javascript -var obj = { p: 'a' }; - -Object.getOwnPropertyDescriptor(obj, 'p') -// Object { value: "a", -// writable: true, -// enumerable: true, -// configurable: true -// } -``` - -ES2017 引入了`Object.getOwnPropertyDescriptors`方法,返回指定对象所有自身属性(非继承属性)的描述对象。 - -```javascript -const obj = { - foo: 123, - get bar() { return 'abc' } -}; - -Object.getOwnPropertyDescriptors(obj) -// { foo: -// { value: 123, -// writable: true, -// enumerable: true, -// configurable: true }, -// bar: -// { get: [Function: bar], -// set: undefined, -// enumerable: true, -// configurable: true } } -``` - -上面代码中,`Object.getOwnPropertyDescriptors`方法返回一个对象,所有原对象的属性名都是该对象的属性名,对应的属性值就是该属性的描述对象。 - -该方法的实现非常容易。 - -```javascript -function getOwnPropertyDescriptors(obj) { - const result = {}; - for (let key of Reflect.ownKeys(obj)) { - result[key] = Object.getOwnPropertyDescriptor(obj, key); - } - return result; -} -``` - -该方法的引入目的,主要是为了解决`Object.assign()`无法正确拷贝`get`属性和`set`属性的问题。 - -```javascript -const source = { - set foo(value) { - console.log(value); - } -}; - -const target1 = {}; -Object.assign(target1, source); - -Object.getOwnPropertyDescriptor(target1, 'foo') -// { value: undefined, -// writable: true, -// enumerable: true, -// configurable: true } -``` - -上面代码中,`source`对象的`foo`属性的值是一个赋值函数,`Object.assign`方法将这个属性拷贝给`target1`对象,结果该属性的值变成了`undefined`。这是因为`Object.assign`方法总是拷贝一个属性的值,而不会拷贝它背后的赋值方法或取值方法。 - -这时,`Object.getOwnPropertyDescriptors`方法配合`Object.defineProperties`方法,就可以实现正确拷贝。 - -```javascript -const source = { - set foo(value) { - console.log(value); - } -}; - -const target2 = {}; -Object.defineProperties(target2, Object.getOwnPropertyDescriptors(source)); -Object.getOwnPropertyDescriptor(target2, 'foo') -// { get: undefined, -// set: [Function: foo], -// enumerable: true, -// configurable: true } -``` - -上面代码中,将两个对象合并的逻辑提炼出来,就是下面这样。 - -```javascript -const shallowMerge = (target, source) => Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) -); -``` - -`Object.getOwnPropertyDescriptors`方法的另一个用处,是配合`Object.create`方法,将对象属性克隆到一个新对象。这属于浅拷贝。 - -```javascript -const clone = Object.create(Object.getPrototypeOf(obj), - Object.getOwnPropertyDescriptors(obj)); - -// 或者 - -const shallowClone = (obj) => Object.create( - Object.getPrototypeOf(obj), - Object.getOwnPropertyDescriptors(obj) -); -``` - -上面代码会克隆对象`obj`。 - -另外,`Object.getOwnPropertyDescriptors`方法可以实现一个对象继承另一个对象。以前,继承另一个对象,常常写成下面这样。 - -```javascript -const obj = { - __proto__: prot, - foo: 123, -}; -``` - -ES6 规定`__proto__`只有浏览器要部署,其他环境不用部署。如果去除`__proto__`,上面代码就要改成下面这样。 - -```javascript -const obj = Object.create(prot); -obj.foo = 123; - -// 或者 - -const obj = Object.assign( - Object.create(prot), - { - foo: 123, - } -); -``` - -有了`Object.getOwnPropertyDescriptors`,我们就有了另一种写法。 - -```javascript -const obj = Object.create( - prot, - Object.getOwnPropertyDescriptors({ - foo: 123, - }) -); -``` - -`Object.getOwnPropertyDescriptors`也可以用来实现 Mixin(混入)模式。 - -```javascript -let mix = (object) => ({ - with: (...mixins) => mixins.reduce( - (c, mixin) => Object.create( - c, Object.getOwnPropertyDescriptors(mixin) - ), object) -}); - -// multiple mixins example -let a = {a: 'a'}; -let b = {b: 'b'}; -let c = {c: 'c'}; -let d = mix(c).with(a, b); -``` - -上面代码中,对象`a`和`b`被混入了对象`c`。 - -出于完整性的考虑,`Object.getOwnPropertyDescriptors`进入标准以后,还会有`Reflect.getOwnPropertyDescriptors`方法。 - -## Null 传导运算符 - -编程实务中,如果读取对象内部的某个属性,往往需要判断一下该对象是否存在。比如,要读取`message.body.user.firstName`,安全的写法是写成下面这样。 - -```javascript -const firstName = (message - && message.body - && message.body.user - && message.body.user.firstName) || 'default'; -``` - -这样的层层判断非常麻烦,因此现在有一个[提案](https://github.com/claudepache/es-optional-chaining),引入了“Null 传导运算符”(null propagation operator)`?.`,简化上面的写法。 - -```javascript -const firstName = message?.body?.user?.firstName || 'default'; -``` - -上面代码有三个`?.`运算符,只要其中一个返回`null`或`undefined`,就不再往下运算,而是返回`undefined`。 - -“Null 传导运算符”有四种用法。 - -- `obj?.prop` // 读取对象属性 -- `obj?.[expr]` // 同上 -- `func?.(...args)` // 函数或对象方法的调用 -- `new C?.(...args)` // 构造函数的调用 - -传导运算符之所以写成`obj?.prop`,而不是`obj?prop`,是为了方便编译器能够区分三元运算符`?:`(比如`obj?prop:123`)。 - -下面是更多的例子。 - -```javascript -// 如果 a 是 null 或 undefined, 返回 undefined -// 否则返回 a.b.c().d -a?.b.c().d - -// 如果 a 是 null 或 undefined,下面的语句不产生任何效果 -// 否则执行 a.b = 42 -a?.b = 42 - -// 如果 a 是 null 或 undefined,下面的语句不产生任何效果 -delete a?.b -``` - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/promise.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/promise.md" deleted file mode 100644 index 55dbfdf5e..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/promise.md" +++ /dev/null @@ -1,902 +0,0 @@ -# Promise 对象 - -## Promise 的含义 - -Promise 是异步编程的一种解决方案,比传统的解决方案——回调函数和事件——更合理和更强大。它由社区最早提出和实现,ES6将其写进了语言标准,统一了用法,原生提供了`Promise`对象。 - -所谓`Promise`,简单说就是一个容器,里面保存着某个未来才会结束的事件(通常是一个异步操作)的结果。从语法上说,Promise 是一个对象,从它可以获取异步操作的消息。Promise 提供统一的 API,各种异步操作都可以用同样的方法进行处理。 - -`Promise`对象有以下两个特点。 - -(1)对象的状态不受外界影响。`Promise`对象代表一个异步操作,有三种状态:`Pending`(进行中)、`Resolved`(已完成,又称 Fulfilled)和`Rejected`(已失败)。只有异步操作的结果,可以决定当前是哪一种状态,任何其他操作都无法改变这个状态。这也是`Promise`这个名字的由来,它的英语意思就是“承诺”,表示其他手段无法改变。 - -(2)一旦状态改变,就不会再变,任何时候都可以得到这个结果。`Promise`对象的状态改变,只有两种可能:从`Pending`变为`Resolved`和从`Pending`变为`Rejected`。只要这两种情况发生,状态就凝固了,不会再变了,会一直保持这个结果。如果改变已经发生了,就算你再对`Promise`对象添加回调函数,也会立即得到这个结果。这与事件(Event)完全不同,事件的特点是,如果你错过了它,再去监听,是得不到结果的。 - -有了`Promise`对象,就可以将异步操作以同步操作的流程表达出来,避免了层层嵌套的回调函数。此外,`Promise`对象提供统一的接口,使得控制异步操作更加容易。 - -`Promise`也有一些缺点。首先,无法取消`Promise`,一旦新建它就会立即执行,无法中途取消。其次,如果不设置回调函数,`Promise`内部抛出的错误,不会反应到外部。第三,当处于`Pending`状态时,无法得知目前进展到哪一个阶段(刚刚开始还是即将完成)。 - -如果某些事件不断地反复发生,一般来说,使用 stream 模式是比部署`Promise`更好的选择。 - -## 基本用法 - -ES6规定,Promise对象是一个构造函数,用来生成Promise实例。 - -下面代码创造了一个Promise实例。 - -```javascript -var promise = new Promise(function(resolve, reject) { - // ... some code - - if (/* 异步操作成功 */){ - resolve(value); - } else { - reject(error); - } -}); -``` - -Promise构造函数接受一个函数作为参数,该函数的两个参数分别是`resolve`和`reject`。它们是两个函数,由JavaScript引擎提供,不用自己部署。 - -`resolve`函数的作用是,将Promise对象的状态从“未完成”变为“成功”(即从Pending变为Resolved),在异步操作成功时调用,并将异步操作的结果,作为参数传递出去;`reject`函数的作用是,将Promise对象的状态从“未完成”变为“失败”(即从Pending变为Rejected),在异步操作失败时调用,并将异步操作报出的错误,作为参数传递出去。 - -Promise实例生成以后,可以用`then`方法分别指定`Resolved`状态和`Reject`状态的回调函数。 - -```javascript -promise.then(function(value) { - // success -}, function(error) { - // failure -}); -``` - -`then`方法可以接受两个回调函数作为参数。第一个回调函数是Promise对象的状态变为Resolved时调用,第二个回调函数是Promise对象的状态变为Reject时调用。其中,第二个函数是可选的,不一定要提供。这两个函数都接受Promise对象传出的值作为参数。 - -下面是一个Promise对象的简单例子。 - -```javascript -function timeout(ms) { - return new Promise((resolve, reject) => { - setTimeout(resolve, ms, 'done'); - }); -} - -timeout(100).then((value) => { - console.log(value); -}); -``` - -上面代码中,`timeout`方法返回一个Promise实例,表示一段时间以后才会发生的结果。过了指定的时间(`ms`参数)以后,Promise实例的状态变为Resolved,就会触发`then`方法绑定的回调函数。 - -Promise新建后就会立即执行。 - -```javascript -let promise = new Promise(function(resolve, reject) { - console.log('Promise'); - resolve(); -}); - -promise.then(function() { - console.log('Resolved.'); -}); - -console.log('Hi!'); - -// Promise -// Hi! -// Resolved -``` - -上面代码中,Promise新建后立即执行,所以首先输出的是“Promise”。然后,`then`方法指定的回调函数,将在当前脚本所有同步任务执行完才会执行,所以“Resolved”最后输出。 - -下面是异步加载图片的例子。 - -```javascript -function loadImageAsync(url) { - return new Promise(function(resolve, reject) { - var image = new Image(); - - image.onload = function() { - resolve(image); - }; - - image.onerror = function() { - reject(new Error('Could not load image at ' + url)); - }; - - image.src = url; - }); -} -``` - -上面代码中,使用Promise包装了一个图片加载的异步操作。如果加载成功,就调用`resolve`方法,否则就调用`reject`方法。 - -下面是一个用Promise对象实现的Ajax操作的例子。 - -```javascript -var getJSON = function(url) { - var promise = new Promise(function(resolve, reject){ - var client = new XMLHttpRequest(); - client.open("GET", url); - client.onreadystatechange = handler; - client.responseType = "json"; - client.setRequestHeader("Accept", "application/json"); - client.send(); - - function handler() { - if (this.readyState !== 4) { - return; - } - if (this.status === 200) { - resolve(this.response); - } else { - reject(new Error(this.statusText)); - } - }; - }); - - return promise; -}; - -getJSON("/posts.json").then(function(json) { - console.log('Contents: ' + json); -}, function(error) { - console.error('出错了', error); -}); -``` - -上面代码中,`getJSON`是对XMLHttpRequest对象的封装,用于发出一个针对JSON数据的HTTP请求,并且返回一个Promise对象。需要注意的是,在`getJSON`内部,`resolve`函数和`reject`函数调用时,都带有参数。 - -如果调用`resolve`函数和`reject`函数时带有参数,那么它们的参数会被传递给回调函数。`reject`函数的参数通常是Error对象的实例,表示抛出的错误;`resolve`函数的参数除了正常的值以外,还可能是另一个Promise实例,表示异步操作的结果有可能是一个值,也有可能是另一个异步操作,比如像下面这样。 - -```javascript -var p1 = new Promise(function (resolve, reject) { - // ... -}); - -var p2 = new Promise(function (resolve, reject) { - // ... - resolve(p1); -}) -``` - -上面代码中,`p1`和`p2`都是Promise的实例,但是`p2`的`resolve`方法将`p1`作为参数,即一个异步操作的结果是返回另一个异步操作。 - -注意,这时`p1`的状态就会传递给`p2`,也就是说,`p1`的状态决定了`p2`的状态。如果`p1`的状态是`Pending`,那么`p2`的回调函数就会等待`p1`的状态改变;如果`p1`的状态已经是`Resolved`或者`Rejected`,那么`p2`的回调函数将会立刻执行。 - -```javascript -var p1 = new Promise(function (resolve, reject) { - setTimeout(() => reject(new Error('fail')), 3000) -}) - -var p2 = new Promise(function (resolve, reject) { - setTimeout(() => resolve(p1), 1000) -}) - -p2 - .then(result => console.log(result)) - .catch(error => console.log(error)) -// Error: fail -``` - -上面代码中,`p1`是一个Promise,3秒之后变为`rejected`。`p2`的状态在1秒之后改变,`resolve`方法返回的是`p1`。由于`p2`返回的是另一个 Promise,导致`p2`自己的状态无效了,由`p1`的状态决定`p2`的状态。所以,后面的`then`语句都变成针对后者(`p1`)。又过了2秒,`p1`变为`rejected`,导致触发`catch`方法指定的回调函数。 - -## Promise.prototype.then() - -Promise实例具有`then`方法,也就是说,`then`方法是定义在原型对象Promise.prototype上的。它的作用是为Promise实例添加状态改变时的回调函数。前面说过,`then`方法的第一个参数是Resolved状态的回调函数,第二个参数(可选)是Rejected状态的回调函数。 - -`then`方法返回的是一个新的Promise实例(注意,不是原来那个Promise实例)。因此可以采用链式写法,即`then`方法后面再调用另一个`then`方法。 - -```javascript -getJSON("/posts.json").then(function(json) { - return json.post; -}).then(function(post) { - // ... -}); -``` - -上面的代码使用`then`方法,依次指定了两个回调函数。第一个回调函数完成以后,会将返回结果作为参数,传入第二个回调函数。 - -采用链式的`then`,可以指定一组按照次序调用的回调函数。这时,前一个回调函数,有可能返回的还是一个Promise对象(即有异步操作),这时后一个回调函数,就会等待该Promise对象的状态发生变化,才会被调用。 - -```javascript -getJSON("/post/1.json").then(function(post) { - return getJSON(post.commentURL); -}).then(function funcA(comments) { - console.log("Resolved: ", comments); -}, function funcB(err){ - console.log("Rejected: ", err); -}); -``` - -上面代码中,第一个`then`方法指定的回调函数,返回的是另一个Promise对象。这时,第二个`then`方法指定的回调函数,就会等待这个新的Promise对象状态发生变化。如果变为Resolved,就调用`funcA`,如果状态变为Rejected,就调用`funcB`。 - -如果采用箭头函数,上面的代码可以写得更简洁。 - -```javascript -getJSON("/post/1.json").then( - post => getJSON(post.commentURL) -).then( - comments => console.log("Resolved: ", comments), - err => console.log("Rejected: ", err) -); -``` - -## Promise.prototype.catch() - -`Promise.prototype.catch`方法是`.then(null, rejection)`的别名,用于指定发生错误时的回调函数。 - -```javascript -getJSON('/posts.json').then(function(posts) { - // ... -}).catch(function(error) { - // 处理 getJSON 和 前一个回调函数运行时发生的错误 - console.log('发生错误!', error); -}); -``` - -上面代码中,`getJSON`方法返回一个 Promise 对象,如果该对象状态变为`Resolved`,则会调用`then`方法指定的回调函数;如果异步操作抛出错误,状态就会变为`Rejected`,就会调用`catch`方法指定的回调函数,处理这个错误。另外,`then`方法指定的回调函数,如果运行中抛出错误,也会被`catch`方法捕获。 - -```javascript -p.then((val) => console.log('fulfilled:', val)) - .catch((err) => console.log('rejected', err)); - -// 等同于 -p.then((val) => console.log('fulfilled:', val)) - .then(null, (err) => console.log("rejected:", err)); -``` - -下面是一个例子。 - -```javascript -var promise = new Promise(function(resolve, reject) { - throw new Error('test'); -}); -promise.catch(function(error) { - console.log(error); -}); -// Error: test -``` - -上面代码中,`promise`抛出一个错误,就被`catch`方法指定的回调函数捕获。注意,上面的写法与下面两种写法是等价的。 - -```javascript -// 写法一 -var promise = new Promise(function(resolve, reject) { - try { - throw new Error('test'); - } catch(e) { - reject(e); - } -}); -promise.catch(function(error) { - console.log(error); -}); - -// 写法二 -var promise = new Promise(function(resolve, reject) { - reject(new Error('test')); -}); -promise.catch(function(error) { - console.log(error); -}); -``` - -比较上面两种写法,可以发现`reject`方法的作用,等同于抛出错误。 - -如果Promise状态已经变成`Resolved`,再抛出错误是无效的。 - -```javascript -var promise = new Promise(function(resolve, reject) { - resolve('ok'); - throw new Error('test'); -}); -promise - .then(function(value) { console.log(value) }) - .catch(function(error) { console.log(error) }); -// ok -``` - -上面代码中,Promise 在`resolve`语句后面,再抛出错误,不会被捕获,等于没有抛出。因为 Promise 的状态一旦改变,就永久保持该状态,不会再变了。 - -Promise 对象的错误具有“冒泡”性质,会一直向后传递,直到被捕获为止。也就是说,错误总是会被下一个`catch`语句捕获。 - -```javascript -getJSON('/post/1.json').then(function(post) { - return getJSON(post.commentURL); -}).then(function(comments) { - // some code -}).catch(function(error) { - // 处理前面三个Promise产生的错误 -}); -``` - -上面代码中,一共有三个Promise对象:一个由`getJSON`产生,两个由`then`产生。它们之中任何一个抛出的错误,都会被最后一个`catch`捕获。 - -一般来说,不要在`then`方法里面定义Reject状态的回调函数(即`then`的第二个参数),总是使用`catch`方法。 - -```javascript -// bad -promise - .then(function(data) { - // success - }, function(err) { - // error - }); - -// good -promise - .then(function(data) { //cb - // success - }) - .catch(function(err) { - // error - }); -``` - -上面代码中,第二种写法要好于第一种写法,理由是第二种写法可以捕获前面`then`方法执行中的错误,也更接近同步的写法(`try/catch`)。因此,建议总是使用`catch`方法,而不使用`then`方法的第二个参数。 - -跟传统的`try/catch`代码块不同的是,如果没有使用`catch`方法指定错误处理的回调函数,Promise对象抛出的错误不会传递到外层代码,即不会有任何反应。 - -```javascript -var someAsyncThing = function() { - return new Promise(function(resolve, reject) { - // 下面一行会报错,因为x没有声明 - resolve(x + 2); - }); -}; - -someAsyncThing().then(function() { - console.log('everything is great'); -}); -``` - -上面代码中,`someAsyncThing`函数产生的Promise对象会报错,但是由于没有指定`catch`方法,这个错误不会被捕获,也不会传递到外层代码,导致运行后没有任何输出。注意,Chrome浏览器不遵守这条规定,它会抛出错误“ReferenceError: x is not defined”。 - -```javascript -var promise = new Promise(function(resolve, reject) { - resolve('ok'); - setTimeout(function() { throw new Error('test') }, 0) -}); -promise.then(function(value) { console.log(value) }); -// ok -// Uncaught Error: test -``` - -上面代码中,Promise 指定在下一轮“事件循环”再抛出错误,结果由于没有指定使用`try...catch`语句,就冒泡到最外层,成了未捕获的错误。因为此时,Promise的函数体已经运行结束了,所以这个错误是在Promise函数体外抛出的。 - -Node 有一个`unhandledRejection`事件,专门监听未捕获的`reject`错误。 - -```javascript -process.on('unhandledRejection', function (err, p) { - console.error(err.stack) -}); -``` - -上面代码中,`unhandledRejection`事件的监听函数有两个参数,第一个是错误对象,第二个是报错的Promise实例,它可以用来了解发生错误的环境信息。。 - -需要注意的是,`catch`方法返回的还是一个 Promise 对象,因此后面还可以接着调用`then`方法。 - -```javascript -var someAsyncThing = function() { - return new Promise(function(resolve, reject) { - // 下面一行会报错,因为x没有声明 - resolve(x + 2); - }); -}; - -someAsyncThing() -.catch(function(error) { - console.log('oh no', error); -}) -.then(function() { - console.log('carry on'); -}); -// oh no [ReferenceError: x is not defined] -// carry on -``` - -上面代码运行完`catch`方法指定的回调函数,会接着运行后面那个`then`方法指定的回调函数。如果没有报错,则会跳过`catch`方法。 - -```javascript -Promise.resolve() -.catch(function(error) { - console.log('oh no', error); -}) -.then(function() { - console.log('carry on'); -}); -// carry on -``` - -上面的代码因为没有报错,跳过了`catch`方法,直接执行后面的`then`方法。此时,要是`then`方法里面报错,就与前面的`catch`无关了。 - -`catch`方法之中,还能再抛出错误。 - -```javascript -var someAsyncThing = function() { - return new Promise(function(resolve, reject) { - // 下面一行会报错,因为x没有声明 - resolve(x + 2); - }); -}; - -someAsyncThing().then(function() { - return someOtherAsyncThing(); -}).catch(function(error) { - console.log('oh no', error); - // 下面一行会报错,因为y没有声明 - y + 2; -}).then(function() { - console.log('carry on'); -}); -// oh no [ReferenceError: x is not defined] -``` - -上面代码中,`catch`方法抛出一个错误,因为后面没有别的`catch`方法了,导致这个错误不会被捕获,也不会传递到外层。如果改写一下,结果就不一样了。 - -```javascript -someAsyncThing().then(function() { - return someOtherAsyncThing(); -}).catch(function(error) { - console.log('oh no', error); - // 下面一行会报错,因为y没有声明 - y + 2; -}).catch(function(error) { - console.log('carry on', error); -}); -// oh no [ReferenceError: x is not defined] -// carry on [ReferenceError: y is not defined] -``` - -上面代码中,第二个`catch`方法用来捕获,前一个`catch`方法抛出的错误。 - -## Promise.all() - -`Promise.all`方法用于将多个Promise实例,包装成一个新的Promise实例。 - -```javascript -var p = Promise.all([p1, p2, p3]); -``` - -上面代码中,`Promise.all`方法接受一个数组作为参数,`p1`、`p2`、`p3`都是Promise对象的实例,如果不是,就会先调用下面讲到的`Promise.resolve`方法,将参数转为Promise实例,再进一步处理。(`Promise.all`方法的参数可以不是数组,但必须具有Iterator接口,且返回的每个成员都是Promise实例。) - -`p`的状态由`p1`、`p2`、`p3`决定,分成两种情况。 - -(1)只有`p1`、`p2`、`p3`的状态都变成`fulfilled`,`p`的状态才会变成`fulfilled`,此时`p1`、`p2`、`p3`的返回值组成一个数组,传递给`p`的回调函数。 - -(2)只要`p1`、`p2`、`p3`之中有一个被`rejected`,`p`的状态就变成`rejected`,此时第一个被`reject`的实例的返回值,会传递给`p`的回调函数。 - -下面是一个具体的例子。 - -```javascript -// 生成一个Promise对象的数组 -var promises = [2, 3, 5, 7, 11, 13].map(function (id) { - return getJSON("/post/" + id + ".json"); -}); - -Promise.all(promises).then(function (posts) { - // ... -}).catch(function(reason){ - // ... -}); -``` - -上面代码中,`promises`是包含6个Promise实例的数组,只有这6个实例的状态都变成`fulfilled`,或者其中有一个变为`rejected`,才会调用`Promise.all`方法后面的回调函数。 - -下面是另一个例子。 - -```javascript -const databasePromise = connectDatabase(); - -const booksPromise = databasePromise - .then(findAllBooks); - -const userPromise = databasePromise - .then(getCurrentUser); - -Promise.all([ - booksPromise, - userPromise -]) -.then(([books, user]) => pickTopRecommentations(books, user)); -``` - -上面代码中,`booksPromise`和`userPromise`是两个异步操作,只有等到它们的结果都返回了,才会触发`pickTopRecommentations`这个回调函数。 - -## Promise.race() - -`Promise.race`方法同样是将多个Promise实例,包装成一个新的Promise实例。 - -```javascript -var p = Promise.race([p1, p2, p3]); -``` - -上面代码中,只要`p1`、`p2`、`p3`之中有一个实例率先改变状态,`p`的状态就跟着改变。那个率先改变的 Promise 实例的返回值,就传递给`p`的回调函数。 - -`Promise.race`方法的参数与`Promise.all`方法一样,如果不是 Promise 实例,就会先调用下面讲到的`Promise.resolve`方法,将参数转为 Promise 实例,再进一步处理。 - -下面是一个例子,如果指定时间内没有获得结果,就将Promise的状态变为`reject`,否则变为`resolve`。 - -```javascript -const p = Promise.race([ - fetch('/resource-that-may-take-a-while'), - new Promise(function (resolve, reject) { - setTimeout(() => reject(new Error('request timeout')), 5000) - }) -]); -p.then(response => console.log(response)); -p.catch(error => console.log(error)); -``` - -上面代码中,如果5秒之内`fetch`方法无法返回结果,变量`p`的状态就会变为`rejected`,从而触发`catch`方法指定的回调函数。 - -## Promise.resolve() - -有时需要将现有对象转为Promise对象,`Promise.resolve`方法就起到这个作用。 - -```javascript -var jsPromise = Promise.resolve($.ajax('/whatever.json')); -``` - -上面代码将jQuery生成的`deferred`对象,转为一个新的Promise对象。 - -`Promise.resolve`等价于下面的写法。 - -```javascript -Promise.resolve('foo') -// 等价于 -new Promise(resolve => resolve('foo')) -``` - -`Promise.resolve`方法的参数分成四种情况。 - -**(1)参数是一个Promise实例** - -如果参数是Promise实例,那么`Promise.resolve`将不做任何修改、原封不动地返回这个实例。 - -**(2)参数是一个`thenable`对象** - -`thenable`对象指的是具有`then`方法的对象,比如下面这个对象。 - -```javascript -let thenable = { - then: function(resolve, reject) { - resolve(42); - } -}; -``` - -`Promise.resolve`方法会将这个对象转为Promise对象,然后就立即执行`thenable`对象的`then`方法。 - -```javascript -let thenable = { - then: function(resolve, reject) { - resolve(42); - } -}; - -let p1 = Promise.resolve(thenable); -p1.then(function(value) { - console.log(value); // 42 -}); -``` - -上面代码中,`thenable`对象的`then`方法执行后,对象`p1`的状态就变为`resolved`,从而立即执行最后那个`then`方法指定的回调函数,输出42。 - -**(3)参数不是具有`then`方法的对象,或根本就不是对象** - -如果参数是一个原始值,或者是一个不具有`then`方法的对象,则`Promise.resolve`方法返回一个新的Promise对象,状态为`Resolved`。 - -```javascript -var p = Promise.resolve('Hello'); - -p.then(function (s){ - console.log(s) -}); -// Hello -``` - -上面代码生成一个新的Promise对象的实例`p`。由于字符串`Hello`不属于异步操作(判断方法是它不是具有then方法的对象),返回Promise实例的状态从一生成就是`Resolved`,所以回调函数会立即执行。`Promise.resolve`方法的参数,会同时传给回调函数。 - -**(4)不带有任何参数** - -`Promise.resolve`方法允许调用时不带参数,直接返回一个`Resolved`状态的Promise对象。 - -所以,如果希望得到一个Promise对象,比较方便的方法就是直接调用`Promise.resolve`方法。 - -```javascript -var p = Promise.resolve(); - -p.then(function () { - // ... -}); -``` - -上面代码的变量`p`就是一个Promise对象。 - -需要注意的是,立即`resolve`的Promise对象,是在本轮“事件循环”(event loop)的结束时,而不是在下一轮“事件循环”的开始时。 - -```javascript -setTimeout(function () { - console.log('three'); -}, 0); - -Promise.resolve().then(function () { - console.log('two'); -}); - -console.log('one'); - -// one -// two -// three -``` - -上面代码中,`setTimeout(fn, 0)`在下一轮“事件循环”开始时执行,`Promise.resolve()`在本轮“事件循环”结束时执行,`console.log(’one‘)`则是立即执行,因此最先输出。 - -## Promise.reject() - -`Promise.reject(reason)`方法也会返回一个新的 Promise 实例,该实例的状态为`rejected`。 - -```javascript -var p = Promise.reject('出错了'); -// 等同于 -var p = new Promise((resolve, reject) => reject('出错了')) - -p.then(null, function (s) { - console.log(s) -}); -// 出错了 -``` - -上面代码生成一个Promise对象的实例`p`,状态为`rejected`,回调函数会立即执行。 - -注意,`Promise.reject()`方法的参数,会原封不动地作为`reject`的理由,变成后续方法的参数。这一点与`Promise.resolve`方法不一致。 - -```javascript -const thenable = { - then(resolve, reject) { - reject('出错了'); - } -}; - -Promise.reject(thenable) -.catch(e => { - console.log(e === thenable) -}) -// true -``` - -上面代码中,`Promise.reject`方法的参数是一个`thenable`对象,执行以后,后面`catch`方法的参数不是`reject`抛出的“出错了”这个字符串,而是`thenable`对象。 - -## 两个有用的附加方法 - -ES6的Promise API提供的方法不是很多,有些有用的方法可以自己部署。下面介绍如何部署两个不在ES6之中、但很有用的方法。 - -### done() - -Promise对象的回调链,不管以`then`方法或`catch`方法结尾,要是最后一个方法抛出错误,都有可能无法捕捉到(因为Promise内部的错误不会冒泡到全局)。因此,我们可以提供一个`done`方法,总是处于回调链的尾端,保证抛出任何可能出现的错误。 - -```javascript -asyncFunc() - .then(f1) - .catch(r1) - .then(f2) - .done(); -``` - -它的实现代码相当简单。 - -```javascript -Promise.prototype.done = function (onFulfilled, onRejected) { - this.then(onFulfilled, onRejected) - .catch(function (reason) { - // 抛出一个全局错误 - setTimeout(() => { throw reason }, 0); - }); -}; -``` - -从上面代码可见,`done`方法的使用,可以像`then`方法那样用,提供`Fulfilled`和`Rejected`状态的回调函数,也可以不提供任何参数。但不管怎样,`done`都会捕捉到任何可能出现的错误,并向全局抛出。 - -### finally() - -`finally`方法用于指定不管Promise对象最后状态如何,都会执行的操作。它与`done`方法的最大区别,它接受一个普通的回调函数作为参数,该函数不管怎样都必须执行。 - -下面是一个例子,服务器使用Promise处理请求,然后使用`finally`方法关掉服务器。 - -```javascript -server.listen(0) - .then(function () { - // run test - }) - .finally(server.stop); -``` - -它的实现也很简单。 - -```javascript -Promise.prototype.finally = function (callback) { - let P = this.constructor; - return this.then( - value => P.resolve(callback()).then(() => value), - reason => P.resolve(callback()).then(() => { throw reason }) - ); -}; -``` - -上面代码中,不管前面的Promise是`fulfilled`还是`rejected`,都会执行回调函数`callback`。 - -## 应用 - -### 加载图片 - -我们可以将图片的加载写成一个`Promise`,一旦加载完成,`Promise`的状态就发生变化。 - -```javascript -const preloadImage = function (path) { - return new Promise(function (resolve, reject) { - var image = new Image(); - image.onload = resolve; - image.onerror = reject; - image.src = path; - }); -}; -``` - -### Generator函数与Promise的结合 - -使用Generator函数管理流程,遇到异步操作的时候,通常返回一个`Promise`对象。 - -```javascript -function getFoo () { - return new Promise(function (resolve, reject){ - resolve('foo'); - }); -} - -var g = function* () { - try { - var foo = yield getFoo(); - console.log(foo); - } catch (e) { - console.log(e); - } -}; - -function run (generator) { - var it = generator(); - - function go(result) { - if (result.done) return result.value; - - return result.value.then(function (value) { - return go(it.next(value)); - }, function (error) { - return go(it.throw(error)); - }); - } - - go(it.next()); -} - -run(g); -``` - -上面代码的Generator函数`g`之中,有一个异步操作`getFoo`,它返回的就是一个`Promise`对象。函数`run`用来处理这个`Promise`对象,并调用下一个`next`方法。 - -## Promise.try() - -实际开发中,经常遇到一种情况:不知道或者不想区分,函数`f`是同步函数还是异步操作,但是想用 Promise 来处理它。因为这样就可以不管`f`是否包含异步操作,都用`then`方法指定下一步流程,用`catch`方法处理`f`抛出的错误。一般就会采用下面的写法。 - -```javascript -Promise.resolve().then(f) -``` - -上面的写法有一个缺点,就是如果`f`是同步函数,那么它会在本轮事件循环的末尾执行。 - -```javascript -const f = () => console.log('now'); -Promise.resolve().then(f); -console.log('next'); -// next -// now -``` - -上面代码中,函数`f`是同步的,但是用 Promise 包装了以后,就变成异步执行了。 - -那么有没有一种方法,让同步函数同步执行,异步函数异步执行,并且让它们具有统一的 API 呢?回答是可以的,并且还有两种写法。第一种写法是用`async`函数来写。 - -```javascript -const f = () => console.log('now'); -(async () => f())(); -console.log('next'); -// now -// next -``` - -上面代码中,第二行是一个立即执行的匿名函数,会立即执行里面的`async`函数,因此如果`f`是同步的,就会得到同步的结果;如果`f`是异步的,就可以用`then`指定下一步,就像下面的写法。 - -```javascript -(async () => f())() -.then(...) -``` - -需要注意的是,`async () => f()`会吃掉`f()`抛出的错误。所以,如果想捕获错误,要使用`promise.catch`方法。 - -```javascript -(async () => f())() -.then(...) -.catch(...) -``` - -第二种写法是使用`new Promise()`。 - -```javascript -const f = () => console.log('now'); -( - () => new Promise( - resolve => resolve(f()) - ) -)(); -console.log('next'); -// now -// next -``` - -上面代码也是使用立即执行的匿名函数,执行`new Promise()`。这种情况下,同步函数也是同步执行的。 - -鉴于这是一个很常见的需求,所以现在有一个[提案](https://github.com/ljharb/proposal-promise-try),提供`Promise.try`方法替代上面的写法。 - -```javascript -const f = () => console.log('now'); -Promise.try(f); -console.log('next'); -// now -// next -``` - -事实上,`Promise.try`存在已久,Promise 库[`Bluebird`](http://bluebirdjs.com/docs/api/promise.try.html)、[`Q`](https://github.com/kriskowal/q/wiki/API-Reference#promisefcallargs)和[`when`](https://github.com/cujojs/when/blob/master/docs/api.md#whentry),早就提供了这个方法。 - -由于`Promise.try`为所有操作提供了统一的处理机制,所以如果想用`then`方法管理流程,最好都用`Promise.try`包装一下。这样有[许多好处](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/),其中一点就是可以更好地管理异常。 - -```javascript -function getUsername(userId) { - return database.users.get({id: userId}) - .then(function(user) { - return user.name; - }); -} -``` - -上面代码中,`database.users.get()`返回一个 Promise 对象,如果抛出异步错误,可以用`catch`方法捕获,就像下面这样写。 - -```javascript -database.users.get({id: userId}) -.then(...) -.catch(...) -``` - -但是`database.users.get()`可能还会抛出同步错误(比如数据库连接错误,具体要看实现方法),这时你就不得不用`try...catch`去捕获。 - -```javascript -try { - database.users.get({id: userId}) - .then(...) - .catch(...) -} catch (e) { - // ... -} -``` - -上面这样的写法就很笨拙了,这时就可以统一用`promise.catch()`捕获所有同步和异步的错误。 - -```javascript -Promise.try(database.users.get({id: userId})) - .then(...) - .catch(...) -``` - -事实上,`Promise.try`就是模拟`try`代码块,就像`promise.catch`模拟的是`catch`代码块。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reference.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reference.md" deleted file mode 100644 index 1cd279d74..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reference.md" +++ /dev/null @@ -1,245 +0,0 @@ -# 参考链接 - -## 官方文件 - -- [ECMAScript® 2015 Language Specification](http://www.ecma-international.org/ecma-262/6.0/index.html): ECMAScript 2015规格 -- [ECMAScript® 2016 Language Specification](http://www.ecma-international.org/ecma-262/7.0/): ECMAScript 2016规格 -- [ECMAScript® 2017 Language Specification](https://tc39.github.io/ecma262/):ECMAScript 2017规格(草案) -- [ECMAScript Current Proposals](https://github.com/tc39/ecma262): ECMAScript当前的所有提案 -- [ECMAScript Active Proposals](https://github.com/tc39/proposals): 已经进入正式流程的提案 -- [ECMAscript proposals](https://github.com/hemanth/es-next):从阶段0到阶段4的所有提案列表 -- [TC39 meeting agendas](https://github.com/tc39/agendas): TC39 委员会历年的会议记录 -- [ECMAScript Daily](https://ecmascript-daily.github.io/): TC39委员会的动态 -- [The TC39 Process](https://tc39.github.io/process-document/): 提案进入正式规格的流程 -- [TC39: A Process Sketch, Stages 0 and 1](https://thefeedbackloop.xyz/tc39-a-process-sketch-stages-0-and-1/): Stage 0 和 Stage 1 的含义 -- [TC39 Process Sketch, Stage 2](https://thefeedbackloop.xyz/tc39-process-sketch-stage-2/): Stage 2 的含义 - -## 综合介绍 - -- Axel Rauschmayer, [Exploring ES6: Upgrade to the next version of JavaScript](http://exploringjs.com/es6/): ES6的专著,本书的许多代码实例来自该书 -- Sayanee Basu, [Use ECMAScript 6 Today](http://net.tutsplus.com/articles/news/ecmascript-6-today/) -- Ariya Hidayat, [Toward Modern Web Apps with ECMAScript 6](http://www.sencha.com/blog/toward-modern-web-apps-with-ecmascript-6/) -- Dale Schouten, [10 Ecmascript-6 tricks you can perform right now](http://html5hub.com/10-ecmascript-6-tricks-you-can-perform-right-now/) -- Colin Toh, [Lightweight ES6 Features That Pack A Punch](http://colintoh.com/blog/lightweight-es6-features): ES6的一些“轻量级”的特性介绍 -- Domenic Denicola, [ES6: The Awesome Parts](http://www.slideshare.net/domenicdenicola/es6-the-awesome-parts) -- Nicholas C. Zakas, [Understanding ECMAScript 6](https://github.com/nzakas/understandinges6) -- Justin Drake, [ECMAScript 6 in Node.JS](https://github.com/JustinDrake/node-es6-examples) -- Ryan Dao, [Summary of ECMAScript 6 major features](http://ryandao.net/portal/content/summary-ecmascript-6-major-features) -- Luke Hoban, [ES6 features](https://github.com/lukehoban/es6features): ES6新语法点的罗列 -- Traceur-compiler, [Language Features](https://github.com/google/traceur-compiler/wiki/LanguageFeatures): Traceur文档列出的一些ES6例子 -- Axel Rauschmayer, [ECMAScript 6: what’s next for JavaScript?](https://speakerdeck.com/rauschma/ecmascript-6-whats-next-for-javascript-august-2014): 关于ES6新增语法的综合介绍,有很多例子 -- Axel Rauschmayer, [Getting started with ECMAScript 6](http://www.2ality.com/2015/08/getting-started-es6.html): ES6语法点的综合介绍 -- Toby Ho, [ES6 in io.js](http://davidwalsh.name/es6-io) -- Guillermo Rauch, [ECMAScript 6](http://rauchg.com/2015/ecmascript-6/) -- Charles King, [The power of ECMAScript 6](http://charlesbking.com/power_of_es6/#/) -- Benjamin De Cock, [Frontend Guidelines](https://github.com/bendc/frontend-guidelines): ES6最佳实践 -- Jani Hartikainen, [ES6: What are the benefits of the new features in practice?](http://codeutopia.net/blog/2015/01/06/es6-what-are-the-benefits-of-the-new-features-in-practice/) -- kangax, [Javascript quiz. ES6 edition](http://perfectionkills.com/javascript-quiz-es6/): ES6小测试 -- Jeremy Fairbank, [HTML5DevConf ES7 and Beyond!](https://speakerdeck.com/jfairbank/html5devconf-es7-and-beyond): ES7新增语法点介绍 - -## let和const - -- Kyle Simpson, [For and against let](http://davidwalsh.name/for-and-against-let): 讨论let命令的作用域 -- kangax, [Why typeof is no longer “safe”](http://es-discourse.com/t/why-typeof-is-no-longer-safe/15): 讨论在块级作用域内,let命令的变量声明和赋值的行为 -- Axel Rauschmayer, [Variables and scoping in ECMAScript 6](http://www.2ality.com/2015/02/es6-scoping.html): 讨论块级作用域与let和const的行为 -- Nicolas Bevacqua, [ES6 Let, Const and the “Temporal Dead Zone” (TDZ) in Depth](http://ponyfoo.com/articles/es6-let-const-and-temporal-dead-zone-in-depth) -- acorn, [Function statements in strict mode](https://github.com/ternjs/acorn/issues/118): 块级作用域对严格模式的函数声明的影响 -- Axel Rauschmayer, [ES proposal: global](http://www.2ality.com/2016/09/global.html): 顶层对象`global` - -## 解构赋值 - -- Nick Fitzgerald, [Destructuring Assignment in ECMAScript 6](http://fitzgeraldnick.com/weblog/50/): 详细介绍解构赋值的用法 -- Nicholas C. Zakas, [ECMAScript 6 destructuring gotcha](https://www.nczonline.net/blog/2015/10/ecmascript-6-destructuring-gotcha/) - -## 字符串 - -- Nicholas C. Zakas, [A critical review of ECMAScript 6 quasi-literals](http://www.nczonline.net/blog/2012/08/01/a-critical-review-of-ecmascript-6-quasi-literals/) -- Mozilla Developer Network, [Template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings) -- Addy Osmani, [Getting Literal With ES6 Template Strings](http://updates.html5rocks.com/2015/01/ES6-Template-Strings): 模板字符串的介绍 -- Blake Winton, [ES6 Templates](https://weblog.latte.ca/blake/tech/firefox/templates.html): 模板字符串的介绍 -- Peter Jaszkowiak, [How to write a template compiler in JavaScript](https://medium.com/@PitaJ/how-to-write-a-template-compiler-in-javascript-f174df6f32f): 使用模板字符串,编写一个模板编译函数 -- Axel Rauschmayer, [ES.stage3: string padding](http://www.2ality.com/2015/11/string-padding.html) - -## 正则 - -- Mathias Bynens, [Unicode-aware regular expressions in ES6](https://mathiasbynens.be/notes/es6-unicode-regex): 详细介绍正则表达式的u修饰符 -- Axel Rauschmayer, [New regular expression features in ECMAScript 6](http://www.2ality.com/2015/07/regexp-es6.html):ES6正则特性的详细介绍 -- Yang Guo, [RegExp lookbehind assertions](http://v8project.blogspot.jp/2016/02/regexp-lookbehind-assertions.html):介绍后行断言 - -## 数值 - -- Nicolas Bevacqua, [ES6 Number Improvements in Depth](http://ponyfoo.com/articles/es6-number-improvements-in-depth) - -## 数组 - -- Axel Rauschmayer, [ECMAScript 6’s new array methods](http://www.2ality.com/2014/05/es6-array-methods.html): 对ES6新增的数组方法的全面介绍 -- TC39, [Array.prototype.includes](https://github.com/tc39/Array.prototype.includes/): 数组的includes方法的规格 -- Axel Rauschmayer, [ECMAScript 6: holes in Arrays](http://www.2ality.com/2015/09/holes-arrays-es6.html): 数组的空位问题 - -## 函数 - -- Nicholas C. Zakas, [Understanding ECMAScript 6 arrow functions](http://www.nczonline.net/blog/2013/09/10/understanding-ecmascript-6-arrow-functions/) -- Jack Franklin, [Real Life ES6 - Arrow Functions](http://javascriptplayground.com/blog/2014/04/real-life-es6-arrow-fn/) -- Axel Rauschmayer, [Handling required parameters in ECMAScript 6](http://www.2ality.com/2014/04/required-parameters-es6.html) -- Dmitry Soshnikov, [ES6 Notes: Default values of parameters](http://dmitrysoshnikov.com/ecmascript/es6-notes-default-values-of-parameters/): 介绍参数的默认值 -- Ragan Wald, [Destructuring and Recursion in ES6](http://raganwald.com/2015/02/02/destructuring.html): rest参数和扩展运算符的详细介绍 -- Axel Rauschmayer, [The names of functions in ES6](http://www.2ality.com/2015/09/function-names-es6.html): 函数的name属性的详细介绍 -- Kyle Simpson, [Arrow This](http://blog.getify.com/arrow-this/): 箭头函数并没有自己的this -- Derick Bailey, [Do ES6 Arrow Functions Really Solve “this” In JavaScript?](http://derickbailey.com/2015/09/28/do-es6-arrow-functions-really-solve-this-in-javascript/):使用箭头函数处理this指向,必须非常小心 -- Mark McDonnell, [Understanding recursion in functional JavaScript programming](http://www.integralist.co.uk/posts/js-recursion.html): 如何自己实现尾递归优化 -- Nicholas C. Zakas, [The ECMAScript 2016 change you probably don't know](https://www.nczonline.net/blog/2016/10/the-ecmascript-2016-change-you-probably-dont-know/): 使用参数默认值时,不能在函数内部显式开启严格模式 - -## 对象 - -- Addy Osmani, [Data-binding Revolutions with Object.observe()](http://www.html5rocks.com/en/tutorials/es7/observe/): 介绍Object.observe()的概念 -- Sella Rafaeli, [Native JavaScript Data-Binding](http://www.sellarafaeli.com/blog/native_javascript_data_binding): 如何使用Object.observe方法,实现数据对象与DOM对象的双向绑定 -- Axel Rauschmayer, [`__proto__` in ECMAScript 6](http://www.2ality.com/2015/09/proto-es6.html) -- Axel Rauschmayer, [Enumerability in ECMAScript 6](http://www.2ality.com/2015/10/enumerability-es6.html) -- Axel Rauschmayer, [ES proposal: Object.getOwnPropertyDescriptors()](http://www.2ality.com/2016/02/object-getownpropertydescriptors.html) -- TC39, [Object.getOwnPropertyDescriptors Proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - -## Symbol - -- Axel Rauschmayer, [Symbols in ECMAScript 6](http://www.2ality.com/2014/12/es6-symbols.html): Symbol简介 -- MDN, [Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): Symbol类型的详细介绍 -- Jason Orendorff, [ES6 In Depth: Symbols](https://hacks.mozilla.org/2015/06/es6-in-depth-symbols/) -- Keith Cirkel, [Metaprogramming in ES6: Symbols and why they're awesome](http://blog.keithcirkel.co.uk/metaprogramming-in-es6-symbols/): Symbol的深入介绍 -- Axel Rauschmayer, [Customizing ES6 via well-known symbols](http://www.2ality.com/2015/09/well-known-symbols-es6.html) -- Derick Bailey, [Creating A True Singleton In Node.js, With ES6 Symbols](https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/) -- Das Surma, [How to read web specs Part IIa – Or: ECMAScript Symbols](https://dassur.ma/things/reading-specs-2/): 介绍 Symbol 的规格 - -## Set和Map - -- Mozilla Developer Network, [WeakSet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet):介绍WeakSet数据结构 -- Dwayne Charrington, [What Are Weakmaps In ES6?](http://ilikekillnerds.com/2015/02/what-are-weakmaps-in-es6/): WeakMap数据结构介绍 -- Axel Rauschmayer, [ECMAScript 6: maps and sets](http://www.2ality.com/2015/01/es6-maps-sets.html): Set和Map结构的详细介绍 -- Jason Orendorff, [ES6 In Depth: Collections](https://hacks.mozilla.org/2015/06/es6-in-depth-collections/):Set和Map结构的设计思想 -- Axel Rauschmayer, [Converting ES6 Maps to and from JSON](http://www.2ality.com/2015/08/es6-map-json.html): 如何将Map与其他数据结构互相转换 - -## Proxy 和 Reflect - -- Nicholas C. Zakas, [Creating defensive objects with ES6 proxies](http://www.nczonline.net/blog/2014/04/22/creating-defensive-objects-with-es6-proxies/) -- Axel Rauschmayer, [Meta programming with ECMAScript 6 proxies](http://www.2ality.com/2014/12/es6-proxies.html): Proxy详解 -- Daniel Zautner, [Meta-programming JavaScript Using Proxies](http://dzautner.com/meta-programming-javascript-using-proxies/): 使用Proxy实现元编程 -- Tom Van Cutsem, [Harmony-reflect](https://github.com/tvcutsem/harmony-reflect/wiki): Reflect对象的设计目的 -- Tom Van Cutsem, [Proxy Traps](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/traps.md): Proxy拦截操作一览 -- Tom Van Cutsem, [Reflect API](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/api.md) -- Tom Van Cutsem, [Proxy Handler API](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/handler_api.md) -- Nicolas Bevacqua, [ES6 Proxies in Depth](http://ponyfoo.com/articles/es6-proxies-in-depth) -- Nicolas Bevacqua, [ES6 Proxy Traps in Depth](http://ponyfoo.com/articles/es6-proxy-traps-in-depth) -- Nicolas Bevacqua, [More ES6 Proxy Traps in Depth](http://ponyfoo.com/articles/more-es6-proxy-traps-in-depth) -- Axel Rauschmayer, [Pitfall: not all objects can be wrapped transparently by proxies](http://www.2ality.com/2016/11/proxying-builtins.html) -- Bertalan Miklos, [Writing a JavaScript Framework - Data Binding with ES6 Proxies](https://blog.risingstack.com/writing-a-javascript-framework-data-binding-es6-proxy/): 使用 Proxy 实现观察者模式 -- Keith Cirkel, [Metaprogramming in ES6: Part 2 - Reflect](https://www.keithcirkel.co.uk/metaprogramming-in-es6-part-2-reflect/): Reflect API 的详细介绍 - -## Promise 对象 - -- Jake Archibald, [JavaScript Promises: There and back again](http://www.html5rocks.com/en/tutorials/es6/promises/) -- Tilde, [rsvp.js](https://github.com/tildeio/rsvp.js) -- Sandeep Panda, [An Overview of JavaScript Promises](http://www.sitepoint.com/overview-javascript-promises/): ES6 Promise入门介绍 -- Dave Atchley, [ES6 Promises](http://www.datchley.name/es6-promises/): Promise的语法介绍 -- Axel Rauschmayer, [ECMAScript 6 promises (2/2): the API](http://www.2ality.com/2014/10/es6-promises-api.html): 对ES6 Promise规格和用法的详细介绍 -- Jack Franklin, [Embracing Promises in JavaScript](http://javascriptplayground.com/blog/2015/02/promises/): catch 方法的例子 -- Ronald Chen, [How to escape Promise Hell](https://medium.com/@pyrolistical/how-to-get-out-of-promise-hell-8c20e0ab0513#.2an1he6vf): 如何使用`Promise.all`方法的一些很好的例子 -- Jordan Harband, [proposal-promise-try](https://github.com/ljharb/proposal-promise-try): Promise.try() 方法的提案 -- Sven Slootweg, [What is Promise.try, and why does it matter?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/): Promise.try() 方法的优点 -- Yehuda Katz, [TC39: Promises, Promises](https://thefeedbackloop.xyz/tc39-promises-promises/): Promise.try() 的用处 - -## Iterator - -- Mozilla Developer Network, [Iterators and generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators) -- Mozilla Developer Network, [The Iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol) -- Jason Orendorff, [ES6 In Depth: Iterators and the for-of loop](https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop/): 遍历器与for...of循环的介绍 -- Axel Rauschmayer, [Iterators and generators in ECMAScript 6](http://www.2ality.com/2013/06/iterators-generators.html): 探讨Iterator和Generator的设计目的 -- Axel Rauschmayer, [Iterables and iterators in ECMAScript 6](http://www.2ality.com/2015/02/es6-iteration.html): Iterator的详细介绍 -- Kyle Simpson, [Iterating ES6 Numbers](http://blog.getify.com/iterating-es6-numbers/): 在数值对象上部署遍历器 - -## Generator - -- Matt Baker, [Replacing callbacks with ES6 Generators](http://flippinawesome.org/2014/02/10/replacing-callbacks-with-es6-generators/) -- Steven Sanderson, [Experiments with Koa and JavaScript Generators](http://blog.stevensanderson.com/2013/12/21/experiments-with-koa-and-javascript-generators/) -- jmar777, [What's the Big Deal with Generators?](http://devsmash.com/blog/whats-the-big-deal-with-generators) -- Marc Harter, [Generators in Node.js: Common Misconceptions and Three Good Use Cases](http://strongloop.com/strongblog/how-to-generators-node-js-yield-use-cases/): 讨论Generator函数的作用 -- StackOverflow, [ES6 yield : what happens to the arguments of the first call next()?](http://stackoverflow.com/questions/20977379/es6-yield-what-happens-to-the-arguments-of-the-first-call-next): 第一次使用next方法时不能带有参数 -- Kyle Simpson, [ES6 Generators: Complete Series](http://davidwalsh.name/es6-generators): 由浅入深探讨Generator的系列文章,共四篇 -- Gajus Kuizinas, [The Definitive Guide to the JavaScript Generators](http://gajus.com/blog/2/the-definetive-guide-to-the-javascript-generators): 对Generator的综合介绍 -- Jan Krems, [Generators Are Like Arrays](https://gist.github.com/jkrems/04a2b34fb9893e4c2b5c): 讨论Generator可以被当作数据结构看待 -- Harold Cooper, [Coroutine Event Loops in Javascript](http://syzygy.st/javascript-coroutines/): Generator用于实现状态机 -- Ruslan Ismagilov, [learn-generators](https://github.com/isRuslan/learn-generators): 编程练习,共6道题 -- Steven Sanderson, [Experiments with Koa and JavaScript Generators](http://blog.stevensanderson.com/2013/12/21/experiments-with-koa-and-javascript-generators/): Generator入门介绍,以Koa框架为例 -- Mahdi Dibaiee, [ES7 Array and Generator comprehensions](http://dibaiee.ir/es7-array-generator-comprehensions/):ES7的Generator推导 -- Nicolas Bevacqua, [ES6 Generators in Depth](http://ponyfoo.com/articles/es6-generators-in-depth) -- Axel Rauschmayer, [ES6 generators in depth](http://www.2ality.com/2015/03/es6-generators.html): Generator规格的详尽讲解 -- Derick Bailey, [Using ES6 Generators To Short-Circuit Hierarchical Data Iteration](https://derickbailey.com/2015/10/05/using-es6-generators-to-short-circuit-hierarchical-data-iteration/):使用 for...of 循环完成预定的操作步骤 - -## 异步操作和Async函数 - -- Luke Hoban, [Async Functions for ECMAScript](https://github.com/lukehoban/ecmascript-asyncawait): Async函数的设计思想,与Promise、Gernerator函数的关系 -- Jafar Husain, [Asynchronous Generators for ES7](https://github.com/jhusain/asyncgenerator): Async函数的深入讨论 -- Nolan Lawson, [Taming the asynchronous beast with ES7](http://pouchdb.com/2015/03/05/taming-the-async-beast-with-es7.html): async函数通俗的实例讲解 -- Jafar Husain, [Async Generators](https://docs.google.com/file/d/0B4PVbLpUIdzoMDR5dWstRllXblU/view?sle=true): 对async与Generator混合使用的一些讨论 -- Daniel Brain, [Understand promises before you start using async/await](https://medium.com/@bluepnume/learn-about-promises-before-you-start-using-async-await-eb148164a9c8): 讨论async/await与Promise的关系 -- Jake Archibald, [Async functions - making promises friendly](https://developers.google.com/web/fundamentals/getting-started/primers/async-functions) -- Axel Rauschmayer, [ES proposal: asynchronous iteration](http://www.2ality.com/2016/10/asynchronous-iteration.html): 异步遍历器的详细介绍 -- Dima Grossman, [How to write async await without try-catch blocks in Javascript](http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/): 除了 try/catch 以外的 async 函数内部捕捉错误的方法 - -## Class - -- Sebastian Porto, [ES6 classes and JavaScript prototypes](https://reinteractive.net/posts/235-es6-classes-and-javascript-prototypes): ES6 Class的写法与ES5 Prototype的写法对比 -- Jack Franklin, [An introduction to ES6 classes](http://javascriptplayground.com/blog/2014/07/introduction-to-es6-classes-tutorial/): ES6 class的入门介绍 -- Axel Rauschmayer, [ECMAScript 6: new OOP features besides classes](http://www.2ality.com/2014/12/es6-oop.html) -- Axel Rauschmayer, [Classes in ECMAScript 6 (final semantics)](http://www.2ality.com/2015/02/es6-classes-final.html): Class语法的详细介绍和设计思想分析 -- Eric Faust, [ES6 In Depth: Subclassing](https://hacks.mozilla.org/2015/08/es6-in-depth-subclassing/): Class语法的深入介绍 -- Nicolás Bevacqua, [Binding Methods to Class Instance Objects](https://ponyfoo.com/articles/binding-methods-to-class-instance-objects): 如何绑定类的实例中的this - -## Decorator - -- Maximiliano Fierro, [Declarative vs Imperative](http://elmasse.github.io/js/decorators-bindings-es7.html): Decorators和Mixin介绍 -- Justin Fagnani, ["Real" Mixins with JavaScript Classes](http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/): 使用类的继承实现Mixin -- Addy Osmani, [Exploring ES2016 Decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841): Decorator的深入介绍 -- Sebastian McKenzie, [Allow decorators for functions as well](https://github.com/wycats/javascript-decorators/issues/4): 为什么修饰器不能用于函数 -- Maximiliano Fierro, [Traits with ES7 Decorators](http://cocktailjs.github.io/blog/traits-with-es7-decorators.html): Trait的用法介绍 -- Jonathan Creamer: [Using ES2016 Decorators to Publish on an Event Bus](http://jonathancreamer.com/using-es2016-decorators-to-publish-on-an-event-bus/): 使用修饰器实现自动发布事件 - -## Module - -- Jack Franklin, [JavaScript Modules the ES6 Way](http://24ways.org/2014/javascript-modules-the-es6-way/): ES6模块入门 -- Axel Rauschmayer, [ECMAScript 6 modules: the final syntax](http://www.2ality.com/2014/09/es6-modules-final.html): ES6模块的介绍,以及与CommonJS规格的详细比较 -- Dave Herman, [Static module resolution](http://calculist.org/blog/2012/06/29/static-module-resolution/): ES6模块的静态化设计思想 -- Jason Orendorff, [ES6 In Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/): ES6模块设计思想的介绍 -- Ben Newman, [The Importance of import and export](http://benjamn.github.io/empirenode-2015/#/): ES6模块的设计思想 -- ESDiscuss, [Why is "export default var a = 1;" invalid syntax?](https://esdiscuss.org/topic/why-is-export-default-var-a-1-invalid-syntax) -- Bradley Meck, [ES6 Module Interoperability](https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md): 介绍 Node 如何处理 ES6 语法加载 CommonJS 模块 -- Axel Rauschmayer, [Making transpiled ES modules more spec-compliant](http://www.2ality.com/2017/01/babel-esm-spec-mode.html): ES6 模块编译成 CommonJS 模块的详细介绍 -- Axel Rauschmayer, [ES proposal: import() – dynamically importing ES modules](http://www.2ality.com/2017/01/import-operator.html): import() 的用法 - -## 二进制数组 - -- Ilmari Heikkinen, [Typed Arrays: Binary Data in the Browser](http://www.html5rocks.com/en/tutorials/webgl/typed_arrays/) -- Khronos, [Typed Array Specification](http://www.khronos.org/registry/typedarray/specs/latest/) -- Ian Elliot, [Reading A BMP File In JavaScript](http://www.i-programmer.info/projects/36-web/6234-reading-a-bmp-file-in-javascript.html) -- Renato Mangini, [How to convert ArrayBuffer to and from String](http://updates.html5rocks.com/2012/06/How-to-convert-ArrayBuffer-to-and-from-String) -- Axel Rauschmayer, [Typed Arrays in ECMAScript 6](http://www.2ality.com/2015/09/typed-arrays.html) - -## SIMD - -- TC39, [SIMD.js Stage 2](https://docs.google.com/presentation/d/1MY9NHrHmL7ma7C8dyNXvmYNNGgVmmxXk8ZIiQtPlfH4/edit#slide=id.p19) -- MDN, [SIMD](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SIMD) -- TC39, [ECMAScript SIMD](https://github.com/tc39/ecmascript_simd) -- Axel Rauschmayer, [JavaScript gains support for SIMD](http://www.2ality.com/2013/12/simd-js.html) - -## 工具 - -- Babel, [Babel Handbook](https://github.com/thejameskyle/babel-handbook/tree/master/translations/en): Babel的用法介绍 -- Google, [traceur-compiler](https://github.com/google/traceur-compiler): Traceur编译器 -- Casper Beyer, [ECMAScript 6 Features and Tools](http://caspervonb.github.io/2014/03/05/ecmascript6-features-and-tools.html) -- Stoyan Stefanov, [Writing ES6 today with jstransform](http://www.phpied.com/writing-es6-today-with-jstransform/) -- ES6 Module Loader, [ES6 Module Loader Polyfill](https://github.com/ModuleLoader/es6-module-loader): 在浏览器和node.js加载ES6模块的一个库,文档里对ES6模块有详细解释 -- Paul Miller, [es6-shim](https://github.com/paulmillr/es6-shim): 一个针对老式浏览器,模拟ES6部分功能的垫片库(shim) -- army8735, [Javascript Downcast](https://github.com/army8735/jsdc): 国产的ES6到ES5的转码器 -- esnext, [ES6 Module Transpiler](https://github.com/esnext/es6-module-transpiler):基于node.js的将ES6模块转为ES5代码的命令行工具 -- Sebastian McKenzie, [BabelJS](http://babeljs.io/): ES6转译器 -- SystemJS, [SystemJS](https://github.com/systemjs/systemjs): 在浏览器中加载AMD、CJS、ES6模块的一个垫片库 -- Modernizr, [HTML5 Cross Browser Polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#ecmascript-6-harmony): ES6垫片库清单 -- Facebook, [regenerator](https://github.com/facebook/regenerator): 将Generator函数转为ES5的转码器 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/regex.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/regex.md" deleted file mode 100644 index 389c35759..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/regex.md" +++ /dev/null @@ -1,517 +0,0 @@ -# 正则的扩展 - -## RegExp构造函数 - -在ES5中,RegExp构造函数的参数有两种情况。 - -第一种情况是,参数是字符串,这时第二个参数表示正则表达式的修饰符(flag)。 - -```javascript -var regex = new RegExp('xyz', 'i'); -// 等价于 -var regex = /xyz/i; -``` - -第二种情况是,参数是一个正则表示式,这时会返回一个原有正则表达式的拷贝。 - -```javascript -var regex = new RegExp(/xyz/i); -// 等价于 -var regex = /xyz/i; -``` - -但是,ES5不允许此时使用第二个参数,添加修饰符,否则会报错。 - -```javascript -var regex = new RegExp(/xyz/, 'i'); -// Uncaught TypeError: Cannot supply flags when constructing one RegExp from another -``` - -ES6改变了这种行为。如果RegExp构造函数第一个参数是一个正则对象,那么可以使用第二个参数指定修饰符。而且,返回的正则表达式会忽略原有的正则表达式的修饰符,只使用新指定的修饰符。 - -```javascript -new RegExp(/abc/ig, 'i').flags -// "i" -``` - -上面代码中,原有正则对象的修饰符是`ig`,它会被第二个参数`i`覆盖。 - -## 字符串的正则方法 - -字符串对象共有4个方法,可以使用正则表达式:`match()`、`replace()`、`search()`和`split()`。 - -ES6将这4个方法,在语言内部全部调用RegExp的实例方法,从而做到所有与正则相关的方法,全都定义在RegExp对象上。 - -- `String.prototype.match` 调用 `RegExp.prototype[Symbol.match]` -- `String.prototype.replace` 调用 `RegExp.prototype[Symbol.replace]` -- `String.prototype.search` 调用 `RegExp.prototype[Symbol.search]` -- `String.prototype.split` 调用 `RegExp.prototype[Symbol.split]` - -## u修饰符 - -ES6对正则表达式添加了`u`修饰符,含义为“Unicode模式”,用来正确处理大于`\uFFFF`的Unicode字符。也就是说,会正确处理四个字节的UTF-16编码。 - -```javascript -/^\uD83D/u.test('\uD83D\uDC2A') -// false -/^\uD83D/.test('\uD83D\uDC2A') -// true -``` - -上面代码中,`\uD83D\uDC2A`是一个四个字节的UTF-16编码,代表一个字符。但是,ES5不支持四个字节的UTF-16编码,会将其识别为两个字符,导致第二行代码结果为`true`。加了`u`修饰符以后,ES6就会识别其为一个字符,所以第一行代码结果为`false`。 - -一旦加上`u`修饰符号,就会修改下面这些正则表达式的行为。 - -**(1)点字符** - -点(`.`)字符在正则表达式中,含义是除了换行符以外的任意单个字符。对于码点大于`0xFFFF`的Unicode字符,点字符不能识别,必须加上`u`修饰符。 - -```javascript -var s = '𠮷'; - -/^.$/.test(s) // false -/^.$/u.test(s) // true -``` - -上面代码表示,如果不添加`u`修饰符,正则表达式就会认为字符串为两个字符,从而匹配失败。 - -**(2)Unicode字符表示法** - -ES6新增了使用大括号表示Unicode字符,这种表示法在正则表达式中必须加上`u`修饰符,才能识别。 - -```javascript -/\u{61}/.test('a') // false -/\u{61}/u.test('a') // true -/\u{20BB7}/u.test('𠮷') // true -``` - -上面代码表示,如果不加`u`修饰符,正则表达式无法识别`\u{61}`这种表示法,只会认为这匹配61个连续的`u`。 - -**(3)量词** - -使用`u`修饰符后,所有量词都会正确识别码点大于`0xFFFF`的Unicode字符。 - -```javascript -/a{2}/.test('aa') // true -/a{2}/u.test('aa') // true -/𠮷{2}/.test('𠮷𠮷') // false -/𠮷{2}/u.test('𠮷𠮷') // true -``` - -另外,只有在使用`u`修饰符的情况下,Unicode表达式当中的大括号才会被正确解读,否则会被解读为量词。 - -```javascript -/^\u{3}$/.test('uuu') // true -``` - -上面代码中,由于正则表达式没有`u`修饰符,所以大括号被解读为量词。加上`u`修饰符,就会被解读为Unicode表达式。 - -**(4)预定义模式** - -`u`修饰符也影响到预定义模式,能否正确识别码点大于`0xFFFF`的Unicode字符。 - -```javascript -/^\S$/.test('𠮷') // false -/^\S$/u.test('𠮷') // true -``` - -上面代码的`\S`是预定义模式,匹配所有不是空格的字符。只有加了`u`修饰符,它才能正确匹配码点大于`0xFFFF`的Unicode字符。 - -利用这一点,可以写出一个正确返回字符串长度的函数。 - -```javascript -function codePointLength(text) { - var result = text.match(/[\s\S]/gu); - return result ? result.length : 0; -} - -var s = '𠮷𠮷'; - -s.length // 4 -codePointLength(s) // 2 -``` - -**(5)i修饰符** - -有些Unicode字符的编码不同,但是字型很相近,比如,`\u004B`与`\u212A`都是大写的`K`。 - -```javascript -/[a-z]/i.test('\u212A') // false -/[a-z]/iu.test('\u212A') // true -``` - -上面代码中,不加`u`修饰符,就无法识别非规范的K字符。 - -## y 修饰符 - -除了`u`修饰符,ES6还为正则表达式添加了`y`修饰符,叫做“粘连”(sticky)修饰符。 - -`y`修饰符的作用与`g`修饰符类似,也是全局匹配,后一次匹配都从上一次匹配成功的下一个位置开始。不同之处在于,`g`修饰符只要剩余位置中存在匹配就可,而`y`修饰符确保匹配必须从剩余的第一个位置开始,这也就是“粘连”的涵义。 - -```javascript -var s = 'aaa_aa_a'; -var r1 = /a+/g; -var r2 = /a+/y; - -r1.exec(s) // ["aaa"] -r2.exec(s) // ["aaa"] - -r1.exec(s) // ["aa"] -r2.exec(s) // null -``` - -上面代码有两个正则表达式,一个使用`g`修饰符,另一个使用`y`修饰符。这两个正则表达式各执行了两次,第一次执行的时候,两者行为相同,剩余字符串都是`_aa_a`。由于`g`修饰没有位置要求,所以第二次执行会返回结果,而`y`修饰符要求匹配必须从头部开始,所以返回`null`。 - -如果改一下正则表达式,保证每次都能头部匹配,`y`修饰符就会返回结果了。 - -```javascript -var s = 'aaa_aa_a'; -var r = /a+_/y; - -r.exec(s) // ["aaa_"] -r.exec(s) // ["aa_"] -``` - -上面代码每次匹配,都是从剩余字符串的头部开始。 - -使用`lastIndex`属性,可以更好地说明`y`修饰符。 - -```javascript -const REGEX = /a/g; - -// 指定从2号位置(y)开始匹配 -REGEX.lastIndex = 2; - -// 匹配成功 -const match = REGEX.exec('xaya'); - -// 在3号位置匹配成功 -match.index // 3 - -// 下一次匹配从4号位开始 -REGEX.lastIndex // 4 - -// 4号位开始匹配失败 -REGEX.exec('xaxa') // null -``` - -上面代码中,`lastIndex`属性指定每次搜索的开始位置,`g`修饰符从这个位置开始向后搜索,直到发现匹配为止。 - -`y`修饰符同样遵守`lastIndex`属性,但是要求必须在`lastIndex`指定的位置发现匹配。 - -```javascript -const REGEX = /a/y; - -// 指定从2号位置开始匹配 -REGEX.lastIndex = 2; - -// 不是粘连,匹配失败 -REGEX.exec('xaya') // null - -// 指定从3号位置开始匹配 -REGEX.lastIndex = 3; - -// 3号位置是粘连,匹配成功 -const match = REGEX.exec('xaxa'); -match.index // 3 -REGEX.lastIndex // 4 -``` - -进一步说,`y`修饰符号隐含了头部匹配的标志`^`。 - -```javascript -/b/y.exec('aba') -// null -``` - -上面代码由于不能保证头部匹配,所以返回`null`。`y`修饰符的设计本意,就是让头部匹配的标志`^`在全局匹配中都有效。 - -在`split`方法中使用`y`修饰符,原字符串必须以分隔符开头。这也意味着,只要匹配成功,数组的第一个成员肯定是空字符串。 - -```javascript -// 没有找到匹配 -'x##'.split(/#/y) -// [ 'x##' ] - -// 找到两个匹配 -'##x'.split(/#/y) -// [ '', '', 'x' ] -``` - -后续的分隔符只有紧跟前面的分隔符,才会被识别。 - -```javascript -'#x#'.split(/#/y) -// [ '', 'x#' ] - -'##'.split(/#/y) -// [ '', '', '' ] -``` - -下面是字符串对象的`replace`方法的例子。 - -```javascript -const REGEX = /a/gy; -'aaxa'.replace(REGEX, '-') // '--xa' -``` - -上面代码中,最后一个`a`因为不是出现下一次匹配的头部,所以不会被替换。 - -单单一个`y`修饰符对`match`方法,只能返回第一个匹配,必须与`g`修饰符联用,才能返回所有匹配。 - -```javascript -'a1a2a3'.match(/a\d/y) // ["a1"] -'a1a2a3'.match(/a\d/gy) // ["a1", "a2", "a3"] -``` - -`y`修饰符的一个应用,是从字符串提取token(词元),`y`修饰符确保了匹配之间不会有漏掉的字符。 - -```javascript -const TOKEN_Y = /\s*(\+|[0-9]+)\s*/y; -const TOKEN_G = /\s*(\+|[0-9]+)\s*/g; - -tokenize(TOKEN_Y, '3 + 4') -// [ '3', '+', '4' ] -tokenize(TOKEN_G, '3 + 4') -// [ '3', '+', '4' ] - -function tokenize(TOKEN_REGEX, str) { - let result = []; - let match; - while (match = TOKEN_REGEX.exec(str)) { - result.push(match[1]); - } - return result; -} -``` - -上面代码中,如果字符串里面没有非法字符,`y`修饰符与`g`修饰符的提取结果是一样的。但是,一旦出现非法字符,两者的行为就不一样了。 - -```javascript -tokenize(TOKEN_Y, '3x + 4') -// [ '3' ] -tokenize(TOKEN_G, '3x + 4') -// [ '3', '+', '4' ] -``` - -上面代码中,`g`修饰符会忽略非法字符,而`y`修饰符不会,这样就很容易发现错误。 - -## sticky属性 - -与`y`修饰符相匹配,ES6的正则对象多了`sticky`属性,表示是否设置了`y`修饰符。 - -```javascript -var r = /hello\d/y; -r.sticky // true -``` - -## flags属性 - -ES6为正则表达式新增了`flags`属性,会返回正则表达式的修饰符。 - -```javascript -// ES5的source属性 -// 返回正则表达式的正文 -/abc/ig.source -// "abc" - -// ES6的flags属性 -// 返回正则表达式的修饰符 -/abc/ig.flags -// 'gi' -``` - -## RegExp.escape() - -字符串必须转义,才能作为正则模式。 - -```javascript -function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); -} - -let str = '/path/to/resource.html?search=query'; -escapeRegExp(str) -// "\/path\/to\/resource\.html\?search=query" -``` - -上面代码中,`str`是一个正常字符串,必须使用反斜杠对其中的特殊字符转义,才能用来作为一个正则匹配的模式。 - -已经有[提议](https://esdiscuss.org/topic/regexp-escape)将这个需求标准化,作为RegExp对象的静态方法[RegExp.escape()](https://github.com/benjamingr/RexExp.escape),放入ES7。2015年7月31日,TC39认为,这个方法有安全风险,又不愿这个方法变得过于复杂,没有同意将其列入ES7,但这不失为一个真实的需求。 - -```javascript -RegExp.escape('The Quick Brown Fox'); -// "The Quick Brown Fox" - -RegExp.escape('Buy it. use it. break it. fix it.'); -// "Buy it\. use it\. break it\. fix it\." - -RegExp.escape('(*.*)'); -// "\(\*\.\*\)" -``` - -字符串转义以后,可以使用RegExp构造函数生成正则模式。 - -```javascript -var str = 'hello. how are you?'; -var regex = new RegExp(RegExp.escape(str), 'g'); -assert.equal(String(regex), '/hello\. how are you\?/g'); -``` - -目前,该方法可以用上文的`escapeRegExp`函数或者垫片模块[regexp.escape](https://github.com/ljharb/regexp.escape)实现。 - -```javascript -var escape = require('regexp.escape'); -escape('hi. how are you?'); -// "hi\\. how are you\\?" -``` - -## s 修饰符:dotAll 模式 - -正则表达式中,点(`.`)是一个特殊字符,代表任意的单个字符,但是行终止符(line terminator character)除外。 - -以下四个字符属于”行终止符“。 - -- U+000A 换行符(`\n`) -- U+000D 回车符(`\r`) -- U+2028 行分隔符(line separator) -- U+2029 段分隔符(paragraph separator) - -```javascript -/foo.bar/.test('foo\nbar') -// false -``` - -上面代码中,因为`.`不匹配`\n`,所以正则表达式返回`false`。 - -但是,很多时候我们希望匹配的是任意单个字符,这时有一种变通的写法。 - -```javascript -/foo[^]bar/.test('foo\nbar') -// true -``` - -这种解决方案毕竟不太符合直觉,所以现在有一个[提案](https://github.com/mathiasbynens/es-regexp-dotall-flag),引入`/s`修饰符,使得`.`可以匹配任意单个字符。 - -```javascript -/foo.bar/s.test('foo\nbar') // true -``` - -这被称为`dotAll`模式,即点(dot)代表一切字符。所以,正则表达式还引入了一个`dotAll`属性,返回一个布尔值,表示该正则表达式是否处在`dotAll`模式。 - -```javascript -const re = /foo.bar/s; -// 另一种写法 -// const re = new RegExp('foo.bar', 's'); - -re.test('foo\nbar') // true -re.dotAll // true -re.flags // 's' -``` - -`/s`修饰符和多行修饰符`/m`不冲突,两者一起使用的情况下,`.`匹配所有字符,而`^`和`$`匹配每一行的行首和行尾。 - -## 后行断言 - -JavaScript 语言的正则表达式,只支持先行断言(lookahead)和先行否定断言(negative lookahead),不支持后行断言(lookbehind)和后行否定断言(negative lookbehind)。 - -目前,有一个[提案](https://github.com/goyakin/es-regexp-lookbehind),引入后行断言。V8 引擎4.9版已经支持,Chrome 浏览器49版打开”experimental JavaScript features“开关(地址栏键入`about:flags`),就可以使用这项功能。 - -”先行断言“指的是,`x`只有在`y`前面才匹配,必须写成`/x(?=y)/`。比如,只匹配百分号之前的数字,要写成`/\d+(?=%)/`。”先行否定断言“指的是,`x`只有不在`y`前面才匹配,必须写成`/x(?!y)/`。比如,只匹配不在百分号之前的数字,要写成`/\d+(?!%)/`。 - -```javascript -/\d+(?=%)/.exec('100% of US presidents have been male') // ["100"] -/\d+(?!%)/.exec('that’s all 44 of them') // ["44"] -``` - -上面两个字符串,如果互换正则表达式,就会匹配失败。另外,还可以看到,”先行断言“括号之中的部分(`(?=%)`),是不计入返回结果的。 - -“后行断言”正好与“先行断言”相反,`x`只有在`y`后面才匹配,必须写成`/(?<=y)x/`。比如,只匹配美元符号之后的数字,要写成`/(?<=\$)\d+/`。”后行否定断言“则与”先行否定断言“相反,`x`只有不在`y`后面才匹配,必须写成`/(?<!y)x/`。比如,只匹配不在美元符号后面的数字,要写成`/(?<!\$)\d+/`。 - -```javascript -/(?<=\$)\d+/.exec('Benjamin Franklin is on the $100 bill') // ["100"] -/(?<!\$)\d+/.exec('it’s is worth about €90') // ["90"] -``` - -上面的例子中,“后行断言”的括号之中的部分(`(?<=\$)`),也是不计入返回结果。 - -“后行断言”的实现,需要先匹配`/(?<=y)x/`的`x`,然后再回到左边,匹配`y`的部分。这种“先右后左”的执行顺序,与所有其他正则操作相反,导致了一些不符合预期的行为。 - -首先,”后行断言“的组匹配,与正常情况下结果是不一样的。 - -```javascript -/(?<=(\d+)(\d+))$/.exec('1053') // ["", "1", "053"] -/^(\d+)(\d+)$/.exec('1053') // ["1053", "105", "3"] -``` - -上面代码中,需要捕捉两个组匹配。没有"后行断言"时,第一个括号是贪婪模式,第二个括号只能捕获一个字符,所以结果是`105`和`3`。而"后行断言"时,由于执行顺序是从右到左,第二个括号是贪婪模式,第一个括号只能捕获一个字符,所以结果是`1`和`053`。 - -其次,"后行断言"的反斜杠引用,也与通常的顺序相反,必须放在对应的那个括号之前。 - -```javascript -/(?<=(o)d\1)r/.exec('hodor') // null -/(?<=\1d(o))r/.exec('hodor') // ["r", "o"] -``` - -上面代码中,如果后行断言的反斜杠引用(`\1`)放在括号的后面,就不会得到匹配结果,必须放在前面才可以。 - -## Unicode属性类 - -目前,有一个[提案](https://github.com/mathiasbynens/es-regexp-unicode-property-escapes),引入了一种新的类的写法`\p{...}`和`\P{...}`,允许正则表达式匹配符合Unicode某种属性的所有字符。 - -```javascript -const regexGreekSymbol = /\p{Script=Greek}/u; -regexGreekSymbol.test('π') // u -``` - -上面代码中,`\p{Script=Greek}`指定匹配一个希腊文字母,所以匹配`π`成功。 - -Unicode属性类要指定属性名和属性值。 - -```javascript -\p{UnicodePropertyName=UnicodePropertyValue} -``` - -对于某些属性,可以只写属性名。 - -```javascript -\p{UnicodePropertyName} -``` - -`\P{…}`是`\p{…}`的反向匹配,即匹配不满足条件的字符。 - -注意,这两种类只对Unicode有效,所以使用的时候一定要加上`u`修饰符。如果不加`u`修饰符,正则表达式使用`\p`和`\P`会报错,ECMAScript预留了这两个类。 - -由于Unicode的各种属性非常多,所以这种新的类的表达能力非常强。 - -```javascript -const regex = /^\p{Decimal_Number}+$/u; -regex.test('𝟏𝟐𝟑𝟜𝟝𝟞𝟩𝟪𝟫𝟬𝟭𝟮𝟯𝟺𝟻𝟼') // true -``` - -上面代码中,属性类指定匹配所有十进制字符,可以看到各种字型的十进制字符都会匹配成功。 - -`\p{Number}`甚至能匹配罗马数字。 - -```javascript -// 匹配所有数字 -const regex = /^\p{Number}+$/u; -regex.test('²³¹¼½¾') // true -regex.test('㉛㉜㉝') // true -regex.test('ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ') // true -``` - -下面是其他一些例子。 - -```javascript -// 匹配各种文字的所有字母,等同于Unicode版的\w -[\p{Alphabetic}\p{Mark}\p{Decimal_Number}\p{Connector_Punctuation}\p{Join_Control}] - -// 匹配各种文字的所有非字母的字符,等同于Unicode版的\W -[^\p{Alphabetic}\p{Mark}\p{Decimal_Number}\p{Connector_Punctuation}\p{Join_Control}] - -// 匹配所有的箭头字符 -const regexArrows = /^\p{Block=Arrows}+$/u; -regexArrows.test('←↑→↓↔↕↖↗↘↙⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇧⇩') // true -``` - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/set-map.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/set-map.md" deleted file mode 100644 index ebba6ded6..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/set-map.md" +++ /dev/null @@ -1,937 +0,0 @@ -# Set和Map数据结构 - -## Set - -### 基本用法 - -ES6 提供了新的数据结构 Set。它类似于数组,但是成员的值都是唯一的,没有重复的值。 - -Set 本身是一个构造函数,用来生成 Set 数据结构。 - -```javascript -const s = new Set(); - -[2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); - -for (let i of s) { - console.log(i); -} -// 2 3 5 4 -``` - -上面代码通过`add`方法向 Set 结构加入成员,结果表明 Set 结构不会添加重复的值。 - -Set 函数可以接受一个数组(或类似数组的对象)作为参数,用来初始化。 - -```javascript -// 例一 -var set = new Set([1, 2, 3, 4, 4]); -[...set] -// [1, 2, 3, 4] - -// 例二 -var items = new Set([1, 2, 3, 4, 5, 5, 5, 5]); -items.size // 5 - -// 例三 -function divs () { - return [...document.querySelectorAll('div')]; -} - -var set = new Set(divs()); -set.size // 56 - -// 类似于 -divs().forEach(div => set.add(div)); -set.size // 56 -``` - -上面代码中,例一和例二都是`Set`函数接受数组作为参数,例三是接受类似数组的对象作为参数。 - -上面代码中,也展示了一种去除数组重复成员的方法。 - -```javascript -// 去除数组的重复成员 -[...new Set(array)] -``` - -向Set加入值的时候,不会发生类型转换,所以`5`和`"5"`是两个不同的值。Set内部判断两个值是否不同,使用的算法叫做“Same-value equality”,它类似于精确相等运算符(`===`),主要的区别是`NaN`等于自身,而精确相等运算符认为`NaN`不等于自身。 - -```javascript -let set = new Set(); -let a = NaN; -let b = NaN; -set.add(a); -set.add(b); -set // Set {NaN} -``` - -上面代码向Set实例添加了两个`NaN`,但是只能加入一个。这表明,在Set内部,两个`NaN`是相等。 - -另外,两个对象总是不相等的。 - -```javascript -let set = new Set(); - -set.add({}); -set.size // 1 - -set.add({}); -set.size // 2 -``` - -上面代码表示,由于两个空对象不相等,所以它们被视为两个值。 - -### Set实例的属性和方法 - -Set结构的实例有以下属性。 - -- `Set.prototype.constructor`:构造函数,默认就是`Set`函数。 -- `Set.prototype.size`:返回`Set`实例的成员总数。 - -Set实例的方法分为两大类:操作方法(用于操作数据)和遍历方法(用于遍历成员)。下面先介绍四个操作方法。 - -- `add(value)`:添加某个值,返回Set结构本身。 -- `delete(value)`:删除某个值,返回一个布尔值,表示删除是否成功。 -- `has(value)`:返回一个布尔值,表示该值是否为`Set`的成员。 -- `clear()`:清除所有成员,没有返回值。 - -上面这些属性和方法的实例如下。 - -```javascript -s.add(1).add(2).add(2); -// 注意2被加入了两次 - -s.size // 2 - -s.has(1) // true -s.has(2) // true -s.has(3) // false - -s.delete(2); -s.has(2) // false -``` - -下面是一个对比,看看在判断是否包括一个键上面,`Object`结构和`Set`结构的写法不同。 - -```javascript -// 对象的写法 -var properties = { - 'width': 1, - 'height': 1 -}; - -if (properties[someName]) { - // do something -} - -// Set的写法 -var properties = new Set(); - -properties.add('width'); -properties.add('height'); - -if (properties.has(someName)) { - // do something -} -``` - -`Array.from`方法可以将Set结构转为数组。 - -```javascript -var items = new Set([1, 2, 3, 4, 5]); -var array = Array.from(items); -``` - -这就提供了去除数组重复成员的另一种方法。 - -```javascript -function dedupe(array) { - return Array.from(new Set(array)); -} - -dedupe([1, 1, 2, 3]) // [1, 2, 3] -``` - -### 遍历操作 - -Set结构的实例有四个遍历方法,可以用于遍历成员。 - -- `keys()`:返回键名的遍历器 -- `values()`:返回键值的遍历器 -- `entries()`:返回键值对的遍历器 -- `forEach()`:使用回调函数遍历每个成员 - -需要特别指出的是,`Set`的遍历顺序就是插入顺序。这个特性有时非常有用,比如使用Set保存一个回调函数列表,调用时就能保证按照添加顺序调用。 - -**(1)`keys()`,`values()`,`entries()`** - -`keys`方法、`values`方法、`entries`方法返回的都是遍历器对象(详见《Iterator 对象》一章)。由于 Set 结构没有键名,只有键值(或者说键名和键值是同一个值),所以`keys`方法和`values`方法的行为完全一致。 - -```javascript -let set = new Set(['red', 'green', 'blue']); - -for (let item of set.keys()) { - console.log(item); -} -// red -// green -// blue - -for (let item of set.values()) { - console.log(item); -} -// red -// green -// blue - -for (let item of set.entries()) { - console.log(item); -} -// ["red", "red"] -// ["green", "green"] -// ["blue", "blue"] -``` - -上面代码中,`entries`方法返回的遍历器,同时包括键名和键值,所以每次输出一个数组,它的两个成员完全相等。 - -Set结构的实例默认可遍历,它的默认遍历器生成函数就是它的`values`方法。 - -```javascript -Set.prototype[Symbol.iterator] === Set.prototype.values -// true -``` - -这意味着,可以省略`values`方法,直接用`for...of`循环遍历Set。 - -```javascript -let set = new Set(['red', 'green', 'blue']); - -for (let x of set) { - console.log(x); -} -// red -// green -// blue -``` - -**(2)`forEach()`** - -Set结构的实例的`forEach`方法,用于对每个成员执行某种操作,没有返回值。 - -```javascript -let set = new Set([1, 2, 3]); -set.forEach((value, key) => console.log(value * 2) ) -// 2 -// 4 -// 6 -``` - -上面代码说明,`forEach`方法的参数就是一个处理函数。该函数的参数依次为键值、键名、集合本身(上例省略了该参数)。另外,`forEach`方法还可以有第二个参数,表示绑定的this对象。 - -**(3)遍历的应用** - -扩展运算符(`...`)内部使用`for...of`循环,所以也可以用于Set结构。 - -```javascript -let set = new Set(['red', 'green', 'blue']); -let arr = [...set]; -// ['red', 'green', 'blue'] -``` - -扩展运算符和Set结构相结合,就可以去除数组的重复成员。 - -```javascript -let arr = [3, 5, 2, 2, 5, 5]; -let unique = [...new Set(arr)]; -// [3, 5, 2] -``` - -而且,数组的`map`和`filter`方法也可以用于Set了。 - -```javascript -let set = new Set([1, 2, 3]); -set = new Set([...set].map(x => x * 2)); -// 返回Set结构:{2, 4, 6} - -let set = new Set([1, 2, 3, 4, 5]); -set = new Set([...set].filter(x => (x % 2) == 0)); -// 返回Set结构:{2, 4} -``` - -因此使用Set可以很容易地实现并集(Union)、交集(Intersect)和差集(Difference)。 - -```javascript -let a = new Set([1, 2, 3]); -let b = new Set([4, 3, 2]); - -// 并集 -let union = new Set([...a, ...b]); -// Set {1, 2, 3, 4} - -// 交集 -let intersect = new Set([...a].filter(x => b.has(x))); -// set {2, 3} - -// 差集 -let difference = new Set([...a].filter(x => !b.has(x))); -// Set {1} -``` - -如果想在遍历操作中,同步改变原来的Set结构,目前没有直接的方法,但有两种变通方法。一种是利用原Set结构映射出一个新的结构,然后赋值给原来的Set结构;另一种是利用`Array.from`方法。 - -```javascript -// 方法一 -let set = new Set([1, 2, 3]); -set = new Set([...set].map(val => val * 2)); -// set的值是2, 4, 6 - -// 方法二 -let set = new Set([1, 2, 3]); -set = new Set(Array.from(set, val => val * 2)); -// set的值是2, 4, 6 -``` - -上面代码提供了两种方法,直接在遍历操作中改变原来的Set结构。 - -## WeakSet - -WeakSet结构与Set类似,也是不重复的值的集合。但是,它与Set有两个区别。 - -首先,WeakSet的成员只能是对象,而不能是其他类型的值。 - -其次,WeakSet中的对象都是弱引用,即垃圾回收机制不考虑WeakSet对该对象的引用,也就是说,如果其他对象都不再引用该对象,那么垃圾回收机制会自动回收该对象所占用的内存,不考虑该对象还存在于WeakSet之中。这个特点意味着,无法引用WeakSet的成员,因此WeakSet是不可遍历的。 - -```javascript -var ws = new WeakSet(); -ws.add(1) -// TypeError: Invalid value used in weak set -ws.add(Symbol()) -// TypeError: invalid value used in weak set -``` - -上面代码试图向WeakSet添加一个数值和`Symbol`值,结果报错,因为WeakSet只能放置对象。 - -WeakSet是一个构造函数,可以使用`new`命令,创建WeakSet数据结构。 - -```javascript -var ws = new WeakSet(); -``` - -作为构造函数,WeakSet可以接受一个数组或类似数组的对象作为参数。(实际上,任何具有iterable接口的对象,都可以作为WeakSet的参数。)该数组的所有成员,都会自动成为WeakSet实例对象的成员。 - -```javascript -var a = [[1,2], [3,4]]; -var ws = new WeakSet(a); -``` - -上面代码中,`a`是一个数组,它有两个成员,也都是数组。将`a`作为WeakSet构造函数的参数,`a`的成员会自动成为WeakSet的成员。 - -注意,是`a`数组的成员成为WeakSet的成员,而不是`a`数组本身。这意味着,数组的成员只能是对象。 - -```javascript -var b = [3, 4]; -var ws = new WeakSet(b); -// Uncaught TypeError: Invalid value used in weak set(…) -``` - -上面代码中,数组`b`的成员不是对象,加入WeaKSet就会报错。 - -WeakSet结构有以下三个方法。 - -- **WeakSet.prototype.add(value)**:向WeakSet实例添加一个新成员。 -- **WeakSet.prototype.delete(value)**:清除WeakSet实例的指定成员。 -- **WeakSet.prototype.has(value)**:返回一个布尔值,表示某个值是否在WeakSet实例之中。 - -下面是一个例子。 - -```javascript -var ws = new WeakSet(); -var obj = {}; -var foo = {}; - -ws.add(window); -ws.add(obj); - -ws.has(window); // true -ws.has(foo); // false - -ws.delete(window); -ws.has(window); // false -``` - -WeakSet没有`size`属性,没有办法遍历它的成员。 - -```javascript -ws.size // undefined -ws.forEach // undefined - -ws.forEach(function(item){ console.log('WeakSet has ' + item)}) -// TypeError: undefined is not a function -``` - -上面代码试图获取`size`和`forEach`属性,结果都不能成功。 - -WeakSet不能遍历,是因为成员都是弱引用,随时可能消失,遍历机制无法保证成员的存在,很可能刚刚遍历结束,成员就取不到了。WeakSet的一个用处,是储存DOM节点,而不用担心这些节点从文档移除时,会引发内存泄漏。 - -下面是WeakSet的另一个例子。 - -```javascript -const foos = new WeakSet() -class Foo { - constructor() { - foos.add(this) - } - method () { - if (!foos.has(this)) { - throw new TypeError('Foo.prototype.method 只能在Foo的实例上调用!'); - } - } -} -``` - -上面代码保证了`Foo`的实例方法,只能在`Foo`的实例上调用。这里使用WeakSet的好处是,`foos`对实例的引用,不会被计入内存回收机制,所以删除实例的时候,不用考虑`foos`,也不会出现内存泄漏。 - -## Map - -### Map结构的目的和基本用法 - -JavaScript的对象(Object),本质上是键值对的集合(Hash结构),但是传统上只能用字符串当作键。这给它的使用带来了很大的限制。 - -```javascript -var data = {}; -var element = document.getElementById('myDiv'); - -data[element] = 'metadata'; -data['[object HTMLDivElement]'] // "metadata" -``` - -上面代码原意是将一个DOM节点作为对象`data`的键,但是由于对象只接受字符串作为键名,所以`element`被自动转为字符串`[object HTMLDivElement]`。 - -为了解决这个问题,ES6提供了Map数据结构。它类似于对象,也是键值对的集合,但是“键”的范围不限于字符串,各种类型的值(包括对象)都可以当作键。也就是说,Object结构提供了“字符串—值”的对应,Map结构提供了“值—值”的对应,是一种更完善的Hash结构实现。如果你需要“键值对”的数据结构,Map比Object更合适。 - -```javascript -var m = new Map(); -var o = {p: 'Hello World'}; - -m.set(o, 'content') -m.get(o) // "content" - -m.has(o) // true -m.delete(o) // true -m.has(o) // false -``` - -上面代码使用`set`方法,将对象`o`当作`m`的一个键,然后又使用`get`方法读取这个键,接着使用`delete`方法删除了这个键。 - -作为构造函数,Map也可以接受一个数组作为参数。该数组的成员是一个个表示键值对的数组。 - -```javascript -var map = new Map([ - ['name', '张三'], - ['title', 'Author'] -]); - -map.size // 2 -map.has('name') // true -map.get('name') // "张三" -map.has('title') // true -map.get('title') // "Author" -``` - -上面代码在新建Map实例时,就指定了两个键`name`和`title`。 - -Map构造函数接受数组作为参数,实际上执行的是下面的算法。 - -```javascript -var items = [ - ['name', '张三'], - ['title', 'Author'] -]; -var map = new Map(); -items.forEach(([key, value]) => map.set(key, value)); -``` - -下面的例子中,字符串`true`和布尔值`true`是两个不同的键。 - -```javascript -var m = new Map([ - [true, 'foo'], - ['true', 'bar'] -]); - -m.get(true) // 'foo' -m.get('true') // 'bar' -``` - -如果对同一个键多次赋值,后面的值将覆盖前面的值。 - -```javascript -let map = new Map(); - -map -.set(1, 'aaa') -.set(1, 'bbb'); - -map.get(1) // "bbb" -``` - -上面代码对键`1`连续赋值两次,后一次的值覆盖前一次的值。 - -如果读取一个未知的键,则返回`undefined`。 - -```javascript -new Map().get('asfddfsasadf') -// undefined -``` - -注意,只有对同一个对象的引用,Map结构才将其视为同一个键。这一点要非常小心。 - -```javascript -var map = new Map(); - -map.set(['a'], 555); -map.get(['a']) // undefined -``` - -上面代码的`set`和`get`方法,表面是针对同一个键,但实际上这是两个值,内存地址是不一样的,因此`get`方法无法读取该键,返回`undefined`。 - -同理,同样的值的两个实例,在Map结构中被视为两个键。 - -```javascript -var map = new Map(); - -var k1 = ['a']; -var k2 = ['a']; - -map -.set(k1, 111) -.set(k2, 222); - -map.get(k1) // 111 -map.get(k2) // 222 -``` - -上面代码中,变量`k1`和`k2`的值是一样的,但是它们在Map结构中被视为两个键。 - -由上可知,Map的键实际上是跟内存地址绑定的,只要内存地址不一样,就视为两个键。这就解决了同名属性碰撞(clash)的问题,我们扩展别人的库的时候,如果使用对象作为键名,就不用担心自己的属性与原作者的属性同名。 - -如果Map的键是一个简单类型的值(数字、字符串、布尔值),则只要两个值严格相等,Map将其视为一个键,包括`0`和`-0`。另外,虽然`NaN`不严格相等于自身,但Map将其视为同一个键。 - -```javascript -let map = new Map(); - -map.set(NaN, 123); -map.get(NaN) // 123 - -map.set(-0, 123); -map.get(+0) // 123 -``` - -### 实例的属性和操作方法 - -Map结构的实例有以下属性和操作方法。 - -**(1)size属性** - -`size`属性返回Map结构的成员总数。 - -```javascript -let map = new Map(); -map.set('foo', true); -map.set('bar', false); - -map.size // 2 -``` - -**(2)set(key, value)** - -`set`方法设置`key`所对应的键值,然后返回整个Map结构。如果`key`已经有值,则键值会被更新,否则就新生成该键。 - -```javascript -var m = new Map(); - -m.set("edition", 6) // 键是字符串 -m.set(262, "standard") // 键是数值 -m.set(undefined, "nah") // 键是undefined -``` - -`set`方法返回的是Map本身,因此可以采用链式写法。 - -```javascript -let map = new Map() - .set(1, 'a') - .set(2, 'b') - .set(3, 'c'); -``` - -**(3)get(key)** - -`get`方法读取`key`对应的键值,如果找不到`key`,返回`undefined`。 - -```javascript -var m = new Map(); - -var hello = function() {console.log("hello");} -m.set(hello, "Hello ES6!") // 键是函数 - -m.get(hello) // Hello ES6! -``` - -**(4)has(key)** - -`has`方法返回一个布尔值,表示某个键是否在Map数据结构中。 - -```javascript -var m = new Map(); - -m.set("edition", 6); -m.set(262, "standard"); -m.set(undefined, "nah"); - -m.has("edition") // true -m.has("years") // false -m.has(262) // true -m.has(undefined) // true -``` - -**(5)delete(key)** - -`delete`方法删除某个键,返回true。如果删除失败,返回false。 - -```javascript -var m = new Map(); -m.set(undefined, "nah"); -m.has(undefined) // true - -m.delete(undefined) -m.has(undefined) // false -``` -**(6)clear()** - -`clear`方法清除所有成员,没有返回值。 - -```javascript -let map = new Map(); -map.set('foo', true); -map.set('bar', false); - -map.size // 2 -map.clear() -map.size // 0 -``` - -### 遍历方法 - -Map原生提供三个遍历器生成函数和一个遍历方法。 - -- `keys()`:返回键名的遍历器。 -- `values()`:返回键值的遍历器。 -- `entries()`:返回所有成员的遍历器。 -- `forEach()`:遍历Map的所有成员。 - -需要特别注意的是,Map的遍历顺序就是插入顺序。 - -下面是使用实例。 - -```javascript -let map = new Map([ - ['F', 'no'], - ['T', 'yes'], -]); - -for (let key of map.keys()) { - console.log(key); -} -// "F" -// "T" - -for (let value of map.values()) { - console.log(value); -} -// "no" -// "yes" - -for (let item of map.entries()) { - console.log(item[0], item[1]); -} -// "F" "no" -// "T" "yes" - -// 或者 -for (let [key, value] of map.entries()) { - console.log(key, value); -} - -// 等同于使用map.entries() -for (let [key, value] of map) { - console.log(key, value); -} -``` - -上面代码最后的那个例子,表示Map结构的默认遍历器接口(`Symbol.iterator`属性),就是`entries`方法。 - -```javascript -map[Symbol.iterator] === map.entries -// true -``` - -Map结构转为数组结构,比较快速的方法是结合使用扩展运算符(`...`)。 - -```javascript -let map = new Map([ - [1, 'one'], - [2, 'two'], - [3, 'three'], -]); - -[...map.keys()] -// [1, 2, 3] - -[...map.values()] -// ['one', 'two', 'three'] - -[...map.entries()] -// [[1,'one'], [2, 'two'], [3, 'three']] - -[...map] -// [[1,'one'], [2, 'two'], [3, 'three']] -``` - -结合数组的`map`方法、`filter`方法,可以实现Map的遍历和过滤(Map本身没有`map`和`filter`方法)。 - -```javascript -let map0 = new Map() - .set(1, 'a') - .set(2, 'b') - .set(3, 'c'); - -let map1 = new Map( - [...map0].filter(([k, v]) => k < 3) -); -// 产生Map结构 {1 => 'a', 2 => 'b'} - -let map2 = new Map( - [...map0].map(([k, v]) => [k * 2, '_' + v]) - ); -// 产生Map结构 {2 => '_a', 4 => '_b', 6 => '_c'} -``` - -此外,Map还有一个`forEach`方法,与数组的`forEach`方法类似,也可以实现遍历。 - -```javascript -map.forEach(function(value, key, map) { - console.log("Key: %s, Value: %s", key, value); -}); -``` - -`forEach`方法还可以接受第二个参数,用来绑定`this`。 - -```javascript -var reporter = { - report: function(key, value) { - console.log("Key: %s, Value: %s", key, value); - } -}; - -map.forEach(function(value, key, map) { - this.report(key, value); -}, reporter); -``` - -上面代码中,`forEach`方法的回调函数的`this`,就指向`reporter`。 - -### 与其他数据结构的互相转换 - -**(1)Map转为数组** - -前面已经提过,Map转为数组最方便的方法,就是使用扩展运算符(...)。 - -```javascript -let myMap = new Map().set(true, 7).set({foo: 3}, ['abc']); -[...myMap] -// [ [ true, 7 ], [ { foo: 3 }, [ 'abc' ] ] ] -``` - -**(2)数组转为Map** - -将数组转入Map构造函数,就可以转为Map。 - -```javascript -new Map([[true, 7], [{foo: 3}, ['abc']]]) -// Map {true => 7, Object {foo: 3} => ['abc']} -``` - -**(3)Map转为对象** - -如果所有Map的键都是字符串,它可以转为对象。 - -```javascript -function strMapToObj(strMap) { - let obj = Object.create(null); - for (let [k,v] of strMap) { - obj[k] = v; - } - return obj; -} - -let myMap = new Map().set('yes', true).set('no', false); -strMapToObj(myMap) -// { yes: true, no: false } -``` - -**(4)对象转为Map** - -```javascript -function objToStrMap(obj) { - let strMap = new Map(); - for (let k of Object.keys(obj)) { - strMap.set(k, obj[k]); - } - return strMap; -} - -objToStrMap({yes: true, no: false}) -// [ [ 'yes', true ], [ 'no', false ] ] -``` - -**(5)Map转为JSON** - -Map转为JSON要区分两种情况。一种情况是,Map的键名都是字符串,这时可以选择转为对象JSON。 - -```javascript -function strMapToJson(strMap) { - return JSON.stringify(strMapToObj(strMap)); -} - -let myMap = new Map().set('yes', true).set('no', false); -strMapToJson(myMap) -// '{"yes":true,"no":false}' -``` - -另一种情况是,Map的键名有非字符串,这时可以选择转为数组JSON。 - -```javascript -function mapToArrayJson(map) { - return JSON.stringify([...map]); -} - -let myMap = new Map().set(true, 7).set({foo: 3}, ['abc']); -mapToArrayJson(myMap) -// '[[true,7],[{"foo":3},["abc"]]]' -``` - -**(6)JSON转为Map** - -JSON转为Map,正常情况下,所有键名都是字符串。 - -```javascript -function jsonToStrMap(jsonStr) { - return objToStrMap(JSON.parse(jsonStr)); -} - -jsonToStrMap('{"yes":true,"no":false}') -// Map {'yes' => true, 'no' => false} -``` - -但是,有一种特殊情况,整个JSON就是一个数组,且每个数组成员本身,又是一个有两个成员的数组。这时,它可以一一对应地转为Map。这往往是数组转为JSON的逆操作。 - -```javascript -function jsonToMap(jsonStr) { - return new Map(JSON.parse(jsonStr)); -} - -jsonToMap('[[true,7],[{"foo":3},["abc"]]]') -// Map {true => 7, Object {foo: 3} => ['abc']} -``` - -## WeakMap - -`WeakMap`结构与`Map`结构基本类似,唯一的区别是它只接受对象作为键名(`null`除外),不接受其他类型的值作为键名,而且键名所指向的对象,不计入垃圾回收机制。 - -```javascript -var map = new WeakMap() -map.set(1, 2) -// TypeError: 1 is not an object! -map.set(Symbol(), 2) -// TypeError: Invalid value used as weak map key -``` - -上面代码中,如果将`1`和`Symbol`作为WeakMap的键名,都会报错。 - -`WeakMap`的设计目的在于,键名是对象的弱引用(垃圾回收机制不将该引用考虑在内),所以其所对应的对象可能会被自动回收。当对象被回收后,`WeakMap`自动移除对应的键值对。典型应用是,一个对应DOM元素的`WeakMap`结构,当某个DOM元素被清除,其所对应的`WeakMap`记录就会自动被移除。基本上,`WeakMap`的专用场合就是,它的键所对应的对象,可能会在将来消失。`WeakMap`结构有助于防止内存泄漏。 - -下面是`WeakMap`结构的一个例子,可以看到用法上与`Map`几乎一样。 - -```javascript -var wm = new WeakMap(); -var element = document.querySelector(".element"); - -wm.set(element, "Original"); -wm.get(element) // "Original" - -element.parentNode.removeChild(element); -element = null; -wm.get(element) // undefined -``` - -上面代码中,变量`wm`是一个`WeakMap`实例,我们将一个`DOM`节点`element`作为键名,然后销毁这个节点,`element`对应的键就自动消失了,再引用这个键名就返回`undefined`。 - -WeakMap与Map在API上的区别主要是两个,一是没有遍历操作(即没有`key()`、`values()`和`entries()`方法),也没有`size`属性;二是无法清空,即不支持`clear`方法。这与`WeakMap`的键不被计入引用、被垃圾回收机制忽略有关。因此,`WeakMap`只有四个方法可用:`get()`、`set()`、`has()`、`delete()`。 - -```javascript -var wm = new WeakMap(); - -wm.size -// undefined - -wm.forEach -// undefined -``` - -前文说过,WeakMap应用的典型场合就是DOM节点作为键名。下面是一个例子。 - -```javascript -let myElement = document.getElementById('logo'); -let myWeakmap = new WeakMap(); - -myWeakmap.set(myElement, {timesClicked: 0}); - -myElement.addEventListener('click', function() { - let logoData = myWeakmap.get(myElement); - logoData.timesClicked++; -}, false); -``` - -上面代码中,`myElement`是一个 DOM 节点,每当发生`click`事件,就更新一下状态。我们将这个状态作为键值放在 WeakMap 里,对应的键名就是`myElement`。一旦这个 DOM 节点删除,该状态就会自动消失,不存在内存泄漏风险。 - -WeakMap 的另一个用处是部署私有属性。 - -```javascript -let _counter = new WeakMap(); -let _action = new WeakMap(); - -class Countdown { - constructor(counter, action) { - _counter.set(this, counter); - _action.set(this, action); - } - dec() { - let counter = _counter.get(this); - if (counter < 1) return; - counter--; - _counter.set(this, counter); - if (counter === 0) { - _action.get(this)(); - } - } -} - -let c = new Countdown(2, () => console.log('DONE')); - -c.dec() -c.dec() -// DONE -``` - -上面代码中,Countdown类的两个内部属性`_counter`和`_action`,是实例的弱引用,所以如果删除实例,它们也就随之消失,不会造成内存泄漏。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/simd.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/simd.md" deleted file mode 100644 index 65e0f64c3..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/simd.md" +++ /dev/null @@ -1,716 +0,0 @@ -# SIMD - -## 概述 - -SIMD(发音`/sim-dee/`)是“Single Instruction/Multiple Data”的缩写,意为“单指令,多数据”。它是 JavaScript 操作 CPU 对应指令的接口,你可以看做这是一种不同的运算执行模式。与它相对的是 SISD(“Single Instruction/Single Data”),即“单指令,单数据”。 - -SIMD 的含义是使用一个指令,完成多个数据的运算;SISD 的含义是使用一个指令,完成单个数据的运算,这是 JavaScript 的默认运算模式。显而易见,SIMD 的执行效率要高于 SISD,所以被广泛用于3D图形运算、物理模拟等运算量超大的项目之中。 - -为了理解SIMD,请看下面的例子。 - -```javascript -var a = [1, 2, 3, 4]; -var b = [5, 6, 7, 8]; -var c = []; - -c[0] = a[0] + b[0]; -c[1] = a[1] + b[1]; -c[2] = a[2] + b[2]; -c[3] = a[3] + b[3]; -c // Array[6, 8, 10, 12] -``` - -上面代码中,数组`a`和`b`的对应成员相加,结果放入数组`c`。它的运算模式是依次处理每个数组成员,一共有四个数组成员,所以需要运算4次。 - -如果采用 SIMD 模式,只要运算一次就够了。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 4); -var b = SIMD.Float32x4(5, 6, 7, 8); -var c = SIMD.Float32x4.add(a, b); // Float32x4[6, 8, 10, 12] -``` - -上面代码之中,数组`a`和`b`的四个成员的各自相加,只用一条指令就完成了。因此,速度比上一种写法提高了4倍。 - -一次 SIMD 运算,可以处理多个数据,这些数据被称为“通道”(lane)。上面代码中,一次运算了四个数据,因此就是四个通道。 - -SIMD 通常用于矢量运算。 - -```javascript -v + w = 〈v1, …, vn〉+ 〈w1, …, wn〉 - = 〈v1+w1, …, vn+wn〉 -``` - -上面代码中,`v`和`w`是两个多元矢量。它们的加运算,在 SIMD 下是一个指令、而不是 n 个指令完成的,这就大大提高了效率。这对于3D动画、图像处理、信号处理、数值处理、加密等运算是非常重要的。比如,Canvas的`getImageData()`会将图像文件读成一个二进制数组,SIMD 就很适合对于这种数组的处理。 - -总的来说,SIMD 是数据并行处理(parallelism)的一种手段,可以加速一些运算密集型操作的速度。将来与 WebAssembly 结合以后,可以让 JavaScript 达到二进制代码的运行速度。 - -## 数据类型 - -SIMD 提供12种数据类型,总长度都是128个二进制位。 - -- Float32x4:四个32位浮点数 -- Float64x2:两个64位浮点数 -- Int32x4:四个32位整数 -- Int16x8:八个16位整数 -- Int8x16:十六个8位整数 -- Uint32x4:四个无符号的32位整数 -- Uint16x8:八个无符号的16位整数 -- Uint8x16:十六个无符号的8位整数 -- Bool32x4:四个32位布尔值 -- Bool16x8:八个16位布尔值 -- Bool8x16:十六个8位布尔值 -- Bool64x2:两个64位布尔值 - -每种数据类型被`x`符号分隔成两部分,后面的部分表示通道数,前面的部分表示每个通道的宽度和类型。比如,`Float32x4`就表示这个值有4个通道,每个通道是一个32位浮点数。 - -每个通道之中,可以放置四种数据。 - -- 浮点数(float,比如1.0) -- 带符号的整数(Int,比如-1) -- 无符号的整数(Uint,比如1) -- 布尔值(Bool,包含`true`和`false`两种值) - -每种 SIMD 的数据类型都是一个函数方法,可以传入参数,生成对应的值。 - -```javascript -var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -``` - -上面代码中,变量`a`就是一个128位、包含四个32位浮点数(即四个通道)的值。 - -注意,这些数据类型方法都不是构造函数,前面不能加`new`,否则会报错。 - -```javascript -var v = new SIMD.Float32x4(0, 1, 2, 3); -// TypeError: SIMD.Float32x4 is not a constructor -``` - -## 静态方法:数学运算 - -每种数据类型都有一系列运算符,支持基本的数学运算。 - -### SIMD.%type%.abs(),SIMD.%type%.neg() - -`abs`方法接受一个SIMD值作为参数,将它的每个通道都转成绝对值,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 0, NaN); -SIMD.Float32x4.abs(a) -// Float32x4[1, 2, 0, NaN] -``` - -`neg`方法接受一个SIMD值作为参数,将它的每个通道都转成负值,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 3, 0); -SIMD.Float32x4.neg(a) -// Float32x4[1, 2, -3, -0] - -var b = SIMD.Float64x2(NaN, Infinity); -SIMD.Float64x2.neg(b) -// Float64x2[NaN, -Infinity] -``` - -### SIMD.%type%.add(),SIMD.%type%.addSaturate() - -`add`方法接受两个SIMD值作为参数,将它们的每个通道相加,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -var b = SIMD.Float32x4(5.0, 10.0, 15.0, 20.0); -var c = SIMD.Float32x4.add(a, b); -``` - -上面代码中,经过加法运算,新的SIMD值为`(6.0, 12.0, 18.0. 24.0)`。 - -`addSaturate`方法跟`add`方法的作用相同,都是两个通道相加,但是溢出的处理不一致。对于`add`方法,如果两个值相加发生溢出,溢出的二进制位会被丢弃; `addSaturate`方法则是返回该数据类型的最大值。 - -```javascript -var a = SIMD.Uint16x8(65533, 65534, 65535, 65535, 1, 1, 1, 1); -var b = SIMD.Uint16x8(1, 1, 1, 5000, 1, 1, 1, 1); -SIMD.Uint16x8.addSaturate(a, b); -// Uint16x8[65534, 65535, 65535, 65535, 2, 2, 2, 2] - -var c = SIMD.Int16x8(32765, 32766, 32767, 32767, 1, 1, 1, 1); -var d = SIMD.Int16x8(1, 1, 1, 5000, 1, 1, 1, 1); -SIMD.Int16x8.addSaturate(c, d); -// Int16x8[32766, 32767, 32767, 32767, 2, 2, 2, 2] -``` - -上面代码中,`Uint16`的最大值是65535,`Int16`的最大值是32767。一旦发生溢出,就返回这两个值。 - -注意,`Uint32x4`和`Int32x4`这两种数据类型没有`addSaturate`方法。 - -### SIMD.%type%.sub(),SIMD.%type%.subSaturate() - -`sub`方法接受两个SIMD值作为参数,将它们的每个通道相减,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 3, 4); -var b = SIMD.Float32x4(3, 3, 3, 3); -SIMD.Float32x4.sub(a, b) -// Float32x4[-4, -5, 0, 1] -``` - -`subSaturate`方法跟`sub`方法的作用相同,都是两个通道相减,但是溢出的处理不一致。对于`sub`方法,如果两个值相减发生溢出,溢出的二进制位会被丢弃; `subSaturate`方法则是返回该数据类型的最小值。 - -```javascript -var a = SIMD.Uint16x8(5, 1, 1, 1, 1, 1, 1, 1); -var b = SIMD.Uint16x8(10, 1, 1, 1, 1, 1, 1, 1); -SIMD.Uint16x8.subSaturate(a, b) -// Uint16x8[0, 0, 0, 0, 0, 0, 0, 0] - -var c = SIMD.Int16x8(-100, 0, 0, 0, 0, 0, 0, 0); -var d = SIMD.Int16x8(32767, 0, 0, 0, 0, 0, 0, 0); -SIMD.Int16x8.subSaturate(c, d) -// Int16x8[-32768, 0, 0, 0, 0, 0, 0, 0, 0] -``` - -上面代码中,`Uint16`的最小值是`0`,`subSaturate`的最小值是`-32678`。一旦运算发生溢出,就返回最小值。 - -### SIMD.%type%.mul(),SIMD.%type%.div(),SIMD.%type%.sqrt() - -`mul`方法接受两个SIMD值作为参数,将它们的每个通道相乘,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 3, 4); -var b = SIMD.Float32x4(3, 3, 3, 3); -SIMD.Float32x4.mul(a, b) -// Float32x4[-3, -6, 9, 12] -``` - -`div`方法接受两个SIMD值作为参数,将它们的每个通道相除,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(2, 2, 2, 2); -var b = SIMD.Float32x4(4, 4, 4, 4); -SIMD.Float32x4.div(a, b) -// Float32x4[0.5, 0.5, 0.5, 0.5] -``` - -`sqrt`方法接受一个SIMD值作为参数,求出每个通道的平方根,作为一个新的SIMD值返回。 - -```javascript -var b = SIMD.Float64x2(4, 8); -SIMD.Float64x2.sqrt(b) -// Float64x2[2, 2.8284271247461903] -``` - -### SIMD.%FloatType%.reciprocalApproximation(),SIMD.%type%.reciprocalSqrtApproximation() - -`reciprocalApproximation`方法接受一个SIMD值作为参数,求出每个通道的倒数(`1 / x`),作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 4); -SIMD.Float32x4.reciprocalApproximation(a); -// Float32x4[1, 0.5, 0.3333333432674408, 0.25] -``` - -`reciprocalSqrtApproximation`方法接受一个SIMD值作为参数,求出每个通道的平方根的倒数(`1 / (x^0.5)`),作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 4); -SIMD.Float32x4.reciprocalSqrtApproximation(a) -// Float32x4[1, 0.7071067690849304, 0.5773502588272095, 0.5] -``` - -注意,只有浮点数的数据类型才有这两个方法。 - -### SIMD.%IntegerType%.shiftLeftByScalar() - -`shiftLeftByScalar`方法接受一个SIMD值作为参数,然后将每个通道的值左移指定的位数,作为一个新的SIMD值返回。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, 8); -SIMD.Int32x4.shiftLeftByScalar(a, 1); -// Int32x4[2, 4, 8, 16] -``` - -如果左移后,新的值超出了当前数据类型的位数,溢出的部分会被丢弃。 - -```javascript -var ix4 = SIMD.Int32x4(1, 2, 3, 4); -var jx4 = SIMD.Int32x4.shiftLeftByScalar(ix4, 32); -// Int32x4[0, 0, 0, 0] -``` - -注意,只有整数的数据类型才有这个方法。 - -### SIMD.%IntegerType%.shiftRightByScalar() - -`shiftRightByScalar`方法接受一个SIMD值作为参数,然后将每个通道的值右移指定的位数,返回一个新的SIMD值。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, -8); -SIMD.Int32x4.shiftRightByScalar(a, 1); -// Int32x4[0, 1, 2, -4] -``` - -如果原来通道的值是带符号的值,则符号位保持不变,不受右移影响。如果是不带符号位的值,则右移后头部会补`0`。 - -```javascript -var a = SIMD.Uint32x4(1, 2, 4, -8); -SIMD.Uint32x4.shiftRightByScalar(a, 1); -// Uint32x4[0, 1, 2, 2147483644] -``` - -上面代码中,`-8`右移一位变成了`2147483644`,是因为对于32位无符号整数来说,`-8`的二进制形式是`11111111111111111111111111111000`,右移一位就变成了`01111111111111111111111111111100`,相当于`2147483644`。 - -注意,只有整数的数据类型才有这个方法。 - -## 静态方法:通道处理 - -### SIMD.%type%.check() - -`check`方法用于检查一个值是否为当前类型的SIMD值。如果是的,就返回这个值,否则就报错。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 9); - -SIMD.Float32x4.check(a); -// Float32x4[1, 2, 3, 9] - -SIMD.Float32x4.check([1,2,3,4]) // 报错 -SIMD.Int32x4.check(a) // 报错 -SIMD.Int32x4.check('hello world') // 报错 -``` - -### SIMD.%type%.extractLane(),SIMD.%type%.replaceLane() - -`extractLane`方法用于返回给定通道的值。它接受两个参数,分别是SIMD值和通道编号。 - -```javascript -var t = SIMD.Float32x4(1, 2, 3, 4); -SIMD.Float32x4.extractLane(t, 2) // 3 -``` - -`replaceLane`方法用于替换指定通道的值,并返回一个新的SIMD值。它接受三个参数,分别是原来的SIMD值、通道编号和新的通道值。 - -```javascript -var t = SIMD.Float32x4(1, 2, 3, 4); -SIMD.Float32x4.replaceLane(t, 2, 42) -// Float32x4[1, 2, 42, 4] -``` - -### SIMD.%type%.load() - -`load`方法用于从二进制数组读入数据,生成一个新的SIMD值。 - -```javascript -var a = new Int32Array([1,2,3,4,5,6,7,8]); -SIMD.Int32x4.load(a, 0); -// Int32x4[1, 2, 3, 4] - -var b = new Int32Array([1,2,3,4,5,6,7,8]); -SIMD.Int32x4.load(a, 2); -// Int32x4[3, 4, 5, 6] -``` - -`load`方法接受两个参数:一个二进制数组和开始读取的位置(从0开始)。如果位置不合法(比如`-1`或者超出二进制数组的大小),就会抛出一个错误。 - -这个方法还有三个变种`load1()`、`load2()`、`load3()`,表示从指定位置开始,只加载一个通道、二个通道、三个通道的值。 - -```javascript -// 格式 -SIMD.Int32x4.load(tarray, index) -SIMD.Int32x4.load1(tarray, index) -SIMD.Int32x4.load2(tarray, index) -SIMD.Int32x4.load3(tarray, index) - -// 实例 -var a = new Int32Array([1,2,3,4,5,6,7,8]); -SIMD.Int32x4.load1(a, 0); -// Int32x4[1, 0, 0, 0] -SIMD.Int32x4.load2(a, 0); -// Int32x4[1, 2, 0, 0] -SIMD.Int32x4.load3(a, 0); -// Int32x4[1, 2, 3,0] -``` - -### SIMD.%type%.store() - -`store`方法用于将一个SIMD值,写入一个二进制数组。它接受三个参数,分别是二进制数组、开始写入的数组位置、SIMD值。它返回写入值以后的二进制数组。 - -```javascript -var t1 = new Int32Array(8); -var v1 = SIMD.Int32x4(1, 2, 3, 4); -SIMD.Int32x4.store(t1, 0, v1) -// Int32Array[1, 2, 3, 4, 0, 0, 0, 0] - -var t2 = new Int32Array(8); -var v2 = SIMD.Int32x4(1, 2, 3, 4); -SIMD.Int32x4.store(t2, 2, v2) -// Int32Array[0, 0, 1, 2, 3, 4, 0, 0] -``` - -上面代码中,`t1`是一个二进制数组,`v1`是一个SIMD值,只有四个通道。所以写入`t1`以后,只有前四个位置有值,后四个位置都是0。而`t2`是从2号位置开始写入,所以前两个位置和后两个位置都是0。 - -这个方法还有三个变种`store1()`、`store2()`和`store3()`,表示只写入一个通道、二个通道和三个通道的值。 - -```javascript -var tarray = new Int32Array(8); -var value = SIMD.Int32x4(1, 2, 3, 4); -SIMD.Int32x4.store1(tarray, 0, value); -// Int32Array[1, 0, 0, 0, 0, 0, 0, 0] -``` - -### SIMD.%type%.splat() - -`splat`方法返回一个新的SIMD值,该值的所有通道都会设成同一个预先给定的值。 - -```javascript -SIMD.Float32x4.splat(3); -// Float32x4[3, 3, 3, 3] -SIMD.Float64x2.splat(3); -// Float64x2[3, 3] -``` - -如果省略参数,所有整数型的SIMD值都会设定`0`,浮点型的SIMD值都会设成`NaN`。 - -### SIMD.%type%.swizzle() - -`swizzle`方法返回一个新的SIMD值,重新排列原有的SIMD值的通道顺序。 - -```javascript -var t = SIMD.Float32x4(1, 2, 3, 4); -SIMD.Float32x4.swizzle(t, 1, 2, 0, 3); -// Float32x4[2,3,1,4] -``` - -上面代码中,`swizzle`方法的第一个参数是原有的SIMD值,后面的参数对应将要返回的SIMD值的四个通道。它的意思是新的SIMD的四个通道,依次是原来SIMD值的1号通道、2号通道、0号通道、3号通道。由于SIMD值最多可以有16个通道,所以`swizzle`方法除了第一个参数以外,最多还可以接受16个参数。 - -下面是另一个例子。 - -```javascript -var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -// Float32x4[1.0, 2.0, 3.0, 4.0] - -var b = SIMD.Float32x4.swizzle(a, 0, 0, 1, 1); -// Float32x4[1.0, 1.0, 2.0, 2.0] - -var c = SIMD.Float32x4.swizzle(a, 3, 3, 3, 3); -// Float32x4[4.0, 4.0, 4.0, 4.0] - -var d = SIMD.Float32x4.swizzle(a, 3, 2, 1, 0); -// Float32x4[4.0, 3.0, 2.0, 1.0] -``` - -### SIMD.%type%.shuffle() - -`shuffle`方法从两个SIMD值之中取出指定通道,返回一个新的SIMD值。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 4); -var b = SIMD.Float32x4(5, 6, 7, 8); - -SIMD.Float32x4.shuffle(a, b, 1, 5, 7, 2); -// Float32x4[2, 6, 8, 3] -``` - -上面代码中,`a`和`b`一共有8个通道,依次编号为0到7。`shuffle`根据编号,取出相应的通道,返回一个新的SIMD值。 - -## 静态方法:比较运算 - -### SIMD.%type%.equal(),SIMD.%type%.notEqual() - -`equal`方法用来比较两个SIMD值`a`和`b`的每一个通道,根据两者是否精确相等(`a === b`),得到一个布尔值。最后,所有通道的比较结果,组成一个新的SIMD值,作为掩码返回。`notEqual`方法则是比较两个通道是否不相等(`a !== b`)。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 9); -var b = SIMD.Float32x4(1, 4, 7, 9); - -SIMD.Float32x4.equal(a,b) -// Bool32x4[true, false, false, true] - -SIMD.Float32x4.notEqual(a,b); -// Bool32x4[false, true, true, false] -``` - -### SIMD.%type%.greaterThan(),SIMD.%type%.greaterThanOrEqual() - -`greatThan`方法用来比较两个SIMD值`a`和`b`的每一个通道,如果在该通道中,`a`较大就得到`true`,否则得到`false`。最后,所有通道的比较结果,组成一个新的SIMD值,作为掩码返回。`greaterThanOrEqual`则是比较`a`是否大于等于`b`。 - -```javascript -var a = SIMD.Float32x4(1, 6, 3, 11); -var b = SIMD.Float32x4(1, 4, 7, 9); - -SIMD.Float32x4.greaterThan(a, b) -// Bool32x4[false, true, false, true] - -SIMD.Float32x4.greaterThanOrEqual(a, b) -// Bool32x4[true, true, false, true] -``` - -### SIMD.%type%.lessThan(),SIMD.%type%.lessThanOrEqual() - -`lessThan`方法用来比较两个SIMD值`a`和`b`的每一个通道,如果在该通道中,`a`较小就得到`true`,否则得到`false`。最后,所有通道的比较结果,会组成一个新的SIMD值,作为掩码返回。`lessThanOrEqual`方法则是比较`a`是否等于`b`。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 11); -var b = SIMD.Float32x4(1, 4, 7, 9); - -SIMD.Float32x4.lessThan(a, b) -// Bool32x4[false, true, true, false] - -SIMD.Float32x4.lessThanOrEqual(a, b) -// Bool32x4[true, true, true, false] -``` - -### SIMD.%type%.select() - -`select`方法通过掩码生成一个新的SIMD值。它接受三个参数,分别是掩码和两个SIMD值。 - -```javascript -var a = SIMD.Float32x4(1, 2, 3, 4); -var b = SIMD.Float32x4(5, 6, 7, 8); - -var mask = SIMD.Bool32x4(true, false, false, true); - -SIMD.Float32x4.select(mask, a, b); -// Float32x4[1, 6, 7, 4] -``` - -上面代码中,`select`方法接受掩码和两个SIMD值作为参数。当某个通道对应的掩码为`true`时,会选择第一个SIMD值的对应通道,否则选择第二个SIMD值的对应通道。 - -这个方法通常与比较运算符结合使用。 - -```javascript -var a = SIMD.Float32x4(0, 12, 3, 4); -var b = SIMD.Float32x4(0, 6, 7, 50); - -var mask = SIMD.Float32x4.lessThan(a,b); -// Bool32x4[false, false, true, true] - -var result = SIMD.Float32x4.select(mask, a, b); -// Float32x4[0, 6, 3, 4] -``` - -上面代码中,先通过`lessThan`方法生成一个掩码,然后通过`select`方法生成一个由每个通道的较小值组成的新的SIMD值。 - -### SIMD.%BooleanType%.allTrue(),SIMD.%BooleanType%.anyTrue() - -`allTrue`方法接受一个SIMD值作为参数,然后返回一个布尔值,表示该SIMD值的所有通道是否都为`true`。 - -```javascript -var a = SIMD.Bool32x4(true, true, true, true); -var b = SIMD.Bool32x4(true, false, true, true); - -SIMD.Bool32x4.allTrue(a); // true -SIMD.Bool32x4.allTrue(b); // false -``` - -`anyTrue`方法则是只要有一个通道为`true`,就返回`true`,否则返回`false`。 - -```javascript -var a = SIMD.Bool32x4(false, false, false, false); -var b = SIMD.Bool32x4(false, false, true, false); - -SIMD.Bool32x4.anyTrue(a); // false -SIMD.Bool32x4.anyTrue(b); // true -``` - -注意,只有四种布尔值数据类型(`Bool32x4`、`Bool16x8`、`Bool8x16`、`Bool64x2`)才有这两个方法。 - -这两个方法通常与比较运算符结合使用。 - -```javascript -var ax4 = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -var bx4 = SIMD.Float32x4(0.0, 6.0, 7.0, 8.0); -var ix4 = SIMD.Float32x4.lessThan(ax4, bx4); -var b1 = SIMD.Int32x4.allTrue(ix4); // false -var b2 = SIMD.Int32x4.anyTrue(ix4); // true -``` - -### SIMD.%type%.min(),SIMD.%type%.minNum() - -`min`方法接受两个SIMD值作为参数,将两者的对应通道的较小值,组成一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 3, 5.2); -var b = SIMD.Float32x4(0, -4, 6, 5.5); -SIMD.Float32x4.min(a, b); -// Float32x4[-1, -4, 3, 5.2] -``` - -如果有一个通道的值是`NaN`,则会优先返回`NaN`。 - -```javascript -var c = SIMD.Float64x2(NaN, Infinity) -var d = SIMD.Float64x2(1337, 42); -SIMD.Float64x2.min(c, d); -// Float64x2[NaN, 42] -``` - -`minNum`方法与`min`的作用一模一样,唯一的区别是如果有一个通道的值是`NaN`,则会优先返回另一个通道的值。 - -```javascript -var ax4 = SIMD.Float32x4(1.0, 2.0, NaN, NaN); -var bx4 = SIMD.Float32x4(2.0, 1.0, 3.0, NaN); -var cx4 = SIMD.Float32x4.min(ax4, bx4); -// Float32x4[1.0, 1.0, NaN, NaN] -var dx4 = SIMD.Float32x4.minNum(ax4, bx4); -// Float32x4[1.0, 1.0, 3.0, NaN] -``` - -### SIMD.%type%.max(),SIMD.%type%.maxNum() - -`max`方法接受两个SIMD值作为参数,将两者的对应通道的较大值,组成一个新的SIMD值返回。 - -```javascript -var a = SIMD.Float32x4(-1, -2, 3, 5.2); -var b = SIMD.Float32x4(0, -4, 6, 5.5); -SIMD.Float32x4.max(a, b); -// Float32x4[0, -2, 6, 5.5] -``` - -如果有一个通道的值是`NaN`,则会优先返回`NaN`。 - -```javascript -var c = SIMD.Float64x2(NaN, Infinity) -var d = SIMD.Float64x2(1337, 42); -SIMD.Float64x2.max(c, d) -// Float64x2[NaN, Infinity] -``` - -`maxNum`方法与`max`的作用一模一样,唯一的区别是如果有一个通道的值是`NaN`,则会优先返回另一个通道的值。 - -```javascript -var c = SIMD.Float64x2(NaN, Infinity) -var d = SIMD.Float64x2(1337, 42); -SIMD.Float64x2.maxNum(c, d) -// Float64x2[1337, Infinity] -``` - -## 静态方法:位运算 - -### SIMD.%type%.and(),SIMD.%type%.or(),SIMD.%type%.xor(),SIMD.%type%.not() - -`and`方法接受两个SIMD值作为参数,返回两者对应的通道进行二进制`AND`运算(`&`)后得到的新的SIMD值。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, 8); -var b = SIMD.Int32x4(5, 5, 5, 5); -SIMD.Int32x4.and(a, b) -// Int32x4[1, 0, 4, 0] -``` - -上面代码中,以通道`0`为例,`1`的二进制形式是`0001`,`5`的二进制形式是`01001`,所以进行`AND`运算以后,得到`0001`。 - -`or`方法接受两个SIMD值作为参数,返回两者对应的通道进行二进制`OR`运算(`|`)后得到的新的SIMD值。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, 8); -var b = SIMD.Int32x4(5, 5, 5, 5); -SIMD.Int32x4.or(a, b) -// Int32x4[5, 7, 5, 13] -``` - -`xor`方法接受两个SIMD值作为参数,返回两者对应的通道进行二进制”异或“运算(`^`)后得到的新的SIMD值。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, 8); -var b = SIMD.Int32x4(5, 5, 5, 5); -SIMD.Int32x4.xor(a, b) -// Int32x4[4, 7, 1, 13] -``` - -`not`方法接受一个SIMD值作为参数,返回每个通道进行二进制”否“运算(`~`)后得到的新的SIMD值。 - -```javascript -var a = SIMD.Int32x4(1, 2, 4, 8); -SIMD.Int32x4.not(a) -// Int32x4[-2, -3, -5, -9] -``` - -上面代码中,`1`的否运算之所以得到`-2`,是因为在计算机内部,负数采用”2的补码“这种形式进行表示。也就是说,整数`n`的负数形式`-n`,是对每一个二进制位取反以后,再加上1。因此,直接取反就相当于负数形式再减去1,比如`1`的负数形式是`-1`,再减去1,就得到了`-2`。 - -## 静态方法:数据类型转换 - -SIMD提供以下方法,用来将一种数据类型转为另一种数据类型。 - -- `SIMD.%type%.fromFloat32x4()` -- `SIMD.%type%.fromFloat32x4Bits()` -- `SIMD.%type%.fromFloat64x2Bits()` -- `SIMD.%type%.fromInt32x4()` -- `SIMD.%type%.fromInt32x4Bits()` -- `SIMD.%type%.fromInt16x8Bits()` -- `SIMD.%type%.fromInt8x16Bits()` -- `SIMD.%type%.fromUint32x4()` -- `SIMD.%type%.fromUint32x4Bits()` -- `SIMD.%type%.fromUint16x8Bits()` -- `SIMD.%type%.fromUint8x16Bits()` - -带有`Bits`后缀的方法,会原封不动地将二进制位拷贝到新的数据类型;不带后缀的方法,则会进行数据类型转换。 - -```javascript -var t = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -SIMD.Int32x4.fromFloat32x4(t); -// Int32x4[1, 2, 3, 4] - -SIMD.Int32x4.fromFloat32x4Bits(t); -// Int32x4[1065353216, 1073741824, 1077936128, 1082130432] -``` - -上面代码中,`fromFloat32x4`是将浮点数转为整数,然后存入新的数据类型;`fromFloat32x4Bits`则是将二进制位原封不动地拷贝进入新的数据类型,然后进行解读。 - -`Bits`后缀的方法,还可以用于通道数目不对等的拷贝。 - -```javascript -var t = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); -SIMD.Int16x8.fromFloat32x4Bits(t); -// Int16x8[0, 16256, 0, 16384, 0, 16448, 0, 16512] -``` - -上面代码中,原始SIMD值`t`是4通道的,而目标值是8通道的。 - -如果数据转换时,原通道的数据大小,超过了目标通道的最大宽度,就会报错。 - -## 实例方法 - -### SIMD.%type%.prototype.toString() - -`toString`方法返回一个SIMD值的字符串形式。 - -```javascript -var a = SIMD.Float32x4(11, 22, 33, 44); -a.toString() // "SIMD.Float32x4(11, 22, 33, 44)" -``` - -## 实例:求平均值 - -正常模式下,计算`n`个值的平均值,需要运算`n`次。 - -```javascript -function average(list) { - var n = list.length; - var sum = 0.0; - for (var i = 0; i < n; i++) { - sum += list[i]; - } - return sum / n; -} -``` - -使用SIMD,可以将计算次数减少到`n`次的四分之一。 - -```javascript -function average(list) { - var n = list.length; - var sum = SIMD.Float32x4.splat(0.0); - for (var i = 0; i < n; i += 4) { - sum = SIMD.Float32x4.add( - sum, - SIMD.Float32x4.load(list, i) - ); - } - var total = SIMD.Float32x4.extractLane(sum, 0) + - SIMD.Float32x4.extractLane(sum, 1) + - SIMD.Float32x4.extractLane(sum, 2) + - SIMD.Float32x4.extractLane(sum, 3); - return total / n; -} -``` - -上面代码先是每隔四位,将所有的值读入一个 SIMD,然后立刻累加。然后,得到累加值四个通道的总和,再除以`n`就可以了。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/spec.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/spec.md" deleted file mode 100644 index aa7fee02d..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/spec.md" +++ /dev/null @@ -1,230 +0,0 @@ -# 读懂 ECMAScript 规格 - -## 概述 - -规格文件是计算机语言的官方标准,详细描述语法规则和实现方法。 - -一般来说,没有必要阅读规格,除非你要写编译器。因为规格写得非常抽象和精炼,又缺乏实例,不容易理解,而且对于解决实际的应用问题,帮助不大。但是,如果你遇到疑难的语法问题,实在找不到答案,这时可以去查看规格文件,了解语言标准是怎么说的。规格是解决问题的“最后一招”。 - -这对JavaScript语言很有必要。因为它的使用场景复杂,语法规则不统一,例外很多,各种运行环境的行为不一致,导致奇怪的语法问题层出不穷,任何语法书都不可能囊括所有情况。查看规格,不失为一种解决语法问题的最可靠、最权威的终极方法。 - -本章介绍如何读懂ECMAScript 6的规格文件。 - -ECMAScript 6的规格,可以在ECMA国际标准组织的官方网站([www.ecma-international.org/ecma-262/6.0/](http://www.ecma-international.org/ecma-262/6.0/))免费下载和在线阅读。 - -这个规格文件相当庞大,一共有26章,A4打印的话,足足有545页。它的特点就是规定得非常细致,每一个语法行为、每一个函数的实现都做了详尽的清晰的描述。基本上,编译器作者只要把每一步翻译成代码就可以了。这很大程度上,保证了所有ES6实现都有一致的行为。 - -ECMAScript 6规格的26章之中,第1章到第3章是对文件本身的介绍,与语言关系不大。第4章是对这门语言总体设计的描述,有兴趣的读者可以读一下。第5章到第8章是语言宏观层面的描述。第5章是规格的名词解释和写法的介绍,第6章介绍数据类型,第7章介绍语言内部用到的抽象操作,第8章介绍代码如何运行。第9章到第26章介绍具体的语法。 - -对于一般用户来说,除了第4章,其他章节都涉及某一方面的细节,不用通读,只要在用到的时候,查阅相关章节即可。下面通过一些例子,介绍如何使用这份规格。 - -## 相等运算符 - -相等运算符(`==`)是一个很让人头痛的运算符,它的语法行为多变,不符合直觉。这个小节就看看规格怎么规定它的行为。 - -请看下面这个表达式,请问它的值是多少。 - -```javascript -0 == null -``` - -如果你不确定答案,或者想知道语言内部怎么处理,就可以去查看规格,[7.2.12小节](http://www.ecma-international.org/ecma-262/6.0/#sec-7.2.12)是对相等运算符(`==`)的描述。 - -规格对每一种语法行为的描述,都分成两部分:先是总体的行为描述,然后是实现的算法细节。相等运算符的总体描述,只有一句话。 - -> “The comparison `x == y`, where `x` and `y` are values, produces `true` or `false`.” - -上面这句话的意思是,相等运算符用于比较两个值,返回`true`或`false`。 - -下面是算法细节。 - -> 1. ReturnIfAbrupt(x). -> 1. ReturnIfAbrupt(y). -> 1. If `Type(x)` is the same as `Type(y)`, then -> Return the result of performing Strict Equality Comparison `x === y`. -> 1. If `x` is `null` and `y` is `undefined`, return `true`. -> 1. If `x` is `undefined` and `y` is `null`, return `true`. -> 1. If `Type(x)` is Number and `Type(y)` is String, -> return the result of the comparison `x == ToNumber(y)`. -> 1. If `Type(x)` is String and `Type(y)` is Number, -> return the result of the comparison `ToNumber(x) == y`. -> 1. If `Type(x)` is Boolean, return the result of the comparison `ToNumber(x) == y`. -> 1. If `Type(y)` is Boolean, return the result of the comparison `x == ToNumber(y)`. -> 1. If `Type(x)` is either String, Number, or Symbol and `Type(y)` is Object, then -> return the result of the comparison `x == ToPrimitive(y)`. -> 1. If `Type(x)` is Object and `Type(y)` is either String, Number, or Symbol, then -> return the result of the comparison `ToPrimitive(x) == y`. -> 1. Return `false`. - -上面这段算法,一共有12步,翻译如下。 - -> 1. 如果`x`不是正常值(比如抛出一个错误),中断执行。 -> 1. 如果`y`不是正常值,中断执行。 -> 1. 如果`Type(x)`与`Type(y)`相同,执行严格相等运算`x === y`。 -> 1. 如果`x`是`null`,`y`是`undefined`,返回`true`。 -> 1. 如果`x`是`undefined`,`y`是`null`,返回`true`。 -> 1. 如果`Type(x)`是数值,`Type(y)`是字符串,返回`x == ToNumber(y)`的结果。 -> 1. 如果`Type(x)`是字符串,`Type(y)`是数值,返回`ToNumber(x) == y`的结果。 -> 1. 如果`Type(x)`是布尔值,返回`ToNumber(x) == y`的结果。 -> 1. 如果`Type(y)`是布尔值,返回`x == ToNumber(y)`的结果。 -> 1. 如果`Type(x)`是字符串或数值或`Symbol`值,`Type(y)`是对象,返回`x == ToPrimitive(y)`的结果。 -> 1. 如果`Type(x)`是对象,`Type(y)`是字符串或数值或`Symbol`值,返回`ToPrimitive(x) == y`的结果。 -> 1. 返回`false`。 - -由于`0`的类型是数值,`null`的类型是Null(这是规格[4.3.13小节](http://www.ecma-international.org/ecma-262/6.0/#sec-4.3.13)的规定,是内部Type运算的结果,跟`typeof`运算符无关)。因此上面的前11步都得不到结果,要到第12步才能得到`false`。 - -```javascript -0 == null // false -``` - -## 数组的空位 - -下面再看另一个例子。 - -```javascript -const a1 = [undefined, undefined, undefined]; -const a2 = [, , ,]; - -a1.length // 3 -a2.length // 3 - -a1[0] // undefined -a2[0] // undefined - -a1[0] === a2[0] // true -``` - -上面代码中,数组`a1`的成员是三个`undefined`,数组`a2`的成员是三个空位。这两个数组很相似,长度都是3,每个位置的成员读取出来都是`undefined`。 - -但是,它们实际上存在重大差异。 - -```javascript -0 in a1 // true -0 in a2 // false - -a1.hasOwnProperty(0) // true -a2.hasOwnProperty(0) // false - -Object.keys(a1) // ["0", "1", "2"] -Object.keys(a2) // [] - -a1.map(n => 1) // [1, 1, 1] -a2.map(n => 1) // [, , ,] -``` - -上面代码一共列出了四种运算,数组`a1`和`a2`的结果都不一样。前三种运算(`in`运算符、数组的`hasOwnProperty`方法、`Object.keys`方法)都说明,数组`a2`取不到属性名。最后一种运算(数组的`map`方法)说明,数组`a2`没有发生遍历。 - -为什么`a1`与`a2`成员的行为不一致?数组的成员是`undefined`或空位,到底有什么不同? - -规格的[12.2.5小节《数组的初始化》](http://www.ecma-international.org/ecma-262/6.0/#sec-12.2.5)给出了答案。 - -> “Array elements may be elided at the beginning, middle or end of the element list. Whenever a comma in the element list is not preceded by an AssignmentExpression (i.e., a comma at the beginning or after another comma), the missing array element contributes to the length of the Array and increases the index of subsequent elements. Elided array elements are not defined. If an element is elided at the end of an array, that element does not contribute to the length of the Array.” - -翻译如下。 - -> "数组成员可以省略。只要逗号前面没有任何表达式,数组的`length`属性就会加1,并且相应增加其后成员的位置索引。被省略的成员不会被定义。如果被省略的成员是数组最后一个成员,则不会导致数组`length`属性增加。” - -上面的规格说得很清楚,数组的空位会反映在`length`属性,也就是说空位有自己的位置,但是这个位置的值是未定义,即这个值是不存在的。如果一定要读取,结果就是`undefined`(因为`undefined`在JavaScript语言中表示不存在)。 - -这就解释了为什么`in`运算符、数组的`hasOwnProperty`方法、`Object.keys`方法,都取不到空位的属性名。因为这个属性名根本就不存在,规格里面没说要为空位分配属性名(位置索引),只说要为下一个元素的位置索引加1。 - -至于为什么数组的`map`方法会跳过空位,请看下一节。 - -## 数组的map方法 - -规格的[22.1.3.15小节](http://www.ecma-international.org/ecma-262/6.0/#sec-22.1.3.15)定义了数组的`map`方法。该小节先是总体描述`map`方法的行为,里面没有提到数组空位。 - -后面的算法描述是这样的。 - -> 1. Let `O` be `ToObject(this value)`. -> 1. `ReturnIfAbrupt(O)`. -> 1. Let `len` be `ToLength(Get(O, "length"))`. -> 1. `ReturnIfAbrupt(len)`. -> 1. If `IsCallable(callbackfn)` is `false`, throw a TypeError exception. -> 1. If `thisArg` was supplied, let `T` be `thisArg`; else let `T` be `undefined`. -> 1. Let `A` be `ArraySpeciesCreate(O, len)`. -> 1. `ReturnIfAbrupt(A)`. -> 1. Let `k` be 0. -> 1. Repeat, while `k` < `len` -> a. Let `Pk` be `ToString(k)`. -> b. Let `kPresent` be `HasProperty(O, Pk)`. -> c. `ReturnIfAbrupt(kPresent)`. -> d. If `kPresent` is `true`, then -> d-1. Let `kValue` be `Get(O, Pk)`. -> d-2. `ReturnIfAbrupt(kValue)`. -> d-3. Let `mappedValue` be `Call(callbackfn, T, «kValue, k, O»)`. -> d-4. `ReturnIfAbrupt(mappedValue)`. -> d-5. Let `status` be `CreateDataPropertyOrThrow (A, Pk, mappedValue)`. -> d-6. `ReturnIfAbrupt(status)`. -> e. Increase `k` by 1. -> 1. Return `A`. - -翻译如下。 - -> 1. 得到当前数组的`this`对象 -> 1. 如果报错就返回 -> 1. 求出当前数组的`length`属性 -> 1. 如果报错就返回 -> 1. 如果map方法的参数`callbackfn`不可执行,就报错 -> 1. 如果map方法的参数之中,指定了`this`,就让`T`等于该参数,否则`T`为`undefined` -> 1. 生成一个新的数组`A`,跟当前数组的`length`属性保持一致 -> 1. 如果报错就返回 -> 1. 设定`k`等于0 -> 1. 只要`k`小于当前数组的`length`属性,就重复下面步骤 -> a. 设定`Pk`等于`ToString(k)`,即将`K`转为字符串 -> b. 设定`kPresent`等于`HasProperty(O, Pk)`,即求当前数组有没有指定属性 -> c. 如果报错就返回 -> d. 如果`kPresent`等于`true`,则进行下面步骤 -> d-1. 设定`kValue`等于`Get(O, Pk)`,取出当前数组的指定属性 -> d-2. 如果报错就返回 -> d-3. 设定`mappedValue`等于`Call(callbackfn, T, «kValue, k, O»)`,即执行回调函数 -> d-4. 如果报错就返回 -> d-5. 设定`status`等于`CreateDataPropertyOrThrow (A, Pk, mappedValue)`,即将回调函数的值放入`A`数组的指定位置 -> d-6. 如果报错就返回 -> e. `k`增加1 -> 1. 返回`A` - -仔细查看上面的算法,可以发现,当处理一个全是空位的数组时,前面步骤都没有问题。进入第10步的b时,`kpresent`会报错,因为空位对应的属性名,对于数组来说是不存在的,因此就会返回,不会进行后面的步骤。 - -```javascript -const arr = [, , ,]; -arr.map(n => { - console.log(n); - return 1; -}) // [, , ,] -``` - -上面代码中,`arr`是一个全是空位的数组,`map`方法遍历成员时,发现是空位,就直接跳过,不会进入回调函数。因此,回调函数里面的`console.log`语句根本不会执行,整个`map`方法返回一个全是空位的新数组。 - -V8引擎对`map`方法的[实现](https://github.com/v8/v8/blob/44c44521ae11859478b42004f57ea93df52526ee/src/js/array.js#L1347)如下,可以看到跟规格的算法描述完全一致。 - -```javascript -function ArrayMap(f, receiver) { - CHECK_OBJECT_COERCIBLE(this, "Array.prototype.map"); - - // Pull out the length so that modifications to the length in the - // loop will not affect the looping and side effects are visible. - var array = TO_OBJECT(this); - var length = TO_LENGTH_OR_UINT32(array.length); - return InnerArrayMap(f, receiver, array, length); -} - -function InnerArrayMap(f, receiver, array, length) { - if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); - - var accumulator = new InternalArray(length); - var is_array = IS_ARRAY(array); - var stepping = DEBUG_IS_STEPPING(f); - for (var i = 0; i < length; i++) { - if (HAS_INDEX(array, i, is_array)) { - var element = array[i]; - // Prepare break slots for debugger step in. - if (stepping) %DebugPrepareStepInIfStepping(f); - accumulator[i] = %_Call(f, receiver, element, i, array); - } - } - var result = new GlobalArray(); - %MoveArrayContents(accumulator, result); - return result; -} -``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/string.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/string.md" deleted file mode 100644 index 735c5a1b8..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/string.md" +++ /dev/null @@ -1,947 +0,0 @@ -# 字符串的扩展 - -ES6 加强了对 Unicode 的支持,并且扩展了字符串对象。 - -## 字符的 Unicode 表示法 - -JavaScript 允许采用`\uxxxx`形式表示一个字符,其中`xxxx`表示字符的 Unicode 码点。 - -```javascript -"\u0061" -// "a" -``` - -但是,这种表示法只限于码点在`\u0000`~`\uFFFF`之间的字符。超出这个范围的字符,必须用两个双字节的形式表示。 - -```javascript -"\uD842\uDFB7" -// "𠮷" - -"\u20BB7" -// " 7" -``` - -上面代码表示,如果直接在`\u`后面跟上超过`0xFFFF`的数值(比如`\u20BB7`),JavaScript会理解成`\u20BB+7`。由于`\u20BB`是一个不可打印字符,所以只会显示一个空格,后面跟着一个`7`。 - -ES6 对这一点做出了改进,只要将码点放入大括号,就能正确解读该字符。 - -```javascript -"\u{20BB7}" -// "𠮷" - -"\u{41}\u{42}\u{43}" -// "ABC" - -let hello = 123; -hell\u{6F} // 123 - -'\u{1F680}' === '\uD83D\uDE80' -// true -``` - -上面代码中,最后一个例子表明,大括号表示法与四字节的 UTF-16 编码是等价的。 - -有了这种表示法之后,JavaScript 共有6种方法可以表示一个字符。 - -```javascript -'\z' === 'z' // true -'\172' === 'z' // true -'\x7A' === 'z' // true -'\u007A' === 'z' // true -'\u{7A}' === 'z' // true -``` - -## codePointAt() - -JavaScript内部,字符以UTF-16的格式储存,每个字符固定为`2`个字节。对于那些需要`4`个字节储存的字符(Unicode码点大于`0xFFFF`的字符),JavaScript会认为它们是两个字符。 - -```javascript -var s = "𠮷"; - -s.length // 2 -s.charAt(0) // '' -s.charAt(1) // '' -s.charCodeAt(0) // 55362 -s.charCodeAt(1) // 57271 -``` - -上面代码中,汉字“𠮷”(注意,这个字不是”吉祥“的”吉“)的码点是`0x20BB7`,UTF-16编码为`0xD842 0xDFB7`(十进制为`55362 57271`),需要`4`个字节储存。对于这种`4`个字节的字符,JavaScript不能正确处理,字符串长度会误判为`2`,而且`charAt`方法无法读取整个字符,`charCodeAt`方法只能分别返回前两个字节和后两个字节的值。 - -ES6提供了`codePointAt`方法,能够正确处理4个字节储存的字符,返回一个字符的码点。 - -```javascript -var s = '𠮷a'; - -s.codePointAt(0) // 134071 -s.codePointAt(1) // 57271 - -s.codePointAt(2) // 97 -``` - -`codePointAt`方法的参数,是字符在字符串中的位置(从0开始)。上面代码中,JavaScript将“𠮷a”视为三个字符,codePointAt方法在第一个字符上,正确地识别了“𠮷”,返回了它的十进制码点134071(即十六进制的`20BB7`)。在第二个字符(即“𠮷”的后两个字节)和第三个字符“a”上,`codePointAt`方法的结果与`charCodeAt`方法相同。 - -总之,`codePointAt`方法会正确返回32位的UTF-16字符的码点。对于那些两个字节储存的常规字符,它的返回结果与`charCodeAt`方法相同。 - -`codePointAt`方法返回的是码点的十进制值,如果想要十六进制的值,可以使用`toString`方法转换一下。 - -```javascript -var s = '𠮷a'; - -s.codePointAt(0).toString(16) // "20bb7" -s.codePointAt(2).toString(16) // "61" -``` - -你可能注意到了,`codePointAt`方法的参数,仍然是不正确的。比如,上面代码中,字符`a`在字符串`s`的正确位置序号应该是1,但是必须向`codePointAt`方法传入2。解决这个问题的一个办法是使用`for...of`循环,因为它会正确识别32位的UTF-16字符。 - -```javascript -var s = '𠮷a'; -for (let ch of s) { - console.log(ch.codePointAt(0).toString(16)); -} -// 20bb7 -// 61 -``` - -`codePointAt`方法是测试一个字符由两个字节还是由四个字节组成的最简单方法。 - -```javascript -function is32Bit(c) { - return c.codePointAt(0) > 0xFFFF; -} - -is32Bit("𠮷") // true -is32Bit("a") // false -``` - -## String.fromCodePoint() - -ES5提供`String.fromCharCode`方法,用于从码点返回对应字符,但是这个方法不能识别32位的UTF-16字符(Unicode编号大于`0xFFFF`)。 - -```javascript -String.fromCharCode(0x20BB7) -// "ஷ" -``` - -上面代码中,`String.fromCharCode`不能识别大于`0xFFFF`的码点,所以`0x20BB7`就发生了溢出,最高位`2`被舍弃了,最后返回码点`U+0BB7`对应的字符,而不是码点`U+20BB7`对应的字符。 - -ES6提供了`String.fromCodePoint`方法,可以识别`0xFFFF`的字符,弥补了`String.fromCharCode`方法的不足。在作用上,正好与`codePointAt`方法相反。 - -```javascript -String.fromCodePoint(0x20BB7) -// "𠮷" -String.fromCodePoint(0x78, 0x1f680, 0x79) === 'x\uD83D\uDE80y' -// true -``` - -上面代码中,如果`String.fromCodePoint`方法有多个参数,则它们会被合并成一个字符串返回。 - -注意,`fromCodePoint`方法定义在`String`对象上,而`codePointAt`方法定义在字符串的实例对象上。 - -## 字符串的遍历器接口 - -ES6为字符串添加了遍历器接口(详见《Iterator》一章),使得字符串可以被`for...of`循环遍历。 - -```javascript -for (let codePoint of 'foo') { - console.log(codePoint) -} -// "f" -// "o" -// "o" -``` - -除了遍历字符串,这个遍历器最大的优点是可以识别大于`0xFFFF`的码点,传统的`for`循环无法识别这样的码点。 - -```javascript -var text = String.fromCodePoint(0x20BB7); - -for (let i = 0; i < text.length; i++) { - console.log(text[i]); -} -// " " -// " " - -for (let i of text) { - console.log(i); -} -// "𠮷" -``` - -上面代码中,字符串`text`只有一个字符,但是`for`循环会认为它包含两个字符(都不可打印),而`for...of`循环会正确识别出这一个字符。 - -## at() - -ES5对字符串对象提供`charAt`方法,返回字符串给定位置的字符。该方法不能识别码点大于`0xFFFF`的字符。 - -```javascript -'abc'.charAt(0) // "a" -'𠮷'.charAt(0) // "\uD842" -``` - -上面代码中,`charAt`方法返回的是UTF-16编码的第一个字节,实际上是无法显示的。 - -目前,有一个提案,提出字符串实例的`at`方法,可以识别Unicode编号大于`0xFFFF`的字符,返回正确的字符。 - -```javascript -'abc'.at(0) // "a" -'𠮷'.at(0) // "𠮷" -``` - -这个方法可以通过[垫片库](https://github.com/es-shims/String.prototype.at)实现。 - -## normalize() - -许多欧洲语言有语调符号和重音符号。为了表示它们,Unicode提供了两种方法。一种是直接提供带重音符号的字符,比如`Ǒ`(\u01D1)。另一种是提供合成符号(combining character),即原字符与重音符号的合成,两个字符合成一个字符,比如`O`(\u004F)和`ˇ`(\u030C)合成`Ǒ`(\u004F\u030C)。 - -这两种表示方法,在视觉和语义上都等价,但是JavaScript不能识别。 - -```javascript -'\u01D1'==='\u004F\u030C' //false - -'\u01D1'.length // 1 -'\u004F\u030C'.length // 2 -``` - -上面代码表示,JavaScript将合成字符视为两个字符,导致两种表示方法不相等。 - -ES6提供字符串实例的`normalize()`方法,用来将字符的不同表示方法统一为同样的形式,这称为Unicode正规化。 - -```javascript -'\u01D1'.normalize() === '\u004F\u030C'.normalize() -// true -``` - -`normalize`方法可以接受一个参数来指定`normalize`的方式,参数的四个可选值如下。 - -- `NFC`,默认参数,表示“标准等价合成”(Normalization Form Canonical Composition),返回多个简单字符的合成字符。所谓“标准等价”指的是视觉和语义上的等价。 -- `NFD`,表示“标准等价分解”(Normalization Form Canonical Decomposition),即在标准等价的前提下,返回合成字符分解的多个简单字符。 -- `NFKC`,表示“兼容等价合成”(Normalization Form Compatibility Composition),返回合成字符。所谓“兼容等价”指的是语义上存在等价,但视觉上不等价,比如“囍”和“喜喜”。(这只是用来举例,`normalize`方法不能识别中文。) -- `NFKD`,表示“兼容等价分解”(Normalization Form Compatibility Decomposition),即在兼容等价的前提下,返回合成字符分解的多个简单字符。 - -```javascript -'\u004F\u030C'.normalize('NFC').length // 1 -'\u004F\u030C'.normalize('NFD').length // 2 -``` - -上面代码表示,`NFC`参数返回字符的合成形式,`NFD`参数返回字符的分解形式。 - -不过,`normalize`方法目前不能识别三个或三个以上字符的合成。这种情况下,还是只能使用正则表达式,通过Unicode编号区间判断。 - -## includes(), startsWith(), endsWith() - -传统上,JavaScript只有`indexOf`方法,可以用来确定一个字符串是否包含在另一个字符串中。ES6又提供了三种新方法。 - -- **includes()**:返回布尔值,表示是否找到了参数字符串。 -- **startsWith()**:返回布尔值,表示参数字符串是否在源字符串的头部。 -- **endsWith()**:返回布尔值,表示参数字符串是否在源字符串的尾部。 - -```javascript -var s = 'Hello world!'; - -s.startsWith('Hello') // true -s.endsWith('!') // true -s.includes('o') // true -``` - -这三个方法都支持第二个参数,表示开始搜索的位置。 - -```javascript -var s = 'Hello world!'; - -s.startsWith('world', 6) // true -s.endsWith('Hello', 5) // true -s.includes('Hello', 6) // false -``` - -上面代码表示,使用第二个参数`n`时,`endsWith`的行为与其他两个方法有所不同。它针对前`n`个字符,而其他两个方法针对从第`n`个位置直到字符串结束。 - -## repeat() - -`repeat`方法返回一个新字符串,表示将原字符串重复`n`次。 - -```javascript -'x'.repeat(3) // "xxx" -'hello'.repeat(2) // "hellohello" -'na'.repeat(0) // "" -``` - -参数如果是小数,会被取整。 - -```javascript -'na'.repeat(2.9) // "nana" -``` - -如果`repeat`的参数是负数或者`Infinity`,会报错。 - -```javascript -'na'.repeat(Infinity) -// RangeError -'na'.repeat(-1) -// RangeError -``` - -但是,如果参数是0到-1之间的小数,则等同于0,这是因为会先进行取整运算。0到-1之间的小数,取整以后等于`-0`,`repeat`视同为0。 - -```javascript -'na'.repeat(-0.9) // "" -``` - -参数`NaN`等同于0。 - -```javascript -'na'.repeat(NaN) // "" -``` - -如果`repeat`的参数是字符串,则会先转换成数字。 - -```javascript -'na'.repeat('na') // "" -'na'.repeat('3') // "nanana" -``` - -## padStart(),padEnd() - -ES2017 引入了字符串补全长度的功能。如果某个字符串不够指定长度,会在头部或尾部补全。`padStart()`用于头部补全,`padEnd()`用于尾部补全。 - -```javascript -'x'.padStart(5, 'ab') // 'ababx' -'x'.padStart(4, 'ab') // 'abax' - -'x'.padEnd(5, 'ab') // 'xabab' -'x'.padEnd(4, 'ab') // 'xaba' -``` - -上面代码中,`padStart`和`padEnd`一共接受两个参数,第一个参数用来指定字符串的最小长度,第二个参数是用来补全的字符串。 - -如果原字符串的长度,等于或大于指定的最小长度,则返回原字符串。 - -```javascript -'xxx'.padStart(2, 'ab') // 'xxx' -'xxx'.padEnd(2, 'ab') // 'xxx' -``` - -如果用来补全的字符串与原字符串,两者的长度之和超过了指定的最小长度,则会截去超出位数的补全字符串。 - -```javascript -'abc'.padStart(10, '0123456789') -// '0123456abc' -``` - -如果省略第二个参数,默认使用空格补全长度。 - -```javascript -'x'.padStart(4) // ' x' -'x'.padEnd(4) // 'x ' -``` - -`padStart`的常见用途是为数值补全指定位数。下面代码生成10位的数值字符串。 - -```javascript -'1'.padStart(10, '0') // "0000000001" -'12'.padStart(10, '0') // "0000000012" -'123456'.padStart(10, '0') // "0000123456" -``` - -另一个用途是提示字符串格式。 - -```javascript -'12'.padStart(10, 'YYYY-MM-DD') // "YYYY-MM-12" -'09-12'.padStart(10, 'YYYY-MM-DD') // "YYYY-09-12" -``` - -## 模板字符串 - -传统的JavaScript语言,输出模板通常是这样写的。 - -```javascript -$('#result').append( - 'There are <b>' + basket.count + '</b> ' + - 'items in your basket, ' + - '<em>' + basket.onSale + - '</em> are on sale!' -); -``` - -上面这种写法相当繁琐不方便,ES6引入了模板字符串解决这个问题。 - -```javascript -$('#result').append(` - There are <b>${basket.count}</b> items - in your basket, <em>${basket.onSale}</em> - are on sale! -`); -``` - -模板字符串(template string)是增强版的字符串,用反引号(`)标识。它可以当作普通字符串使用,也可以用来定义多行字符串,或者在字符串中嵌入变量。 - -```javascript -// 普通字符串 -`In JavaScript '\n' is a line-feed.` - -// 多行字符串 -`In JavaScript this is - not legal.` - -console.log(`string text line 1 -string text line 2`); - -// 字符串中嵌入变量 -var name = "Bob", time = "today"; -`Hello ${name}, how are you ${time}?` -``` - -上面代码中的模板字符串,都是用反引号表示。如果在模板字符串中需要使用反引号,则前面要用反斜杠转义。 - -```javascript -var greeting = `\`Yo\` World!`; -``` - -如果使用模板字符串表示多行字符串,所有的空格和缩进都会被保留在输出之中。 - -```javascript -$('#list').html(` -<ul> - <li>first</li> - <li>second</li> -</ul> -`); -``` - -上面代码中,所有模板字符串的空格和换行,都是被保留的,比如`<ul>`标签前面会有一个换行。如果你不想要这个换行,可以使用`trim`方法消除它。 - - -```javascript -$('#list').html(` -<ul> - <li>first</li> - <li>second</li> -</ul> -`.trim()); -``` - -模板字符串中嵌入变量,需要将变量名写在`${}`之中。 - -```javascript -function authorize(user, action) { - if (!user.hasPrivilege(action)) { - throw new Error( - // 传统写法为 - // 'User ' - // + user.name - // + ' is not authorized to do ' - // + action - // + '.' - `User ${user.name} is not authorized to do ${action}.`); - } -} -``` - -大括号内部可以放入任意的JavaScript表达式,可以进行运算,以及引用对象属性。 - -```javascript -var x = 1; -var y = 2; - -`${x} + ${y} = ${x + y}` -// "1 + 2 = 3" - -`${x} + ${y * 2} = ${x + y * 2}` -// "1 + 4 = 5" - -var obj = {x: 1, y: 2}; -`${obj.x + obj.y}` -// 3 -``` - -模板字符串之中还能调用函数。 - -```javascript -function fn() { - return "Hello World"; -} - -`foo ${fn()} bar` -// foo Hello World bar -``` - -如果大括号中的值不是字符串,将按照一般的规则转为字符串。比如,大括号中是一个对象,将默认调用对象的`toString`方法。 - -如果模板字符串中的变量没有声明,将报错。 - -```javascript -// 变量place没有声明 -var msg = `Hello, ${place}`; -// 报错 -``` - -由于模板字符串的大括号内部,就是执行JavaScript代码,因此如果大括号内部是一个字符串,将会原样输出。 - -```javascript -`Hello ${'World'}` -// "Hello World" -``` - -模板字符串甚至还能嵌套。 - -```javascript -const tmpl = addrs => ` - <table> - ${addrs.map(addr => ` - <tr><td>${addr.first}</td></tr> - <tr><td>${addr.last}</td></tr> - `).join('')} - </table> -`; -``` - -上面代码中,模板字符串的变量之中,又嵌入了另一个模板字符串,使用方法如下。 - -```javascript -const data = [ - { first: '<Jane>', last: 'Bond' }, - { first: 'Lars', last: '<Croft>' }, -]; - -console.log(tmpl(data)); -// <table> -// -// <tr><td><Jane></td></tr> -// <tr><td>Bond</td></tr> -// -// <tr><td>Lars</td></tr> -// <tr><td><Croft></td></tr> -// -// </table> -``` - -如果需要引用模板字符串本身,在需要时执行,可以像下面这样写。 - -```javascript -// 写法一 -let str = 'return ' + '`Hello ${name}!`'; -let func = new Function('name', str); -func('Jack') // "Hello Jack!" - -// 写法二 -let str = '(name) => `Hello ${name}!`'; -let func = eval.call(null, str); -func('Jack') // "Hello Jack!" -``` - -## 实例:模板编译 - -下面,我们来看一个通过模板字符串,生成正式模板的实例。 - -```javascript -var template = ` -<ul> - <% for(var i=0; i < data.supplies.length; i++) { %> - <li><%= data.supplies[i] %></li> - <% } %> -</ul> -`; -``` - -上面代码在模板字符串之中,放置了一个常规模板。该模板使用`<%...%>`放置JavaScript代码,使用`<%= ... %>`输出JavaScript表达式。 - -怎么编译这个模板字符串呢? - -一种思路是将其转换为JavaScript表达式字符串。 - -```javascript -echo('<ul>'); -for(var i=0; i < data.supplies.length; i++) { - echo('<li>'); - echo(data.supplies[i]); - echo('</li>'); -}; -echo('</ul>'); -``` - -这个转换使用正则表达式就行了。 - -```javascript -var evalExpr = /<%=(.+?)%>/g; -var expr = /<%([\s\S]+?)%>/g; - -template = template - .replace(evalExpr, '`); \n echo( $1 ); \n echo(`') - .replace(expr, '`); \n $1 \n echo(`'); - -template = 'echo(`' + template + '`);'; -``` - -然后,将`template`封装在一个函数里面返回,就可以了。 - -```javascript -var script = -`(function parse(data){ - var output = ""; - - function echo(html){ - output += html; - } - - ${ template } - - return output; -})`; - -return script; -``` - -将上面的内容拼装成一个模板编译函数`compile`。 - -```javascript -function compile(template){ - var evalExpr = /<%=(.+?)%>/g; - var expr = /<%([\s\S]+?)%>/g; - - template = template - .replace(evalExpr, '`); \n echo( $1 ); \n echo(`') - .replace(expr, '`); \n $1 \n echo(`'); - - template = 'echo(`' + template + '`);'; - - var script = - `(function parse(data){ - var output = ""; - - function echo(html){ - output += html; - } - - ${ template } - - return output; - })`; - - return script; -} -``` - -`compile`函数的用法如下。 - -```javascript -var parse = eval(compile(template)); -div.innerHTML = parse({ supplies: [ "broom", "mop", "cleaner" ] }); -// <ul> -// <li>broom</li> -// <li>mop</li> -// <li>cleaner</li> -// </ul> -``` - -## 标签模板 - -模板字符串的功能,不仅仅是上面这些。它可以紧跟在一个函数名后面,该函数将被调用来处理这个模板字符串。这被称为“标签模板”功能(tagged template)。 - -```javascript -alert`123` -// 等同于 -alert(123) -``` - -标签模板其实不是模板,而是函数调用的一种特殊形式。“标签”指的就是函数,紧跟在后面的模板字符串就是它的参数。 - -但是,如果模板字符里面有变量,就不是简单的调用了,而是会将模板字符串先处理成多个参数,再调用函数。 - -```javascript -var a = 5; -var b = 10; - -tag`Hello ${ a + b } world ${ a * b }`; -// 等同于 -tag(['Hello ', ' world ', ''], 15, 50); -``` - -上面代码中,模板字符串前面有一个标识名`tag`,它是一个函数。整个表达式的返回值,就是`tag`函数处理模板字符串后的返回值。 - -函数`tag`依次会接收到多个参数。 - -```javascript -function tag(stringArr, value1, value2){ - // ... -} - -// 等同于 - -function tag(stringArr, ...values){ - // ... -} -``` - -`tag`函数的第一个参数是一个数组,该数组的成员是模板字符串中那些没有变量替换的部分,也就是说,变量替换只发生在数组的第一个成员与第二个成员之间、第二个成员与第三个成员之间,以此类推。 - -`tag`函数的其他参数,都是模板字符串各个变量被替换后的值。由于本例中,模板字符串含有两个变量,因此`tag`会接受到`value1`和`value2`两个参数。 - -`tag`函数所有参数的实际值如下。 - -- 第一个参数:`['Hello ', ' world ', '']` -- 第二个参数: 15 -- 第三个参数:50 - -也就是说,`tag`函数实际上以下面的形式调用。 - -```javascript -tag(['Hello ', ' world ', ''], 15, 50) -``` - -我们可以按照需要编写`tag`函数的代码。下面是`tag`函数的一种写法,以及运行结果。 - -```javascript -var a = 5; -var b = 10; - -function tag(s, v1, v2) { - console.log(s[0]); - console.log(s[1]); - console.log(s[2]); - console.log(v1); - console.log(v2); - - return "OK"; -} - -tag`Hello ${ a + b } world ${ a * b}`; -// "Hello " -// " world " -// "" -// 15 -// 50 -// "OK" -``` - -下面是一个更复杂的例子。 - -```javascript -var total = 30; -var msg = passthru`The total is ${total} (${total*1.05} with tax)`; - -function passthru(literals) { - var result = ''; - var i = 0; - - while (i < literals.length) { - result += literals[i++]; - if (i < arguments.length) { - result += arguments[i]; - } - } - - return result; -} - -msg // "The total is 30 (31.5 with tax)" -``` - -上面这个例子展示了,如何将各个参数按照原来的位置拼合回去。 - -`passthru`函数采用rest参数的写法如下。 - -```javascript -function passthru(literals, ...values) { - var output = ""; - for (var index = 0; index < values.length; index++) { - output += literals[index] + values[index]; - } - - output += literals[index] - return output; -} -``` - -“标签模板”的一个重要应用,就是过滤HTML字符串,防止用户输入恶意内容。 - -```javascript -var message = - SaferHTML`<p>${sender} has sent you a message.</p>`; - -function SaferHTML(templateData) { - var s = templateData[0]; - for (var i = 1; i < arguments.length; i++) { - var arg = String(arguments[i]); - - // Escape special characters in the substitution. - s += arg.replace(/&/g, "&") - .replace(/</g, "<") - .replace(/>/g, ">"); - - // Don't escape special characters in the template. - s += templateData[i]; - } - return s; -} -``` - -上面代码中,`sender`变量往往是用户提供的,经过`SaferHTML`函数处理,里面的特殊字符都会被转义。 - -```javascript -var sender = '<script>alert("abc")</script>'; // 恶意代码 -var message = SaferHTML`<p>${sender} has sent you a message.</p>`; - -message -// <p><script>alert("abc")</script> has sent you a message.</p> -``` - - -标签模板的另一个应用,就是多语言转换(国际化处理)。 - -```javascript -i18n`Welcome to ${siteName}, you are visitor number ${visitorNumber}!` -// "欢迎访问xxx,您是第xxxx位访问者!" -``` - -模板字符串本身并不能取代Mustache之类的模板库,因为没有条件判断和循环处理功能,但是通过标签函数,你可以自己添加这些功能。 - -```javascript -// 下面的hashTemplate函数 -// 是一个自定义的模板处理函数 -var libraryHtml = hashTemplate` - <ul> - #for book in ${myBooks} - <li><i>#{book.title}</i> by #{book.author}</li> - #end - </ul> -`; -``` - -除此之外,你甚至可以使用标签模板,在JavaScript语言之中嵌入其他语言。 - -```javascript -jsx` - <div> - <input - ref='input' - onChange='${this.handleChange}' - defaultValue='${this.state.value}' /> - ${this.state.value} - </div> -` -``` - -上面的代码通过`jsx`函数,将一个DOM字符串转为React对象。你可以在Github找到`jsx`函数的[具体实现](https://gist.github.com/lygaret/a68220defa69174bdec5)。 - -下面则是一个假想的例子,通过`java`函数,在JavaScript代码之中运行Java代码。 - -```javascript -java` -class HelloWorldApp { - public static void main(String[] args) { - System.out.println(“Hello World!”); // Display the string. - } -} -` -HelloWorldApp.main(); -``` - -模板处理函数的第一个参数(模板字符串数组),还有一个`raw`属性。 - -```javascript -console.log`123` -// ["123", raw: Array[1]] -``` - -上面代码中,`console.log`接受的参数,实际上是一个数组。该数组有一个`raw`属性,保存的是转义后的原字符串。 - -请看下面的例子。 - -```javascript -tag`First line\nSecond line` - -function tag(strings) { - console.log(strings.raw[0]); - // "First line\\nSecond line" -} -``` - -上面代码中,`tag`函数的第一个参数`strings`,有一个`raw`属性,也指向一个数组。该数组的成员与`strings`数组完全一致。比如,`strings`数组是`["First line\nSecond line"]`,那么`strings.raw`数组就是`["First line\\nSecond line"]`。两者唯一的区别,就是字符串里面的斜杠都被转义了。比如,strings.raw数组会将`\n`视为`\\`和`n`两个字符,而不是换行符。这是为了方便取得转义之前的原始模板而设计的。 - -## String.raw() - -ES6还为原生的String对象,提供了一个`raw`方法。 - -`String.raw`方法,往往用来充当模板字符串的处理函数,返回一个斜杠都被转义(即斜杠前面再加一个斜杠)的字符串,对应于替换变量后的模板字符串。 - -```javascript -String.raw`Hi\n${2+3}!`; -// "Hi\\n5!" - -String.raw`Hi\u000A!`; -// 'Hi\\u000A!' -``` - -如果原字符串的斜杠已经转义,那么`String.raw`不会做任何处理。 - -```javascript -String.raw`Hi\\n` -// "Hi\\n" -``` - -`String.raw`的代码基本如下。 - -```javascript -String.raw = function (strings, ...values) { - var output = ""; - for (var index = 0; index < values.length; index++) { - output += strings.raw[index] + values[index]; - } - - output += strings.raw[index] - return output; -} -``` - -`String.raw`方法可以作为处理模板字符串的基本方法,它会将所有变量替换,而且对斜杠进行转义,方便下一步作为字符串来使用。 - -`String.raw`方法也可以作为正常的函数使用。这时,它的第一个参数,应该是一个具有`raw`属性的对象,且`raw`属性的值应该是一个数组。 - -```javascript -String.raw({ raw: 'test' }, 0, 1, 2); -// 't0e1s2t' - -// 等同于 -String.raw({ raw: ['t','e','s','t'] }, 0, 1, 2); -``` - -## 模板字符串的限制 - -前面提到标签模板里面,可以内嵌其他语言。但是,模板字符串默认会将字符串转义,因此导致了无法嵌入其他语言。 - -举例来说,在标签模板里面可以嵌入Latex语言。 - -```javascript -function latex(strings) { - // ... -} - -let document = latex` -\newcommand{\fun}{\textbf{Fun!}} // 正常工作 -\newcommand{\unicode}{\textbf{Unicode!}} // 报错 -\newcommand{\xerxes}{\textbf{King!}} // 报错 - -Breve over the h goes \u{h}ere // 报错 -` -``` - -上面代码中,变量`document`内嵌的模板字符串,对于Latex语言来说完全是合法的,但是JavaScript引擎会报错。原因就在于字符串的转义。 - -模板字符串会将`\u00FF`和`\u{42}`当作Unicode字符进行转义,所以`\unicode`解析时报错;而`\x56`会被当作十六进制字符串转义,所以`\xerxes`会报错。 - -为了解决这个问题,现在有一个[提案](https://tc39.github.io/proposal-template-literal-revision/),放松对标签模板里面的字符串转义的限制。如果遇到不合法的字符串转义,就返回`undefined`,而不是报错,并且从`raw`属性上面可以得到原始字符串。 - -```javascript -function tag(strs) { - strs[0] === undefined - strs.raw[0] === "\\unicode and \\u{55}"; -} -tag`\unicode and \u{55}` -``` - -上面代码中,模板字符串原本是应该报错的,但是由于放松了对字符串转义的限制,所以不报错了,JavaScript引擎将第一个字符设置为`undefined`,但是`raw`属性依然可以得到原始字符串,因此`tag`函数还是可以对原字符串进行处理。 - -注意,这种对字符串转义的放松,只在标签模板解析字符串时生效,不是标签模板的场合,依然会报错。 - -```javascript -let bad = `bad escape sequence: \unicode`; // 报错 -``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/symbol.md" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/symbol.md" deleted file mode 100644 index 8681b4f5b..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/symbol.md" +++ /dev/null @@ -1,848 +0,0 @@ -# Symbol - -## 概述 - -ES5的对象属性名都是字符串,这容易造成属性名的冲突。比如,你使用了一个他人提供的对象,但又想为这个对象添加新的方法(mixin模式),新方法的名字就有可能与现有方法产生冲突。如果有一种机制,保证每个属性的名字都是独一无二的就好了,这样就从根本上防止属性名的冲突。这就是ES6引入Symbol的原因。 - -ES6引入了一种新的原始数据类型Symbol,表示独一无二的值。它是JavaScript语言的第七种数据类型,前六种是:Undefined、Null、布尔值(Boolean)、字符串(String)、数值(Number)、对象(Object)。 - -Symbol值通过`Symbol`函数生成。这就是说,对象的属性名现在可以有两种类型,一种是原来就有的字符串,另一种就是新增的Symbol类型。凡是属性名属于Symbol类型,就都是独一无二的,可以保证不会与其他属性名产生冲突。 - -```javascript -let s = Symbol(); - -typeof s -// "symbol" -``` - -上面代码中,变量`s`就是一个独一无二的值。`typeof`运算符的结果,表明变量`s`是Symbol数据类型,而不是字符串之类的其他类型。 - -注意,`Symbol`函数前不能使用`new`命令,否则会报错。这是因为生成的Symbol是一个原始类型的值,不是对象。也就是说,由于Symbol值不是对象,所以不能添加属性。基本上,它是一种类似于字符串的数据类型。 - -`Symbol`函数可以接受一个字符串作为参数,表示对Symbol实例的描述,主要是为了在控制台显示,或者转为字符串时,比较容易区分。 - -```javascript -var s1 = Symbol('foo'); -var s2 = Symbol('bar'); - -s1 // Symbol(foo) -s2 // Symbol(bar) - -s1.toString() // "Symbol(foo)" -s2.toString() // "Symbol(bar)" -``` - -上面代码中,`s1`和`s2`是两个Symbol值。如果不加参数,它们在控制台的输出都是`Symbol()`,不利于区分。有了参数以后,就等于为它们加上了描述,输出的时候就能够分清,到底是哪一个值。 - -如果 Symbol 的参数是一个对象,就会调用该对象的`toString`方法,将其转为字符串,然后才生成一个 Symbol 值。 - -```javascript -const obj = { - toString() { - return 'abc'; - } -}; -const sym = Symbol(obj); -sym // Symbol(abc) -``` - -注意,`Symbol`函数的参数只是表示对当前 Symbol 值的描述,因此相同参数的`Symbol`函数的返回值是不相等的。 - -```javascript -// 没有参数的情况 -var s1 = Symbol(); -var s2 = Symbol(); - -s1 === s2 // false - -// 有参数的情况 -var s1 = Symbol('foo'); -var s2 = Symbol('foo'); - -s1 === s2 // false -``` - -上面代码中,`s1`和`s2`都是`Symbol`函数的返回值,而且参数相同,但是它们是不相等的。 - -Symbol值不能与其他类型的值进行运算,会报错。 - -```javascript -var sym = Symbol('My symbol'); - -"your symbol is " + sym -// TypeError: can't convert symbol to string -`your symbol is ${sym}` -// TypeError: can't convert symbol to string -``` - -但是,Symbol值可以显式转为字符串。 - -```javascript -var sym = Symbol('My symbol'); - -String(sym) // 'Symbol(My symbol)' -sym.toString() // 'Symbol(My symbol)' -``` - -另外,Symbol值也可以转为布尔值,但是不能转为数值。 - -```javascript -var sym = Symbol(); -Boolean(sym) // true -!sym // false - -if (sym) { - // ... -} - -Number(sym) // TypeError -sym + 2 // TypeError -``` - -## 作为属性名的Symbol - -由于每一个Symbol值都是不相等的,这意味着Symbol值可以作为标识符,用于对象的属性名,就能保证不会出现同名的属性。这对于一个对象由多个模块构成的情况非常有用,能防止某一个键被不小心改写或覆盖。 - -```javascript -var mySymbol = Symbol(); - -// 第一种写法 -var a = {}; -a[mySymbol] = 'Hello!'; - -// 第二种写法 -var a = { - [mySymbol]: 'Hello!' -}; - -// 第三种写法 -var a = {}; -Object.defineProperty(a, mySymbol, { value: 'Hello!' }); - -// 以上写法都得到同样结果 -a[mySymbol] // "Hello!" -``` - -上面代码通过方括号结构和`Object.defineProperty`,将对象的属性名指定为一个Symbol值。 - -注意,Symbol值作为对象属性名时,不能用点运算符。 - -```javascript -var mySymbol = Symbol(); -var a = {}; - -a.mySymbol = 'Hello!'; -a[mySymbol] // undefined -a['mySymbol'] // "Hello!" -``` - -上面代码中,因为点运算符后面总是字符串,所以不会读取`mySymbol`作为标识名所指代的那个值,导致`a`的属性名实际上是一个字符串,而不是一个Symbol值。 - -同理,在对象的内部,使用Symbol值定义属性时,Symbol值必须放在方括号之中。 - -```javascript -let s = Symbol(); - -let obj = { - [s]: function (arg) { ... } -}; - -obj[s](123); -``` - -上面代码中,如果`s`不放在方括号中,该属性的键名就是字符串`s`,而不是`s`所代表的那个Symbol值。 - -采用增强的对象写法,上面代码的`obj`对象可以写得更简洁一些。 - -```javascript -let obj = { - [s](arg) { ... } -}; -``` - -Symbol类型还可以用于定义一组常量,保证这组常量的值都是不相等的。 - -```javascript -log.levels = { - DEBUG: Symbol('debug'), - INFO: Symbol('info'), - WARN: Symbol('warn') -}; -log(log.levels.DEBUG, 'debug message'); -log(log.levels.INFO, 'info message'); -``` - -下面是另外一个例子。 - -```javascript -const COLOR_RED = Symbol(); -const COLOR_GREEN = Symbol(); - -function getComplement(color) { - switch (color) { - case COLOR_RED: - return COLOR_GREEN; - case COLOR_GREEN: - return COLOR_RED; - default: - throw new Error('Undefined color'); - } -} -``` - -常量使用Symbol值最大的好处,就是其他任何值都不可能有相同的值了,因此可以保证上面的`switch`语句会按设计的方式工作。 - -还有一点需要注意,Symbol值作为属性名时,该属性还是公开属性,不是私有属性。 - -## 实例:消除魔术字符串 - -魔术字符串指的是,在代码之中多次出现、与代码形成强耦合的某一个具体的字符串或者数值。风格良好的代码,应该尽量消除魔术字符串,该由含义清晰的变量代替。 - -```javascript -function getArea(shape, options) { - var area = 0; - - switch (shape) { - case 'Triangle': // 魔术字符串 - area = .5 * options.width * options.height; - break; - /* ... more code ... */ - } - - return area; -} - -getArea('Triangle', { width: 100, height: 100 }); // 魔术字符串 -``` - -上面代码中,字符串“Triangle”就是一个魔术字符串。它多次出现,与代码形成“强耦合”,不利于将来的修改和维护。 - -常用的消除魔术字符串的方法,就是把它写成一个变量。 - -```javascript -var shapeType = { - triangle: 'Triangle' -}; - -function getArea(shape, options) { - var area = 0; - switch (shape) { - case shapeType.triangle: - area = .5 * options.width * options.height; - break; - } - return area; -} - -getArea(shapeType.triangle, { width: 100, height: 100 }); -``` - -上面代码中,我们把“Triangle”写成`shapeType`对象的`triangle`属性,这样就消除了强耦合。 - -如果仔细分析,可以发现`shapeType.triangle`等于哪个值并不重要,只要确保不会跟其他`shapeType`属性的值冲突即可。因此,这里就很适合改用Symbol值。 - -```javascript -const shapeType = { - triangle: Symbol() -}; -``` - -上面代码中,除了将`shapeType.triangle`的值设为一个Symbol,其他地方都不用修改。 - -## 属性名的遍历 - -Symbol 作为属性名,该属性不会出现在`for...in`、`for...of`循环中,也不会被`Object.keys()`、`Object.getOwnPropertyNames()`、`JSON.stringify()`返回。但是,它也不是私有属性,有一个`Object.getOwnPropertySymbols`方法,可以获取指定对象的所有 Symbol 属性名。 - -`Object.getOwnPropertySymbols`方法返回一个数组,成员是当前对象的所有用作属性名的 Symbol 值。 - -```javascript -var obj = {}; -var a = Symbol('a'); -var b = Symbol('b'); - -obj[a] = 'Hello'; -obj[b] = 'World'; - -var objectSymbols = Object.getOwnPropertySymbols(obj); - -objectSymbols -// [Symbol(a), Symbol(b)] -``` - -下面是另一个例子,`Object.getOwnPropertySymbols`方法与`for...in`循环、`Object.getOwnPropertyNames`方法进行对比的例子。 - -```javascript -var obj = {}; - -var foo = Symbol("foo"); - -Object.defineProperty(obj, foo, { - value: "foobar", -}); - -for (var i in obj) { - console.log(i); // 无输出 -} - -Object.getOwnPropertyNames(obj) -// [] - -Object.getOwnPropertySymbols(obj) -// [Symbol(foo)] -``` - -上面代码中,使用`Object.getOwnPropertyNames`方法得不到`Symbol`属性名,需要使用`Object.getOwnPropertySymbols`方法。 - -另一个新的API,`Reflect.ownKeys`方法可以返回所有类型的键名,包括常规键名和 Symbol 键名。 - -```javascript -let obj = { - [Symbol('my_key')]: 1, - enum: 2, - nonEnum: 3 -}; - -Reflect.ownKeys(obj) -// ["enum", "nonEnum", Symbol(my_key)] -``` - -由于以 Symbol 值作为名称的属性,不会被常规方法遍历得到。我们可以利用这个特性,为对象定义一些非私有的、但又希望只用于内部的方法。 - -```javascript -var size = Symbol('size'); - -class Collection { - constructor() { - this[size] = 0; - } - - add(item) { - this[this[size]] = item; - this[size]++; - } - - static sizeOf(instance) { - return instance[size]; - } -} - -var x = new Collection(); -Collection.sizeOf(x) // 0 - -x.add('foo'); -Collection.sizeOf(x) // 1 - -Object.keys(x) // ['0'] -Object.getOwnPropertyNames(x) // ['0'] -Object.getOwnPropertySymbols(x) // [Symbol(size)] -``` - -上面代码中,对象`x`的`size`属性是一个 Symbol 值,所以`Object.keys(x)`、`Object.getOwnPropertyNames(x)`都无法获取它。这就造成了一种非私有的内部方法的效果。 - -## Symbol.for(),Symbol.keyFor() - -有时,我们希望重新使用同一个Symbol值,`Symbol.for`方法可以做到这一点。它接受一个字符串作为参数,然后搜索有没有以该参数作为名称的Symbol值。如果有,就返回这个Symbol值,否则就新建并返回一个以该字符串为名称的Symbol值。 - -```javascript -var s1 = Symbol.for('foo'); -var s2 = Symbol.for('foo'); - -s1 === s2 // true -``` - -上面代码中,`s1`和`s2`都是 Symbol 值,但是它们都是同样参数的`Symbol.for`方法生成的,所以实际上是同一个值。 - -`Symbol.for()`与`Symbol()`这两种写法,都会生成新的Symbol。它们的区别是,前者会被登记在全局环境中供搜索,后者不会。`Symbol.for()`不会每次调用就返回一个新的 Symbol 类型的值,而是会先检查给定的`key`是否已经存在,如果不存在才会新建一个值。比如,如果你调用`Symbol.for("cat")`30次,每次都会返回同一个 Symbol 值,但是调用`Symbol("cat")`30次,会返回30个不同的Symbol值。 - -```javascript -Symbol.for("bar") === Symbol.for("bar") -// true - -Symbol("bar") === Symbol("bar") -// false -``` - -上面代码中,由于`Symbol()`写法没有登记机制,所以每次调用都会返回一个不同的值。 - -`Symbol.keyFor`方法返回一个已登记的 Symbol 类型值的`key`。 - -```javascript -var s1 = Symbol.for("foo"); -Symbol.keyFor(s1) // "foo" - -var s2 = Symbol("foo"); -Symbol.keyFor(s2) // undefined -``` - -上面代码中,变量`s2`属于未登记的Symbol值,所以返回`undefined`。 - -需要注意的是,`Symbol.for`为Symbol值登记的名字,是全局环境的,可以在不同的 iframe 或 service worker 中取到同一个值。 - -```javascript -iframe = document.createElement('iframe'); -iframe.src = String(window.location); -document.body.appendChild(iframe); - -iframe.contentWindow.Symbol.for('foo') === Symbol.for('foo') -// true -``` - -上面代码中,iframe 窗口生成的 Symbol 值,可以在主页面得到。 - -## 实例:模块的 Singleton 模式 - -Singleton模式指的是调用一个类,任何时候返回的都是同一个实例。 - -对于Node来说,模块文件可以看成是一个类。怎么保证每次执行这个模块文件,返回的都是同一个实例呢? - -很容易想到,可以把实例放到顶层对象`global`。 - -```javascript -// mod.js -function A() { - this.foo = 'hello'; -} - -if (!global._foo) { - global._foo = new A(); -} - -module.exports = global._foo; -``` - -然后,加载上面的`mod.js`。 - -```javascript -var a = require('./mod.js'); -console.log(a.foo); -``` - -上面代码中,变量`a`任何时候加载的都是`A`的同一个实例。 - -但是,这里有一个问题,全局变量`global._foo`是可写的,任何文件都可以修改。 - -```javascript -var a = require('./mod.js'); -global._foo = 123; -``` - -上面的代码,会使得别的脚本加载`mod.js`都失真。 - -为了防止这种情况出现,我们就可以使用Symbol。 - -```javascript -// mod.js -const FOO_KEY = Symbol.for('foo'); - -function A() { - this.foo = 'hello'; -} - -if (!global[FOO_KEY]) { - global[FOO_KEY] = new A(); -} - -module.exports = global[FOO_KEY]; -``` - -上面代码中,可以保证`global[FOO_KEY]`不会被无意间覆盖,但还是可以被改写。 - -```javascript -var a = require('./mod.js'); -global[Symbol.for('foo')] = 123; -``` - -如果键名使用`Symbol`方法生成,那么外部将无法引用这个值,当然也就无法改写。 - -```javascript -// mod.js -const FOO_KEY = Symbol('foo'); - -// 后面代码相同 …… -``` - -上面代码将导致其他脚本都无法引用`FOO_KEY`。但这样也有一个问题,就是如果多次执行这个脚本,每次得到的`FOO_KEY`都是不一样的。虽然Node会将脚本的执行结果缓存,一般情况下,不会多次执行同一个脚本,但是用户可以手动清除缓存,所以也不是完全可靠。 - -## 内置的Symbol值 - -除了定义自己使用的Symbol值以外,ES6还提供了11个内置的Symbol值,指向语言内部使用的方法。 - -### Symbol.hasInstance - -对象的`Symbol.hasInstance`属性,指向一个内部方法。当其他对象使用`instanceof`运算符,判断是否为该对象的实例时,会调用这个方法。比如,`foo instanceof Foo`在语言内部,实际调用的是`Foo[Symbol.hasInstance](foo)`。 - -```javascript -class MyClass { - [Symbol.hasInstance](foo) { - return foo instanceof Array; - } -} - -[1, 2, 3] instanceof new MyClass() // true -``` - -上面代码中,`MyClass`是一个类,`new MyClass()`会返回一个实例。该实例的`Symbol.hasInstance`方法,会在进行`instanceof`运算时自动调用,判断左侧的运算子是否为`Array`的实例。 - -下面是另一个例子。 - -```javascript -class Even { - static [Symbol.hasInstance](obj) { - return Number(obj) % 2 === 0; - } -} - -1 instanceof Even // false -2 instanceof Even // true -12345 instanceof Even // false -``` - -### Symbol.isConcatSpreadable - -对象的`Symbol.isConcatSpreadable`属性等于一个布尔值,表示该对象使用`Array.prototype.concat()`时,是否可以展开。 - -```javascript -let arr1 = ['c', 'd']; -['a', 'b'].concat(arr1, 'e') // ['a', 'b', 'c', 'd', 'e'] -arr1[Symbol.isConcatSpreadable] // undefined - -let arr2 = ['c', 'd']; -arr2[Symbol.isConcatSpreadable] = false; -['a', 'b'].concat(arr2, 'e') // ['a', 'b', ['c','d'], 'e'] -``` - -上面代码说明,数组的默认行为是可以展开。`Symbol.isConcatSpreadable`属性等于`true`或`undefined`,都有这个效果。 - -类似数组的对象也可以展开,但它的`Symbol.isConcatSpreadable`属性默认为`false`,必须手动打开。 - -```javascript -let obj = {length: 2, 0: 'c', 1: 'd'}; -['a', 'b'].concat(obj, 'e') // ['a', 'b', obj, 'e'] - -obj[Symbol.isConcatSpreadable] = true; -['a', 'b'].concat(obj, 'e') // ['a', 'b', 'c', 'd', 'e'] -``` - -对于一个类来说,`Symbol.isConcatSpreadable`属性必须写成实例的属性。 - -```javascript -class A1 extends Array { - constructor(args) { - super(args); - this[Symbol.isConcatSpreadable] = true; - } -} -class A2 extends Array { - constructor(args) { - super(args); - this[Symbol.isConcatSpreadable] = false; - } -} -let a1 = new A1(); -a1[0] = 3; -a1[1] = 4; -let a2 = new A2(); -a2[0] = 5; -a2[1] = 6; -[1, 2].concat(a1).concat(a2) -// [1, 2, 3, 4, [5, 6]] -``` - -上面代码中,类`A1`是可展开的,类`A2`是不可展开的,所以使用`concat`时有不一样的结果。 - -### Symbol.species - -对象的`Symbol.species`属性,指向当前对象的构造函数。创造实例时,默认会调用这个方法,即使用这个属性返回的函数当作构造函数,来创造新的实例对象。 - -```javascript -class MyArray extends Array { - // 覆盖父类 Array 的构造函数 - static get [Symbol.species]() { return Array; } -} -``` - -上面代码中,子类`MyArray`继承了父类`Array`。创建`MyArray`的实例对象时,本来会调用它自己的构造函数(本例中被省略了),但是由于定义了`Symbol.species`属性,所以会使用这个属性返回的的函数,创建`MyArray`的实例。 - -这个例子也说明,定义`Symbol.species`属性要采用`get`读取器。默认的`Symbol.species`属性等同于下面的写法。 - -```javascript -static get [Symbol.species]() { - return this; -} -``` - -下面是一个例子。 - -```javascript -class MyArray extends Array { - static get [Symbol.species]() { return Array; } -} -var a = new MyArray(1,2,3); -var mapped = a.map(x => x * x); - -mapped instanceof MyArray // false -mapped instanceof Array // true -``` - -上面代码中,由于构造函数被替换成了`Array`。所以,`mapped`对象不是`MyArray`的实例,而是`Array`的实例。 - -### Symbol.match - -对象的`Symbol.match`属性,指向一个函数。当执行`str.match(myObject)`时,如果该属性存在,会调用它,返回该方法的返回值。 - -```javascript -String.prototype.match(regexp) -// 等同于 -regexp[Symbol.match](this) - -class MyMatcher { - [Symbol.match](string) { - return 'hello world'.indexOf(string); - } -} - -'e'.match(new MyMatcher()) // 1 -``` - -### Symbol.replace - -对象的`Symbol.replace`属性,指向一个方法,当该对象被`String.prototype.replace`方法调用时,会返回该方法的返回值。 - -```javascript -String.prototype.replace(searchValue, replaceValue) -// 等同于 -searchValue[Symbol.replace](this, replaceValue) -``` - -下面是一个例子。 - -```javascript -const x = {}; -x[Symbol.replace] = (...s) => console.log(s); - -'Hello'.replace(x, 'World') // ["Hello", "World"] -``` - -`Symbol.replace`方法会收到两个参数,第一个参数是`replace`方法正在作用的对象,上面例子是`Hello`,第二个参数是替换后的值,上面例子是`World`。 - -### Symbol.search - -对象的`Symbol.search`属性,指向一个方法,当该对象被`String.prototype.search`方法调用时,会返回该方法的返回值。 - -```javascript -String.prototype.search(regexp) -// 等同于 -regexp[Symbol.search](this) - -class MySearch { - constructor(value) { - this.value = value; - } - [Symbol.search](string) { - return string.indexOf(this.value); - } -} -'foobar'.search(new MySearch('foo')) // 0 -``` - -### Symbol.split - -对象的`Symbol.split`属性,指向一个方法,当该对象被`String.prototype.split`方法调用时,会返回该方法的返回值。 - -```javascript -String.prototype.split(separator, limit) -// 等同于 -separator[Symbol.split](this, limit) -``` - -下面是一个例子。 - -```javascript -class MySplitter { - constructor(value) { - this.value = value; - } - [Symbol.split](string) { - var index = string.indexOf(this.value); - if (index === -1) { - return string; - } - return [ - string.substr(0, index), - string.substr(index + this.value.length) - ]; - } -} - -'foobar'.split(new MySplitter('foo')) -// ['', 'bar'] - -'foobar'.split(new MySplitter('bar')) -// ['foo', ''] - -'foobar'.split(new MySplitter('baz')) -// 'foobar' -``` - -上面方法使用`Symbol.split`方法,重新定义了字符串对象的`split`方法的行为, - -### Symbol.iterator - -对象的`Symbol.iterator`属性,指向该对象的默认遍历器方法。 - -```javascript -var myIterable = {}; -myIterable[Symbol.iterator] = function* () { - yield 1; - yield 2; - yield 3; -}; - -[...myIterable] // [1, 2, 3] -``` - -对象进行`for...of`循环时,会调用`Symbol.iterator`方法,返回该对象的默认遍历器,详细介绍参见《Iterator和for...of循环》一章。 - -```javascript -class Collection { - *[Symbol.iterator]() { - let i = 0; - while(this[i] !== undefined) { - yield this[i]; - ++i; - } - } -} - -let myCollection = new Collection(); -myCollection[0] = 1; -myCollection[1] = 2; - -for(let value of myCollection) { - console.log(value); -} -// 1 -// 2 -``` - -### Symbol.toPrimitive - -对象的`Symbol.toPrimitive`属性,指向一个方法。该对象被转为原始类型的值时,会调用这个方法,返回该对象对应的原始类型值。 - -`Symbol.toPrimitive`被调用时,会接受一个字符串参数,表示当前运算的模式,一共有三种模式。 - -- Number:该场合需要转成数值 -- String:该场合需要转成字符串 -- Default:该场合可以转成数值,也可以转成字符串 - -```javascript -let obj = { - [Symbol.toPrimitive](hint) { - switch (hint) { - case 'number': - return 123; - case 'string': - return 'str'; - case 'default': - return 'default'; - default: - throw new Error(); - } - } -}; - -2 * obj // 246 -3 + obj // '3default' -obj == 'default' // true -String(obj) // 'str' -``` - -### Symbol.toStringTag - -对象的`Symbol.toStringTag`属性,指向一个方法。在该对象上面调用`Object.prototype.toString`方法时,如果这个属性存在,它的返回值会出现在`toString`方法返回的字符串之中,表示对象的类型。也就是说,这个属性可以用来定制`[object Object]`或`[object Array]`中`object`后面的那个字符串。 - -```javascript -// 例一 -({[Symbol.toStringTag]: 'Foo'}.toString()) -// "[object Foo]" - -// 例二 -class Collection { - get [Symbol.toStringTag]() { - return 'xxx'; - } -} -var x = new Collection(); -Object.prototype.toString.call(x) // "[object xxx]" -``` - -ES6新增内置对象的`Symbol.toStringTag`属性值如下。 - -- `JSON[Symbol.toStringTag]`:'JSON' -- `Math[Symbol.toStringTag]`:'Math' -- Module对象`M[Symbol.toStringTag]`:'Module' -- `ArrayBuffer.prototype[Symbol.toStringTag]`:'ArrayBuffer' -- `DataView.prototype[Symbol.toStringTag]`:'DataView' -- `Map.prototype[Symbol.toStringTag]`:'Map' -- `Promise.prototype[Symbol.toStringTag]`:'Promise' -- `Set.prototype[Symbol.toStringTag]`:'Set' -- `%TypedArray%.prototype[Symbol.toStringTag]`:'Uint8Array'等 -- `WeakMap.prototype[Symbol.toStringTag]`:'WeakMap' -- `WeakSet.prototype[Symbol.toStringTag]`:'WeakSet' -- `%MapIteratorPrototype%[Symbol.toStringTag]`:'Map Iterator' -- `%SetIteratorPrototype%[Symbol.toStringTag]`:'Set Iterator' -- `%StringIteratorPrototype%[Symbol.toStringTag]`:'String Iterator' -- `Symbol.prototype[Symbol.toStringTag]`:'Symbol' -- `Generator.prototype[Symbol.toStringTag]`:'Generator' -- `GeneratorFunction.prototype[Symbol.toStringTag]`:'GeneratorFunction' - -### Symbol.unscopables - -对象的`Symbol.unscopables`属性,指向一个对象。该对象指定了使用`with`关键字时,哪些属性会被`with`环境排除。 - -```javascript -Array.prototype[Symbol.unscopables] -// { -// copyWithin: true, -// entries: true, -// fill: true, -// find: true, -//   findIndex: true, -// includes: true, -// keys: true -// } - -Object.keys(Array.prototype[Symbol.unscopables]) -// ['copyWithin', 'entries', 'fill', 'find', 'findIndex', 'includes', 'keys'] -``` - -上面代码说明,数组有7个属性,会被`with`命令排除。 - -```javascript -// 没有 unscopables 时 -class MyClass { - foo() { return 1; } -} - -var foo = function () { return 2; }; - -with (MyClass.prototype) { - foo(); // 1 -} - -// 有 unscopables 时 -class MyClass { - foo() { return 1; } - get [Symbol.unscopables]() { - return { foo: true }; - } -} - -var foo = function () { return 2; }; - -with (MyClass.prototype) { - foo(); // 2 -} -``` - -上面代码通过指定`Symbol.unscopables`属性,使得`with`语法块不会在当前作用域寻找`foo`属性,即`foo`将指向外层作用域的变量。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/index.html" deleted file mode 100644 index 64553c17c..000000000 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/index.html" +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="app/bower_components/normalize-css/normalize.css"> - <link rel="stylesheet" href="css/app.css"> - <title>ECMAScript 6入门 - - - - - - - - - - - - -
- -
back to top
-
edit
-
Loading ...
-
Opps! ... File not found!
-
上一章
下一章
-
- - - - - - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/README.md" "b/02-ES\346\226\260\347\211\271\346\200\247/README.md" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/README.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/README.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es-checker-master.zip" "b/02-ES\346\226\260\347\211\271\346\200\247/es-checker-master.zip" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es-checker-master.zip" rename to "02-ES\346\226\260\347\211\271\346\200\247/es-checker-master.zip" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6features.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6features.md" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6features.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6features.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/.gitignore" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/.gitignore" new file mode 100755 index 000000000..fb8cf1e5f --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/.gitignore" @@ -0,0 +1,22 @@ +git # OS X +Icon? +._* + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# Linux +.directory +*~ + +# npm +node_modules +dist +*.gz + +# webstorm +.idea/ + + diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/.nojekyll" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/.nojekyll" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/.nojekyll" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/.nojekyll" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/404.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/404.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/404.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/404.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/CNAME" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/CNAME" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/CNAME" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/CNAME" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/LICENSE" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/LICENSE" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/LICENSE" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/LICENSE" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/README.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/README.md" new file mode 100755 index 000000000..a4cc5baec --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/README.md" @@ -0,0 +1,27 @@ +# ECMAScript 6 入门 + +《ECMAScript 6 入门》是一本开源的 JavaScript 语言教程,全面介绍 ECMAScript 6 新引入的语法特性。 + +[![cover](images/cover_thumbnail_3rd.jpg)](images/cover-3rd.jpg) + +本书覆盖 ES6 与上一个版本 ES5 的所有不同之处,对涉及的语法知识给予详细介绍,并给出大量简洁易懂的示例代码。 + +本书为中级难度,适合已经掌握 ES5 的读者,用来了解这门语言的最新发展;也可当作参考手册,查寻新增的语法点。如果你是 JavaScript 语言的初学者,建议先学完[《JavaScript 语言入门教程》](https://wangdoc.com/javascript/),再来看本书。 + +全书已由电子工业出版社出版,2017年9月推出了第三版,书名为《ES6 标准入门》。纸版是基于网站内容排版印刷的。 + +感谢张春雨编辑支持我将全书开源的做法。如果您认可这本书,建议购买纸版。这样可以使出版社不因出版开源书籍而亏钱,进而鼓励更多的作者开源自己的书籍。下面是第三版的购买地址。 + +- [淘宝](https://s.taobao.com/search?q=ES6%E6%A0%87%E5%87%86%E5%85%A5%E9%97%A8+%E7%AC%AC3%E7%89%88) +- [京东](https://search.jd.com/Search?keyword=ES6%E6%A0%87%E5%87%86%E5%85%A5%E9%97%A8%20%E7%AC%AC3%E7%89%88&enc=utf-8&wq=ES6%E6%A0%87%E5%87%86%E5%85%A5%E9%97%A8%20%E7%AC%AC3%E7%89%88) +- [当当](http://product.dangdang.com/25156888.html) +- [亚马逊](https://www.amazon.cn/ES6%E6%A0%87%E5%87%86%E5%85%A5%E9%97%A8-%E9%98%AE%E4%B8%80%E5%B3%B0/dp/B0755547ZZ) +- [China-pub](http://product.china-pub.com/6504650) + +### 版权许可 + +本书采用“保持署名—非商用”创意共享4.0许可证。 + +只要保持原作者署名和非商用,您可以自由地阅读、分享、修改本书。 + +详细的法律条文请参见[创意共享](http://creativecommons.org/licenses/by-nc/4.0/)网站。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/SUMMARY.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/SUMMARY.md" new file mode 100755 index 000000000..28dec1cc5 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/SUMMARY.md" @@ -0,0 +1,31 @@ +# Summary + +* [0. 前言](README.md) +* [1. ECMAScript 6简介](docs/intro.md) +* [2. let 和 const 命令](docs/let.md) +* [3. 变量的解构赋值](docs/destructuring.md) +* [4. 字符串的扩展](docs/string.md) +* [5. 正则的扩展](docs/regex.md) +* [6. 数值的扩展](docs/number.md) +* [7. 函数的扩展](docs/function.md) +* [8. 数组的扩展](docs/array.md) +* [9. 对象的扩展](docs/object.md) +* [10. Symbol](docs/symbol.md) +* [11. Set 和 Map 数据结构](docs/set-map.md) +* [12. Proxy](docs/proxy.md) +* [13. Reflect](docs/reflect.md) +* [14. Promise 对象](docs/promise.md) +* [15. Iterator 和 for...of 循环](docs/iterator.md) +* [16. Generator 函数的语法](docs/generator.md) +* [17. Generator 函数的异步应用](docs/generator-async.md) +* [18. async 函数](docs/async.md) +* [19. Class 的基本语法](docs/class.md) +* [20. Class 的继承](docs/class-extends.md) +* [21. Decorator](docs/decorator.md) +* [22. Module 的语法](docs/module.md) +* [23. Module 的加载实现](docs/module-loader.md) +* [24. 编程风格](docs/style.md) +* [25. 读懂规格](docs/spec.md) +* [26. ArrayBuffer](docs/arraybuffer.md) +* [27. 最新提案](docs/proposals.md) +* [28. 参考链接](docs/reference.md) \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.bower.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.bower.json" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.bower.json" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.bower.json" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.gitignore" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.gitignore" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.gitignore" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.gitignore" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.npmignore" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.npmignore" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.npmignore" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.npmignore" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.travis.yml" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.travis.yml" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/.travis.yml" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/.travis.yml" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/LICENSE" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/LICENSE" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/LICENSE" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/LICENSE" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/Makefile" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/Makefile" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/Makefile" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/Makefile" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/README.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/README.md" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/README.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/README.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/bin/marked" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/bin/marked" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/bin/marked" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/bin/marked" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/component.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/component.json" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/component.json" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/component.json" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/doc/broken.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/doc/broken.md" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/doc/broken.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/doc/broken.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/doc/todo.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/doc/todo.md" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/doc/todo.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/doc/todo.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/index.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/index.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/index.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/index.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/lib/marked.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/lib/marked.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/lib/marked.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/lib/marked.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/man/marked.1" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/man/marked.1" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/man/marked.1" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/man/marked.1" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/package.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/package.json" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/package.json" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/package.json" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/README" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/README" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/README" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/README" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/index.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/test.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/test.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/browser/test.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/browser/test.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/index.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/index.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/index.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/index.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/autolink_lines.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/blockquote_list_item.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/case_insensitive_refs.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/def_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/double_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/escaped_angles.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_break.breaks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_code_hr_list.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_del.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_em.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_links.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/gfm_tables.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/hr_list_break.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/lazy_blockquotes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/list_item_text.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/loose_lists.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/main.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_code.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_em.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/nested_square_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/not_a_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/ref_paren.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/same_bullet.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/text.smartypants.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/toplevel_paragraphs.gfm.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/new/tricky_list.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/amps_and_angles_encoding.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/auto_links.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/backslash_escapes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/blockquotes_with_code_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/code_spans.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/horizontal_rules.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_advanced.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_comments.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/inline_html_simple.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_inline_style.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_reference_style.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/links_shortcut_references.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/literal_quotes_in_titles.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_basics.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/markdown_documentation_syntax.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/nested_blockquotes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/ordered_and_unordered_lists.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/strong_and_em_together.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tabs.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/original/tidyness.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/amps_and_angles_encoding.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/auto_links.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/autolink_lines.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/backslash_escapes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquote_list_item.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/blockquotes_with_code_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/case_insensitive_refs.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/code_spans.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/def_blocks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/double_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/escaped_angles.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_break.breaks.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_code_hr_list.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_del.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_em.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_links.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/gfm_tables.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.nogfm.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/horizontal_rules.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/hr_list_break.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_advanced.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_comments.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/inline_html_simple.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/lazy_blockquotes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_inline_style.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_reference_style.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/links_shortcut_references.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/list_item_text.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/literal_quotes_in_titles.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/loose_lists.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/main.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_basics.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/markdown_documentation_syntax.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_blockquotes.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_code.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_em.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/nested_square_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/not_a_link.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ordered_and_unordered_lists.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/ref_paren.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/same_bullet.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/strong_and_em_together.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tabs.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/text.smartypants.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tidyness.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/toplevel_paragraphs.gfm.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.html" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.text" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.text" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.text" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/marked/test/tests/tricky_list.text" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/.bower.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/.bower.json" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/.bower.json" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/.bower.json" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/LICENSE.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/LICENSE.md" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/LICENSE.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/LICENSE.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/README.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/README.md" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/README.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/README.md" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/bower.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/bower.json" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/bower.json" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/bower.json" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/normalize.css" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/normalize.css" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/app/bower_components/normalize-css/normalize.css" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/app/bower_components/normalize-css/normalize.css" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/book.json" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/book.json" new file mode 100755 index 000000000..be5d775bd --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/book.json" @@ -0,0 +1,36 @@ +{ + "author": "阮一峰", + "description": "《ECMAScript 6 入门》是一本开源的 JavaScript 语言教程,全面介绍 ECMAScript 6 新引入的语法特性。", + "extension": null, + "generator": "site", + "isbn": "9787121324758", + "links": { + "sharing": { + "all": null, + "facebook": null, + "google": null, + "twitter": null, + "weibo": null + }, + "sidebar": { + "阮一峰的个人网站": "http://www.ruanyifeng.com/blog/" + } + }, + "output": null, + "pdf": { + "fontSize": 12, + "footerTemplate": null, + "headerTemplate": null, + "margin": { + "bottom": 36, + "left": 62, + "right": 62, + "top": 36 + }, + "pageNumbers": false, + "paperSize": "a4" + }, + "plugins": [], + "title": "ECMAScript 6 入门", + "variables": {} +} \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/config.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/config.js" new file mode 100755 index 000000000..f0c3ad930 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/config.js" @@ -0,0 +1,27 @@ +var CONFIG = { + // your website's title + document_title: "ECMAScript 6入门", + + // index page + index: "README.md", + + // sidebar file + sidebar_file: "sidebar.md", + + // where the docs are actually stored on github - so you can edit + base_url: "https://github.com/ruanyf/es6tutorial/edit/gh-pages", +}; + +// ************************** +// DON'T EDIT FOLLOWING CODES +// ************************** + +addConfig(ditto, CONFIG); + +function addConfig(obj, conf) { + Object.keys(conf).forEach(function (key) { + obj[key] = conf[key]; + }); +} + +ditto.run(); diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover.jpg" new file mode 120000 index 000000000..0fa7635c3 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover.jpg" @@ -0,0 +1 @@ +images/cover-3rd.jpg \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover_small.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover_small.jpg" new file mode 120000 index 000000000..61091a8ce --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/cover_small.jpg" @@ -0,0 +1 @@ +images/cover_thumbnail_3rd.jpg \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/app.css" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/app.css" old mode 100644 new mode 100755 similarity index 99% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/app.css" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/app.css" index fe21dc7b4..a2e2f3c51 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/css/app.css" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/app.css" @@ -120,6 +120,7 @@ input[type=search] { height: 18px; text-align: left; border: none; + outline: none; } input.searchButton { diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/normalize.css" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/normalize.css" new file mode 120000 index 000000000..3d9454653 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/css/normalize.css" @@ -0,0 +1 @@ +../app/bower_components/normalize-css/normalize.css \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/acknowledgment.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/acknowledgment.md" new file mode 100755 index 000000000..818faab9f --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/acknowledgment.md" @@ -0,0 +1,5 @@ +# 鸣谢 + +## Generator + +网友 vision57 提出,`next()`、`throw()`、`return()`这三个方法本质上是同一件事,可以放在一起理解。它们的作用都是让 Generator 函数恢复执行,并且使用不同的语句替换`yield`表达式。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/array.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/array.md" new file mode 100755 index 000000000..b0148b7cf --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/array.md" @@ -0,0 +1,949 @@ +# 数组的扩展 + +## 扩展运算符 + +### 含义 + +扩展运算符(spread)是三个点(`...`)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。 + +```javascript +console.log(...[1, 2, 3]) +// 1 2 3 + +console.log(1, ...[2, 3, 4], 5) +// 1 2 3 4 5 + +[...document.querySelectorAll('div')] +// [
,
,
] +``` + +该运算符主要用于函数调用。 + +```javascript +function push(array, ...items) { + array.push(...items); +} + +function add(x, y) { + return x + y; +} + +const numbers = [4, 38]; +add(...numbers) // 42 +``` + +上面代码中,`array.push(...items)`和`add(...numbers)`这两行,都是函数的调用,它们的都使用了扩展运算符。该运算符将一个数组,变为参数序列。 + +扩展运算符与正常的函数参数可以结合使用,非常灵活。 + +```javascript +function f(v, w, x, y, z) { } +const args = [0, 1]; +f(-1, ...args, 2, ...[3]); +``` + +扩展运算符后面还可以放置表达式。 + +```javascript +const arr = [ + ...(x > 0 ? ['a'] : []), + 'b', +]; +``` + +如果扩展运算符后面是一个空数组,则不产生任何效果。 + +```javascript +[...[], 1] +// [1] +``` + +注意,扩展运算符如果放在括号中,JavaScript 引擎就会认为这是函数调用。如果这时不是函数调用,就会报错。 + +```javascript +(...[1, 2]) +// Uncaught SyntaxError: Unexpected number + +console.log((...[1, 2])) +// Uncaught SyntaxError: Unexpected number + +console.log(...[1, 2]) +// 1 2 +``` + +上面前两种情况都会报错,因为扩展运算符所在的括号不是函数调用,而第三种情况`console.log(...[1, 2])`就不会报错,因为这时是函数调用。 + +### 替代函数的 apply 方法 + +由于扩展运算符可以展开数组,所以不再需要`apply`方法,将数组转为函数的参数了。 + +```javascript +// ES5 的写法 +function f(x, y, z) { + // ... +} +var args = [0, 1, 2]; +f.apply(null, args); + +// ES6的写法 +function f(x, y, z) { + // ... +} +let args = [0, 1, 2]; +f(...args); +``` + +下面是扩展运算符取代`apply`方法的一个实际的例子,应用`Math.max`方法,简化求出一个数组最大元素的写法。 + +```javascript +// ES5 的写法 +Math.max.apply(null, [14, 3, 77]) + +// ES6 的写法 +Math.max(...[14, 3, 77]) + +// 等同于 +Math.max(14, 3, 77); +``` + +上面代码中,由于 JavaScript 不提供求数组最大元素的函数,所以只能套用`Math.max`函数,将数组转为一个参数序列,然后求最大值。有了扩展运算符以后,就可以直接用`Math.max`了。 + +另一个例子是通过`push`函数,将一个数组添加到另一个数组的尾部。 + +```javascript +// ES5的 写法 +var arr1 = [0, 1, 2]; +var arr2 = [3, 4, 5]; +Array.prototype.push.apply(arr1, arr2); + +// ES6 的写法 +let arr1 = [0, 1, 2]; +let arr2 = [3, 4, 5]; +arr1.push(...arr2); +``` + +上面代码的 ES5 写法中,`push`方法的参数不能是数组,所以只好通过`apply`方法变通使用`push`方法。有了扩展运算符,就可以直接将数组传入`push`方法。 + +下面是另外一个例子。 + +```javascript +// ES5 +new (Date.bind.apply(Date, [null, 2015, 1, 1])) +// ES6 +new Date(...[2015, 1, 1]); +``` + +### 扩展运算符的应用 + +**(1)复制数组** + +数组是复合的数据类型,直接复制的话,只是复制了指向底层数据结构的指针,而不是克隆一个全新的数组。 + +```javascript +const a1 = [1, 2]; +const a2 = a1; + +a2[0] = 2; +a1 // [2, 2] +``` + +上面代码中,`a2`并不是`a1`的克隆,而是指向同一份数据的另一个指针。修改`a2`,会直接导致`a1`的变化。 + +ES5 只能用变通方法来复制数组。 + +```javascript +const a1 = [1, 2]; +const a2 = a1.concat(); + +a2[0] = 2; +a1 // [1, 2] +``` + +上面代码中,`a1`会返回原数组的克隆,再修改`a2`就不会对`a1`产生影响。 + +扩展运算符提供了复制数组的简便写法。 + +```javascript +const a1 = [1, 2]; +// 写法一 +const a2 = [...a1]; +// 写法二 +const [...a2] = a1; +``` + +上面的两种写法,`a2`都是`a1`的克隆。 + +**(2)合并数组** + +扩展运算符提供了数组合并的新写法。 + +```javascript +const arr1 = ['a', 'b']; +const arr2 = ['c']; +const arr3 = ['d', 'e']; + +// ES5 的合并数组 +arr1.concat(arr2, arr3); +// [ 'a', 'b', 'c', 'd', 'e' ] + +// ES6 的合并数组 +[...arr1, ...arr2, ...arr3] +// [ 'a', 'b', 'c', 'd', 'e' ] +``` + +不过,这两种方法都是浅拷贝,使用的时候需要注意。 + +```javascript +const a1 = [{ foo: 1 }]; +const a2 = [{ bar: 2 }]; + +const a3 = a1.concat(a2); +const a4 = [...a1, ...a2]; + +a3[0] === a1[0] // true +a4[0] === a1[0] // true +``` + +上面代码中,`a3`和`a4`是用两种不同方法合并而成的新数组,但是它们的成员都是对原数组成员的引用,这就是浅拷贝。如果修改了原数组的成员,会同步反映到新数组。 + +**(3)与解构赋值结合** + +扩展运算符可以与解构赋值结合起来,用于生成数组。 + +```javascript +// ES5 +a = list[0], rest = list.slice(1) +// ES6 +[a, ...rest] = list +``` + +下面是另外一些例子。 + +```javascript +const [first, ...rest] = [1, 2, 3, 4, 5]; +first // 1 +rest // [2, 3, 4, 5] + +const [first, ...rest] = []; +first // undefined +rest // [] + +const [first, ...rest] = ["foo"]; +first // "foo" +rest // [] +``` + +如果将扩展运算符用于数组赋值,只能放在参数的最后一位,否则会报错。 + +```javascript +const [...butLast, last] = [1, 2, 3, 4, 5]; +// 报错 + +const [first, ...middle, last] = [1, 2, 3, 4, 5]; +// 报错 +``` + +**(4)字符串** + +扩展运算符还可以将字符串转为真正的数组。 + +```javascript +[...'hello'] +// [ "h", "e", "l", "l", "o" ] +``` + +上面的写法,有一个重要的好处,那就是能够正确识别四个字节的 Unicode 字符。 + +```javascript +'x\uD83D\uDE80y'.length // 4 +[...'x\uD83D\uDE80y'].length // 3 +``` + +上面代码的第一种写法,JavaScript 会将四个字节的 Unicode 字符,识别为 2 个字符,采用扩展运算符就没有这个问题。因此,正确返回字符串长度的函数,可以像下面这样写。 + +```javascript +function length(str) { + return [...str].length; +} + +length('x\uD83D\uDE80y') // 3 +``` + +凡是涉及到操作四个字节的 Unicode 字符的函数,都有这个问题。因此,最好都用扩展运算符改写。 + +```javascript +let str = 'x\uD83D\uDE80y'; + +str.split('').reverse().join('') +// 'y\uDE80\uD83Dx' + +[...str].reverse().join('') +// 'y\uD83D\uDE80x' +``` + +上面代码中,如果不用扩展运算符,字符串的`reverse`操作就不正确。 + +**(5)实现了 Iterator 接口的对象** + +任何定义了遍历器(Iterator)接口的对象(参阅 Iterator 一章),都可以用扩展运算符转为真正的数组。 + +```javascript +let nodeList = document.querySelectorAll('div'); +let array = [...nodeList]; +``` + +上面代码中,`querySelectorAll`方法返回的是一个`NodeList`对象。它不是数组,而是一个类似数组的对象。这时,扩展运算符可以将其转为真正的数组,原因就在于`NodeList`对象实现了 Iterator 。 + +```javascript +Number.prototype[Symbol.iterator] = function*() { + let i = 0; + let num = this.valueOf(); + while (i < num) { + yield i++; + } +} + +console.log([...5]) // [0, 1, 2, 3, 4] +``` + +上面代码中,先定义了`Number`对象的遍历器接口,扩展运算符将`5`自动转成`Number`实例以后,就会调用这个接口,就会返回自定义的结果。 + +对于那些没有部署 Iterator 接口的类似数组的对象,扩展运算符就无法将其转为真正的数组。 + +```javascript +let arrayLike = { + '0': 'a', + '1': 'b', + '2': 'c', + length: 3 +}; + +// TypeError: Cannot spread non-iterable object. +let arr = [...arrayLike]; +``` + +上面代码中,`arrayLike`是一个类似数组的对象,但是没有部署 Iterator 接口,扩展运算符就会报错。这时,可以改为使用`Array.from`方法将`arrayLike`转为真正的数组。 + +**(6)Map 和 Set 结构,Generator 函数** + +扩展运算符内部调用的是数据结构的 Iterator 接口,因此只要具有 Iterator 接口的对象,都可以使用扩展运算符,比如 Map 结构。 + +```javascript +let map = new Map([ + [1, 'one'], + [2, 'two'], + [3, 'three'], +]); + +let arr = [...map.keys()]; // [1, 2, 3] +``` + +Generator 函数运行后,返回一个遍历器对象,因此也可以使用扩展运算符。 + +```javascript +const go = function*(){ + yield 1; + yield 2; + yield 3; +}; + +[...go()] // [1, 2, 3] +``` + +上面代码中,变量`go`是一个 Generator 函数,执行后返回的是一个遍历器对象,对这个遍历器对象执行扩展运算符,就会将内部遍历得到的值,转为一个数组。 + +如果对没有 Iterator 接口的对象,使用扩展运算符,将会报错。 + +```javascript +const obj = {a: 1, b: 2}; +let arr = [...obj]; // TypeError: Cannot spread non-iterable object +``` + +## Array.from() + +`Array.from`方法用于将两类对象转为真正的数组:类似数组的对象(array-like object)和可遍历(iterable)的对象(包括 ES6 新增的数据结构 Set 和 Map)。 + +下面是一个类似数组的对象,`Array.from`将它转为真正的数组。 + +```javascript +let arrayLike = { + '0': 'a', + '1': 'b', + '2': 'c', + length: 3 +}; + +// ES5的写法 +var arr1 = [].slice.call(arrayLike); // ['a', 'b', 'c'] + +// ES6的写法 +let arr2 = Array.from(arrayLike); // ['a', 'b', 'c'] +``` + +实际应用中,常见的类似数组的对象是 DOM 操作返回的 NodeList 集合,以及函数内部的`arguments`对象。`Array.from`都可以将它们转为真正的数组。 + +```javascript +// NodeList对象 +let ps = document.querySelectorAll('p'); +Array.from(ps).filter(p => { + return p.textContent.length > 100; +}); + +// arguments对象 +function foo() { + var args = Array.from(arguments); + // ... +} +``` + +上面代码中,`querySelectorAll`方法返回的是一个类似数组的对象,可以将这个对象转为真正的数组,再使用`filter`方法。 + +只要是部署了 Iterator 接口的数据结构,`Array.from`都能将其转为数组。 + +```javascript +Array.from('hello') +// ['h', 'e', 'l', 'l', 'o'] + +let namesSet = new Set(['a', 'b']) +Array.from(namesSet) // ['a', 'b'] +``` + +上面代码中,字符串和 Set 结构都具有 Iterator 接口,因此可以被`Array.from`转为真正的数组。 + +如果参数是一个真正的数组,`Array.from`会返回一个一模一样的新数组。 + +```javascript +Array.from([1, 2, 3]) +// [1, 2, 3] +``` + +值得提醒的是,扩展运算符(`...`)也可以将某些数据结构转为数组。 + +```javascript +// arguments对象 +function foo() { + const args = [...arguments]; +} + +// NodeList对象 +[...document.querySelectorAll('div')] +``` + +扩展运算符背后调用的是遍历器接口(`Symbol.iterator`),如果一个对象没有部署这个接口,就无法转换。`Array.from`方法还支持类似数组的对象。所谓类似数组的对象,本质特征只有一点,即必须有`length`属性。因此,任何有`length`属性的对象,都可以通过`Array.from`方法转为数组,而此时扩展运算符就无法转换。 + +```javascript +Array.from({ length: 3 }); +// [ undefined, undefined, undefined ] +``` + +上面代码中,`Array.from`返回了一个具有三个成员的数组,每个位置的值都是`undefined`。扩展运算符转换不了这个对象。 + +对于还没有部署该方法的浏览器,可以用`Array.prototype.slice`方法替代。 + +```javascript +const toArray = (() => + Array.from ? Array.from : obj => [].slice.call(obj) +)(); +``` + +`Array.from`还可以接受第二个参数,作用类似于数组的`map`方法,用来对每个元素进行处理,将处理后的值放入返回的数组。 + +```javascript +Array.from(arrayLike, x => x * x); +// 等同于 +Array.from(arrayLike).map(x => x * x); + +Array.from([1, 2, 3], (x) => x * x) +// [1, 4, 9] +``` + +下面的例子是取出一组 DOM 节点的文本内容。 + +```javascript +let spans = document.querySelectorAll('span.name'); + +// map() +let names1 = Array.prototype.map.call(spans, s => s.textContent); + +// Array.from() +let names2 = Array.from(spans, s => s.textContent) +``` + +下面的例子将数组中布尔值为`false`的成员转为`0`。 + +```javascript +Array.from([1, , 2, , 3], (n) => n || 0) +// [1, 0, 2, 0, 3] +``` + +另一个例子是返回各种数据的类型。 + +```javascript +function typesOf () { + return Array.from(arguments, value => typeof value) +} +typesOf(null, [], NaN) +// ['object', 'object', 'number'] +``` + +如果`map`函数里面用到了`this`关键字,还可以传入`Array.from`的第三个参数,用来绑定`this`。 + +`Array.from()`可以将各种值转为真正的数组,并且还提供`map`功能。这实际上意味着,只要有一个原始的数据结构,你就可以先对它的值进行处理,然后转成规范的数组结构,进而就可以使用数量众多的数组方法。 + +```javascript +Array.from({ length: 2 }, () => 'jack') +// ['jack', 'jack'] +``` + +上面代码中,`Array.from`的第一个参数指定了第二个参数运行的次数。这种特性可以让该方法的用法变得非常灵活。 + +`Array.from()`的另一个应用是,将字符串转为数组,然后返回字符串的长度。因为它能正确处理各种 Unicode 字符,可以避免 JavaScript 将大于`\uFFFF`的 Unicode 字符,算作两个字符的 bug。 + +```javascript +function countSymbols(string) { + return Array.from(string).length; +} +``` + +## Array.of() + +`Array.of`方法用于将一组值,转换为数组。 + +```javascript +Array.of(3, 11, 8) // [3,11,8] +Array.of(3) // [3] +Array.of(3).length // 1 +``` + +这个方法的主要目的,是弥补数组构造函数`Array()`的不足。因为参数个数的不同,会导致`Array()`的行为有差异。 + +```javascript +Array() // [] +Array(3) // [, , ,] +Array(3, 11, 8) // [3, 11, 8] +``` + +上面代码中,`Array`方法没有参数、一个参数、三个参数时,返回结果都不一样。只有当参数个数不少于 2 个时,`Array()`才会返回由参数组成的新数组。参数个数只有一个时,实际上是指定数组的长度。 + +`Array.of`基本上可以用来替代`Array()`或`new Array()`,并且不存在由于参数不同而导致的重载。它的行为非常统一。 + +```javascript +Array.of() // [] +Array.of(undefined) // [undefined] +Array.of(1) // [1] +Array.of(1, 2) // [1, 2] +``` + +`Array.of`总是返回参数值组成的数组。如果没有参数,就返回一个空数组。 + +`Array.of`方法可以用下面的代码模拟实现。 + +```javascript +function ArrayOf(){ + return [].slice.call(arguments); +} +``` + +## 数组实例的 copyWithin() + +数组实例的`copyWithin`方法,在当前数组内部,将指定位置的成员复制到其他位置(会覆盖原有成员),然后返回当前数组。也就是说,使用这个方法,会修改当前数组。 + +```javascript +Array.prototype.copyWithin(target, start = 0, end = this.length) +``` + +它接受三个参数。 + +- target(必需):从该位置开始替换数据。如果为负值,表示倒数。 +- start(可选):从该位置开始读取数据,默认为 0。如果为负值,表示倒数。 +- end(可选):到该位置前停止读取数据,默认等于数组长度。如果为负值,表示倒数。 + +这三个参数都应该是数值,如果不是,会自动转为数值。 + +```javascript +[1, 2, 3, 4, 5].copyWithin(0, 3) +// [4, 5, 3, 4, 5] +``` + +上面代码表示将从 3 号位直到数组结束的成员(4 和 5),复制到从 0 号位开始的位置,结果覆盖了原来的 1 和 2。 + +下面是更多例子。 + +```javascript +// 将3号位复制到0号位 +[1, 2, 3, 4, 5].copyWithin(0, 3, 4) +// [4, 2, 3, 4, 5] + +// -2相当于3号位,-1相当于4号位 +[1, 2, 3, 4, 5].copyWithin(0, -2, -1) +// [4, 2, 3, 4, 5] + +// 将3号位复制到0号位 +[].copyWithin.call({length: 5, 3: 1}, 0, 3) +// {0: 1, 3: 1, length: 5} + +// 将2号位到数组结束,复制到0号位 +let i32a = new Int32Array([1, 2, 3, 4, 5]); +i32a.copyWithin(0, 2); +// Int32Array [3, 4, 5, 4, 5] + +// 对于没有部署 TypedArray 的 copyWithin 方法的平台 +// 需要采用下面的写法 +[].copyWithin.call(new Int32Array([1, 2, 3, 4, 5]), 0, 3, 4); +// Int32Array [4, 2, 3, 4, 5] +``` + +## 数组实例的 find() 和 findIndex() + +数组实例的`find`方法,用于找出第一个符合条件的数组成员。它的参数是一个回调函数,所有数组成员依次执行该回调函数,直到找出第一个返回值为`true`的成员,然后返回该成员。如果没有符合条件的成员,则返回`undefined`。 + +```javascript +[1, 4, -5, 10].find((n) => n < 0) +// -5 +``` + +上面代码找出数组中第一个小于 0 的成员。 + +```javascript +[1, 5, 10, 15].find(function(value, index, arr) { + return value > 9; +}) // 10 +``` + +上面代码中,`find`方法的回调函数可以接受三个参数,依次为当前的值、当前的位置和原数组。 + +数组实例的`findIndex`方法的用法与`find`方法非常类似,返回第一个符合条件的数组成员的位置,如果所有成员都不符合条件,则返回`-1`。 + +```javascript +[1, 5, 10, 15].findIndex(function(value, index, arr) { + return value > 9; +}) // 2 +``` + +这两个方法都可以接受第二个参数,用来绑定回调函数的`this`对象。 + +```javascript +function f(v){ + return v > this.age; +} +let person = {name: 'John', age: 20}; +[10, 12, 26, 15].find(f, person); // 26 +``` + +上面的代码中,`find`函数接收了第二个参数`person`对象,回调函数中的`this`对象指向`person`对象。 + +另外,这两个方法都可以发现`NaN`,弥补了数组的`indexOf`方法的不足。 + +```javascript +[NaN].indexOf(NaN) +// -1 + +[NaN].findIndex(y => Object.is(NaN, y)) +// 0 +``` + +上面代码中,`indexOf`方法无法识别数组的`NaN`成员,但是`findIndex`方法可以借助`Object.is`方法做到。 + +## 数组实例的 fill() + +`fill`方法使用给定值,填充一个数组。 + +```javascript +['a', 'b', 'c'].fill(7) +// [7, 7, 7] + +new Array(3).fill(7) +// [7, 7, 7] +``` + +上面代码表明,`fill`方法用于空数组的初始化非常方便。数组中已有的元素,会被全部抹去。 + +`fill`方法还可以接受第二个和第三个参数,用于指定填充的起始位置和结束位置。 + +```javascript +['a', 'b', 'c'].fill(7, 1, 2) +// ['a', 7, 'c'] +``` + +上面代码表示,`fill`方法从 1 号位开始,向原数组填充 7,到 2 号位之前结束。 + +注意,如果填充的类型为对象,那么被赋值的是同一个内存地址的对象,而不是深拷贝对象。 + +```javascript +let arr = new Array(3).fill({name: "Mike"}); +arr[0].name = "Ben"; +arr +// [{name: "Ben"}, {name: "Ben"}, {name: "Ben"}] + +let arr = new Array(3).fill([]); +arr[0].push(5); +arr +// [[5], [5], [5]] +``` + +## 数组实例的 entries(),keys() 和 values() + +ES6 提供三个新的方法——`entries()`,`keys()`和`values()`——用于遍历数组。它们都返回一个遍历器对象(详见《Iterator》一章),可以用`for...of`循环进行遍历,唯一的区别是`keys()`是对键名的遍历、`values()`是对键值的遍历,`entries()`是对键值对的遍历。 + +```javascript +for (let index of ['a', 'b'].keys()) { + console.log(index); +} +// 0 +// 1 + +for (let elem of ['a', 'b'].values()) { + console.log(elem); +} +// 'a' +// 'b' + +for (let [index, elem] of ['a', 'b'].entries()) { + console.log(index, elem); +} +// 0 "a" +// 1 "b" +``` + +如果不使用`for...of`循环,可以手动调用遍历器对象的`next`方法,进行遍历。 + +```javascript +let letter = ['a', 'b', 'c']; +let entries = letter.entries(); +console.log(entries.next().value); // [0, 'a'] +console.log(entries.next().value); // [1, 'b'] +console.log(entries.next().value); // [2, 'c'] +``` + +## 数组实例的 includes() + +`Array.prototype.includes`方法返回一个布尔值,表示某个数组是否包含给定的值,与字符串的`includes`方法类似。ES2016 引入了该方法。 + +```javascript +[1, 2, 3].includes(2) // true +[1, 2, 3].includes(4) // false +[1, 2, NaN].includes(NaN) // true +``` + +该方法的第二个参数表示搜索的起始位置,默认为`0`。如果第二个参数为负数,则表示倒数的位置,如果这时它大于数组长度(比如第二个参数为`-4`,但数组长度为`3`),则会重置为从`0`开始。 + +```javascript +[1, 2, 3].includes(3, 3); // false +[1, 2, 3].includes(3, -1); // true +``` + +没有该方法之前,我们通常使用数组的`indexOf`方法,检查是否包含某个值。 + +```javascript +if (arr.indexOf(el) !== -1) { + // ... +} +``` + +`indexOf`方法有两个缺点,一是不够语义化,它的含义是找到参数值的第一个出现位置,所以要去比较是否不等于`-1`,表达起来不够直观。二是,它内部使用严格相等运算符(`===`)进行判断,这会导致对`NaN`的误判。 + +```javascript +[NaN].indexOf(NaN) +// -1 +``` + +`includes`使用的是不一样的判断算法,就没有这个问题。 + +```javascript +[NaN].includes(NaN) +// true +``` + +下面代码用来检查当前环境是否支持该方法,如果不支持,部署一个简易的替代版本。 + +```javascript +const contains = (() => + Array.prototype.includes + ? (arr, value) => arr.includes(value) + : (arr, value) => arr.some(el => el === value) +)(); +contains(['foo', 'bar'], 'baz'); // => false +``` + +另外,Map 和 Set 数据结构有一个`has`方法,需要注意与`includes`区分。 + +- Map 结构的`has`方法,是用来查找键名的,比如`Map.prototype.has(key)`、`WeakMap.prototype.has(key)`、`Reflect.has(target, propertyKey)`。 +- Set 结构的`has`方法,是用来查找值的,比如`Set.prototype.has(value)`、`WeakSet.prototype.has(value)`。 + +## 数组实例的 flat(),flatMap() + +数组的成员有时还是数组,`Array.prototype.flat()`用于将嵌套的数组“拉平”,变成一维的数组。该方法返回一个新数组,对原数据没有影响。 + +```javascript +[1, 2, [3, 4]].flat() +// [1, 2, 3, 4] +``` + +上面代码中,原数组的成员里面有一个数组,`flat()`方法将子数组的成员取出来,添加在原来的位置。 + +`flat()`默认只会“拉平”一层,如果想要“拉平”多层的嵌套数组,可以将`flat()`方法的参数写成一个整数,表示想要拉平的层数,默认为1。 + +```javascript +[1, 2, [3, [4, 5]]].flat() +// [1, 2, 3, [4, 5]] + +[1, 2, [3, [4, 5]]].flat(2) +// [1, 2, 3, 4, 5] +``` + +上面代码中,`flat()`的参数为2,表示要“拉平”两层的嵌套数组。 + +如果不管有多少层嵌套,都要转成一维数组,可以用`Infinity`关键字作为参数。 + +```javascript +[1, [2, [3]]].flat(Infinity) +// [1, 2, 3] +``` + +如果原数组有空位,`flat()`方法会跳过空位。 + +```javascript +[1, 2, , 4, 5].flat() +// [1, 2, 4, 5] +``` + +`flatMap()`方法对原数组的每个成员执行一个函数(相当于执行`Array.prototype.map()`),然后对返回值组成的数组执行`flat()`方法。该方法返回一个新数组,不改变原数组。 + +```javascript +// 相当于 [[2, 4], [3, 6], [4, 8]].flat() +[2, 3, 4].flatMap((x) => [x, x * 2]) +// [2, 4, 3, 6, 4, 8] +``` + +`flatMap()`只能展开一层数组。 + +```javascript +// 相当于 [[[2]], [[4]], [[6]], [[8]]].flat() +[1, 2, 3, 4].flatMap(x => [[x * 2]]) +// [[2], [4], [6], [8]] +``` + +上面代码中,遍历函数返回的是一个双层的数组,但是默认只能展开一层,因此`flatMap()`返回的还是一个嵌套数组。 + +`flatMap()`方法的参数是一个遍历函数,该函数可以接受三个参数,分别是当前数组成员、当前数组成员的位置(从零开始)、原数组。 + +```javascript +arr.flatMap(function callback(currentValue[, index[, array]]) { + // ... +}[, thisArg]) +``` + +`flatMap()`方法还可以有第二个参数,用来绑定遍历函数里面的`this`。 + +## 数组的空位 + +数组的空位指,数组的某一个位置没有任何值。比如,`Array`构造函数返回的数组都是空位。 + +```javascript +Array(3) // [, , ,] +``` + +上面代码中,`Array(3)`返回一个具有 3 个空位的数组。 + +注意,空位不是`undefined`,一个位置的值等于`undefined`,依然是有值的。空位是没有任何值,`in`运算符可以说明这一点。 + +```javascript +0 in [undefined, undefined, undefined] // true +0 in [, , ,] // false +``` + +上面代码说明,第一个数组的 0 号位置是有值的,第二个数组的 0 号位置没有值。 + +ES5 对空位的处理,已经很不一致了,大多数情况下会忽略空位。 + +- `forEach()`, `filter()`, `reduce()`, `every()` 和`some()`都会跳过空位。 +- `map()`会跳过空位,但会保留这个值 +- `join()`和`toString()`会将空位视为`undefined`,而`undefined`和`null`会被处理成空字符串。 + +```javascript +// forEach方法 +[,'a'].forEach((x,i) => console.log(i)); // 1 + +// filter方法 +['a',,'b'].filter(x => true) // ['a','b'] + +// every方法 +[,'a'].every(x => x==='a') // true + +// reduce方法 +[1,,2].reduce((x,y) => x+y) // 3 + +// some方法 +[,'a'].some(x => x !== 'a') // false + +// map方法 +[,'a'].map(x => 1) // [,1] + +// join方法 +[,'a',undefined,null].join('#') // "#a##" + +// toString方法 +[,'a',undefined,null].toString() // ",a,," +``` + +ES6 则是明确将空位转为`undefined`。 + +`Array.from`方法会将数组的空位,转为`undefined`,也就是说,这个方法不会忽略空位。 + +```javascript +Array.from(['a',,'b']) +// [ "a", undefined, "b" ] +``` + +扩展运算符(`...`)也会将空位转为`undefined`。 + +```javascript +[...['a',,'b']] +// [ "a", undefined, "b" ] +``` + +`copyWithin()`会连空位一起拷贝。 + +```javascript +[,'a','b',,].copyWithin(2,0) // [,"a",,"a"] +``` + +`fill()`会将空位视为正常的数组位置。 + +```javascript +new Array(3).fill('a') // ["a","a","a"] +``` + +`for...of`循环也会遍历空位。 + +```javascript +let arr = [, ,]; +for (let i of arr) { + console.log(1); +} +// 1 +// 1 +``` + +上面代码中,数组`arr`有两个空位,`for...of`并没有忽略它们。如果改成`map`方法遍历,空位是会跳过的。 + +`entries()`、`keys()`、`values()`、`find()`和`findIndex()`会将空位处理成`undefined`。 + +```javascript +// entries() +[...[,'a'].entries()] // [[0,undefined], [1,"a"]] + +// keys() +[...[,'a'].keys()] // [0,1] + +// values() +[...[,'a'].values()] // [undefined,"a"] + +// find() +[,'a'].find(x => true) // undefined + +// findIndex() +[,'a'].findIndex(x => true) // 0 +``` + +由于空位的处理规则非常不统一,所以建议避免出现空位。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/arraybuffer.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/arraybuffer.md" new file mode 100755 index 000000000..cf883c3f2 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/arraybuffer.md" @@ -0,0 +1,1332 @@ +# ArrayBuffer + +`ArrayBuffer`对象、`TypedArray`视图和`DataView`视图是 JavaScript 操作二进制数据的一个接口。这些对象早就存在,属于独立的规格(2011 年 2 月发布),ES6 将它们纳入了 ECMAScript 规格,并且增加了新的方法。它们都是以数组的语法处理二进制数据,所以统称为二进制数组。 + +这个接口的原始设计目的,与 WebGL 项目有关。所谓 WebGL,就是指浏览器与显卡之间的通信接口,为了满足 JavaScript 与显卡之间大量的、实时的数据交换,它们之间的数据通信必须是二进制的,而不能是传统的文本格式。文本格式传递一个 32 位整数,两端的 JavaScript 脚本与显卡都要进行格式转化,将非常耗时。这时要是存在一种机制,可以像 C 语言那样,直接操作字节,将 4 个字节的 32 位整数,以二进制形式原封不动地送入显卡,脚本的性能就会大幅提升。 + +二进制数组就是在这种背景下诞生的。它很像 C 语言的数组,允许开发者以数组下标的形式,直接操作内存,大大增强了 JavaScript 处理二进制数据的能力,使得开发者有可能通过 JavaScript 与操作系统的原生接口进行二进制通信。 + +二进制数组由三类对象组成。 + +**(1)`ArrayBuffer`对象**:代表内存之中的一段二进制数据,可以通过“视图”进行操作。“视图”部署了数组接口,这意味着,可以用数组的方法操作内存。 + +**(2)`TypedArray`视图**:共包括 9 种类型的视图,比如`Uint8Array`(无符号 8 位整数)数组视图, `Int16Array`(16 位整数)数组视图, `Float32Array`(32 位浮点数)数组视图等等。 + +**(3)`DataView`视图**:可以自定义复合格式的视图,比如第一个字节是 Uint8(无符号 8 位整数)、第二、三个字节是 Int16(16 位整数)、第四个字节开始是 Float32(32 位浮点数)等等,此外还可以自定义字节序。 + +简单说,`ArrayBuffer`对象代表原始的二进制数据,`TypedArray`视图用来读写简单类型的二进制数据,`DataView`视图用来读写复杂类型的二进制数据。 + +`TypedArray`视图支持的数据类型一共有 9 种(`DataView`视图支持除`Uint8C`以外的其他 8 种)。 + +| 数据类型 | 字节长度 | 含义 | 对应的 C 语言类型 | +| -------- | -------- | -------------------------------- | ----------------- | +| Int8 | 1 | 8 位带符号整数 | signed char | +| Uint8 | 1 | 8 位不带符号整数 | unsigned char | +| Uint8C | 1 | 8 位不带符号整数(自动过滤溢出) | unsigned char | +| Int16 | 2 | 16 位带符号整数 | short | +| Uint16 | 2 | 16 位不带符号整数 | unsigned short | +| Int32 | 4 | 32 位带符号整数 | int | +| Uint32 | 4 | 32 位不带符号的整数 | unsigned int | +| Float32 | 4 | 32 位浮点数 | float | +| Float64 | 8 | 64 位浮点数 | double | + +注意,二进制数组并不是真正的数组,而是类似数组的对象。 + +很多浏览器操作的 API,用到了二进制数组操作二进制数据,下面是其中的几个。 + +- File API +- XMLHttpRequest +- Fetch API +- Canvas +- WebSockets + +## ArrayBuffer 对象 + +### 概述 + +`ArrayBuffer`对象代表储存二进制数据的一段内存,它不能直接读写,只能通过视图(`TypedArray`视图和`DataView`视图)来读写,视图的作用是以指定格式解读二进制数据。 + +`ArrayBuffer`也是一个构造函数,可以分配一段可以存放数据的连续内存区域。 + +```javascript +const buf = new ArrayBuffer(32); +``` + +上面代码生成了一段 32 字节的内存区域,每个字节的值默认都是 0。可以看到,`ArrayBuffer`构造函数的参数是所需要的内存大小(单位字节)。 + +为了读写这段内容,需要为它指定视图。`DataView`视图的创建,需要提供`ArrayBuffer`对象实例作为参数。 + +```javascript +const buf = new ArrayBuffer(32); +const dataView = new DataView(buf); +dataView.getUint8(0) // 0 +``` + +上面代码对一段 32 字节的内存,建立`DataView`视图,然后以不带符号的 8 位整数格式,从头读取 8 位二进制数据,结果得到 0,因为原始内存的`ArrayBuffer`对象,默认所有位都是 0。 + +另一种`TypedArray`视图,与`DataView`视图的一个区别是,它不是一个构造函数,而是一组构造函数,代表不同的数据格式。 + +```javascript +const buffer = new ArrayBuffer(12); + +const x1 = new Int32Array(buffer); +x1[0] = 1; +const x2 = new Uint8Array(buffer); +x2[0] = 2; + +x1[0] // 2 +``` + +上面代码对同一段内存,分别建立两种视图:32 位带符号整数(`Int32Array`构造函数)和 8 位不带符号整数(`Uint8Array`构造函数)。由于两个视图对应的是同一段内存,一个视图修改底层内存,会影响到另一个视图。 + +`TypedArray`视图的构造函数,除了接受`ArrayBuffer`实例作为参数,还可以接受普通数组作为参数,直接分配内存生成底层的`ArrayBuffer`实例,并同时完成对这段内存的赋值。 + +```javascript +const typedArray = new Uint8Array([0,1,2]); +typedArray.length // 3 + +typedArray[0] = 5; +typedArray // [5, 1, 2] +``` + +上面代码使用`TypedArray`视图的`Uint8Array`构造函数,新建一个不带符号的 8 位整数视图。可以看到,`Uint8Array`直接使用普通数组作为参数,对底层内存的赋值同时完成。 + +### ArrayBuffer.prototype.byteLength + +`ArrayBuffer`实例的`byteLength`属性,返回所分配的内存区域的字节长度。 + +```javascript +const buffer = new ArrayBuffer(32); +buffer.byteLength +// 32 +``` + +如果要分配的内存区域很大,有可能分配失败(因为没有那么多的连续空余内存),所以有必要检查是否分配成功。 + +```javascript +if (buffer.byteLength === n) { + // 成功 +} else { + // 失败 +} +``` + +### ArrayBuffer.prototype.slice() + +`ArrayBuffer`实例有一个`slice`方法,允许将内存区域的一部分,拷贝生成一个新的`ArrayBuffer`对象。 + +```javascript +const buffer = new ArrayBuffer(8); +const newBuffer = buffer.slice(0, 3); +``` + +上面代码拷贝`buffer`对象的前 3 个字节(从 0 开始,到第 3 个字节前面结束),生成一个新的`ArrayBuffer`对象。`slice`方法其实包含两步,第一步是先分配一段新内存,第二步是将原来那个`ArrayBuffer`对象拷贝过去。 + +`slice`方法接受两个参数,第一个参数表示拷贝开始的字节序号(含该字节),第二个参数表示拷贝截止的字节序号(不含该字节)。如果省略第二个参数,则默认到原`ArrayBuffer`对象的结尾。 + +除了`slice`方法,`ArrayBuffer`对象不提供任何直接读写内存的方法,只允许在其上方建立视图,然后通过视图读写。 + +### ArrayBuffer.isView() + +`ArrayBuffer`有一个静态方法`isView`,返回一个布尔值,表示参数是否为`ArrayBuffer`的视图实例。这个方法大致相当于判断参数,是否为`TypedArray`实例或`DataView`实例。 + +```javascript +const buffer = new ArrayBuffer(8); +ArrayBuffer.isView(buffer) // false + +const v = new Int32Array(buffer); +ArrayBuffer.isView(v) // true +``` + +## TypedArray 视图 + +### 概述 + +`ArrayBuffer`对象作为内存区域,可以存放多种类型的数据。同一段内存,不同数据有不同的解读方式,这就叫做“视图”(view)。`ArrayBuffer`有两种视图,一种是`TypedArray`视图,另一种是`DataView`视图。前者的数组成员都是同一个数据类型,后者的数组成员可以是不同的数据类型。 + +目前,`TypedArray`视图一共包括 9 种类型,每一种视图都是一种构造函数。 + +- **`Int8Array`**:8 位有符号整数,长度 1 个字节。 +- **`Uint8Array`**:8 位无符号整数,长度 1 个字节。 +- **`Uint8ClampedArray`**:8 位无符号整数,长度 1 个字节,溢出处理不同。 +- **`Int16Array`**:16 位有符号整数,长度 2 个字节。 +- **`Uint16Array`**:16 位无符号整数,长度 2 个字节。 +- **`Int32Array`**:32 位有符号整数,长度 4 个字节。 +- **`Uint32Array`**:32 位无符号整数,长度 4 个字节。 +- **`Float32Array`**:32 位浮点数,长度 4 个字节。 +- **`Float64Array`**:64 位浮点数,长度 8 个字节。 + +这 9 个构造函数生成的数组,统称为`TypedArray`视图。它们很像普通数组,都有`length`属性,都能用方括号运算符(`[]`)获取单个元素,所有数组的方法,在它们上面都能使用。普通数组与 TypedArray 数组的差异主要在以下方面。 + +- TypedArray 数组的所有成员,都是同一种类型。 +- TypedArray 数组的成员是连续的,不会有空位。 +- TypedArray 数组成员的默认值为 0。比如,`new Array(10)`返回一个普通数组,里面没有任何成员,只是 10 个空位;`new Uint8Array(10)`返回一个 TypedArray 数组,里面 10 个成员都是 0。 +- TypedArray 数组只是一层视图,本身不储存数据,它的数据都储存在底层的`ArrayBuffer`对象之中,要获取底层对象必须使用`buffer`属性。 + +### 构造函数 + +TypedArray 数组提供 9 种构造函数,用来生成相应类型的数组实例。 + +构造函数有多种用法。 + +**(1)TypedArray(buffer, byteOffset=0, length?)** + +同一个`ArrayBuffer`对象之上,可以根据不同的数据类型,建立多个视图。 + +```javascript +// 创建一个8字节的ArrayBuffer +const b = new ArrayBuffer(8); + +// 创建一个指向b的Int32视图,开始于字节0,直到缓冲区的末尾 +const v1 = new Int32Array(b); + +// 创建一个指向b的Uint8视图,开始于字节2,直到缓冲区的末尾 +const v2 = new Uint8Array(b, 2); + +// 创建一个指向b的Int16视图,开始于字节2,长度为2 +const v3 = new Int16Array(b, 2, 2); +``` + +上面代码在一段长度为 8 个字节的内存(`b`)之上,生成了三个视图:`v1`、`v2`和`v3`。 + +视图的构造函数可以接受三个参数: + +- 第一个参数(必需):视图对应的底层`ArrayBuffer`对象。 +- 第二个参数(可选):视图开始的字节序号,默认从 0 开始。 +- 第三个参数(可选):视图包含的数据个数,默认直到本段内存区域结束。 + +因此,`v1`、`v2`和`v3`是重叠的:`v1[0]`是一个 32 位整数,指向字节 0 ~字节 3;`v2[0]`是一个 8 位无符号整数,指向字节 2;`v3[0]`是一个 16 位整数,指向字节 2 ~字节 3。只要任何一个视图对内存有所修改,就会在另外两个视图上反应出来。 + +注意,`byteOffset`必须与所要建立的数据类型一致,否则会报错。 + +```javascript +const buffer = new ArrayBuffer(8); +const i16 = new Int16Array(buffer, 1); +// Uncaught RangeError: start offset of Int16Array should be a multiple of 2 +``` + +上面代码中,新生成一个 8 个字节的`ArrayBuffer`对象,然后在这个对象的第一个字节,建立带符号的 16 位整数视图,结果报错。因为,带符号的 16 位整数需要两个字节,所以`byteOffset`参数必须能够被 2 整除。 + +如果想从任意字节开始解读`ArrayBuffer`对象,必须使用`DataView`视图,因为`TypedArray`视图只提供 9 种固定的解读格式。 + +**(2)TypedArray(length)** + +视图还可以不通过`ArrayBuffer`对象,直接分配内存而生成。 + +```javascript +const f64a = new Float64Array(8); +f64a[0] = 10; +f64a[1] = 20; +f64a[2] = f64a[0] + f64a[1]; +``` + +上面代码生成一个 8 个成员的`Float64Array`数组(共 64 字节),然后依次对每个成员赋值。这时,视图构造函数的参数就是成员的个数。可以看到,视图数组的赋值操作与普通数组的操作毫无两样。 + +**(3)TypedArray(typedArray)** + +TypedArray 数组的构造函数,可以接受另一个`TypedArray`实例作为参数。 + +```javascript +const typedArray = new Int8Array(new Uint8Array(4)); +``` + +上面代码中,`Int8Array`构造函数接受一个`Uint8Array`实例作为参数。 + +注意,此时生成的新数组,只是复制了参数数组的值,对应的底层内存是不一样的。新数组会开辟一段新的内存储存数据,不会在原数组的内存之上建立视图。 + +```javascript +const x = new Int8Array([1, 1]); +const y = new Int8Array(x); +x[0] // 1 +y[0] // 1 + +x[0] = 2; +y[0] // 1 +``` + +上面代码中,数组`y`是以数组`x`为模板而生成的,当`x`变动的时候,`y`并没有变动。 + +如果想基于同一段内存,构造不同的视图,可以采用下面的写法。 + +```javascript +const x = new Int8Array([1, 1]); +const y = new Int8Array(x.buffer); +x[0] // 1 +y[0] // 1 + +x[0] = 2; +y[0] // 2 +``` + +**(4)TypedArray(arrayLikeObject)** + +构造函数的参数也可以是一个普通数组,然后直接生成`TypedArray`实例。 + +```javascript +const typedArray = new Uint8Array([1, 2, 3, 4]); +``` + +注意,这时`TypedArray`视图会重新开辟内存,不会在原数组的内存上建立视图。 + +上面代码从一个普通的数组,生成一个 8 位无符号整数的`TypedArray`实例。 + +TypedArray 数组也可以转换回普通数组。 + +```javascript +const normalArray = [...typedArray]; +// or +const normalArray = Array.from(typedArray); +// or +const normalArray = Array.prototype.slice.call(typedArray); +``` + +### 数组方法 + +普通数组的操作方法和属性,对 TypedArray 数组完全适用。 + +- `TypedArray.prototype.copyWithin(target, start[, end = this.length])` +- `TypedArray.prototype.entries()` +- `TypedArray.prototype.every(callbackfn, thisArg?)` +- `TypedArray.prototype.fill(value, start=0, end=this.length)` +- `TypedArray.prototype.filter(callbackfn, thisArg?)` +- `TypedArray.prototype.find(predicate, thisArg?)` +- `TypedArray.prototype.findIndex(predicate, thisArg?)` +- `TypedArray.prototype.forEach(callbackfn, thisArg?)` +- `TypedArray.prototype.indexOf(searchElement, fromIndex=0)` +- `TypedArray.prototype.join(separator)` +- `TypedArray.prototype.keys()` +- `TypedArray.prototype.lastIndexOf(searchElement, fromIndex?)` +- `TypedArray.prototype.map(callbackfn, thisArg?)` +- `TypedArray.prototype.reduce(callbackfn, initialValue?)` +- `TypedArray.prototype.reduceRight(callbackfn, initialValue?)` +- `TypedArray.prototype.reverse()` +- `TypedArray.prototype.slice(start=0, end=this.length)` +- `TypedArray.prototype.some(callbackfn, thisArg?)` +- `TypedArray.prototype.sort(comparefn)` +- `TypedArray.prototype.toLocaleString(reserved1?, reserved2?)` +- `TypedArray.prototype.toString()` +- `TypedArray.prototype.values()` + +上面所有方法的用法,请参阅数组方法的介绍,这里不再重复了。 + +注意,TypedArray 数组没有`concat`方法。如果想要合并多个 TypedArray 数组,可以用下面这个函数。 + +```javascript +function concatenate(resultConstructor, ...arrays) { + let totalLength = 0; + for (let arr of arrays) { + totalLength += arr.length; + } + let result = new resultConstructor(totalLength); + let offset = 0; + for (let arr of arrays) { + result.set(arr, offset); + offset += arr.length; + } + return result; +} + +concatenate(Uint8Array, Uint8Array.of(1, 2), Uint8Array.of(3, 4)) +// Uint8Array [1, 2, 3, 4] +``` + +另外,TypedArray 数组与普通数组一样,部署了 Iterator 接口,所以可以被遍历。 + +```javascript +let ui8 = Uint8Array.of(0, 1, 2); +for (let byte of ui8) { + console.log(byte); +} +// 0 +// 1 +// 2 +``` + +### 字节序 + +字节序指的是数值在内存中的表示方式。 + +```javascript +const buffer = new ArrayBuffer(16); +const int32View = new Int32Array(buffer); + +for (let i = 0; i < int32View.length; i++) { + int32View[i] = i * 2; +} +``` + +上面代码生成一个 16 字节的`ArrayBuffer`对象,然后在它的基础上,建立了一个 32 位整数的视图。由于每个 32 位整数占据 4 个字节,所以一共可以写入 4 个整数,依次为 0,2,4,6。 + +如果在这段数据上接着建立一个 16 位整数的视图,则可以读出完全不一样的结果。 + +```javascript +const int16View = new Int16Array(buffer); + +for (let i = 0; i < int16View.length; i++) { + console.log("Entry " + i + ": " + int16View[i]); +} +// Entry 0: 0 +// Entry 1: 0 +// Entry 2: 2 +// Entry 3: 0 +// Entry 4: 4 +// Entry 5: 0 +// Entry 6: 6 +// Entry 7: 0 +``` + +由于每个 16 位整数占据 2 个字节,所以整个`ArrayBuffer`对象现在分成 8 段。然后,由于 x86 体系的计算机都采用小端字节序(little endian),相对重要的字节排在后面的内存地址,相对不重要字节排在前面的内存地址,所以就得到了上面的结果。 + +比如,一个占据四个字节的 16 进制数`0x12345678`,决定其大小的最重要的字节是“12”,最不重要的是“78”。小端字节序将最不重要的字节排在前面,储存顺序就是`78563412`;大端字节序则完全相反,将最重要的字节排在前面,储存顺序就是`12345678`。目前,所有个人电脑几乎都是小端字节序,所以 TypedArray 数组内部也采用小端字节序读写数据,或者更准确的说,按照本机操作系统设定的字节序读写数据。 + +这并不意味大端字节序不重要,事实上,很多网络设备和特定的操作系统采用的是大端字节序。这就带来一个严重的问题:如果一段数据是大端字节序,TypedArray 数组将无法正确解析,因为它只能处理小端字节序!为了解决这个问题,JavaScript 引入`DataView`对象,可以设定字节序,下文会详细介绍。 + +下面是另一个例子。 + +```javascript +// 假定某段buffer包含如下字节 [0x02, 0x01, 0x03, 0x07] +const buffer = new ArrayBuffer(4); +const v1 = new Uint8Array(buffer); +v1[0] = 2; +v1[1] = 1; +v1[2] = 3; +v1[3] = 7; + +const uInt16View = new Uint16Array(buffer); + +// 计算机采用小端字节序 +// 所以头两个字节等于258 +if (uInt16View[0] === 258) { + console.log('OK'); // "OK" +} + +// 赋值运算 +uInt16View[0] = 255; // 字节变为[0xFF, 0x00, 0x03, 0x07] +uInt16View[0] = 0xff05; // 字节变为[0x05, 0xFF, 0x03, 0x07] +uInt16View[1] = 0x0210; // 字节变为[0x05, 0xFF, 0x10, 0x02] +``` + +下面的函数可以用来判断,当前视图是小端字节序,还是大端字节序。 + +```javascript +const BIG_ENDIAN = Symbol('BIG_ENDIAN'); +const LITTLE_ENDIAN = Symbol('LITTLE_ENDIAN'); + +function getPlatformEndianness() { + let arr32 = Uint32Array.of(0x12345678); + let arr8 = new Uint8Array(arr32.buffer); + switch ((arr8[0]*0x1000000) + (arr8[1]*0x10000) + (arr8[2]*0x100) + (arr8[3])) { + case 0x12345678: + return BIG_ENDIAN; + case 0x78563412: + return LITTLE_ENDIAN; + default: + throw new Error('Unknown endianness'); + } +} +``` + +总之,与普通数组相比,TypedArray 数组的最大优点就是可以直接操作内存,不需要数据类型转换,所以速度快得多。 + +### BYTES_PER_ELEMENT 属性 + +每一种视图的构造函数,都有一个`BYTES_PER_ELEMENT`属性,表示这种数据类型占据的字节数。 + +```javascript +Int8Array.BYTES_PER_ELEMENT // 1 +Uint8Array.BYTES_PER_ELEMENT // 1 +Uint8ClampedArray.BYTES_PER_ELEMENT // 1 +Int16Array.BYTES_PER_ELEMENT // 2 +Uint16Array.BYTES_PER_ELEMENT // 2 +Int32Array.BYTES_PER_ELEMENT // 4 +Uint32Array.BYTES_PER_ELEMENT // 4 +Float32Array.BYTES_PER_ELEMENT // 4 +Float64Array.BYTES_PER_ELEMENT // 8 +``` + +这个属性在`TypedArray`实例上也能获取,即有`TypedArray.prototype.BYTES_PER_ELEMENT`。 + +### ArrayBuffer 与字符串的互相转换 + +`ArrayBuffer`转为字符串,或者字符串转为`ArrayBuffer`,有一个前提,即字符串的编码方法是确定的。假定字符串采用 UTF-16 编码(JavaScript 的内部编码方式),可以自己编写转换函数。 + +```javascript +// ArrayBuffer 转为字符串,参数为 ArrayBuffer 对象 +function ab2str(buf) { + // 注意,如果是大型二进制数组,为了避免溢出, + // 必须一个一个字符地转 + if (buf && buf.byteLength < 1024) { + return String.fromCharCode.apply(null, new Uint16Array(buf)); + } + + const bufView = new Uint16Array(buf); + const len = bufView.length; + const bstr = new Array(len); + for (let i = 0; i < len; i++) { + bstr[i] = String.fromCharCode.call(null, bufView[i]); + } + return bstr.join(''); +} + +// 字符串转为 ArrayBuffer 对象,参数为字符串 +function str2ab(str) { + const buf = new ArrayBuffer(str.length * 2); // 每个字符占用2个字节 + const bufView = new Uint16Array(buf); + for (let i = 0, strLen = str.length; i < strLen; i++) { + bufView[i] = str.charCodeAt(i); + } + return buf; +} +``` + +### 溢出 + +不同的视图类型,所能容纳的数值范围是确定的。超出这个范围,就会出现溢出。比如,8 位视图只能容纳一个 8 位的二进制值,如果放入一个 9 位的值,就会溢出。 + +TypedArray 数组的溢出处理规则,简单来说,就是抛弃溢出的位,然后按照视图类型进行解释。 + +```javascript +const uint8 = new Uint8Array(1); + +uint8[0] = 256; +uint8[0] // 0 + +uint8[0] = -1; +uint8[0] // 255 +``` + +上面代码中,`uint8`是一个 8 位视图,而 256 的二进制形式是一个 9 位的值`100000000`,这时就会发生溢出。根据规则,只会保留后 8 位,即`00000000`。`uint8`视图的解释规则是无符号的 8 位整数,所以`00000000`就是`0`。 + +负数在计算机内部采用“2 的补码”表示,也就是说,将对应的正数值进行否运算,然后加`1`。比如,`-1`对应的正值是`1`,进行否运算以后,得到`11111110`,再加上`1`就是补码形式`11111111`。`uint8`按照无符号的 8 位整数解释`11111111`,返回结果就是`255`。 + +一个简单转换规则,可以这样表示。 + +- 正向溢出(overflow):当输入值大于当前数据类型的最大值,结果等于当前数据类型的最小值加上余值,再减去 1。 +- 负向溢出(underflow):当输入值小于当前数据类型的最小值,结果等于当前数据类型的最大值减去余值的绝对值,再加上 1。 + +上面的“余值”就是模运算的结果,即 JavaScript 里面的`%`运算符的结果。 + +```javascript +12 % 4 // 0 +12 % 5 // 2 +``` + +上面代码中,12 除以 4 是没有余值的,而除以 5 会得到余值 2。 + +请看下面的例子。 + +```javascript +const int8 = new Int8Array(1); + +int8[0] = 128; +int8[0] // -128 + +int8[0] = -129; +int8[0] // 127 +``` + +上面例子中,`int8`是一个带符号的 8 位整数视图,它的最大值是 127,最小值是-128。输入值为`128`时,相当于正向溢出`1`,根据“最小值加上余值(128 除以 127 的余值是 1),再减去 1”的规则,就会返回`-128`;输入值为`-129`时,相当于负向溢出`1`,根据“最大值减去余值的绝对值(-129 除以-128 的余值的绝对值是 1),再加上 1”的规则,就会返回`127`。 + +`Uint8ClampedArray`视图的溢出规则,与上面的规则不同。它规定,凡是发生正向溢出,该值一律等于当前数据类型的最大值,即 255;如果发生负向溢出,该值一律等于当前数据类型的最小值,即 0。 + +```javascript +const uint8c = new Uint8ClampedArray(1); + +uint8c[0] = 256; +uint8c[0] // 255 + +uint8c[0] = -1; +uint8c[0] // 0 +``` + +上面例子中,`uint8C`是一个`Uint8ClampedArray`视图,正向溢出时都返回 255,负向溢出都返回 0。 + +### TypedArray.prototype.buffer + +`TypedArray`实例的`buffer`属性,返回整段内存区域对应的`ArrayBuffer`对象。该属性为只读属性。 + +```javascript +const a = new Float32Array(64); +const b = new Uint8Array(a.buffer); +``` + +上面代码的`a`视图对象和`b`视图对象,对应同一个`ArrayBuffer`对象,即同一段内存。 + +### TypedArray.prototype.byteLength,TypedArray.prototype.byteOffset + +`byteLength`属性返回 TypedArray 数组占据的内存长度,单位为字节。`byteOffset`属性返回 TypedArray 数组从底层`ArrayBuffer`对象的哪个字节开始。这两个属性都是只读属性。 + +```javascript +const b = new ArrayBuffer(8); + +const v1 = new Int32Array(b); +const v2 = new Uint8Array(b, 2); +const v3 = new Int16Array(b, 2, 2); + +v1.byteLength // 8 +v2.byteLength // 6 +v3.byteLength // 4 + +v1.byteOffset // 0 +v2.byteOffset // 2 +v3.byteOffset // 2 +``` + +### TypedArray.prototype.length + +`length`属性表示 TypedArray 数组含有多少个成员。注意将`byteLength`属性和`length`属性区分,前者是字节长度,后者是成员长度。 + +```javascript +const a = new Int16Array(8); + +a.length // 8 +a.byteLength // 16 +``` + +### TypedArray.prototype.set() + +TypedArray 数组的`set`方法用于复制数组(普通数组或 TypedArray 数组),也就是将一段内容完全复制到另一段内存。 + +```javascript +const a = new Uint8Array(8); +const b = new Uint8Array(8); + +b.set(a); +``` + +上面代码复制`a`数组的内容到`b`数组,它是整段内存的复制,比一个个拷贝成员的那种复制快得多。 + +`set`方法还可以接受第二个参数,表示从`b`对象的哪一个成员开始复制`a`对象。 + +```javascript +const a = new Uint16Array(8); +const b = new Uint16Array(10); + +b.set(a, 2) +``` + +上面代码的`b`数组比`a`数组多两个成员,所以从`b[2]`开始复制。 + +### TypedArray.prototype.subarray() + +`subarray`方法是对于 TypedArray 数组的一部分,再建立一个新的视图。 + +```javascript +const a = new Uint16Array(8); +const b = a.subarray(2,3); + +a.byteLength // 16 +b.byteLength // 2 +``` + +`subarray`方法的第一个参数是起始的成员序号,第二个参数是结束的成员序号(不含该成员),如果省略则包含剩余的全部成员。所以,上面代码的`a.subarray(2,3)`,意味着 b 只包含`a[2]`一个成员,字节长度为 2。 + +### TypedArray.prototype.slice() + +TypeArray 实例的`slice`方法,可以返回一个指定位置的新的`TypedArray`实例。 + +```javascript +let ui8 = Uint8Array.of(0, 1, 2); +ui8.slice(-1) +// Uint8Array [ 2 ] +``` + +上面代码中,`ui8`是 8 位无符号整数数组视图的一个实例。它的`slice`方法可以从当前视图之中,返回一个新的视图实例。 + +`slice`方法的参数,表示原数组的具体位置,开始生成新数组。负值表示逆向的位置,即-1 为倒数第一个位置,-2 表示倒数第二个位置,以此类推。 + +### TypedArray.of() + +TypedArray 数组的所有构造函数,都有一个静态方法`of`,用于将参数转为一个`TypedArray`实例。 + +```javascript +Float32Array.of(0.151, -8, 3.7) +// Float32Array [ 0.151, -8, 3.7 ] +``` + +下面三种方法都会生成同样一个 TypedArray 数组。 + +```javascript +// 方法一 +let tarr = new Uint8Array([1,2,3]); + +// 方法二 +let tarr = Uint8Array.of(1,2,3); + +// 方法三 +let tarr = new Uint8Array(3); +tarr[0] = 1; +tarr[1] = 2; +tarr[2] = 3; +``` + +### TypedArray.from() + +静态方法`from`接受一个可遍历的数据结构(比如数组)作为参数,返回一个基于这个结构的`TypedArray`实例。 + +```javascript +Uint16Array.from([0, 1, 2]) +// Uint16Array [ 0, 1, 2 ] +``` + +这个方法还可以将一种`TypedArray`实例,转为另一种。 + +```javascript +const ui16 = Uint16Array.from(Uint8Array.of(0, 1, 2)); +ui16 instanceof Uint16Array // true +``` + +`from`方法还可以接受一个函数,作为第二个参数,用来对每个元素进行遍历,功能类似`map`方法。 + +```javascript +Int8Array.of(127, 126, 125).map(x => 2 * x) +// Int8Array [ -2, -4, -6 ] + +Int16Array.from(Int8Array.of(127, 126, 125), x => 2 * x) +// Int16Array [ 254, 252, 250 ] +``` + +上面的例子中,`from`方法没有发生溢出,这说明遍历不是针对原来的 8 位整数数组。也就是说,`from`会将第一个参数指定的 TypedArray 数组,拷贝到另一段内存之中,处理之后再将结果转成指定的数组格式。 + +## 复合视图 + +由于视图的构造函数可以指定起始位置和长度,所以在同一段内存之中,可以依次存放不同类型的数据,这叫做“复合视图”。 + +```javascript +const buffer = new ArrayBuffer(24); + +const idView = new Uint32Array(buffer, 0, 1); +const usernameView = new Uint8Array(buffer, 4, 16); +const amountDueView = new Float32Array(buffer, 20, 1); +``` + +上面代码将一个 24 字节长度的`ArrayBuffer`对象,分成三个部分: + +- 字节 0 到字节 3:1 个 32 位无符号整数 +- 字节 4 到字节 19:16 个 8 位整数 +- 字节 20 到字节 23:1 个 32 位浮点数 + +这种数据结构可以用如下的 C 语言描述: + +```c +struct someStruct { + unsigned long id; + char username[16]; + float amountDue; +}; +``` + +## DataView 视图 + +如果一段数据包括多种类型(比如服务器传来的 HTTP 数据),这时除了建立`ArrayBuffer`对象的复合视图以外,还可以通过`DataView`视图进行操作。 + +`DataView`视图提供更多操作选项,而且支持设定字节序。本来,在设计目的上,`ArrayBuffer`对象的各种`TypedArray`视图,是用来向网卡、声卡之类的本机设备传送数据,所以使用本机的字节序就可以了;而`DataView`视图的设计目的,是用来处理网络设备传来的数据,所以大端字节序或小端字节序是可以自行设定的。 + +`DataView`视图本身也是构造函数,接受一个`ArrayBuffer`对象作为参数,生成视图。 + +```javascript +DataView(ArrayBuffer buffer [, 字节起始位置 [, 长度]]); +``` + +下面是一个例子。 + +```javascript +const buffer = new ArrayBuffer(24); +const dv = new DataView(buffer); +``` + +`DataView`实例有以下属性,含义与`TypedArray`实例的同名方法相同。 + +- `DataView.prototype.buffer`:返回对应的 ArrayBuffer 对象 +- `DataView.prototype.byteLength`:返回占据的内存字节长度 +- `DataView.prototype.byteOffset`:返回当前视图从对应的 ArrayBuffer 对象的哪个字节开始 + +`DataView`实例提供 8 个方法读取内存。 + +- **`getInt8`**:读取 1 个字节,返回一个 8 位整数。 +- **`getUint8`**:读取 1 个字节,返回一个无符号的 8 位整数。 +- **`getInt16`**:读取 2 个字节,返回一个 16 位整数。 +- **`getUint16`**:读取 2 个字节,返回一个无符号的 16 位整数。 +- **`getInt32`**:读取 4 个字节,返回一个 32 位整数。 +- **`getUint32`**:读取 4 个字节,返回一个无符号的 32 位整数。 +- **`getFloat32`**:读取 4 个字节,返回一个 32 位浮点数。 +- **`getFloat64`**:读取 8 个字节,返回一个 64 位浮点数。 + +这一系列`get`方法的参数都是一个字节序号(不能是负数,否则会报错),表示从哪个字节开始读取。 + +```javascript +const buffer = new ArrayBuffer(24); +const dv = new DataView(buffer); + +// 从第1个字节读取一个8位无符号整数 +const v1 = dv.getUint8(0); + +// 从第2个字节读取一个16位无符号整数 +const v2 = dv.getUint16(1); + +// 从第4个字节读取一个16位无符号整数 +const v3 = dv.getUint16(3); +``` + +上面代码读取了`ArrayBuffer`对象的前 5 个字节,其中有一个 8 位整数和两个十六位整数。 + +如果一次读取两个或两个以上字节,就必须明确数据的存储方式,到底是小端字节序还是大端字节序。默认情况下,`DataView`的`get`方法使用大端字节序解读数据,如果需要使用小端字节序解读,必须在`get`方法的第二个参数指定`true`。 + +```javascript +// 小端字节序 +const v1 = dv.getUint16(1, true); + +// 大端字节序 +const v2 = dv.getUint16(3, false); + +// 大端字节序 +const v3 = dv.getUint16(3); +``` + +DataView 视图提供 8 个方法写入内存。 + +- **`setInt8`**:写入 1 个字节的 8 位整数。 +- **`setUint8`**:写入 1 个字节的 8 位无符号整数。 +- **`setInt16`**:写入 2 个字节的 16 位整数。 +- **`setUint16`**:写入 2 个字节的 16 位无符号整数。 +- **`setInt32`**:写入 4 个字节的 32 位整数。 +- **`setUint32`**:写入 4 个字节的 32 位无符号整数。 +- **`setFloat32`**:写入 4 个字节的 32 位浮点数。 +- **`setFloat64`**:写入 8 个字节的 64 位浮点数。 + +这一系列`set`方法,接受两个参数,第一个参数是字节序号,表示从哪个字节开始写入,第二个参数为写入的数据。对于那些写入两个或两个以上字节的方法,需要指定第三个参数,`false`或者`undefined`表示使用大端字节序写入,`true`表示使用小端字节序写入。 + +```javascript +// 在第1个字节,以大端字节序写入值为25的32位整数 +dv.setInt32(0, 25, false); + +// 在第5个字节,以大端字节序写入值为25的32位整数 +dv.setInt32(4, 25); + +// 在第9个字节,以小端字节序写入值为2.5的32位浮点数 +dv.setFloat32(8, 2.5, true); +``` + +如果不确定正在使用的计算机的字节序,可以采用下面的判断方式。 + +```javascript +const littleEndian = (function() { + const buffer = new ArrayBuffer(2); + new DataView(buffer).setInt16(0, 256, true); + return new Int16Array(buffer)[0] === 256; +})(); +``` + +如果返回`true`,就是小端字节序;如果返回`false`,就是大端字节序。 + +## 二进制数组的应用 + +大量的 Web API 用到了`ArrayBuffer`对象和它的视图对象。 + +### AJAX + +传统上,服务器通过 AJAX 操作只能返回文本数据,即`responseType`属性默认为`text`。`XMLHttpRequest`第二版`XHR2`允许服务器返回二进制数据,这时分成两种情况。如果明确知道返回的二进制数据类型,可以把返回类型(`responseType`)设为`arraybuffer`;如果不知道,就设为`blob`。 + +```javascript +let xhr = new XMLHttpRequest(); +xhr.open('GET', someUrl); +xhr.responseType = 'arraybuffer'; + +xhr.onload = function () { + let arrayBuffer = xhr.response; + // ··· +}; + +xhr.send(); +``` + +如果知道传回来的是 32 位整数,可以像下面这样处理。 + +```javascript +xhr.onreadystatechange = function () { + if (req.readyState === 4 ) { + const arrayResponse = xhr.response; + const dataView = new DataView(arrayResponse); + const ints = new Uint32Array(dataView.byteLength / 4); + + xhrDiv.style.backgroundColor = "#00FF00"; + xhrDiv.innerText = "Array is " + ints.length + "uints long"; + } +} +``` + +### Canvas + +网页`Canvas`元素输出的二进制像素数据,就是 TypedArray 数组。 + +```javascript +const canvas = document.getElementById('myCanvas'); +const ctx = canvas.getContext('2d'); + +const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); +const uint8ClampedArray = imageData.data; +``` + +需要注意的是,上面代码的`uint8ClampedArray`虽然是一个 TypedArray 数组,但是它的视图类型是一种针对`Canvas`元素的专有类型`Uint8ClampedArray`。这个视图类型的特点,就是专门针对颜色,把每个字节解读为无符号的 8 位整数,即只能取值 0 ~ 255,而且发生运算的时候自动过滤高位溢出。这为图像处理带来了巨大的方便。 + +举例来说,如果把像素的颜色值设为`Uint8Array`类型,那么乘以一个 gamma 值的时候,就必须这样计算: + +```javascript +u8[i] = Math.min(255, Math.max(0, u8[i] * gamma)); +``` + +因为`Uint8Array`类型对于大于 255 的运算结果(比如`0xFF+1`),会自动变为`0x00`,所以图像处理必须要像上面这样算。这样做很麻烦,而且影响性能。如果将颜色值设为`Uint8ClampedArray`类型,计算就简化许多。 + +```javascript +pixels[i] *= gamma; +``` + +`Uint8ClampedArray`类型确保将小于 0 的值设为 0,将大于 255 的值设为 255。注意,IE 10 不支持该类型。 + +### WebSocket + +`WebSocket`可以通过`ArrayBuffer`,发送或接收二进制数据。 + +```javascript +let socket = new WebSocket('ws://127.0.0.1:8081'); +socket.binaryType = 'arraybuffer'; + +// Wait until socket is open +socket.addEventListener('open', function (event) { + // Send binary data + const typedArray = new Uint8Array(4); + socket.send(typedArray.buffer); +}); + +// Receive binary data +socket.addEventListener('message', function (event) { + const arrayBuffer = event.data; + // ··· +}); +``` + +### Fetch API + +Fetch API 取回的数据,就是`ArrayBuffer`对象。 + +```javascript +fetch(url) +.then(function(response){ + return response.arrayBuffer() +}) +.then(function(arrayBuffer){ + // ... +}); +``` + +### File API + +如果知道一个文件的二进制数据类型,也可以将这个文件读取为`ArrayBuffer`对象。 + +```javascript +const fileInput = document.getElementById('fileInput'); +const file = fileInput.files[0]; +const reader = new FileReader(); +reader.readAsArrayBuffer(file); +reader.onload = function () { + const arrayBuffer = reader.result; + // ··· +}; +``` + +下面以处理 bmp 文件为例。假定`file`变量是一个指向 bmp 文件的文件对象,首先读取文件。 + +```javascript +const reader = new FileReader(); +reader.addEventListener("load", processimage, false); +reader.readAsArrayBuffer(file); +``` + +然后,定义处理图像的回调函数:先在二进制数据之上建立一个`DataView`视图,再建立一个`bitmap`对象,用于存放处理后的数据,最后将图像展示在`Canvas`元素之中。 + +```javascript +function processimage(e) { + const buffer = e.target.result; + const datav = new DataView(buffer); + const bitmap = {}; + // 具体的处理步骤 +} +``` + +具体处理图像数据时,先处理 bmp 的文件头。具体每个文件头的格式和定义,请参阅有关资料。 + +```javascript +bitmap.fileheader = {}; +bitmap.fileheader.bfType = datav.getUint16(0, true); +bitmap.fileheader.bfSize = datav.getUint32(2, true); +bitmap.fileheader.bfReserved1 = datav.getUint16(6, true); +bitmap.fileheader.bfReserved2 = datav.getUint16(8, true); +bitmap.fileheader.bfOffBits = datav.getUint32(10, true); +``` + +接着处理图像元信息部分。 + +```javascript +bitmap.infoheader = {}; +bitmap.infoheader.biSize = datav.getUint32(14, true); +bitmap.infoheader.biWidth = datav.getUint32(18, true); +bitmap.infoheader.biHeight = datav.getUint32(22, true); +bitmap.infoheader.biPlanes = datav.getUint16(26, true); +bitmap.infoheader.biBitCount = datav.getUint16(28, true); +bitmap.infoheader.biCompression = datav.getUint32(30, true); +bitmap.infoheader.biSizeImage = datav.getUint32(34, true); +bitmap.infoheader.biXPelsPerMeter = datav.getUint32(38, true); +bitmap.infoheader.biYPelsPerMeter = datav.getUint32(42, true); +bitmap.infoheader.biClrUsed = datav.getUint32(46, true); +bitmap.infoheader.biClrImportant = datav.getUint32(50, true); +``` + +最后处理图像本身的像素信息。 + +```javascript +const start = bitmap.fileheader.bfOffBits; +bitmap.pixels = new Uint8Array(buffer, start); +``` + +至此,图像文件的数据全部处理完成。下一步,可以根据需要,进行图像变形,或者转换格式,或者展示在`Canvas`网页元素之中。 + +## SharedArrayBuffer + +JavaScript 是单线程的,Web worker 引入了多线程:主线程用来与用户互动,Worker 线程用来承担计算任务。每个线程的数据都是隔离的,通过`postMessage()`通信。下面是一个例子。 + +```javascript +// 主线程 +const w = new Worker('myworker.js'); +``` + +上面代码中,主线程新建了一个 Worker 线程。该线程与主线程之间会有一个通信渠道,主线程通过`w.postMessage`向 Worker 线程发消息,同时通过`message`事件监听 Worker 线程的回应。 + +```javascript +// 主线程 +w.postMessage('hi'); +w.onmessage = function (ev) { + console.log(ev.data); +} +``` + +上面代码中,主线程先发一个消息`hi`,然后在监听到 Worker 线程的回应后,就将其打印出来。 + +Worker 线程也是通过监听`message`事件,来获取主线程发来的消息,并作出反应。 + +```javascript +// Worker 线程 +onmessage = function (ev) { + console.log(ev.data); + postMessage('ho'); +} +``` + +线程之间的数据交换可以是各种格式,不仅仅是字符串,也可以是二进制数据。这种交换采用的是复制机制,即一个进程将需要分享的数据复制一份,通过`postMessage`方法交给另一个进程。如果数据量比较大,这种通信的效率显然比较低。很容易想到,这时可以留出一块内存区域,由主线程与 Worker 线程共享,两方都可以读写,那么就会大大提高效率,协作起来也会比较简单(不像`postMessage`那么麻烦)。 + +ES2017 引入[`SharedArrayBuffer`](https://github.com/tc39/ecmascript_sharedmem/blob/master/TUTORIAL.md),允许 Worker 线程与主线程共享同一块内存。`SharedArrayBuffer`的 API 与`ArrayBuffer`一模一样,唯一的区别是后者无法共享数据。 + +```javascript +// 主线程 + +// 新建 1KB 共享内存 +const sharedBuffer = new SharedArrayBuffer(1024); + +// 主线程将共享内存的地址发送出去 +w.postMessage(sharedBuffer); + +// 在共享内存上建立视图,供写入数据 +const sharedArray = new Int32Array(sharedBuffer); +``` + +上面代码中,`postMessage`方法的参数是`SharedArrayBuffer`对象。 + +Worker 线程从事件的`data`属性上面取到数据。 + +```javascript +// Worker 线程 +onmessage = function (ev) { + // 主线程共享的数据,就是 1KB 的共享内存 + const sharedBuffer = ev.data; + + // 在共享内存上建立视图,方便读写 + const sharedArray = new Int32Array(sharedBuffer); + + // ... +}; +``` + +共享内存也可以在 Worker 线程创建,发给主线程。 + +`SharedArrayBuffer`与`ArrayBuffer`一样,本身是无法读写的,必须在上面建立视图,然后通过视图读写。 + +```javascript +// 分配 10 万个 32 位整数占据的内存空间 +const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 100000); + +// 建立 32 位整数视图 +const ia = new Int32Array(sab); // ia.length == 100000 + +// 新建一个质数生成器 +const primes = new PrimeGenerator(); + +// 将 10 万个质数,写入这段内存空间 +for ( let i=0 ; i < ia.length ; i++ ) + ia[i] = primes.next(); + +// 向 Worker 线程发送这段共享内存 +w.postMessage(ia); +``` + +Worker 线程收到数据后的处理如下。 + +```javascript +// Worker 线程 +let ia; +onmessage = function (ev) { + ia = ev.data; + console.log(ia.length); // 100000 + console.log(ia[37]); // 输出 163,因为这是第38个质数 +}; +``` + +## Atomics 对象 + +多线程共享内存,最大的问题就是如何防止两个线程同时修改某个地址,或者说,当一个线程修改共享内存以后,必须有一个机制让其他线程同步。SharedArrayBuffer API 提供`Atomics`对象,保证所有共享内存的操作都是“原子性”的,并且可以在所有线程内同步。 + +什么叫“原子性操作”呢?现代编程语言中,一条普通的命令被编译器处理以后,会变成多条机器指令。如果是单线程运行,这是没有问题的;多线程环境并且共享内存时,就会出问题,因为这一组机器指令的运行期间,可能会插入其他线程的指令,从而导致运行结果出错。请看下面的例子。 + +```javascript +// 主线程 +ia[42] = 314159; // 原先的值 191 +ia[37] = 123456; // 原先的值 163 + +// Worker 线程 +console.log(ia[37]); +console.log(ia[42]); +// 可能的结果 +// 123456 +// 191 +``` + +上面代码中,主线程的原始顺序是先对 42 号位置赋值,再对 37 号位置赋值。但是,编译器和 CPU 为了优化,可能会改变这两个操作的执行顺序(因为它们之间互不依赖),先对 37 号位置赋值,再对 42 号位置赋值。而执行到一半的时候,Worker 线程可能就会来读取数据,导致打印出`123456`和`191`。 + +下面是另一个例子。 + +```javascript +// 主线程 +const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 100000); +const ia = new Int32Array(sab); + +for (let i = 0; i < ia.length; i++) { + ia[i] = primes.next(); // 将质数放入 ia +} + +// worker 线程 +ia[112]++; // 错误 +Atomics.add(ia, 112, 1); // 正确 +``` + +上面代码中,Worker 线程直接改写共享内存`ia[112]++`是不正确的。因为这行语句会被编译成多条机器指令,这些指令之间无法保证不会插入其他进程的指令。请设想如果两个线程同时`ia[112]++`,很可能它们得到的结果都是不正确的。 + +`Atomics`对象就是为了解决这个问题而提出,它可以保证一个操作所对应的多条机器指令,一定是作为一个整体运行的,中间不会被打断。也就是说,它所涉及的操作都可以看作是原子性的单操作,这可以避免线程竞争,提高多线程共享内存时的操作安全。所以,`ia[112]++`要改写成`Atomics.add(ia, 112, 1)`。 + +`Atomics`对象提供多种方法。 + +**(1)Atomics.store(),Atomics.load()** + +`store()`方法用来向共享内存写入数据,`load()`方法用来从共享内存读出数据。比起直接的读写操作,它们的好处是保证了读写操作的原子性。 + +此外,它们还用来解决一个问题:多个线程使用共享内存的某个位置作为开关(flag),一旦该位置的值变了,就执行特定操作。这时,必须保证该位置的赋值操作,一定是在它前面的所有可能会改写内存的操作结束后执行;而该位置的取值操作,一定是在它后面所有可能会读取该位置的操作开始之前执行。`store`方法和`load`方法就能做到这一点,编译器不会为了优化,而打乱机器指令的执行顺序。 + +```javascript +Atomics.load(array, index) +Atomics.store(array, index, value) +``` + +`store`方法接受三个参数:SharedBuffer 的视图、位置索引和值,返回`sharedArray[index]`的值。`load`方法只接受两个参数:SharedBuffer 的视图和位置索引,也是返回`sharedArray[index]`的值。 + +```javascript +// 主线程 main.js +ia[42] = 314159; // 原先的值 191 +Atomics.store(ia, 37, 123456); // 原先的值是 163 + +// Worker 线程 worker.js +while (Atomics.load(ia, 37) == 163); +console.log(ia[37]); // 123456 +console.log(ia[42]); // 314159 +``` + +上面代码中,主线程的`Atomics.store`向 42 号位置的赋值,一定是早于 37 位置的赋值。只要 37 号位置等于 163,Worker 线程就不会终止循环,而对 37 号位置和 42 号位置的取值,一定是在`Atomics.load`操作之后。 + +下面是另一个例子。 + +```javascript +// 主线程 +const worker = new Worker('worker.js'); +const length = 10; +const size = Int32Array.BYTES_PER_ELEMENT * length; +// 新建一段共享内存 +const sharedBuffer = new SharedArrayBuffer(size); +const sharedArray = new Int32Array(sharedBuffer); +for (let i = 0; i < 10; i++) { + // 向共享内存写入 10 个整数 + Atomics.store(sharedArray, i, 0); +} +worker.postMessage(sharedBuffer); +``` + +上面代码中,主线程用`Atomics.store()`方法写入数据。下面是 Worker 线程用`Atomics.load()`方法读取数据。 + +```javascript +// worker.js +self.addEventListener('message', (event) => { + const sharedArray = new Int32Array(event.data); + for (let i = 0; i < 10; i++) { + const arrayValue = Atomics.load(sharedArray, i); + console.log(`The item at array index ${i} is ${arrayValue}`); + } +}, false); +``` + +**(2)Atomics.exchange()** + +Worker 线程如果要写入数据,可以使用上面的`Atomics.store()`方法,也可以使用`Atomics.exchange()`方法。它们的区别是,`Atomics.store()`返回写入的值,而`Atomics.exchange()`返回被替换的值。 + +```javascript +// Worker 线程 +self.addEventListener('message', (event) => { + const sharedArray = new Int32Array(event.data); + for (let i = 0; i < 10; i++) { + if (i % 2 === 0) { + const storedValue = Atomics.store(sharedArray, i, 1); + console.log(`The item at array index ${i} is now ${storedValue}`); + } else { + const exchangedValue = Atomics.exchange(sharedArray, i, 2); + console.log(`The item at array index ${i} was ${exchangedValue}, now 2`); + } + } +}, false); +``` + +上面代码将共享内存的偶数位置的值改成`1`,奇数位置的值改成`2`。 + +**(3)Atomics.wait(),Atomics.wake()** + +使用`while`循环等待主线程的通知,不是很高效,如果用在主线程,就会造成卡顿,`Atomics`对象提供了`wait()`和`wake()`两个方法用于等待通知。这两个方法相当于锁内存,即在一个线程进行操作时,让其他线程休眠(建立锁),等到操作结束,再唤醒那些休眠的线程(解除锁)。 + +```javascript +// Worker 线程 +self.addEventListener('message', (event) => { + const sharedArray = new Int32Array(event.data); + const arrayIndex = 0; + const expectedStoredValue = 50; + Atomics.wait(sharedArray, arrayIndex, expectedStoredValue); + console.log(Atomics.load(sharedArray, arrayIndex)); +}, false); +``` + +上面代码中,`Atomics.wait()`方法等同于告诉 Worker 线程,只要满足给定条件(`sharedArray`的`0`号位置等于`50`),就在这一行 Worker 线程进入休眠。 + +主线程一旦更改了指定位置的值,就可以唤醒 Worker 线程。 + +```javascript +// 主线程 +const newArrayValue = 100; +Atomics.store(sharedArray, 0, newArrayValue); +const arrayIndex = 0; +const queuePos = 1; +Atomics.wake(sharedArray, arrayIndex, queuePos); +``` + +上面代码中,`sharedArray`的`0`号位置改为`100`,然后就执行`Atomics.wake()`方法,唤醒在`sharedArray`的`0`号位置休眠队列里的一个线程。 + +`Atomics.wait()`方法的使用格式如下。 + +```javascript +Atomics.wait(sharedArray, index, value, timeout) +``` + +它的四个参数含义如下。 + +- sharedArray:共享内存的视图数组。 +- index:视图数据的位置(从0开始)。 +- value:该位置的预期值。一旦实际值等于预期值,就进入休眠。 +- timeout:整数,表示过了这个时间以后,就自动唤醒,单位毫秒。该参数可选,默认值是`Infinity`,即无限期的休眠,只有通过`Atomics.wake()`方法才能唤醒。 + +`Atomics.wait()`的返回值是一个字符串,共有三种可能的值。如果`sharedArray[index]`不等于`value`,就返回字符串`not-equal`,否则就进入休眠。如果`Atomics.wake()`方法唤醒,就返回字符串`ok`;如果因为超时唤醒,就返回字符串`timed-out`。 + +`Atomics.wake()`方法的使用格式如下。 + +```javascript +Atomics.wake(sharedArray, index, count) +``` + +它的三个参数含义如下。 + +- sharedArray:共享内存的视图数组。 +- index:视图数据的位置(从0开始)。 +- count:需要唤醒的 Worker 线程的数量,默认为`Infinity`。 + +`Atomics.wake()`方法一旦唤醒休眠的 Worker 线程,就会让它继续往下运行。 + +请看一个例子。 + +```javascript +// 主线程 +console.log(ia[37]); // 163 +Atomics.store(ia, 37, 123456); +Atomics.wake(ia, 37, 1); + +// Worker 线程 +Atomics.wait(ia, 37, 163); +console.log(ia[37]); // 123456 +``` + +上面代码中,视图数组`ia`的第 37 号位置,原来的值是`163`。Worker 线程使用`Atomics.wait()`方法,指定只要`ia[37]`等于`163`,就进入休眠状态。主线程使用`Atomics.store()`方法,将`123456`写入`ia[37]`,然后使用`Atomics.wake()`方法唤醒 Worker 线程。 + +另外,基于`wait`和`wake`这两个方法的锁内存实现,可以看 Lars T Hansen 的 [js-lock-and-condition](https://github.com/lars-t-hansen/js-lock-and-condition) 这个库。 + +注意,浏览器的主线程不宜设置休眠,这会导致用户失去响应。而且,主线程实际上会拒绝进入休眠。 + +**(4)运算方法** + +共享内存上面的某些运算是不能被打断的,即不能在运算过程中,让其他线程改写内存上面的值。Atomics 对象提供了一些运算方法,防止数据被改写。 + +```javascript +Atomics.add(sharedArray, index, value) +``` + +`Atomics.add`用于将`value`加到`sharedArray[index]`,返回`sharedArray[index]`旧的值。 + +```javascript +Atomics.sub(sharedArray, index, value) +``` + +`Atomics.sub`用于将`value`从`sharedArray[index]`减去,返回`sharedArray[index]`旧的值。 + +```javascript +Atomics.and(sharedArray, index, value) +``` + +`Atomics.and`用于将`value`与`sharedArray[index]`进行位运算`and`,放入`sharedArray[index]`,并返回旧的值。 + +```javascript +Atomics.or(sharedArray, index, value) +``` + +`Atomics.or`用于将`value`与`sharedArray[index]`进行位运算`or`,放入`sharedArray[index]`,并返回旧的值。 + +```javascript +Atomics.xor(sharedArray, index, value) +``` + +`Atomic.xor`用于将`vaule`与`sharedArray[index]`进行位运算`xor`,放入`sharedArray[index]`,并返回旧的值。 + +**(5)其他方法** + +`Atomics`对象还有以下方法。 + +- `Atomics.compareExchange(sharedArray, index, oldval, newval)`:如果`sharedArray[index]`等于`oldval`,就写入`newval`,返回`oldval`。 +- `Atomics.isLockFree(size)`:返回一个布尔值,表示`Atomics`对象是否可以处理某个`size`的内存锁定。如果返回`false`,应用程序就需要自己来实现锁定。 + +`Atomics.compareExchange`的一个用途是,从 SharedArrayBuffer 读取一个值,然后对该值进行某个操作,操作结束以后,检查一下 SharedArrayBuffer 里面原来那个值是否发生变化(即被其他线程改写过)。如果没有改写过,就将它写回原来的位置,否则读取新的值,再重头进行一次操作。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/async.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/async.md" new file mode 100755 index 000000000..8e707a3b5 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/async.md" @@ -0,0 +1,1111 @@ +# async 函数 + +## 含义 + +ES2017 标准引入了 async 函数,使得异步操作变得更加方便。 + +async 函数是什么?一句话,它就是 Generator 函数的语法糖。 + +前文有一个 Generator 函数,依次读取两个文件。 + +```javascript +const fs = require('fs'); + +const readFile = function (fileName) { + return new Promise(function (resolve, reject) { + fs.readFile(fileName, function(error, data) { + if (error) return reject(error); + resolve(data); + }); + }); +}; + +const gen = function* () { + const f1 = yield readFile('/etc/fstab'); + const f2 = yield readFile('/etc/shells'); + console.log(f1.toString()); + console.log(f2.toString()); +}; +``` + +上面代码的函数`gen`可以写成`async`函数,就是下面这样。 + +```javascript +const asyncReadFile = async function () { + const f1 = await readFile('/etc/fstab'); + const f2 = await readFile('/etc/shells'); + console.log(f1.toString()); + console.log(f2.toString()); +}; +``` + +一比较就会发现,`async`函数就是将 Generator 函数的星号(`*`)替换成`async`,将`yield`替换成`await`,仅此而已。 + +`async`函数对 Generator 函数的改进,体现在以下四点。 + +(1)内置执行器。 + +Generator 函数的执行必须靠执行器,所以才有了`co`模块,而`async`函数自带执行器。也就是说,`async`函数的执行,与普通函数一模一样,只要一行。 + +```javascript +asyncReadFile(); +``` + +上面的代码调用了`asyncReadFile`函数,然后它就会自动执行,输出最后结果。这完全不像 Generator 函数,需要调用`next`方法,或者用`co`模块,才能真正执行,得到最后结果。 + +(2)更好的语义。 + +`async`和`await`,比起星号和`yield`,语义更清楚了。`async`表示函数里有异步操作,`await`表示紧跟在后面的表达式需要等待结果。 + +(3)更广的适用性。 + +`co`模块约定,`yield`命令后面只能是 Thunk 函数或 Promise 对象,而`async`函数的`await`命令后面,可以是 Promise 对象和原始类型的值(数值、字符串和布尔值,但这时会自动转成立即 resolved 的 Promise 对象)。 + +(4)返回值是 Promise。 + +`async`函数的返回值是 Promise 对象,这比 Generator 函数的返回值是 Iterator 对象方便多了。你可以用`then`方法指定下一步的操作。 + +进一步说,`async`函数完全可以看作多个异步操作,包装成的一个 Promise 对象,而`await`命令就是内部`then`命令的语法糖。 + +## 基本用法 + +`async`函数返回一个 Promise 对象,可以使用`then`方法添加回调函数。当函数执行的时候,一旦遇到`await`就会先返回,等到异步操作完成,再接着执行函数体内后面的语句。 + +下面是一个例子。 + +```javascript +async function getStockPriceByName(name) { + const symbol = await getStockSymbol(name); + const stockPrice = await getStockPrice(symbol); + return stockPrice; +} + +getStockPriceByName('goog').then(function (result) { + console.log(result); +}); +``` + +上面代码是一个获取股票报价的函数,函数前面的`async`关键字,表明该函数内部有异步操作。调用该函数时,会立即返回一个`Promise`对象。 + +下面是另一个例子,指定多少毫秒后输出一个值。 + +```javascript +function timeout(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); +} + +async function asyncPrint(value, ms) { + await timeout(ms); + console.log(value); +} + +asyncPrint('hello world', 50); +``` + +上面代码指定 50 毫秒以后,输出`hello world`。 + +由于`async`函数返回的是 Promise 对象,可以作为`await`命令的参数。所以,上面的例子也可以写成下面的形式。 + +```javascript +async function timeout(ms) { + await new Promise((resolve) => { + setTimeout(resolve, ms); + }); +} + +async function asyncPrint(value, ms) { + await timeout(ms); + console.log(value); +} + +asyncPrint('hello world', 50); +``` + +async 函数有多种使用形式。 + +```javascript +// 函数声明 +async function foo() {} + +// 函数表达式 +const foo = async function () {}; + +// 对象的方法 +let obj = { async foo() {} }; +obj.foo().then(...) + +// Class 的方法 +class Storage { + constructor() { + this.cachePromise = caches.open('avatars'); + } + + async getAvatar(name) { + const cache = await this.cachePromise; + return cache.match(`/avatars/${name}.jpg`); + } +} + +const storage = new Storage(); +storage.getAvatar('jake').then(…); + +// 箭头函数 +const foo = async () => {}; +``` + +## 语法 + +`async`函数的语法规则总体上比较简单,难点是错误处理机制。 + +### 返回 Promise 对象 + +`async`函数返回一个 Promise 对象。 + +`async`函数内部`return`语句返回的值,会成为`then`方法回调函数的参数。 + +```javascript +async function f() { + return 'hello world'; +} + +f().then(v => console.log(v)) +// "hello world" +``` + +上面代码中,函数`f`内部`return`命令返回的值,会被`then`方法回调函数接收到。 + +`async`函数内部抛出错误,会导致返回的 Promise 对象变为`reject`状态。抛出的错误对象会被`catch`方法回调函数接收到。 + +```javascript +async function f() { + throw new Error('出错了'); +} + +f().then( + v => console.log(v), + e => console.log(e) +) +// Error: 出错了 +``` + +### Promise 对象的状态变化 + +`async`函数返回的 Promise 对象,必须等到内部所有`await`命令后面的 Promise 对象执行完,才会发生状态改变,除非遇到`return`语句或者抛出错误。也就是说,只有`async`函数内部的异步操作执行完,才会执行`then`方法指定的回调函数。 + +下面是一个例子。 + +```javascript +async function getTitle(url) { + let response = await fetch(url); + let html = await response.text(); + return html.match(/([\s\S]+)<\/title>/i)[1]; +} +getTitle('https://tc39.github.io/ecma262/').then(console.log) +// "ECMAScript 2017 Language Specification" +``` + +上面代码中,函数`getTitle`内部有三个操作:抓取网页、取出文本、匹配页面标题。只有这三个操作全部完成,才会执行`then`方法里面的`console.log`。 + +### await 命令 + +正常情况下,`await`命令后面是一个 Promise 对象,返回该对象的结果。如果不是 Promise 对象,就直接返回对应的值。 + +```javascript +async function f() { + // 等同于 + // return 123; + return await 123; +} + +f().then(v => console.log(v)) +// 123 +``` + +上面代码中,`await`命令的参数是数值`123`,这时等同于`return 123`。 + +另一种情况是,`await`命令后面是一个`thenable`对象(即定义`then`方法的对象),那么`await`会将其等同于 Promise 对象。 + +```javascript +class Sleep { + constructor(timeout) { + this.timeout = timeout; + } + then(resolve, reject) { + const startTime = Date.now(); + setTimeout( + () => resolve(Date.now() - startTime), + this.timeout + ); + } +} + +(async () => { + const actualTime = await new Sleep(1000); + console.log(actualTime); +})(); +``` + +上面代码中,`await`命令后面是一个`Sleep`对象的实例。这个实例不是 Promise 对象,但是因为定义了`then`方法,`await`会将其视为`Promise`处理。 + +`await`命令后面的 Promise 对象如果变为`reject`状态,则`reject`的参数会被`catch`方法的回调函数接收到。 + +```javascript +async function f() { + await Promise.reject('出错了'); +} + +f() +.then(v => console.log(v)) +.catch(e => console.log(e)) +// 出错了 +``` + +注意,上面代码中,`await`语句前面没有`return`,但是`reject`方法的参数依然传入了`catch`方法的回调函数。这里如果在`await`前面加上`return`,效果是一样的。 + +任何一个`await`语句后面的 Promise 对象变为`reject`状态,那么整个`async`函数都会中断执行。 + +```javascript +async function f() { + await Promise.reject('出错了'); + await Promise.resolve('hello world'); // 不会执行 +} +``` + +上面代码中,第二个`await`语句是不会执行的,因为第一个`await`语句状态变成了`reject`。 + +有时,我们希望即使前一个异步操作失败,也不要中断后面的异步操作。这时可以将第一个`await`放在`try...catch`结构里面,这样不管这个异步操作是否成功,第二个`await`都会执行。 + +```javascript +async function f() { + try { + await Promise.reject('出错了'); + } catch(e) { + } + return await Promise.resolve('hello world'); +} + +f() +.then(v => console.log(v)) +// hello world +``` + +另一种方法是`await`后面的 Promise 对象再跟一个`catch`方法,处理前面可能出现的错误。 + +```javascript +async function f() { + await Promise.reject('出错了') + .catch(e => console.log(e)); + return await Promise.resolve('hello world'); +} + +f() +.then(v => console.log(v)) +// 出错了 +// hello world +``` + +### 错误处理 + +如果`await`后面的异步操作出错,那么等同于`async`函数返回的 Promise 对象被`reject`。 + +```javascript +async function f() { + await new Promise(function (resolve, reject) { + throw new Error('出错了'); + }); +} + +f() +.then(v => console.log(v)) +.catch(e => console.log(e)) +// Error:出错了 +``` + +上面代码中,`async`函数`f`执行后,`await`后面的 Promise 对象会抛出一个错误对象,导致`catch`方法的回调函数被调用,它的参数就是抛出的错误对象。具体的执行机制,可以参考后文的“async 函数的实现原理”。 + +防止出错的方法,也是将其放在`try...catch`代码块之中。 + +```javascript +async function f() { + try { + await new Promise(function (resolve, reject) { + throw new Error('出错了'); + }); + } catch(e) { + } + return await('hello world'); +} +``` + +如果有多个`await`命令,可以统一放在`try...catch`结构中。 + +```javascript +async function main() { + try { + const val1 = await firstStep(); + const val2 = await secondStep(val1); + const val3 = await thirdStep(val1, val2); + + console.log('Final: ', val3); + } + catch (err) { + console.error(err); + } +} +``` + +下面的例子使用`try...catch`结构,实现多次重复尝试。 + +```javascript +const superagent = require('superagent'); +const NUM_RETRIES = 3; + +async function test() { + let i; + for (i = 0; i < NUM_RETRIES; ++i) { + try { + await superagent.get('http://google.com/this-throws-an-error'); + break; + } catch(err) {} + } + console.log(i); // 3 +} + +test(); +``` + +上面代码中,如果`await`操作成功,就会使用`break`语句退出循环;如果失败,会被`catch`语句捕捉,然后进入下一轮循环。 + +### 使用注意点 + +第一点,前面已经说过,`await`命令后面的`Promise`对象,运行结果可能是`rejected`,所以最好把`await`命令放在`try...catch`代码块中。 + +```javascript +async function myFunction() { + try { + await somethingThatReturnsAPromise(); + } catch (err) { + console.log(err); + } +} + +// 另一种写法 + +async function myFunction() { + await somethingThatReturnsAPromise() + .catch(function (err) { + console.log(err); + }); +} +``` + +第二点,多个`await`命令后面的异步操作,如果不存在继发关系,最好让它们同时触发。 + +```javascript +let foo = await getFoo(); +let bar = await getBar(); +``` + +上面代码中,`getFoo`和`getBar`是两个独立的异步操作(即互不依赖),被写成继发关系。这样比较耗时,因为只有`getFoo`完成以后,才会执行`getBar`,完全可以让它们同时触发。 + +```javascript +// 写法一 +let [foo, bar] = await Promise.all([getFoo(), getBar()]); + +// 写法二 +let fooPromise = getFoo(); +let barPromise = getBar(); +let foo = await fooPromise; +let bar = await barPromise; +``` + +上面两种写法,`getFoo`和`getBar`都是同时触发,这样就会缩短程序的执行时间。 + +第三点,`await`命令只能用在`async`函数之中,如果用在普通函数,就会报错。 + +```javascript +async function dbFuc(db) { + let docs = [{}, {}, {}]; + + // 报错 + docs.forEach(function (doc) { + await db.post(doc); + }); +} +``` + +上面代码会报错,因为`await`用在普通函数之中了。但是,如果将`forEach`方法的参数改成`async`函数,也有问题。 + +```javascript +function dbFuc(db) { //这里不需要 async +  let docs = [{}, {}, {}]; + + // 可能得到错误结果 + docs.forEach(async function (doc) { + await db.post(doc); + }); +} +``` + +上面代码可能不会正常工作,原因是这时三个`db.post`操作将是并发执行,也就是同时执行,而不是继发执行。正确的写法是采用`for`循环。 + +```javascript +async function dbFuc(db) { + let docs = [{}, {}, {}]; + + for (let doc of docs) { + await db.post(doc); + } +} +``` + +如果确实希望多个请求并发执行,可以使用`Promise.all`方法。当三个请求都会`resolved`时,下面两种写法效果相同。 + +```javascript +async function dbFuc(db) { + let docs = [{}, {}, {}]; + let promises = docs.map((doc) => db.post(doc)); + + let results = await Promise.all(promises); + console.log(results); +} + +// 或者使用下面的写法 + +async function dbFuc(db) { + let docs = [{}, {}, {}]; + let promises = docs.map((doc) => db.post(doc)); + + let results = []; + for (let promise of promises) { + results.push(await promise); + } + console.log(results); +} +``` + +目前,[`esm`](https://www.npmjs.com/package/esm)模块加载器支持顶层`await`,即`await`命令可以不放在 async 函数里面,直接使用。 + +```javascript +// async 函数的写法 +const start = async () => { + const res = await fetch('google.com'); + return res.text(); +}; + +start().then(console.log); + +// 顶层 await 的写法 +const res = await fetch('google.com'); +console.log(await res.text()); +``` + +上面代码中,第二种写法的脚本必须使用`esm`加载器,才会生效。 + +第四点,async 函数可以保留运行堆栈。 + +```javascript +const a = () => { + b().then(() => c()); +}; +``` + +上面代码中,函数`a`内部运行了一个异步任务`b()`。当`b()`运行的时候,函数`a()`不会中断,而是继续执行。等到`b()`运行结束,可能`a()`早就运行结束了,`b()`所在的上下文环境已经消失了。如果`b()`或`c()`报错,错误堆栈将不包括`a()`。 + +现在将这个例子改成`async`函数。 + +```javascript +const a = async () => { + await b(); + c(); +}; +``` + +上面代码中,`b()`运行的时候,`a()`是暂停执行,上下文环境都保存着。一旦`b()`或`c()`报错,错误堆栈将包括`a()`。 + +## async 函数的实现原理 + +async 函数的实现原理,就是将 Generator 函数和自动执行器,包装在一个函数里。 + +```javascript +async function fn(args) { + // ... +} + +// 等同于 + +function fn(args) { + return spawn(function* () { + // ... + }); +} +``` + +所有的`async`函数都可以写成上面的第二种形式,其中的`spawn`函数就是自动执行器。 + +下面给出`spawn`函数的实现,基本就是前文自动执行器的翻版。 + +```javascript +function spawn(genF) { + return new Promise(function(resolve, reject) { + const gen = genF(); + function step(nextF) { + let next; + try { + next = nextF(); + } catch(e) { + return reject(e); + } + if(next.done) { + return resolve(next.value); + } + Promise.resolve(next.value).then(function(v) { + step(function() { return gen.next(v); }); + }, function(e) { + step(function() { return gen.throw(e); }); + }); + } + step(function() { return gen.next(undefined); }); + }); +} +``` + +## 与其他异步处理方法的比较 + +我们通过一个例子,来看 async 函数与 Promise、Generator 函数的比较。 + +假定某个 DOM 元素上面,部署了一系列的动画,前一个动画结束,才能开始后一个。如果当中有一个动画出错,就不再往下执行,返回上一个成功执行的动画的返回值。 + +首先是 Promise 的写法。 + +```javascript +function chainAnimationsPromise(elem, animations) { + + // 变量ret用来保存上一个动画的返回值 + let ret = null; + + // 新建一个空的Promise + let p = Promise.resolve(); + + // 使用then方法,添加所有动画 + for(let anim of animations) { + p = p.then(function(val) { + ret = val; + return anim(elem); + }); + } + + // 返回一个部署了错误捕捉机制的Promise + return p.catch(function(e) { + /* 忽略错误,继续执行 */ + }).then(function() { + return ret; + }); + +} +``` + +虽然 Promise 的写法比回调函数的写法大大改进,但是一眼看上去,代码完全都是 Promise 的 API(`then`、`catch`等等),操作本身的语义反而不容易看出来。 + +接着是 Generator 函数的写法。 + +```javascript +function chainAnimationsGenerator(elem, animations) { + + return spawn(function*() { + let ret = null; + try { + for(let anim of animations) { + ret = yield anim(elem); + } + } catch(e) { + /* 忽略错误,继续执行 */ + } + return ret; + }); + +} +``` + +上面代码使用 Generator 函数遍历了每个动画,语义比 Promise 写法更清晰,用户定义的操作全部都出现在`spawn`函数的内部。这个写法的问题在于,必须有一个任务运行器,自动执行 Generator 函数,上面代码的`spawn`函数就是自动执行器,它返回一个 Promise 对象,而且必须保证`yield`语句后面的表达式,必须返回一个 Promise。 + +最后是 async 函数的写法。 + +```javascript +async function chainAnimationsAsync(elem, animations) { + let ret = null; + try { + for(let anim of animations) { + ret = await anim(elem); + } + } catch(e) { + /* 忽略错误,继续执行 */ + } + return ret; +} +``` + +可以看到 Async 函数的实现最简洁,最符合语义,几乎没有语义不相关的代码。它将 Generator 写法中的自动执行器,改在语言层面提供,不暴露给用户,因此代码量最少。如果使用 Generator 写法,自动执行器需要用户自己提供。 + +## 实例:按顺序完成异步操作 + +实际开发中,经常遇到一组异步操作,需要按照顺序完成。比如,依次远程读取一组 URL,然后按照读取的顺序输出结果。 + +Promise 的写法如下。 + +```javascript +function logInOrder(urls) { + // 远程读取所有URL + const textPromises = urls.map(url => { + return fetch(url).then(response => response.text()); + }); + + // 按次序输出 + textPromises.reduce((chain, textPromise) => { + return chain.then(() => textPromise) + .then(text => console.log(text)); + }, Promise.resolve()); +} +``` + +上面代码使用`fetch`方法,同时远程读取一组 URL。每个`fetch`操作都返回一个 Promise 对象,放入`textPromises`数组。然后,`reduce`方法依次处理每个 Promise 对象,然后使用`then`,将所有 Promise 对象连起来,因此就可以依次输出结果。 + +这种写法不太直观,可读性比较差。下面是 async 函数实现。 + +```javascript +async function logInOrder(urls) { + for (const url of urls) { + const response = await fetch(url); + console.log(await response.text()); + } +} +``` + +上面代码确实大大简化,问题是所有远程操作都是继发。只有前一个 URL 返回结果,才会去读取下一个 URL,这样做效率很差,非常浪费时间。我们需要的是并发发出远程请求。 + +```javascript +async function logInOrder(urls) { + // 并发读取远程URL + const textPromises = urls.map(async url => { + const response = await fetch(url); + return response.text(); + }); + + // 按次序输出 + for (const textPromise of textPromises) { + console.log(await textPromise); + } +} +``` + +上面代码中,虽然`map`方法的参数是`async`函数,但它是并发执行的,因为只有`async`函数内部是继发执行,外部不受影响。后面的`for..of`循环内部使用了`await`,因此实现了按顺序输出。 + +## 异步遍历器 + +《遍历器》一章说过,Iterator 接口是一种数据遍历的协议,只要调用遍历器对象的`next`方法,就会得到一个对象,表示当前遍历指针所在的那个位置的信息。`next`方法返回的对象的结构是`{value, done}`,其中`value`表示当前的数据的值,`done`是一个布尔值,表示遍历是否结束。 + +这里隐含着一个规定,`next`方法必须是同步的,只要调用就必须立刻返回值。也就是说,一旦执行`next`方法,就必须同步地得到`value`和`done`这两个属性。如果遍历指针正好指向同步操作,当然没有问题,但对于异步操作,就不太合适了。目前的解决方法是,Generator 函数里面的异步操作,返回一个 Thunk 函数或者 Promise 对象,即`value`属性是一个 Thunk 函数或者 Promise 对象,等待以后返回真正的值,而`done`属性则还是同步产生的。 + +ES2018 [引入](https://github.com/tc39/proposal-async-iteration)了“异步遍历器”(Async Iterator),为异步操作提供原生的遍历器接口,即`value`和`done`这两个属性都是异步产生。 + +### 异步遍历的接口 + +异步遍历器的最大的语法特点,就是调用遍历器的`next`方法,返回的是一个 Promise 对象。 + +```javascript +asyncIterator + .next() + .then( + ({ value, done }) => /* ... */ + ); +``` + +上面代码中,`asyncIterator`是一个异步遍历器,调用`next`方法以后,返回一个 Promise 对象。因此,可以使用`then`方法指定,这个 Promise 对象的状态变为`resolve`以后的回调函数。回调函数的参数,则是一个具有`value`和`done`两个属性的对象,这个跟同步遍历器是一样的。 + +我们知道,一个对象的同步遍历器的接口,部署在`Symbol.iterator`属性上面。同样地,对象的异步遍历器接口,部署在`Symbol.asyncIterator`属性上面。不管是什么样的对象,只要它的`Symbol.asyncIterator`属性有值,就表示应该对它进行异步遍历。 + +下面是一个异步遍历器的例子。 + +```javascript +const asyncIterable = createAsyncIterable(['a', 'b']); +const asyncIterator = asyncIterable[Symbol.asyncIterator](); + +asyncIterator +.next() +.then(iterResult1 => { + console.log(iterResult1); // { value: 'a', done: false } + return asyncIterator.next(); +}) +.then(iterResult2 => { + console.log(iterResult2); // { value: 'b', done: false } + return asyncIterator.next(); +}) +.then(iterResult3 => { + console.log(iterResult3); // { value: undefined, done: true } +}); +``` + +上面代码中,异步遍历器其实返回了两次值。第一次调用的时候,返回一个 Promise 对象;等到 Promise 对象`resolve`了,再返回一个表示当前数据成员信息的对象。这就是说,异步遍历器与同步遍历器最终行为是一致的,只是会先返回 Promise 对象,作为中介。 + +由于异步遍历器的`next`方法,返回的是一个 Promise 对象。因此,可以把它放在`await`命令后面。 + +```javascript +async function f() { + const asyncIterable = createAsyncIterable(['a', 'b']); + const asyncIterator = asyncIterable[Symbol.asyncIterator](); + console.log(await asyncIterator.next()); + // { value: 'a', done: false } + console.log(await asyncIterator.next()); + // { value: 'b', done: false } + console.log(await asyncIterator.next()); + // { value: undefined, done: true } +} +``` + +上面代码中,`next`方法用`await`处理以后,就不必使用`then`方法了。整个流程已经很接近同步处理了。 + +注意,异步遍历器的`next`方法是可以连续调用的,不必等到上一步产生的 Promise 对象`resolve`以后再调用。这种情况下,`next`方法会累积起来,自动按照每一步的顺序运行下去。下面是一个例子,把所有的`next`方法放在`Promise.all`方法里面。 + +```javascript +const asyncIterable = createAsyncIterable(['a', 'b']); +const asyncIterator = asyncIterable[Symbol.asyncIterator](); +const [{value: v1}, {value: v2}] = await Promise.all([ + asyncIterator.next(), asyncIterator.next() +]); + +console.log(v1, v2); // a b +``` + +另一种用法是一次性调用所有的`next`方法,然后`await`最后一步操作。 + +```javascript +async function runner() { + const writer = openFile('someFile.txt'); + writer.next('hello'); + writer.next('world'); + await writer.return(); +} + +runner(); +``` + +### for await...of + +前面介绍过,`for...of`循环用于遍历同步的 Iterator 接口。新引入的`for await...of`循环,则是用于遍历异步的 Iterator 接口。 + +```javascript +async function f() { + for await (const x of createAsyncIterable(['a', 'b'])) { + console.log(x); + } +} +// a +// b +``` + +上面代码中,`createAsyncIterable()`返回一个拥有异步遍历器接口的对象,`for...of`循环自动调用这个对象的异步遍历器的`next`方法,会得到一个 Promise 对象。`await`用来处理这个 Promise 对象,一旦`resolve`,就把得到的值(`x`)传入`for...of`的循环体。 + +`for await...of`循环的一个用途,是部署了 asyncIterable 操作的异步接口,可以直接放入这个循环。 + +```javascript +let body = ''; + +async function f() { + for await(const data of req) body += data; + const parsed = JSON.parse(body); + console.log('got', parsed); +} +``` + +上面代码中,`req`是一个 asyncIterable 对象,用来异步读取数据。可以看到,使用`for await...of`循环以后,代码会非常简洁。 + +如果`next`方法返回的 Promise 对象被`reject`,`for await...of`就会报错,要用`try...catch`捕捉。 + +```javascript +async function () { + try { + for await (const x of createRejectingIterable()) { + console.log(x); + } + } catch (e) { + console.error(e); + } +} +``` + +注意,`for await...of`循环也可以用于同步遍历器。 + +```javascript +(async function () { + for await (const x of ['a', 'b']) { + console.log(x); + } +})(); +// a +// b +``` + +Node v10 支持异步遍历器,Stream 就部署了这个接口。下面是读取文件的传统写法与异步遍历器写法的差异。 + +```javascript +// 传统写法 +function main(inputFilePath) { + const readStream = fs.createReadStream( + inputFilePath, + { encoding: 'utf8', highWaterMark: 1024 } + ); + readStream.on('data', (chunk) => { + console.log('>>> '+chunk); + }); + readStream.on('end', () => { + console.log('### DONE ###'); + }); +} + +// 异步遍历器写法 +async function main(inputFilePath) { + const readStream = fs.createReadStream( + inputFilePath, + { encoding: 'utf8', highWaterMark: 1024 } + ); + + for await (const chunk of readStream) { + console.log('>>> '+chunk); + } + console.log('### DONE ###'); +} +``` + +### 异步 Generator 函数 + +就像 Generator 函数返回一个同步遍历器对象一样,异步 Generator 函数的作用,是返回一个异步遍历器对象。 + +在语法上,异步 Generator 函数就是`async`函数与 Generator 函数的结合。 + +```javascript +async function* gen() { + yield 'hello'; +} +const genObj = gen(); +genObj.next().then(x => console.log(x)); +// { value: 'hello', done: false } +``` + +上面代码中,`gen`是一个异步 Generator 函数,执行后返回一个异步 Iterator 对象。对该对象调用`next`方法,返回一个 Promise 对象。 + +异步遍历器的设计目的之一,就是 Generator 函数处理同步操作和异步操作时,能够使用同一套接口。 + +```javascript +// 同步 Generator 函数 +function* map(iterable, func) { + const iter = iterable[Symbol.iterator](); + while (true) { + const {value, done} = iter.next(); + if (done) break; + yield func(value); + } +} + +// 异步 Generator 函数 +async function* map(iterable, func) { + const iter = iterable[Symbol.asyncIterator](); + while (true) { + const {value, done} = await iter.next(); + if (done) break; + yield func(value); + } +} +``` + +上面代码中,`map`是一个 Generator 函数,第一个参数是可遍历对象`iterable`,第二个参数是一个回调函数`func`。`map`的作用是将`iterable`每一步返回的值,使用`func`进行处理。上面有两个版本的`map`,前一个处理同步遍历器,后一个处理异步遍历器,可以看到两个版本的写法基本上是一致的。 + +下面是另一个异步 Generator 函数的例子。 + +```javascript +async function* readLines(path) { + let file = await fileOpen(path); + + try { + while (!file.EOF) { + yield await file.readLine(); + } + } finally { + await file.close(); + } +} +``` + +上面代码中,异步操作前面使用`await`关键字标明,即`await`后面的操作,应该返回 Promise 对象。凡是使用`yield`关键字的地方,就是`next`方法停下来的地方,它后面的表达式的值(即`await file.readLine()`的值),会作为`next()`返回对象的`value`属性,这一点是与同步 Generator 函数一致的。 + +异步 Generator 函数内部,能够同时使用`await`和`yield`命令。可以这样理解,`await`命令用于将外部操作产生的值输入函数内部,`yield`命令用于将函数内部的值输出。 + +上面代码定义的异步 Generator 函数的用法如下。 + +```javascript +(async function () { + for await (const line of readLines(filePath)) { + console.log(line); + } +})() +``` + +异步 Generator 函数可以与`for await...of`循环结合起来使用。 + +```javascript +async function* prefixLines(asyncIterable) { + for await (const line of asyncIterable) { + yield '> ' + line; + } +} +``` + +异步 Generator 函数的返回值是一个异步 Iterator,即每次调用它的`next`方法,会返回一个 Promise 对象,也就是说,跟在`yield`命令后面的,应该是一个 Promise 对象。如果像上面那个例子那样,`yield`命令后面是一个字符串,会被自动包装成一个 Promise 对象。 + +```javascript +function fetchRandom() { + const url = 'https://www.random.org/decimal-fractions/' + + '?num=1&dec=10&col=1&format=plain&rnd=new'; + return fetch(url); +} + +async function* asyncGenerator() { + console.log('Start'); + const result = await fetchRandom(); // (A) + yield 'Result: ' + await result.text(); // (B) + console.log('Done'); +} + +const ag = asyncGenerator(); +ag.next().then(({value, done}) => { + console.log(value); +}) +``` + +上面代码中,`ag`是`asyncGenerator`函数返回的异步遍历器对象。调用`ag.next()`以后,上面代码的执行顺序如下。 + +1. `ag.next()`立刻返回一个 Promise 对象。 +1. `asyncGenerator`函数开始执行,打印出`Start`。 +1. `await`命令返回一个 Promise 对象,`asyncGenerator`函数停在这里。 +1. A 处变成 fulfilled 状态,产生的值放入`result`变量,`asyncGenerator`函数继续往下执行。 +1. 函数在 B 处的`yield`暂停执行,一旦`yield`命令取到值,`ag.next()`返回的那个 Promise 对象变成 fulfilled 状态。 +1. `ag.next()`后面的`then`方法指定的回调函数开始执行。该回调函数的参数是一个对象`{value, done}`,其中`value`的值是`yield`命令后面的那个表达式的值,`done`的值是`false`。 + +A 和 B 两行的作用类似于下面的代码。 + +```javascript +return new Promise((resolve, reject) => { + fetchRandom() + .then(result => result.text()) + .then(result => { + resolve({ + value: 'Result: ' + result, + done: false, + }); + }); +}); +``` + +如果异步 Generator 函数抛出错误,会导致 Promise 对象的状态变为`reject`,然后抛出的错误被`catch`方法捕获。 + +```javascript +async function* asyncGenerator() { + throw new Error('Problem!'); +} + +asyncGenerator() +.next() +.catch(err => console.log(err)); // Error: Problem! +``` + +注意,普通的 async 函数返回的是一个 Promise 对象,而异步 Generator 函数返回的是一个异步 Iterator 对象。可以这样理解,async 函数和异步 Generator 函数,是封装异步操作的两种方法,都用来达到同一种目的。区别在于,前者自带执行器,后者通过`for await...of`执行,或者自己编写执行器。下面就是一个异步 Generator 函数的执行器。 + +```javascript +async function takeAsync(asyncIterable, count = Infinity) { + const result = []; + const iterator = asyncIterable[Symbol.asyncIterator](); + while (result.length < count) { + const {value, done} = await iterator.next(); + if (done) break; + result.push(value); + } + return result; +} +``` + +上面代码中,异步 Generator 函数产生的异步遍历器,会通过`while`循环自动执行,每当`await iterator.next()`完成,就会进入下一轮循环。一旦`done`属性变为`true`,就会跳出循环,异步遍历器执行结束。 + +下面是这个自动执行器的一个使用实例。 + +```javascript +async function f() { + async function* gen() { + yield 'a'; + yield 'b'; + yield 'c'; + } + + return await takeAsync(gen()); +} + +f().then(function (result) { + console.log(result); // ['a', 'b', 'c'] +}) +``` + +异步 Generator 函数出现以后,JavaScript 就有了四种函数形式:普通函数、async 函数、Generator 函数和异步 Generator 函数。请注意区分每种函数的不同之处。基本上,如果是一系列按照顺序执行的异步操作(比如读取文件,然后写入新内容,再存入硬盘),可以使用 async 函数;如果是一系列产生相同数据结构的异步操作(比如一行一行读取文件),可以使用异步 Generator 函数。 + +异步 Generator 函数也可以通过`next`方法的参数,接收外部传入的数据。 + +```javascript +const writer = openFile('someFile.txt'); +writer.next('hello'); // 立即执行 +writer.next('world'); // 立即执行 +await writer.return(); // 等待写入结束 +``` + +上面代码中,`openFile`是一个异步 Generator 函数。`next`方法的参数,向该函数内部的操作传入数据。每次`next`方法都是同步执行的,最后的`await`命令用于等待整个写入操作结束。 + +最后,同步的数据结构,也可以使用异步 Generator 函数。 + +```javascript +async function* createAsyncIterable(syncIterable) { + for (const elem of syncIterable) { + yield elem; + } +} +``` + +上面代码中,由于没有异步操作,所以也就没有使用`await`关键字。 + +### yield\* 语句 + +`yield*`语句也可以跟一个异步遍历器。 + +```javascript +async function* gen1() { + yield 'a'; + yield 'b'; + return 2; +} + +async function* gen2() { + // result 最终会等于 2 + const result = yield* gen1(); +} +``` + +上面代码中,`gen2`函数里面的`result`变量,最后的值是`2`。 + +与同步 Generator 函数一样,`for await...of`循环会展开`yield*`。 + +```javascript +(async function () { + for await (const x of gen2()) { + console.log(x); + } +})(); +// a +// b +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class-extends.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class-extends.md" new file mode 100755 index 000000000..5d112c4a2 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class-extends.md" @@ -0,0 +1,726 @@ +# Class 的继承 + +## 简介 + +Class 可以通过`extends`关键字实现继承,这比 ES5 的通过修改原型链实现继承,要清晰和方便很多。 + +```javascript +class Point { +} + +class ColorPoint extends Point { +} +``` + +上面代码定义了一个`ColorPoint`类,该类通过`extends`关键字,继承了`Point`类的所有属性和方法。但是由于没有部署任何代码,所以这两个类完全一样,等于复制了一个`Point`类。下面,我们在`ColorPoint`内部加上代码。 + +```javascript +class ColorPoint extends Point { + constructor(x, y, color) { + super(x, y); // 调用父类的constructor(x, y) + this.color = color; + } + + toString() { + return this.color + ' ' + super.toString(); // 调用父类的toString() + } +} +``` + +上面代码中,`constructor`方法和`toString`方法之中,都出现了`super`关键字,它在这里表示父类的构造函数,用来新建父类的`this`对象。 + +子类必须在`constructor`方法中调用`super`方法,否则新建实例时会报错。这是因为子类自己的`this`对象,必须先通过父类的构造函数完成塑造,得到与父类同样的实例属性和方法,然后再对其进行加工,加上子类自己的实例属性和方法。如果不调用`super`方法,子类就得不到`this`对象。 + +```javascript +class Point { /* ... */ } + +class ColorPoint extends Point { + constructor() { + } +} + +let cp = new ColorPoint(); // ReferenceError +``` + +上面代码中,`ColorPoint`继承了父类`Point`,但是它的构造函数没有调用`super`方法,导致新建实例时报错。 + +ES5 的继承,实质是先创造子类的实例对象`this`,然后再将父类的方法添加到`this`上面(`Parent.apply(this)`)。ES6 的继承机制完全不同,实质是先将父类实例对象的属性和方法,加到`this`上面(所以必须先调用`super`方法),然后再用子类的构造函数修改`this`。 + +如果子类没有定义`constructor`方法,这个方法会被默认添加,代码如下。也就是说,不管有没有显式定义,任何一个子类都有`constructor`方法。 + +```javascript +class ColorPoint extends Point { +} + +// 等同于 +class ColorPoint extends Point { + constructor(...args) { + super(...args); + } +} +``` + +另一个需要注意的地方是,在子类的构造函数中,只有调用`super`之后,才可以使用`this`关键字,否则会报错。这是因为子类实例的构建,基于父类实例,只有`super`方法才能调用父类实例。 + +```javascript +class Point { + constructor(x, y) { + this.x = x; + this.y = y; + } +} + +class ColorPoint extends Point { + constructor(x, y, color) { + this.color = color; // ReferenceError + super(x, y); + this.color = color; // 正确 + } +} +``` + +上面代码中,子类的`constructor`方法没有调用`super`之前,就使用`this`关键字,结果报错,而放在`super`方法之后就是正确的。 + +下面是生成子类实例的代码。 + +```javascript +let cp = new ColorPoint(25, 8, 'green'); + +cp instanceof ColorPoint // true +cp instanceof Point // true +``` + +上面代码中,实例对象`cp`同时是`ColorPoint`和`Point`两个类的实例,这与 ES5 的行为完全一致。 + +最后,父类的静态方法,也会被子类继承。 + +```javascript +class A { + static hello() { + console.log('hello world'); + } +} + +class B extends A { +} + +B.hello() // hello world +``` + +上面代码中,`hello()`是`A`类的静态方法,`B`继承`A`,也继承了`A`的静态方法。 + +## Object.getPrototypeOf() + +`Object.getPrototypeOf`方法可以用来从子类上获取父类。 + +```javascript +Object.getPrototypeOf(ColorPoint) === Point +// true +``` + +因此,可以使用这个方法判断,一个类是否继承了另一个类。 + +## super 关键字 + +`super`这个关键字,既可以当作函数使用,也可以当作对象使用。在这两种情况下,它的用法完全不同。 + +第一种情况,`super`作为函数调用时,代表父类的构造函数。ES6 要求,子类的构造函数必须执行一次`super`函数。 + +```javascript +class A {} + +class B extends A { + constructor() { + super(); + } +} +``` + +上面代码中,子类`B`的构造函数之中的`super()`,代表调用父类的构造函数。这是必须的,否则 JavaScript 引擎会报错。 + +注意,`super`虽然代表了父类`A`的构造函数,但是返回的是子类`B`的实例,即`super`内部的`this`指的是`B`的实例,因此`super()`在这里相当于`A.prototype.constructor.call(this)`。 + +```javascript +class A { + constructor() { + console.log(new.target.name); + } +} +class B extends A { + constructor() { + super(); + } +} +new A() // A +new B() // B +``` + +上面代码中,`new.target`指向当前正在执行的函数。可以看到,在`super()`执行时,它指向的是子类`B`的构造函数,而不是父类`A`的构造函数。也就是说,`super()`内部的`this`指向的是`B`。 + +作为函数时,`super()`只能用在子类的构造函数之中,用在其他地方就会报错。 + +```javascript +class A {} + +class B extends A { + m() { + super(); // 报错 + } +} +``` + +上面代码中,`super()`用在`B`类的`m`方法之中,就会造成句法错误。 + +第二种情况,`super`作为对象时,在普通方法中,指向父类的原型对象;在静态方法中,指向父类。 + +```javascript +class A { + p() { + return 2; + } +} + +class B extends A { + constructor() { + super(); + console.log(super.p()); // 2 + } +} + +let b = new B(); +``` + +上面代码中,子类`B`当中的`super.p()`,就是将`super`当作一个对象使用。这时,`super`在普通方法之中,指向`A.prototype`,所以`super.p()`就相当于`A.prototype.p()`。 + +这里需要注意,由于`super`指向父类的原型对象,所以定义在父类实例上的方法或属性,是无法通过`super`调用的。 + +```javascript +class A { + constructor() { + this.p = 2; + } +} + +class B extends A { + get m() { + return super.p; + } +} + +let b = new B(); +b.m // undefined +``` + +上面代码中,`p`是父类`A`实例的属性,`super.p`就引用不到它。 + +如果属性定义在父类的原型对象上,`super`就可以取到。 + +```javascript +class A {} +A.prototype.x = 2; + +class B extends A { + constructor() { + super(); + console.log(super.x) // 2 + } +} + +let b = new B(); +``` + +上面代码中,属性`x`是定义在`A.prototype`上面的,所以`super.x`可以取到它的值。 + +ES6 规定,在子类普通方法中通过`super`调用父类的方法时,方法内部的`this`指向当前的子类实例。 + +```javascript +class A { + constructor() { + this.x = 1; + } + print() { + console.log(this.x); + } +} + +class B extends A { + constructor() { + super(); + this.x = 2; + } + m() { + super.print(); + } +} + +let b = new B(); +b.m() // 2 +``` + +上面代码中,`super.print()`虽然调用的是`A.prototype.print()`,但是`A.prototype.print()`内部的`this`指向子类`B`的实例,导致输出的是`2`,而不是`1`。也就是说,实际上执行的是`super.print.call(this)`。 + +由于`this`指向子类实例,所以如果通过`super`对某个属性赋值,这时`super`就是`this`,赋值的属性会变成子类实例的属性。 + +```javascript +class A { + constructor() { + this.x = 1; + } +} + +class B extends A { + constructor() { + super(); + this.x = 2; + super.x = 3; + console.log(super.x); // undefined + console.log(this.x); // 3 + } +} + +let b = new B(); +``` + +上面代码中,`super.x`赋值为`3`,这时等同于对`this.x`赋值为`3`。而当读取`super.x`的时候,读的是`A.prototype.x`,所以返回`undefined`。 + +如果`super`作为对象,用在静态方法之中,这时`super`将指向父类,而不是父类的原型对象。 + +```javascript +class Parent { + static myMethod(msg) { + console.log('static', msg); + } + + myMethod(msg) { + console.log('instance', msg); + } +} + +class Child extends Parent { + static myMethod(msg) { + super.myMethod(msg); + } + + myMethod(msg) { + super.myMethod(msg); + } +} + +Child.myMethod(1); // static 1 + +var child = new Child(); +child.myMethod(2); // instance 2 +``` + +上面代码中,`super`在静态方法之中指向父类,在普通方法之中指向父类的原型对象。 + +另外,在子类的静态方法中通过`super`调用父类的方法时,方法内部的`this`指向当前的子类,而不是子类的实例。 + +```javascript +class A { + constructor() { + this.x = 1; + } + static print() { + console.log(this.x); + } +} + +class B extends A { + constructor() { + super(); + this.x = 2; + } + static m() { + super.print(); + } +} + +B.x = 3; +B.m() // 3 +``` + +上面代码中,静态方法`B.m`里面,`super.print`指向父类的静态方法。这个方法里面的`this`指向的是`B`,而不是`B`的实例。 + +注意,使用`super`的时候,必须显式指定是作为函数、还是作为对象使用,否则会报错。 + +```javascript +class A {} + +class B extends A { + constructor() { + super(); + console.log(super); // 报错 + } +} +``` + +上面代码中,`console.log(super)`当中的`super`,无法看出是作为函数使用,还是作为对象使用,所以 JavaScript 引擎解析代码的时候就会报错。这时,如果能清晰地表明`super`的数据类型,就不会报错。 + +```javascript +class A {} + +class B extends A { + constructor() { + super(); + console.log(super.valueOf() instanceof B); // true + } +} + +let b = new B(); +``` + +上面代码中,`super.valueOf()`表明`super`是一个对象,因此就不会报错。同时,由于`super`使得`this`指向`B`的实例,所以`super.valueOf()`返回的是一个`B`的实例。 + +最后,由于对象总是继承其他对象的,所以可以在任意一个对象中,使用`super`关键字。 + +```javascript +var obj = { + toString() { + return "MyObject: " + super.toString(); + } +}; + +obj.toString(); // MyObject: [object Object] +``` + +## 类的 prototype 属性和\_\_proto\_\_属性 + +大多数浏览器的 ES5 实现之中,每一个对象都有`__proto__`属性,指向对应的构造函数的`prototype`属性。Class 作为构造函数的语法糖,同时有`prototype`属性和`__proto__`属性,因此同时存在两条继承链。 + +(1)子类的`__proto__`属性,表示构造函数的继承,总是指向父类。 + +(2)子类`prototype`属性的`__proto__`属性,表示方法的继承,总是指向父类的`prototype`属性。 + +```javascript +class A { +} + +class B extends A { +} + +B.__proto__ === A // true +B.prototype.__proto__ === A.prototype // true +``` + +上面代码中,子类`B`的`__proto__`属性指向父类`A`,子类`B`的`prototype`属性的`__proto__`属性指向父类`A`的`prototype`属性。 + +这样的结果是因为,类的继承是按照下面的模式实现的。 + +```javascript +class A { +} + +class B { +} + +// B 的实例继承 A 的实例 +Object.setPrototypeOf(B.prototype, A.prototype); + +// B 继承 A 的静态属性 +Object.setPrototypeOf(B, A); + +const b = new B(); +``` + +《对象的扩展》一章给出过`Object.setPrototypeOf`方法的实现。 + +```javascript +Object.setPrototypeOf = function (obj, proto) { + obj.__proto__ = proto; + return obj; +} +``` + +因此,就得到了上面的结果。 + +```javascript +Object.setPrototypeOf(B.prototype, A.prototype); +// 等同于 +B.prototype.__proto__ = A.prototype; + +Object.setPrototypeOf(B, A); +// 等同于 +B.__proto__ = A; +``` + +这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`)的原型对象(`prototype`属性)是父类的原型对象(`prototype`属性)的实例。 + +```javascript +Object.create(A.prototype); +// 等同于 +B.prototype.__proto__ = A.prototype; +``` + +`extends`关键字后面可以跟多种类型的值。 + +```javascript +class B extends A { +} +``` + +上面代码的`A`,只要是一个有`prototype`属性的函数,就能被`B`继承。由于函数都有`prototype`属性(除了`Function.prototype`函数),因此`A`可以是任意函数。 + +下面,讨论两种情况。第一种,子类继承`Object`类。 + +```javascript +class A extends Object { +} + +A.__proto__ === Object // true +A.prototype.__proto__ === Object.prototype // true +``` + +这种情况下,`A`其实就是构造函数`Object`的复制,`A`的实例就是`Object`的实例。 + +第二种情况,不存在任何继承。 + +```javascript +class A { +} + +A.__proto__ === Function.prototype // true +A.prototype.__proto__ === Object.prototype // true +``` + +这种情况下,`A`作为一个基类(即不存在任何继承),就是一个普通函数,所以直接继承`Function.prototype`。但是,`A`调用后返回一个空对象(即`Object`实例),所以`A.prototype.__proto__`指向构造函数(`Object`)的`prototype`属性。 + +### 实例的 \_\_proto\_\_ 属性 + +子类实例的`__proto__`属性的`__proto__`属性,指向父类实例的`__proto__`属性。也就是说,子类的原型的原型,是父类的原型。 + +```javascript +var p1 = new Point(2, 3); +var p2 = new ColorPoint(2, 3, 'red'); + +p2.__proto__ === p1.__proto__ // false +p2.__proto__.__proto__ === p1.__proto__ // true +``` + +上面代码中,`ColorPoint`继承了`Point`,导致前者原型的原型是后者的原型。 + +因此,通过子类实例的`__proto__.__proto__`属性,可以修改父类实例的行为。 + +```javascript +p2.__proto__.__proto__.printName = function () { + console.log('Ha'); +}; + +p1.printName() // "Ha" +``` + +上面代码在`ColorPoint`的实例`p2`上向`Point`类添加方法,结果影响到了`Point`的实例`p1`。 + +## 原生构造函数的继承 + +原生构造函数是指语言内置的构造函数,通常用来生成数据结构。ECMAScript 的原生构造函数大致有下面这些。 + +- Boolean() +- Number() +- String() +- Array() +- Date() +- Function() +- RegExp() +- Error() +- Object() + +以前,这些原生构造函数是无法继承的,比如,不能自己定义一个`Array`的子类。 + +```javascript +function MyArray() { + Array.apply(this, arguments); +} + +MyArray.prototype = Object.create(Array.prototype, { + constructor: { + value: MyArray, + writable: true, + configurable: true, + enumerable: true + } +}); +``` + +上面代码定义了一个继承 Array 的`MyArray`类。但是,这个类的行为与`Array`完全不一致。 + +```javascript +var colors = new MyArray(); +colors[0] = "red"; +colors.length // 0 + +colors.length = 0; +colors[0] // "red" +``` + +之所以会发生这种情况,是因为子类无法获得原生构造函数的内部属性,通过`Array.apply()`或者分配给原型对象都不行。原生构造函数会忽略`apply`方法传入的`this`,也就是说,原生构造函数的`this`无法绑定,导致拿不到内部属性。 + +ES5 是先新建子类的实例对象`this`,再将父类的属性添加到子类上,由于父类的内部属性无法获取,导致无法继承原生的构造函数。比如,`Array`构造函数有一个内部属性`[[DefineOwnProperty]]`,用来定义新属性时,更新`length`属性,这个内部属性无法在子类获取,导致子类的`length`属性行为不正常。 + +下面的例子中,我们想让一个普通对象继承`Error`对象。 + +```javascript +var e = {}; + +Object.getOwnPropertyNames(Error.call(e)) +// [ 'stack' ] + +Object.getOwnPropertyNames(e) +// [] +``` + +上面代码中,我们想通过`Error.call(e)`这种写法,让普通对象`e`具有`Error`对象的实例属性。但是,`Error.call()`完全忽略传入的第一个参数,而是返回一个新对象,`e`本身没有任何变化。这证明了`Error.call(e)`这种写法,无法继承原生构造函数。 + +ES6 允许继承原生构造函数定义子类,因为 ES6 是先新建父类的实例对象`this`,然后再用子类的构造函数修饰`this`,使得父类的所有行为都可以继承。下面是一个继承`Array`的例子。 + +```javascript +class MyArray extends Array { + constructor(...args) { + super(...args); + } +} + +var arr = new MyArray(); +arr[0] = 12; +arr.length // 1 + +arr.length = 0; +arr[0] // undefined +``` + +上面代码定义了一个`MyArray`类,继承了`Array`构造函数,因此就可以从`MyArray`生成数组的实例。这意味着,ES6 可以自定义原生数据结构(比如`Array`、`String`等)的子类,这是 ES5 无法做到的。 + +上面这个例子也说明,`extends`关键字不仅可以用来继承类,还可以用来继承原生的构造函数。因此可以在原生数据结构的基础上,定义自己的数据结构。下面就是定义了一个带版本功能的数组。 + +```javascript +class VersionedArray extends Array { + constructor() { + super(); + this.history = [[]]; + } + commit() { + this.history.push(this.slice()); + } + revert() { + this.splice(0, this.length, ...this.history[this.history.length - 1]); + } +} + +var x = new VersionedArray(); + +x.push(1); +x.push(2); +x // [1, 2] +x.history // [[]] + +x.commit(); +x.history // [[], [1, 2]] + +x.push(3); +x // [1, 2, 3] +x.history // [[], [1, 2]] + +x.revert(); +x // [1, 2] +``` + +上面代码中,`VersionedArray`会通过`commit`方法,将自己的当前状态生成一个版本快照,存入`history`属性。`revert`方法用来将数组重置为最新一次保存的版本。除此之外,`VersionedArray`依然是一个普通数组,所有原生的数组方法都可以在它上面调用。 + +下面是一个自定义`Error`子类的例子,可以用来定制报错时的行为。 + +```javascript +class ExtendableError extends Error { + constructor(message) { + super(); + this.message = message; + this.stack = (new Error()).stack; + this.name = this.constructor.name; + } +} + +class MyError extends ExtendableError { + constructor(m) { + super(m); + } +} + +var myerror = new MyError('ll'); +myerror.message // "ll" +myerror instanceof Error // true +myerror.name // "MyError" +myerror.stack +// Error +// at MyError.ExtendableError +// ... +``` + +注意,继承`Object`的子类,有一个[行为差异](http://stackoverflow.com/questions/36203614/super-does-not-pass-arguments-when-instantiating-a-class-extended-from-object)。 + +```javascript +class NewObj extends Object{ + constructor(){ + super(...arguments); + } +} +var o = new NewObj({attr: true}); +o.attr === true // false +``` + +上面代码中,`NewObj`继承了`Object`,但是无法通过`super`方法向父类`Object`传参。这是因为 ES6 改变了`Object`构造函数的行为,一旦发现`Object`方法不是通过`new Object()`这种形式调用,ES6 规定`Object`构造函数会忽略参数。 + +## Mixin 模式的实现 + +Mixin 指的是多个对象合成一个新的对象,新对象具有各个组成成员的接口。它的最简单实现如下。 + +```javascript +const a = { + a: 'a' +}; +const b = { + b: 'b' +}; +const c = {...a, ...b}; // {a: 'a', b: 'b'} +``` + +上面代码中,`c`对象是`a`对象和`b`对象的合成,具有两者的接口。 + +下面是一个更完备的实现,将多个类的接口“混入”(mix in)另一个类。 + +```javascript +function mix(...mixins) { + class Mix { + constructor() { + for (let mixin of mixins) { + copyProperties(this, new mixin()); // 拷贝实例属性 + } + } + } + + for (let mixin of mixins) { + copyProperties(Mix, mixin); // 拷贝静态属性 + copyProperties(Mix.prototype, mixin.prototype); // 拷贝原型属性 + } + + return Mix; +} + +function copyProperties(target, source) { + for (let key of Reflect.ownKeys(source)) { + if ( key !== 'constructor' + && key !== 'prototype' + && key !== 'name' + ) { + let desc = Object.getOwnPropertyDescriptor(source, key); + Object.defineProperty(target, key, desc); + } + } +} +``` + +上面代码的`mix`函数,可以将多个对象合成为一个类。使用的时候,只要继承这个类即可。 + +```javascript +class DistributedEdit extends mix(Loggable, Serializable) { + // ... +} +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class.md" new file mode 100755 index 000000000..e31c31771 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/class.md" @@ -0,0 +1,1011 @@ +# Class 的基本语法 + +## 简介 + +### 类的由来 + +JavaScript 语言中,生成实例对象的传统方法是通过构造函数。下面是一个例子。 + +```javascript +function Point(x, y) { + this.x = x; + this.y = y; +} + +Point.prototype.toString = function () { + return '(' + this.x + ', ' + this.y + ')'; +}; + +var p = new Point(1, 2); +``` + +上面这种写法跟传统的面向对象语言(比如 C++ 和 Java)差异很大,很容易让新学习这门语言的程序员感到困惑。 + +ES6 提供了更接近传统语言的写法,引入了 Class(类)这个概念,作为对象的模板。通过`class`关键字,可以定义类。 + +基本上,ES6 的`class`可以看作只是一个语法糖,它的绝大部分功能,ES5 都可以做到,新的`class`写法只是让对象原型的写法更加清晰、更像面向对象编程的语法而已。上面的代码用 ES6 的`class`改写,就是下面这样。 + +```javascript +class Point { + constructor(x, y) { + this.x = x; + this.y = y; + } + + toString() { + return '(' + this.x + ', ' + this.y + ')'; + } +} +``` + +上面代码定义了一个“类”,可以看到里面有一个`constructor`方法,这就是构造方法,而`this`关键字则代表实例对象。也就是说,ES5 的构造函数`Point`,对应 ES6 的`Point`类的构造方法。 + +`Point`类除了构造方法,还定义了一个`toString`方法。注意,定义“类”的方法的时候,前面不需要加上`function`这个关键字,直接把函数定义放进去了就可以了。另外,方法之间不需要逗号分隔,加了会报错。 + +ES6 的类,完全可以看作构造函数的另一种写法。 + +```javascript +class Point { + // ... +} + +typeof Point // "function" +Point === Point.prototype.constructor // true +``` + +上面代码表明,类的数据类型就是函数,类本身就指向构造函数。 + +使用的时候,也是直接对类使用`new`命令,跟构造函数的用法完全一致。 + +```javascript +class Bar { + doStuff() { + console.log('stuff'); + } +} + +var b = new Bar(); +b.doStuff() // "stuff" +``` + +构造函数的`prototype`属性,在 ES6 的“类”上面继续存在。事实上,类的所有方法都定义在类的`prototype`属性上面。 + +```javascript +class Point { + constructor() { + // ... + } + + toString() { + // ... + } + + toValue() { + // ... + } +} + +// 等同于 + +Point.prototype = { + constructor() {}, + toString() {}, + toValue() {}, +}; +``` + +在类的实例上面调用方法,其实就是调用原型上的方法。 + +```javascript +class B {} +let b = new B(); + +b.constructor === B.prototype.constructor // true +``` + +上面代码中,`b`是`B`类的实例,它的`constructor`方法就是`B`类原型的`constructor`方法。 + +由于类的方法都定义在`prototype`对象上面,所以类的新方法可以添加在`prototype`对象上面。`Object.assign`方法可以很方便地一次向类添加多个方法。 + +```javascript +class Point { + constructor(){ + // ... + } +} + +Object.assign(Point.prototype, { + toString(){}, + toValue(){} +}); +``` + +`prototype`对象的`constructor`属性,直接指向“类”的本身,这与 ES5 的行为是一致的。 + +```javascript +Point.prototype.constructor === Point // true +``` + +另外,类的内部所有定义的方法,都是不可枚举的(non-enumerable)。 + +```javascript +class Point { + constructor(x, y) { + // ... + } + + toString() { + // ... + } +} + +Object.keys(Point.prototype) +// [] +Object.getOwnPropertyNames(Point.prototype) +// ["constructor","toString"] +``` + +上面代码中,`toString`方法是`Point`类内部定义的方法,它是不可枚举的。这一点与 ES5 的行为不一致。 + +```javascript +var Point = function (x, y) { + // ... +}; + +Point.prototype.toString = function() { + // ... +}; + +Object.keys(Point.prototype) +// ["toString"] +Object.getOwnPropertyNames(Point.prototype) +// ["constructor","toString"] +``` + +上面代码采用 ES5 的写法,`toString`方法就是可枚举的。 + +### constructor 方法 + +`constructor`方法是类的默认方法,通过`new`命令生成对象实例时,自动调用该方法。一个类必须有`constructor`方法,如果没有显式定义,一个空的`constructor`方法会被默认添加。 + +```javascript +class Point { +} + +// 等同于 +class Point { + constructor() {} +} +``` + +上面代码中,定义了一个空的类`Point`,JavaScript 引擎会自动为它添加一个空的`constructor`方法。 + +`constructor`方法默认返回实例对象(即`this`),完全可以指定返回另外一个对象。 + +```javascript +class Foo { + constructor() { + return Object.create(null); + } +} + +new Foo() instanceof Foo +// false +``` + +上面代码中,`constructor`函数返回一个全新的对象,结果导致实例对象不是`Foo`类的实例。 + +类必须使用`new`调用,否则会报错。这是它跟普通构造函数的一个主要区别,后者不用`new`也可以执行。 + +```javascript +class Foo { + constructor() { + return Object.create(null); + } +} + +Foo() +// TypeError: Class constructor Foo cannot be invoked without 'new' +``` + +### 类的实例 + +生成类的实例的写法,与 ES5 完全一样,也是使用`new`命令。前面说过,如果忘记加上`new`,像函数那样调用`Class`,将会报错。 + +```javascript +class Point { + // ... +} + +// 报错 +var point = Point(2, 3); + +// 正确 +var point = new Point(2, 3); +``` + +与 ES5 一样,实例的属性除非显式定义在其本身(即定义在`this`对象上),否则都是定义在原型上(即定义在`class`上)。 + +```javascript +//定义类 +class Point { + + constructor(x, y) { + this.x = x; + this.y = y; + } + + toString() { + return '(' + this.x + ', ' + this.y + ')'; + } + +} + +var point = new Point(2, 3); + +point.toString() // (2, 3) + +point.hasOwnProperty('x') // true +point.hasOwnProperty('y') // true +point.hasOwnProperty('toString') // false +point.__proto__.hasOwnProperty('toString') // true +``` + +上面代码中,`x`和`y`都是实例对象`point`自身的属性(因为定义在`this`变量上),所以`hasOwnProperty`方法返回`true`,而`toString`是原型对象的属性(因为定义在`Point`类上),所以`hasOwnProperty`方法返回`false`。这些都与 ES5 的行为保持一致。 + +与 ES5 一样,类的所有实例共享一个原型对象。 + +```javascript +var p1 = new Point(2,3); +var p2 = new Point(3,2); + +p1.__proto__ === p2.__proto__ +//true +``` + +上面代码中,`p1`和`p2`都是`Point`的实例,它们的原型都是`Point.prototype`,所以`__proto__`属性是相等的。 + +这也意味着,可以通过实例的`__proto__`属性为“类”添加方法。 + +> `__proto__` 并不是语言本身的特性,这是各大厂商具体实现时添加的私有属性,虽然目前很多现代浏览器的 JS 引擎中都提供了这个私有属性,但依旧不建议在生产中使用该属性,避免对环境产生依赖。生产环境中,我们可以使用 `Object.getPrototypeOf` 方法来获取实例对象的原型,然后再来为原型添加方法/属性。 + +```javascript +var p1 = new Point(2,3); +var p2 = new Point(3,2); + +p1.__proto__.printName = function () { return 'Oops' }; + +p1.printName() // "Oops" +p2.printName() // "Oops" + +var p3 = new Point(4,2); +p3.printName() // "Oops" +``` + +上面代码在`p1`的原型上添加了一个`printName`方法,由于`p1`的原型就是`p2`的原型,因此`p2`也可以调用这个方法。而且,此后新建的实例`p3`也可以调用这个方法。这意味着,使用实例的`__proto__`属性改写原型,必须相当谨慎,不推荐使用,因为这会改变“类”的原始定义,影响到所有实例。 + +### 取值函数(getter)和存值函数(setter) + +与 ES5 一样,在“类”的内部可以使用`get`和`set`关键字,对某个属性设置存值函数和取值函数,拦截该属性的存取行为。 + +```javascript +class MyClass { + constructor() { + // ... + } + get prop() { + return 'getter'; + } + set prop(value) { + console.log('setter: '+value); + } +} + +let inst = new MyClass(); + +inst.prop = 123; +// setter: 123 + +inst.prop +// 'getter' +``` + +上面代码中,`prop`属性有对应的存值函数和取值函数,因此赋值和读取行为都被自定义了。 + +存值函数和取值函数是设置在属性的 Descriptor 对象上的。 + +```javascript +class CustomHTMLElement { + constructor(element) { + this.element = element; + } + + get html() { + return this.element.innerHTML; + } + + set html(value) { + this.element.innerHTML = value; + } +} + +var descriptor = Object.getOwnPropertyDescriptor( + CustomHTMLElement.prototype, "html" +); + +"get" in descriptor // true +"set" in descriptor // true +``` + +上面代码中,存值函数和取值函数是定义在`html`属性的描述对象上面,这与 ES5 完全一致。 + +### 属性表达式 + +类的属性名,可以采用表达式。 + +```javascript +let methodName = 'getArea'; + +class Square { + constructor(length) { + // ... + } + + [methodName]() { + // ... + } +} +``` + +上面代码中,`Square`类的方法名`getArea`,是从表达式得到的。 + +### Class 表达式 + +与函数一样,类也可以使用表达式的形式定义。 + +```javascript +const MyClass = class Me { + getClassName() { + return Me.name; + } +}; +``` + +上面代码使用表达式定义了一个类。需要注意的是,这个类的名字是`Me`,但是`Me`只在 Class 的内部可用,指代当前类。在 Class 外部,这个类只能用`MyClass`引用。 + +```javascript +let inst = new MyClass(); +inst.getClassName() // Me +Me.name // ReferenceError: Me is not defined +``` + +上面代码表示,`Me`只在 Class 内部有定义。 + +如果类的内部没用到的话,可以省略`Me`,也就是可以写成下面的形式。 + +```javascript +const MyClass = class { /* ... */ }; +``` + +采用 Class 表达式,可以写出立即执行的 Class。 + +```javascript +let person = new class { + constructor(name) { + this.name = name; + } + + sayName() { + console.log(this.name); + } +}('张三'); + +person.sayName(); // "张三" +``` + +上面代码中,`person`是一个立即执行的类的实例。 + +### 注意点 + +**(1)严格模式** + +类和模块的内部,默认就是严格模式,所以不需要使用`use strict`指定运行模式。只要你的代码写在类或模块之中,就只有严格模式可用。考虑到未来所有的代码,其实都是运行在模块之中,所以 ES6 实际上把整个语言升级到了严格模式。 + +**(2)不存在提升** + +类不存在变量提升(hoist),这一点与 ES5 完全不同。 + +```javascript +new Foo(); // ReferenceError +class Foo {} +``` + +上面代码中,`Foo`类使用在前,定义在后,这样会报错,因为 ES6 不会把类的声明提升到代码头部。这种规定的原因与下文要提到的继承有关,必须保证子类在父类之后定义。 + +```javascript +{ + let Foo = class {}; + class Bar extends Foo { + } +} +``` + +上面的代码不会报错,因为`Bar`继承`Foo`的时候,`Foo`已经有定义了。但是,如果存在`class`的提升,上面代码就会报错,因为`class`会被提升到代码头部,而`let`命令是不提升的,所以导致`Bar`继承`Foo`的时候,`Foo`还没有定义。 + +**(3)name 属性** + +由于本质上,ES6 的类只是 ES5 的构造函数的一层包装,所以函数的许多特性都被`Class`继承,包括`name`属性。 + +```javascript +class Point {} +Point.name // "Point" +``` + +`name`属性总是返回紧跟在`class`关键字后面的类名。 + +**(4)Generator 方法** + +如果某个方法之前加上星号(`*`),就表示该方法是一个 Generator 函数。 + +```javascript +class Foo { + constructor(...args) { + this.args = args; + } + * [Symbol.iterator]() { + for (let arg of this.args) { + yield arg; + } + } +} + +for (let x of new Foo('hello', 'world')) { + console.log(x); +} +// hello +// world +``` + +上面代码中,`Foo`类的`Symbol.iterator`方法前有一个星号,表示该方法是一个 Generator 函数。`Symbol.iterator`方法返回一个`Foo`类的默认遍历器,`for...of`循环会自动调用这个遍历器。 + +**(5)this 的指向** + +类的方法内部如果含有`this`,它默认指向类的实例。但是,必须非常小心,一旦单独使用该方法,很可能报错。 + +```javascript +class Logger { + printName(name = 'there') { + this.print(`Hello ${name}`); + } + + print(text) { + console.log(text); + } +} + +const logger = new Logger(); +const { printName } = logger; +printName(); // TypeError: Cannot read property 'print' of undefined +``` + +上面代码中,`printName`方法中的`this`,默认指向`Logger`类的实例。但是,如果将这个方法提取出来单独使用,`this`会指向该方法运行时所在的环境(由于 class 内部是严格模式,所以 this 实际指向的是`undefined`),从而导致找不到`print`方法而报错。 + +一个比较简单的解决方法是,在构造方法中绑定`this`,这样就不会找不到`print`方法了。 + +```javascript +class Logger { + constructor() { + this.printName = this.printName.bind(this); + } + + // ... +} +``` + +另一种解决方法是使用箭头函数。 + +```javascript +class Logger { + constructor() { + this.printName = (name = 'there') => { + this.print(`Hello ${name}`); + }; + } + + // ... +} +``` + +还有一种解决方法是使用`Proxy`,获取方法的时候,自动绑定`this`。 + +```javascript +function selfish (target) { + const cache = new WeakMap(); + const handler = { + get (target, key) { + const value = Reflect.get(target, key); + if (typeof value !== 'function') { + return value; + } + if (!cache.has(value)) { + cache.set(value, value.bind(target)); + } + return cache.get(value); + } + }; + const proxy = new Proxy(target, handler); + return proxy; +} + +const logger = selfish(new Logger()); +``` + +## 静态方法 + +类相当于实例的原型,所有在类中定义的方法,都会被实例继承。如果在一个方法前,加上`static`关键字,就表示该方法不会被实例继承,而是直接通过类来调用,这就称为“静态方法”。 + +```javascript +class Foo { + static classMethod() { + return 'hello'; + } +} + +Foo.classMethod() // 'hello' + +var foo = new Foo(); +foo.classMethod() +// TypeError: foo.classMethod is not a function +``` + +上面代码中,`Foo`类的`classMethod`方法前有`static`关键字,表明该方法是一个静态方法,可以直接在`Foo`类上调用(`Foo.classMethod()`),而不是在`Foo`类的实例上调用。如果在实例上调用静态方法,会抛出一个错误,表示不存在该方法。 + +注意,如果静态方法包含`this`关键字,这个`this`指的是类,而不是实例。 + +```javascript +class Foo { + static bar() { + this.baz(); + } + static baz() { + console.log('hello'); + } + baz() { + console.log('world'); + } +} + +Foo.bar() // hello +``` + +上面代码中,静态方法`bar`调用了`this.baz`,这里的`this`指的是`Foo`类,而不是`Foo`的实例,等同于调用`Foo.baz`。另外,从这个例子还可以看出,静态方法可以与非静态方法重名。 + +父类的静态方法,可以被子类继承。 + +```javascript +class Foo { + static classMethod() { + return 'hello'; + } +} + +class Bar extends Foo { +} + +Bar.classMethod() // 'hello' +``` + +上面代码中,父类`Foo`有一个静态方法,子类`Bar`可以调用这个方法。 + +静态方法也是可以从`super`对象上调用的。 + +```javascript +class Foo { + static classMethod() { + return 'hello'; + } +} + +class Bar extends Foo { + static classMethod() { + return super.classMethod() + ', too'; + } +} + +Bar.classMethod() // "hello, too" +``` + +## 实例属性的新写法 + +实例属性除了定义在`constructor()`方法里面的`this`上面,也可以定义在类的最顶层。 + +```javascript +class IncreasingCounter { + constructor() { + this._count = 0; + } + get value() { + console.log('Getting the current value!'); + return this._count; + } + increment() { + this._count++; + } +} +``` + +上面代码中,实例属性`this._count`定义在`constructor()`方法里面。另一种写法是,这个属性也可以定义在类的最顶层,其他都不变。 + +```javascript +class IncreasingCounter { + _count = 0; + get value() { + console.log('Getting the current value!'); + return this._count; + } + increment() { + this._count++; + } +} +``` + +上面代码中,实例属性`_count`与取值函数`value()`和`increment()`方法,处于同一个层级。这时,不需要在实例属性前面加上`this`。 + +这种新写法的好处是,所有实例对象自身的属性都定义在类的头部,看上去比较整齐,一眼就能看出这个类有哪些实例属性。 + +```javascript +class foo { + bar = 'hello'; + baz = 'world'; + + constructor() { + // ... + } +} +``` + +上面的代码,一眼就能看出,`foo`类有两个实例属性,一目了然。另外,写起来也比较简洁。 + +## 静态属性 + +静态属性指的是 Class 本身的属性,即`Class.propName`,而不是定义在实例对象(`this`)上的属性。 + +```javascript +class Foo { +} + +Foo.prop = 1; +Foo.prop // 1 +``` + +上面的写法为`Foo`类定义了一个静态属性`prop`。 + +目前,只有这种写法可行,因为 ES6 明确规定,Class 内部只有静态方法,没有静态属性。现在有一个[提案](https://github.com/tc39/proposal-class-fields)提供了类的静态属性,写法是在实例属性法的前面,加上`static`关键字。 + +```javascript +class MyClass { + static myStaticProp = 42; + + constructor() { + console.log(MyClass.myStaticProp); // 42 + } +} +``` + +这个新写法大大方便了静态属性的表达。 + +```javascript +// 老写法 +class Foo { + // ... +} +Foo.prop = 1; + +// 新写法 +class Foo { + static prop = 1; +} +``` + +上面代码中,老写法的静态属性定义在类的外部。整个类生成以后,再生成静态属性。这样让人很容易忽略这个静态属性,也不符合相关代码应该放在一起的代码组织原则。另外,新写法是显式声明(declarative),而不是赋值处理,语义更好。 + +## 私有方法和私有属性 + +### 现有的解决方案 + +私有方法和私有属性,是只能在类的内部访问的方法和属性,外部不能访问。这是常见需求,有利于代码的封装,但 ES6 不提供,只能通过变通方法模拟实现。 + +一种做法是在命名上加以区别。 + +```javascript +class Widget { + + // 公有方法 + foo (baz) { + this._bar(baz); + } + + // 私有方法 + _bar(baz) { + return this.snaf = baz; + } + + // ... +} +``` + +上面代码中,`_bar`方法前面的下划线,表示这是一个只限于内部使用的私有方法。但是,这种命名是不保险的,在类的外部,还是可以调用到这个方法。 + +另一种方法就是索性将私有方法移出模块,因为模块内部的所有方法都是对外可见的。 + +```javascript +class Widget { + foo (baz) { + bar.call(this, baz); + } + + // ... +} + +function bar(baz) { + return this.snaf = baz; +} +``` + +上面代码中,`foo`是公开方法,内部调用了`bar.call(this, baz)`。这使得`bar`实际上成为了当前模块的私有方法。 + +还有一种方法是利用`Symbol`值的唯一性,将私有方法的名字命名为一个`Symbol`值。 + +```javascript +const bar = Symbol('bar'); +const snaf = Symbol('snaf'); + +export default class myClass{ + + // 公有方法 + foo(baz) { + this[bar](baz); + } + + // 私有方法 + [bar](baz) { + return this[snaf] = baz; + } + + // ... +}; +``` + +上面代码中,`bar`和`snaf`都是`Symbol`值,一般情况下无法获取到它们,因此达到了私有方法和私有属性的效果。但是也不是绝对不行,`Reflect.ownKeys()`依然可以拿到它们。 + +```javascript +const inst = new myClass(); + +Reflect.ownKeys(myClass.prototype) +// [ 'constructor', 'foo', Symbol(bar) ] +``` + +上面代码中,Symbol 值的属性名依然可以从类的外部拿到。 + +### 私有属性的提案 + +目前,有一个[提案](https://github.com/tc39/proposal-private-methods),为`class`加了私有属性。方法是在属性名之前,使用`#`表示。 + +```javascript +class IncreasingCounter { + #count = 0; + get value() { + console.log('Getting the current value!'); + return this.#count; + } + increment() { + this.#count++; + } +} +``` + +上面代码中,`#count`就是私有属性,只能在类的内部使用(`this.#count`)。如果在类的外部使用,就会报错。 + +```javascript +const counter = new IncreasingCounter(); +counter.#count // 报错 +counter.#count = 42 // 报错 +``` + +上面代码在类的外部,读取私有属性,就会报错。 + +下面是另一个例子。 + +```javascript +class Point { + #x; + + constructor(x = 0) { + this.#x = +x; + } + + get x() { + return this.#x; + } + + set x(value) { + this.#x = +value; + } +} +``` + +上面代码中,`#x`就是私有属性,在`Point`类之外是读取不到这个属性的。由于井号`#`是属性名的一部分,使用时必须带有`#`一起使用,所以`#x`和`x`是两个不同的属性。 + +之所以要引入一个新的前缀`#`表示私有属性,而没有采用`private`关键字,是因为 JavaScript 是一门动态语言,没有类型声明,使用独立的符号似乎是唯一的比较方便可靠的方法,能够准确地区分一种属性是否为私有属性。另外,Ruby 语言使用`@`表示私有属性,ES6 没有用这个符号而使用`#`,是因为`@`已经被留给了 Decorator。 + +这种写法不仅可以写私有属性,还可以用来写私有方法。 + +```javascript +class Foo { + #a; + #b; + constructor(a, b) { + this.#a = a; + this.#b = b; + } + #sum() { + return #a + #b; + } + printSum() { + console.log(this.#sum()); + } +} +``` + +上面代码中,`#sum()`就是一个私有方法。 + +另外,私有属性也可以设置 getter 和 setter 方法。 + +```javascript +class Counter { + #xValue = 0; + + constructor() { + super(); + // ... + } + + get #x() { return #xValue; } + set #x(value) { + this.#xValue = value; + } +} +``` + +上面代码中,`#x`是一个私有属性,它的读写都通过`get #x()`和`set #x()`来完成。 + +私有属性不限于从`this`引用,只要是在类的内部,实例也可以引用私有属性。 + +```javascript +class Foo { + #privateValue = 42; + static getPrivateValue(foo) { + return foo.#privateValue; + } +} + +Foo.getPrivateValue(new Foo()); // 42 +``` + +上面代码允许从实例`foo`上面引用私有属性。 + +私有属性和私有方法前面,也可以加上`static`关键字,表示这是一个静态的私有属性或私有方法。 + +```javascript +class FakeMath { + static PI = 22 / 7; + static #totallyRandomNumber = 4; + + static #computeRandomNumber() { + return FakeMath.#totallyRandomNumber; + } + + static random() { + console.log('I heard you like random numbers…') + return FakeMath.#computeRandomNumber(); + } +} + +FakeMath.PI // 3.142857142857143 +FakeMath.random() +// I heard you like random numbers… +// 4 +FakeMath.#totallyRandomNumber // 报错 +FakeMath.#computeRandomNumber() // 报错 +``` + +上面代码中,`#totallyRandomNumber`是私有属性,`#computeRandomNumber()`是私有方法,只能在`FakeMath`这个类的内部调用,外部调用就会报错。 + +## new.target 属性 + +`new`是从构造函数生成实例对象的命令。ES6 为`new`命令引入了一个`new.target`属性,该属性一般用在构造函数之中,返回`new`命令作用于的那个构造函数。如果构造函数不是通过`new`命令或`Reflect.construct()`调用的,`new.target`会返回`undefined`,因此这个属性可以用来确定构造函数是怎么调用的。 + +```javascript +function Person(name) { + if (new.target !== undefined) { + this.name = name; + } else { + throw new Error('必须使用 new 命令生成实例'); + } +} + +// 另一种写法 +function Person(name) { + if (new.target === Person) { + this.name = name; + } else { + throw new Error('必须使用 new 命令生成实例'); + } +} + +var person = new Person('张三'); // 正确 +var notAPerson = Person.call(person, '张三'); // 报错 +``` + +上面代码确保构造函数只能通过`new`命令调用。 + +Class 内部调用`new.target`,返回当前 Class。 + +```javascript +class Rectangle { + constructor(length, width) { + console.log(new.target === Rectangle); + this.length = length; + this.width = width; + } +} + +var obj = new Rectangle(3, 4); // 输出 true +``` + +需要注意的是,子类继承父类时,`new.target`会返回子类。 + +```javascript +class Rectangle { + constructor(length, width) { + console.log(new.target === Rectangle); + // ... + } +} + +class Square extends Rectangle { + constructor(length) { + super(length, width); + } +} + +var obj = new Square(3); // 输出 false +``` + +上面代码中,`new.target`会返回子类。 + +利用这个特点,可以写出不能独立使用、必须继承后才能使用的类。 + +```javascript +class Shape { + constructor() { + if (new.target === Shape) { + throw new Error('本类不能实例化'); + } + } +} + +class Rectangle extends Shape { + constructor(length, width) { + super(); + // ... + } +} + +var x = new Shape(); // 报错 +var y = new Rectangle(3, 4); // 正确 +``` + +上面代码中,`Shape`类不能被实例化,只能用于继承。 + +注意,在函数外部,使用`new.target`会报错。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/decorator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/decorator.md" new file mode 100755 index 000000000..8e647bb0d --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/decorator.md" @@ -0,0 +1,814 @@ +# 修饰器 + +[说明] Decorator 提案经过了大幅修改,目前还没有定案,不知道语法会不会再变。下面的内容完全依据以前的提案,已经有点过时了。等待定案以后,需要完全重写。 + +## 类的修饰 + +许多面向对象的语言都有修饰器(Decorator)函数,用来修改类的行为。目前,有一个[提案](https://github.com/tc39/proposal-decorators)将这项功能,引入了 ECMAScript。 + +```javascript +@testable +class MyTestableClass { + // ... +} + +function testable(target) { + target.isTestable = true; +} + +MyTestableClass.isTestable // true +``` + +上面代码中,`@testable`就是一个修饰器。它修改了`MyTestableClass`这个类的行为,为它加上了静态属性`isTestable`。`testable`函数的参数`target`是`MyTestableClass`类本身。 + +基本上,修饰器的行为就是下面这样。 + +```javascript +@decorator +class A {} + +// 等同于 + +class A {} +A = decorator(A) || A; +``` + +也就是说,修饰器是一个对类进行处理的函数。修饰器函数的第一个参数,就是所要修饰的目标类。 + +```javascript +function testable(target) { + // ... +} +``` + +上面代码中,`testable`函数的参数`target`,就是会被修饰的类。 + +如果觉得一个参数不够用,可以在修饰器外面再封装一层函数。 + +```javascript +function testable(isTestable) { + return function(target) { + target.isTestable = isTestable; + } +} + +@testable(true) +class MyTestableClass {} +MyTestableClass.isTestable // true + +@testable(false) +class MyClass {} +MyClass.isTestable // false +``` + +上面代码中,修饰器`testable`可以接受参数,这就等于可以修改修饰器的行为。 + +注意,修饰器对类的行为的改变,是代码编译时发生的,而不是在运行时。这意味着,修饰器能在编译阶段运行代码。也就是说,修饰器本质就是编译时执行的函数。 + +前面的例子是为类添加一个静态属性,如果想添加实例属性,可以通过目标类的`prototype`对象操作。 + +```javascript +function testable(target) { + target.prototype.isTestable = true; +} + +@testable +class MyTestableClass {} + +let obj = new MyTestableClass(); +obj.isTestable // true +``` + +上面代码中,修饰器函数`testable`是在目标类的`prototype`对象上添加属性,因此就可以在实例上调用。 + +下面是另外一个例子。 + +```javascript +// mixins.js +export function mixins(...list) { + return function (target) { + Object.assign(target.prototype, ...list) + } +} + +// main.js +import { mixins } from './mixins' + +const Foo = { + foo() { console.log('foo') } +}; + +@mixins(Foo) +class MyClass {} + +let obj = new MyClass(); +obj.foo() // 'foo' +``` + +上面代码通过修饰器`mixins`,把`Foo`对象的方法添加到了`MyClass`的实例上面。可以用`Object.assign()`模拟这个功能。 + +```javascript +const Foo = { + foo() { console.log('foo') } +}; + +class MyClass {} + +Object.assign(MyClass.prototype, Foo); + +let obj = new MyClass(); +obj.foo() // 'foo' +``` + +实际开发中,React 与 Redux 库结合使用时,常常需要写成下面这样。 + +```javascript +class MyReactComponent extends React.Component {} + +export default connect(mapStateToProps, mapDispatchToProps)(MyReactComponent); +``` + +有了装饰器,就可以改写上面的代码。 + +```javascript +@connect(mapStateToProps, mapDispatchToProps) +export default class MyReactComponent extends React.Component {} +``` + +相对来说,后一种写法看上去更容易理解。 + +## 方法的修饰 + +修饰器不仅可以修饰类,还可以修饰类的属性。 + +```javascript +class Person { + @readonly + name() { return `${this.first} ${this.last}` } +} +``` + +上面代码中,修饰器`readonly`用来修饰“类”的`name`方法。 + +修饰器函数`readonly`一共可以接受三个参数。 + +```javascript +function readonly(target, name, descriptor){ + // descriptor对象原来的值如下 + // { + // value: specifiedFunction, + // enumerable: false, + // configurable: true, + // writable: true + // }; + descriptor.writable = false; + return descriptor; +} + +readonly(Person.prototype, 'name', descriptor); +// 类似于 +Object.defineProperty(Person.prototype, 'name', descriptor); +``` + +修饰器第一个参数是类的原型对象,上例是`Person.prototype`,修饰器的本意是要“修饰”类的实例,但是这个时候实例还没生成,所以只能去修饰原型(这不同于类的修饰,那种情况时`target`参数指的是类本身);第二个参数是所要修饰的属性名,第三个参数是该属性的描述对象。 + +另外,上面代码说明,修饰器(readonly)会修改属性的描述对象(descriptor),然后被修改的描述对象再用来定义属性。 + +下面是另一个例子,修改属性描述对象的`enumerable`属性,使得该属性不可遍历。 + +```javascript +class Person { + @nonenumerable + get kidCount() { return this.children.length; } +} + +function nonenumerable(target, name, descriptor) { + descriptor.enumerable = false; + return descriptor; +} +``` + +下面的`@log`修饰器,可以起到输出日志的作用。 + +```javascript +class Math { + @log + add(a, b) { + return a + b; + } +} + +function log(target, name, descriptor) { + var oldValue = descriptor.value; + + descriptor.value = function() { + console.log(`Calling ${name} with`, arguments); + return oldValue.apply(this, arguments); + }; + + return descriptor; +} + +const math = new Math(); + +// passed parameters should get logged now +math.add(2, 4); +``` + +上面代码中,`@log`修饰器的作用就是在执行原始的操作之前,执行一次`console.log`,从而达到输出日志的目的。 + +修饰器有注释的作用。 + +```javascript +@testable +class Person { + @readonly + @nonenumerable + name() { return `${this.first} ${this.last}` } +} +``` + +从上面代码中,我们一眼就能看出,`Person`类是可测试的,而`name`方法是只读和不可枚举的。 + +下面是使用 Decorator 写法的[组件](https://github.com/ionic-team/stencil),看上去一目了然。 + +```javascript +@Component({ + tag: 'my-component', + styleUrl: 'my-component.scss' +}) +export class MyComponent { + @Prop() first: string; + @Prop() last: string; + @State() isVisible: boolean = true; + + render() { + return ( + <p>Hello, my name is {this.first} {this.last}</p> + ); + } +} +``` + +如果同一个方法有多个修饰器,会像剥洋葱一样,先从外到内进入,然后由内向外执行。 + +```javascript +function dec(id){ + console.log('evaluated', id); + return (target, property, descriptor) => console.log('executed', id); +} + +class Example { + @dec(1) + @dec(2) + method(){} +} +// evaluated 1 +// evaluated 2 +// executed 2 +// executed 1 +``` + +上面代码中,外层修饰器`@dec(1)`先进入,但是内层修饰器`@dec(2)`先执行。 + +除了注释,修饰器还能用来类型检查。所以,对于类来说,这项功能相当有用。从长期来看,它将是 JavaScript 代码静态分析的重要工具。 + +## 为什么修饰器不能用于函数? + +修饰器只能用于类和类的方法,不能用于函数,因为存在函数提升。 + +```javascript +var counter = 0; + +var add = function () { + counter++; +}; + +@add +function foo() { +} +``` + +上面的代码,意图是执行后`counter`等于 1,但是实际上结果是`counter`等于 0。因为函数提升,使得实际执行的代码是下面这样。 + +```javascript +@add +function foo() { +} + +var counter; +var add; + +counter = 0; + +add = function () { + counter++; +}; +``` + +下面是另一个例子。 + +```javascript +var readOnly = require("some-decorator"); + +@readOnly +function foo() { +} +``` + +上面代码也有问题,因为实际执行是下面这样。 + +```javascript +var readOnly; + +@readOnly +function foo() { +} + +readOnly = require("some-decorator"); +``` + +总之,由于存在函数提升,使得修饰器不能用于函数。类是不会提升的,所以就没有这方面的问题。 + +另一方面,如果一定要修饰函数,可以采用高阶函数的形式直接执行。 + +```javascript +function doSomething(name) { + console.log('Hello, ' + name); +} + +function loggingDecorator(wrapped) { + return function() { + console.log('Starting'); + const result = wrapped.apply(this, arguments); + console.log('Finished'); + return result; + } +} + +const wrapped = loggingDecorator(doSomething); +``` + +## core-decorators.js + +[core-decorators.js](https://github.com/jayphelps/core-decorators.js)是一个第三方模块,提供了几个常见的修饰器,通过它可以更好地理解修饰器。 + +**(1)@autobind** + +`autobind`修饰器使得方法中的`this`对象,绑定原始对象。 + +```javascript +import { autobind } from 'core-decorators'; + +class Person { + @autobind + getPerson() { + return this; + } +} + +let person = new Person(); +let getPerson = person.getPerson; + +getPerson() === person; +// true +``` + +**(2)@readonly** + +`readonly`修饰器使得属性或方法不可写。 + +```javascript +import { readonly } from 'core-decorators'; + +class Meal { + @readonly + entree = 'steak'; +} + +var dinner = new Meal(); +dinner.entree = 'salmon'; +// Cannot assign to read only property 'entree' of [object Object] +``` + +**(3)@override** + +`override`修饰器检查子类的方法,是否正确覆盖了父类的同名方法,如果不正确会报错。 + +```javascript +import { override } from 'core-decorators'; + +class Parent { + speak(first, second) {} +} + +class Child extends Parent { + @override + speak() {} + // SyntaxError: Child#speak() does not properly override Parent#speak(first, second) +} + +// or + +class Child extends Parent { + @override + speaks() {} + // SyntaxError: No descriptor matching Child#speaks() was found on the prototype chain. + // + // Did you mean "speak"? +} +``` + +**(4)@deprecate (别名@deprecated)** + +`deprecate`或`deprecated`修饰器在控制台显示一条警告,表示该方法将废除。 + +```javascript +import { deprecate } from 'core-decorators'; + +class Person { + @deprecate + facepalm() {} + + @deprecate('We stopped facepalming') + facepalmHard() {} + + @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' }) + facepalmHarder() {} +} + +let person = new Person(); + +person.facepalm(); +// DEPRECATION Person#facepalm: This function will be removed in future versions. + +person.facepalmHard(); +// DEPRECATION Person#facepalmHard: We stopped facepalming + +person.facepalmHarder(); +// DEPRECATION Person#facepalmHarder: We stopped facepalming +// +// See http://knowyourmeme.com/memes/facepalm for more details. +// +``` + +**(5)@suppressWarnings** + +`suppressWarnings`修饰器抑制`deprecated`修饰器导致的`console.warn()`调用。但是,异步代码发出的调用除外。 + +```javascript +import { suppressWarnings } from 'core-decorators'; + +class Person { + @deprecated + facepalm() {} + + @suppressWarnings + facepalmWithoutWarning() { + this.facepalm(); + } +} + +let person = new Person(); + +person.facepalmWithoutWarning(); +// no warning is logged +``` + +## 使用修饰器实现自动发布事件 + +我们可以使用修饰器,使得对象的方法被调用时,自动发出一个事件。 + +```javascript +const postal = require("postal/lib/postal.lodash"); + +export default function publish(topic, channel) { + const channelName = channel || '/'; + const msgChannel = postal.channel(channelName); + msgChannel.subscribe(topic, v => { + console.log('频道: ', channelName); + console.log('事件: ', topic); + console.log('数据: ', v); + }); + + return function(target, name, descriptor) { + const fn = descriptor.value; + + descriptor.value = function() { + let value = fn.apply(this, arguments); + msgChannel.publish(topic, value); + }; + }; +} +``` + +上面代码定义了一个名为`publish`的修饰器,它通过改写`descriptor.value`,使得原方法被调用时,会自动发出一个事件。它使用的事件“发布/订阅”库是[Postal.js](https://github.com/postaljs/postal.js)。 + +它的用法如下。 + +```javascript +// index.js +import publish from './publish'; + +class FooComponent { + @publish('foo.some.message', 'component') + someMethod() { + return { my: 'data' }; + } + @publish('foo.some.other') + anotherMethod() { + // ... + } +} + +let foo = new FooComponent(); + +foo.someMethod(); +foo.anotherMethod(); +``` + +以后,只要调用`someMethod`或者`anotherMethod`,就会自动发出一个事件。 + +```bash +$ bash-node index.js +频道: component +事件: foo.some.message +数据: { my: 'data' } + +频道: / +事件: foo.some.other +数据: undefined +``` + +## Mixin + +在修饰器的基础上,可以实现`Mixin`模式。所谓`Mixin`模式,就是对象继承的一种替代方案,中文译为“混入”(mix in),意为在一个对象之中混入另外一个对象的方法。 + +请看下面的例子。 + +```javascript +const Foo = { + foo() { console.log('foo') } +}; + +class MyClass {} + +Object.assign(MyClass.prototype, Foo); + +let obj = new MyClass(); +obj.foo() // 'foo' +``` + +上面代码之中,对象`Foo`有一个`foo`方法,通过`Object.assign`方法,可以将`foo`方法“混入”`MyClass`类,导致`MyClass`的实例`obj`对象都具有`foo`方法。这就是“混入”模式的一个简单实现。 + +下面,我们部署一个通用脚本`mixins.js`,将 Mixin 写成一个修饰器。 + +```javascript +export function mixins(...list) { + return function (target) { + Object.assign(target.prototype, ...list); + }; +} +``` + +然后,就可以使用上面这个修饰器,为类“混入”各种方法。 + +```javascript +import { mixins } from './mixins'; + +const Foo = { + foo() { console.log('foo') } +}; + +@mixins(Foo) +class MyClass {} + +let obj = new MyClass(); +obj.foo() // "foo" +``` + +通过`mixins`这个修饰器,实现了在`MyClass`类上面“混入”`Foo`对象的`foo`方法。 + +不过,上面的方法会改写`MyClass`类的`prototype`对象,如果不喜欢这一点,也可以通过类的继承实现 Mixin。 + +```javascript +class MyClass extends MyBaseClass { + /* ... */ +} +``` + +上面代码中,`MyClass`继承了`MyBaseClass`。如果我们想在`MyClass`里面“混入”一个`foo`方法,一个办法是在`MyClass`和`MyBaseClass`之间插入一个混入类,这个类具有`foo`方法,并且继承了`MyBaseClass`的所有方法,然后`MyClass`再继承这个类。 + +```javascript +let MyMixin = (superclass) => class extends superclass { + foo() { + console.log('foo from MyMixin'); + } +}; +``` + +上面代码中,`MyMixin`是一个混入类生成器,接受`superclass`作为参数,然后返回一个继承`superclass`的子类,该子类包含一个`foo`方法。 + +接着,目标类再去继承这个混入类,就达到了“混入”`foo`方法的目的。 + +```javascript +class MyClass extends MyMixin(MyBaseClass) { + /* ... */ +} + +let c = new MyClass(); +c.foo(); // "foo from MyMixin" +``` + +如果需要“混入”多个方法,就生成多个混入类。 + +```javascript +class MyClass extends Mixin1(Mixin2(MyBaseClass)) { + /* ... */ +} +``` + +这种写法的一个好处,是可以调用`super`,因此可以避免在“混入”过程中覆盖父类的同名方法。 + +```javascript +let Mixin1 = (superclass) => class extends superclass { + foo() { + console.log('foo from Mixin1'); + if (super.foo) super.foo(); + } +}; + +let Mixin2 = (superclass) => class extends superclass { + foo() { + console.log('foo from Mixin2'); + if (super.foo) super.foo(); + } +}; + +class S { + foo() { + console.log('foo from S'); + } +} + +class C extends Mixin1(Mixin2(S)) { + foo() { + console.log('foo from C'); + super.foo(); + } +} +``` + +上面代码中,每一次`混入`发生时,都调用了父类的`super.foo`方法,导致父类的同名方法没有被覆盖,行为被保留了下来。 + +```javascript +new C().foo() +// foo from C +// foo from Mixin1 +// foo from Mixin2 +// foo from S +``` + +## Trait + +Trait 也是一种修饰器,效果与 Mixin 类似,但是提供更多功能,比如防止同名方法的冲突、排除混入某些方法、为混入的方法起别名等等。 + +下面采用[traits-decorator](https://github.com/CocktailJS/traits-decorator)这个第三方模块作为例子。这个模块提供的`traits`修饰器,不仅可以接受对象,还可以接受 ES6 类作为参数。 + +```javascript +import { traits } from 'traits-decorator'; + +class TFoo { + foo() { console.log('foo') } +} + +const TBar = { + bar() { console.log('bar') } +}; + +@traits(TFoo, TBar) +class MyClass { } + +let obj = new MyClass(); +obj.foo() // foo +obj.bar() // bar +``` + +上面代码中,通过`traits`修饰器,在`MyClass`类上面“混入”了`TFoo`类的`foo`方法和`TBar`对象的`bar`方法。 + +Trait 不允许“混入”同名方法。 + +```javascript +import { traits } from 'traits-decorator'; + +class TFoo { + foo() { console.log('foo') } +} + +const TBar = { + bar() { console.log('bar') }, + foo() { console.log('foo') } +}; + +@traits(TFoo, TBar) +class MyClass { } +// 报错 +// throw new Error('Method named: ' + methodName + ' is defined twice.'); +// ^ +// Error: Method named: foo is defined twice. +``` + +上面代码中,`TFoo`和`TBar`都有`foo`方法,结果`traits`修饰器报错。 + +一种解决方法是排除`TBar`的`foo`方法。 + +```javascript +import { traits, excludes } from 'traits-decorator'; + +class TFoo { + foo() { console.log('foo') } +} + +const TBar = { + bar() { console.log('bar') }, + foo() { console.log('foo') } +}; + +@traits(TFoo, TBar::excludes('foo')) +class MyClass { } + +let obj = new MyClass(); +obj.foo() // foo +obj.bar() // bar +``` + +上面代码使用绑定运算符(::)在`TBar`上排除`foo`方法,混入时就不会报错了。 + +另一种方法是为`TBar`的`foo`方法起一个别名。 + +```javascript +import { traits, alias } from 'traits-decorator'; + +class TFoo { + foo() { console.log('foo') } +} + +const TBar = { + bar() { console.log('bar') }, + foo() { console.log('foo') } +}; + +@traits(TFoo, TBar::alias({foo: 'aliasFoo'})) +class MyClass { } + +let obj = new MyClass(); +obj.foo() // foo +obj.aliasFoo() // foo +obj.bar() // bar +``` + +上面代码为`TBar`的`foo`方法起了别名`aliasFoo`,于是`MyClass`也可以混入`TBar`的`foo`方法了。 + +`alias`和`excludes`方法,可以结合起来使用。 + +```javascript +@traits(TExample::excludes('foo','bar')::alias({baz:'exampleBaz'})) +class MyClass {} +``` + +上面代码排除了`TExample`的`foo`方法和`bar`方法,为`baz`方法起了别名`exampleBaz`。 + +`as`方法则为上面的代码提供了另一种写法。 + +```javascript +@traits(TExample::as({excludes:['foo', 'bar'], alias: {baz: 'exampleBaz'}})) +class MyClass {} +``` + +## Babel 转码器的支持 + +目前,Babel 转码器已经支持 Decorator。 + +首先,安装`@babel/core`和`@babel/plugin-transform-decorators`。由于后者包括在`@babel/preset-stage-0`之中,所以改为安装`@babel/preset-stage-0`亦可。 + +```bash +$ npm install @babel/core @babel/plugin-transform-decorators +``` + +然后,设置配置文件`.babelrc`。 + +```javascript +{ + "plugins": ["transform-decorators"] +} +``` + +这时,Babel 就可以对 Decorator 转码了。 + +脚本中打开的命令如下。 + +```javascript +babel.transform("code", {plugins: ["transform-decorators"]}) +``` + +Babel 的官方网站提供一个[在线转码器](https://babeljs.io/repl/),只要勾选 Experimental,就能支持 Decorator 的在线转码。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/destructuring.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/destructuring.md" old mode 100644 new mode 100755 similarity index 82% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/destructuring.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/destructuring.md" index bf0bd4db3..fcb5e1437 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/destructuring.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/destructuring.md" @@ -14,7 +14,7 @@ let b = 2; let c = 3; ``` -ES6允许写成下面这样。 +ES6 允许写成下面这样。 ```javascript let [a, b, c] = [1, 2, 3]; @@ -122,7 +122,7 @@ let [x, y = 'b'] = ['a']; // x='a', y='b' let [x, y = 'b'] = ['a', undefined]; // x='a', y='b' ``` -注意,ES6 内部使用严格相等运算符(`===`),判断一个位置是否有值。所以,如果一个数组成员不严格等于`undefined`,默认值是不会生效的。 +注意,ES6 内部使用严格相等运算符(`===`),判断一个位置是否有值。所以,只有当一个数组成员严格等于`undefined`,默认值才会生效。 ```javascript let [x = 1] = [undefined]; @@ -161,10 +161,10 @@ if ([1][0] === undefined) { let [x = 1, y = x] = []; // x=1; y=1 let [x = 1, y = x] = [2]; // x=2; y=2 let [x = 1, y = x] = [1, 2]; // x=1; y=2 -let [x = y, y = 1] = []; // ReferenceError +let [x = y, y = 1] = []; // ReferenceError: y is not defined ``` -上面最后一个表达式之所以会报错,是因为`x`用到默认值`y`时,`y`还没有声明。 +上面最后一个表达式之所以会报错,是因为`x`用`y`做默认值时,`y`还没有声明。 ## 对象的解构赋值 @@ -192,7 +192,7 @@ baz // undefined 如果变量名与属性名不一致,必须写成下面这样。 ```javascript -var { foo: baz } = { foo: 'aaa', bar: 'bbb' }; +let { foo: baz } = { foo: 'aaa', bar: 'bbb' }; baz // "aaa" let obj = { first: 'hello', last: 'world' }; @@ -217,29 +217,22 @@ foo // error: foo is not defined 上面代码中,`foo`是匹配的模式,`baz`才是变量。真正被赋值的是变量`baz`,而不是模式`foo`。 -注意,采用这种写法时,变量的声明和赋值是一体的。对于`let`和`const`来说,变量不能重新声明,所以一旦赋值的变量以前声明过,就会报错。 +与数组一样,解构也可以用于嵌套结构的对象。 ```javascript -let foo; -let {foo} = {foo: 1}; // SyntaxError: Duplicate declaration "foo" - -let baz; -let {bar: baz} = {bar: 1}; // SyntaxError: Duplicate declaration "baz" -``` - -上面代码中,解构赋值的变量都会重新声明,所以报错了。不过,因为`var`命令允许重新声明,所以这个错误只会在使用`let`和`const`命令时出现。如果没有第二个`let`命令,上面的代码就不会报错。 - -```javascript -let foo; -({foo} = {foo: 1}); // 成功 +let obj = { + p: [ + 'Hello', + { y: 'World' } + ] +}; -let baz; -({bar: baz} = {bar: 1}); // 成功 +let { p: [x, { y }] } = obj; +x // "Hello" +y // "World" ``` -上面代码中,`let`命令下面一行的圆括号是必须的,否则会报错。因为解析器会将起首的大括号,理解成一个代码块,而不是赋值语句。 - -和数组一样,解构也可以用于嵌套结构的对象。 +注意,这时`p`是模式,不是变量,因此不会被赋值。如果`p`也要作为变量赋值,可以写成下面这样。 ```javascript let obj = { @@ -249,15 +242,16 @@ let obj = { ] }; -let { p: [x, { y }] } = obj; +let { p, p: [x, { y }] } = obj; x // "Hello" y // "World" +p // ["Hello", {y: "World"}] ``` -注意,这时`p`是模式,不是变量,因此不会被赋值。 +下面是另一个例子。 ```javascript -var node = { +const node = { loc: { start: { line: 1, @@ -266,13 +260,13 @@ var node = { } }; -var { loc: { start: { line }} } = node; +let { loc, loc: { start }, loc: { start: { line }} } = node; line // 1 -loc // error: loc is undefined -start // error: start is undefined +loc // Object {start: Object} +start // Object {line: 1, column: 5} ``` -上面代码中,只有`line`是变量,`loc`和`start`都是模式,不会被赋值。 +上面代码有三次解构赋值,分别是对`loc`、`start`、`line`三个属性的解构赋值。注意,最后一次对`line`属性的解构赋值之中,只有`line`是变量,`loc`和`start`都是模式,不是变量。 下面是嵌套赋值的例子。 @@ -296,10 +290,10 @@ var {x, y = 5} = {x: 1}; x // 1 y // 5 -var {x:y = 3} = {}; +var {x: y = 3} = {}; y // 3 -var {x:y = 3} = {x: 5}; +var {x: y = 3} = {x: 5}; y // 5 var { message: msg = 'Something went wrong' } = {}; @@ -316,7 +310,7 @@ var {x = 3} = {x: null}; x // null ``` -上面代码中,如果`x`属性等于`null`,就不严格相等于`undefined`,导致默认值不会生效。 +上面代码中,属性`x`等于`null`,因为`null`与`undefined`不严格相等,所以是个有效的赋值,导致默认值`3`不会生效。 如果解构失败,变量的值等于`undefined`。 @@ -348,16 +342,17 @@ let x; // SyntaxError: syntax error ``` -上面代码的写法会报错,因为JavaScript引擎会将`{x}`理解成一个代码块,从而发生语法错误。只有不将大括号写在行首,避免JavaScript将其解释为代码块,才能解决这个问题。 +上面代码的写法会报错,因为 JavaScript 引擎会将`{x}`理解成一个代码块,从而发生语法错误。只有不将大括号写在行首,避免 JavaScript 将其解释为代码块,才能解决这个问题。 ```javascript // 正确的写法 +let x; ({x} = {x: 1}); ``` 上面代码将整个解构赋值语句,放在一个圆括号里面,就可以正确执行。关于圆括号与解构赋值的关系,参见下文。 -解构赋值允许,等号左边的模式之中,不放置任何变量名。因此,可以写出非常古怪的赋值表达式。 +解构赋值允许等号左边的模式之中,不放置任何变量名。因此,可以写出非常古怪的赋值表达式。 ```javascript ({} = [true, false]); @@ -384,7 +379,7 @@ first // 1 last // 3 ``` -上面代码对数组进行对象解构。数组`arr`的`0`键对应的值是`1`,`[arr.length - 1]`就是`2`键,对应的值是`3`。方括号这种写法,属于“属性名表达式”,参见《对象的扩展》一章。 +上面代码对数组进行对象解构。数组`arr`的`0`键对应的值是`1`,`[arr.length - 1]`就是`2`键,对应的值是`3`。方括号这种写法,属于“属性名表达式”(参见《对象的扩展》一章)。 ## 字符串的解构赋值 @@ -489,7 +484,7 @@ move(); // [0, 0] 解构赋值虽然很方便,但是解析起来并不容易。对于编译器来说,一个式子到底是模式,还是表达式,没有办法从一开始就知道,必须解析到(或解析不到)等号才能知道。 -由此带来的问题是,如果模式中出现圆括号怎么处理。ES6的规则是,只要有可能导致解构的歧义,就不得使用圆括号。 +由此带来的问题是,如果模式中出现圆括号怎么处理。ES6 的规则是,只要有可能导致解构的歧义,就不得使用圆括号。 但是,这条规则实际上不那么容易辨别,处理起来相当麻烦。因此,建议只要有可能,就不要在模式中放置圆括号。 @@ -497,7 +492,7 @@ move(); // [0, 0] 以下三种解构赋值不得使用圆括号。 -(1)变量声明语句中,不能带有圆括号。 +(1)变量声明语句 ```javascript // 全部报错 @@ -511,18 +506,20 @@ let {(x): c} = {}; let { o: ({ p: p }) } = { o: { p: 2 } }; ``` -上面三个语句都会报错,因为它们都是变量声明语句,模式不能使用圆括号。 +上面 6 个语句都会报错,因为它们都是变量声明语句,模式不能使用圆括号。 -(2)函数参数中,模式不能带有圆括号。 +(2)函数参数 函数参数也属于变量声明,因此不能带有圆括号。 ```javascript // 报错 function f([(z)]) { return z; } +// 报错 +function f([z,(x)]) { return x; } ``` -(3)赋值语句中,不能将整个模式,或嵌套模式中的一层,放在圆括号之中。 +(3)赋值语句的模式 ```javascript // 全部报错 @@ -537,7 +534,7 @@ function f([(z)]) { return z; } [({ p: a }), { x: c }] = [{}, {}]; ``` -上面代码将嵌套模式的一层,放在圆括号之中,导致报错。 +上面代码将一部分模式放在圆括号之中,导致报错。 ### 可以使用圆括号的情况 @@ -549,7 +546,7 @@ function f([(z)]) { return z; } [(parseInt.prop)] = [3]; // 正确 ``` -上面三行语句都可以正确执行,因为首先它们都是赋值语句,而不是声明语句;其次它们的圆括号都不属于模式的一部分。第一行语句中,模式是取数组的第一个成员,跟圆括号无关;第二行语句中,模式是p,而不是d;第三行语句与第一行语句的性质一致。 +上面三行语句都可以正确执行,因为首先它们都是赋值语句,而不是声明语句;其次它们的圆括号都不属于模式的一部分。第一行语句中,模式是取数组的第一个成员,跟圆括号无关;第二行语句中,模式是`p`,而不是`d`;第三行语句与第一行语句的性质一致。 ## 用途 @@ -603,9 +600,9 @@ function f({x, y, z}) { ... } f({z: 3, y: 2, x: 1}); ``` -**(4)提取JSON数据** +**(4)提取 JSON 数据** -解构赋值对提取JSON对象中的数据,尤其有用。 +解构赋值对提取 JSON 对象中的数据,尤其有用。 ```javascript let jsonData = { @@ -633,19 +630,19 @@ jQuery.ajax = function (url, { crossDomain = false, global = true, // ... more config -}) { +} = {}) { // ... do stuff }; ``` 指定参数的默认值,就避免了在函数体内部再写`var foo = config.foo || 'default foo';`这样的语句。 -**(6)遍历Map结构** +**(6)遍历 Map 结构** -任何部署了Iterator接口的对象,都可以用`for...of`循环遍历。Map结构原生支持Iterator接口,配合变量的解构赋值,获取键名和键值就非常方便。 +任何部署了 Iterator 接口的对象,都可以用`for...of`循环遍历。Map 结构原生支持 Iterator 接口,配合变量的解构赋值,获取键名和键值就非常方便。 ```javascript -var map = new Map(); +const map = new Map(); map.set('first', 'hello'); map.set('second', 'world'); diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/fp.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/fp.md" old mode 100644 new mode 100755 similarity index 83% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/fp.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/fp.md" index 580ceac38..e33d5e251 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/fp.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/fp.md" @@ -1,8 +1,8 @@ # 函数式编程 -JavaScript语言从一诞生,就具有函数式编程的烙印。它将函数作为一种独立的数据类型,与其他数据类型处于完全平等的地位。在JavaScript语言中,你可以采用面向对象编程,也可以采用函数式编程。有人甚至说,JavaScript是有史以来第一种被大规模采用的函数式编程语言。 +JavaScript 语言从一诞生,就具有函数式编程的烙印。它将函数作为一种独立的数据类型,与其他数据类型处于完全平等的地位。在 JavaScript 语言中,你可以采用面向对象编程,也可以采用函数式编程。有人甚至说,JavaScript 是有史以来第一种被大规模采用的函数式编程语言。 -ES6的种种新增功能,使得函数式编程变得更方便、更强大。本章介绍ES6如何进行函数式编程。 +ES6 的种种新增功能,使得函数式编程变得更方便、更强大。本章介绍 ES6 如何进行函数式编程。 ## 柯里化 @@ -66,7 +66,7 @@ var flip = f.flip(three); flip(1, 2, 3); // => [2, 1, 3] ``` -上面代码中,如果按照正常的参数顺序,10除以5等于2。但是,参数倒置以后得到的新函数,结果就是5除以10,结果得到0.5。如果原函数有3个参数,则只颠倒前两个参数的位置。 +上面代码中,如果按照正常的参数顺序,10 除以 5 等于 2。但是,参数倒置以后得到的新函数,结果就是 5 除以 10,结果得到 0.5。如果原函数有 3 个参数,则只颠倒前两个参数的位置。 参数倒置的代码非常简单。 @@ -94,7 +94,7 @@ until = f.until(condition, inc); until(3) // 5 ``` -上面代码中,第一段的条件是执行到`x`大于100为止,所以`x`初值为0时,会一直执行到101。第二段的条件是执行到等于5为止,所以`x`最后的值是5。 +上面代码中,第一段的条件是执行到`x`大于 100 为止,所以`x`初值为 0 时,会一直执行到 101。第二段的条件是执行到等于 5 为止,所以`x`最后的值是 5。 执行边界的实现如下。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/function.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/function.md" new file mode 100755 index 000000000..d83ad6ac0 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/function.md" @@ -0,0 +1,1358 @@ +# 函数的扩展 + +## 函数参数的默认值 + +### 基本用法 + +ES6 之前,不能直接为函数的参数指定默认值,只能采用变通的方法。 + +```javascript +function log(x, y) { + y = y || 'World'; + console.log(x, y); +} + +log('Hello') // Hello World +log('Hello', 'China') // Hello China +log('Hello', '') // Hello World +``` + +上面代码检查函数`log`的参数`y`有没有赋值,如果没有,则指定默认值为`World`。这种写法的缺点在于,如果参数`y`赋值了,但是对应的布尔值为`false`,则该赋值不起作用。就像上面代码的最后一行,参数`y`等于空字符,结果被改为默认值。 + +为了避免这个问题,通常需要先判断一下参数`y`是否被赋值,如果没有,再等于默认值。 + +```javascript +if (typeof y === 'undefined') { + y = 'World'; +} +``` + +ES6 允许为函数的参数设置默认值,即直接写在参数定义的后面。 + +```javascript +function log(x, y = 'World') { + console.log(x, y); +} + +log('Hello') // Hello World +log('Hello', 'China') // Hello China +log('Hello', '') // Hello +``` + +可以看到,ES6 的写法比 ES5 简洁许多,而且非常自然。下面是另一个例子。 + +```javascript +function Point(x = 0, y = 0) { + this.x = x; + this.y = y; +} + +const p = new Point(); +p // { x: 0, y: 0 } +``` + +除了简洁,ES6 的写法还有两个好处:首先,阅读代码的人,可以立刻意识到哪些参数是可以省略的,不用查看函数体或文档;其次,有利于将来的代码优化,即使未来的版本在对外接口中,彻底拿掉这个参数,也不会导致以前的代码无法运行。 + +参数变量是默认声明的,所以不能用`let`或`const`再次声明。 + +```javascript +function foo(x = 5) { + let x = 1; // error + const x = 2; // error +} +``` + +上面代码中,参数变量`x`是默认声明的,在函数体中,不能用`let`或`const`再次声明,否则会报错。 + +使用参数默认值时,函数不能有同名参数。 + +```javascript +// 不报错 +function foo(x, x, y) { + // ... +} + +// 报错 +function foo(x, x, y = 1) { + // ... +} +// SyntaxError: Duplicate parameter name not allowed in this context +``` + +另外,一个容易忽略的地方是,参数默认值不是传值的,而是每次都重新计算默认值表达式的值。也就是说,参数默认值是惰性求值的。 + +```javascript +let x = 99; +function foo(p = x + 1) { + console.log(p); +} + +foo() // 100 + +x = 100; +foo() // 101 +``` + +上面代码中,参数`p`的默认值是`x + 1`。这时,每次调用函数`foo`,都会重新计算`x + 1`,而不是默认`p`等于 100。 + +### 与解构赋值默认值结合使用 + +参数默认值可以与解构赋值的默认值,结合起来使用。 + +```javascript +function foo({x, y = 5}) { + console.log(x, y); +} + +foo({}) // undefined 5 +foo({x: 1}) // 1 5 +foo({x: 1, y: 2}) // 1 2 +foo() // TypeError: Cannot read property 'x' of undefined +``` + +上面代码只使用了对象的解构赋值默认值,没有使用函数参数的默认值。只有当函数`foo`的参数是一个对象时,变量`x`和`y`才会通过解构赋值生成。如果函数`foo`调用时没提供参数,变量`x`和`y`就不会生成,从而报错。通过提供函数参数的默认值,就可以避免这种情况。 + +```javascript +function foo({x, y = 5} = {}) { + console.log(x, y); +} + +foo() // undefined 5 +``` + +上面代码指定,如果没有提供参数,函数`foo`的参数默认为一个空对象。 + +下面是另一个解构赋值默认值的例子。 + +```javascript +function fetch(url, { body = '', method = 'GET', headers = {} }) { + console.log(method); +} + +fetch('http://example.com', {}) +// "GET" + +fetch('http://example.com') +// 报错 +``` + +上面代码中,如果函数`fetch`的第二个参数是一个对象,就可以为它的三个属性设置默认值。这种写法不能省略第二个参数,如果结合函数参数的默认值,就可以省略第二个参数。这时,就出现了双重默认值。 + +```javascript +function fetch(url, { body = '', method = 'GET', headers = {} } = {}) { + console.log(method); +} + +fetch('http://example.com') +// "GET" +``` + +上面代码中,函数`fetch`没有第二个参数时,函数参数的默认值就会生效,然后才是解构赋值的默认值生效,变量`method`才会取到默认值`GET`。 + +作为练习,请问下面两种写法有什么差别? + +```javascript +// 写法一 +function m1({x = 0, y = 0} = {}) { + return [x, y]; +} + +// 写法二 +function m2({x, y} = { x: 0, y: 0 }) { + return [x, y]; +} +``` + +上面两种写法都对函数的参数设定了默认值,区别是写法一函数参数的默认值是空对象,但是设置了对象解构赋值的默认值;写法二函数参数的默认值是一个有具体属性的对象,但是没有设置对象解构赋值的默认值。 + +```javascript +// 函数没有参数的情况 +m1() // [0, 0] +m2() // [0, 0] + +// x 和 y 都有值的情况 +m1({x: 3, y: 8}) // [3, 8] +m2({x: 3, y: 8}) // [3, 8] + +// x 有值,y 无值的情况 +m1({x: 3}) // [3, 0] +m2({x: 3}) // [3, undefined] + +// x 和 y 都无值的情况 +m1({}) // [0, 0]; +m2({}) // [undefined, undefined] + +m1({z: 3}) // [0, 0] +m2({z: 3}) // [undefined, undefined] +``` + +### 参数默认值的位置 + +通常情况下,定义了默认值的参数,应该是函数的尾参数。因为这样比较容易看出来,到底省略了哪些参数。如果非尾部的参数设置默认值,实际上这个参数是没法省略的。 + +```javascript +// 例一 +function f(x = 1, y) { + return [x, y]; +} + +f() // [1, undefined] +f(2) // [2, undefined]) +f(, 1) // 报错 +f(undefined, 1) // [1, 1] + +// 例二 +function f(x, y = 5, z) { + return [x, y, z]; +} + +f() // [undefined, 5, undefined] +f(1) // [1, 5, undefined] +f(1, ,2) // 报错 +f(1, undefined, 2) // [1, 5, 2] +``` + +上面代码中,有默认值的参数都不是尾参数。这时,无法只省略该参数,而不省略它后面的参数,除非显式输入`undefined`。 + +如果传入`undefined`,将触发该参数等于默认值,`null`则没有这个效果。 + +```javascript +function foo(x = 5, y = 6) { + console.log(x, y); +} + +foo(undefined, null) +// 5 null +``` + +上面代码中,`x`参数对应`undefined`,结果触发了默认值,`y`参数等于`null`,就没有触发默认值。 + +### 函数的 length 属性 + +指定了默认值以后,函数的`length`属性,将返回没有指定默认值的参数个数。也就是说,指定了默认值后,`length`属性将失真。 + +```javascript +(function (a) {}).length // 1 +(function (a = 5) {}).length // 0 +(function (a, b, c = 5) {}).length // 2 +``` + +上面代码中,`length`属性的返回值,等于函数的参数个数减去指定了默认值的参数个数。比如,上面最后一个函数,定义了 3 个参数,其中有一个参数`c`指定了默认值,因此`length`属性等于`3`减去`1`,最后得到`2`。 + +这是因为`length`属性的含义是,该函数预期传入的参数个数。某个参数指定默认值以后,预期传入的参数个数就不包括这个参数了。同理,后文的 rest 参数也不会计入`length`属性。 + +```javascript +(function(...args) {}).length // 0 +``` + +如果设置了默认值的参数不是尾参数,那么`length`属性也不再计入后面的参数了。 + +```javascript +(function (a = 0, b, c) {}).length // 0 +(function (a, b = 1, c) {}).length // 1 +``` + +### 作用域 + +一旦设置了参数的默认值,函数进行声明初始化时,参数会形成一个单独的作用域(context)。等到初始化结束,这个作用域就会消失。这种语法行为,在不设置参数默认值时,是不会出现的。 + +```javascript +var x = 1; + +function f(x, y = x) { + console.log(y); +} + +f(2) // 2 +``` + +上面代码中,参数`y`的默认值等于变量`x`。调用函数`f`时,参数形成一个单独的作用域。在这个作用域里面,默认值变量`x`指向第一个参数`x`,而不是全局变量`x`,所以输出是`2`。 + +再看下面的例子。 + +```javascript +let x = 1; + +function f(y = x) { + let x = 2; + console.log(y); +} + +f() // 1 +``` + +上面代码中,函数`f`调用时,参数`y = x`形成一个单独的作用域。这个作用域里面,变量`x`本身没有定义,所以指向外层的全局变量`x`。函数调用时,函数体内部的局部变量`x`影响不到默认值变量`x`。 + +如果此时,全局变量`x`不存在,就会报错。 + +```javascript +function f(y = x) { + let x = 2; + console.log(y); +} + +f() // ReferenceError: x is not defined +``` + +下面这样写,也会报错。 + +```javascript +var x = 1; + +function foo(x = x) { + // ... +} + +foo() // ReferenceError: x is not defined +``` + +上面代码中,参数`x = x`形成一个单独作用域。实际执行的是`let x = x`,由于暂时性死区的原因,这行代码会报错”x 未定义“。 + +如果参数的默认值是一个函数,该函数的作用域也遵守这个规则。请看下面的例子。 + +```javascript +let foo = 'outer'; + +function bar(func = () => foo) { + let foo = 'inner'; + console.log(func()); +} + +bar(); // outer +``` + +上面代码中,函数`bar`的参数`func`的默认值是一个匿名函数,返回值为变量`foo`。函数参数形成的单独作用域里面,并没有定义变量`foo`,所以`foo`指向外层的全局变量`foo`,因此输出`outer`。 + +如果写成下面这样,就会报错。 + +```javascript +function bar(func = () => foo) { + let foo = 'inner'; + console.log(func()); +} + +bar() // ReferenceError: foo is not defined +``` + +上面代码中,匿名函数里面的`foo`指向函数外层,但是函数外层并没有声明变量`foo`,所以就报错了。 + +下面是一个更复杂的例子。 + +```javascript +var x = 1; +function foo(x, y = function() { x = 2; }) { + var x = 3; + y(); + console.log(x); +} + +foo() // 3 +x // 1 +``` + +上面代码中,函数`foo`的参数形成一个单独作用域。这个作用域里面,首先声明了变量`x`,然后声明了变量`y`,`y`的默认值是一个匿名函数。这个匿名函数内部的变量`x`,指向同一个作用域的第一个参数`x`。函数`foo`内部又声明了一个内部变量`x`,该变量与第一个参数`x`由于不是同一个作用域,所以不是同一个变量,因此执行`y`后,内部变量`x`和外部全局变量`x`的值都没变。 + +如果将`var x = 3`的`var`去除,函数`foo`的内部变量`x`就指向第一个参数`x`,与匿名函数内部的`x`是一致的,所以最后输出的就是`2`,而外层的全局变量`x`依然不受影响。 + +```javascript +var x = 1; +function foo(x, y = function() { x = 2; }) { + x = 3; + y(); + console.log(x); +} + +foo() // 2 +x // 1 +``` + +### 应用 + +利用参数默认值,可以指定某一个参数不得省略,如果省略就抛出一个错误。 + +```javascript +function throwIfMissing() { + throw new Error('Missing parameter'); +} + +function foo(mustBeProvided = throwIfMissing()) { + return mustBeProvided; +} + +foo() +// Error: Missing parameter +``` + +上面代码的`foo`函数,如果调用的时候没有参数,就会调用默认值`throwIfMissing`函数,从而抛出一个错误。 + +从上面代码还可以看到,参数`mustBeProvided`的默认值等于`throwIfMissing`函数的运行结果(注意函数名`throwIfMissing`之后有一对圆括号),这表明参数的默认值不是在定义时执行,而是在运行时执行。如果参数已经赋值,默认值中的函数就不会运行。 + +另外,可以将参数默认值设为`undefined`,表明这个参数是可以省略的。 + +```javascript +function foo(optional = undefined) { ··· } +``` + +## rest 参数 + +ES6 引入 rest 参数(形式为`...变量名`),用于获取函数的多余参数,这样就不需要使用`arguments`对象了。rest 参数搭配的变量是一个数组,该变量将多余的参数放入数组中。 + +```javascript +function add(...values) { + let sum = 0; + + for (var val of values) { + sum += val; + } + + return sum; +} + +add(2, 5, 3) // 10 +``` + +上面代码的`add`函数是一个求和函数,利用 rest 参数,可以向该函数传入任意数目的参数。 + +下面是一个 rest 参数代替`arguments`变量的例子。 + +```javascript +// arguments变量的写法 +function sortNumbers() { + return Array.prototype.slice.call(arguments).sort(); +} + +// rest参数的写法 +const sortNumbers = (...numbers) => numbers.sort(); +``` + +上面代码的两种写法,比较后可以发现,rest 参数的写法更自然也更简洁。 + +`arguments`对象不是数组,而是一个类似数组的对象。所以为了使用数组的方法,必须使用`Array.prototype.slice.call`先将其转为数组。rest 参数就不存在这个问题,它就是一个真正的数组,数组特有的方法都可以使用。下面是一个利用 rest 参数改写数组`push`方法的例子。 + +```javascript +function push(array, ...items) { + items.forEach(function(item) { + array.push(item); + console.log(item); + }); +} + +var a = []; +push(a, 1, 2, 3) +``` + +注意,rest 参数之后不能再有其他参数(即只能是最后一个参数),否则会报错。 + +```javascript +// 报错 +function f(a, ...b, c) { + // ... +} +``` + +函数的`length`属性,不包括 rest 参数。 + +```javascript +(function(a) {}).length // 1 +(function(...a) {}).length // 0 +(function(a, ...b) {}).length // 1 +``` + +## 严格模式 + +从 ES5 开始,函数内部可以设定为严格模式。 + +```javascript +function doSomething(a, b) { + 'use strict'; + // code +} +``` + +ES2016 做了一点修改,规定只要函数参数使用了默认值、解构赋值、或者扩展运算符,那么函数内部就不能显式设定为严格模式,否则会报错。 + +```javascript +// 报错 +function doSomething(a, b = a) { + 'use strict'; + // code +} + +// 报错 +const doSomething = function ({a, b}) { + 'use strict'; + // code +}; + +// 报错 +const doSomething = (...a) => { + 'use strict'; + // code +}; + +const obj = { + // 报错 + doSomething({a, b}) { + 'use strict'; + // code + } +}; +``` + +这样规定的原因是,函数内部的严格模式,同时适用于函数体和函数参数。但是,函数执行的时候,先执行函数参数,然后再执行函数体。这样就有一个不合理的地方,只有从函数体之中,才能知道参数是否应该以严格模式执行,但是参数却应该先于函数体执行。 + +```javascript +// 报错 +function doSomething(value = 070) { + 'use strict'; + return value; +} +``` + +上面代码中,参数`value`的默认值是八进制数`070`,但是严格模式下不能用前缀`0`表示八进制,所以应该报错。但是实际上,JavaScript 引擎会先成功执行`value = 070`,然后进入函数体内部,发现需要用严格模式执行,这时才会报错。 + +虽然可以先解析函数体代码,再执行参数代码,但是这样无疑就增加了复杂性。因此,标准索性禁止了这种用法,只要参数使用了默认值、解构赋值、或者扩展运算符,就不能显式指定严格模式。 + +两种方法可以规避这种限制。第一种是设定全局性的严格模式,这是合法的。 + +```javascript +'use strict'; + +function doSomething(a, b = a) { + // code +} +``` + +第二种是把函数包在一个无参数的立即执行函数里面。 + +```javascript +const doSomething = (function () { + 'use strict'; + return function(value = 42) { + return value; + }; +}()); +``` + +## name 属性 + +函数的`name`属性,返回该函数的函数名。 + +```javascript +function foo() {} +foo.name // "foo" +``` + +这个属性早就被浏览器广泛支持,但是直到 ES6,才将其写入了标准。 + +需要注意的是,ES6 对这个属性的行为做出了一些修改。如果将一个匿名函数赋值给一个变量,ES5 的`name`属性,会返回空字符串,而 ES6 的`name`属性会返回实际的函数名。 + +```javascript +var f = function () {}; + +// ES5 +f.name // "" + +// ES6 +f.name // "f" +``` + +上面代码中,变量`f`等于一个匿名函数,ES5 和 ES6 的`name`属性返回的值不一样。 + +如果将一个具名函数赋值给一个变量,则 ES5 和 ES6 的`name`属性都返回这个具名函数原本的名字。 + +```javascript +const bar = function baz() {}; + +// ES5 +bar.name // "baz" + +// ES6 +bar.name // "baz" +``` + +`Function`构造函数返回的函数实例,`name`属性的值为`anonymous`。 + +```javascript +(new Function).name // "anonymous" +``` + +`bind`返回的函数,`name`属性值会加上`bound`前缀。 + +```javascript +function foo() {}; +foo.bind({}).name // "bound foo" + +(function(){}).bind({}).name // "bound " +``` + +## 箭头函数 + +### 基本用法 + +ES6 允许使用“箭头”(`=>`)定义函数。 + +```javascript +var f = v => v; + +// 等同于 +var f = function (v) { + return v; +}; +``` + +如果箭头函数不需要参数或需要多个参数,就使用一个圆括号代表参数部分。 + +```javascript +var f = () => 5; +// 等同于 +var f = function () { return 5 }; + +var sum = (num1, num2) => num1 + num2; +// 等同于 +var sum = function(num1, num2) { + return num1 + num2; +}; +``` + +如果箭头函数的代码块部分多于一条语句,就要使用大括号将它们括起来,并且使用`return`语句返回。 + +```javascript +var sum = (num1, num2) => { return num1 + num2; } +``` + +由于大括号被解释为代码块,所以如果箭头函数直接返回一个对象,必须在对象外面加上括号,否则会报错。 + +```javascript +// 报错 +let getTempItem = id => { id: id, name: "Temp" }; + +// 不报错 +let getTempItem = id => ({ id: id, name: "Temp" }); +``` + +下面是一种特殊情况,虽然可以运行,但会得到错误的结果。 + +```javascript +let foo = () => { a: 1 }; +foo() // undefined +``` + +上面代码中,原始意图是返回一个对象`{ a: 1 }`,但是由于引擎认为大括号是代码块,所以执行了一行语句`a: 1`。这时,`a`可以被解释为语句的标签,因此实际执行的语句是`1;`,然后函数就结束了,没有返回值。 + +如果箭头函数只有一行语句,且不需要返回值,可以采用下面的写法,就不用写大括号了。 + +```javascript +let fn = () => void doesNotReturn(); +``` + +箭头函数可以与变量解构结合使用。 + +```javascript +const full = ({ first, last }) => first + ' ' + last; + +// 等同于 +function full(person) { + return person.first + ' ' + person.last; +} +``` + +箭头函数使得表达更加简洁。 + +```javascript +const isEven = n => n % 2 === 0; +const square = n => n * n; +``` + +上面代码只用了两行,就定义了两个简单的工具函数。如果不用箭头函数,可能就要占用多行,而且还不如现在这样写醒目。 + +箭头函数的一个用处是简化回调函数。 + +```javascript +// 正常函数写法 +[1,2,3].map(function (x) { + return x * x; +}); + +// 箭头函数写法 +[1,2,3].map(x => x * x); +``` + +另一个例子是 + +```javascript +// 正常函数写法 +var result = values.sort(function (a, b) { + return a - b; +}); + +// 箭头函数写法 +var result = values.sort((a, b) => a - b); +``` + +下面是 rest 参数与箭头函数结合的例子。 + +```javascript +const numbers = (...nums) => nums; + +numbers(1, 2, 3, 4, 5) +// [1,2,3,4,5] + +const headAndTail = (head, ...tail) => [head, tail]; + +headAndTail(1, 2, 3, 4, 5) +// [1,[2,3,4,5]] +``` + +### 使用注意点 + +箭头函数有几个使用注意点。 + +(1)函数体内的`this`对象,就是定义时所在的对象,而不是使用时所在的对象。 + +(2)不可以当作构造函数,也就是说,不可以使用`new`命令,否则会抛出一个错误。 + +(3)不可以使用`arguments`对象,该对象在函数体内不存在。如果要用,可以用 rest 参数代替。 + +(4)不可以使用`yield`命令,因此箭头函数不能用作 Generator 函数。 + +上面四点中,第一点尤其值得注意。`this`对象的指向是可变的,但是在箭头函数中,它是固定的。 + +```javascript +function foo() { + setTimeout(() => { + console.log('id:', this.id); + }, 100); +} + +var id = 21; + +foo.call({ id: 42 }); +// id: 42 +``` + +上面代码中,`setTimeout`的参数是一个箭头函数,这个箭头函数的定义生效是在`foo`函数生成时,而它的真正执行要等到 100 毫秒后。如果是普通函数,执行时`this`应该指向全局对象`window`,这时应该输出`21`。但是,箭头函数导致`this`总是指向函数定义生效时所在的对象(本例是`{id: 42}`),所以输出的是`42`。 + +箭头函数可以让`setTimeout`里面的`this`,绑定定义时所在的作用域,而不是指向运行时所在的作用域。下面是另一个例子。 + +```javascript +function Timer() { + this.s1 = 0; + this.s2 = 0; + // 箭头函数 + setInterval(() => this.s1++, 1000); + // 普通函数 + setInterval(function () { + this.s2++; + }, 1000); +} + +var timer = new Timer(); + +setTimeout(() => console.log('s1: ', timer.s1), 3100); +setTimeout(() => console.log('s2: ', timer.s2), 3100); +// s1: 3 +// s2: 0 +``` + +上面代码中,`Timer`函数内部设置了两个定时器,分别使用了箭头函数和普通函数。前者的`this`绑定定义时所在的作用域(即`Timer`函数),后者的`this`指向运行时所在的作用域(即全局对象)。所以,3100 毫秒之后,`timer.s1`被更新了 3 次,而`timer.s2`一次都没更新。 + +箭头函数可以让`this`指向固定化,这种特性很有利于封装回调函数。下面是一个例子,DOM 事件的回调函数封装在一个对象里面。 + +```javascript +var handler = { + id: '123456', + + init: function() { + document.addEventListener('click', + event => this.doSomething(event.type), false); + }, + + doSomething: function(type) { + console.log('Handling ' + type + ' for ' + this.id); + } +}; +``` + +上面代码的`init`方法中,使用了箭头函数,这导致这个箭头函数里面的`this`,总是指向`handler`对象。否则,回调函数运行时,`this.doSomething`这一行会报错,因为此时`this`指向`document`对象。 + +`this`指向的固定化,并不是因为箭头函数内部有绑定`this`的机制,实际原因是箭头函数根本没有自己的`this`,导致内部的`this`就是外层代码块的`this`。正是因为它没有`this`,所以也就不能用作构造函数。 + +所以,箭头函数转成 ES5 的代码如下。 + +```javascript +// ES6 +function foo() { + setTimeout(() => { + console.log('id:', this.id); + }, 100); +} + +// ES5 +function foo() { + var _this = this; + + setTimeout(function () { + console.log('id:', _this.id); + }, 100); +} +``` + +上面代码中,转换后的 ES5 版本清楚地说明了,箭头函数里面根本没有自己的`this`,而是引用外层的`this`。 + +请问下面的代码之中有几个`this`? + +```javascript +function foo() { + return () => { + return () => { + return () => { + console.log('id:', this.id); + }; + }; + }; +} + +var f = foo.call({id: 1}); + +var t1 = f.call({id: 2})()(); // id: 1 +var t2 = f().call({id: 3})(); // id: 1 +var t3 = f()().call({id: 4}); // id: 1 +``` + +上面代码之中,只有一个`this`,就是函数`foo`的`this`,所以`t1`、`t2`、`t3`都输出同样的结果。因为所有的内层函数都是箭头函数,都没有自己的`this`,它们的`this`其实都是最外层`foo`函数的`this`。 + +除了`this`,以下三个变量在箭头函数之中也是不存在的,指向外层函数的对应变量:`arguments`、`super`、`new.target`。 + +```javascript +function foo() { + setTimeout(() => { + console.log('args:', arguments); + }, 100); +} + +foo(2, 4, 6, 8) +// args: [2, 4, 6, 8] +``` + +上面代码中,箭头函数内部的变量`arguments`,其实是函数`foo`的`arguments`变量。 + +另外,由于箭头函数没有自己的`this`,所以当然也就不能用`call()`、`apply()`、`bind()`这些方法去改变`this`的指向。 + +```javascript +(function() { + return [ + (() => this.x).bind({ x: 'inner' })() + ]; +}).call({ x: 'outer' }); +// ['outer'] +``` + +上面代码中,箭头函数没有自己的`this`,所以`bind`方法无效,内部的`this`指向外部的`this`。 + +长期以来,JavaScript 语言的`this`对象一直是一个令人头痛的问题,在对象方法中使用`this`,必须非常小心。箭头函数”绑定”`this`,很大程度上解决了这个困扰。 + +### 不适用场合 + +由于箭头函数使得`this`从“动态”变成“静态”,下面两个场合不应该使用箭头函数。 + +第一个场合是定义函数的方法,且该方法内部包括`this`。 + +```javascript +const cat = { + lives: 9, + jumps: () => { + this.lives--; + } +} +``` + +上面代码中,`cat.jumps()`方法是一个箭头函数,这是错误的。调用`cat.jumps()`时,如果是普通函数,该方法内部的`this`指向`cat`;如果写成上面那样的箭头函数,使得`this`指向全局对象,因此不会得到预期结果。 + +第二个场合是需要动态`this`的时候,也不应使用箭头函数。 + +```javascript +var button = document.getElementById('press'); +button.addEventListener('click', () => { + this.classList.toggle('on'); +}); +``` + +上面代码运行时,点击按钮会报错,因为`button`的监听函数是一个箭头函数,导致里面的`this`就是全局对象。如果改成普通函数,`this`就会动态指向被点击的按钮对象。 + +另外,如果函数体很复杂,有许多行,或者函数内部有大量的读写操作,不单纯是为了计算值,这时也不应该使用箭头函数,而是要使用普通函数,这样可以提高代码可读性。 + +### 嵌套的箭头函数 + +箭头函数内部,还可以再使用箭头函数。下面是一个 ES5 语法的多重嵌套函数。 + +```javascript +function insert(value) { + return {into: function (array) { + return {after: function (afterValue) { + array.splice(array.indexOf(afterValue) + 1, 0, value); + return array; + }}; + }}; +} + +insert(2).into([1, 3]).after(1); //[1, 2, 3] +``` + +上面这个函数,可以使用箭头函数改写。 + +```javascript +let insert = (value) => ({into: (array) => ({after: (afterValue) => { + array.splice(array.indexOf(afterValue) + 1, 0, value); + return array; +}})}); + +insert(2).into([1, 3]).after(1); //[1, 2, 3] +``` + +下面是一个部署管道机制(pipeline)的例子,即前一个函数的输出是后一个函数的输入。 + +```javascript +const pipeline = (...funcs) => + val => funcs.reduce((a, b) => b(a), val); + +const plus1 = a => a + 1; +const mult2 = a => a * 2; +const addThenMult = pipeline(plus1, mult2); + +addThenMult(5) +// 12 +``` + +如果觉得上面的写法可读性比较差,也可以采用下面的写法。 + +```javascript +const plus1 = a => a + 1; +const mult2 = a => a * 2; + +mult2(plus1(5)) +// 12 +``` + +箭头函数还有一个功能,就是可以很方便地改写 λ 演算。 + +```javascript +// λ演算的写法 +fix = λf.(λx.f(λv.x(x)(v)))(λx.f(λv.x(x)(v))) + +// ES6的写法 +var fix = f => (x => f(v => x(x)(v))) + (x => f(v => x(x)(v))); +``` + +上面两种写法,几乎是一一对应的。由于 λ 演算对于计算机科学非常重要,这使得我们可以用 ES6 作为替代工具,探索计算机科学。 + +## 双冒号运算符 + +箭头函数可以绑定`this`对象,大大减少了显式绑定`this`对象的写法(`call`、`apply`、`bind`)。但是,箭头函数并不适用于所有场合,所以现在有一个[提案](https://github.com/zenparsing/es-function-bind),提出了“函数绑定”(function bind)运算符,用来取代`call`、`apply`、`bind`调用。 + +函数绑定运算符是并排的两个冒号(`::`),双冒号左边是一个对象,右边是一个函数。该运算符会自动将左边的对象,作为上下文环境(即`this`对象),绑定到右边的函数上面。 + +```javascript +foo::bar; +// 等同于 +bar.bind(foo); + +foo::bar(...arguments); +// 等同于 +bar.apply(foo, arguments); + +const hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn(obj, key) { + return obj::hasOwnProperty(key); +} +``` + +如果双冒号左边为空,右边是一个对象的方法,则等于将该方法绑定在该对象上面。 + +```javascript +var method = obj::obj.foo; +// 等同于 +var method = ::obj.foo; + +let log = ::console.log; +// 等同于 +var log = console.log.bind(console); +``` + +如果双冒号运算符的运算结果,还是一个对象,就可以采用链式写法。 + +```javascript +import { map, takeWhile, forEach } from "iterlib"; + +getPlayers() +::map(x => x.character()) +::takeWhile(x => x.strength > 100) +::forEach(x => console.log(x)); +``` + +## 尾调用优化 + +### 什么是尾调用? + +尾调用(Tail Call)是函数式编程的一个重要概念,本身非常简单,一句话就能说清楚,就是指某个函数的最后一步是调用另一个函数。 + +```javascript +function f(x){ + return g(x); +} +``` + +上面代码中,函数`f`的最后一步是调用函数`g`,这就叫尾调用。 + +以下三种情况,都不属于尾调用。 + +```javascript +// 情况一 +function f(x){ + let y = g(x); + return y; +} + +// 情况二 +function f(x){ + return g(x) + 1; +} + +// 情况三 +function f(x){ + g(x); +} +``` + +上面代码中,情况一是调用函数`g`之后,还有赋值操作,所以不属于尾调用,即使语义完全一样。情况二也属于调用后还有操作,即使写在一行内。情况三等同于下面的代码。 + +```javascript +function f(x){ + g(x); + return undefined; +} +``` + +尾调用不一定出现在函数尾部,只要是最后一步操作即可。 + +```javascript +function f(x) { + if (x > 0) { + return m(x) + } + return n(x); +} +``` + +上面代码中,函数`m`和`n`都属于尾调用,因为它们都是函数`f`的最后一步操作。 + +### 尾调用优化 + +尾调用之所以与其他调用不同,就在于它的特殊的调用位置。 + +我们知道,函数调用会在内存形成一个“调用记录”,又称“调用帧”(call frame),保存调用位置和内部变量等信息。如果在函数`A`的内部调用函数`B`,那么在`A`的调用帧上方,还会形成一个`B`的调用帧。等到`B`运行结束,将结果返回到`A`,`B`的调用帧才会消失。如果函数`B`内部还调用函数`C`,那就还有一个`C`的调用帧,以此类推。所有的调用帧,就形成一个“调用栈”(call stack)。 + +尾调用由于是函数的最后一步操作,所以不需要保留外层函数的调用帧,因为调用位置、内部变量等信息都不会再用到了,只要直接用内层函数的调用帧,取代外层函数的调用帧就可以了。 + +```javascript +function f() { + let m = 1; + let n = 2; + return g(m + n); +} +f(); + +// 等同于 +function f() { + return g(3); +} +f(); + +// 等同于 +g(3); +``` + +上面代码中,如果函数`g`不是尾调用,函数`f`就需要保存内部变量`m`和`n`的值、`g`的调用位置等信息。但由于调用`g`之后,函数`f`就结束了,所以执行到最后一步,完全可以删除`f(x)`的调用帧,只保留`g(3)`的调用帧。 + +这就叫做“尾调用优化”(Tail call optimization),即只保留内层函数的调用帧。如果所有函数都是尾调用,那么完全可以做到每次执行时,调用帧只有一项,这将大大节省内存。这就是“尾调用优化”的意义。 + +注意,只有不再用到外层函数的内部变量,内层函数的调用帧才会取代外层函数的调用帧,否则就无法进行“尾调用优化”。 + +```javascript +function addOne(a){ + var one = 1; + function inner(b){ + return b + one; + } + return inner(a); +} +``` + +上面的函数不会进行尾调用优化,因为内层函数`inner`用到了外层函数`addOne`的内部变量`one`。 + +### 尾递归 + +函数调用自身,称为递归。如果尾调用自身,就称为尾递归。 + +递归非常耗费内存,因为需要同时保存成千上百个调用帧,很容易发生“栈溢出”错误(stack overflow)。但对于尾递归来说,由于只存在一个调用帧,所以永远不会发生“栈溢出”错误。 + +```javascript +function factorial(n) { + if (n === 1) return 1; + return n * factorial(n - 1); +} + +factorial(5) // 120 +``` + +上面代码是一个阶乘函数,计算`n`的阶乘,最多需要保存`n`个调用记录,复杂度 O(n) 。 + +如果改写成尾递归,只保留一个调用记录,复杂度 O(1) 。 + +```javascript +function factorial(n, total) { + if (n === 1) return total; + return factorial(n - 1, n * total); +} + +factorial(5, 1) // 120 +``` + +还有一个比较著名的例子,就是计算 Fibonacci 数列,也能充分说明尾递归优化的重要性。 + +非尾递归的 Fibonacci 数列实现如下。 + +```javascript +function Fibonacci (n) { + if ( n <= 1 ) {return 1}; + + return Fibonacci(n - 1) + Fibonacci(n - 2); +} + +Fibonacci(10) // 89 +Fibonacci(100) // 堆栈溢出 +Fibonacci(500) // 堆栈溢出 +``` + +尾递归优化过的 Fibonacci 数列实现如下。 + +```javascript +function Fibonacci2 (n , ac1 = 1 , ac2 = 1) { + if( n <= 1 ) {return ac2}; + + return Fibonacci2 (n - 1, ac2, ac1 + ac2); +} + +Fibonacci2(100) // 573147844013817200000 +Fibonacci2(1000) // 7.0330367711422765e+208 +Fibonacci2(10000) // Infinity +``` + +由此可见,“尾调用优化”对递归操作意义重大,所以一些函数式编程语言将其写入了语言规格。ES6 亦是如此,第一次明确规定,所有 ECMAScript 的实现,都必须部署“尾调用优化”。这就是说,ES6 中只要使用尾递归,就不会发生栈溢出,相对节省内存。 + +### 递归函数的改写 + +尾递归的实现,往往需要改写递归函数,确保最后一步只调用自身。做到这一点的方法,就是把所有用到的内部变量改写成函数的参数。比如上面的例子,阶乘函数 factorial 需要用到一个中间变量`total`,那就把这个中间变量改写成函数的参数。这样做的缺点就是不太直观,第一眼很难看出来,为什么计算`5`的阶乘,需要传入两个参数`5`和`1`? + +两个方法可以解决这个问题。方法一是在尾递归函数之外,再提供一个正常形式的函数。 + +```javascript +function tailFactorial(n, total) { + if (n === 1) return total; + return tailFactorial(n - 1, n * total); +} + +function factorial(n) { + return tailFactorial(n, 1); +} + +factorial(5) // 120 +``` + +上面代码通过一个正常形式的阶乘函数`factorial`,调用尾递归函数`tailFactorial`,看起来就正常多了。 + +函数式编程有一个概念,叫做柯里化(currying),意思是将多参数的函数转换成单参数的形式。这里也可以使用柯里化。 + +```javascript +function currying(fn, n) { + return function (m) { + return fn.call(this, m, n); + }; +} + +function tailFactorial(n, total) { + if (n === 1) return total; + return tailFactorial(n - 1, n * total); +} + +const factorial = currying(tailFactorial, 1); + +factorial(5) // 120 +``` + +上面代码通过柯里化,将尾递归函数`tailFactorial`变为只接受一个参数的`factorial`。 + +第二种方法就简单多了,就是采用 ES6 的函数默认值。 + +```javascript +function factorial(n, total = 1) { + if (n === 1) return total; + return factorial(n - 1, n * total); +} + +factorial(5) // 120 +``` + +上面代码中,参数`total`有默认值`1`,所以调用时不用提供这个值。 + +总结一下,递归本质上是一种循环操作。纯粹的函数式编程语言没有循环操作命令,所有的循环都用递归实现,这就是为什么尾递归对这些语言极其重要。对于其他支持“尾调用优化”的语言(比如 Lua,ES6),只需要知道循环可以用递归代替,而一旦使用递归,就最好使用尾递归。 + +### 严格模式 + +ES6 的尾调用优化只在严格模式下开启,正常模式是无效的。 + +这是因为在正常模式下,函数内部有两个变量,可以跟踪函数的调用栈。 + +- `func.arguments`:返回调用时函数的参数。 +- `func.caller`:返回调用当前函数的那个函数。 + +尾调用优化发生时,函数的调用栈会改写,因此上面两个变量就会失真。严格模式禁用这两个变量,所以尾调用模式仅在严格模式下生效。 + +```javascript +function restricted() { + 'use strict'; + restricted.caller; // 报错 + restricted.arguments; // 报错 +} +restricted(); +``` + +### 尾递归优化的实现 + +尾递归优化只在严格模式下生效,那么正常模式下,或者那些不支持该功能的环境中,有没有办法也使用尾递归优化呢?回答是可以的,就是自己实现尾递归优化。 + +它的原理非常简单。尾递归之所以需要优化,原因是调用栈太多,造成溢出,那么只要减少调用栈,就不会溢出。怎么做可以减少调用栈呢?就是采用“循环”换掉“递归”。 + +下面是一个正常的递归函数。 + +```javascript +function sum(x, y) { + if (y > 0) { + return sum(x + 1, y - 1); + } else { + return x; + } +} + +sum(1, 100000) +// Uncaught RangeError: Maximum call stack size exceeded(…) +``` + +上面代码中,`sum`是一个递归函数,参数`x`是需要累加的值,参数`y`控制递归次数。一旦指定`sum`递归 100000 次,就会报错,提示超出调用栈的最大次数。 + +蹦床函数(trampoline)可以将递归执行转为循环执行。 + +```javascript +function trampoline(f) { + while (f && f instanceof Function) { + f = f(); + } + return f; +} +``` + +上面就是蹦床函数的一个实现,它接受一个函数`f`作为参数。只要`f`执行后返回一个函数,就继续执行。注意,这里是返回一个函数,然后执行该函数,而不是函数里面调用函数,这样就避免了递归执行,从而就消除了调用栈过大的问题。 + +然后,要做的就是将原来的递归函数,改写为每一步返回另一个函数。 + +```javascript +function sum(x, y) { + if (y > 0) { + return sum.bind(null, x + 1, y - 1); + } else { + return x; + } +} +``` + +上面代码中,`sum`函数的每次执行,都会返回自身的另一个版本。 + +现在,使用蹦床函数执行`sum`,就不会发生调用栈溢出。 + +```javascript +trampoline(sum(1, 100000)) +// 100001 +``` + +蹦床函数并不是真正的尾递归优化,下面的实现才是。 + +```javascript +function tco(f) { + var value; + var active = false; + var accumulated = []; + + return function accumulator() { + accumulated.push(arguments); + if (!active) { + active = true; + while (accumulated.length) { + value = f.apply(this, accumulated.shift()); + } + active = false; + return value; + } + }; +} + +var sum = tco(function(x, y) { + if (y > 0) { + return sum(x + 1, y - 1) + } + else { + return x + } +}); + +sum(1, 100000) +// 100001 +``` + +上面代码中,`tco`函数是尾递归优化的实现,它的奥妙就在于状态变量`active`。默认情况下,这个变量是不激活的。一旦进入尾递归优化的过程,这个变量就激活了。然后,每一轮递归`sum`返回的都是`undefined`,所以就避免了递归执行;而`accumulated`数组存放每一轮`sum`执行的参数,总是有值的,这就保证了`accumulator`函数内部的`while`循环总是会执行。这样就很巧妙地将“递归”改成了“循环”,而后一轮的参数会取代前一轮的参数,保证了调用栈只有一层。 + +## 函数参数的尾逗号 + +ES2017 [允许](https://github.com/jeffmo/es-trailing-function-commas)函数的最后一个参数有尾逗号(trailing comma)。 + +此前,函数定义和调用时,都不允许最后一个参数后面出现逗号。 + +```javascript +function clownsEverywhere( + param1, + param2 +) { /* ... */ } + +clownsEverywhere( + 'foo', + 'bar' +); +``` + +上面代码中,如果在`param2`或`bar`后面加一个逗号,就会报错。 + +如果像上面这样,将参数写成多行(即每个参数占据一行),以后修改代码的时候,想为函数`clownsEverywhere`添加第三个参数,或者调整参数的次序,就势必要在原来最后一个参数后面添加一个逗号。这对于版本管理系统来说,就会显示添加逗号的那一行也发生了变动。这看上去有点冗余,因此新的语法允许定义和调用时,尾部直接有一个逗号。 + +```javascript +function clownsEverywhere( + param1, + param2, +) { /* ... */ } + +clownsEverywhere( + 'foo', + 'bar', +); +``` + +这样的规定也使得,函数参数与数组和对象的尾逗号规则,保持一致了。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator-async.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator-async.md" old mode 100644 new mode 100755 similarity index 88% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator-async.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator-async.md" index 79939971c..0c96df89b --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/generator-async.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator-async.md" @@ -1,6 +1,6 @@ # Generator 函数的异步应用 -异步编程对 JavaScript 语言太重要。Javascript 语言的执行环境是“单线程”的,如果没有异步编程,根本没法用,非卡死不可。本章主要介绍 Generator 函数如何完成异步操作。 +异步编程对 JavaScript 语言太重要。JavaScript 语言的执行环境是“单线程”的,如果没有异步编程,根本没法用,非卡死不可。本章主要介绍 Generator 函数如何完成异步操作。 ## 传统方法 @@ -102,7 +102,7 @@ Promise 的最大问题是代码冗余,原来的任务被 Promise 包装了一 举例来说,读取文件的协程写法如下。 ```javascript -function *asyncJob() { +function* asyncJob() { // ...其他代码 var f = yield readFile(fileA); // ...其他代码 @@ -138,7 +138,7 @@ g.next() // { value: undefined, done: true } Generator 函数可以暂停执行和恢复执行,这是它能封装异步任务的根本原因。除此之外,它还有两个特性,使它可以作为异步编程的完整解决方案:函数体内外的数据交换和错误处理机制。 -`next`法返回值的value属性,是 Generator 函数向外输出数据;`next`方法还可以接受参数,向 Generator 函数体内输入数据。 +`next`返回值的 value 属性,是 Generator 函数向外输出数据;`next`方法还可以接受参数,向 Generator 函数体内输入数据。 ```javascript function* gen(x){ @@ -151,7 +151,7 @@ g.next() // { value: 3, done: false } g.next(2) // { value: 2, done: true } ``` -上面代码中,第一`next`方法的`value`属性,返回表达式`x + 2`的值`3`。第二个`next`方法带有参数`2`,这个参数可以传入 Generator 函数,作为上个阶段异步任务的返回结果,被函数体内的变量`y`接收。因此,这一步的`value`属性,返回的就是`2`(变量`y`的值)。 +上面代码中,第一个`next`方法的`value`属性,返回表达式`x + 2`的值`3`。第二个`next`方法带有参数`2`,这个参数可以传入 Generator 函数,作为上个阶段异步任务的返回结果,被函数体内的变量`y`接收。因此,这一步的`value`属性,返回的就是`2`(变量`y`的值)。 Generator 函数内部还可以部署错误处理代码,捕获函数体外抛出的错误。 @@ -212,14 +212,14 @@ Thunk 函数是自动执行 Generator 函数的一种方法。 ### 参数的求值策略 -Thunk 函数早在上个世纪60年代就诞生了。 +Thunk 函数早在上个世纪 60 年代就诞生了。 那时,编程语言刚刚起步,计算机学家还在研究,编译器怎么写比较好。一个争论的焦点是"求值策略",即函数的参数到底应该何时求值。 ```javascript var x = 1; -function f(m){ +function f(m) { return m * 2; } @@ -228,7 +228,7 @@ f(x + 5) 上面代码先定义函数`f`,然后向它传入表达式`x + 5`。请问,这个表达式应该何时求值? -一种意见是"传值调用"(call by value),即在进入函数体之前,就计算`x + 5`的值(等于6),再将这个值传入函数`f`。C语言就采用这种策略。 +一种意见是"传值调用"(call by value),即在进入函数体之前,就计算`x + 5`的值(等于 6),再将这个值传入函数`f`。C 语言就采用这种策略。 ```javascript f(x + 5) @@ -280,7 +280,7 @@ function f(thunk) { } ``` -上面代码中,函数f的参数`x + 5`被一个函数替换了。凡是用到原参数的地方,对`Thunk`函数求值即可。 +上面代码中,函数 f 的参数`x + 5`被一个函数替换了。凡是用到原参数的地方,对`Thunk`函数求值即可。 这就是 Thunk 函数的定义,它是“传名调用”的一种实现策略,用来替换某个表达式。 @@ -320,7 +320,7 @@ var Thunk = function(fn){ }; // ES6版本 -var Thunk = function(fn) { +const Thunk = function(fn) { return function (...args) { return function (callback) { return fn.call(this, ...args, callback); @@ -342,10 +342,9 @@ readFileThunk(fileA)(callback); function f(a, cb) { cb(a); } -let ft = Thunk(f); +const ft = Thunk(f); -let log = console.log.bind(console); -ft(1)(log) // 1 +ft(1)(console.log) // 1 ``` ### Thunkify 模块 @@ -507,10 +506,10 @@ run(g); ```javascript var g = function* (){ - var f1 = yield readFile('fileA'); - var f2 = yield readFile('fileB'); + var f1 = yield readFileThunk('fileA'); + var f2 = yield readFileThunk('fileB'); // ... - var fn = yield readFile('fileN'); + var fn = yield readFileThunk('fileN'); }; run(g); @@ -524,7 +523,7 @@ Thunk 函数并不是 Generator 函数自动执行的唯一方案。因为自动 ### 基本用法 -[co 模块](https://github.com/tj/co)是著名程序员 TJ Holowaychuk 于2013年6月发布的一个小工具,用于 Generator 函数的自动执行。 +[co 模块](https://github.com/tj/co)是著名程序员 TJ Holowaychuk 于 2013 年 6 月发布的一个小工具,用于 Generator 函数的自动执行。 下面是一个 Generator 函数,用于依次读取两个文件。 @@ -544,9 +543,9 @@ var co = require('co'); co(gen); ``` -上面代码中,Generator函数只要传入`co`函数,就会自动执行。 +上面代码中,Generator 函数只要传入`co`函数,就会自动执行。 -`co`函数返回一个Promise对象,因此可以用`then`方法添加回调函数。 +`co`函数返回一个`Promise`对象,因此可以用`then`方法添加回调函数。 ```javascript co(gen).then(function (){ @@ -568,7 +567,7 @@ co(gen).then(function (){ (2)Promise 对象。将异步操作包装成 Promise 对象,用`then`方法交回执行权。 -co 模块其实就是将两种自动执行器(Thunk 函数和 Promise 对象),包装成一个模块。使用 co 的前提条件是,Generator 函数的`yield`命令后面,只能是 Thunk 函数或 Promise 对象。如果数组或对象的成员,全部都是 Promise 对象,也是可以的,详见后文的例子。(4.0 版以后,`yield`命令后面只能是 Promise 对象。) +co 模块其实就是将两种自动执行器(Thunk 函数和 Promise 对象),包装成一个模块。使用 co 的前提条件是,Generator 函数的`yield`命令后面,只能是 Thunk 函数或 Promise 对象。如果数组或对象的成员,全部都是 Promise 对象,也可以使用 co,详见后文的例子。 上一节已经介绍了基于 Thunk 函数的自动执行器。下面来看,基于 Promise 对象的自动执行器。这是理解 co 模块必须的。 @@ -752,3 +751,40 @@ function* somethingAsync(x) { 上面的代码允许并发三个`somethingAsync`异步操作,等到它们全部完成,才会进行下一步。 +### 实例:处理 Stream + +Node 提供 Stream 模式读写数据,特点是一次只处理数据的一部分,数据分成一块块依次处理,就好像“数据流”一样。这对于处理大规模数据非常有利。Stream 模式使用 EventEmitter API,会释放三个事件。 + +- `data`事件:下一块数据块已经准备好了。 +- `end`事件:整个“数据流”处理完了。 +- `error`事件:发生错误。 + +使用`Promise.race()`函数,可以判断这三个事件之中哪一个最先发生,只有当`data`事件最先发生时,才进入下一个数据块的处理。从而,我们可以通过一个`while`循环,完成所有数据的读取。 + +```javascript +const co = require('co'); +const fs = require('fs'); + +const stream = fs.createReadStream('./les_miserables.txt'); +let valjeanCount = 0; + +co(function*() { + while(true) { + const res = yield Promise.race([ + new Promise(resolve => stream.once('data', resolve)), + new Promise(resolve => stream.once('end', resolve)), + new Promise((resolve, reject) => stream.once('error', reject)) + ]); + if (!res) { + break; + } + stream.removeAllListeners('data'); + stream.removeAllListeners('end'); + stream.removeAllListeners('error'); + valjeanCount += (res.toString().match(/valjean/ig) || []).length; + } + console.log('count:', valjeanCount); // count: 1120 +}); +``` + +上面代码采用 Stream 模式读取《悲惨世界》的文本文件,对于每个数据块都使用`stream.once`方法,在`data`、`end`、`error`三个事件上添加一次性回调函数。变量`res`只有在`data`事件发生时才有值,然后累加每个数据块之中`valjean`这个词出现的次数。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator.md" new file mode 100755 index 000000000..7b659d97d --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/generator.md" @@ -0,0 +1,1522 @@ +# Generator 函数的语法 + +## 简介 + +### 基本概念 + +Generator 函数是 ES6 提供的一种异步编程解决方案,语法行为与传统函数完全不同。本章详细介绍 Generator 函数的语法和 API,它的异步编程应用请看《Generator 函数的异步应用》一章。 + +Generator 函数有多种理解角度。语法上,首先可以把它理解成,Generator 函数是一个状态机,封装了多个内部状态。 + +执行 Generator 函数会返回一个遍历器对象,也就是说,Generator 函数除了状态机,还是一个遍历器对象生成函数。返回的遍历器对象,可以依次遍历 Generator 函数内部的每一个状态。 + +形式上,Generator 函数是一个普通函数,但是有两个特征。一是,`function`关键字与函数名之间有一个星号;二是,函数体内部使用`yield`表达式,定义不同的内部状态(`yield`在英语里的意思就是“产出”)。 + +```javascript +function* helloWorldGenerator() { + yield 'hello'; + yield 'world'; + return 'ending'; +} + +var hw = helloWorldGenerator(); +``` + +上面代码定义了一个 Generator 函数`helloWorldGenerator`,它内部有两个`yield`表达式(`hello`和`world`),即该函数有三个状态:hello,world 和 return 语句(结束执行)。 + +然后,Generator 函数的调用方法与普通函数一样,也是在函数名后面加上一对圆括号。不同的是,调用 Generator 函数后,该函数并不执行,返回的也不是函数运行结果,而是一个指向内部状态的指针对象,也就是上一章介绍的遍历器对象(Iterator Object)。 + +下一步,必须调用遍历器对象的`next`方法,使得指针移向下一个状态。也就是说,每次调用`next`方法,内部指针就从函数头部或上一次停下来的地方开始执行,直到遇到下一个`yield`表达式(或`return`语句)为止。换言之,Generator 函数是分段执行的,`yield`表达式是暂停执行的标记,而`next`方法可以恢复执行。 + +```javascript +hw.next() +// { value: 'hello', done: false } + +hw.next() +// { value: 'world', done: false } + +hw.next() +// { value: 'ending', done: true } + +hw.next() +// { value: undefined, done: true } +``` + +上面代码一共调用了四次`next`方法。 + +第一次调用,Generator 函数开始执行,直到遇到第一个`yield`表达式为止。`next`方法返回一个对象,它的`value`属性就是当前`yield`表达式的值`hello`,`done`属性的值`false`,表示遍历还没有结束。 + +第二次调用,Generator 函数从上次`yield`表达式停下的地方,一直执行到下一个`yield`表达式。`next`方法返回的对象的`value`属性就是当前`yield`表达式的值`world`,`done`属性的值`false`,表示遍历还没有结束。 + +第三次调用,Generator 函数从上次`yield`表达式停下的地方,一直执行到`return`语句(如果没有`return`语句,就执行到函数结束)。`next`方法返回的对象的`value`属性,就是紧跟在`return`语句后面的表达式的值(如果没有`return`语句,则`value`属性的值为`undefined`),`done`属性的值`true`,表示遍历已经结束。 + +第四次调用,此时 Generator 函数已经运行完毕,`next`方法返回对象的`value`属性为`undefined`,`done`属性为`true`。以后再调用`next`方法,返回的都是这个值。 + +总结一下,调用 Generator 函数,返回一个遍历器对象,代表 Generator 函数的内部指针。以后,每次调用遍历器对象的`next`方法,就会返回一个有着`value`和`done`两个属性的对象。`value`属性表示当前的内部状态的值,是`yield`表达式后面那个表达式的值;`done`属性是一个布尔值,表示是否遍历结束。 + +ES6 没有规定,`function`关键字与函数名之间的星号,写在哪个位置。这导致下面的写法都能通过。 + +```javascript +function * foo(x, y) { ··· } +function *foo(x, y) { ··· } +function* foo(x, y) { ··· } +function*foo(x, y) { ··· } +``` + +由于 Generator 函数仍然是普通函数,所以一般的写法是上面的第三种,即星号紧跟在`function`关键字后面。本书也采用这种写法。 + +### yield 表达式 + +由于 Generator 函数返回的遍历器对象,只有调用`next`方法才会遍历下一个内部状态,所以其实提供了一种可以暂停执行的函数。`yield`表达式就是暂停标志。 + +遍历器对象的`next`方法的运行逻辑如下。 + +(1)遇到`yield`表达式,就暂停执行后面的操作,并将紧跟在`yield`后面的那个表达式的值,作为返回的对象的`value`属性值。 + +(2)下一次调用`next`方法时,再继续往下执行,直到遇到下一个`yield`表达式。 + +(3)如果没有再遇到新的`yield`表达式,就一直运行到函数结束,直到`return`语句为止,并将`return`语句后面的表达式的值,作为返回的对象的`value`属性值。 + +(4)如果该函数没有`return`语句,则返回的对象的`value`属性值为`undefined`。 + +需要注意的是,`yield`表达式后面的表达式,只有当调用`next`方法、内部指针指向该语句时才会执行,因此等于为 JavaScript 提供了手动的“惰性求值”(Lazy Evaluation)的语法功能。 + +```javascript +function* gen() { + yield 123 + 456; +} +``` + +上面代码中,`yield`后面的表达式`123 + 456`,不会立即求值,只会在`next`方法将指针移到这一句时,才会求值。 + +`yield`表达式与`return`语句既有相似之处,也有区别。相似之处在于,都能返回紧跟在语句后面的那个表达式的值。区别在于每次遇到`yield`,函数暂停执行,下一次再从该位置继续向后执行,而`return`语句不具备位置记忆的功能。一个函数里面,只能执行一次(或者说一个)`return`语句,但是可以执行多次(或者说多个)`yield`表达式。正常函数只能返回一个值,因为只能执行一次`return`;Generator 函数可以返回一系列的值,因为可以有任意多个`yield`。从另一个角度看,也可以说 Generator 生成了一系列的值,这也就是它的名称的来历(英语中,generator 这个词是“生成器”的意思)。 + +Generator 函数可以不用`yield`表达式,这时就变成了一个单纯的暂缓执行函数。 + +```javascript +function* f() { + console.log('执行了!') +} + +var generator = f(); + +setTimeout(function () { + generator.next() +}, 2000); +``` + +上面代码中,函数`f`如果是普通函数,在为变量`generator`赋值时就会执行。但是,函数`f`是一个 Generator 函数,就变成只有调用`next`方法时,函数`f`才会执行。 + +另外需要注意,`yield`表达式只能用在 Generator 函数里面,用在其他地方都会报错。 + +```javascript +(function (){ + yield 1; +})() +// SyntaxError: Unexpected number +``` + +上面代码在一个普通函数中使用`yield`表达式,结果产生一个句法错误。 + +下面是另外一个例子。 + +```javascript +var arr = [1, [[2, 3], 4], [5, 6]]; + +var flat = function* (a) { + a.forEach(function (item) { + if (typeof item !== 'number') { + yield* flat(item); + } else { + yield item; + } + }); +}; + +for (var f of flat(arr)){ + console.log(f); +} +``` + +上面代码也会产生句法错误,因为`forEach`方法的参数是一个普通函数,但是在里面使用了`yield`表达式(这个函数里面还使用了`yield*`表达式,详细介绍见后文)。一种修改方法是改用`for`循环。 + +```javascript +var arr = [1, [[2, 3], 4], [5, 6]]; + +var flat = function* (a) { + var length = a.length; + for (var i = 0; i < length; i++) { + var item = a[i]; + if (typeof item !== 'number') { + yield* flat(item); + } else { + yield item; + } + } +}; + +for (var f of flat(arr)) { + console.log(f); +} +// 1, 2, 3, 4, 5, 6 +``` + +另外,`yield`表达式如果用在另一个表达式之中,必须放在圆括号里面。 + +```javascript +function* demo() { + console.log('Hello' + yield); // SyntaxError + console.log('Hello' + yield 123); // SyntaxError + + console.log('Hello' + (yield)); // OK + console.log('Hello' + (yield 123)); // OK +} +``` + +`yield`表达式用作函数参数或放在赋值表达式的右边,可以不加括号。 + +```javascript +function* demo() { + foo(yield 'a', yield 'b'); // OK + let input = yield; // OK +} +``` + +### 与 Iterator 接口的关系 + +上一章说过,任意一个对象的`Symbol.iterator`方法,等于该对象的遍历器生成函数,调用该函数会返回该对象的一个遍历器对象。 + +由于 Generator 函数就是遍历器生成函数,因此可以把 Generator 赋值给对象的`Symbol.iterator`属性,从而使得该对象具有 Iterator 接口。 + +```javascript +var myIterable = {}; +myIterable[Symbol.iterator] = function* () { + yield 1; + yield 2; + yield 3; +}; + +[...myIterable] // [1, 2, 3] +``` + +上面代码中,Generator 函数赋值给`Symbol.iterator`属性,从而使得`myIterable`对象具有了 Iterator 接口,可以被`...`运算符遍历了。 + +Generator 函数执行后,返回一个遍历器对象。该对象本身也具有`Symbol.iterator`属性,执行后返回自身。 + +```javascript +function* gen(){ + // some code +} + +var g = gen(); + +g[Symbol.iterator]() === g +// true +``` + +上面代码中,`gen`是一个 Generator 函数,调用它会生成一个遍历器对象`g`。它的`Symbol.iterator`属性,也是一个遍历器对象生成函数,执行后返回它自己。 + +## next 方法的参数 + +`yield`表达式本身没有返回值,或者说总是返回`undefined`。`next`方法可以带一个参数,该参数就会被当作上一个`yield`表达式的返回值。 + +```javascript +function* f() { + for(var i = 0; true; i++) { + var reset = yield i; + if(reset) { i = -1; } + } +} + +var g = f(); + +g.next() // { value: 0, done: false } +g.next() // { value: 1, done: false } +g.next(true) // { value: 0, done: false } +``` + +上面代码先定义了一个可以无限运行的 Generator 函数`f`,如果`next`方法没有参数,每次运行到`yield`表达式,变量`reset`的值总是`undefined`。当`next`方法带一个参数`true`时,变量`reset`就被重置为这个参数(即`true`),因此`i`会等于`-1`,下一轮循环就会从`-1`开始递增。 + +这个功能有很重要的语法意义。Generator 函数从暂停状态到恢复运行,它的上下文状态(context)是不变的。通过`next`方法的参数,就有办法在 Generator 函数开始运行之后,继续向函数体内部注入值。也就是说,可以在 Generator 函数运行的不同阶段,从外部向内部注入不同的值,从而调整函数行为。 + +再看一个例子。 + +```javascript +function* foo(x) { + var y = 2 * (yield (x + 1)); + var z = yield (y / 3); + return (x + y + z); +} + +var a = foo(5); +a.next() // Object{value:6, done:false} +a.next() // Object{value:NaN, done:false} +a.next() // Object{value:NaN, done:true} + +var b = foo(5); +b.next() // { value:6, done:false } +b.next(12) // { value:8, done:false } +b.next(13) // { value:42, done:true } +``` + +上面代码中,第二次运行`next`方法的时候不带参数,导致 y 的值等于`2 * undefined`(即`NaN`),除以 3 以后还是`NaN`,因此返回对象的`value`属性也等于`NaN`。第三次运行`Next`方法的时候不带参数,所以`z`等于`undefined`,返回对象的`value`属性等于`5 + NaN + undefined`,即`NaN`。 + +如果向`next`方法提供参数,返回结果就完全不一样了。上面代码第一次调用`b`的`next`方法时,返回`x+1`的值`6`;第二次调用`next`方法,将上一次`yield`表达式的值设为`12`,因此`y`等于`24`,返回`y / 3`的值`8`;第三次调用`next`方法,将上一次`yield`表达式的值设为`13`,因此`z`等于`13`,这时`x`等于`5`,`y`等于`24`,所以`return`语句的值等于`42`。 + +注意,由于`next`方法的参数表示上一个`yield`表达式的返回值,所以在第一次使用`next`方法时,传递参数是无效的。V8 引擎直接忽略第一次使用`next`方法时的参数,只有从第二次使用`next`方法开始,参数才是有效的。从语义上讲,第一个`next`方法用来启动遍历器对象,所以不用带有参数。 + +再看一个通过`next`方法的参数,向 Generator 函数内部输入值的例子。 + +```javascript +function* dataConsumer() { + console.log('Started'); + console.log(`1. ${yield}`); + console.log(`2. ${yield}`); + return 'result'; +} + +let genObj = dataConsumer(); +genObj.next(); +// Started +genObj.next('a') +// 1. a +genObj.next('b') +// 2. b +``` + +上面代码是一个很直观的例子,每次通过`next`方法向 Generator 函数输入值,然后打印出来。 + +如果想要第一次调用`next`方法时,就能够输入值,可以在 Generator 函数外面再包一层。 + +```javascript +function wrapper(generatorFunction) { + return function (...args) { + let generatorObject = generatorFunction(...args); + generatorObject.next(); + return generatorObject; + }; +} + +const wrapped = wrapper(function* () { + console.log(`First input: ${yield}`); + return 'DONE'; +}); + +wrapped().next('hello!') +// First input: hello! +``` + +上面代码中,Generator 函数如果不用`wrapper`先包一层,是无法第一次调用`next`方法,就输入参数的。 + +## for...of 循环 + +`for...of`循环可以自动遍历 Generator 函数运行时生成的`Iterator`对象,且此时不再需要调用`next`方法。 + +```javascript +function* foo() { + yield 1; + yield 2; + yield 3; + yield 4; + yield 5; + return 6; +} + +for (let v of foo()) { + console.log(v); +} +// 1 2 3 4 5 +``` + +上面代码使用`for...of`循环,依次显示 5 个`yield`表达式的值。这里需要注意,一旦`next`方法的返回对象的`done`属性为`true`,`for...of`循环就会中止,且不包含该返回对象,所以上面代码的`return`语句返回的`6`,不包括在`for...of`循环之中。 + +下面是一个利用 Generator 函数和`for...of`循环,实现斐波那契数列的例子。 + +```javascript +function* fibonacci() { + let [prev, curr] = [0, 1]; + for (;;) { + yield curr; + [prev, curr] = [curr, prev + curr]; + } +} + +for (let n of fibonacci()) { + if (n > 1000) break; + console.log(n); +} +``` + +从上面代码可见,使用`for...of`语句时不需要使用`next`方法。 + +利用`for...of`循环,可以写出遍历任意对象(object)的方法。原生的 JavaScript 对象没有遍历接口,无法使用`for...of`循环,通过 Generator 函数为它加上这个接口,就可以用了。 + +```javascript +function* objectEntries(obj) { + let propKeys = Reflect.ownKeys(obj); + + for (let propKey of propKeys) { + yield [propKey, obj[propKey]]; + } +} + +let jane = { first: 'Jane', last: 'Doe' }; + +for (let [key, value] of objectEntries(jane)) { + console.log(`${key}: ${value}`); +} +// first: Jane +// last: Doe +``` + +上面代码中,对象`jane`原生不具备 Iterator 接口,无法用`for...of`遍历。这时,我们通过 Generator 函数`objectEntries`为它加上遍历器接口,就可以用`for...of`遍历了。加上遍历器接口的另一种写法是,将 Generator 函数加到对象的`Symbol.iterator`属性上面。 + +```javascript +function* objectEntries() { + let propKeys = Object.keys(this); + + for (let propKey of propKeys) { + yield [propKey, this[propKey]]; + } +} + +let jane = { first: 'Jane', last: 'Doe' }; + +jane[Symbol.iterator] = objectEntries; + +for (let [key, value] of jane) { + console.log(`${key}: ${value}`); +} +// first: Jane +// last: Doe +``` + +除了`for...of`循环以外,扩展运算符(`...`)、解构赋值和`Array.from`方法内部调用的,都是遍历器接口。这意味着,它们都可以将 Generator 函数返回的 Iterator 对象,作为参数。 + +```javascript +function* numbers () { + yield 1 + yield 2 + return 3 + yield 4 +} + +// 扩展运算符 +[...numbers()] // [1, 2] + +// Array.from 方法 +Array.from(numbers()) // [1, 2] + +// 解构赋值 +let [x, y] = numbers(); +x // 1 +y // 2 + +// for...of 循环 +for (let n of numbers()) { + console.log(n) +} +// 1 +// 2 +``` + +## Generator.prototype.throw() + +Generator 函数返回的遍历器对象,都有一个`throw`方法,可以在函数体外抛出错误,然后在 Generator 函数体内捕获。 + +```javascript +var g = function* () { + try { + yield; + } catch (e) { + console.log('内部捕获', e); + } +}; + +var i = g(); +i.next(); + +try { + i.throw('a'); + i.throw('b'); +} catch (e) { + console.log('外部捕获', e); +} +// 内部捕获 a +// 外部捕获 b +``` + +上面代码中,遍历器对象`i`连续抛出两个错误。第一个错误被 Generator 函数体内的`catch`语句捕获。`i`第二次抛出错误,由于 Generator 函数内部的`catch`语句已经执行过了,不会再捕捉到这个错误了,所以这个错误就被抛出了 Generator 函数体,被函数体外的`catch`语句捕获。 + +`throw`方法可以接受一个参数,该参数会被`catch`语句接收,建议抛出`Error`对象的实例。 + +```javascript +var g = function* () { + try { + yield; + } catch (e) { + console.log(e); + } +}; + +var i = g(); +i.next(); +i.throw(new Error('出错了!')); +// Error: 出错了!(…) +``` + +注意,不要混淆遍历器对象的`throw`方法和全局的`throw`命令。上面代码的错误,是用遍历器对象的`throw`方法抛出的,而不是用`throw`命令抛出的。后者只能被函数体外的`catch`语句捕获。 + +```javascript +var g = function* () { + while (true) { + try { + yield; + } catch (e) { + if (e != 'a') throw e; + console.log('内部捕获', e); + } + } +}; + +var i = g(); +i.next(); + +try { + throw new Error('a'); + throw new Error('b'); +} catch (e) { + console.log('外部捕获', e); +} +// 外部捕获 [Error: a] +``` + +上面代码之所以只捕获了`a`,是因为函数体外的`catch`语句块,捕获了抛出的`a`错误以后,就不会再继续`try`代码块里面剩余的语句了。 + +如果 Generator 函数内部没有部署`try...catch`代码块,那么`throw`方法抛出的错误,将被外部`try...catch`代码块捕获。 + +```javascript +var g = function* () { + while (true) { + yield; + console.log('内部捕获', e); + } +}; + +var i = g(); +i.next(); + +try { + i.throw('a'); + i.throw('b'); +} catch (e) { + console.log('外部捕获', e); +} +// 外部捕获 a +``` + +上面代码中,Generator 函数`g`内部没有部署`try...catch`代码块,所以抛出的错误直接被外部`catch`代码块捕获。 + +如果 Generator 函数内部和外部,都没有部署`try...catch`代码块,那么程序将报错,直接中断执行。 + +```javascript +var gen = function* gen(){ + yield console.log('hello'); + yield console.log('world'); +} + +var g = gen(); +g.next(); +g.throw(); +// hello +// Uncaught undefined +``` + +上面代码中,`g.throw`抛出错误以后,没有任何`try...catch`代码块可以捕获这个错误,导致程序报错,中断执行。 + +`throw`方法抛出的错误要被内部捕获,前提是必须至少执行过一次`next`方法。 + +```javascript +function* gen() { + try { + yield 1; + } catch (e) { + console.log('内部捕获'); + } +} + +var g = gen(); +g.throw(1); +// Uncaught 1 +``` + +上面代码中,`g.throw(1)`执行时,`next`方法一次都没有执行过。这时,抛出的错误不会被内部捕获,而是直接在外部抛出,导致程序出错。这种行为其实很好理解,因为第一次执行`next`方法,等同于启动执行 Generator 函数的内部代码,否则 Generator 函数还没有开始执行,这时`throw`方法抛错只可能抛出在函数外部。 + +`throw`方法被捕获以后,会附带执行下一条`yield`表达式。也就是说,会附带执行一次`next`方法。 + +```javascript +var gen = function* gen(){ + try { + yield console.log('a'); + } catch (e) { + // ... + } + yield console.log('b'); + yield console.log('c'); +} + +var g = gen(); +g.next() // a +g.throw() // b +g.next() // c +``` + +上面代码中,`g.throw`方法被捕获以后,自动执行了一次`next`方法,所以会打印`b`。另外,也可以看到,只要 Generator 函数内部部署了`try...catch`代码块,那么遍历器的`throw`方法抛出的错误,不影响下一次遍历。 + +另外,`throw`命令与`g.throw`方法是无关的,两者互不影响。 + +```javascript +var gen = function* gen(){ + yield console.log('hello'); + yield console.log('world'); +} + +var g = gen(); +g.next(); + +try { + throw new Error(); +} catch (e) { + g.next(); +} +// hello +// world +``` + +上面代码中,`throw`命令抛出的错误不会影响到遍历器的状态,所以两次执行`next`方法,都进行了正确的操作。 + +这种函数体内捕获错误的机制,大大方便了对错误的处理。多个`yield`表达式,可以只用一个`try...catch`代码块来捕获错误。如果使用回调函数的写法,想要捕获多个错误,就不得不为每个函数内部写一个错误处理语句,现在只在 Generator 函数内部写一次`catch`语句就可以了。 + +Generator 函数体外抛出的错误,可以在函数体内捕获;反过来,Generator 函数体内抛出的错误,也可以被函数体外的`catch`捕获。 + +```javascript +function* foo() { + var x = yield 3; + var y = x.toUpperCase(); + yield y; +} + +var it = foo(); + +it.next(); // { value:3, done:false } + +try { + it.next(42); +} catch (err) { + console.log(err); +} +``` + +上面代码中,第二个`next`方法向函数体内传入一个参数 42,数值是没有`toUpperCase`方法的,所以会抛出一个 TypeError 错误,被函数体外的`catch`捕获。 + +一旦 Generator 执行过程中抛出错误,且没有被内部捕获,就不会再执行下去了。如果此后还调用`next`方法,将返回一个`value`属性等于`undefined`、`done`属性等于`true`的对象,即 JavaScript 引擎认为这个 Generator 已经运行结束了。 + +```javascript +function* g() { + yield 1; + console.log('throwing an exception'); + throw new Error('generator broke!'); + yield 2; + yield 3; +} + +function log(generator) { + var v; + console.log('starting generator'); + try { + v = generator.next(); + console.log('第一次运行next方法', v); + } catch (err) { + console.log('捕捉错误', v); + } + try { + v = generator.next(); + console.log('第二次运行next方法', v); + } catch (err) { + console.log('捕捉错误', v); + } + try { + v = generator.next(); + console.log('第三次运行next方法', v); + } catch (err) { + console.log('捕捉错误', v); + } + console.log('caller done'); +} + +log(g()); +// starting generator +// 第一次运行next方法 { value: 1, done: false } +// throwing an exception +// 捕捉错误 { value: 1, done: false } +// 第三次运行next方法 { value: undefined, done: true } +// caller done +``` + +上面代码一共三次运行`next`方法,第二次运行的时候会抛出错误,然后第三次运行的时候,Generator 函数就已经结束了,不再执行下去了。 + +## Generator.prototype.return() + +Generator 函数返回的遍历器对象,还有一个`return`方法,可以返回给定的值,并且终结遍历 Generator 函数。 + +```javascript +function* gen() { + yield 1; + yield 2; + yield 3; +} + +var g = gen(); + +g.next() // { value: 1, done: false } +g.return('foo') // { value: "foo", done: true } +g.next() // { value: undefined, done: true } +``` + +上面代码中,遍历器对象`g`调用`return`方法后,返回值的`value`属性就是`return`方法的参数`foo`。并且,Generator 函数的遍历就终止了,返回值的`done`属性为`true`,以后再调用`next`方法,`done`属性总是返回`true`。 + +如果`return`方法调用时,不提供参数,则返回值的`value`属性为`undefined`。 + +```javascript +function* gen() { + yield 1; + yield 2; + yield 3; +} + +var g = gen(); + +g.next() // { value: 1, done: false } +g.return() // { value: undefined, done: true } +``` + +如果 Generator 函数内部有`try...finally`代码块,且正在执行`try`代码块,那么`return`方法会推迟到`finally`代码块执行完再执行。 + +```javascript +function* numbers () { + yield 1; + try { + yield 2; + yield 3; + } finally { + yield 4; + yield 5; + } + yield 6; +} +var g = numbers(); +g.next() // { value: 1, done: false } +g.next() // { value: 2, done: false } +g.return(7) // { value: 4, done: false } +g.next() // { value: 5, done: false } +g.next() // { value: 7, done: true } +``` + +上面代码中,调用`return`方法后,就开始执行`finally`代码块,然后等到`finally`代码块执行完,再执行`return`方法。 + +## next()、throw()、return() 的共同点 + +`next()`、`throw()`、`return()`这三个方法本质上是同一件事,可以放在一起理解。它们的作用都是让 Generator 函数恢复执行,并且使用不同的语句替换`yield`表达式。 + +`next()`是将`yield`表达式替换成一个值。 + +```javascript +const g = function* (x, y) { + let result = yield x + y; + return result; +}; + +const gen = g(1, 2); +gen.next(); // Object {value: 3, done: false} + +gen.next(1); // Object {value: 1, done: true} +// 相当于将 let result = yield x + y +// 替换成 let result = 1; +``` + +上面代码中,第二个`next(1)`方法就相当于将`yield`表达式替换成一个值`1`。如果`next`方法没有参数,就相当于替换成`undefined`。 + +`throw()`是将`yield`表达式替换成一个`throw`语句。 + +```javascript +gen.throw(new Error('出错了')); // Uncaught Error: 出错了 +// 相当于将 let result = yield x + y +// 替换成 let result = throw(new Error('出错了')); +``` + +`return()`是将`yield`表达式替换成一个`return`语句。 + +```javascript +gen.return(2); // Object {value: 2, done: true} +// 相当于将 let result = yield x + y +// 替换成 let result = return 2; +``` + +## yield\* 表达式 + +如果在 Generator 函数内部,调用另一个 Generator 函数,默认情况下是没有效果的。 + +```javascript +function* foo() { + yield 'a'; + yield 'b'; +} + +function* bar() { + yield 'x'; + foo(); + yield 'y'; +} + +for (let v of bar()){ + console.log(v); +} +// "x" +// "y" +``` + +上面代码中,`foo`和`bar`都是 Generator 函数,在`bar`里面调用`foo`,是不会有效果的。 + +这个就需要用到`yield*`表达式,用来在一个 Generator 函数里面执行另一个 Generator 函数。 + +```javascript +function* bar() { + yield 'x'; + yield* foo(); + yield 'y'; +} + +// 等同于 +function* bar() { + yield 'x'; + yield 'a'; + yield 'b'; + yield 'y'; +} + +// 等同于 +function* bar() { + yield 'x'; + for (let v of foo()) { + yield v; + } + yield 'y'; +} + +for (let v of bar()){ + console.log(v); +} +// "x" +// "a" +// "b" +// "y" +``` + +再来看一个对比的例子。 + +```javascript +function* inner() { + yield 'hello!'; +} + +function* outer1() { + yield 'open'; + yield inner(); + yield 'close'; +} + +var gen = outer1() +gen.next().value // "open" +gen.next().value // 返回一个遍历器对象 +gen.next().value // "close" + +function* outer2() { + yield 'open' + yield* inner() + yield 'close' +} + +var gen = outer2() +gen.next().value // "open" +gen.next().value // "hello!" +gen.next().value // "close" +``` + +上面例子中,`outer2`使用了`yield*`,`outer1`没使用。结果就是,`outer1`返回一个遍历器对象,`outer2`返回该遍历器对象的内部值。 + +从语法角度看,如果`yield`表达式后面跟的是一个遍历器对象,需要在`yield`表达式后面加上星号,表明它返回的是一个遍历器对象。这被称为`yield*`表达式。 + +```javascript +let delegatedIterator = (function* () { + yield 'Hello!'; + yield 'Bye!'; +}()); + +let delegatingIterator = (function* () { + yield 'Greetings!'; + yield* delegatedIterator; + yield 'Ok, bye.'; +}()); + +for(let value of delegatingIterator) { + console.log(value); +} +// "Greetings! +// "Hello!" +// "Bye!" +// "Ok, bye." +``` + +上面代码中,`delegatingIterator`是代理者,`delegatedIterator`是被代理者。由于`yield* delegatedIterator`语句得到的值,是一个遍历器,所以要用星号表示。运行结果就是使用一个遍历器,遍历了多个 Generator 函数,有递归的效果。 + +`yield*`后面的 Generator 函数(没有`return`语句时),等同于在 Generator 函数内部,部署一个`for...of`循环。 + +```javascript +function* concat(iter1, iter2) { + yield* iter1; + yield* iter2; +} + +// 等同于 + +function* concat(iter1, iter2) { + for (var value of iter1) { + yield value; + } + for (var value of iter2) { + yield value; + } +} +``` + +上面代码说明,`yield*`后面的 Generator 函数(没有`return`语句时),不过是`for...of`的一种简写形式,完全可以用后者替代前者。反之,在有`return`语句时,则需要用`var value = yield* iterator`的形式获取`return`语句的值。 + +如果`yield*`后面跟着一个数组,由于数组原生支持遍历器,因此就会遍历数组成员。 + +```javascript +function* gen(){ + yield* ["a", "b", "c"]; +} + +gen().next() // { value:"a", done:false } +``` + +上面代码中,`yield`命令后面如果不加星号,返回的是整个数组,加了星号就表示返回的是数组的遍历器对象。 + +实际上,任何数据结构只要有 Iterator 接口,就可以被`yield*`遍历。 + +```javascript +let read = (function* () { + yield 'hello'; + yield* 'hello'; +})(); + +read.next().value // "hello" +read.next().value // "h" +``` + +上面代码中,`yield`表达式返回整个字符串,`yield*`语句返回单个字符。因为字符串具有 Iterator 接口,所以被`yield*`遍历。 + +如果被代理的 Generator 函数有`return`语句,那么就可以向代理它的 Generator 函数返回数据。 + +```javascript +function* foo() { + yield 2; + yield 3; + return "foo"; +} + +function* bar() { + yield 1; + var v = yield* foo(); + console.log("v: " + v); + yield 4; +} + +var it = bar(); + +it.next() +// {value: 1, done: false} +it.next() +// {value: 2, done: false} +it.next() +// {value: 3, done: false} +it.next(); +// "v: foo" +// {value: 4, done: false} +it.next() +// {value: undefined, done: true} +``` + +上面代码在第四次调用`next`方法的时候,屏幕上会有输出,这是因为函数`foo`的`return`语句,向函数`bar`提供了返回值。 + +再看一个例子。 + +```javascript +function* genFuncWithReturn() { + yield 'a'; + yield 'b'; + return 'The result'; +} +function* logReturned(genObj) { + let result = yield* genObj; + console.log(result); +} + +[...logReturned(genFuncWithReturn())] +// The result +// 值为 [ 'a', 'b' ] +``` + +上面代码中,存在两次遍历。第一次是扩展运算符遍历函数`logReturned`返回的遍历器对象,第二次是`yield*`语句遍历函数`genFuncWithReturn`返回的遍历器对象。这两次遍历的效果是叠加的,最终表现为扩展运算符遍历函数`genFuncWithReturn`返回的遍历器对象。所以,最后的数据表达式得到的值等于`[ 'a', 'b' ]`。但是,函数`genFuncWithReturn`的`return`语句的返回值`The result`,会返回给函数`logReturned`内部的`result`变量,因此会有终端输出。 + +`yield*`命令可以很方便地取出嵌套数组的所有成员。 + +```javascript +function* iterTree(tree) { + if (Array.isArray(tree)) { + for(let i=0; i < tree.length; i++) { + yield* iterTree(tree[i]); + } + } else { + yield tree; + } +} + +const tree = [ 'a', ['b', 'c'], ['d', 'e'] ]; + +for(let x of iterTree(tree)) { + console.log(x); +} +// a +// b +// c +// d +// e +``` + +由于扩展运算符`...`默认调用 Iterator 接口,所以上面这个函数也可以用于嵌套数组的平铺。 + +```javascript +[...iterTree(tree)] // ["a", "b", "c", "d", "e"] +``` + +下面是一个稍微复杂的例子,使用`yield*`语句遍历完全二叉树。 + +```javascript +// 下面是二叉树的构造函数, +// 三个参数分别是左树、当前节点和右树 +function Tree(left, label, right) { + this.left = left; + this.label = label; + this.right = right; +} + +// 下面是中序(inorder)遍历函数。 +// 由于返回的是一个遍历器,所以要用generator函数。 +// 函数体内采用递归算法,所以左树和右树要用yield*遍历 +function* inorder(t) { + if (t) { + yield* inorder(t.left); + yield t.label; + yield* inorder(t.right); + } +} + +// 下面生成二叉树 +function make(array) { + // 判断是否为叶节点 + if (array.length == 1) return new Tree(null, array[0], null); + return new Tree(make(array[0]), array[1], make(array[2])); +} +let tree = make([[['a'], 'b', ['c']], 'd', [['e'], 'f', ['g']]]); + +// 遍历二叉树 +var result = []; +for (let node of inorder(tree)) { + result.push(node); +} + +result +// ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +``` + +## 作为对象属性的 Generator 函数 + +如果一个对象的属性是 Generator 函数,可以简写成下面的形式。 + +```javascript +let obj = { + * myGeneratorMethod() { + ··· + } +}; +``` + +上面代码中,`myGeneratorMethod`属性前面有一个星号,表示这个属性是一个 Generator 函数。 + +它的完整形式如下,与上面的写法是等价的。 + +```javascript +let obj = { + myGeneratorMethod: function* () { + // ··· + } +}; +``` + +## Generator 函数的`this` + +Generator 函数总是返回一个遍历器,ES6 规定这个遍历器是 Generator 函数的实例,也继承了 Generator 函数的`prototype`对象上的方法。 + +```javascript +function* g() {} + +g.prototype.hello = function () { + return 'hi!'; +}; + +let obj = g(); + +obj instanceof g // true +obj.hello() // 'hi!' +``` + +上面代码表明,Generator 函数`g`返回的遍历器`obj`,是`g`的实例,而且继承了`g.prototype`。但是,如果把`g`当作普通的构造函数,并不会生效,因为`g`返回的总是遍历器对象,而不是`this`对象。 + +```javascript +function* g() { + this.a = 11; +} + +let obj = g(); +obj.next(); +obj.a // undefined +``` + +上面代码中,Generator 函数`g`在`this`对象上面添加了一个属性`a`,但是`obj`对象拿不到这个属性。 + +Generator 函数也不能跟`new`命令一起用,会报错。 + +```javascript +function* F() { + yield this.x = 2; + yield this.y = 3; +} + +new F() +// TypeError: F is not a constructor +``` + +上面代码中,`new`命令跟构造函数`F`一起使用,结果报错,因为`F`不是构造函数。 + +那么,有没有办法让 Generator 函数返回一个正常的对象实例,既可以用`next`方法,又可以获得正常的`this`? + +下面是一个变通方法。首先,生成一个空对象,使用`call`方法绑定 Generator 函数内部的`this`。这样,构造函数调用以后,这个空对象就是 Generator 函数的实例对象了。 + +```javascript +function* F() { + this.a = 1; + yield this.b = 2; + yield this.c = 3; +} +var obj = {}; +var f = F.call(obj); + +f.next(); // Object {value: 2, done: false} +f.next(); // Object {value: 3, done: false} +f.next(); // Object {value: undefined, done: true} + +obj.a // 1 +obj.b // 2 +obj.c // 3 +``` + +上面代码中,首先是`F`内部的`this`对象绑定`obj`对象,然后调用它,返回一个 Iterator 对象。这个对象执行三次`next`方法(因为`F`内部有两个`yield`表达式),完成 F 内部所有代码的运行。这时,所有内部属性都绑定在`obj`对象上了,因此`obj`对象也就成了`F`的实例。 + +上面代码中,执行的是遍历器对象`f`,但是生成的对象实例是`obj`,有没有办法将这两个对象统一呢? + +一个办法就是将`obj`换成`F.prototype`。 + +```javascript +function* F() { + this.a = 1; + yield this.b = 2; + yield this.c = 3; +} +var f = F.call(F.prototype); + +f.next(); // Object {value: 2, done: false} +f.next(); // Object {value: 3, done: false} +f.next(); // Object {value: undefined, done: true} + +f.a // 1 +f.b // 2 +f.c // 3 +``` + +再将`F`改成构造函数,就可以对它执行`new`命令了。 + +```javascript +function* gen() { + this.a = 1; + yield this.b = 2; + yield this.c = 3; +} + +function F() { + return gen.call(gen.prototype); +} + +var f = new F(); + +f.next(); // Object {value: 2, done: false} +f.next(); // Object {value: 3, done: false} +f.next(); // Object {value: undefined, done: true} + +f.a // 1 +f.b // 2 +f.c // 3 +``` + +## 含义 + +### Generator 与状态机 + +Generator 是实现状态机的最佳结构。比如,下面的`clock`函数就是一个状态机。 + +```javascript +var ticking = true; +var clock = function() { + if (ticking) + console.log('Tick!'); + else + console.log('Tock!'); + ticking = !ticking; +} +``` + +上面代码的`clock`函数一共有两种状态(`Tick`和`Tock`),每运行一次,就改变一次状态。这个函数如果用 Generator 实现,就是下面这样。 + +```javascript +var clock = function* () { + while (true) { + console.log('Tick!'); + yield; + console.log('Tock!'); + yield; + } +}; +``` + +上面的 Generator 实现与 ES5 实现对比,可以看到少了用来保存状态的外部变量`ticking`,这样就更简洁,更安全(状态不会被非法篡改)、更符合函数式编程的思想,在写法上也更优雅。Generator 之所以可以不用外部变量保存状态,是因为它本身就包含了一个状态信息,即目前是否处于暂停态。 + +### Generator 与协程 + +协程(coroutine)是一种程序运行的方式,可以理解成“协作的线程”或“协作的函数”。协程既可以用单线程实现,也可以用多线程实现。前者是一种特殊的子例程,后者是一种特殊的线程。 + +**(1)协程与子例程的差异** + +传统的“子例程”(subroutine)采用堆栈式“后进先出”的执行方式,只有当调用的子函数完全执行完毕,才会结束执行父函数。协程与其不同,多个线程(单线程情况下,即多个函数)可以并行执行,但是只有一个线程(或函数)处于正在运行的状态,其他线程(或函数)都处于暂停态(suspended),线程(或函数)之间可以交换执行权。也就是说,一个线程(或函数)执行到一半,可以暂停执行,将执行权交给另一个线程(或函数),等到稍后收回执行权的时候,再恢复执行。这种可以并行执行、交换执行权的线程(或函数),就称为协程。 + +从实现上看,在内存中,子例程只使用一个栈(stack),而协程是同时存在多个栈,但只有一个栈是在运行状态,也就是说,协程是以多占用内存为代价,实现多任务的并行。 + +**(2)协程与普通线程的差异** + +不难看出,协程适合用于多任务运行的环境。在这个意义上,它与普通的线程很相似,都有自己的执行上下文、可以分享全局变量。它们的不同之处在于,同一时间可以有多个线程处于运行状态,但是运行的协程只能有一个,其他协程都处于暂停状态。此外,普通的线程是抢先式的,到底哪个线程优先得到资源,必须由运行环境决定,但是协程是合作式的,执行权由协程自己分配。 + +由于 JavaScript 是单线程语言,只能保持一个调用栈。引入协程以后,每个任务可以保持自己的调用栈。这样做的最大好处,就是抛出错误的时候,可以找到原始的调用栈。不至于像异步操作的回调函数那样,一旦出错,原始的调用栈早就结束。 + +Generator 函数是 ES6 对协程的实现,但属于不完全实现。Generator 函数被称为“半协程”(semi-coroutine),意思是只有 Generator 函数的调用者,才能将程序的执行权还给 Generator 函数。如果是完全执行的协程,任何函数都可以让暂停的协程继续执行。 + +如果将 Generator 函数当作协程,完全可以将多个需要互相协作的任务写成 Generator 函数,它们之间使用`yield`表达式交换控制权。 + +### Generator 与上下文 + +JavaScript 代码运行时,会产生一个全局的上下文环境(context,又称运行环境),包含了当前所有的变量和对象。然后,执行函数(或块级代码)的时候,又会在当前上下文环境的上层,产生一个函数运行的上下文,变成当前(active)的上下文,由此形成一个上下文环境的堆栈(context stack)。 + +这个堆栈是“后进先出”的数据结构,最后产生的上下文环境首先执行完成,退出堆栈,然后再执行完成它下层的上下文,直至所有代码执行完成,堆栈清空。 + +Generator 函数不是这样,它执行产生的上下文环境,一旦遇到`yield`命令,就会暂时退出堆栈,但是并不消失,里面的所有变量和对象会冻结在当前状态。等到对它执行`next`命令时,这个上下文环境又会重新加入调用栈,冻结的变量和对象恢复执行。 + +```javascript +function* gen() { + yield 1; + return 2; +} + +let g = gen(); + +console.log( + g.next().value, + g.next().value, +); +``` + +上面代码中,第一次执行`g.next()`时,Generator 函数`gen`的上下文会加入堆栈,即开始运行`gen`内部的代码。等遇到`yield 1`时,`gen`上下文退出堆栈,内部状态冻结。第二次执行`g.next()`时,`gen`上下文重新加入堆栈,变成当前的上下文,重新恢复执行。 + +## 应用 + +Generator 可以暂停函数执行,返回任意表达式的值。这种特点使得 Generator 有多种应用场景。 + +### (1)异步操作的同步化表达 + +Generator 函数的暂停执行的效果,意味着可以把异步操作写在`yield`表达式里面,等到调用`next`方法时再往后执行。这实际上等同于不需要写回调函数了,因为异步操作的后续操作可以放在`yield`表达式下面,反正要等到调用`next`方法时再执行。所以,Generator 函数的一个重要实际意义就是用来处理异步操作,改写回调函数。 + +```javascript +function* loadUI() { + showLoadingScreen(); + yield loadUIDataAsynchronously(); + hideLoadingScreen(); +} +var loader = loadUI(); +// 加载UI +loader.next() + +// 卸载UI +loader.next() +``` + +上面代码中,第一次调用`loadUI`函数时,该函数不会执行,仅返回一个遍历器。下一次对该遍历器调用`next`方法,则会显示`Loading`界面(`showLoadingScreen`),并且异步加载数据(`loadUIDataAsynchronously`)。等到数据加载完成,再一次使用`next`方法,则会隐藏`Loading`界面。可以看到,这种写法的好处是所有`Loading`界面的逻辑,都被封装在一个函数,按部就班非常清晰。 + +Ajax 是典型的异步操作,通过 Generator 函数部署 Ajax 操作,可以用同步的方式表达。 + +```javascript +function* main() { + var result = yield request("http://some.url"); + var resp = JSON.parse(result); + console.log(resp.value); +} + +function request(url) { + makeAjaxCall(url, function(response){ + it.next(response); + }); +} + +var it = main(); +it.next(); +``` + +上面代码的`main`函数,就是通过 Ajax 操作获取数据。可以看到,除了多了一个`yield`,它几乎与同步操作的写法完全一样。注意,`makeAjaxCall`函数中的`next`方法,必须加上`response`参数,因为`yield`表达式,本身是没有值的,总是等于`undefined`。 + +下面是另一个例子,通过 Generator 函数逐行读取文本文件。 + +```javascript +function* numbers() { + let file = new FileReader("numbers.txt"); + try { + while(!file.eof) { + yield parseInt(file.readLine(), 10); + } + } finally { + file.close(); + } +} +``` + +上面代码打开文本文件,使用`yield`表达式可以手动逐行读取文件。 + +### (2)控制流管理 + +如果有一个多步操作非常耗时,采用回调函数,可能会写成下面这样。 + +```javascript +step1(function (value1) { + step2(value1, function(value2) { + step3(value2, function(value3) { + step4(value3, function(value4) { + // Do something with value4 + }); + }); + }); +}); +``` + +采用 Promise 改写上面的代码。 + +```javascript +Promise.resolve(step1) + .then(step2) + .then(step3) + .then(step4) + .then(function (value4) { + // Do something with value4 + }, function (error) { + // Handle any error from step1 through step4 + }) + .done(); +``` + +上面代码已经把回调函数,改成了直线执行的形式,但是加入了大量 Promise 的语法。Generator 函数可以进一步改善代码运行流程。 + +```javascript +function* longRunningTask(value1) { + try { + var value2 = yield step1(value1); + var value3 = yield step2(value2); + var value4 = yield step3(value3); + var value5 = yield step4(value4); + // Do something with value4 + } catch (e) { + // Handle any error from step1 through step4 + } +} +``` + +然后,使用一个函数,按次序自动执行所有步骤。 + +```javascript +scheduler(longRunningTask(initialValue)); + +function scheduler(task) { + var taskObj = task.next(task.value); + // 如果Generator函数未结束,就继续调用 + if (!taskObj.done) { + task.value = taskObj.value + scheduler(task); + } +} +``` + +注意,上面这种做法,只适合同步操作,即所有的`task`都必须是同步的,不能有异步操作。因为这里的代码一得到返回值,就继续往下执行,没有判断异步操作何时完成。如果要控制异步的操作流程,详见后面的《异步操作》一章。 + +下面,利用`for...of`循环会自动依次执行`yield`命令的特性,提供一种更一般的控制流管理的方法。 + +```javascript +let steps = [step1Func, step2Func, step3Func]; + +function* iterateSteps(steps){ + for (var i=0; i< steps.length; i++){ + var step = steps[i]; + yield step(); + } +} +``` + +上面代码中,数组`steps`封装了一个任务的多个步骤,Generator 函数`iterateSteps`则是依次为这些步骤加上`yield`命令。 + +将任务分解成步骤之后,还可以将项目分解成多个依次执行的任务。 + +```javascript +let jobs = [job1, job2, job3]; + +function* iterateJobs(jobs){ + for (var i=0; i< jobs.length; i++){ + var job = jobs[i]; + yield* iterateSteps(job.steps); + } +} +``` + +上面代码中,数组`jobs`封装了一个项目的多个任务,Generator 函数`iterateJobs`则是依次为这些任务加上`yield*`命令。 + +最后,就可以用`for...of`循环一次性依次执行所有任务的所有步骤。 + +```javascript +for (var step of iterateJobs(jobs)){ + console.log(step.id); +} +``` + +再次提醒,上面的做法只能用于所有步骤都是同步操作的情况,不能有异步操作的步骤。如果想要依次执行异步的步骤,必须使用后面的《异步操作》一章介绍的方法。 + +`for...of`的本质是一个`while`循环,所以上面的代码实质上执行的是下面的逻辑。 + +```javascript +var it = iterateJobs(jobs); +var res = it.next(); + +while (!res.done){ + var result = res.value; + // ... + res = it.next(); +} +``` + +### (3)部署 Iterator 接口 + +利用 Generator 函数,可以在任意对象上部署 Iterator 接口。 + +```javascript +function* iterEntries(obj) { + let keys = Object.keys(obj); + for (let i=0; i < keys.length; i++) { + let key = keys[i]; + yield [key, obj[key]]; + } +} + +let myObj = { foo: 3, bar: 7 }; + +for (let [key, value] of iterEntries(myObj)) { + console.log(key, value); +} + +// foo 3 +// bar 7 +``` + +上述代码中,`myObj`是一个普通对象,通过`iterEntries`函数,就有了 Iterator 接口。也就是说,可以在任意对象上部署`next`方法。 + +下面是一个对数组部署 Iterator 接口的例子,尽管数组原生具有这个接口。 + +```javascript +function* makeSimpleGenerator(array){ + var nextIndex = 0; + + while(nextIndex < array.length){ + yield array[nextIndex++]; + } +} + +var gen = makeSimpleGenerator(['yo', 'ya']); + +gen.next().value // 'yo' +gen.next().value // 'ya' +gen.next().done // true +``` + +### (4)作为数据结构 + +Generator 可以看作是数据结构,更确切地说,可以看作是一个数组结构,因为 Generator 函数可以返回一系列的值,这意味着它可以对任意表达式,提供类似数组的接口。 + +```javascript +function* doStuff() { + yield fs.readFile.bind(null, 'hello.txt'); + yield fs.readFile.bind(null, 'world.txt'); + yield fs.readFile.bind(null, 'and-such.txt'); +} +``` + +上面代码就是依次返回三个函数,但是由于使用了 Generator 函数,导致可以像处理数组那样,处理这三个返回的函数。 + +```javascript +for (task of doStuff()) { + // task是一个函数,可以像回调函数那样使用它 +} +``` + +实际上,如果用 ES5 表达,完全可以用数组模拟 Generator 的这种用法。 + +```javascript +function doStuff() { + return [ + fs.readFile.bind(null, 'hello.txt'), + fs.readFile.bind(null, 'world.txt'), + fs.readFile.bind(null, 'and-such.txt') + ]; +} +``` + +上面的函数,可以用一模一样的`for...of`循环处理!两相一比较,就不难看出 Generator 使得数据或者操作,具备了类似数组的接口。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/intro.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/intro.md" new file mode 100755 index 000000000..59f418747 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/intro.md" @@ -0,0 +1,477 @@ +# ECMAScript 6 简介 + +ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在 2015 年 6 月正式发布了。它的目标,是使得 JavaScript 语言可以用来编写复杂的大型应用程序,成为企业级开发语言。 + +## ECMAScript 和 JavaScript 的关系 + +一个常见的问题是,ECMAScript 和 JavaScript 到底是什么关系? + +要讲清楚这个问题,需要回顾历史。1996 年 11 月,JavaScript 的创造者 Netscape 公司,决定将 JavaScript 提交给标准化组织 ECMA,希望这种语言能够成为国际标准。次年,ECMA 发布 262 号标准文件(ECMA-262)的第一版,规定了浏览器脚本语言的标准,并将这种语言称为 ECMAScript,这个版本就是 1.0 版。 + +该标准从一开始就是针对 JavaScript 语言制定的,但是之所以不叫 JavaScript,有两个原因。一是商标,Java 是 Sun 公司的商标,根据授权协议,只有 Netscape 公司可以合法地使用 JavaScript 这个名字,且 JavaScript 本身也已经被 Netscape 公司注册为商标。二是想体现这门语言的制定者是 ECMA,不是 Netscape,这样有利于保证这门语言的开放性和中立性。 + +因此,ECMAScript 和 JavaScript 的关系是,前者是后者的规格,后者是前者的一种实现(另外的 ECMAScript 方言还有 JScript 和 ActionScript)。日常场合,这两个词是可以互换的。 + +## ES6 与 ECMAScript 2015 的关系 + +ECMAScript 2015(简称 ES2015)这个词,也是经常可以看到的。它与 ES6 是什么关系呢? + +2011 年,ECMAScript 5.1 版发布后,就开始制定 6.0 版了。因此,ES6 这个词的原意,就是指 JavaScript 语言的下一个版本。 + +但是,因为这个版本引入的语法功能太多,而且制定过程当中,还有很多组织和个人不断提交新功能。事情很快就变得清楚了,不可能在一个版本里面包括所有将要引入的功能。常规的做法是先发布 6.0 版,过一段时间再发 6.1 版,然后是 6.2 版、6.3 版等等。 + +但是,标准的制定者不想这样做。他们想让标准的升级成为常规流程:任何人在任何时候,都可以向标准委员会提交新语法的提案,然后标准委员会每个月开一次会,评估这些提案是否可以接受,需要哪些改进。如果经过多次会议以后,一个提案足够成熟了,就可以正式进入标准了。这就是说,标准的版本升级成为了一个不断滚动的流程,每个月都会有变动。 + +标准委员会最终决定,标准在每年的 6 月份正式发布一次,作为当年的正式版本。接下来的时间,就在这个版本的基础上做改动,直到下一年的 6 月份,草案就自然变成了新一年的版本。这样一来,就不需要以前的版本号了,只要用年份标记就可以了。 + +ES6 的第一个版本,就这样在 2015 年 6 月发布了,正式名称就是《ECMAScript 2015 标准》(简称 ES2015)。2016 年 6 月,小幅修订的《ECMAScript 2016 标准》(简称 ES2016)如期发布,这个版本可以看作是 ES6.1 版,因为两者的差异非常小(只新增了数组实例的`includes`方法和指数运算符),基本上是同一个标准。根据计划,2017 年 6 月发布 ES2017 标准。 + +因此,ES6 既是一个历史名词,也是一个泛指,含义是 5.1 版以后的 JavaScript 的下一代标准,涵盖了 ES2015、ES2016、ES2017 等等,而 ES2015 则是正式名称,特指该年发布的正式版本的语言标准。本书中提到 ES6 的地方,一般是指 ES2015 标准,但有时也是泛指“下一代 JavaScript 语言”。 + +## 语法提案的批准流程 + +任何人都可以向标准委员会(又称 TC39 委员会)提案,要求修改语言标准。 + +一种新的语法从提案到变成正式标准,需要经历五个阶段。每个阶段的变动都需要由 TC39 委员会批准。 + +- Stage 0 - Strawman(展示阶段) +- Stage 1 - Proposal(征求意见阶段) +- Stage 2 - Draft(草案阶段) +- Stage 3 - Candidate(候选人阶段) +- Stage 4 - Finished(定案阶段) + +一个提案只要能进入 Stage 2,就差不多肯定会包括在以后的正式标准里面。ECMAScript 当前的所有提案,可以在 TC39 的官方网站[GitHub.com/tc39/ecma262](https://github.com/tc39/ecma262)查看。 + +本书的写作目标之一,是跟踪 ECMAScript 语言的最新进展,介绍 5.1 版本以后所有的新语法。对于那些明确或很有希望,将要列入标准的新语法,都将予以介绍。 + +## ECMAScript 的历史 + +ES6 从开始制定到最后发布,整整用了 15 年。 + +前面提到,ECMAScript 1.0 是 1997 年发布的,接下来的两年,连续发布了 ECMAScript 2.0(1998 年 6 月)和 ECMAScript 3.0(1999 年 12 月)。3.0 版是一个巨大的成功,在业界得到广泛支持,成为通行标准,奠定了 JavaScript 语言的基本语法,以后的版本完全继承。直到今天,初学者一开始学习 JavaScript,其实就是在学 3.0 版的语法。 + +2000 年,ECMAScript 4.0 开始酝酿。这个版本最后没有通过,但是它的大部分内容被 ES6 继承了。因此,ES6 制定的起点其实是 2000 年。 + +为什么 ES4 没有通过呢?因为这个版本太激进了,对 ES3 做了彻底升级,导致标准委员会的一些成员不愿意接受。ECMA 的第 39 号技术专家委员会(Technical Committee 39,简称 TC39)负责制订 ECMAScript 标准,成员包括 Microsoft、Mozilla、Google 等大公司。 + +2007 年 10 月,ECMAScript 4.0 版草案发布,本来预计次年 8 月发布正式版本。但是,各方对于是否通过这个标准,发生了严重分歧。以 Yahoo、Microsoft、Google 为首的大公司,反对 JavaScript 的大幅升级,主张小幅改动;以 JavaScript 创造者 Brendan Eich 为首的 Mozilla 公司,则坚持当前的草案。 + +2008 年 7 月,由于对于下一个版本应该包括哪些功能,各方分歧太大,争论过于激烈,ECMA 开会决定,中止 ECMAScript 4.0 的开发,将其中涉及现有功能改善的一小部分,发布为 ECMAScript 3.1,而将其他激进的设想扩大范围,放入以后的版本,由于会议的气氛,该版本的项目代号起名为 Harmony(和谐)。会后不久,ECMAScript 3.1 就改名为 ECMAScript 5。 + +2009 年 12 月,ECMAScript 5.0 版正式发布。Harmony 项目则一分为二,一些较为可行的设想定名为 JavaScript.next 继续开发,后来演变成 ECMAScript 6;一些不是很成熟的设想,则被视为 JavaScript.next.next,在更远的将来再考虑推出。TC39 委员会的总体考虑是,ES5 与 ES3 基本保持兼容,较大的语法修正和新功能加入,将由 JavaScript.next 完成。当时,JavaScript.next 指的是 ES6,第六版发布以后,就指 ES7。TC39 的判断是,ES5 会在 2013 年的年中成为 JavaScript 开发的主流标准,并在此后五年中一直保持这个位置。 + +2011 年 6 月,ECMAScript 5.1 版发布,并且成为 ISO 国际标准(ISO/IEC 16262:2011)。 + +2013 年 3 月,ECMAScript 6 草案冻结,不再添加新功能。新的功能设想将被放到 ECMAScript 7。 + +2013 年 12 月,ECMAScript 6 草案发布。然后是 12 个月的讨论期,听取各方反馈。 + +2015 年 6 月,ECMAScript 6 正式通过,成为国际标准。从 2000 年算起,这时已经过去了 15 年。 + +## 部署进度 + +各大浏览器的最新版本,对 ES6 的支持可以查看[kangax.github.io/compat-table/es6/](https://kangax.github.io/compat-table/es6/)。随着时间的推移,支持度已经越来越高了,超过 90%的 ES6 语法特性都实现了。 + +Node 是 JavaScript 的服务器运行环境(runtime)。它对 ES6 的支持度更高。除了那些默认打开的功能,还有一些语法功能已经实现了,但是默认没有打开。使用下面的命令,可以查看 Node 已经实现的 ES6 特性。 + +```bash +// Linux & Mac +$ node --v8-options | grep harmony + +// Windows +$ node --v8-options | findstr harmony +``` + +我写了一个工具 [ES-Checker](https://github.com/ruanyf/es-checker),用来检查各种运行环境对 ES6 的支持情况。访问[ruanyf.github.io/es-checker](http://ruanyf.github.io/es-checker),可以看到您的浏览器支持 ES6 的程度。运行下面的命令,可以查看你正在使用的 Node 环境对 ES6 的支持程度。 + +```bash +$ npm install -g es-checker +$ es-checker + +========================================= +Passes 24 feature Detections +Your runtime supports 57% of ECMAScript 6 +========================================= +``` + +## Babel 转码器 + +[Babel](https://babeljs.io/) 是一个广泛使用的 ES6 转码器,可以将 ES6 代码转为 ES5 代码,从而在现有环境执行。这意味着,你可以用 ES6 的方式编写程序,又不用担心现有环境是否支持。下面是一个例子。 + +```javascript +// 转码前 +input.map(item => item + 1); + +// 转码后 +input.map(function (item) { + return item + 1; +}); +``` + +上面的原始代码用了箭头函数,Babel 将其转为普通函数,就能在不支持箭头函数的 JavaScript 环境执行了。 + +下面的命令在项目目录中,安装 Babel。 + +```bash +$ npm install --save-dev @babel/core +``` + +### 配置文件`.babelrc` + +Babel 的配置文件是`.babelrc`,存放在项目的根目录下。使用 Babel 的第一步,就是配置这个文件。 + +该文件用来设置转码规则和插件,基本格式如下。 + +```javascript +{ + "presets": [], + "plugins": [] +} +``` + +`presets`字段设定转码规则,官方提供以下的规则集,你可以根据需要安装。 + +```bash +# 最新转码规则 +$ npm install --save-dev @babel/preset-env + +# react 转码规则 +$ npm install --save-dev @babel/preset-react +``` + +然后,将这些规则加入`.babelrc`。 + +```javascript + { + "presets": [ + "@babel/env", + "@babel/preset-react" + ], + "plugins": [] + } +``` + +注意,以下所有 Babel 工具和模块的使用,都必须先写好`.babelrc`。 + +### 命令行转码 + +Babel 提供命令行工具`@babel/cli`,用于命令行转码。 + +它的安装命令如下。 + +```bash +$ npm install --save-dev @babel/cli +``` + +基本用法如下。 + +```bash +# 转码结果输出到标准输出 +$ npx babel example.js + +# 转码结果写入一个文件 +# --out-file 或 -o 参数指定输出文件 +$ npx babel example.js --out-file compiled.js +# 或者 +$ npx babel example.js -o compiled.js + +# 整个目录转码 +# --out-dir 或 -d 参数指定输出目录 +$ npx babel src --out-dir lib +# 或者 +$ npx babel src -d lib + +# -s 参数生成source map文件 +$ npx babel src -d lib -s +``` + +### babel-node + +`@babel/node`模块的`babel-node`命令,提供一个支持 ES6 的 REPL 环境。它支持 Node 的 REPL 环境的所有功能,而且可以直接运行 ES6 代码。 + +首先,安装这个模块。 + +```bash +$ npm install --save-dev @babel/node +``` + +然后,执行`babel-node`就进入 REPL 环境。 + +```bash +$ npx babel-node +> (x => x * 2)(1) +2 +``` + +`babel-node`命令可以直接运行 ES6 脚本。将上面的代码放入脚本文件`es6.js`,然后直接运行。 + +```bash +# es6.js 的代码 +# console.log((x => x * 2)(1)); +$ npx babel-node es6.js +2 +``` + +### @babel/register 模块 + +`@babel/register`模块改写`require`命令,为它加上一个钩子。此后,每当使用`require`加载`.js`、`.jsx`、`.es`和`.es6`后缀名的文件,就会先用 Babel 进行转码。 + +```bash +$ npm install --save-dev @babel/register +``` + +使用时,必须首先加载`@babel/register`。 + +```bash +// index.js +require('@babel/register'); +require('./es6.js'); +``` + +然后,就不需要手动对`index.js`转码了。 + +```bash +$ node index.js +2 +``` + +需要注意的是,`@babel/register`只会对`require`命令加载的文件转码,而不会对当前文件转码。另外,由于它是实时转码,所以只适合在开发环境使用。 + +### babel API + +如果某些代码需要调用 Babel 的 API 进行转码,就要使用`@babel/core`模块。 + +```javascript +var babel = require('@babel/core'); + +// 字符串转码 +babel.transform('code();', options); +// => { code, map, ast } + +// 文件转码(异步) +babel.transformFile('filename.js', options, function(err, result) { + result; // => { code, map, ast } +}); + +// 文件转码(同步) +babel.transformFileSync('filename.js', options); +// => { code, map, ast } + +// Babel AST转码 +babel.transformFromAst(ast, code, options); +// => { code, map, ast } +``` + +配置对象`options`,可以参看官方文档[http://babeljs.io/docs/usage/options/](http://babeljs.io/docs/usage/options/)。 + +下面是一个例子。 + +```javascript +var es6Code = 'let x = n => n + 1'; +var es5Code = require('@babel/core') + .transform(es6Code, { + presets: ['@babel/env'] + }) + .code; + +console.log(es5Code); +// '"use strict";\n\nvar x = function x(n) {\n return n + 1;\n};' +``` + +上面代码中,`transform`方法的第一个参数是一个字符串,表示需要被转换的 ES6 代码,第二个参数是转换的配置对象。 + +### @babel/polyfill + +Babel 默认只转换新的 JavaScript 句法(syntax),而不转换新的 API,比如`Iterator`、`Generator`、`Set`、`Map`、`Proxy`、`Reflect`、`Symbol`、`Promise`等全局对象,以及一些定义在全局对象上的方法(比如`Object.assign`)都不会转码。 + +举例来说,ES6 在`Array`对象上新增了`Array.from`方法。Babel 就不会转码这个方法。如果想让这个方法运行,必须使用`babel-polyfill`,为当前环境提供一个垫片。 + +安装命令如下。 + +```bash +$ npm install --save-dev @babel/polyfill +``` + +然后,在脚本头部,加入如下一行代码。 + +```javascript +import '@babel/polyfill'; +// 或者 +require('@babel/polyfill'); +``` + +Babel 默认不转码的 API 非常多,详细清单可以查看`babel-plugin-transform-runtime`模块的[definitions.js](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-runtime/src/definitions.js)文件。 + +### 浏览器环境 + +Babel 也可以用于浏览器环境,使用[@babel/standalone](https://babeljs.io/docs/en/next/babel-standalone.html)模块提供的浏览器版本,将其插入网页。 + +```html +<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> +<script type="text/babel"> +// Your ES6 code +</script> +``` + +注意,网页实时将 ES6 代码转为 ES5,对性能会有影响。生产环境需要加载已经转码完成的脚本。 + +Babel 提供一个[REPL 在线编译器](https://babeljs.io/repl/),可以在线将 ES6 代码转为 ES5 代码。转换后的代码,可以直接作为 ES5 代码插入网页运行。 + +## Traceur 转码器 + +Google 公司的[Traceur](https://github.com/google/traceur-compiler)转码器,也可以将 ES6 代码转为 ES5 代码。 + +### 直接插入网页 + +Traceur 允许将 ES6 代码直接插入网页。首先,必须在网页头部加载 Traceur 库文件。 + +```html +<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script> +<script src="https://google.github.io/traceur-compiler/bin/BrowserSystem.js"></script> +<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script> +<script type="module"> + import './Greeter.js'; +</script> +``` + +上面代码中,一共有 4 个`script`标签。第一个是加载 Traceur 的库文件,第二个和第三个是将这个库文件用于浏览器环境,第四个则是加载用户脚本,这个脚本里面可以使用 ES6 代码。 + +注意,第四个`script`标签的`type`属性的值是`module`,而不是`text/javascript`。这是 Traceur 编译器识别 ES6 代码的标志,编译器会自动将所有`type=module`的代码编译为 ES5,然后再交给浏览器执行。 + +除了引用外部 ES6 脚本,也可以直接在网页中放置 ES6 代码。 + +```javascript +<script type="module"> + class Calc { + constructor() { + console.log('Calc constructor'); + } + add(a, b) { + return a + b; + } + } + + var c = new Calc(); + console.log(c.add(4,5)); +</script> +``` + +正常情况下,上面代码会在控制台打印出`9`。 + +如果想对 Traceur 的行为有精确控制,可以采用下面参数配置的写法。 + +```javascript +<script> + // Create the System object + window.System = new traceur.runtime.BrowserTraceurLoader(); + // Set some experimental options + var metadata = { + traceurOptions: { + experimental: true, + properTailCalls: true, + symbols: true, + arrayComprehension: true, + asyncFunctions: true, + asyncGenerators: exponentiation, + forOn: true, + generatorComprehension: true + } + }; + // Load your module + System.import('./myModule.js', {metadata: metadata}).catch(function(ex) { + console.error('Import failed', ex.stack || ex); + }); +</script> +``` + +上面代码中,首先生成 Traceur 的全局对象`window.System`,然后`System.import`方法可以用来加载 ES6。加载的时候,需要传入一个配置对象`metadata`,该对象的`traceurOptions`属性可以配置支持 ES6 功能。如果设为`experimental: true`,就表示除了 ES6 以外,还支持一些实验性的新功能。 + +### 在线转换 + +Traceur 也提供一个[在线编译器](http://google.github.io/traceur-compiler/demo/repl.html),可以在线将 ES6 代码转为 ES5 代码。转换后的代码,可以直接作为 ES5 代码插入网页运行。 + +上面的例子转为 ES5 代码运行,就是下面这个样子。 + +```javascript +<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script> +<script src="https://google.github.io/traceur-compiler/bin/BrowserSystem.js"></script> +<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script> +<script> +$traceurRuntime.ModuleStore.getAnonymousModule(function() { + "use strict"; + + var Calc = function Calc() { + console.log('Calc constructor'); + }; + + ($traceurRuntime.createClass)(Calc, {add: function(a, b) { + return a + b; + }}, {}); + + var c = new Calc(); + console.log(c.add(4, 5)); + return {}; +}); +</script> +``` + +### 命令行转换 + +作为命令行工具使用时,Traceur 是一个 Node 的模块,首先需要用 npm 安装。 + +```bash +$ npm install -g traceur +``` + +安装成功后,就可以在命令行下使用 Traceur 了。 + +Traceur 直接运行 ES6 脚本文件,会在标准输出显示运行结果,以前面的`calc.js`为例。 + +```bash +$ traceur calc.js +Calc constructor +9 +``` + +如果要将 ES6 脚本转为 ES5 保存,要采用下面的写法。 + +```bash +$ traceur --script calc.es6.js --out calc.es5.js +``` + +上面代码的`--script`选项表示指定输入文件,`--out`选项表示指定输出文件。 + +为了防止有些特性编译不成功,最好加上`--experimental`选项。 + +```bash +$ traceur --script calc.es6.js --out calc.es5.js --experimental +``` + +命令行下转换生成的文件,就可以直接放到浏览器中运行。 + +### Node 环境的用法 + +Traceur 的 Node 用法如下(假定已安装`traceur`模块)。 + +```javascript +var traceur = require('traceur'); +var fs = require('fs'); + +// 将 ES6 脚本转为字符串 +var contents = fs.readFileSync('es6-file.js').toString(); + +var result = traceur.compile(contents, { + filename: 'es6-file.js', + sourceMap: true, + // 其他设置 + modules: 'commonjs' +}); + +if (result.error) + throw result.error; + +// result 对象的 js 属性就是转换后的 ES5 代码 +fs.writeFileSync('out.js', result.js); +// sourceMap 属性对应 map 文件 +fs.writeFileSync('out.js.map', result.sourceMap); +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/iterator.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/iterator.md" new file mode 100755 index 000000000..a39352c4a --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/iterator.md" @@ -0,0 +1,820 @@ +# Iterator 和 for...of 循环 + +## Iterator(遍历器)的概念 + +JavaScript 原有的表示“集合”的数据结构,主要是数组(`Array`)和对象(`Object`),ES6 又添加了`Map`和`Set`。这样就有了四种数据集合,用户还可以组合使用它们,定义自己的数据结构,比如数组的成员是`Map`,`Map`的成员是对象。这样就需要一种统一的接口机制,来处理所有不同的数据结构。 + +遍历器(Iterator)就是这样一种机制。它是一种接口,为各种不同的数据结构提供统一的访问机制。任何数据结构只要部署 Iterator 接口,就可以完成遍历操作(即依次处理该数据结构的所有成员)。 + +Iterator 的作用有三个:一是为各种数据结构,提供一个统一的、简便的访问接口;二是使得数据结构的成员能够按某种次序排列;三是 ES6 创造了一种新的遍历命令`for...of`循环,Iterator 接口主要供`for...of`消费。 + +Iterator 的遍历过程是这样的。 + +(1)创建一个指针对象,指向当前数据结构的起始位置。也就是说,遍历器对象本质上,就是一个指针对象。 + +(2)第一次调用指针对象的`next`方法,可以将指针指向数据结构的第一个成员。 + +(3)第二次调用指针对象的`next`方法,指针就指向数据结构的第二个成员。 + +(4)不断调用指针对象的`next`方法,直到它指向数据结构的结束位置。 + +每一次调用`next`方法,都会返回数据结构的当前成员的信息。具体来说,就是返回一个包含`value`和`done`两个属性的对象。其中,`value`属性是当前成员的值,`done`属性是一个布尔值,表示遍历是否结束。 + +下面是一个模拟`next`方法返回值的例子。 + +```javascript +var it = makeIterator(['a', 'b']); + +it.next() // { value: "a", done: false } +it.next() // { value: "b", done: false } +it.next() // { value: undefined, done: true } + +function makeIterator(array) { + var nextIndex = 0; + return { + next: function() { + return nextIndex < array.length ? + {value: array[nextIndex++], done: false} : + {value: undefined, done: true}; + } + }; +} +``` + +上面代码定义了一个`makeIterator`函数,它是一个遍历器生成函数,作用就是返回一个遍历器对象。对数组`['a', 'b']`执行这个函数,就会返回该数组的遍历器对象(即指针对象)`it`。 + +指针对象的`next`方法,用来移动指针。开始时,指针指向数组的开始位置。然后,每次调用`next`方法,指针就会指向数组的下一个成员。第一次调用,指向`a`;第二次调用,指向`b`。 + +`next`方法返回一个对象,表示当前数据成员的信息。这个对象具有`value`和`done`两个属性,`value`属性返回当前位置的成员,`done`属性是一个布尔值,表示遍历是否结束,即是否还有必要再一次调用`next`方法。 + +总之,调用指针对象的`next`方法,就可以遍历事先给定的数据结构。 + +对于遍历器对象来说,`done: false`和`value: undefined`属性都是可以省略的,因此上面的`makeIterator`函数可以简写成下面的形式。 + +```javascript +function makeIterator(array) { + var nextIndex = 0; + return { + next: function() { + return nextIndex < array.length ? + {value: array[nextIndex++]} : + {done: true}; + } + }; +} +``` + +由于 Iterator 只是把接口规格加到数据结构之上,所以,遍历器与它所遍历的那个数据结构,实际上是分开的,完全可以写出没有对应数据结构的遍历器对象,或者说用遍历器对象模拟出数据结构。下面是一个无限运行的遍历器对象的例子。 + +```javascript +var it = idMaker(); + +it.next().value // 0 +it.next().value // 1 +it.next().value // 2 +// ... + +function idMaker() { + var index = 0; + + return { + next: function() { + return {value: index++, done: false}; + } + }; +} +``` + +上面的例子中,遍历器生成函数`idMaker`,返回一个遍历器对象(即指针对象)。但是并没有对应的数据结构,或者说,遍历器对象自己描述了一个数据结构出来。 + +如果使用 TypeScript 的写法,遍历器接口(Iterable)、指针对象(Iterator)和`next`方法返回值的规格可以描述如下。 + +```javascript +interface Iterable { + [Symbol.iterator]() : Iterator, +} + +interface Iterator { + next(value?: any) : IterationResult, +} + +interface IterationResult { + value: any, + done: boolean, +} +``` + +## 默认 Iterator 接口 + +Iterator 接口的目的,就是为所有数据结构,提供了一种统一的访问机制,即`for...of`循环(详见下文)。当使用`for...of`循环遍历某种数据结构时,该循环会自动去寻找 Iterator 接口。 + +一种数据结构只要部署了 Iterator 接口,我们就称这种数据结构是“可遍历的”(iterable)。 + +ES6 规定,默认的 Iterator 接口部署在数据结构的`Symbol.iterator`属性,或者说,一个数据结构只要具有`Symbol.iterator`属性,就可以认为是“可遍历的”(iterable)。`Symbol.iterator`属性本身是一个函数,就是当前数据结构默认的遍历器生成函数。执行这个函数,就会返回一个遍历器。至于属性名`Symbol.iterator`,它是一个表达式,返回`Symbol`对象的`iterator`属性,这是一个预定义好的、类型为 Symbol 的特殊值,所以要放在方括号内(参见《Symbol》一章)。 + +```javascript +const obj = { + [Symbol.iterator] : function () { + return { + next: function () { + return { + value: 1, + done: true + }; + } + }; + } +}; +``` + +上面代码中,对象`obj`是可遍历的(iterable),因为具有`Symbol.iterator`属性。执行这个属性,会返回一个遍历器对象。该对象的根本特征就是具有`next`方法。每次调用`next`方法,都会返回一个代表当前成员的信息对象,具有`value`和`done`两个属性。 + +ES6 的有些数据结构原生具备 Iterator 接口(比如数组),即不用任何处理,就可以被`for...of`循环遍历。原因在于,这些数据结构原生部署了`Symbol.iterator`属性(详见下文),另外一些数据结构没有(比如对象)。凡是部署了`Symbol.iterator`属性的数据结构,就称为部署了遍历器接口。调用这个接口,就会返回一个遍历器对象。 + +原生具备 Iterator 接口的数据结构如下。 + +- Array +- Map +- Set +- String +- TypedArray +- 函数的 arguments 对象 +- NodeList 对象 + +下面的例子是数组的`Symbol.iterator`属性。 + +```javascript +let arr = ['a', 'b', 'c']; +let iter = arr[Symbol.iterator](); + +iter.next() // { value: 'a', done: false } +iter.next() // { value: 'b', done: false } +iter.next() // { value: 'c', done: false } +iter.next() // { value: undefined, done: true } +``` + +上面代码中,变量`arr`是一个数组,原生就具有遍历器接口,部署在`arr`的`Symbol.iterator`属性上面。所以,调用这个属性,就得到遍历器对象。 + +对于原生部署 Iterator 接口的数据结构,不用自己写遍历器生成函数,`for...of`循环会自动遍历它们。除此之外,其他数据结构(主要是对象)的 Iterator 接口,都需要自己在`Symbol.iterator`属性上面部署,这样才会被`for...of`循环遍历。 + +对象(Object)之所以没有默认部署 Iterator 接口,是因为对象的哪个属性先遍历,哪个属性后遍历是不确定的,需要开发者手动指定。本质上,遍历器是一种线性处理,对于任何非线性的数据结构,部署遍历器接口,就等于部署一种线性转换。不过,严格地说,对象部署遍历器接口并不是很必要,因为这时对象实际上被当作 Map 结构使用,ES5 没有 Map 结构,而 ES6 原生提供了。 + +一个对象如果要具备可被`for...of`循环调用的 Iterator 接口,就必须在`Symbol.iterator`的属性上部署遍历器生成方法(原型链上的对象具有该方法也可)。 + +```javascript +class RangeIterator { + constructor(start, stop) { + this.value = start; + this.stop = stop; + } + + [Symbol.iterator]() { return this; } + + next() { + var value = this.value; + if (value < this.stop) { + this.value++; + return {done: false, value: value}; + } + return {done: true, value: undefined}; + } +} + +function range(start, stop) { + return new RangeIterator(start, stop); +} + +for (var value of range(0, 3)) { + console.log(value); // 0, 1, 2 +} +``` + +上面代码是一个类部署 Iterator 接口的写法。`Symbol.iterator`属性对应一个函数,执行后返回当前对象的遍历器对象。 + +下面是通过遍历器实现指针结构的例子。 + +```javascript +function Obj(value) { + this.value = value; + this.next = null; +} + +Obj.prototype[Symbol.iterator] = function() { + var iterator = { next: next }; + + var current = this; + + function next() { + if (current) { + var value = current.value; + current = current.next; + return { done: false, value: value }; + } else { + return { done: true }; + } + } + return iterator; +} + +var one = new Obj(1); +var two = new Obj(2); +var three = new Obj(3); + +one.next = two; +two.next = three; + +for (var i of one){ + console.log(i); // 1, 2, 3 +} +``` + +上面代码首先在构造函数的原型链上部署`Symbol.iterator`方法,调用该方法会返回遍历器对象`iterator`,调用该对象的`next`方法,在返回一个值的同时,自动将内部指针移到下一个实例。 + +下面是另一个为对象添加 Iterator 接口的例子。 + +```javascript +let obj = { + data: [ 'hello', 'world' ], + [Symbol.iterator]() { + const self = this; + let index = 0; + return { + next() { + if (index < self.data.length) { + return { + value: self.data[index++], + done: false + }; + } else { + return { value: undefined, done: true }; + } + } + }; + } +}; +``` + +对于类似数组的对象(存在数值键名和`length`属性),部署 Iterator 接口,有一个简便方法,就是`Symbol.iterator`方法直接引用数组的 Iterator 接口。 + +```javascript +NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; +// 或者 +NodeList.prototype[Symbol.iterator] = [][Symbol.iterator]; + +[...document.querySelectorAll('div')] // 可以执行了 +``` + +NodeList 对象是类似数组的对象,本来就具有遍历接口,可以直接遍历。上面代码中,我们将它的遍历接口改成数组的`Symbol.iterator`属性,可以看到没有任何影响。 + +下面是另一个类似数组的对象调用数组的`Symbol.iterator`方法的例子。 + +```javascript +let iterable = { + 0: 'a', + 1: 'b', + 2: 'c', + length: 3, + [Symbol.iterator]: Array.prototype[Symbol.iterator] +}; +for (let item of iterable) { + console.log(item); // 'a', 'b', 'c' +} +``` + +注意,普通对象部署数组的`Symbol.iterator`方法,并无效果。 + +```javascript +let iterable = { + a: 'a', + b: 'b', + c: 'c', + length: 3, + [Symbol.iterator]: Array.prototype[Symbol.iterator] +}; +for (let item of iterable) { + console.log(item); // undefined, undefined, undefined +} +``` + +如果`Symbol.iterator`方法对应的不是遍历器生成函数(即会返回一个遍历器对象),解释引擎将会报错。 + +```javascript +var obj = {}; + +obj[Symbol.iterator] = () => 1; + +[...obj] // TypeError: [] is not a function +``` + +上面代码中,变量`obj`的`Symbol.iterator`方法对应的不是遍历器生成函数,因此报错。 + +有了遍历器接口,数据结构就可以用`for...of`循环遍历(详见下文),也可以使用`while`循环遍历。 + +```javascript +var $iterator = ITERABLE[Symbol.iterator](); +var $result = $iterator.next(); +while (!$result.done) { + var x = $result.value; + // ... + $result = $iterator.next(); +} +``` + +上面代码中,`ITERABLE`代表某种可遍历的数据结构,`$iterator`是它的遍历器对象。遍历器对象每次移动指针(`next`方法),都检查一下返回值的`done`属性,如果遍历还没结束,就移动遍历器对象的指针到下一步(`next`方法),不断循环。 + +## 调用 Iterator 接口的场合 + +有一些场合会默认调用 Iterator 接口(即`Symbol.iterator`方法),除了下文会介绍的`for...of`循环,还有几个别的场合。 + +**(1)解构赋值** + +对数组和 Set 结构进行解构赋值时,会默认调用`Symbol.iterator`方法。 + +```javascript +let set = new Set().add('a').add('b').add('c'); + +let [x,y] = set; +// x='a'; y='b' + +let [first, ...rest] = set; +// first='a'; rest=['b','c']; +``` + +**(2)扩展运算符** + +扩展运算符(...)也会调用默认的 Iterator 接口。 + +```javascript +// 例一 +var str = 'hello'; +[...str] // ['h','e','l','l','o'] + +// 例二 +let arr = ['b', 'c']; +['a', ...arr, 'd'] +// ['a', 'b', 'c', 'd'] +``` + +上面代码的扩展运算符内部就调用 Iterator 接口。 + +实际上,这提供了一种简便机制,可以将任何部署了 Iterator 接口的数据结构,转为数组。也就是说,只要某个数据结构部署了 Iterator 接口,就可以对它使用扩展运算符,将其转为数组。 + +```javascript +let arr = [...iterable]; +``` + +**(3)yield\*** + +`yield*`后面跟的是一个可遍历的结构,它会调用该结构的遍历器接口。 + +```javascript +let generator = function* () { + yield 1; + yield* [2,3,4]; + yield 5; +}; + +var iterator = generator(); + +iterator.next() // { value: 1, done: false } +iterator.next() // { value: 2, done: false } +iterator.next() // { value: 3, done: false } +iterator.next() // { value: 4, done: false } +iterator.next() // { value: 5, done: false } +iterator.next() // { value: undefined, done: true } +``` + +**(4)其他场合** + +由于数组的遍历会调用遍历器接口,所以任何接受数组作为参数的场合,其实都调用了遍历器接口。下面是一些例子。 + +- for...of +- Array.from() +- Map(), Set(), WeakMap(), WeakSet()(比如`new Map([['a',1],['b',2]])`) +- Promise.all() +- Promise.race() + +## 字符串的 Iterator 接口 + +字符串是一个类似数组的对象,也原生具有 Iterator 接口。 + +```javascript +var someString = "hi"; +typeof someString[Symbol.iterator] +// "function" + +var iterator = someString[Symbol.iterator](); + +iterator.next() // { value: "h", done: false } +iterator.next() // { value: "i", done: false } +iterator.next() // { value: undefined, done: true } +``` + +上面代码中,调用`Symbol.iterator`方法返回一个遍历器对象,在这个遍历器上可以调用 next 方法,实现对于字符串的遍历。 + +可以覆盖原生的`Symbol.iterator`方法,达到修改遍历器行为的目的。 + +```javascript +var str = new String("hi"); + +[...str] // ["h", "i"] + +str[Symbol.iterator] = function() { + return { + next: function() { + if (this._first) { + this._first = false; + return { value: "bye", done: false }; + } else { + return { done: true }; + } + }, + _first: true + }; +}; + +[...str] // ["bye"] +str // "hi" +``` + +上面代码中,字符串 str 的`Symbol.iterator`方法被修改了,所以扩展运算符(`...`)返回的值变成了`bye`,而字符串本身还是`hi`。 + +## Iterator 接口与 Generator 函数 + +`Symbol.iterator`方法的最简单实现,还是使用下一章要介绍的 Generator 函数。 + +```javascript +let myIterable = { + [Symbol.iterator]: function* () { + yield 1; + yield 2; + yield 3; + } +} +[...myIterable] // [1, 2, 3] + +// 或者采用下面的简洁写法 + +let obj = { + * [Symbol.iterator]() { + yield 'hello'; + yield 'world'; + } +}; + +for (let x of obj) { + console.log(x); +} +// "hello" +// "world" +``` + +上面代码中,`Symbol.iterator`方法几乎不用部署任何代码,只要用 yield 命令给出每一步的返回值即可。 + +## 遍历器对象的 return(),throw() + +遍历器对象除了具有`next`方法,还可以具有`return`方法和`throw`方法。如果你自己写遍历器对象生成函数,那么`next`方法是必须部署的,`return`方法和`throw`方法是否部署是可选的。 + +`return`方法的使用场合是,如果`for...of`循环提前退出(通常是因为出错,或者有`break`语句),就会调用`return`方法。如果一个对象在完成遍历前,需要清理或释放资源,就可以部署`return`方法。 + +```javascript +function readLinesSync(file) { + return { + [Symbol.iterator]() { + return { + next() { + return { done: false }; + }, + return() { + file.close(); + return { done: true }; + } + }; + }, + }; +} +``` + +上面代码中,函数`readLinesSync`接受一个文件对象作为参数,返回一个遍历器对象,其中除了`next`方法,还部署了`return`方法。下面的两种情况,都会触发执行`return`方法。 + +```javascript +// 情况一 +for (let line of readLinesSync(fileName)) { + console.log(line); + break; +} + +// 情况二 +for (let line of readLinesSync(fileName)) { + console.log(line); + throw new Error(); +} +``` + +上面代码中,情况一输出文件的第一行以后,就会执行`return`方法,关闭这个文件;情况二会在执行`return`方法关闭文件之后,再抛出错误。 + +注意,`return`方法必须返回一个对象,这是 Generator 规格决定的。 + +`throw`方法主要是配合 Generator 函数使用,一般的遍历器对象用不到这个方法。请参阅《Generator 函数》一章。 + +## for...of 循环 + +ES6 借鉴 C++、Java、C# 和 Python 语言,引入了`for...of`循环,作为遍历所有数据结构的统一的方法。 + +一个数据结构只要部署了`Symbol.iterator`属性,就被视为具有 iterator 接口,就可以用`for...of`循环遍历它的成员。也就是说,`for...of`循环内部调用的是数据结构的`Symbol.iterator`方法。 + +`for...of`循环可以使用的范围包括数组、Set 和 Map 结构、某些类似数组的对象(比如`arguments`对象、DOM NodeList 对象)、后文的 Generator 对象,以及字符串。 + +### 数组 + +数组原生具备`iterator`接口(即默认部署了`Symbol.iterator`属性),`for...of`循环本质上就是调用这个接口产生的遍历器,可以用下面的代码证明。 + +```javascript +const arr = ['red', 'green', 'blue']; + +for(let v of arr) { + console.log(v); // red green blue +} + +const obj = {}; +obj[Symbol.iterator] = arr[Symbol.iterator].bind(arr); + +for(let v of obj) { + console.log(v); // red green blue +} +``` + +上面代码中,空对象`obj`部署了数组`arr`的`Symbol.iterator`属性,结果`obj`的`for...of`循环,产生了与`arr`完全一样的结果。 + +`for...of`循环可以代替数组实例的`forEach`方法。 + +```javascript +const arr = ['red', 'green', 'blue']; + +arr.forEach(function (element, index) { + console.log(element); // red green blue + console.log(index); // 0 1 2 +}); +``` + +JavaScript 原有的`for...in`循环,只能获得对象的键名,不能直接获取键值。ES6 提供`for...of`循环,允许遍历获得键值。 + +```javascript +var arr = ['a', 'b', 'c', 'd']; + +for (let a in arr) { + console.log(a); // 0 1 2 3 +} + +for (let a of arr) { + console.log(a); // a b c d +} +``` + +上面代码表明,`for...in`循环读取键名,`for...of`循环读取键值。如果要通过`for...of`循环,获取数组的索引,可以借助数组实例的`entries`方法和`keys`方法(参见《数组的扩展》一章)。 + +`for...of`循环调用遍历器接口,数组的遍历器接口只返回具有数字索引的属性。这一点跟`for...in`循环也不一样。 + +```javascript +let arr = [3, 5, 7]; +arr.foo = 'hello'; + +for (let i in arr) { + console.log(i); // "0", "1", "2", "foo" +} + +for (let i of arr) { + console.log(i); // "3", "5", "7" +} +``` + +上面代码中,`for...of`循环不会返回数组`arr`的`foo`属性。 + +### Set 和 Map 结构 + +Set 和 Map 结构也原生具有 Iterator 接口,可以直接使用`for...of`循环。 + +```javascript +var engines = new Set(["Gecko", "Trident", "Webkit", "Webkit"]); +for (var e of engines) { + console.log(e); +} +// Gecko +// Trident +// Webkit + +var es6 = new Map(); +es6.set("edition", 6); +es6.set("committee", "TC39"); +es6.set("standard", "ECMA-262"); +for (var [name, value] of es6) { + console.log(name + ": " + value); +} +// edition: 6 +// committee: TC39 +// standard: ECMA-262 +``` + +上面代码演示了如何遍历 Set 结构和 Map 结构。值得注意的地方有两个,首先,遍历的顺序是按照各个成员被添加进数据结构的顺序。其次,Set 结构遍历时,返回的是一个值,而 Map 结构遍历时,返回的是一个数组,该数组的两个成员分别为当前 Map 成员的键名和键值。 + +```javascript +let map = new Map().set('a', 1).set('b', 2); +for (let pair of map) { + console.log(pair); +} +// ['a', 1] +// ['b', 2] + +for (let [key, value] of map) { + console.log(key + ' : ' + value); +} +// a : 1 +// b : 2 +``` + +### 计算生成的数据结构 + +有些数据结构是在现有数据结构的基础上,计算生成的。比如,ES6 的数组、Set、Map 都部署了以下三个方法,调用后都返回遍历器对象。 + +- `entries()` 返回一个遍历器对象,用来遍历`[键名, 键值]`组成的数组。对于数组,键名就是索引值;对于 Set,键名与键值相同。Map 结构的 Iterator 接口,默认就是调用`entries`方法。 +- `keys()` 返回一个遍历器对象,用来遍历所有的键名。 +- `values()` 返回一个遍历器对象,用来遍历所有的键值。 + +这三个方法调用后生成的遍历器对象,所遍历的都是计算生成的数据结构。 + +```javascript +let arr = ['a', 'b', 'c']; +for (let pair of arr.entries()) { + console.log(pair); +} +// [0, 'a'] +// [1, 'b'] +// [2, 'c'] +``` + +### 类似数组的对象 + +类似数组的对象包括好几类。下面是`for...of`循环用于字符串、DOM NodeList 对象、`arguments`对象的例子。 + +```javascript +// 字符串 +let str = "hello"; + +for (let s of str) { + console.log(s); // h e l l o +} + +// DOM NodeList对象 +let paras = document.querySelectorAll("p"); + +for (let p of paras) { + p.classList.add("test"); +} + +// arguments对象 +function printArgs() { + for (let x of arguments) { + console.log(x); + } +} +printArgs('a', 'b'); +// 'a' +// 'b' +``` + +对于字符串来说,`for...of`循环还有一个特点,就是会正确识别 32 位 UTF-16 字符。 + +```javascript +for (let x of 'a\uD83D\uDC0A') { + console.log(x); +} +// 'a' +// '\uD83D\uDC0A' +``` + +并不是所有类似数组的对象都具有 Iterator 接口,一个简便的解决方法,就是使用`Array.from`方法将其转为数组。 + +```javascript +let arrayLike = { length: 2, 0: 'a', 1: 'b' }; + +// 报错 +for (let x of arrayLike) { + console.log(x); +} + +// 正确 +for (let x of Array.from(arrayLike)) { + console.log(x); +} +``` + +### 对象 + +对于普通的对象,`for...of`结构不能直接使用,会报错,必须部署了 Iterator 接口后才能使用。但是,这样情况下,`for...in`循环依然可以用来遍历键名。 + +```javascript +let es6 = { + edition: 6, + committee: "TC39", + standard: "ECMA-262" +}; + +for (let e in es6) { + console.log(e); +} +// edition +// committee +// standard + +for (let e of es6) { + console.log(e); +} +// TypeError: es6[Symbol.iterator] is not a function +``` + +上面代码表示,对于普通的对象,`for...in`循环可以遍历键名,`for...of`循环会报错。 + +一种解决方法是,使用`Object.keys`方法将对象的键名生成一个数组,然后遍历这个数组。 + +```javascript +for (var key of Object.keys(someObject)) { + console.log(key + ': ' + someObject[key]); +} +``` + +另一个方法是使用 Generator 函数将对象重新包装一下。 + +```javascript +function* entries(obj) { + for (let key of Object.keys(obj)) { + yield [key, obj[key]]; + } +} + +for (let [key, value] of entries(obj)) { + console.log(key, '->', value); +} +// a -> 1 +// b -> 2 +// c -> 3 +``` + +### 与其他遍历语法的比较 + +以数组为例,JavaScript 提供多种遍历语法。最原始的写法就是`for`循环。 + +```javascript +for (var index = 0; index < myArray.length; index++) { + console.log(myArray[index]); +} +``` + +这种写法比较麻烦,因此数组提供内置的`forEach`方法。 + +```javascript +myArray.forEach(function (value) { + console.log(value); +}); +``` + +这种写法的问题在于,无法中途跳出`forEach`循环,`break`命令或`return`命令都不能奏效。 + +`for...in`循环可以遍历数组的键名。 + +```javascript +for (var index in myArray) { + console.log(myArray[index]); +} +``` + +`for...in`循环有几个缺点。 + +- 数组的键名是数字,但是`for...in`循环是以字符串作为键名“0”、“1”、“2”等等。 +- `for...in`循环不仅遍历数字键名,还会遍历手动添加的其他键,甚至包括原型链上的键。 +- 某些情况下,`for...in`循环会以任意顺序遍历键名。 + +总之,`for...in`循环主要是为遍历对象而设计的,不适用于遍历数组。 + +`for...of`循环相比上面几种做法,有一些显著的优点。 + +```javascript +for (let value of myArray) { + console.log(value); +} +``` + +- 有着同`for...in`一样的简洁语法,但是没有`for...in`那些缺点。 +- 不同于`forEach`方法,它可以与`break`、`continue`和`return`配合使用。 +- 提供了遍历所有数据结构的统一操作接口。 + +下面是一个使用 break 语句,跳出`for...of`循环的例子。 + +```javascript +for (var n of fibonacci) { + if (n > 1000) + break; + console.log(n); +} +``` + +上面的例子,会输出斐波纳契数列小于等于 1000 的项。如果当前项大于 1000,就会使用`break`语句跳出`for...of`循环。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/let.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/let.md" old mode 100644 new mode 100755 similarity index 76% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/let.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/let.md" index 7c42ed921..741e876a1 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/let.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/let.md" @@ -1,10 +1,10 @@ -# let和const命令 +# let 和 const 命令 -## let命令 +## let 命令 ### 基本用法 -ES6新增了`let`命令,用来声明变量。它的用法类似于`var`,但是所声明的变量,只在`let`命令所在的代码块内有效。 +ES6 新增了`let`命令,用来声明变量。它的用法类似于`var`,但是所声明的变量,只在`let`命令所在的代码块内有效。 ```javascript { @@ -21,10 +21,12 @@ b // 1 `for`循环的计数器,就很合适使用`let`命令。 ```javascript -for (let i = 0; i < 10; i++) {} +for (let i = 0; i < 10; i++) { + // ... +} console.log(i); -//ReferenceError: i is not defined +// ReferenceError: i is not defined ``` 上面代码中,计数器`i`只在`for`循环体内有效,在循环体外引用就会报错。 @@ -41,9 +43,9 @@ for (var i = 0; i < 10; i++) { a[6](); // 10 ``` -上面代码中,变量`i`是`var`声明的,在全局范围内都有效,所以全局只有一个变量`i`。每一次循环,变量`i`的值都会发生改变,而循环内被赋给数组`a`的`function`在运行时,会通过闭包读到这同一个变量`i`,导致最后输出的是最后一轮的`i`的值,也就是10。 +上面代码中,变量`i`是`var`命令声明的,在全局范围内都有效,所以全局只有一个变量`i`。每一次循环,变量`i`的值都会发生改变,而循环内被赋给数组`a`的函数内部的`console.log(i)`,里面的`i`指向的就是全局的`i`。也就是说,所有数组`a`的成员里面的`i`,指向的都是同一个`i`,导致运行时输出的是最后一轮的`i`的值,也就是 10。 -而如果使用`let`,声明的变量仅在块级作用域内有效,最后输出的是6。 +如果使用`let`,声明的变量仅在块级作用域内有效,最后输出的是 6。 ```javascript var a = []; @@ -57,7 +59,7 @@ a[6](); // 6 上面代码中,变量`i`是`let`声明的,当前的`i`只在本轮循环有效,所以每一次循环的`i`其实都是一个新的变量,所以最后输出的是`6`。你可能会问,如果每一轮循环的变量`i`都是重新声明的,那它怎么知道上一轮循环的值,从而计算出本轮循环的值?这是因为 JavaScript 引擎内部会记住上一轮循环的值,初始化本轮的变量`i`时,就在上一轮循环的基础上进行计算。 -另外,`for`循环还有一个特别之处,就是循环语句部分是一个父作用域,而循环体内部是一个单独的子作用域。 +另外,`for`循环还有一个特别之处,就是设置循环变量的那部分是一个父作用域,而循环体内部是一个单独的子作用域。 ```javascript for (let i = 0; i < 3; i++) { @@ -69,11 +71,11 @@ for (let i = 0; i < 3; i++) { // abc ``` -上面代码输出了3次`abc`,这表明函数内部的变量`i`和外部的变量`i`是分离的。 +上面代码正确运行,输出了 3 次`abc`。这表明函数内部的变量`i`与循环变量`i`不在同一个作用域,有各自单独的作用域。 ### 不存在变量提升 -`var`命令会发生”变量提升“现象,即变量可以在声明之前使用,值为`undefined`。这种现象多多少少是有些奇怪的,按照一般的逻辑,变量应该在声明语句之后才可以使用。 +`var`命令会发生“变量提升”现象,即变量可以在声明之前使用,值为`undefined`。这种现象多多少少是有些奇怪的,按照一般的逻辑,变量应该在声明语句之后才可以使用。 为了纠正这种现象,`let`命令改变了语法行为,它所声明的变量一定要在声明后使用,否则报错。 @@ -104,7 +106,7 @@ if (true) { 上面代码中,存在全局变量`tmp`,但是块级作用域内`let`又声明了一个局部变量`tmp`,导致后者绑定这个块级作用域,所以在`let`声明变量前,对`tmp`赋值会报错。 -ES6明确规定,如果区块中存在`let`和`const`命令,这个区块对这些命令声明的变量,从一开始就形成了封闭作用域。凡是在声明之前就使用这些变量,就会报错。 +ES6 明确规定,如果区块中存在`let`和`const`命令,这个区块对这些命令声明的变量,从一开始就形成了封闭作用域。凡是在声明之前就使用这些变量,就会报错。 总之,在代码块内,使用`let`命令声明变量之前,该变量都是不可用的。这在语法上,称为“暂时性死区”(temporal dead zone,简称 TDZ)。 @@ -151,7 +153,7 @@ function bar(x = y, y = 2) { bar(); // 报错 ``` -上面代码中,调用`bar`函数之所以报错(某些实现可能不报错),是因为参数`x`默认值等于另一个参数`y`,而此时`y`还没有声明,属于”死区“。如果`y`的默认值是`x`,就不会报错,因为此时`x`已经声明了。 +上面代码中,调用`bar`函数之所以报错(某些实现可能不报错),是因为参数`x`默认值等于另一个参数`y`,而此时`y`还没有声明,属于“死区”。如果`y`的默认值是`x`,就不会报错,因为此时`x`已经声明了。 ```javascript function bar(x = 2, y = x) { @@ -183,13 +185,13 @@ ES6 规定暂时性死区和`let`、`const`语句不出现变量提升,主要 ```javascript // 报错 -function () { +function func() { let a = 10; var a = 1; } // 报错 -function () { +function func() { let a = 10; let a = 1; } @@ -199,14 +201,16 @@ function () { ```javascript function func(arg) { - let arg; // 报错 + let arg; } +func() // 报错 function func(arg) { { - let arg; // 不报错 + let arg; } } +func() // 不报错 ``` ## 块级作用域 @@ -260,7 +264,7 @@ function f1() { } ``` -上面的函数有两个代码块,都声明了变量`n`,运行后输出5。这表示外层代码块不受内层代码块的影响。如果使用`var`定义变量`n`,最后输出的值就是10。 +上面的函数有两个代码块,都声明了变量`n`,运行后输出 5。这表示外层代码块不受内层代码块的影响。如果两次都使用`var`定义变量`n`,最后输出的值才是 10。 ES6 允许块级作用域的任意嵌套。 @@ -357,7 +361,7 @@ function f() { console.log('I am outside!'); } ES6 就完全不一样了,理论上会得到“I am outside!”。因为块级作用域内声明的函数类似于`let`,对作用域之外没有影响。但是,如果你真的在 ES6 浏览器中运行一下上面的代码,是会报错的,这是为什么呢? -原来,如果改变了块级作用域内声明的函数的处理规则,显然会对老代码产生很大影响。为了减轻因此产生的不兼容问题,ES6在[附录B](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-block-level-function-declarations-web-legacy-compatibility-semantics)里面规定,浏览器的实现可以不遵守上面的规定,有自己的[行为方式](http://stackoverflow.com/questions/31419897/what-are-the-precise-semantics-of-block-level-functions-in-es6)。 +原来,如果改变了块级作用域内声明的函数的处理规则,显然会对老代码产生很大影响。为了减轻因此产生的不兼容问题,ES6 在[附录 B](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-block-level-function-declarations-web-legacy-compatibility-semantics)里面规定,浏览器的实现可以不遵守上面的规定,有自己的[行为方式](http://stackoverflow.com/questions/31419897/what-are-the-precise-semantics-of-block-level-functions-in-es6)。 - 允许在块级作用域内声明函数。 - 函数声明类似于`var`,即会提升到全局作用域或函数作用域的头部。 @@ -433,30 +437,6 @@ if (true) function f() {} ``` -### do 表达式 - -本质上,块级作用域是一个语句,将多个操作封装在一起,没有返回值。 - -```javascript -{ - let t = f(); - t = t * t + 1; -} -``` - -上面代码中,块级作用域将两个语句封装在一起。但是,在块级作用域以外,没有办法得到`t`的值,因为块级作用域不返回值,除非`t`是全局变量。 - -现在有一个[提案](http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions),使得块级作用域可以变为表达式,也就是说可以返回值,办法就是在块级作用域之前加上`do`,使它变为`do`表达式。 - -```javascript -let x = do { - let t = f(); - t * t + 1; -}; -``` - -上面代码中,变量`x`会得到整个块级作用域的返回值。 - ## const 命令 ### 基本用法 @@ -516,7 +496,7 @@ const age = 30; ### 本质 -`const`实际上保证的,并不是变量的值不得改动,而是变量指向的那个内存地址不得改动。对于简单类型的数据(数值、字符串、布尔值),值就保存在变量指向的那个内存地址,因此等同于常量。但对于复合类型的数据(主要是对象和数组),变量指向的内存地址,保存的只是一个指针,`const`只能保证这个指针是固定的,至于它指向的数据结构是不是可变的,就完全不能控制了。因此,将一个对象声明为常量必须非常小心。 +`const`实际上保证的,并不是变量的值不得改动,而是变量指向的那个内存地址所保存的数据不得改动。对于简单类型的数据(数值、字符串、布尔值),值就保存在变量指向的那个内存地址,因此等同于常量。但对于复合类型的数据(主要是对象和数组),变量指向的内存地址,保存的只是一个指向实际数据的指针,`const`只能保证这个指针是固定的(即总是指向另一个固定的地址),至于它指向的数据结构是不是可变的,就完全不能控制了。因此,将一个对象声明为常量必须非常小心。 ```javascript const foo = {}; @@ -569,11 +549,11 @@ var constantize = (obj) => { ### ES6 声明变量的六种方法 -ES5 只有两种声明变量的方法:`var`命令和`function`命令。ES6除了添加`let`和`const`命令,后面章节还会提到,另外两种声明变量的方法:`import`命令和`class`命令。所以,ES6 一共有6种声明变量的方法。 +ES5 只有两种声明变量的方法:`var`命令和`function`命令。ES6 除了添加`let`和`const`命令,后面章节还会提到,另外两种声明变量的方法:`import`命令和`class`命令。所以,ES6 一共有 6 种声明变量的方法。 ## 顶层对象的属性 -顶层对象,在浏览器环境指的是`window`对象,在Node指的是`global`对象。ES5之中,顶层对象的属性与全局变量是等价的。 +顶层对象,在浏览器环境指的是`window`对象,在 Node 指的是`global`对象。ES5 之中,顶层对象的属性与全局变量是等价的。 ```javascript window.a = 1; @@ -585,14 +565,14 @@ window.a // 2 上面代码中,顶层对象的属性赋值与全局变量的赋值,是同一件事。 -顶层对象的属性与全局变量挂钩,被认为是JavaScript语言最大的设计败笔之一。这样的设计带来了几个很大的问题,首先是没法在编译时就报出变量未声明的错误,只有运行时才能知道(因为全局变量可能是顶层对象的属性创造的,而属性的创造是动态的);其次,程序员很容易不知不觉地就创建了全局变量(比如打字出错);最后,顶层对象的属性是到处可以读写的,这非常不利于模块化编程。另一方面,`window`对象有实体含义,指的是浏览器的窗口对象,顶层对象是一个有实体含义的对象,也是不合适的。 +顶层对象的属性与全局变量挂钩,被认为是 JavaScript 语言最大的设计败笔之一。这样的设计带来了几个很大的问题,首先是没法在编译时就报出变量未声明的错误,只有运行时才能知道(因为全局变量可能是顶层对象的属性创造的,而属性的创造是动态的);其次,程序员很容易不知不觉地就创建了全局变量(比如打字出错);最后,顶层对象的属性是到处可以读写的,这非常不利于模块化编程。另一方面,`window`对象有实体含义,指的是浏览器的窗口对象,顶层对象是一个有实体含义的对象,也是不合适的。 -ES6为了改变这一点,一方面规定,为了保持兼容性,`var`命令和`function`命令声明的全局变量,依旧是顶层对象的属性;另一方面规定,`let`命令、`const`命令、`class`命令声明的全局变量,不属于顶层对象的属性。也就是说,从ES6开始,全局变量将逐步与顶层对象的属性脱钩。 +ES6 为了改变这一点,一方面规定,为了保持兼容性,`var`命令和`function`命令声明的全局变量,依旧是顶层对象的属性;另一方面规定,`let`命令、`const`命令、`class`命令声明的全局变量,不属于顶层对象的属性。也就是说,从 ES6 开始,全局变量将逐步与顶层对象的属性脱钩。 ```javascript var a = 1; -// 如果在Node的REPL环境,可以写成global.a -// 或者采用通用方法,写成this.a +// 如果在 Node 的 REPL 环境,可以写成 global.a +// 或者采用通用方法,写成 this.a window.a // 1 let b = 1; @@ -603,17 +583,17 @@ window.b // undefined ## global 对象 -ES5的顶层对象,本身也是一个问题,因为它在各种实现里面是不统一的。 +ES5 的顶层对象,本身也是一个问题,因为它在各种实现里面是不统一的。 - 浏览器里面,顶层对象是`window`,但 Node 和 Web Worker 没有`window`。 -- 浏览器和 Web Worker 里面,`self`也指向顶层对象,但是Node没有`self`。 +- 浏览器和 Web Worker 里面,`self`也指向顶层对象,但是 Node 没有`self`。 - Node 里面,顶层对象是`global`,但其他环境都不支持。 同一段代码为了能够在各种环境,都能取到顶层对象,现在一般是使用`this`变量,但是有局限性。 -- 全局环境中,`this`会返回顶层对象。但是,Node模块和ES6模块中,`this`返回的是当前模块。 +- 全局环境中,`this`会返回顶层对象。但是,Node 模块和 ES6 模块中,`this`返回的是当前模块。 - 函数里面的`this`,如果函数不是作为对象的方法运行,而是单纯作为函数运行,`this`会指向顶层对象。但是,严格模式下,这时`this`会返回`undefined`。 -- 不管是严格模式,还是普通模式,`new Function('return this')()`,总是会返回全局对象。但是,如果浏览器用了CSP(Content Security Policy,内容安全政策),那么`eval`、`new Function`这些方法都可能无法使用。 +- 不管是严格模式,还是普通模式,`new Function('return this')()`,总是会返回全局对象。但是,如果浏览器用了 CSP(Content Security Policy,内容安全策略),那么`eval`、`new Function`这些方法都可能无法使用。 综上所述,很难找到一种方法,可以在所有情况下,都取到顶层对象。下面是两种勉强可以使用的方法。 @@ -641,23 +621,22 @@ var getGlobal = function () { 垫片库[`system.global`](https://github.com/ljharb/System.global)模拟了这个提案,可以在所有环境拿到`global`。 ```javascript -// CommonJS的写法 +// CommonJS 的写法 require('system.global/shim')(); -// ES6模块的写法 +// ES6 模块的写法 import shim from 'system.global/shim'; shim(); ``` 上面代码可以保证各种环境里面,`global`对象都是存在的。 ```javascript -// CommonJS的写法 +// CommonJS 的写法 var global = require('system.global')(); -// ES6模块的写法 +// ES6 模块的写法 import getGlobal from 'system.global'; const global = getGlobal(); ``` 上面代码将顶层对象放入变量`global`。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/mixin.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/mixin.md" new file mode 100755 index 000000000..153bad301 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/mixin.md" @@ -0,0 +1,96 @@ +# Mixin + +JavaScript 语言的设计是单一继承,即子类只能继承一个父类,不允许继承多个父类。这种设计保证了对象继承的层次结构是树状的,而不是复杂的[网状结构](https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem)。 + +但是,这大大降低了编程的灵活性。因为实际开发中,有时不可避免,子类需要继承多个父类。举例来说,“猫”可以继承“哺乳类动物”,也可以继承“宠物”。 + +各种单一继承的编程语言,有不同的多重继承解决方案。比如,Java 语言也是子类只能继承一个父类,但是还允许继承多个界面(interface),这样就间接实现了多重继承。Interface 与父类一样,也是一个类,只不过它只定义接口(method signature),不定义实现,因此又被称为“抽象类”。凡是继承于 Interface 的方法,都必须自己定义实现,否则就会报错。这样就避免了多重继承的最大问题:多个父类的同名方法的碰撞(naming collision)。 + +JavaScript 语言没有采用 Interface 的方案,而是通过代理(delegation)实现了从其他类引入方法。 + +```javascript +var Enumerable_first = function () { + this.first = function () { + return this[0]; + }; +}; + +var list = ["foo", "bar", "baz"]; +Enumerable_first.call(list); // explicit delegation +list.first() // "foo" +``` + +上面代码中,`list`是一个数组,本身并没有`first`方法。通过`call`方法,可以把`Enumerable_first`里面的方法,绑定到`list`,从而`list`就具有`first`方法。这就叫做“代理”(delegation),`list`对象代理了`Enumerable_first`的`first`方法。 + +## 含义 + +Mixin 这个名字来自于冰淇淋,在基本口味的冰淇淋上面混入其他口味,这就叫做 Mix-in。 + +它允许向一个类里面注入一些代码,使得一个类的功能能够“混入”另一个类。实质上是多重继承的一种解决方案,但是避免了多重继承的复杂性,而且有利于代码复用。 + +Mixin 就是一个正常的类,不仅定义了接口,还定义了接口的实现。 + +子类通过在`this`对象上面绑定方法,达到多重继承的目的。 + +很多库提供了 Mixin 功能。下面以 Lodash 为例。 + +```javascript +function vowels(string) { + return /[aeiou]/i.test(this.value); +} + +var obj = { value: 'hello' }; +_.mixin(obj, {vowels: vowels}) +obj.vowels() // true +``` + +上面代码通过 Lodash 库的`_.mixin`方法,让`obj`对象继承了`vowels`方法。 + +Underscore 的类似方法是`_.extend`。 + +```javascript +var Person = function (fName, lName) { + this.firstName = fName; + this.lastName = lName; +} + +var sam = new Person('Sam', 'Lowry'); + +var NameMixin = { + fullName: function () { + return this.firstName + ' ' + this.lastName; + }, + rename: function(first, last) { + this.firstName = first; + this.lastName = last; + return this; + } +}; +_.extend(Person.prototype, NameMixin); +sam.rename('Samwise', 'Gamgee'); +sam.fullName() // "Samwise Gamgee" +``` + +上面代码通过`_.extend`方法,在`sam`对象上面(准确说是它的原型对象`Person.prototype`上面),混入了`NameMixin`类。 + +`extend`方法的实现非常简单。 + +```javascript +function extend(destination, source) { + for (var k in source) { + if (source.hasOwnProperty(k)) { + destination[k] = source[k]; + } + } + return destination; +} +``` + +上面代码将`source`对象的所有方法,添加到`destination`对象。 + +## Trait + +Trait 是另外一种多重继承的解决方案。它与 Mixin 很相似,但是有一些细微的差别。 + +- Mixin 可以包含状态(state),Trait 不包含,即 Trait 里面的方法都是互不相干,可以线性包含的。比如,`Trait1`包含方法`A`和`B`,`Trait2`继承了`Trait1`,同时还包含一个自己的方法`C`,实际上就等同于直接包含方法`A`、`B`、`C`。 +- 对于同名方法的碰撞,Mixin 包含了解决规则,Trait 则是报错。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module-loader.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module-loader.md" new file mode 100755 index 000000000..4a3fa0e50 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module-loader.md" @@ -0,0 +1,811 @@ +# Module 的加载实现 + +上一章介绍了模块的语法,本章介绍如何在浏览器和 Node 之中加载 ES6 模块,以及实际开发中经常遇到的一些问题(比如循环加载)。 + +## 浏览器加载 + +### 传统方法 + +HTML 网页中,浏览器通过`<script>`标签加载 JavaScript 脚本。 + +```html +<!-- 页面内嵌的脚本 --> +<script type="application/javascript"> + // module code +</script> + +<!-- 外部脚本 --> +<script type="application/javascript" src="path/to/myModule.js"> +</script> +``` + +上面代码中,由于浏览器脚本的默认语言是 JavaScript,因此`type="application/javascript"`可以省略。 + +默认情况下,浏览器是同步加载 JavaScript 脚本,即渲染引擎遇到`<script>`标签就会停下来,等到执行完脚本,再继续向下渲染。如果是外部脚本,还必须加入脚本下载的时间。 + +如果脚本体积很大,下载和执行的时间就会很长,因此造成浏览器堵塞,用户会感觉到浏览器“卡死”了,没有任何响应。这显然是很不好的体验,所以浏览器允许脚本异步加载,下面就是两种异步加载的语法。 + +```html +<script src="path/to/myModule.js" defer></script> +<script src="path/to/myModule.js" async></script> +``` + +上面代码中,`<script>`标签打开`defer`或`async`属性,脚本就会异步加载。渲染引擎遇到这一行命令,就会开始下载外部脚本,但不会等它下载和执行,而是直接执行后面的命令。 + +`defer`与`async`的区别是:`defer`要等到整个页面在内存中正常渲染结束(DOM 结构完全生成,以及其他脚本执行完成),才会执行;`async`一旦下载完,渲染引擎就会中断渲染,执行这个脚本以后,再继续渲染。一句话,`defer`是“渲染完再执行”,`async`是“下载完就执行”。另外,如果有多个`defer`脚本,会按照它们在页面出现的顺序加载,而多个`async`脚本是不能保证加载顺序的。 + +### 加载规则 + +浏览器加载 ES6 模块,也使用`<script>`标签,但是要加入`type="module"`属性。 + +```html +<script type="module" src="./foo.js"></script> +``` + +上面代码在网页中插入一个模块`foo.js`,由于`type`属性设为`module`,所以浏览器知道这是一个 ES6 模块。 + +浏览器对于带有`type="module"`的`<script>`,都是异步加载,不会造成堵塞浏览器,即等到整个页面渲染完,再执行模块脚本,等同于打开了`<script>`标签的`defer`属性。 + +```html +<script type="module" src="./foo.js"></script> +<!-- 等同于 --> +<script type="module" src="./foo.js" defer></script> +``` + +如果网页有多个`<script type="module">`,它们会按照在页面出现的顺序依次执行。 + +`<script>`标签的`async`属性也可以打开,这时只要加载完成,渲染引擎就会中断渲染立即执行。执行完成后,再恢复渲染。 + +```html +<script type="module" src="./foo.js" async></script> +``` + +一旦使用了`async`属性,`<script type="module">`就不会按照在页面出现的顺序执行,而是只要该模块加载完成,就执行该模块。 + +ES6 模块也允许内嵌在网页中,语法行为与加载外部脚本完全一致。 + +```html +<script type="module"> + import utils from "./utils.js"; + + // other code +</script> +``` + +对于外部的模块脚本(上例是`foo.js`),有几点需要注意。 + +- 代码是在模块作用域之中运行,而不是在全局作用域运行。模块内部的顶层变量,外部不可见。 +- 模块脚本自动采用严格模式,不管有没有声明`use strict`。 +- 模块之中,可以使用`import`命令加载其他模块(`.js`后缀不可省略,需要提供绝对 URL 或相对 URL),也可以使用`export`命令输出对外接口。 +- 模块之中,顶层的`this`关键字返回`undefined`,而不是指向`window`。也就是说,在模块顶层使用`this`关键字,是无意义的。 +- 同一个模块如果加载多次,将只执行一次。 + +下面是一个示例模块。 + +```javascript +import utils from 'https://example.com/js/utils.js'; + +const x = 1; + +console.log(x === window.x); //false +console.log(this === undefined); // true +``` + +利用顶层的`this`等于`undefined`这个语法点,可以侦测当前代码是否在 ES6 模块之中。 + +```javascript +const isNotModuleScript = this !== undefined; +``` + +## ES6 模块与 CommonJS 模块的差异 + +讨论 Node 加载 ES6 模块之前,必须了解 ES6 模块与 CommonJS 模块完全不同。 + +它们有两个重大差异。 + +- CommonJS 模块输出的是一个值的拷贝,ES6 模块输出的是值的引用。 +- CommonJS 模块是运行时加载,ES6 模块是编译时输出接口。 + +第二个差异是因为 CommonJS 加载的是一个对象(即`module.exports`属性),该对象只有在脚本运行完才会生成。而 ES6 模块不是对象,它的对外接口只是一种静态定义,在代码静态解析阶段就会生成。 + +下面重点解释第一个差异。 + +CommonJS 模块输出的是值的拷贝,也就是说,一旦输出一个值,模块内部的变化就影响不到这个值。请看下面这个模块文件`lib.js`的例子。 + +```javascript +// lib.js +var counter = 3; +function incCounter() { + counter++; +} +module.exports = { + counter: counter, + incCounter: incCounter, +}; +``` + +上面代码输出内部变量`counter`和改写这个变量的内部方法`incCounter`。然后,在`main.js`里面加载这个模块。 + +```javascript +// main.js +var mod = require('./lib'); + +console.log(mod.counter); // 3 +mod.incCounter(); +console.log(mod.counter); // 3 +``` + +上面代码说明,`lib.js`模块加载以后,它的内部变化就影响不到输出的`mod.counter`了。这是因为`mod.counter`是一个原始类型的值,会被缓存。除非写成一个函数,才能得到内部变动后的值。 + +```javascript +// lib.js +var counter = 3; +function incCounter() { + counter++; +} +module.exports = { + get counter() { + return counter + }, + incCounter: incCounter, +}; +``` + +上面代码中,输出的`counter`属性实际上是一个取值器函数。现在再执行`main.js`,就可以正确读取内部变量`counter`的变动了。 + +```bash +$ node main.js +3 +4 +``` + +ES6 模块的运行机制与 CommonJS 不一样。JS 引擎对脚本静态分析的时候,遇到模块加载命令`import`,就会生成一个只读引用。等到脚本真正执行时,再根据这个只读引用,到被加载的那个模块里面去取值。换句话说,ES6 的`import`有点像 Unix 系统的“符号连接”,原始值变了,`import`加载的值也会跟着变。因此,ES6 模块是动态引用,并且不会缓存值,模块里面的变量绑定其所在的模块。 + +还是举上面的例子。 + +```javascript +// lib.js +export let counter = 3; +export function incCounter() { + counter++; +} + +// main.js +import { counter, incCounter } from './lib'; +console.log(counter); // 3 +incCounter(); +console.log(counter); // 4 +``` + +上面代码说明,ES6 模块输入的变量`counter`是活的,完全反应其所在模块`lib.js`内部的变化。 + +再举一个出现在`export`一节中的例子。 + +```javascript +// m1.js +export var foo = 'bar'; +setTimeout(() => foo = 'baz', 500); + +// m2.js +import {foo} from './m1.js'; +console.log(foo); +setTimeout(() => console.log(foo), 500); +``` + +上面代码中,`m1.js`的变量`foo`,在刚加载时等于`bar`,过了 500 毫秒,又变为等于`baz`。 + +让我们看看,`m2.js`能否正确读取这个变化。 + +```bash +$ babel-node m2.js + +bar +baz +``` + +上面代码表明,ES6 模块不会缓存运行结果,而是动态地去被加载的模块取值,并且变量总是绑定其所在的模块。 + +由于 ES6 输入的模块变量,只是一个“符号连接”,所以这个变量是只读的,对它进行重新赋值会报错。 + +```javascript +// lib.js +export let obj = {}; + +// main.js +import { obj } from './lib'; + +obj.prop = 123; // OK +obj = {}; // TypeError +``` + +上面代码中,`main.js`从`lib.js`输入变量`obj`,可以对`obj`添加属性,但是重新赋值就会报错。因为变量`obj`指向的地址是只读的,不能重新赋值,这就好比`main.js`创造了一个名为`obj`的`const`变量。 + +最后,`export`通过接口,输出的是同一个值。不同的脚本加载这个接口,得到的都是同样的实例。 + +```javascript +// mod.js +function C() { + this.sum = 0; + this.add = function () { + this.sum += 1; + }; + this.show = function () { + console.log(this.sum); + }; +} + +export let c = new C(); +``` + +上面的脚本`mod.js`,输出的是一个`C`的实例。不同的脚本加载这个模块,得到的都是同一个实例。 + +```javascript +// x.js +import {c} from './mod'; +c.add(); + +// y.js +import {c} from './mod'; +c.show(); + +// main.js +import './x'; +import './y'; +``` + +现在执行`main.js`,输出的是`1`。 + +```bash +$ babel-node main.js +1 +``` + +这就证明了`x.js`和`y.js`加载的都是`C`的同一个实例。 + +## Node 加载 + +### 概述 + +Node 对 ES6 模块的处理比较麻烦,因为它有自己的 CommonJS 模块格式,与 ES6 模块格式是不兼容的。目前的解决方案是,将两者分开,ES6 模块和 CommonJS 采用各自的加载方案。 + +Node 要求 ES6 模块采用`.mjs`后缀文件名。也就是说,只要脚本文件里面使用`import`或者`export`命令,那么就必须采用`.mjs`后缀名。`require`命令不能加载`.mjs`文件,会报错,只有`import`命令才可以加载`.mjs`文件。反过来,`.mjs`文件里面也不能使用`require`命令,必须使用`import`。 + +目前,这项功能还在试验阶段。安装 Node v8.5.0 或以上版本,要用`--experimental-modules`参数才能打开该功能。 + +```bash +$ node --experimental-modules my-app.mjs +``` + +为了与浏览器的`import`加载规则相同,Node 的`.mjs`文件支持 URL 路径。 + +```javascript +import './foo?query=1'; // 加载 ./foo 传入参数 ?query=1 +``` + +上面代码中,脚本路径带有参数`?query=1`,Node 会按 URL 规则解读。同一个脚本只要参数不同,就会被加载多次,并且保存成不同的缓存。由于这个原因,只要文件名中含有`:`、`%`、`#`、`?`等特殊字符,最好对这些字符进行转义。 + +目前,Node 的`import`命令只支持加载本地模块(`file:`协议),不支持加载远程模块。 + +如果模块名不含路径,那么`import`命令会去`node_modules`目录寻找这个模块。 + +```javascript +import 'baz'; +import 'abc/123'; +``` + +如果模块名包含路径,那么`import`命令会按照路径去寻找这个名字的脚本文件。 + +```javascript +import 'file:///etc/config/app.json'; +import './foo'; +import './foo?search'; +import '../bar'; +import '/baz'; +``` + +如果脚本文件省略了后缀名,比如`import './foo'`,Node 会依次尝试四个后缀名:`./foo.mjs`、`./foo.js`、`./foo.json`、`./foo.node`。如果这些脚本文件都不存在,Node 就会去加载`./foo/package.json`的`main`字段指定的脚本。如果`./foo/package.json`不存在或者没有`main`字段,那么就会依次加载`./foo/index.mjs`、`./foo/index.js`、`./foo/index.json`、`./foo/index.node`。如果以上四个文件还是都不存在,就会抛出错误。 + +最后,Node 的`import`命令是异步加载,这一点与浏览器的处理方法相同。 + +### 内部变量 + +ES6 模块应该是通用的,同一个模块不用修改,就可以用在浏览器环境和服务器环境。为了达到这个目标,Node 规定 ES6 模块之中不能使用 CommonJS 模块的特有的一些内部变量。 + +首先,就是`this`关键字。ES6 模块之中,顶层的`this`指向`undefined`;CommonJS 模块的顶层`this`指向当前模块,这是两者的一个重大差异。 + +其次,以下这些顶层变量在 ES6 模块之中都是不存在的。 + +- `arguments` +- `require` +- `module` +- `exports` +- `__filename` +- `__dirname` + +如果你一定要使用这些变量,有一个变通方法,就是写一个 CommonJS 模块输出这些变量,然后再用 ES6 模块加载这个 CommonJS 模块。但是这样一来,该 ES6 模块就不能直接用于浏览器环境了,所以不推荐这样做。 + +```javascript +// expose.js +module.exports = {__dirname}; + +// use.mjs +import expose from './expose.js'; +const {__dirname} = expose; +``` + +上面代码中,`expose.js`是一个 CommonJS 模块,输出变量`__dirname`,该变量在 ES6 模块之中不存在。ES6 模块加载`expose.js`,就可以得到`__dirname`。 + +### ES6 模块加载 CommonJS 模块 + +CommonJS 模块的输出都定义在`module.exports`这个属性上面。Node 的`import`命令加载 CommonJS 模块,Node 会自动将`module.exports`属性,当作模块的默认输出,即等同于`export default xxx`。 + +下面是一个 CommonJS 模块。 + +```javascript +// a.js +module.exports = { + foo: 'hello', + bar: 'world' +}; + +// 等同于 +export default { + foo: 'hello', + bar: 'world' +}; +``` + +`import`命令加载上面的模块,`module.exports`会被视为默认输出,即`import`命令实际上输入的是这样一个对象`{ default: module.exports }`。 + +所以,一共有三种写法,可以拿到 CommonJS 模块的`module.exports`。 + +```javascript +// 写法一 +import baz from './a'; +// baz = {foo: 'hello', bar: 'world'}; + +// 写法二 +import {default as baz} from './a'; +// baz = {foo: 'hello', bar: 'world'}; + +// 写法三 +import * as baz from './a'; +// baz = { +// get default() {return module.exports;}, +// get foo() {return this.default.foo}.bind(baz), +// get bar() {return this.default.bar}.bind(baz) +// } +``` + +上面代码的第三种写法,可以通过`baz.default`拿到`module.exports`。`foo`属性和`bar`属性就是可以通过这种方法拿到了`module.exports`。 + +下面是一些例子。 + +```javascript +// b.js +module.exports = null; + +// es.js +import foo from './b'; +// foo = null; + +import * as bar from './b'; +// bar = { default:null }; +``` + +上面代码中,`es.js`采用第二种写法时,要通过`bar.default`这样的写法,才能拿到`module.exports`。 + +```javascript +// c.js +module.exports = function two() { + return 2; +}; + +// es.js +import foo from './c'; +foo(); // 2 + +import * as bar from './c'; +bar.default(); // 2 +bar(); // throws, bar is not a function +``` + +上面代码中,`bar`本身是一个对象,不能当作函数调用,只能通过`bar.default`调用。 + +CommonJS 模块的输出缓存机制,在 ES6 加载方式下依然有效。 + +```javascript +// foo.js +module.exports = 123; +setTimeout(_ => module.exports = null); +``` + +上面代码中,对于加载`foo.js`的脚本,`module.exports`将一直是`123`,而不会变成`null`。 + +由于 ES6 模块是编译时确定输出接口,CommonJS 模块是运行时确定输出接口,所以采用`import`命令加载 CommonJS 模块时,不允许采用下面的写法。 + +```javascript +// 不正确 +import { readFile } from 'fs'; +``` + +上面的写法不正确,因为`fs`是 CommonJS 格式,只有在运行时才能确定`readFile`接口,而`import`命令要求编译时就确定这个接口。解决方法就是改为整体输入。 + +```javascript +// 正确的写法一 +import * as express from 'express'; +const app = express.default(); + +// 正确的写法二 +import express from 'express'; +const app = express(); +``` + +### CommonJS 模块加载 ES6 模块 + +CommonJS 模块加载 ES6 模块,不能使用`require`命令,而要使用`import()`函数。ES6 模块的所有输出接口,会成为输入对象的属性。 + +```javascript +// es.mjs +let foo = { bar: 'my-default' }; +export default foo; + +// cjs.js +const es_namespace = await import('./es.mjs'); +// es_namespace = { +// get default() { +// ... +// } +// } +console.log(es_namespace.default); +// { bar:'my-default' } +``` + +上面代码中,`default`接口变成了`es_namespace.default`属性。 + +下面是另一个例子。 + +```javascript +// es.js +export let foo = { bar:'my-default' }; +export { foo as bar }; +export function f() {}; +export class c {}; + +// cjs.js +const es_namespace = await import('./es'); +// es_namespace = { +// get foo() {return foo;} +// get bar() {return foo;} +// get f() {return f;} +// get c() {return c;} +// } +``` + +## 循环加载 + +“循环加载”(circular dependency)指的是,`a`脚本的执行依赖`b`脚本,而`b`脚本的执行又依赖`a`脚本。 + +```javascript +// a.js +var b = require('b'); + +// b.js +var a = require('a'); +``` + +通常,“循环加载”表示存在强耦合,如果处理不好,还可能导致递归加载,使得程序无法执行,因此应该避免出现。 + +但是实际上,这是很难避免的,尤其是依赖关系复杂的大项目,很容易出现`a`依赖`b`,`b`依赖`c`,`c`又依赖`a`这样的情况。这意味着,模块加载机制必须考虑“循环加载”的情况。 + +对于 JavaScript 语言来说,目前最常见的两种模块格式 CommonJS 和 ES6,处理“循环加载”的方法是不一样的,返回的结果也不一样。 + +### CommonJS 模块的加载原理 + +介绍 ES6 如何处理“循环加载”之前,先介绍目前最流行的 CommonJS 模块格式的加载原理。 + +CommonJS 的一个模块,就是一个脚本文件。`require`命令第一次加载该脚本,就会执行整个脚本,然后在内存生成一个对象。 + +```javascript +{ + id: '...', + exports: { ... }, + loaded: true, + ... +} +``` + +上面代码就是 Node 内部加载模块后生成的一个对象。该对象的`id`属性是模块名,`exports`属性是模块输出的各个接口,`loaded`属性是一个布尔值,表示该模块的脚本是否执行完毕。其他还有很多属性,这里都省略了。 + +以后需要用到这个模块的时候,就会到`exports`属性上面取值。即使再次执行`require`命令,也不会再次执行该模块,而是到缓存之中取值。也就是说,CommonJS 模块无论加载多少次,都只会在第一次加载时运行一次,以后再加载,就返回第一次运行的结果,除非手动清除系统缓存。 + +### CommonJS 模块的循环加载 + +CommonJS 模块的重要特性是加载时执行,即脚本代码在`require`的时候,就会全部执行。一旦出现某个模块被"循环加载",就只输出已经执行的部分,还未执行的部分不会输出。 + +让我们来看,Node [官方文档](https://nodejs.org/api/modules.html#modules_cycles)里面的例子。脚本文件`a.js`代码如下。 + +```javascript +exports.done = false; +var b = require('./b.js'); +console.log('在 a.js 之中,b.done = %j', b.done); +exports.done = true; +console.log('a.js 执行完毕'); +``` + +上面代码之中,`a.js`脚本先输出一个`done`变量,然后加载另一个脚本文件`b.js`。注意,此时`a.js`代码就停在这里,等待`b.js`执行完毕,再往下执行。 + +再看`b.js`的代码。 + +```javascript +exports.done = false; +var a = require('./a.js'); +console.log('在 b.js 之中,a.done = %j', a.done); +exports.done = true; +console.log('b.js 执行完毕'); +``` + +上面代码之中,`b.js`执行到第二行,就会去加载`a.js`,这时,就发生了“循环加载”。系统会去`a.js`模块对应对象的`exports`属性取值,可是因为`a.js`还没有执行完,从`exports`属性只能取回已经执行的部分,而不是最后的值。 + +`a.js`已经执行的部分,只有一行。 + +```javascript +exports.done = false; +``` + +因此,对于`b.js`来说,它从`a.js`只输入一个变量`done`,值为`false`。 + +然后,`b.js`接着往下执行,等到全部执行完毕,再把执行权交还给`a.js`。于是,`a.js`接着往下执行,直到执行完毕。我们写一个脚本`main.js`,验证这个过程。 + +```javascript +var a = require('./a.js'); +var b = require('./b.js'); +console.log('在 main.js 之中, a.done=%j, b.done=%j', a.done, b.done); +``` + +执行`main.js`,运行结果如下。 + +```bash +$ node main.js + +在 b.js 之中,a.done = false +b.js 执行完毕 +在 a.js 之中,b.done = true +a.js 执行完毕 +在 main.js 之中, a.done=true, b.done=true +``` + +上面的代码证明了两件事。一是,在`b.js`之中,`a.js`没有执行完毕,只执行了第一行。二是,`main.js`执行到第二行时,不会再次执行`b.js`,而是输出缓存的`b.js`的执行结果,即它的第四行。 + +```javascript +exports.done = true; +``` + +总之,CommonJS 输入的是被输出值的拷贝,不是引用。 + +另外,由于 CommonJS 模块遇到循环加载时,返回的是当前已经执行的部分的值,而不是代码全部执行后的值,两者可能会有差异。所以,输入变量的时候,必须非常小心。 + +```javascript +var a = require('a'); // 安全的写法 +var foo = require('a').foo; // 危险的写法 + +exports.good = function (arg) { + return a.foo('good', arg); // 使用的是 a.foo 的最新值 +}; + +exports.bad = function (arg) { + return foo('bad', arg); // 使用的是一个部分加载时的值 +}; +``` + +上面代码中,如果发生循环加载,`require('a').foo`的值很可能后面会被改写,改用`require('a')`会更保险一点。 + +### ES6 模块的循环加载 + +ES6 处理“循环加载”与 CommonJS 有本质的不同。ES6 模块是动态引用,如果使用`import`从一个模块加载变量(即`import foo from 'foo'`),那些变量不会被缓存,而是成为一个指向被加载模块的引用,需要开发者自己保证,真正取值的时候能够取到值。 + +请看下面这个例子。 + +```javascript +// a.mjs +import {bar} from './b'; +console.log('a.mjs'); +console.log(bar); +export let foo = 'foo'; + +// b.mjs +import {foo} from './a'; +console.log('b.mjs'); +console.log(foo); +export let bar = 'bar'; +``` + +上面代码中,`a.mjs`加载`b.mjs`,`b.mjs`又加载`a.mjs`,构成循环加载。执行`a.mjs`,结果如下。 + +```bash +$ node --experimental-modules a.mjs +b.mjs +ReferenceError: foo is not defined +``` + +上面代码中,执行`a.mjs`以后会报错,`foo`变量未定义,这是为什么? + +让我们一行行来看,ES6 循环加载是怎么处理的。首先,执行`a.mjs`以后,引擎发现它加载了`b.mjs`,因此会优先执行`b.mjs`,然后再执行`a.mjs`。接着,执行`b.mjs`的时候,已知它从`a.mjs`输入了`foo`接口,这时不会去执行`a.mjs`,而是认为这个接口已经存在了,继续往下执行。执行到第三行`console.log(foo)`的时候,才发现这个接口根本没定义,因此报错。 + +解决这个问题的方法,就是让`b.mjs`运行的时候,`foo`已经有定义了。这可以通过将`foo`写成函数来解决。 + +```javascript +// a.mjs +import {bar} from './b'; +console.log('a.mjs'); +console.log(bar()); +function foo() { return 'foo' } +export {foo}; + +// b.mjs +import {foo} from './a'; +console.log('b.mjs'); +console.log(foo()); +function bar() { return 'bar' } +export {bar}; +``` + +这时再执行`a.mjs`就可以得到预期结果。 + +```bash +$ node --experimental-modules a.mjs +b.mjs +foo +a.mjs +bar +``` + +这是因为函数具有提升作用,在执行`import {bar} from './b'`时,函数`foo`就已经有定义了,所以`b.mjs`加载的时候不会报错。这也意味着,如果把函数`foo`改写成函数表达式,也会报错。 + +```javascript +// a.mjs +import {bar} from './b'; +console.log('a.mjs'); +console.log(bar()); +const foo = () => 'foo'; +export {foo}; +``` + +上面代码的第四行,改成了函数表达式,就不具有提升作用,执行就会报错。 + +我们再来看 ES6 模块加载器[SystemJS](https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/circular-references-bindings.md)给出的一个例子。 + +```javascript +// even.js +import { odd } from './odd' +export var counter = 0; +export function even(n) { + counter++; + return n === 0 || odd(n - 1); +} + +// odd.js +import { even } from './even'; +export function odd(n) { + return n !== 0 && even(n - 1); +} +``` + +上面代码中,`even.js`里面的函数`even`有一个参数`n`,只要不等于 0,就会减去 1,传入加载的`odd()`。`odd.js`也会做类似操作。 + +运行上面这段代码,结果如下。 + +```javascript +$ babel-node +> import * as m from './even.js'; +> m.even(10); +true +> m.counter +6 +> m.even(20) +true +> m.counter +17 +``` + +上面代码中,参数`n`从 10 变为 0 的过程中,`even()`一共会执行 6 次,所以变量`counter`等于 6。第二次调用`even()`时,参数`n`从 20 变为 0,`even()`一共会执行 11 次,加上前面的 6 次,所以变量`counter`等于 17。 + +这个例子要是改写成 CommonJS,就根本无法执行,会报错。 + +```javascript +// even.js +var odd = require('./odd'); +var counter = 0; +exports.counter = counter; +exports.even = function (n) { + counter++; + return n == 0 || odd(n - 1); +} + +// odd.js +var even = require('./even').even; +module.exports = function (n) { + return n != 0 && even(n - 1); +} +``` + +上面代码中,`even.js`加载`odd.js`,而`odd.js`又去加载`even.js`,形成“循环加载”。这时,执行引擎就会输出`even.js`已经执行的部分(不存在任何结果),所以在`odd.js`之中,变量`even`等于`undefined`,等到后面调用`even(n - 1)`就会报错。 + +```bash +$ node +> var m = require('./even'); +> m.even(10) +TypeError: even is not a function +``` + +## ES6 模块的转码 + +浏览器目前还不支持 ES6 模块,为了现在就能使用,可以将其转为 ES5 的写法。除了 Babel 可以用来转码之外,还有以下两个方法,也可以用来转码。 + +### ES6 module transpiler + +[ES6 module transpiler](https://github.com/esnext/es6-module-transpiler)是 square 公司开源的一个转码器,可以将 ES6 模块转为 CommonJS 模块或 AMD 模块的写法,从而在浏览器中使用。 + +首先,安装这个转码器。 + +```bash +$ npm install -g es6-module-transpiler +``` + +然后,使用`compile-modules convert`命令,将 ES6 模块文件转码。 + +```bash +$ compile-modules convert file1.js file2.js +``` + +`-o`参数可以指定转码后的文件名。 + +```bash +$ compile-modules convert -o out.js file1.js +``` + +### SystemJS + +另一种解决方法是使用 [SystemJS](https://github.com/systemjs/systemjs)。它是一个垫片库(polyfill),可以在浏览器内加载 ES6 模块、AMD 模块和 CommonJS 模块,将其转为 ES5 格式。它在后台调用的是 Google 的 Traceur 转码器。 + +使用时,先在网页内载入`system.js`文件。 + +```html +<script src="system.js"></script> +``` + +然后,使用`System.import`方法加载模块文件。 + +```html +<script> + System.import('./app.js'); +</script> +``` + +上面代码中的`./app`,指的是当前目录下的 app.js 文件。它可以是 ES6 模块文件,`System.import`会自动将其转码。 + +需要注意的是,`System.import`使用异步加载,返回一个 Promise 对象,可以针对这个对象编程。下面是一个模块文件。 + +```javascript +// app/es6-file.js: + +export class q { + constructor() { + this.es6 = 'hello'; + } +} +``` + +然后,在网页内加载这个模块文件。 + +```html +<script> + +System.import('app/es6-file').then(function(m) { + console.log(new m.q().es6); // hello +}); + +</script> +``` + +上面代码中,`System.import`方法返回的是一个 Promise 对象,所以可以用`then`方法指定回调函数。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module.md" old mode 100644 new mode 100755 similarity index 85% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module.md" index 009592804..42482fe4f --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/module.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/module.md" @@ -6,7 +6,7 @@ 在 ES6 之前,社区制定了一些模块加载方案,最主要的有 CommonJS 和 AMD 两种。前者用于服务器,后者用于浏览器。ES6 在语言标准的层面上,实现了模块功能,而且实现得相当简单,完全可以取代 CommonJS 和 AMD 规范,成为浏览器和服务器通用的模块解决方案。 -ES6 模块的设计思想,是尽量的静态化,使得编译时就能确定模块的依赖关系,以及输入和输出的变量。CommonJS 和 AMD 模块,都只能在运行时确定这些东西。比如,CommonJS 模块就是对象,输入时必须查找对象属性。 +ES6 模块的设计思想是尽量的静态化,使得编译时就能确定模块的依赖关系,以及输入和输出的变量。CommonJS 和 AMD 模块,都只能在运行时确定这些东西。比如,CommonJS 模块就是对象,输入时必须查找对象属性。 ```javascript // CommonJS模块 @@ -19,7 +19,7 @@ let exists = _fs.exists; let readfile = _fs.readfile; ``` -上面代码的实质是整体加载`fs`模块(即加载`fs`的所有方法),生成一个对象(`_fs`),然后再从这个对象上面读取3个方法。这种加载称为“运行时加载”,因为只有运行时才能得到这个对象,导致完全没办法在编译时做“静态优化”。 +上面代码的实质是整体加载`fs`模块(即加载`fs`的所有方法),生成一个对象(`_fs`),然后再从这个对象上面读取 3 个方法。这种加载称为“运行时加载”,因为只有运行时才能得到这个对象,导致完全没办法在编译时做“静态优化”。 ES6 模块不是对象,而是通过`export`命令显式指定输出的代码,再通过`import`命令输入。 @@ -28,7 +28,7 @@ ES6 模块不是对象,而是通过`export`命令显式指定输出的代码 import { stat, exists, readFile } from 'fs'; ``` -上面代码的实质是从`fs`模块加载3个方法,其他方法不加载。这种加载称为“编译时加载”或者静态加载,即 ES6 可以在编译时就完成模块加载,效率要比 CommonJS 模块的加载方式高。当然,这也导致了没法引用 ES6 模块本身,因为它不是对象。 +上面代码的实质是从`fs`模块加载 3 个方法,其他方法不加载。这种加载称为“编译时加载”或者静态加载,即 ES6 可以在编译时就完成模块加载,效率要比 CommonJS 模块的加载方式高。当然,这也导致了没法引用 ES6 模块本身,因为它不是对象。 由于 ES6 模块是编译时加载,使得静态分析成为可能。有了它,就能进一步拓宽 JavaScript 的语法,比如引入宏(macro)和类型检验(type system)这些只能靠静态分析实现的功能。 @@ -50,7 +50,7 @@ ES6 的模块自动采用严格模式,不管你有没有在模块头部加上` - 函数的参数不能有同名属性,否则报错 - 不能使用`with`语句 - 不能对只读属性赋值,否则报错 -- 不能使用前缀0表示八进制数,否则报错 +- 不能使用前缀 0 表示八进制数,否则报错 - 不能删除不可删除的属性,否则报错 - 不能删除变量`delete prop`,会报错,只能删除属性`delete global[prop]` - `eval`不会在它的外层作用域引入变量 @@ -130,7 +130,7 @@ var m = 1; export m; ``` -上面两种写法都会报错,因为没有提供对外的接口。第一种写法直接输出1,第二种写法通过变量`m`,还是直接输出1。`1`只是一个值,不是接口。正确的写法是下面这样。 +上面两种写法都会报错,因为没有提供对外的接口。第一种写法直接输出 1,第二种写法通过变量`m`,还是直接输出 1。`1`只是一个值,不是接口。正确的写法是下面这样。 ```javascript // 写法一 @@ -169,11 +169,11 @@ export var foo = 'bar'; setTimeout(() => foo = 'baz', 500); ``` -上面代码输出变量`foo`,值为`bar`,500毫秒之后变成`baz`。 +上面代码输出变量`foo`,值为`bar`,500 毫秒之后变成`baz`。 -这一点与 CommonJS 规范完全不同。CommonJS 模块输出的是值的缓存,不存在动态更新,详见下文《ES6模块加载的实质》一节。 +这一点与 CommonJS 规范完全不同。CommonJS 模块输出的是值的缓存,不存在动态更新,详见下文《Module 的加载实现》一节。 -最后,`export`命令可以出现在模块的任何位置,只要处于模块顶层就可以。如果处于块级作用域内,就会报错,下一节的`import`命令也是如此。这是因为处于条件代码块之中,就没法做静态优化了,违背了ES6模块的设计初衷。 +最后,`export`命令可以出现在模块的任何位置,只要处于模块顶层就可以。如果处于块级作用域内,就会报错,下一节的`import`命令也是如此。这是因为处于条件代码块之中,就没法做静态优化了,违背了 ES6 模块的设计初衷。 ```javascript function foo() { @@ -190,7 +190,7 @@ foo() ```javascript // main.js -import {firstName, lastName, year} from './profile'; +import {firstName, lastName, year} from './profile.js'; function setName(element) { element.textContent = firstName + ' ' + lastName; @@ -202,10 +202,28 @@ function setName(element) { 如果想为输入的变量重新取一个名字,`import`命令要使用`as`关键字,将输入的变量重命名。 ```javascript -import { lastName as surname } from './profile'; +import { lastName as surname } from './profile.js'; ``` -`import`后面的`from`指定模块文件的位置,可以是相对路径,也可以是绝对路径,`.js`路径可以省略。如果只是模块名,不带有路径,那么必须有配置文件,告诉 JavaScript 引擎该模块的位置。 +`import`命令输入的变量都是只读的,因为它的本质是输入接口。也就是说,不允许在加载模块的脚本里面,改写接口。 + +```javascript +import {a} from './xxx.js' + +a = {}; // Syntax Error : 'a' is read-only; +``` + +上面代码中,脚本加载了变量`a`,对其重新赋值就会报错,因为`a`是一个只读的接口。但是,如果`a`是一个对象,改写`a`的属性是允许的。 + +```javascript +import {a} from './xxx.js' + +a.foo = 'hello'; // 合法操作 +``` + +上面代码中,`a`的属性可以成功改写,并且其他模块也可以读到改写后的值。不过,这种写法很难查错,建议凡是输入的变量,都当作完全只读,轻易不要改变它的属性。 + +`import`后面的`from`指定模块文件的位置,可以是相对路径,也可以是绝对路径,`.js`后缀可以省略。如果只是模块名,不带有路径,那么必须有配置文件,告诉 JavaScript 引擎该模块的位置。 ```javascript import {myMethod} from 'util'; @@ -270,6 +288,14 @@ import { foo, bar } from 'my_module'; 上面代码中,虽然`foo`和`bar`在两个语句中加载,但是它们对应的是同一个`my_module`实例。也就是说,`import`语句是 Singleton 模式。 +目前阶段,通过 Babel 转码,CommonJS 模块的`require`命令和 ES6 模块的`import`命令,可以写在同一个模块里面,但是最好不要这样做。因为`import`在静态解析阶段执行,所以它是一个模块之中最早执行的。下面的代码可能不会得到预期结果。 + +```javascript +require('core-js/modules/es6.symbol'); +require('core-js/modules/es6.promise'); +import React from 'React'; +``` + ## 模块的整体加载 除了指定加载某个输出值,还可以使用整体加载,即用星号(`*`)指定一个对象,所有输出值都加载在这个对象上面。 @@ -382,7 +408,7 @@ import {crc32} from 'crc32'; // 输入 上面代码的两组写法,第一组是使用`export default`时,对应的`import`语句不需要使用大括号;第二组是不使用`export default`时,对应的`import`语句需要使用大括号。 -`export default`命令用于指定模块的默认输出。显然,一个模块只能有一个默认输出,因此`export default`命令只能使用一次。所以,`import`命令后面才不用加大括号,因为只可能对应一个方法。 +`export default`命令用于指定模块的默认输出。显然,一个模块只能有一个默认输出,因此`export default`命令只能使用一次。所以,import命令后面才不用加大括号,因为只可能唯一对应`export default`命令。 本质上,`export default`就是输出一个叫做`default`的变量或方法,然后系统允许你为它取任意名字。所以,下面的写法是有效的。 @@ -396,9 +422,9 @@ export {add as default}; // export default add; // app.js -import { default as xxx } from 'modules'; +import { default as foo } from 'modules'; // 等同于 -// import xxx from 'modules'; +// import foo from 'modules'; ``` 正是因为`export default`命令其实只是输出一个叫做`default`的变量,所以它后面不能跟变量声明语句。 @@ -417,7 +443,7 @@ export default var a = 1; 上面代码中,`export default a`的含义是将变量`a`的值赋给变量`default`。所以,最后一种写法会报错。 -同样地,因为`export default`本质是将该命令后面的值,赋给`default`变量以后再默认,所以直接将一个值写在`export default`之后。 +同样地,因为`export default`命令的本质是将后面的值,赋给`default`变量,所以可以直接将一个值写在`export default`之后。 ```javascript // 正确 @@ -427,7 +453,7 @@ export default 42; export 42; ``` -上面代码中,后一句报错是因为没有指定对外的接口,而前一句指定外对接口为`default`。 +上面代码中,后一句报错是因为没有指定对外的接口,而前一句指定对外接口为`default`。 有了`export default`命令,输入模块时就非常直观了,以输入 lodash 模块为例。 @@ -435,10 +461,10 @@ export 42; import _ from 'lodash'; ``` -如果想在一条`import`语句中,同时输入默认方法和其他变量,可以写成下面这样。 +如果想在一条`import`语句中,同时输入默认方法和其他接口,可以写成下面这样。 ```javascript -import _, { each } from 'lodash'; +import _, { each, forEach } from 'lodash'; ``` 对应上面代码的`export`语句如下。 @@ -475,12 +501,12 @@ let o = new MyClass(); ```javascript export { foo, bar } from 'my_module'; -// 等同于 +// 可以简单理解为 import { foo, bar } from 'my_module'; export { foo, bar }; ``` -上面代码中,`export`和`import`语句可以结合在一起,写成一行。 +上面代码中,`export`和`import`语句可以结合在一起,写成一行。但需要注意的是,写成一行以后,`foo`和`bar`实际上并没有被导入当前模块,只是相当于对外转发了这两个接口,导致当前模块不能直接使用`foo`和`bar`。 模块的接口改名和整体输出,也可以采用这种写法。 @@ -617,14 +643,14 @@ export {users} from './users'; ```javascript // script.js -import {db, users} from './constants'; +import {db, users} from './constants/index'; ``` ## import() ### 简介 -前面介绍过,`import`命令会被 JavaScript 引擎静态分析,先于模块内的其他模块执行(叫做”连接“更合适)。所以,下面的代码会报错。 +前面介绍过,`import`命令会被 JavaScript 引擎静态分析,先于模块内的其他语句执行(`import`命令叫做“连接” binding 其实更合适)。所以,下面的代码会报错。 ```javascript // 报错 @@ -635,14 +661,14 @@ if (x === 2) { 上面代码中,引擎处理`import`语句是在编译时,这时不会去分析或执行`if`语句,所以`import`语句放在`if`代码块之中毫无意义,因此会报句法错误,而不是执行时错误。也就是说,`import`和`export`命令只能在模块的顶层,不能在代码块之中(比如,在`if`代码块之中,或在函数之中)。 -这样的设计,固然有利于编译器提高效率,但也导致无法在运行时加载模块。从语法上,条件加载就不可能实现。如果`import`命令要取代 Node 的`require`方法,这就形成了一个障碍。因为`require`是运行时加载模块,`import`命令无法取代`require`的动态加载功能。 +这样的设计,固然有利于编译器提高效率,但也导致无法在运行时加载模块。在语法上,条件加载就不可能实现。如果`import`命令要取代 Node 的`require`方法,这就形成了一个障碍。因为`require`是运行时加载模块,`import`命令无法取代`require`的动态加载功能。 ```javascript const path = './' + fileName; const myModual = require(path); ``` -上面的语句就是动态加载,`require`到底加载哪一个模块,只有运行时才知道。`import`语句做不到这一点。 +上面的语句就是动态加载,`require`到底加载哪一个模块,只有运行时才知道。`import`命令做不到这一点。 因此,有一个[提案](https://github.com/tc39/proposal-dynamic-import),建议引入`import()`函数,完成动态加载。 @@ -666,9 +692,7 @@ import(`./section-modules/${someVariable}.js`) }); ``` -`import()`函数可以用在任何地方,不仅仅是模块,非模块的脚本也可以使用。它是运行时执行,也就是说,什么时候运行到这一句,也会加载指定的模块。另外,`import()`函数与所加载的模块没有静态连接关系,这点也是与`import`语句不相同。 - -`import()`类似于 Node 的`require`方法,区别主要是前者是异步加载,后者是同步加载。 +`import()`函数可以用在任何地方,不仅仅是模块,非模块的脚本也可以使用。它是运行时执行,也就是说,什么时候运行到这一句,就会加载指定的模块。另外,`import()`函数与所加载的模块没有静态连接关系,这点也是与`import`语句不相同。`import()`类似于 Node 的`require`方法,区别主要是前者是异步加载,后者是同步加载。 ### 适用场合 @@ -776,4 +800,3 @@ async function main() { } main(); ``` - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/number.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/number.md" new file mode 100755 index 000000000..27e384d51 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/number.md" @@ -0,0 +1,699 @@ +# 数值的扩展 + +## 二进制和八进制表示法 + +ES6 提供了二进制和八进制数值的新的写法,分别用前缀`0b`(或`0B`)和`0o`(或`0O`)表示。 + +```javascript +0b111110111 === 503 // true +0o767 === 503 // true +``` + +从 ES5 开始,在严格模式之中,八进制就不再允许使用前缀`0`表示,ES6 进一步明确,要使用前缀`0o`表示。 + +```javascript +// 非严格模式 +(function(){ + console.log(0o11 === 011); +})() // true + +// 严格模式 +(function(){ + 'use strict'; + console.log(0o11 === 011); +})() // Uncaught SyntaxError: Octal literals are not allowed in strict mode. +``` + +如果要将`0b`和`0o`前缀的字符串数值转为十进制,要使用`Number`方法。 + +```javascript +Number('0b111') // 7 +Number('0o10') // 8 +``` + +## Number.isFinite(), Number.isNaN() + +ES6 在`Number`对象上,新提供了`Number.isFinite()`和`Number.isNaN()`两个方法。 + +`Number.isFinite()`用来检查一个数值是否为有限的(finite),即不是`Infinity`。 + +```javascript +Number.isFinite(15); // true +Number.isFinite(0.8); // true +Number.isFinite(NaN); // false +Number.isFinite(Infinity); // false +Number.isFinite(-Infinity); // false +Number.isFinite('foo'); // false +Number.isFinite('15'); // false +Number.isFinite(true); // false +``` + +注意,如果参数类型不是数值,`Number.isFinite`一律返回`false`。 + +`Number.isNaN()`用来检查一个值是否为`NaN`。 + +```javascript +Number.isNaN(NaN) // true +Number.isNaN(15) // false +Number.isNaN('15') // false +Number.isNaN(true) // false +Number.isNaN(9/NaN) // true +Number.isNaN('true' / 0) // true +Number.isNaN('true' / 'true') // true +``` + +如果参数类型不是`NaN`,`Number.isNaN`一律返回`false`。 + +它们与传统的全局方法`isFinite()`和`isNaN()`的区别在于,传统方法先调用`Number()`将非数值的值转为数值,再进行判断,而这两个新方法只对数值有效,`Number.isFinite()`对于非数值一律返回`false`, `Number.isNaN()`只有对于`NaN`才返回`true`,非`NaN`一律返回`false`。 + +```javascript +isFinite(25) // true +isFinite("25") // true +Number.isFinite(25) // true +Number.isFinite("25") // false + +isNaN(NaN) // true +isNaN("NaN") // true +Number.isNaN(NaN) // true +Number.isNaN("NaN") // false +Number.isNaN(1) // false +``` + +## Number.parseInt(), Number.parseFloat() + +ES6 将全局方法`parseInt()`和`parseFloat()`,移植到`Number`对象上面,行为完全保持不变。 + +```javascript +// ES5的写法 +parseInt('12.34') // 12 +parseFloat('123.45#') // 123.45 + +// ES6的写法 +Number.parseInt('12.34') // 12 +Number.parseFloat('123.45#') // 123.45 +``` + +这样做的目的,是逐步减少全局性方法,使得语言逐步模块化。 + +```javascript +Number.parseInt === parseInt // true +Number.parseFloat === parseFloat // true +``` + +## Number.isInteger() + +`Number.isInteger()`用来判断一个数值是否为整数。 + +```javascript +Number.isInteger(25) // true +Number.isInteger(25.1) // false +``` + +JavaScript 内部,整数和浮点数采用的是同样的储存方法,所以 25 和 25.0 被视为同一个值。 + +```javascript +Number.isInteger(25) // true +Number.isInteger(25.0) // true +``` + +如果参数不是数值,`Number.isInteger`返回`false`。 + +```javascript +Number.isInteger() // false +Number.isInteger(null) // false +Number.isInteger('15') // false +Number.isInteger(true) // false +``` + +注意,由于 JavaScript 采用 IEEE 754 标准,数值存储为64位双精度格式,数值精度最多可以达到 53 个二进制位(1 个隐藏位与 52 个有效位)。如果数值的精度超过这个限度,第54位及后面的位就会被丢弃,这种情况下,`Number.isInteger`可能会误判。 + +```javascript +Number.isInteger(3.0000000000000002) // true +``` + +上面代码中,`Number.isInteger`的参数明明不是整数,但是会返回`true`。原因就是这个小数的精度达到了小数点后16个十进制位,转成二进制位超过了53个二进制位,导致最后的那个`2`被丢弃了。 + +类似的情况还有,如果一个数值的绝对值小于`Number.MIN_VALUE`(5E-324),即小于 JavaScript 能够分辨的最小值,会被自动转为 0。这时,`Number.isInteger`也会误判。 + +```javascript +Number.isInteger(5E-324) // false +Number.isInteger(5E-325) // true +``` + +上面代码中,`5E-325`由于值太小,会被自动转为0,因此返回`true`。 + +总之,如果对数据精度的要求较高,不建议使用`Number.isInteger()`判断一个数值是否为整数。 + +## Number.EPSILON + +ES6 在`Number`对象上面,新增一个极小的常量`Number.EPSILON`。根据规格,它表示 1 与大于 1 的最小浮点数之间的差。 + +对于 64 位浮点数来说,大于 1 的最小浮点数相当于二进制的`1.00..001`,小数点后面有连续 51 个零。这个值减去 1 之后,就等于 2 的 -52 次方。 + +```javascript +Number.EPSILON === Math.pow(2, -52) +// true +Number.EPSILON +// 2.220446049250313e-16 +Number.EPSILON.toFixed(20) +// "0.00000000000000022204" +``` + +`Number.EPSILON`实际上是 JavaScript 能够表示的最小精度。误差如果小于这个值,就可以认为已经没有意义了,即不存在误差了。 + +引入一个这么小的量的目的,在于为浮点数计算,设置一个误差范围。我们知道浮点数计算是不精确的。 + +```javascript +0.1 + 0.2 +// 0.30000000000000004 + +0.1 + 0.2 - 0.3 +// 5.551115123125783e-17 + +5.551115123125783e-17.toFixed(20) +// '0.00000000000000005551' +``` + +上面代码解释了,为什么比较`0.1 + 0.2`与`0.3`得到的结果是`false`。 + +```javascript +0.1 + 0.2 === 0.3 // false +``` + +`Number.EPSILON`可以用来设置“能够接受的误差范围”。比如,误差范围设为 2 的-50 次方(即`Number.EPSILON * Math.pow(2, 2)`),即如果两个浮点数的差小于这个值,我们就认为这两个浮点数相等。 + +```javascript +5.551115123125783e-17 < Number.EPSILON * Math.pow(2, 2) +// true +``` + +因此,`Number.EPSILON`的实质是一个可以接受的最小误差范围。 + +```javascript +function withinErrorMargin (left, right) { + return Math.abs(left - right) < Number.EPSILON * Math.pow(2, 2); +} + +0.1 + 0.2 === 0.3 // false +withinErrorMargin(0.1 + 0.2, 0.3) // true + +1.1 + 1.3 === 2.4 // false +withinErrorMargin(1.1 + 1.3, 2.4) // true +``` + +上面的代码为浮点数运算,部署了一个误差检查函数。 + +## 安全整数和 Number.isSafeInteger() + +JavaScript 能够准确表示的整数范围在`-2^53`到`2^53`之间(不含两个端点),超过这个范围,无法精确表示这个值。 + +```javascript +Math.pow(2, 53) // 9007199254740992 + +9007199254740992 // 9007199254740992 +9007199254740993 // 9007199254740992 + +Math.pow(2, 53) === Math.pow(2, 53) + 1 +// true +``` + +上面代码中,超出 2 的 53 次方之后,一个数就不精确了。 + +ES6 引入了`Number.MAX_SAFE_INTEGER`和`Number.MIN_SAFE_INTEGER`这两个常量,用来表示这个范围的上下限。 + +```javascript +Number.MAX_SAFE_INTEGER === Math.pow(2, 53) - 1 +// true +Number.MAX_SAFE_INTEGER === 9007199254740991 +// true + +Number.MIN_SAFE_INTEGER === -Number.MAX_SAFE_INTEGER +// true +Number.MIN_SAFE_INTEGER === -9007199254740991 +// true +``` + +上面代码中,可以看到 JavaScript 能够精确表示的极限。 + +`Number.isSafeInteger()`则是用来判断一个整数是否落在这个范围之内。 + +```javascript +Number.isSafeInteger('a') // false +Number.isSafeInteger(null) // false +Number.isSafeInteger(NaN) // false +Number.isSafeInteger(Infinity) // false +Number.isSafeInteger(-Infinity) // false + +Number.isSafeInteger(3) // true +Number.isSafeInteger(1.2) // false +Number.isSafeInteger(9007199254740990) // true +Number.isSafeInteger(9007199254740992) // false + +Number.isSafeInteger(Number.MIN_SAFE_INTEGER - 1) // false +Number.isSafeInteger(Number.MIN_SAFE_INTEGER) // true +Number.isSafeInteger(Number.MAX_SAFE_INTEGER) // true +Number.isSafeInteger(Number.MAX_SAFE_INTEGER + 1) // false +``` + +这个函数的实现很简单,就是跟安全整数的两个边界值比较一下。 + +```javascript +Number.isSafeInteger = function (n) { + return (typeof n === 'number' && + Math.round(n) === n && + Number.MIN_SAFE_INTEGER <= n && + n <= Number.MAX_SAFE_INTEGER); +} +``` + +实际使用这个函数时,需要注意。验证运算结果是否落在安全整数的范围内,不要只验证运算结果,而要同时验证参与运算的每个值。 + +```javascript +Number.isSafeInteger(9007199254740993) +// false +Number.isSafeInteger(990) +// true +Number.isSafeInteger(9007199254740993 - 990) +// true +9007199254740993 - 990 +// 返回结果 9007199254740002 +// 正确答案应该是 9007199254740003 +``` + +上面代码中,`9007199254740993`不是一个安全整数,但是`Number.isSafeInteger`会返回结果,显示计算结果是安全的。这是因为,这个数超出了精度范围,导致在计算机内部,以`9007199254740992`的形式储存。 + +```javascript +9007199254740993 === 9007199254740992 +// true +``` + +所以,如果只验证运算结果是否为安全整数,很可能得到错误结果。下面的函数可以同时验证两个运算数和运算结果。 + +```javascript +function trusty (left, right, result) { + if ( + Number.isSafeInteger(left) && + Number.isSafeInteger(right) && + Number.isSafeInteger(result) + ) { + return result; + } + throw new RangeError('Operation cannot be trusted!'); +} + +trusty(9007199254740993, 990, 9007199254740993 - 990) +// RangeError: Operation cannot be trusted! + +trusty(1, 2, 3) +// 3 +``` + +## Math 对象的扩展 + +ES6 在 Math 对象上新增了 17 个与数学相关的方法。所有这些方法都是静态方法,只能在 Math 对象上调用。 + +### Math.trunc() + +`Math.trunc`方法用于去除一个数的小数部分,返回整数部分。 + +```javascript +Math.trunc(4.1) // 4 +Math.trunc(4.9) // 4 +Math.trunc(-4.1) // -4 +Math.trunc(-4.9) // -4 +Math.trunc(-0.1234) // -0 +``` + +对于非数值,`Math.trunc`内部使用`Number`方法将其先转为数值。 + +```javascript +Math.trunc('123.456') // 123 +Math.trunc(true) //1 +Math.trunc(false) // 0 +Math.trunc(null) // 0 +``` + +对于空值和无法截取整数的值,返回`NaN`。 + +```javascript +Math.trunc(NaN); // NaN +Math.trunc('foo'); // NaN +Math.trunc(); // NaN +Math.trunc(undefined) // NaN +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.trunc = Math.trunc || function(x) { + return x < 0 ? Math.ceil(x) : Math.floor(x); +}; +``` + +### Math.sign() + +`Math.sign`方法用来判断一个数到底是正数、负数、还是零。对于非数值,会先将其转换为数值。 + +它会返回五种值。 + +- 参数为正数,返回`+1`; +- 参数为负数,返回`-1`; +- 参数为 0,返回`0`; +- 参数为-0,返回`-0`; +- 其他值,返回`NaN`。 + +```javascript +Math.sign(-5) // -1 +Math.sign(5) // +1 +Math.sign(0) // +0 +Math.sign(-0) // -0 +Math.sign(NaN) // NaN +``` + +如果参数是非数值,会自动转为数值。对于那些无法转为数值的值,会返回`NaN`。 + +```javascript +Math.sign('') // 0 +Math.sign(true) // +1 +Math.sign(false) // 0 +Math.sign(null) // 0 +Math.sign('9') // +1 +Math.sign('foo') // NaN +Math.sign() // NaN +Math.sign(undefined) // NaN +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.sign = Math.sign || function(x) { + x = +x; // convert to a number + if (x === 0 || isNaN(x)) { + return x; + } + return x > 0 ? 1 : -1; +}; +``` + +### Math.cbrt() + +`Math.cbrt`方法用于计算一个数的立方根。 + +```javascript +Math.cbrt(-1) // -1 +Math.cbrt(0) // 0 +Math.cbrt(1) // 1 +Math.cbrt(2) // 1.2599210498948734 +``` + +对于非数值,`Math.cbrt`方法内部也是先使用`Number`方法将其转为数值。 + +```javascript +Math.cbrt('8') // 2 +Math.cbrt('hello') // NaN +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.cbrt = Math.cbrt || function(x) { + var y = Math.pow(Math.abs(x), 1/3); + return x < 0 ? -y : y; +}; +``` + +### Math.clz32() + +`Math.clz32()`方法将参数转为 32 位无符号整数的形式,然后这个 32 位值里面有多少个前导 0。 + +```javascript +Math.clz32(0) // 32 +Math.clz32(1) // 31 +Math.clz32(1000) // 22 +Math.clz32(0b01000000000000000000000000000000) // 1 +Math.clz32(0b00100000000000000000000000000000) // 2 +``` + +上面代码中,0 的二进制形式全为 0,所以有 32 个前导 0;1 的二进制形式是`0b1`,只占 1 位,所以 32 位之中有 31 个前导 0;1000 的二进制形式是`0b1111101000`,一共有 10 位,所以 32 位之中有 22 个前导 0。 + +`clz32`这个函数名就来自”count leading zero bits in 32-bit binary representation of a number“(计算一个数的 32 位二进制形式的前导 0 的个数)的缩写。 + +左移运算符(`<<`)与`Math.clz32`方法直接相关。 + +```javascript +Math.clz32(0) // 32 +Math.clz32(1) // 31 +Math.clz32(1 << 1) // 30 +Math.clz32(1 << 2) // 29 +Math.clz32(1 << 29) // 2 +``` + +对于小数,`Math.clz32`方法只考虑整数部分。 + +```javascript +Math.clz32(3.2) // 30 +Math.clz32(3.9) // 30 +``` + +对于空值或其他类型的值,`Math.clz32`方法会将它们先转为数值,然后再计算。 + +```javascript +Math.clz32() // 32 +Math.clz32(NaN) // 32 +Math.clz32(Infinity) // 32 +Math.clz32(null) // 32 +Math.clz32('foo') // 32 +Math.clz32([]) // 32 +Math.clz32({}) // 32 +Math.clz32(true) // 31 +``` + +### Math.imul() + +`Math.imul`方法返回两个数以 32 位带符号整数形式相乘的结果,返回的也是一个 32 位的带符号整数。 + +```javascript +Math.imul(2, 4) // 8 +Math.imul(-1, 8) // -8 +Math.imul(-2, -2) // 4 +``` + +如果只考虑最后 32 位,大多数情况下,`Math.imul(a, b)`与`a * b`的结果是相同的,即该方法等同于`(a * b)|0`的效果(超过 32 位的部分溢出)。之所以需要部署这个方法,是因为 JavaScript 有精度限制,超过 2 的 53 次方的值无法精确表示。这就是说,对于那些很大的数的乘法,低位数值往往都是不精确的,`Math.imul`方法可以返回正确的低位数值。 + +```javascript +(0x7fffffff * 0x7fffffff)|0 // 0 +``` + +上面这个乘法算式,返回结果为 0。但是由于这两个二进制数的最低位都是 1,所以这个结果肯定是不正确的,因为根据二进制乘法,计算结果的二进制最低位应该也是 1。这个错误就是因为它们的乘积超过了 2 的 53 次方,JavaScript 无法保存额外的精度,就把低位的值都变成了 0。`Math.imul`方法可以返回正确的值 1。 + +```javascript +Math.imul(0x7fffffff, 0x7fffffff) // 1 +``` + +### Math.fround() + +`Math.fround`方法返回一个数的32位单精度浮点数形式。 + +对于32位单精度格式来说,数值精度是24个二进制位(1 位隐藏位与 23 位有效位),所以对于 -2<sup>24</sup> 至 2<sup>24</sup> 之间的整数(不含两个端点),返回结果与参数本身一致。 + +```javascript +Math.fround(0) // 0 +Math.fround(1)   // 1 +Math.fround(2 ** 24 - 1) // 16777215 +``` + +如果参数的绝对值大于 2<sup>24</sup>,返回的结果便开始丢失精度。 + +```javascript +Math.fround(2 ** 24) // 16777216 +Math.fround(2 ** 24 + 1) // 16777216 +``` + +`Math.fround`方法的主要作用,是将64位双精度浮点数转为32位单精度浮点数。如果小数的精度超过24个二进制位,返回值就会不同于原值,否则返回值不变(即与64位双精度值一致)。 + +```javascript +// 未丢失有效精度 +Math.fround(1.125) // 1.125 +Math.fround(7.25) // 7.25 + +// 丢失精度 +Math.fround(0.3)   // 0.30000001192092896 +Math.fround(0.7)   // 0.699999988079071 +Math.fround(1.0000000123) // 1 +``` + +对于 `NaN` 和 `Infinity`,此方法返回原值。对于其它类型的非数值,`Math.fround` 方法会先将其转为数值,再返回单精度浮点数。 + +```javascript +Math.fround(NaN) // NaN +Math.fround(Infinity) // Infinity + +Math.fround('5') // 5 +Math.fround(true) // 1 +Math.fround(null) // 0 +Math.fround([]) // 0 +Math.fround({}) // NaN +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.fround = Math.fround || function (x) { + return new Float32Array([x])[0]; +}; +``` + +### Math.hypot() + +`Math.hypot`方法返回所有参数的平方和的平方根。 + +```javascript +Math.hypot(3, 4); // 5 +Math.hypot(3, 4, 5); // 7.0710678118654755 +Math.hypot(); // 0 +Math.hypot(NaN); // NaN +Math.hypot(3, 4, 'foo'); // NaN +Math.hypot(3, 4, '5'); // 7.0710678118654755 +Math.hypot(-3); // 3 +``` + +上面代码中,3 的平方加上 4 的平方,等于 5 的平方。 + +如果参数不是数值,`Math.hypot`方法会将其转为数值。只要有一个参数无法转为数值,就会返回 NaN。 + +### 对数方法 + +ES6 新增了 4 个对数相关方法。 + +**(1) Math.expm1()** + +`Math.expm1(x)`返回 e<sup>x</sup> - 1,即`Math.exp(x) - 1`。 + +```javascript +Math.expm1(-1) // -0.6321205588285577 +Math.expm1(0) // 0 +Math.expm1(1) // 1.718281828459045 +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.expm1 = Math.expm1 || function(x) { + return Math.exp(x) - 1; +}; +``` + +**(2)Math.log1p()** + +`Math.log1p(x)`方法返回`1 + x`的自然对数,即`Math.log(1 + x)`。如果`x`小于-1,返回`NaN`。 + +```javascript +Math.log1p(1) // 0.6931471805599453 +Math.log1p(0) // 0 +Math.log1p(-1) // -Infinity +Math.log1p(-2) // NaN +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.log1p = Math.log1p || function(x) { + return Math.log(1 + x); +}; +``` + +**(3)Math.log10()** + +`Math.log10(x)`返回以 10 为底的`x`的对数。如果`x`小于 0,则返回 NaN。 + +```javascript +Math.log10(2) // 0.3010299956639812 +Math.log10(1) // 0 +Math.log10(0) // -Infinity +Math.log10(-2) // NaN +Math.log10(100000) // 5 +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.log10 = Math.log10 || function(x) { + return Math.log(x) / Math.LN10; +}; +``` + +**(4)Math.log2()** + +`Math.log2(x)`返回以 2 为底的`x`的对数。如果`x`小于 0,则返回 NaN。 + +```javascript +Math.log2(3) // 1.584962500721156 +Math.log2(2) // 1 +Math.log2(1) // 0 +Math.log2(0) // -Infinity +Math.log2(-2) // NaN +Math.log2(1024) // 10 +Math.log2(1 << 29) // 29 +``` + +对于没有部署这个方法的环境,可以用下面的代码模拟。 + +```javascript +Math.log2 = Math.log2 || function(x) { + return Math.log(x) / Math.LN2; +}; +``` + +### 双曲函数方法 + +ES6 新增了 6 个双曲函数方法。 + +- `Math.sinh(x)` 返回`x`的双曲正弦(hyperbolic sine) +- `Math.cosh(x)` 返回`x`的双曲余弦(hyperbolic cosine) +- `Math.tanh(x)` 返回`x`的双曲正切(hyperbolic tangent) +- `Math.asinh(x)` 返回`x`的反双曲正弦(inverse hyperbolic sine) +- `Math.acosh(x)` 返回`x`的反双曲余弦(inverse hyperbolic cosine) +- `Math.atanh(x)` 返回`x`的反双曲正切(inverse hyperbolic tangent) + +## 指数运算符 + +ES2016 新增了一个指数运算符(`**`)。 + +```javascript +2 ** 2 // 4 +2 ** 3 // 8 +``` + +这个运算符的一个特点是右结合,而不是常见的左结合。多个指数运算符连用时,是从最右边开始计算的。 + +```javascript +// 相当于 2 ** (3 ** 2) +2 ** 3 ** 2 +// 512 +``` + +上面代码中,首先计算的是第二个指数运算符,而不是第一个。 + +指数运算符可以与等号结合,形成一个新的赋值运算符(`**=`)。 + +```javascript +let a = 1.5; +a **= 2; +// 等同于 a = a * a; + +let b = 4; +b **= 3; +// 等同于 b = b * b * b; +``` + +注意,V8 引擎的指数运算符与`Math.pow`的实现不相同,对于特别大的运算结果,两者会有细微的差异。 + +```javascript +Math.pow(99, 99) +// 3.697296376497263e+197 + +99 ** 99 +// 3.697296376497268e+197 +``` + +上面代码中,两个运算结果的最后一位有效数字是有差异的。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object-methods.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object-methods.md" new file mode 100755 index 000000000..d6f133ab4 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object-methods.md" @@ -0,0 +1,833 @@ +# 对象的新增方法 + +## Object.is() + +ES5 比较两个值是否相等,只有两个运算符:相等运算符(`==`)和严格相等运算符(`===`)。它们都有缺点,前者会自动转换数据类型,后者的`NaN`不等于自身,以及`+0`等于`-0`。JavaScript 缺乏一种运算,在所有环境中,只要两个值是一样的,它们就应该相等。 + +ES6 提出“Same-value equality”(同值相等)算法,用来解决这个问题。`Object.is`就是部署这个算法的新方法。它用来比较两个值是否严格相等,与严格比较运算符(===)的行为基本一致。 + +```javascript +Object.is('foo', 'foo') +// true +Object.is({}, {}) +// false +``` + +不同之处只有两个:一是`+0`不等于`-0`,二是`NaN`等于自身。 + +```javascript ++0 === -0 //true +NaN === NaN // false + +Object.is(+0, -0) // false +Object.is(NaN, NaN) // true +``` + +ES5 可以通过下面的代码,部署`Object.is`。 + +```javascript +Object.defineProperty(Object, 'is', { + value: function(x, y) { + if (x === y) { + // 针对+0 不等于 -0的情况 + return x !== 0 || 1 / x === 1 / y; + } + // 针对NaN的情况 + return x !== x && y !== y; + }, + configurable: true, + enumerable: false, + writable: true +}); +``` + +## Object.assign() + +### 基本用法 + +`Object.assign`方法用于对象的合并,将源对象(source)的所有可枚举属性,复制到目标对象(target)。 + +```javascript +const target = { a: 1 }; + +const source1 = { b: 2 }; +const source2 = { c: 3 }; + +Object.assign(target, source1, source2); +target // {a:1, b:2, c:3} +``` + +`Object.assign`方法的第一个参数是目标对象,后面的参数都是源对象。 + +注意,如果目标对象与源对象有同名属性,或多个源对象有同名属性,则后面的属性会覆盖前面的属性。 + +```javascript +const target = { a: 1, b: 1 }; + +const source1 = { b: 2, c: 2 }; +const source2 = { c: 3 }; + +Object.assign(target, source1, source2); +target // {a:1, b:2, c:3} +``` + +如果只有一个参数,`Object.assign`会直接返回该参数。 + +```javascript +const obj = {a: 1}; +Object.assign(obj) === obj // true +``` + +如果该参数不是对象,则会先转成对象,然后返回。 + +```javascript +typeof Object.assign(2) // "object" +``` + +由于`undefined`和`null`无法转成对象,所以如果它们作为参数,就会报错。 + +```javascript +Object.assign(undefined) // 报错 +Object.assign(null) // 报错 +``` + +如果非对象参数出现在源对象的位置(即非首参数),那么处理规则有所不同。首先,这些参数都会转成对象,如果无法转成对象,就会跳过。这意味着,如果`undefined`和`null`不在首参数,就不会报错。 + +```javascript +let obj = {a: 1}; +Object.assign(obj, undefined) === obj // true +Object.assign(obj, null) === obj // true +``` + +其他类型的值(即数值、字符串和布尔值)不在首参数,也不会报错。但是,除了字符串会以数组形式,拷贝入目标对象,其他值都不会产生效果。 + +```javascript +const v1 = 'abc'; +const v2 = true; +const v3 = 10; + +const obj = Object.assign({}, v1, v2, v3); +console.log(obj); // { "0": "a", "1": "b", "2": "c" } +``` + +上面代码中,`v1`、`v2`、`v3`分别是字符串、布尔值和数值,结果只有字符串合入目标对象(以字符数组的形式),数值和布尔值都会被忽略。这是因为只有字符串的包装对象,会产生可枚举属性。 + +```javascript +Object(true) // {[[PrimitiveValue]]: true} +Object(10) // {[[PrimitiveValue]]: 10} +Object('abc') // {0: "a", 1: "b", 2: "c", length: 3, [[PrimitiveValue]]: "abc"} +``` + +上面代码中,布尔值、数值、字符串分别转成对应的包装对象,可以看到它们的原始值都在包装对象的内部属性`[[PrimitiveValue]]`上面,这个属性是不会被`Object.assign`拷贝的。只有字符串的包装对象,会产生可枚举的实义属性,那些属性则会被拷贝。 + +`Object.assign`拷贝的属性是有限制的,只拷贝源对象的自身属性(不拷贝继承属性),也不拷贝不可枚举的属性(`enumerable: false`)。 + +```javascript +Object.assign({b: 'c'}, + Object.defineProperty({}, 'invisible', { + enumerable: false, + value: 'hello' + }) +) +// { b: 'c' } +``` + +上面代码中,`Object.assign`要拷贝的对象只有一个不可枚举属性`invisible`,这个属性并没有被拷贝进去。 + +属性名为 Symbol 值的属性,也会被`Object.assign`拷贝。 + +```javascript +Object.assign({ a: 'b' }, { [Symbol('c')]: 'd' }) +// { a: 'b', Symbol(c): 'd' } +``` + +### 注意点 + +**(1)浅拷贝** + +`Object.assign`方法实行的是浅拷贝,而不是深拷贝。也就是说,如果源对象某个属性的值是对象,那么目标对象拷贝得到的是这个对象的引用。 + +```javascript +const obj1 = {a: {b: 1}}; +const obj2 = Object.assign({}, obj1); + +obj1.a.b = 2; +obj2.a.b // 2 +``` + +上面代码中,源对象`obj1`的`a`属性的值是一个对象,`Object.assign`拷贝得到的是这个对象的引用。这个对象的任何变化,都会反映到目标对象上面。 + +**(2)同名属性的替换** + +对于这种嵌套的对象,一旦遇到同名属性,`Object.assign`的处理方法是替换,而不是添加。 + +```javascript +const target = { a: { b: 'c', d: 'e' } } +const source = { a: { b: 'hello' } } +Object.assign(target, source) +// { a: { b: 'hello' } } +``` + +上面代码中,`target`对象的`a`属性被`source`对象的`a`属性整个替换掉了,而不会得到`{ a: { b: 'hello', d: 'e' } }`的结果。这通常不是开发者想要的,需要特别小心。 + +一些函数库提供`Object.assign`的定制版本(比如 Lodash 的`_.defaultsDeep`方法),可以得到深拷贝的合并。 + +**(3)数组的处理** + +`Object.assign`可以用来处理数组,但是会把数组视为对象。 + +```javascript +Object.assign([1, 2, 3], [4, 5]) +// [4, 5, 3] +``` + +上面代码中,`Object.assign`把数组视为属性名为 0、1、2 的对象,因此源数组的 0 号属性`4`覆盖了目标数组的 0 号属性`1`。 + +**(4)取值函数的处理** + +`Object.assign`只能进行值的复制,如果要复制的值是一个取值函数,那么将求值后再复制。 + +```javascript +const source = { + get foo() { return 1 } +}; +const target = {}; + +Object.assign(target, source) +// { foo: 1 } +``` + +上面代码中,`source`对象的`foo`属性是一个取值函数,`Object.assign`不会复制这个取值函数,只会拿到值以后,将这个值复制过去。 + +### 常见用途 + +`Object.assign`方法有很多用处。 + +**(1)为对象添加属性** + +```javascript +class Point { + constructor(x, y) { + Object.assign(this, {x, y}); + } +} +``` + +上面方法通过`Object.assign`方法,将`x`属性和`y`属性添加到`Point`类的对象实例。 + +**(2)为对象添加方法** + +```javascript +Object.assign(SomeClass.prototype, { + someMethod(arg1, arg2) { + ··· + }, + anotherMethod() { + ··· + } +}); + +// 等同于下面的写法 +SomeClass.prototype.someMethod = function (arg1, arg2) { + ··· +}; +SomeClass.prototype.anotherMethod = function () { + ··· +}; +``` + +上面代码使用了对象属性的简洁表示法,直接将两个函数放在大括号中,再使用`assign`方法添加到`SomeClass.prototype`之中。 + +**(3)克隆对象** + +```javascript +function clone(origin) { + return Object.assign({}, origin); +} +``` + +上面代码将原始对象拷贝到一个空对象,就得到了原始对象的克隆。 + +不过,采用这种方法克隆,只能克隆原始对象自身的值,不能克隆它继承的值。如果想要保持继承链,可以采用下面的代码。 + +```javascript +function clone(origin) { + let originProto = Object.getPrototypeOf(origin); + return Object.assign(Object.create(originProto), origin); +} +``` + +**(4)合并多个对象** + +将多个对象合并到某个对象。 + +```javascript +const merge = + (target, ...sources) => Object.assign(target, ...sources); +``` + +如果希望合并后返回一个新对象,可以改写上面函数,对一个空对象合并。 + +```javascript +const merge = + (...sources) => Object.assign({}, ...sources); +``` + +**(5)为属性指定默认值** + +```javascript +const DEFAULTS = { + logLevel: 0, + outputFormat: 'html' +}; + +function processContent(options) { + options = Object.assign({}, DEFAULTS, options); + console.log(options); + // ... +} +``` + +上面代码中,`DEFAULTS`对象是默认值,`options`对象是用户提供的参数。`Object.assign`方法将`DEFAULTS`和`options`合并成一个新对象,如果两者有同名属性,则`option`的属性值会覆盖`DEFAULTS`的属性值。 + +注意,由于存在浅拷贝的问题,`DEFAULTS`对象和`options`对象的所有属性的值,最好都是简单类型,不要指向另一个对象。否则,`DEFAULTS`对象的该属性很可能不起作用。 + +```javascript +const DEFAULTS = { + url: { + host: 'example.com', + port: 7070 + }, +}; + +processContent({ url: {port: 8000} }) +// { +// url: {port: 8000} +// } +``` + +上面代码的原意是将`url.port`改成 8000,`url.host`不变。实际结果却是`options.url`覆盖掉`DEFAULTS.url`,所以`url.host`就不存在了。 + +## Object.getOwnPropertyDescriptors() + +ES5 的`Object.getOwnPropertyDescriptor()`方法会返回某个对象属性的描述对象(descriptor)。ES2017 引入了`Object.getOwnPropertyDescriptors()`方法,返回指定对象所有自身属性(非继承属性)的描述对象。 + +```javascript +const obj = { + foo: 123, + get bar() { return 'abc' } +}; + +Object.getOwnPropertyDescriptors(obj) +// { foo: +// { value: 123, +// writable: true, +// enumerable: true, +// configurable: true }, +// bar: +// { get: [Function: get bar], +// set: undefined, +// enumerable: true, +// configurable: true } } +``` + +上面代码中,`Object.getOwnPropertyDescriptors()`方法返回一个对象,所有原对象的属性名都是该对象的属性名,对应的属性值就是该属性的描述对象。 + +该方法的实现非常容易。 + +```javascript +function getOwnPropertyDescriptors(obj) { + const result = {}; + for (let key of Reflect.ownKeys(obj)) { + result[key] = Object.getOwnPropertyDescriptor(obj, key); + } + return result; +} +``` + +该方法的引入目的,主要是为了解决`Object.assign()`无法正确拷贝`get`属性和`set`属性的问题。 + +```javascript +const source = { + set foo(value) { + console.log(value); + } +}; + +const target1 = {}; +Object.assign(target1, source); + +Object.getOwnPropertyDescriptor(target1, 'foo') +// { value: undefined, +// writable: true, +// enumerable: true, +// configurable: true } +``` + +上面代码中,`source`对象的`foo`属性的值是一个赋值函数,`Object.assign`方法将这个属性拷贝给`target1`对象,结果该属性的值变成了`undefined`。这是因为`Object.assign`方法总是拷贝一个属性的值,而不会拷贝它背后的赋值方法或取值方法。 + +这时,`Object.getOwnPropertyDescriptors()`方法配合`Object.defineProperties()`方法,就可以实现正确拷贝。 + +```javascript +const source = { + set foo(value) { + console.log(value); + } +}; + +const target2 = {}; +Object.defineProperties(target2, Object.getOwnPropertyDescriptors(source)); +Object.getOwnPropertyDescriptor(target2, 'foo') +// { get: undefined, +// set: [Function: set foo], +// enumerable: true, +// configurable: true } +``` + +上面代码中,两个对象合并的逻辑可以写成一个函数。 + +```javascript +const shallowMerge = (target, source) => Object.defineProperties( + target, + Object.getOwnPropertyDescriptors(source) +); +``` + +`Object.getOwnPropertyDescriptors()`方法的另一个用处,是配合`Object.create()`方法,将对象属性克隆到一个新对象。这属于浅拷贝。 + +```javascript +const clone = Object.create(Object.getPrototypeOf(obj), + Object.getOwnPropertyDescriptors(obj)); + +// 或者 + +const shallowClone = (obj) => Object.create( + Object.getPrototypeOf(obj), + Object.getOwnPropertyDescriptors(obj) +); +``` + +上面代码会克隆对象`obj`。 + +另外,`Object.getOwnPropertyDescriptors()`方法可以实现一个对象继承另一个对象。以前,继承另一个对象,常常写成下面这样。 + +```javascript +const obj = { + __proto__: prot, + foo: 123, +}; +``` + +ES6 规定`__proto__`只有浏览器要部署,其他环境不用部署。如果去除`__proto__`,上面代码就要改成下面这样。 + +```javascript +const obj = Object.create(prot); +obj.foo = 123; + +// 或者 + +const obj = Object.assign( + Object.create(prot), + { + foo: 123, + } +); +``` + +有了`Object.getOwnPropertyDescriptors()`,我们就有了另一种写法。 + +```javascript +const obj = Object.create( + prot, + Object.getOwnPropertyDescriptors({ + foo: 123, + }) +); +``` + +`Object.getOwnPropertyDescriptors()`也可以用来实现 Mixin(混入)模式。 + +```javascript +let mix = (object) => ({ + with: (...mixins) => mixins.reduce( + (c, mixin) => Object.create( + c, Object.getOwnPropertyDescriptors(mixin) + ), object) +}); + +// multiple mixins example +let a = {a: 'a'}; +let b = {b: 'b'}; +let c = {c: 'c'}; +let d = mix(c).with(a, b); + +d.c // "c" +d.b // "b" +d.a // "a" +``` + +上面代码返回一个新的对象`d`,代表了对象`a`和`b`被混入了对象`c`的操作。 + +出于完整性的考虑,`Object.getOwnPropertyDescriptors()`进入标准以后,以后还会新增`Reflect.getOwnPropertyDescriptors()`方法。 + +## `__proto__`属性,Object.setPrototypeOf(),Object.getPrototypeOf() + +JavaScript 语言的对象继承是通过原型链实现的。ES6 提供了更多原型对象的操作方法。 + +### `__proto__`属性 + +`__proto__`属性(前后各两个下划线),用来读取或设置当前对象的`prototype`对象。目前,所有浏览器(包括 IE11)都部署了这个属性。 + +```javascript +// es5 的写法 +const obj = { + method: function() { ... } +}; +obj.__proto__ = someOtherObj; + +// es6 的写法 +var obj = Object.create(someOtherObj); +obj.method = function() { ... }; +``` + +该属性没有写入 ES6 的正文,而是写入了附录,原因是`__proto__`前后的双下划线,说明它本质上是一个内部属性,而不是一个正式的对外的 API,只是由于浏览器广泛支持,才被加入了 ES6。标准明确规定,只有浏览器必须部署这个属性,其他运行环境不一定需要部署,而且新的代码最好认为这个属性是不存在的。因此,无论从语义的角度,还是从兼容性的角度,都不要使用这个属性,而是使用下面的`Object.setPrototypeOf()`(写操作)、`Object.getPrototypeOf()`(读操作)、`Object.create()`(生成操作)代替。 + +实现上,`__proto__`调用的是`Object.prototype.__proto__`,具体实现如下。 + +```javascript +Object.defineProperty(Object.prototype, '__proto__', { + get() { + let _thisObj = Object(this); + return Object.getPrototypeOf(_thisObj); + }, + set(proto) { + if (this === undefined || this === null) { + throw new TypeError(); + } + if (!isObject(this)) { + return undefined; + } + if (!isObject(proto)) { + return undefined; + } + let status = Reflect.setPrototypeOf(this, proto); + if (!status) { + throw new TypeError(); + } + }, +}); + +function isObject(value) { + return Object(value) === value; +} +``` + +如果一个对象本身部署了`__proto__`属性,该属性的值就是对象的原型。 + +```javascript +Object.getPrototypeOf({ __proto__: null }) +// null +``` + +### Object.setPrototypeOf() + +`Object.setPrototypeOf`方法的作用与`__proto__`相同,用来设置一个对象的`prototype`对象,返回参数对象本身。它是 ES6 正式推荐的设置原型对象的方法。 + +```javascript +// 格式 +Object.setPrototypeOf(object, prototype) + +// 用法 +const o = Object.setPrototypeOf({}, null); +``` + +该方法等同于下面的函数。 + +```javascript +function setPrototypeOf(obj, proto) { + obj.__proto__ = proto; + return obj; +} +``` + +下面是一个例子。 + +```javascript +let proto = {}; +let obj = { x: 10 }; +Object.setPrototypeOf(obj, proto); + +proto.y = 20; +proto.z = 40; + +obj.x // 10 +obj.y // 20 +obj.z // 40 +``` + +上面代码将`proto`对象设为`obj`对象的原型,所以从`obj`对象可以读取`proto`对象的属性。 + +如果第一个参数不是对象,会自动转为对象。但是由于返回的还是第一个参数,所以这个操作不会产生任何效果。 + +```javascript +Object.setPrototypeOf(1, {}) === 1 // true +Object.setPrototypeOf('foo', {}) === 'foo' // true +Object.setPrototypeOf(true, {}) === true // true +``` + +由于`undefined`和`null`无法转为对象,所以如果第一个参数是`undefined`或`null`,就会报错。 + +```javascript +Object.setPrototypeOf(undefined, {}) +// TypeError: Object.setPrototypeOf called on null or undefined + +Object.setPrototypeOf(null, {}) +// TypeError: Object.setPrototypeOf called on null or undefined +``` + +### Object.getPrototypeOf() + +该方法与`Object.setPrototypeOf`方法配套,用于读取一个对象的原型对象。 + +```javascript +Object.getPrototypeOf(obj); +``` + +下面是一个例子。 + +```javascript +function Rectangle() { + // ... +} + +const rec = new Rectangle(); + +Object.getPrototypeOf(rec) === Rectangle.prototype +// true + +Object.setPrototypeOf(rec, Object.prototype); +Object.getPrototypeOf(rec) === Rectangle.prototype +// false +``` + +如果参数不是对象,会被自动转为对象。 + +```javascript +// 等同于 Object.getPrototypeOf(Number(1)) +Object.getPrototypeOf(1) +// Number {[[PrimitiveValue]]: 0} + +// 等同于 Object.getPrototypeOf(String('foo')) +Object.getPrototypeOf('foo') +// String {length: 0, [[PrimitiveValue]]: ""} + +// 等同于 Object.getPrototypeOf(Boolean(true)) +Object.getPrototypeOf(true) +// Boolean {[[PrimitiveValue]]: false} + +Object.getPrototypeOf(1) === Number.prototype // true +Object.getPrototypeOf('foo') === String.prototype // true +Object.getPrototypeOf(true) === Boolean.prototype // true +``` + +如果参数是`undefined`或`null`,它们无法转为对象,所以会报错。 + +```javascript +Object.getPrototypeOf(null) +// TypeError: Cannot convert undefined or null to object + +Object.getPrototypeOf(undefined) +// TypeError: Cannot convert undefined or null to object +``` + +## Object.keys(),Object.values(),Object.entries() + +### Object.keys() + +ES5 引入了`Object.keys`方法,返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键名。 + +```javascript +var obj = { foo: 'bar', baz: 42 }; +Object.keys(obj) +// ["foo", "baz"] +``` + +ES2017 [引入](https://github.com/tc39/proposal-object-values-entries)了跟`Object.keys`配套的`Object.values`和`Object.entries`,作为遍历一个对象的补充手段,供`for...of`循环使用。 + +```javascript +let {keys, values, entries} = Object; +let obj = { a: 1, b: 2, c: 3 }; + +for (let key of keys(obj)) { + console.log(key); // 'a', 'b', 'c' +} + +for (let value of values(obj)) { + console.log(value); // 1, 2, 3 +} + +for (let [key, value] of entries(obj)) { + console.log([key, value]); // ['a', 1], ['b', 2], ['c', 3] +} +``` + +### Object.values() + +`Object.values`方法返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键值。 + +```javascript +const obj = { foo: 'bar', baz: 42 }; +Object.values(obj) +// ["bar", 42] +``` + +返回数组的成员顺序,与本章的《属性的遍历》部分介绍的排列规则一致。 + +```javascript +const obj = { 100: 'a', 2: 'b', 7: 'c' }; +Object.values(obj) +// ["b", "c", "a"] +``` + +上面代码中,属性名为数值的属性,是按照数值大小,从小到大遍历的,因此返回的顺序是`b`、`c`、`a`。 + +`Object.values`只返回对象自身的可遍历属性。 + +```javascript +const obj = Object.create({}, {p: {value: 42}}); +Object.values(obj) // [] +``` + +上面代码中,`Object.create`方法的第二个参数添加的对象属性(属性`p`),如果不显式声明,默认是不可遍历的,因为`p`的属性描述对象的`enumerable`默认是`false`,`Object.values`不会返回这个属性。只要把`enumerable`改成`true`,`Object.values`就会返回属性`p`的值。 + +```javascript +const obj = Object.create({}, {p: + { +    value: 42, +    enumerable: true +  } +}); +Object.values(obj) // [42] +``` + +`Object.values`会过滤属性名为 Symbol 值的属性。 + +```javascript +Object.values({ [Symbol()]: 123, foo: 'abc' }); +// ['abc'] +``` + +如果`Object.values`方法的参数是一个字符串,会返回各个字符组成的一个数组。 + +```javascript +Object.values('foo') +// ['f', 'o', 'o'] +``` + +上面代码中,字符串会先转成一个类似数组的对象。字符串的每个字符,就是该对象的一个属性。因此,`Object.values`返回每个属性的键值,就是各个字符组成的一个数组。 + +如果参数不是对象,`Object.values`会先将其转为对象。由于数值和布尔值的包装对象,都不会为实例添加非继承的属性。所以,`Object.values`会返回空数组。 + +```javascript +Object.values(42) // [] +Object.values(true) // [] +``` + +### Object.entries() + +`Object.entries()`方法返回一个数组,成员是参数对象自身的(不含继承的)所有可遍历(enumerable)属性的键值对数组。 + +```javascript +const obj = { foo: 'bar', baz: 42 }; +Object.entries(obj) +// [ ["foo", "bar"], ["baz", 42] ] +``` + +除了返回值不一样,该方法的行为与`Object.values`基本一致。 + +如果原对象的属性名是一个 Symbol 值,该属性会被忽略。 + +```javascript +Object.entries({ [Symbol()]: 123, foo: 'abc' }); +// [ [ 'foo', 'abc' ] ] +``` + +上面代码中,原对象有两个属性,`Object.entries`只输出属性名非 Symbol 值的属性。将来可能会有`Reflect.ownEntries()`方法,返回对象自身的所有属性。 + +`Object.entries`的基本用途是遍历对象的属性。 + +```javascript +let obj = { one: 1, two: 2 }; +for (let [k, v] of Object.entries(obj)) { + console.log( + `${JSON.stringify(k)}: ${JSON.stringify(v)}` + ); +} +// "one": 1 +// "two": 2 +``` + +`Object.entries`方法的另一个用处是,将对象转为真正的`Map`结构。 + +```javascript +const obj = { foo: 'bar', baz: 42 }; +const map = new Map(Object.entries(obj)); +map // Map { foo: "bar", baz: 42 } +``` + +自己实现`Object.entries`方法,非常简单。 + +```javascript +// Generator函数的版本 +function* entries(obj) { + for (let key of Object.keys(obj)) { + yield [key, obj[key]]; + } +} + +// 非Generator函数的版本 +function entries(obj) { + let arr = []; + for (let key of Object.keys(obj)) { + arr.push([key, obj[key]]); + } + return arr; +} +``` + +## Object.fromEntries() + +`Object.fromEntries()`方法是`Object.entries()`的逆操作,用于将一个键值对数组转为对象。 + +```javascript +Object.fromEntries([ + ['foo', 'bar'], + ['baz', 42] +]) +// { foo: "bar", baz: 42 } +``` + +该方法的主要目的,是将键值对的数据结构还原为对象,因此特别适合将 Map 结构转为对象。 + +```javascript +// 例一 +const entries = new Map([ + ['foo', 'bar'], + ['baz', 42] +]); + +Object.fromEntries(entries) +// { foo: "bar", baz: 42 } + +// 例二 +const map = new Map().set('foo', true).set('bar', false); +Object.fromEntries(map) +// { foo: true, bar: false } +``` + +该方法的一个用处是配合`URLSearchParams`对象,将查询字符串转为对象。 + +```javascript +Object.fromEntries(new URLSearchParams('foo=bar&baz=qux')) +// { foo: "bar", baz: "qux" } +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object.md" new file mode 100755 index 000000000..049032d59 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/object.md" @@ -0,0 +1,707 @@ +# 对象的扩展 + +对象(object)是 JavaScript 最重要的数据结构。ES6 对它进行了重大升级,本章介绍数据结构本身的改变,下一章介绍`Object`对象的新增方法。 + +## 属性的简洁表示法 + +ES6 允许直接写入变量和函数,作为对象的属性和方法。这样的书写更加简洁。 + +```javascript +const foo = 'bar'; +const baz = {foo}; +baz // {foo: "bar"} + +// 等同于 +const baz = {foo: foo}; +``` + +上面代码表明,ES6 允许在对象之中,直接写变量。这时,属性名为变量名, 属性值为变量的值。下面是另一个例子。 + +```javascript +function f(x, y) { + return {x, y}; +} + +// 等同于 + +function f(x, y) { + return {x: x, y: y}; +} + +f(1, 2) // Object {x: 1, y: 2} +``` + +除了属性简写,方法也可以简写。 + +```javascript +const o = { + method() { + return "Hello!"; + } +}; + +// 等同于 + +const o = { + method: function() { + return "Hello!"; + } +}; +``` + +下面是一个实际的例子。 + +```javascript +let birth = '2000/01/01'; + +const Person = { + + name: '张三', + + //等同于birth: birth + birth, + + // 等同于hello: function ()... + hello() { console.log('我的名字是', this.name); } + +}; +``` + +这种写法用于函数的返回值,将会非常方便。 + +```javascript +function getPoint() { + const x = 1; + const y = 10; + return {x, y}; +} + +getPoint() +// {x:1, y:10} +``` + +CommonJS 模块输出一组变量,就非常合适使用简洁写法。 + +```javascript +let ms = {}; + +function getItem (key) { + return key in ms ? ms[key] : null; +} + +function setItem (key, value) { + ms[key] = value; +} + +function clear () { + ms = {}; +} + +module.exports = { getItem, setItem, clear }; +// 等同于 +module.exports = { + getItem: getItem, + setItem: setItem, + clear: clear +}; +``` + +属性的赋值器(setter)和取值器(getter),事实上也是采用这种写法。 + +```javascript +const cart = { + _wheels: 4, + + get wheels () { + return this._wheels; + }, + + set wheels (value) { + if (value < this._wheels) { + throw new Error('数值太小了!'); + } + this._wheels = value; + } +} +``` + +注意,简洁写法的属性名总是字符串,这会导致一些看上去比较奇怪的结果。 + +```javascript +const obj = { + class () {} +}; + +// 等同于 + +var obj = { + 'class': function() {} +}; +``` + +上面代码中,`class`是字符串,所以不会因为它属于关键字,而导致语法解析报错。 + +如果某个方法的值是一个 Generator 函数,前面需要加上星号。 + +```javascript +const obj = { + * m() { + yield 'hello world'; + } +}; +``` + +## 属性名表达式 + +JavaScript 定义对象的属性,有两种方法。 + +```javascript +// 方法一 +obj.foo = true; + +// 方法二 +obj['a' + 'bc'] = 123; +``` + +上面代码的方法一是直接用标识符作为属性名,方法二是用表达式作为属性名,这时要将表达式放在方括号之内。 + +但是,如果使用字面量方式定义对象(使用大括号),在 ES5 中只能使用方法一(标识符)定义属性。 + +```javascript +var obj = { + foo: true, + abc: 123 +}; +``` + +ES6 允许字面量定义对象时,用方法二(表达式)作为对象的属性名,即把表达式放在方括号内。 + +```javascript +let propKey = 'foo'; + +let obj = { + [propKey]: true, + ['a' + 'bc']: 123 +}; +``` + +下面是另一个例子。 + +```javascript +let lastWord = 'last word'; + +const a = { + 'first word': 'hello', + [lastWord]: 'world' +}; + +a['first word'] // "hello" +a[lastWord] // "world" +a['last word'] // "world" +``` + +表达式还可以用于定义方法名。 + +```javascript +let obj = { + ['h' + 'ello']() { + return 'hi'; + } +}; + +obj.hello() // hi +``` + +注意,属性名表达式与简洁表示法,不能同时使用,会报错。 + +```javascript +// 报错 +const foo = 'bar'; +const bar = 'abc'; +const baz = { [foo] }; + +// 正确 +const foo = 'bar'; +const baz = { [foo]: 'abc'}; +``` + +注意,属性名表达式如果是一个对象,默认情况下会自动将对象转为字符串`[object Object]`,这一点要特别小心。 + +```javascript +const keyA = {a: 1}; +const keyB = {b: 2}; + +const myObject = { + [keyA]: 'valueA', + [keyB]: 'valueB' +}; + +myObject // Object {[object Object]: "valueB"} +``` + +上面代码中,`[keyA]`和`[keyB]`得到的都是`[object Object]`,所以`[keyB]`会把`[keyA]`覆盖掉,而`myObject`最后只有一个`[object Object]`属性。 + +## 方法的 name 属性 + +函数的`name`属性,返回函数名。对象方法也是函数,因此也有`name`属性。 + +```javascript +const person = { + sayName() { +    console.log('hello!'); + }, +}; + +person.sayName.name // "sayName" +``` + +上面代码中,方法的`name`属性返回函数名(即方法名)。 + +如果对象的方法使用了取值函数(`getter`)和存值函数(`setter`),则`name`属性不是在该方法上面,而是该方法的属性的描述对象的`get`和`set`属性上面,返回值是方法名前加上`get`和`set`。 + +```javascript +const obj = { + get foo() {}, + set foo(x) {} +}; + +obj.foo.name +// TypeError: Cannot read property 'name' of undefined + +const descriptor = Object.getOwnPropertyDescriptor(obj, 'foo'); + +descriptor.get.name // "get foo" +descriptor.set.name // "set foo" +``` + +有两种特殊情况:`bind`方法创造的函数,`name`属性返回`bound`加上原函数的名字;`Function`构造函数创造的函数,`name`属性返回`anonymous`。 + +```javascript +(new Function()).name // "anonymous" + +var doSomething = function() { + // ... +}; +doSomething.bind().name // "bound doSomething" +``` + +如果对象的方法是一个 Symbol 值,那么`name`属性返回的是这个 Symbol 值的描述。 + +```javascript +const key1 = Symbol('description'); +const key2 = Symbol(); +let obj = { + [key1]() {}, + [key2]() {}, +}; +obj[key1].name // "[description]" +obj[key2].name // "" +``` + +上面代码中,`key1`对应的 Symbol 值有描述,`key2`没有。 + +## 属性的可枚举性和遍历 + +### 可枚举性 + +对象的每个属性都有一个描述对象(Descriptor),用来控制该属性的行为。`Object.getOwnPropertyDescriptor`方法可以获取该属性的描述对象。 + +```javascript +let obj = { foo: 123 }; +Object.getOwnPropertyDescriptor(obj, 'foo') +// { +// value: 123, +// writable: true, +// enumerable: true, +// configurable: true +// } +``` + +描述对象的`enumerable`属性,称为“可枚举性”,如果该属性为`false`,就表示某些操作会忽略当前属性。 + +目前,有四个操作会忽略`enumerable`为`false`的属性。 + +- `for...in`循环:只遍历对象自身的和继承的可枚举的属性。 +- `Object.keys()`:返回对象自身的所有可枚举的属性的键名。 +- `JSON.stringify()`:只串行化对象自身的可枚举的属性。 +- `Object.assign()`: 忽略`enumerable`为`false`的属性,只拷贝对象自身的可枚举的属性。 + +这四个操作之中,前三个是 ES5 就有的,最后一个`Object.assign()`是 ES6 新增的。其中,只有`for...in`会返回继承的属性,其他三个方法都会忽略继承的属性,只处理对象自身的属性。实际上,引入“可枚举”(`enumerable`)这个概念的最初目的,就是让某些属性可以规避掉`for...in`操作,不然所有内部属性和方法都会被遍历到。比如,对象原型的`toString`方法,以及数组的`length`属性,就通过“可枚举性”,从而避免被`for...in`遍历到。 + +```javascript +Object.getOwnPropertyDescriptor(Object.prototype, 'toString').enumerable +// false + +Object.getOwnPropertyDescriptor([], 'length').enumerable +// false +``` + +上面代码中,`toString`和`length`属性的`enumerable`都是`false`,因此`for...in`不会遍历到这两个继承自原型的属性。 + +另外,ES6 规定,所有 Class 的原型的方法都是不可枚举的。 + +```javascript +Object.getOwnPropertyDescriptor(class {foo() {}}.prototype, 'foo').enumerable +// false +``` + +总的来说,操作中引入继承的属性会让问题复杂化,大多数时候,我们只关心对象自身的属性。所以,尽量不要用`for...in`循环,而用`Object.keys()`代替。 + +### 属性的遍历 + +ES6 一共有 5 种方法可以遍历对象的属性。 + +**(1)for...in** + +`for...in`循环遍历对象自身的和继承的可枚举属性(不含 Symbol 属性)。 + +**(2)Object.keys(obj)** + +`Object.keys`返回一个数组,包括对象自身的(不含继承的)所有可枚举属性(不含 Symbol 属性)的键名。 + +**(3)Object.getOwnPropertyNames(obj)** + +`Object.getOwnPropertyNames`返回一个数组,包含对象自身的所有属性(不含 Symbol 属性,但是包括不可枚举属性)的键名。 + +**(4)Object.getOwnPropertySymbols(obj)** + +`Object.getOwnPropertySymbols`返回一个数组,包含对象自身的所有 Symbol 属性的键名。 + +**(5)Reflect.ownKeys(obj)** + +`Reflect.ownKeys`返回一个数组,包含对象自身的所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。 + +以上的 5 种方法遍历对象的键名,都遵守同样的属性遍历的次序规则。 + +- 首先遍历所有数值键,按照数值升序排列。 +- 其次遍历所有字符串键,按照加入时间升序排列。 +- 最后遍历所有 Symbol 键,按照加入时间升序排列。 + +```javascript +Reflect.ownKeys({ [Symbol()]:0, b:0, 10:0, 2:0, a:0 }) +// ['2', '10', 'b', 'a', Symbol()] +``` + +上面代码中,`Reflect.ownKeys`方法返回一个数组,包含了参数对象的所有属性。这个数组的属性次序是这样的,首先是数值属性`2`和`10`,其次是字符串属性`b`和`a`,最后是 Symbol 属性。 + +## super 关键字 + +我们知道,`this`关键字总是指向函数所在的当前对象,ES6 又新增了另一个类似的关键字`super`,指向当前对象的原型对象。 + +```javascript +const proto = { + foo: 'hello' +}; + +const obj = { + foo: 'world', + find() { + return super.foo; + } +}; + +Object.setPrototypeOf(obj, proto); +obj.find() // "hello" +``` + +上面代码中,对象`obj.find()`方法之中,通过`super.foo`引用了原型对象`proto`的`foo`属性。 + +注意,`super`关键字表示原型对象时,只能用在对象的方法之中,用在其他地方都会报错。 + +```javascript +// 报错 +const obj = { + foo: super.foo +} + +// 报错 +const obj = { + foo: () => super.foo +} + +// 报错 +const obj = { + foo: function () { + return super.foo + } +} +``` + +上面三种`super`的用法都会报错,因为对于 JavaScript 引擎来说,这里的`super`都没有用在对象的方法之中。第一种写法是`super`用在属性里面,第二种和第三种写法是`super`用在一个函数里面,然后赋值给`foo`属性。目前,只有对象方法的简写法可以让 JavaScript 引擎确认,定义的是对象的方法。 + +JavaScript 引擎内部,`super.foo`等同于`Object.getPrototypeOf(this).foo`(属性)或`Object.getPrototypeOf(this).foo.call(this)`(方法)。 + +```javascript +const proto = { + x: 'hello', + foo() { + console.log(this.x); + }, +}; + +const obj = { + x: 'world', + foo() { + super.foo(); + } +} + +Object.setPrototypeOf(obj, proto); + +obj.foo() // "world" +``` + +上面代码中,`super.foo`指向原型对象`proto`的`foo`方法,但是绑定的`this`却还是当前对象`obj`,因此输出的就是`world`。 + +## 对象的扩展运算符 + +《数组的扩展》一章中,已经介绍过扩展运算符(`...`)。ES2018 将这个运算符[引入](https://github.com/sebmarkbage/ecmascript-rest-spread)了对象。 + +### 解构赋值 + +对象的解构赋值用于从一个对象取值,相当于将目标对象自身的所有可遍历的(enumerable)、但尚未被读取的属性,分配到指定的对象上面。所有的键和它们的值,都会拷贝到新对象上面。 + +```javascript +let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; +x // 1 +y // 2 +z // { a: 3, b: 4 } +``` + +上面代码中,变量`z`是解构赋值所在的对象。它获取等号右边的所有尚未读取的键(`a`和`b`),将它们连同值一起拷贝过来。 + +由于解构赋值要求等号右边是一个对象,所以如果等号右边是`undefined`或`null`,就会报错,因为它们无法转为对象。 + +```javascript +let { x, y, ...z } = null; // 运行时错误 +let { x, y, ...z } = undefined; // 运行时错误 +``` + +解构赋值必须是最后一个参数,否则会报错。 + +```javascript +let { ...x, y, z } = someObject; // 句法错误 +let { x, ...y, ...z } = someObject; // 句法错误 +``` + +上面代码中,解构赋值不是最后一个参数,所以会报错。 + +注意,解构赋值的拷贝是浅拷贝,即如果一个键的值是复合类型的值(数组、对象、函数)、那么解构赋值拷贝的是这个值的引用,而不是这个值的副本。 + +```javascript +let obj = { a: { b: 1 } }; +let { ...x } = obj; +obj.a.b = 2; +x.a.b // 2 +``` + +上面代码中,`x`是解构赋值所在的对象,拷贝了对象`obj`的`a`属性。`a`属性引用了一个对象,修改这个对象的值,会影响到解构赋值对它的引用。 + +另外,扩展运算符的解构赋值,不能复制继承自原型对象的属性。 + +```javascript +let o1 = { a: 1 }; +let o2 = { b: 2 }; +o2.__proto__ = o1; +let { ...o3 } = o2; +o3 // { b: 2 } +o3.a // undefined +``` + +上面代码中,对象`o3`复制了`o2`,但是只复制了`o2`自身的属性,没有复制它的原型对象`o1`的属性。 + +下面是另一个例子。 + +```javascript +const o = Object.create({ x: 1, y: 2 }); +o.z = 3; + +let { x, ...newObj } = o; +let { y, z } = newObj; +x // 1 +y // undefined +z // 3 +``` + +上面代码中,变量`x`是单纯的解构赋值,所以可以读取对象`o`继承的属性;变量`y`和`z`是扩展运算符的解构赋值,只能读取对象`o`自身的属性,所以变量`z`可以赋值成功,变量`y`取不到值。ES6 规定,变量声明语句之中,如果使用解构赋值,扩展运算符后面必须是一个变量名,而不能是一个解构赋值表达式,所以上面代码引入了中间变量`newObj`,如果写成下面这样会报错。 + +```javascript +let { x, ...{ y, z } } = o; +// SyntaxError: ... must be followed by an identifier in declaration contexts +``` + +解构赋值的一个用处,是扩展某个函数的参数,引入其他操作。 + +```javascript +function baseFunction({ a, b }) { + // ... +} +function wrapperFunction({ x, y, ...restConfig }) { + // 使用 x 和 y 参数进行操作 + // 其余参数传给原始函数 + return baseFunction(restConfig); +} +``` + +上面代码中,原始函数`baseFunction`接受`a`和`b`作为参数,函数`wrapperFunction`在`baseFunction`的基础上进行了扩展,能够接受多余的参数,并且保留原始函数的行为。 + +### 扩展运算符 + +对象的扩展运算符(`...`)用于取出参数对象的所有可遍历属性,拷贝到当前对象之中。 + +```javascript +let z = { a: 3, b: 4 }; +let n = { ...z }; +n // { a: 3, b: 4 } +``` + +由于数组是特殊的对象,所以对象的扩展运算符也可以用于数组。 + +```javascript +let foo = { ...['a', 'b', 'c'] }; +foo +// {0: "a", 1: "b", 2: "c"} +``` + +如果扩展运算符后面是一个空对象,则没有任何效果。 + +```javascript +{...{}, a: 1} +// { a: 1 } +``` + +如果扩展运算符后面不是对象,则会自动将其转为对象。 + +```javascript +// 等同于 {...Object(1)} +{...1} // {} +``` + +上面代码中,扩展运算符后面是整数`1`,会自动转为数值的包装对象`Number{1}`。由于该对象没有自身属性,所以返回一个空对象。 + +下面的例子都是类似的道理。 + +```javascript +// 等同于 {...Object(true)} +{...true} // {} + +// 等同于 {...Object(undefined)} +{...undefined} // {} + +// 等同于 {...Object(null)} +{...null} // {} +``` + +但是,如果扩展运算符后面是字符串,它会自动转成一个类似数组的对象,因此返回的不是空对象。 + +```javascript +{...'hello'} +// {0: "h", 1: "e", 2: "l", 3: "l", 4: "o"} +``` + +对象的扩展运算符等同于使用`Object.assign()`方法。 + +```javascript +let aClone = { ...a }; +// 等同于 +let aClone = Object.assign({}, a); +``` + +上面的例子只是拷贝了对象实例的属性,如果想完整克隆一个对象,还拷贝对象原型的属性,可以采用下面的写法。 + +```javascript +// 写法一 +const clone1 = { + __proto__: Object.getPrototypeOf(obj), + ...obj +}; + +// 写法二 +const clone2 = Object.assign( + Object.create(Object.getPrototypeOf(obj)), + obj +); + +// 写法三 +const clone3 = Object.create( + Object.getPrototypeOf(obj), + Object.getOwnPropertyDescriptors(obj) +) +``` + +上面代码中,写法一的`__proto__`属性在非浏览器的环境不一定部署,因此推荐使用写法二和写法三。 + +扩展运算符可以用于合并两个对象。 + +```javascript +let ab = { ...a, ...b }; +// 等同于 +let ab = Object.assign({}, a, b); +``` + +如果用户自定义的属性,放在扩展运算符后面,则扩展运算符内部的同名属性会被覆盖掉。 + +```javascript +let aWithOverrides = { ...a, x: 1, y: 2 }; +// 等同于 +let aWithOverrides = { ...a, ...{ x: 1, y: 2 } }; +// 等同于 +let x = 1, y = 2, aWithOverrides = { ...a, x, y }; +// 等同于 +let aWithOverrides = Object.assign({}, a, { x: 1, y: 2 }); +``` + +上面代码中,`a`对象的`x`属性和`y`属性,拷贝到新对象后会被覆盖掉。 + +这用来修改现有对象部分的属性就很方便了。 + +```javascript +let newVersion = { + ...previousVersion, + name: 'New Name' // Override the name property +}; +``` + +上面代码中,`newVersion`对象自定义了`name`属性,其他属性全部复制自`previousVersion`对象。 + +如果把自定义属性放在扩展运算符前面,就变成了设置新对象的默认属性值。 + +```javascript +let aWithDefaults = { x: 1, y: 2, ...a }; +// 等同于 +let aWithDefaults = Object.assign({}, { x: 1, y: 2 }, a); +// 等同于 +let aWithDefaults = Object.assign({ x: 1, y: 2 }, a); +``` + +与数组的扩展运算符一样,对象的扩展运算符后面可以跟表达式。 + +```javascript +const obj = { + ...(x > 1 ? {a: 1} : {}), + b: 2, +}; +``` + +扩展运算符的参数对象之中,如果有取值函数`get`,这个函数是会执行的。 + +```javascript +// 并不会抛出错误,因为 x 属性只是被定义,但没执行 +let aWithXGetter = { + ...a, + get x() { + throw new Error('not throw yet'); + } +}; + +// 会抛出错误,因为 x 属性被执行了 +let runtimeError = { + ...a, + ...{ + get x() { + throw new Error('throw now'); + } + } +}; +``` + diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/promise.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/promise.md" new file mode 100755 index 000000000..bda0dce64 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/promise.md" @@ -0,0 +1,1001 @@ +# Promise 对象 + +## Promise 的含义 + +Promise 是异步编程的一种解决方案,比传统的解决方案——回调函数和事件——更合理和更强大。它由社区最早提出和实现,ES6 将其写进了语言标准,统一了用法,原生提供了`Promise`对象。 + +所谓`Promise`,简单说就是一个容器,里面保存着某个未来才会结束的事件(通常是一个异步操作)的结果。从语法上说,Promise 是一个对象,从它可以获取异步操作的消息。Promise 提供统一的 API,各种异步操作都可以用同样的方法进行处理。 + +`Promise`对象有以下两个特点。 + +(1)对象的状态不受外界影响。`Promise`对象代表一个异步操作,有三种状态:`pending`(进行中)、`fulfilled`(已成功)和`rejected`(已失败)。只有异步操作的结果,可以决定当前是哪一种状态,任何其他操作都无法改变这个状态。这也是`Promise`这个名字的由来,它的英语意思就是“承诺”,表示其他手段无法改变。 + +(2)一旦状态改变,就不会再变,任何时候都可以得到这个结果。`Promise`对象的状态改变,只有两种可能:从`pending`变为`fulfilled`和从`pending`变为`rejected`。只要这两种情况发生,状态就凝固了,不会再变了,会一直保持这个结果,这时就称为 resolved(已定型)。如果改变已经发生了,你再对`Promise`对象添加回调函数,也会立即得到这个结果。这与事件(Event)完全不同,事件的特点是,如果你错过了它,再去监听,是得不到结果的。 + +注意,为了行文方便,本章后面的`resolved`统一只指`fulfilled`状态,不包含`rejected`状态。 + +有了`Promise`对象,就可以将异步操作以同步操作的流程表达出来,避免了层层嵌套的回调函数。此外,`Promise`对象提供统一的接口,使得控制异步操作更加容易。 + +`Promise`也有一些缺点。首先,无法取消`Promise`,一旦新建它就会立即执行,无法中途取消。其次,如果不设置回调函数,`Promise`内部抛出的错误,不会反应到外部。第三,当处于`pending`状态时,无法得知目前进展到哪一个阶段(刚刚开始还是即将完成)。 + +如果某些事件不断地反复发生,一般来说,使用 [Stream](https://nodejs.org/api/stream.html) 模式是比部署`Promise`更好的选择。 + +## 基本用法 + +ES6 规定,`Promise`对象是一个构造函数,用来生成`Promise`实例。 + +下面代码创造了一个`Promise`实例。 + +```javascript +const promise = new Promise(function(resolve, reject) { + // ... some code + + if (/* 异步操作成功 */){ + resolve(value); + } else { + reject(error); + } +}); +``` + +`Promise`构造函数接受一个函数作为参数,该函数的两个参数分别是`resolve`和`reject`。它们是两个函数,由 JavaScript 引擎提供,不用自己部署。 + +`resolve`函数的作用是,将`Promise`对象的状态从“未完成”变为“成功”(即从 pending 变为 resolved),在异步操作成功时调用,并将异步操作的结果,作为参数传递出去;`reject`函数的作用是,将`Promise`对象的状态从“未完成”变为“失败”(即从 pending 变为 rejected),在异步操作失败时调用,并将异步操作报出的错误,作为参数传递出去。 + +`Promise`实例生成以后,可以用`then`方法分别指定`resolved`状态和`rejected`状态的回调函数。 + +```javascript +promise.then(function(value) { + // success +}, function(error) { + // failure +}); +``` + +`then`方法可以接受两个回调函数作为参数。第一个回调函数是`Promise`对象的状态变为`resolved`时调用,第二个回调函数是`Promise`对象的状态变为`rejected`时调用。其中,第二个函数是可选的,不一定要提供。这两个函数都接受`Promise`对象传出的值作为参数。 + +下面是一个`Promise`对象的简单例子。 + +```javascript +function timeout(ms) { + return new Promise((resolve, reject) => { + setTimeout(resolve, ms, 'done'); + }); +} + +timeout(100).then((value) => { + console.log(value); +}); +``` + +上面代码中,`timeout`方法返回一个`Promise`实例,表示一段时间以后才会发生的结果。过了指定的时间(`ms`参数)以后,`Promise`实例的状态变为`resolved`,就会触发`then`方法绑定的回调函数。 + +Promise 新建后就会立即执行。 + +```javascript +let promise = new Promise(function(resolve, reject) { + console.log('Promise'); + resolve(); +}); + +promise.then(function() { + console.log('resolved.'); +}); + +console.log('Hi!'); + +// Promise +// Hi! +// resolved +``` + +上面代码中,Promise 新建后立即执行,所以首先输出的是`Promise`。然后,`then`方法指定的回调函数,将在当前脚本所有同步任务执行完才会执行,所以`resolved`最后输出。 + +下面是异步加载图片的例子。 + +```javascript +function loadImageAsync(url) { + return new Promise(function(resolve, reject) { + const image = new Image(); + + image.onload = function() { + resolve(image); + }; + + image.onerror = function() { + reject(new Error('Could not load image at ' + url)); + }; + + image.src = url; + }); +} +``` + +上面代码中,使用`Promise`包装了一个图片加载的异步操作。如果加载成功,就调用`resolve`方法,否则就调用`reject`方法。 + +下面是一个用`Promise`对象实现的 Ajax 操作的例子。 + +```javascript +const getJSON = function(url) { + const promise = new Promise(function(resolve, reject){ + const handler = function() { + if (this.readyState !== 4) { + return; + } + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error(this.statusText)); + } + }; + const client = new XMLHttpRequest(); + client.open("GET", url); + client.onreadystatechange = handler; + client.responseType = "json"; + client.setRequestHeader("Accept", "application/json"); + client.send(); + + }); + + return promise; +}; + +getJSON("/posts.json").then(function(json) { + console.log('Contents: ' + json); +}, function(error) { + console.error('出错了', error); +}); +``` + +上面代码中,`getJSON`是对 XMLHttpRequest 对象的封装,用于发出一个针对 JSON 数据的 HTTP 请求,并且返回一个`Promise`对象。需要注意的是,在`getJSON`内部,`resolve`函数和`reject`函数调用时,都带有参数。 + +如果调用`resolve`函数和`reject`函数时带有参数,那么它们的参数会被传递给回调函数。`reject`函数的参数通常是`Error`对象的实例,表示抛出的错误;`resolve`函数的参数除了正常的值以外,还可能是另一个 Promise 实例,比如像下面这样。 + +```javascript +const p1 = new Promise(function (resolve, reject) { + // ... +}); + +const p2 = new Promise(function (resolve, reject) { + // ... + resolve(p1); +}) +``` + +上面代码中,`p1`和`p2`都是 Promise 的实例,但是`p2`的`resolve`方法将`p1`作为参数,即一个异步操作的结果是返回另一个异步操作。 + +注意,这时`p1`的状态就会传递给`p2`,也就是说,`p1`的状态决定了`p2`的状态。如果`p1`的状态是`pending`,那么`p2`的回调函数就会等待`p1`的状态改变;如果`p1`的状态已经是`resolved`或者`rejected`,那么`p2`的回调函数将会立刻执行。 + +```javascript +const p1 = new Promise(function (resolve, reject) { + setTimeout(() => reject(new Error('fail')), 3000) +}) + +const p2 = new Promise(function (resolve, reject) { + setTimeout(() => resolve(p1), 1000) +}) + +p2 + .then(result => console.log(result)) + .catch(error => console.log(error)) +// Error: fail +``` + +上面代码中,`p1`是一个 Promise,3 秒之后变为`rejected`。`p2`的状态在 1 秒之后改变,`resolve`方法返回的是`p1`。由于`p2`返回的是另一个 Promise,导致`p2`自己的状态无效了,由`p1`的状态决定`p2`的状态。所以,后面的`then`语句都变成针对后者(`p1`)。又过了 2 秒,`p1`变为`rejected`,导致触发`catch`方法指定的回调函数。 + +注意,调用`resolve`或`reject`并不会终结 Promise 的参数函数的执行。 + +```javascript +new Promise((resolve, reject) => { + resolve(1); + console.log(2); +}).then(r => { + console.log(r); +}); +// 2 +// 1 +``` + +上面代码中,调用`resolve(1)`以后,后面的`console.log(2)`还是会执行,并且会首先打印出来。这是因为立即 resolved 的 Promise 是在本轮事件循环的末尾执行,总是晚于本轮循环的同步任务。 + +一般来说,调用`resolve`或`reject`以后,Promise 的使命就完成了,后继操作应该放到`then`方法里面,而不应该直接写在`resolve`或`reject`的后面。所以,最好在它们前面加上`return`语句,这样就不会有意外。 + +```javascript +new Promise((resolve, reject) => { + return resolve(1); + // 后面的语句不会执行 + console.log(2); +}) +``` + +## Promise.prototype.then() + +Promise 实例具有`then`方法,也就是说,`then`方法是定义在原型对象`Promise.prototype`上的。它的作用是为 Promise 实例添加状态改变时的回调函数。前面说过,`then`方法的第一个参数是`resolved`状态的回调函数,第二个参数(可选)是`rejected`状态的回调函数。 + +`then`方法返回的是一个新的`Promise`实例(注意,不是原来那个`Promise`实例)。因此可以采用链式写法,即`then`方法后面再调用另一个`then`方法。 + +```javascript +getJSON("/posts.json").then(function(json) { + return json.post; +}).then(function(post) { + // ... +}); +``` + +上面的代码使用`then`方法,依次指定了两个回调函数。第一个回调函数完成以后,会将返回结果作为参数,传入第二个回调函数。 + +采用链式的`then`,可以指定一组按照次序调用的回调函数。这时,前一个回调函数,有可能返回的还是一个`Promise`对象(即有异步操作),这时后一个回调函数,就会等待该`Promise`对象的状态发生变化,才会被调用。 + +```javascript +getJSON("/post/1.json").then(function(post) { + return getJSON(post.commentURL); +}).then(function funcA(comments) { + console.log("resolved: ", comments); +}, function funcB(err){ + console.log("rejected: ", err); +}); +``` + +上面代码中,第一个`then`方法指定的回调函数,返回的是另一个`Promise`对象。这时,第二个`then`方法指定的回调函数,就会等待这个新的`Promise`对象状态发生变化。如果变为`resolved`,就调用`funcA`,如果状态变为`rejected`,就调用`funcB`。 + +如果采用箭头函数,上面的代码可以写得更简洁。 + +```javascript +getJSON("/post/1.json").then( + post => getJSON(post.commentURL) +).then( + comments => console.log("resolved: ", comments), + err => console.log("rejected: ", err) +); +``` + +## Promise.prototype.catch() + +`Promise.prototype.catch`方法是`.then(null, rejection)`或`.then(undefined, rejection)`的别名,用于指定发生错误时的回调函数。 + +```javascript +getJSON('/posts.json').then(function(posts) { + // ... +}).catch(function(error) { + // 处理 getJSON 和 前一个回调函数运行时发生的错误 + console.log('发生错误!', error); +}); +``` + +上面代码中,`getJSON`方法返回一个 Promise 对象,如果该对象状态变为`resolved`,则会调用`then`方法指定的回调函数;如果异步操作抛出错误,状态就会变为`rejected`,就会调用`catch`方法指定的回调函数,处理这个错误。另外,`then`方法指定的回调函数,如果运行中抛出错误,也会被`catch`方法捕获。 + +```javascript +p.then((val) => console.log('fulfilled:', val)) + .catch((err) => console.log('rejected', err)); + +// 等同于 +p.then((val) => console.log('fulfilled:', val)) + .then(null, (err) => console.log("rejected:", err)); +``` + +下面是一个例子。 + +```javascript +const promise = new Promise(function(resolve, reject) { + throw new Error('test'); +}); +promise.catch(function(error) { + console.log(error); +}); +// Error: test +``` + +上面代码中,`promise`抛出一个错误,就被`catch`方法指定的回调函数捕获。注意,上面的写法与下面两种写法是等价的。 + +```javascript +// 写法一 +const promise = new Promise(function(resolve, reject) { + try { + throw new Error('test'); + } catch(e) { + reject(e); + } +}); +promise.catch(function(error) { + console.log(error); +}); + +// 写法二 +const promise = new Promise(function(resolve, reject) { + reject(new Error('test')); +}); +promise.catch(function(error) { + console.log(error); +}); +``` + +比较上面两种写法,可以发现`reject`方法的作用,等同于抛出错误。 + +如果 Promise 状态已经变成`resolved`,再抛出错误是无效的。 + +```javascript +const promise = new Promise(function(resolve, reject) { + resolve('ok'); + throw new Error('test'); +}); +promise + .then(function(value) { console.log(value) }) + .catch(function(error) { console.log(error) }); +// ok +``` + +上面代码中,Promise 在`resolve`语句后面,再抛出错误,不会被捕获,等于没有抛出。因为 Promise 的状态一旦改变,就永久保持该状态,不会再变了。 + +Promise 对象的错误具有“冒泡”性质,会一直向后传递,直到被捕获为止。也就是说,错误总是会被下一个`catch`语句捕获。 + +```javascript +getJSON('/post/1.json').then(function(post) { + return getJSON(post.commentURL); +}).then(function(comments) { + // some code +}).catch(function(error) { + // 处理前面三个Promise产生的错误 +}); +``` + +上面代码中,一共有三个 Promise 对象:一个由`getJSON`产生,两个由`then`产生。它们之中任何一个抛出的错误,都会被最后一个`catch`捕获。 + +一般来说,不要在`then`方法里面定义 Reject 状态的回调函数(即`then`的第二个参数),总是使用`catch`方法。 + +```javascript +// bad +promise + .then(function(data) { + // success + }, function(err) { + // error + }); + +// good +promise + .then(function(data) { //cb + // success + }) + .catch(function(err) { + // error + }); +``` + +上面代码中,第二种写法要好于第一种写法,理由是第二种写法可以捕获前面`then`方法执行中的错误,也更接近同步的写法(`try/catch`)。因此,建议总是使用`catch`方法,而不使用`then`方法的第二个参数。 + +跟传统的`try/catch`代码块不同的是,如果没有使用`catch`方法指定错误处理的回调函数,Promise 对象抛出的错误不会传递到外层代码,即不会有任何反应。 + +```javascript +const someAsyncThing = function() { + return new Promise(function(resolve, reject) { + // 下面一行会报错,因为x没有声明 + resolve(x + 2); + }); +}; + +someAsyncThing().then(function() { + console.log('everything is great'); +}); + +setTimeout(() => { console.log(123) }, 2000); +// Uncaught (in promise) ReferenceError: x is not defined +// 123 +``` + +上面代码中,`someAsyncThing`函数产生的 Promise 对象,内部有语法错误。浏览器运行到这一行,会打印出错误提示`ReferenceError: x is not defined`,但是不会退出进程、终止脚本执行,2 秒之后还是会输出`123`。这就是说,Promise 内部的错误不会影响到 Promise 外部的代码,通俗的说法就是“Promise 会吃掉错误”。 + +这个脚本放在服务器执行,退出码就是`0`(即表示执行成功)。不过,Node 有一个`unhandledRejection`事件,专门监听未捕获的`reject`错误,上面的脚本会触发这个事件的监听函数,可以在监听函数里面抛出错误。 + +```javascript +process.on('unhandledRejection', function (err, p) { + throw err; +}); +``` + +上面代码中,`unhandledRejection`事件的监听函数有两个参数,第一个是错误对象,第二个是报错的 Promise 实例,它可以用来了解发生错误的环境信息。 + +注意,Node 有计划在未来废除`unhandledRejection`事件。如果 Promise 内部有未捕获的错误,会直接终止进程,并且进程的退出码不为 0。 + +再看下面的例子。 + +```javascript +const promise = new Promise(function (resolve, reject) { + resolve('ok'); + setTimeout(function () { throw new Error('test') }, 0) +}); +promise.then(function (value) { console.log(value) }); +// ok +// Uncaught Error: test +``` + +上面代码中,Promise 指定在下一轮“事件循环”再抛出错误。到了那个时候,Promise 的运行已经结束了,所以这个错误是在 Promise 函数体外抛出的,会冒泡到最外层,成了未捕获的错误。 + +一般总是建议,Promise 对象后面要跟`catch`方法,这样可以处理 Promise 内部发生的错误。`catch`方法返回的还是一个 Promise 对象,因此后面还可以接着调用`then`方法。 + +```javascript +const someAsyncThing = function() { + return new Promise(function(resolve, reject) { + // 下面一行会报错,因为x没有声明 + resolve(x + 2); + }); +}; + +someAsyncThing() +.catch(function(error) { + console.log('oh no', error); +}) +.then(function() { + console.log('carry on'); +}); +// oh no [ReferenceError: x is not defined] +// carry on +``` + +上面代码运行完`catch`方法指定的回调函数,会接着运行后面那个`then`方法指定的回调函数。如果没有报错,则会跳过`catch`方法。 + +```javascript +Promise.resolve() +.catch(function(error) { + console.log('oh no', error); +}) +.then(function() { + console.log('carry on'); +}); +// carry on +``` + +上面的代码因为没有报错,跳过了`catch`方法,直接执行后面的`then`方法。此时,要是`then`方法里面报错,就与前面的`catch`无关了。 + +`catch`方法之中,还能再抛出错误。 + +```javascript +const someAsyncThing = function() { + return new Promise(function(resolve, reject) { + // 下面一行会报错,因为x没有声明 + resolve(x + 2); + }); +}; + +someAsyncThing().then(function() { + return someOtherAsyncThing(); +}).catch(function(error) { + console.log('oh no', error); + // 下面一行会报错,因为 y 没有声明 + y + 2; +}).then(function() { + console.log('carry on'); +}); +// oh no [ReferenceError: x is not defined] +``` + +上面代码中,`catch`方法抛出一个错误,因为后面没有别的`catch`方法了,导致这个错误不会被捕获,也不会传递到外层。如果改写一下,结果就不一样了。 + +```javascript +someAsyncThing().then(function() { + return someOtherAsyncThing(); +}).catch(function(error) { + console.log('oh no', error); + // 下面一行会报错,因为y没有声明 + y + 2; +}).catch(function(error) { + console.log('carry on', error); +}); +// oh no [ReferenceError: x is not defined] +// carry on [ReferenceError: y is not defined] +``` + +上面代码中,第二个`catch`方法用来捕获前一个`catch`方法抛出的错误。 + +## Promise.prototype.finally() + +`finally`方法用于指定不管 Promise 对象最后状态如何,都会执行的操作。该方法是 ES2018 引入标准的。 + +```javascript +promise +.then(result => {···}) +.catch(error => {···}) +.finally(() => {···}); +``` + +上面代码中,不管`promise`最后的状态,在执行完`then`或`catch`指定的回调函数以后,都会执行`finally`方法指定的回调函数。 + +下面是一个例子,服务器使用 Promise 处理请求,然后使用`finally`方法关掉服务器。 + +```javascript +server.listen(port) + .then(function () { + // ... + }) + .finally(server.stop); +``` + +`finally`方法的回调函数不接受任何参数,这意味着没有办法知道,前面的 Promise 状态到底是`fulfilled`还是`rejected`。这表明,`finally`方法里面的操作,应该是与状态无关的,不依赖于 Promise 的执行结果。 + +`finally`本质上是`then`方法的特例。 + +```javascript +promise +.finally(() => { + // 语句 +}); + +// 等同于 +promise +.then( + result => { + // 语句 + return result; + }, + error => { + // 语句 + throw error; + } +); +``` + +上面代码中,如果不使用`finally`方法,同样的语句需要为成功和失败两种情况各写一次。有了`finally`方法,则只需要写一次。 + +它的实现也很简单。 + +```javascript +Promise.prototype.finally = function (callback) { + let P = this.constructor; + return this.then( + value => P.resolve(callback()).then(() => value), + reason => P.resolve(callback()).then(() => { throw reason }) + ); +}; +``` + +上面代码中,不管前面的 Promise 是`fulfilled`还是`rejected`,都会执行回调函数`callback`。 + +从上面的实现还可以看到,`finally`方法总是会返回原来的值。 + +```javascript +// resolve 的值是 undefined +Promise.resolve(2).then(() => {}, () => {}) + +// resolve 的值是 2 +Promise.resolve(2).finally(() => {}) + +// reject 的值是 undefined +Promise.reject(3).then(() => {}, () => {}) + +// reject 的值是 3 +Promise.reject(3).finally(() => {}) +``` + +## Promise.all() + +`Promise.all`方法用于将多个 Promise 实例,包装成一个新的 Promise 实例。 + +```javascript +const p = Promise.all([p1, p2, p3]); +``` + +上面代码中,`Promise.all`方法接受一个数组作为参数,`p1`、`p2`、`p3`都是 Promise 实例,如果不是,就会先调用下面讲到的`Promise.resolve`方法,将参数转为 Promise 实例,再进一步处理。(`Promise.all`方法的参数可以不是数组,但必须具有 Iterator 接口,且返回的每个成员都是 Promise 实例。) + +`p`的状态由`p1`、`p2`、`p3`决定,分成两种情况。 + +(1)只有`p1`、`p2`、`p3`的状态都变成`fulfilled`,`p`的状态才会变成`fulfilled`,此时`p1`、`p2`、`p3`的返回值组成一个数组,传递给`p`的回调函数。 + +(2)只要`p1`、`p2`、`p3`之中有一个被`rejected`,`p`的状态就变成`rejected`,此时第一个被`reject`的实例的返回值,会传递给`p`的回调函数。 + +下面是一个具体的例子。 + +```javascript +// 生成一个Promise对象的数组 +const promises = [2, 3, 5, 7, 11, 13].map(function (id) { + return getJSON('/post/' + id + ".json"); +}); + +Promise.all(promises).then(function (posts) { + // ... +}).catch(function(reason){ + // ... +}); +``` + +上面代码中,`promises`是包含 6 个 Promise 实例的数组,只有这 6 个实例的状态都变成`fulfilled`,或者其中有一个变为`rejected`,才会调用`Promise.all`方法后面的回调函数。 + +下面是另一个例子。 + +```javascript +const databasePromise = connectDatabase(); + +const booksPromise = databasePromise + .then(findAllBooks); + +const userPromise = databasePromise + .then(getCurrentUser); + +Promise.all([ + booksPromise, + userPromise +]) +.then(([books, user]) => pickTopRecommendations(books, user)); +``` + +上面代码中,`booksPromise`和`userPromise`是两个异步操作,只有等到它们的结果都返回了,才会触发`pickTopRecommendations`这个回调函数。 + +注意,如果作为参数的 Promise 实例,自己定义了`catch`方法,那么它一旦被`rejected`,并不会触发`Promise.all()`的`catch`方法。 + +```javascript +const p1 = new Promise((resolve, reject) => { + resolve('hello'); +}) +.then(result => result) +.catch(e => e); + +const p2 = new Promise((resolve, reject) => { + throw new Error('报错了'); +}) +.then(result => result) +.catch(e => e); + +Promise.all([p1, p2]) +.then(result => console.log(result)) +.catch(e => console.log(e)); +// ["hello", Error: 报错了] +``` + +上面代码中,`p1`会`resolved`,`p2`首先会`rejected`,但是`p2`有自己的`catch`方法,该方法返回的是一个新的 Promise 实例,`p2`指向的实际上是这个实例。该实例执行完`catch`方法后,也会变成`resolved`,导致`Promise.all()`方法参数里面的两个实例都会`resolved`,因此会调用`then`方法指定的回调函数,而不会调用`catch`方法指定的回调函数。 + +如果`p2`没有自己的`catch`方法,就会调用`Promise.all()`的`catch`方法。 + +```javascript +const p1 = new Promise((resolve, reject) => { + resolve('hello'); +}) +.then(result => result); + +const p2 = new Promise((resolve, reject) => { + throw new Error('报错了'); +}) +.then(result => result); + +Promise.all([p1, p2]) +.then(result => console.log(result)) +.catch(e => console.log(e)); +// Error: 报错了 +``` + +## Promise.race() + +`Promise.race`方法同样是将多个 Promise 实例,包装成一个新的 Promise 实例。 + +```javascript +const p = Promise.race([p1, p2, p3]); +``` + +上面代码中,只要`p1`、`p2`、`p3`之中有一个实例率先改变状态,`p`的状态就跟着改变。那个率先改变的 Promise 实例的返回值,就传递给`p`的回调函数。 + +`Promise.race`方法的参数与`Promise.all`方法一样,如果不是 Promise 实例,就会先调用下面讲到的`Promise.resolve`方法,将参数转为 Promise 实例,再进一步处理。 + +下面是一个例子,如果指定时间内没有获得结果,就将 Promise 的状态变为`reject`,否则变为`resolve`。 + +```javascript +const p = Promise.race([ + fetch('/resource-that-may-take-a-while'), + new Promise(function (resolve, reject) { + setTimeout(() => reject(new Error('request timeout')), 5000) + }) +]); + +p +.then(console.log) +.catch(console.error); +``` + +上面代码中,如果 5 秒之内`fetch`方法无法返回结果,变量`p`的状态就会变为`rejected`,从而触发`catch`方法指定的回调函数。 + +## Promise.resolve() + +有时需要将现有对象转为 Promise 对象,`Promise.resolve`方法就起到这个作用。 + +```javascript +const jsPromise = Promise.resolve($.ajax('/whatever.json')); +``` + +上面代码将 jQuery 生成的`deferred`对象,转为一个新的 Promise 对象。 + +`Promise.resolve`等价于下面的写法。 + +```javascript +Promise.resolve('foo') +// 等价于 +new Promise(resolve => resolve('foo')) +``` + +`Promise.resolve`方法的参数分成四种情况。 + +**(1)参数是一个 Promise 实例** + +如果参数是 Promise 实例,那么`Promise.resolve`将不做任何修改、原封不动地返回这个实例。 + +**(2)参数是一个`thenable`对象** + +`thenable`对象指的是具有`then`方法的对象,比如下面这个对象。 + +```javascript +let thenable = { + then: function(resolve, reject) { + resolve(42); + } +}; +``` + +`Promise.resolve`方法会将这个对象转为 Promise 对象,然后就立即执行`thenable`对象的`then`方法。 + +```javascript +let thenable = { + then: function(resolve, reject) { + resolve(42); + } +}; + +let p1 = Promise.resolve(thenable); +p1.then(function(value) { + console.log(value); // 42 +}); +``` + +上面代码中,`thenable`对象的`then`方法执行后,对象`p1`的状态就变为`resolved`,从而立即执行最后那个`then`方法指定的回调函数,输出 42。 + +**(3)参数不是具有`then`方法的对象,或根本就不是对象** + +如果参数是一个原始值,或者是一个不具有`then`方法的对象,则`Promise.resolve`方法返回一个新的 Promise 对象,状态为`resolved`。 + +```javascript +const p = Promise.resolve('Hello'); + +p.then(function (s){ + console.log(s) +}); +// Hello +``` + +上面代码生成一个新的 Promise 对象的实例`p`。由于字符串`Hello`不属于异步操作(判断方法是字符串对象不具有 then 方法),返回 Promise 实例的状态从一生成就是`resolved`,所以回调函数会立即执行。`Promise.resolve`方法的参数,会同时传给回调函数。 + +**(4)不带有任何参数** + +`Promise.resolve`方法允许调用时不带参数,直接返回一个`resolved`状态的 Promise 对象。 + +所以,如果希望得到一个 Promise 对象,比较方便的方法就是直接调用`Promise.resolve`方法。 + +```javascript +const p = Promise.resolve(); + +p.then(function () { + // ... +}); +``` + +上面代码的变量`p`就是一个 Promise 对象。 + +需要注意的是,立即`resolve`的 Promise 对象,是在本轮“事件循环”(event loop)的结束时,而不是在下一轮“事件循环”的开始时。 + +```javascript +setTimeout(function () { + console.log('three'); +}, 0); + +Promise.resolve().then(function () { + console.log('two'); +}); + +console.log('one'); + +// one +// two +// three +``` + +上面代码中,`setTimeout(fn, 0)`在下一轮“事件循环”开始时执行,`Promise.resolve()`在本轮“事件循环”结束时执行,`console.log('one')`则是立即执行,因此最先输出。 + +## Promise.reject() + +`Promise.reject(reason)`方法也会返回一个新的 Promise 实例,该实例的状态为`rejected`。 + +```javascript +const p = Promise.reject('出错了'); +// 等同于 +const p = new Promise((resolve, reject) => reject('出错了')) + +p.then(null, function (s) { + console.log(s) +}); +// 出错了 +``` + +上面代码生成一个 Promise 对象的实例`p`,状态为`rejected`,回调函数会立即执行。 + +注意,`Promise.reject()`方法的参数,会原封不动地作为`reject`的理由,变成后续方法的参数。这一点与`Promise.resolve`方法不一致。 + +```javascript +const thenable = { + then(resolve, reject) { + reject('出错了'); + } +}; + +Promise.reject(thenable) +.catch(e => { + console.log(e === thenable) +}) +// true +``` + +上面代码中,`Promise.reject`方法的参数是一个`thenable`对象,执行以后,后面`catch`方法的参数不是`reject`抛出的“出错了”这个字符串,而是`thenable`对象。 + +## 应用 + +### 加载图片 + +我们可以将图片的加载写成一个`Promise`,一旦加载完成,`Promise`的状态就发生变化。 + +```javascript +const preloadImage = function (path) { + return new Promise(function (resolve, reject) { + const image = new Image(); + image.onload = resolve; + image.onerror = reject; + image.src = path; + }); +}; +``` + +### Generator 函数与 Promise 的结合 + +使用 Generator 函数管理流程,遇到异步操作的时候,通常返回一个`Promise`对象。 + +```javascript +function getFoo () { + return new Promise(function (resolve, reject){ + resolve('foo'); + }); +} + +const g = function* () { + try { + const foo = yield getFoo(); + console.log(foo); + } catch (e) { + console.log(e); + } +}; + +function run (generator) { + const it = generator(); + + function go(result) { + if (result.done) return result.value; + + return result.value.then(function (value) { + return go(it.next(value)); + }, function (error) { + return go(it.throw(error)); + }); + } + + go(it.next()); +} + +run(g); +``` + +上面代码的 Generator 函数`g`之中,有一个异步操作`getFoo`,它返回的就是一个`Promise`对象。函数`run`用来处理这个`Promise`对象,并调用下一个`next`方法。 + +## Promise.try() + +实际开发中,经常遇到一种情况:不知道或者不想区分,函数`f`是同步函数还是异步操作,但是想用 Promise 来处理它。因为这样就可以不管`f`是否包含异步操作,都用`then`方法指定下一步流程,用`catch`方法处理`f`抛出的错误。一般就会采用下面的写法。 + +```javascript +Promise.resolve().then(f) +``` + +上面的写法有一个缺点,就是如果`f`是同步函数,那么它会在本轮事件循环的末尾执行。 + +```javascript +const f = () => console.log('now'); +Promise.resolve().then(f); +console.log('next'); +// next +// now +``` + +上面代码中,函数`f`是同步的,但是用 Promise 包装了以后,就变成异步执行了。 + +那么有没有一种方法,让同步函数同步执行,异步函数异步执行,并且让它们具有统一的 API 呢?回答是可以的,并且还有两种写法。第一种写法是用`async`函数来写。 + +```javascript +const f = () => console.log('now'); +(async () => f())(); +console.log('next'); +// now +// next +``` + +上面代码中,第二行是一个立即执行的匿名函数,会立即执行里面的`async`函数,因此如果`f`是同步的,就会得到同步的结果;如果`f`是异步的,就可以用`then`指定下一步,就像下面的写法。 + +```javascript +(async () => f())() +.then(...) +``` + +需要注意的是,`async () => f()`会吃掉`f()`抛出的错误。所以,如果想捕获错误,要使用`promise.catch`方法。 + +```javascript +(async () => f())() +.then(...) +.catch(...) +``` + +第二种写法是使用`new Promise()`。 + +```javascript +const f = () => console.log('now'); +( + () => new Promise( + resolve => resolve(f()) + ) +)(); +console.log('next'); +// now +// next +``` + +上面代码也是使用立即执行的匿名函数,执行`new Promise()`。这种情况下,同步函数也是同步执行的。 + +鉴于这是一个很常见的需求,所以现在有一个[提案](https://github.com/ljharb/proposal-promise-try),提供`Promise.try`方法替代上面的写法。 + +```javascript +const f = () => console.log('now'); +Promise.try(f); +console.log('next'); +// now +// next +``` + +事实上,`Promise.try`存在已久,Promise 库[`Bluebird`](http://bluebirdjs.com/docs/api/promise.try.html)、[`Q`](https://github.com/kriskowal/q/wiki/API-Reference#promisefcallargs)和[`when`](https://github.com/cujojs/when/blob/master/docs/api.md#whentry),早就提供了这个方法。 + +由于`Promise.try`为所有操作提供了统一的处理机制,所以如果想用`then`方法管理流程,最好都用`Promise.try`包装一下。这样有[许多好处](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/),其中一点就是可以更好地管理异常。 + +```javascript +function getUsername(userId) { + return database.users.get({id: userId}) + .then(function(user) { + return user.name; + }); +} +``` + +上面代码中,`database.users.get()`返回一个 Promise 对象,如果抛出异步错误,可以用`catch`方法捕获,就像下面这样写。 + +```javascript +database.users.get({id: userId}) +.then(...) +.catch(...) +``` + +但是`database.users.get()`可能还会抛出同步错误(比如数据库连接错误,具体要看实现方法),这时你就不得不用`try...catch`去捕获。 + +```javascript +try { + database.users.get({id: userId}) + .then(...) + .catch(...) +} catch (e) { + // ... +} +``` + +上面这样的写法就很笨拙了,这时就可以统一用`promise.catch()`捕获所有同步和异步的错误。 + +```javascript +Promise.try(() => database.users.get({id: userId})) + .then(...) + .catch(...) +``` + +事实上,`Promise.try`就是模拟`try`代码块,就像`promise.catch`模拟的是`catch`代码块。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proposals.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proposals.md" new file mode 100755 index 000000000..d6c27598a --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proposals.md" @@ -0,0 +1,789 @@ +# 最新提案 + +本章介绍一些尚未进入标准、但很有希望的最新提案。 + +## do 表达式 + +本质上,块级作用域是一个语句,将多个操作封装在一起,没有返回值。 + +```javascript +{ + let t = f(); + t = t * t + 1; +} +``` + +上面代码中,块级作用域将两个语句封装在一起。但是,在块级作用域以外,没有办法得到`t`的值,因为块级作用域不返回值,除非`t`是全局变量。 + +现在有一个[提案](https://github.com/tc39/proposal-do-expressions),使得块级作用域可以变为表达式,也就是说可以返回值,办法就是在块级作用域之前加上`do`,使它变为`do`表达式,然后就会返回内部最后执行的表达式的值。 + +```javascript +let x = do { + let t = f(); + t * t + 1; +}; +``` + +上面代码中,变量`x`会得到整个块级作用域的返回值(`t * t + 1`)。 + +`do`表达式的逻辑非常简单:封装的是什么,就会返回什么。 + +```javascript +// 等同于 <表达式> +do { <表达式>; } + +// 等同于 <语句> +do { <语句> } +``` + +`do`表达式的好处是可以封装多个语句,让程序更加模块化,就像乐高积木那样一块块拼装起来。 + +```javascript +let x = do { + if (foo()) { f() } + else if (bar()) { g() } + else { h() } +}; +``` + +上面代码的本质,就是根据函数`foo`的执行结果,调用不同的函数,将返回结果赋给变量`x`。使用`do`表达式,就将这个操作的意图表达得非常简洁清晰。而且,`do`块级作用域提供了单独的作用域,内部操作可以与全局作用域隔绝。 + +值得一提的是,`do`表达式在 JSX 语法中非常好用。 + +```javascript +return ( + <nav> + <Home /> + { + do { + if (loggedIn) { + <LogoutButton /> + } else { + <LoginButton /> + } + } + } + </nav> +) +``` + +上面代码中,如果不用`do`表达式,就只能用三元判断运算符(`?:`)。那样的话,一旦判断逻辑复杂,代码就会变得很不易读。 + +## throw 表达式 + +JavaScript 语法规定`throw`是一个命令,用来抛出错误,不能用于表达式之中。 + +```javascript +// 报错 +console.log(throw new Error()); +``` + +上面代码中,`console.log`的参数必须是一个表达式,如果是一个`throw`语句就会报错。 + +现在有一个[提案](https://github.com/tc39/proposal-throw-expressions),允许`throw`用于表达式。 + +```javascript +// 参数的默认值 +function save(filename = throw new TypeError("Argument required")) { +} + +// 箭头函数的返回值 +lint(ast, { + with: () => throw new Error("avoid using 'with' statements.") +}); + +// 条件表达式 +function getEncoder(encoding) { + const encoder = encoding === "utf8" ? + new UTF8Encoder() : + encoding === "utf16le" ? + new UTF16Encoder(false) : + encoding === "utf16be" ? + new UTF16Encoder(true) : + throw new Error("Unsupported encoding"); +} + +// 逻辑表达式 +class Product { + get id() { + return this._id; + } + set id(value) { + this._id = value || throw new Error("Invalid value"); + } +} +``` + +上面代码中,`throw`都出现在表达式里面。 + +语法上,`throw`表达式里面的`throw`不再是一个命令,而是一个运算符。为了避免与`throw`命令混淆,规定`throw`出现在行首,一律解释为`throw`语句,而不是`throw`表达式。 + +## 链判断运算符 + +编程实务中,如果读取对象内部的某个属性,往往需要判断一下该对象是否存在。比如,要读取`message.body.user.firstName`,安全的写法是写成下面这样。 + +```javascript +const firstName = (message + && message.body + && message.body.user + && message.body.user.firstName) || 'default'; +``` + +这样的层层判断非常麻烦,因此现在有一个[提案](https://github.com/tc39/proposal-optional-chaining),引入了“链判断运算符”(optional chaining operator)`?.`,简化上面的写法。 + +```javascript +const firstName = message?.body?.user?.firstName || 'default'; +``` + +上面代码有三个`?.`运算符,直接在链式调用的时候判断,左侧的对象是否为`null`或`undefined`。如果是的,就不再往下运算,而是返回`undefined`。 + +链判断运算符号有三种用法。 + +- `obj?.prop` // 读取对象属性 +- `obj?.[expr]` // 同上 +- `func?.(...args)` // 函数或对象方法的调用 + +下面是判断函数是否存在的例子。 + +```javascript +iterator.return?.() +``` + +上面代码中,`iterator.return`如果有定义,就会调用该方法,否则直接返回`undefined`。 + +下面是更多的例子。 + +```javascript +a?.b +// 等同于 +a == null ? undefined : a.b + +a?.[x] +// 等同于 +a == null ? undefined : a[x] + +a?.b() +// 等同于 +a == null ? undefined : a.b() + +a?.() +// 等同于 +a == null ? undefined : a() +``` + +使用这个运算符,有几个注意点。 + +(1)短路机制 + +```javascript +a?.[++x] +// 等同于 +a == null ? undefined : a[++x] +``` + +上面代码中,如果`a`是`undefined`或`null`,那么`x`不会进行递增运算。也就是说,链判断运算符一旦为真,右侧的表达式就不再求值。 + +(2)delete 运算符 + +```javascript +delete a?.b +// 等同于 +a == null ? undefined : delete a.b +``` + +上面代码中,如果`a`是`undefined`或`null`,会直接返回`undefined`,而不会进行`delete`运算。 + +(3)报错场合 + +以下写法是禁止,会报错。 + +```javascript +// 构造函数判断 +new a?.() + +// 运算符右侧是模板字符串 +a?.`{b}` + +// 链判断运算符前后有构造函数或模板字符串 +new a?.b() +a?.b`{c}` + +// 链运算符用于赋值运算符左侧 +a?.b = c +``` + +(4)右侧不得为十进制数值 + +为了保证兼容以前的代码,允许`foo?.3:0`被解析成`foo ? .3 : 0`,因此规定如果`?.`后面紧跟一个十进制数字,那么`?.`不再被看成是一个完整的运算符,而会按照三元运算符进行处理,也就是说,那个小数点会归属于后面的十进制数字,形成一个小数。 + +## 直接输入 U+2028 和 U+2029 + +JavaScript 字符串允许直接输入字符,以及输入字符的转义形式。举例来说,“中”的 Unicode 码点是 U+4e2d,你可以直接在字符串里面输入这个汉字,也可以输入它的转义形式`\u4e2d`,两者是等价的。 + +```javascript +'中' === '\u4e2d' // true +``` + +但是,JavaScript 规定有5个字符,不能在字符串里面直接使用,只能使用转义形式。 + +- U+005C:反斜杠(reverse solidus) +- U+000D:回车(carriage return) +- U+2028:行分隔符(line separator) +- U+2029:段分隔符(paragraph separator) +- U+000A:换行符(line feed) + +举例来说,字符串里面不能直接包含反斜杠,一定要转义写成`\\`或者`\u005c`。 + +这个规定本身没有问题,麻烦在于 JSON 格式允许字符串里面直接使用 U+2028(行分隔符)和 U+2029(段分隔符)。这样一来,服务器输出的 JSON 被`JSON.parse`解析,就有可能直接报错。 + +JSON 格式已经冻结(RFC 7159),没法修改了。为了消除这个报错,现在有一个[提案](https://github.com/tc39/proposal-json-superset),允许 JavaScript 字符串直接输入 U+2028(行分隔符)和 U+2029(段分隔符)。 + +```javascript +const PS = eval("'\u2029'"); +``` + +根据这个提案,上面的代码不会报错。 + +注意,模板字符串现在就允许直接输入这两个字符。另外,正则表达式依然不允许直接输入这两个字符,这是没有问题的,因为 JSON 本来就不允许直接包含正则表达式。 + +## 函数的部分执行 + +### 语法 + +多参数的函数有时需要绑定其中的一个或多个参数,然后返回一个新函数。 + +```javascript +function add(x, y) { return x + y; } +function add7(x) { return x + 7; } +``` + +上面代码中,`add7`函数其实是`add`函数的一个特殊版本,通过将一个参数绑定为`7`,就可以从`add`得到`add7`。 + +```javascript +// bind 方法 +const add7 = add.bind(null, 7); + +// 箭头函数 +const add7 = x => add(x, 7); +``` + +上面两种写法都有些冗余。其中,`bind`方法的局限更加明显,它必须提供`this`,并且只能从前到后一个个绑定参数,无法只绑定非头部的参数。 + +现在有一个[提案](https://github.com/tc39/proposal-partial-application),使得绑定参数并返回一个新函数更加容易。这叫做函数的部分执行(partial application)。 + +```javascript +const add = (x, y) => x + y; +const addOne = add(1, ?); + +const maxGreaterThanZero = Math.max(0, ...); +``` + +根据新提案,`?`是单个参数的占位符,`...`是多个参数的占位符。以下的形式都属于函数的部分执行。 + +```javascript +f(x, ?) +f(x, ...) +f(?, x) +f(..., x) +f(?, x, ?) +f(..., x, ...) +``` + +`?`和`...`只能出现在函数的调用之中,并且会返回一个新函数。 + +```javascript +const g = f(?, 1, ...); +// 等同于 +const g = (x, ...y) => f(x, 1, ...y); +``` + +函数的部分执行,也可以用于对象的方法。 + +```javascript +let obj = { + f(x, y) { return x + y; }, +}; + +const g = obj.f(?, 3); +g(1) // 4 +``` + +### 注意点 + +函数的部分执行有一些特别注意的地方。 + +(1)函数的部分执行是基于原函数的。如果原函数发生变化,部分执行生成的新函数也会立即反映这种变化。 + +```javascript +let f = (x, y) => x + y; + +const g = f(?, 3); +g(1); // 4 + +// 替换函数 f +f = (x, y) => x * y; + +g(1); // 3 +``` + +上面代码中,定义了函数的部分执行以后,更换原函数会立即影响到新函数。 + +(2)如果预先提供的那个值是一个表达式,那么这个表达式并不会在定义时求值,而是在每次调用时求值。 + +```javascript +let a = 3; +const f = (x, y) => x + y; + +const g = f(?, a); +g(1); // 4 + +// 改变 a 的值 +a = 10; +g(1); // 11 +``` + +上面代码中,预先提供的参数是变量`a`,那么每次调用函数`g`的时候,才会对`a`进行求值。 + +(3)如果新函数的参数多于占位符的数量,那么多余的参数将被忽略。 + +```javascript +const f = (x, ...y) => [x, ...y]; +const g = f(?, 1); +g(2, 3, 4); // [2, 1] +``` + +上面代码中,函数`g`只有一个占位符,也就意味着它只能接受一个参数,多余的参数都会被忽略。 + +写成下面这样,多余的参数就没有问题。 + +```javascript +const f = (x, ...y) => [x, ...y]; +const g = f(?, 1, ...); +g(2, 3, 4); // [2, 1, 3, 4]; +``` + +(4)`...`只会被采集一次,如果函数的部分执行使用了多个`...`,那么每个`...`的值都将相同。 + +```javascript +const f = (...x) => x; +const g = f(..., 9, ...); +g(1, 2, 3); // [1, 2, 3, 9, 1, 2, 3] +``` + +上面代码中,`g`定义了两个`...`占位符,真正执行的时候,它们的值是一样的。 + +## 管道运算符 + +Unix 操作系统有一个管道机制(pipeline),可以把前一个操作的值传给后一个操作。这个机制非常有用,使得简单的操作可以组合成为复杂的操作。许多语言都有管道的实现,现在有一个[提案](https://github.com/tc39/proposal-pipeline-operator),让 JavaScript 也拥有管道机制。 + +JavaScript 的管道是一个运算符,写作`|>`。它的左边是一个表达式,右边是一个函数。管道运算符把左边表达式的值,传入右边的函数进行求值。 + +```javascript +x |> f +// 等同于 +f(x) +``` + +管道运算符最大的好处,就是可以把嵌套的函数,写成从左到右的链式表达式。 + +```javascript +function doubleSay (str) { + return str + ", " + str; +} + +function capitalize (str) { + return str[0].toUpperCase() + str.substring(1); +} + +function exclaim (str) { + return str + '!'; +} +``` + +上面是三个简单的函数。如果要嵌套执行,传统的写法和管道的写法分别如下。 + +```javascript +// 传统的写法 +exclaim(capitalize(doubleSay('hello'))) +// "Hello, hello!" + +// 管道的写法 +'hello' + |> doubleSay + |> capitalize + |> exclaim +// "Hello, hello!" +``` + +管道运算符只能传递一个值,这意味着它右边的函数必须是一个单参数函数。如果是多参数函数,就必须进行柯里化,改成单参数的版本。 + +```javascript +function double (x) { return x + x; } +function add (x, y) { return x + y; } + +let person = { score: 25 }; +person.score + |> double + |> (_ => add(7, _)) +// 57 +``` + +上面代码中,`add`函数需要两个参数。但是,管道运算符只能传入一个值,因此需要事先提供另一个参数,并将其改成单参数的箭头函数`_ => add(7, _)`。这个函数里面的下划线并没有特别的含义,可以用其他符号代替,使用下划线只是因为,它能够形象地表示这里是占位符。 + +管道运算符对于`await`函数也适用。 + +```javascript +x |> await f +// 等同于 +await f(x) + +const userAge = userId |> await fetchUserById |> getAgeFromUser; +// 等同于 +const userAge = getAgeFromUser(await fetchUserById(userId)); +``` + +## 数值分隔符 + +欧美语言中,较长的数值允许每三位添加一个分隔符(通常是一个逗号),增加数值的可读性。比如,`1000`可以写作`1,000`。 + +现在有一个[提案](https://github.com/tc39/proposal-numeric-separator),允许 JavaScript 的数值使用下划线(`_`)作为分隔符。 + +```javascript +let budget = 1_000_000_000_000; +budget === 10 ** 12 // true +``` + +JavaScript 的数值分隔符没有指定间隔的位数,也就是说,可以每三位添加一个分隔符,也可以每一位、每两位、每四位添加一个。 + +```javascript +123_00 === 12_300 // true + +12345_00 === 123_4500 // true +12345_00 === 1_234_500 // true +``` + +小数和科学计数法也可以使用数值分隔符。 + +```javascript +// 小数 +0.000_001 +// 科学计数法 +1e10_000 +``` + +数值分隔符有几个使用注意点。 + +- 不能在数值的最前面(leading)或最后面(trailing)。 +- 不能两个或两个以上的分隔符连在一起。 +- 小数点的前后不能有分隔符。 +- 科学计数法里面,表示指数的`e`或`E`前后不能有分隔符。 + +下面的写法都会报错。 + +```javascript +// 全部报错 +3_.141 +3._141 +1_e12 +1e_12 +123__456 +_1464301 +1464301_ +``` + +除了十进制,其他进制的数值也可以使用分隔符。 + +```javascript +// 二进制 +0b1010_0001_1000_0101 +// 十六进制 +0xA0_B0_C0 +``` + +注意,分隔符不能紧跟着进制的前缀`0b`、`0B`、`0o`、`0O`、`0x`、`0X`。 + +```javascript +// 报错 +0_b111111000 +0b_111111000 +``` + +下面三个将字符串转成数值的函数,不支持数值分隔符。主要原因是提案的设计者认为,数值分隔符主要是为了编码时书写数值的方便,而不是为了处理外部输入的数据。 + +- Number() +- parseInt() +- parseFloat() + +```javascript +Number('123_456') // NaN +parseInt('123_456') // 123 +``` + +## BigInt 数据类型 + +### 简介 + +JavaScript 所有数字都保存成 64 位浮点数,这给数值的表示带来了两大限制。一是数值的精度只能到 53 个二进制位(相当于 16 个十进制位),大于这个范围的整数,JavaScript 是无法精确表示的,这使得 JavaScript 不适合进行科学和金融方面的精确计算。二是大于或等于2的1024次方的数值,JavaScript 无法表示,会返回`Infinity`。 + +```javascript +// 超过 53 个二进制位的数值,无法保持精度 +Math.pow(2, 53) === Math.pow(2, 53) + 1 // true + +// 超过 2 的 1024 次方的数值,无法表示 +Math.pow(2, 1024) // Infinity +``` + +现在有一个[提案](https://github.com/tc39/proposal-bigint),引入了一种新的数据类型 BigInt(大整数),来解决这个问题。BigInt 只用来表示整数,没有位数的限制,任何位数的整数都可以精确表示。 + +```javascript +const a = 2172141653n; +const b = 15346349309n; + +// BigInt 可以保持精度 +a * b // 33334444555566667777n + +// 普通整数无法保持精度 +Number(a) * Number(b) // 33334444555566670000 +``` + +为了与 Number 类型区别,BigInt 类型的数据必须添加后缀`n`。 + +```javascript +1234 // 普通整数 +1234n // BigInt + +// BigInt 的运算 +1n + 2n // 3n +``` + +BigInt 同样可以使用各种进制表示,都要加上后缀`n`。 + +```javascript +0b1101n // 二进制 +0o777n // 八进制 +0xFFn // 十六进制 +``` + +BigInt 与普通整数是两种值,它们之间并不相等。 + +```javascript +42n === 42 // false +``` + +`typeof`运算符对于 BigInt 类型的数据返回`bigint`。 + +```javascript +typeof 123n // 'bigint' +``` + +BigInt 可以使用负号(`-`),但是不能使用正号(`+`),因为会与 asm.js 冲突。 + +```javascript +-42n // 正确 ++42n // 报错 +``` + +### BigInt 对象 + +JavaScript 原生提供`BigInt`对象,可以用作构造函数生成 BigInt 类型的数值。转换规则基本与`Number()`一致,将其他类型的值转为 BigInt。 + +```javascript +BigInt(123) // 123n +BigInt('123') // 123n +BigInt(false) // 0n +BigInt(true) // 1n +``` + +`BigInt()`构造函数必须有参数,而且参数必须可以正常转为数值,下面的用法都会报错。 + +```javascript +new BigInt() // TypeError +BigInt(undefined) //TypeError +BigInt(null) // TypeError +BigInt('123n') // SyntaxError +BigInt('abc') // SyntaxError +``` + +上面代码中,尤其值得注意字符串`123n`无法解析成 Number 类型,所以会报错。 + +参数如果是小数,也会报错。 + +```javascript +BigInt(1.5) // RangeError +BigInt('1.5') // SyntaxError +``` + +BigInt 对象继承了 Object 提供的实例方法。 + +- `BigInt.prototype.toLocaleString()` +- `BigInt.prototype.toString()` +- `BigInt.prototype.valueOf()` + +此外,还提供了三个静态方法。 + +- `BigInt.asUintN(width, BigInt)`: 给定的 BigInt 转为 0 到 2<sup>width</sup> - 1 之间对应的值。 +- `BigInt.asIntN(width, BigInt)`:给定的 BigInt 转为 -2<sup>width - 1</sup> 到 2<sup>width - 1</sup> - 1 之间对应的值。 +- `BigInt.parseInt(string[, radix])`:近似于`Number.parseInt()`,将一个字符串转换成指定进制的 BigInt。 + +```javascript +const max = 2n ** (64n - 1n) - 1n; + +BigInt.asIntN(64, max) +// 9223372036854775807n +BigInt.asIntN(64, max + 1n) +// -9223372036854775808n +BigInt.asUintN(64, max + 1n) +// 9223372036854775808n +``` + +上面代码中,`max`是64位带符号的 BigInt 所能表示的最大值。如果对这个值加`1n`,`BigInt.asIntN()`将会返回一个负值,因为这时新增的一位将被解释为符号位。而`BigInt.asUintN()`方法由于不存在符号位,所以可以正确返回结果。 + +如果`BigInt.asIntN()`和`BigInt.asUintN()`指定的位数,小于数值本身的位数,那么头部的位将被舍弃。 + +```javascript +const max = 2n ** (64n - 1n) - 1n; + +BigInt.asIntN(32, max) // -1n +BigInt.asUintN(32, max) // 4294967295n +``` + +上面代码中,`max`是一个64位的 BigInt,如果转为32位,前面的32位都会被舍弃。 + +下面是`BigInt.parseInt()`的例子。 + +```javascript +// Number.parseInt() 与 BigInt.parseInt() 的对比 +Number.parseInt('9007199254740993', 10) +// 9007199254740992 +BigInt.parseInt('9007199254740993', 10) +// 9007199254740993n +``` + +上面代码中,由于有效数字超出了最大限度,`Number.parseInt`方法返回的结果是不精确的,而`BigInt.parseInt`方法正确返回了对应的 BigInt。 + +对于二进制数组,BigInt 新增了两个类型`BigUint64Array`和`BigInt64Array`,这两种数据类型返回的都是64位 BigInt。`DataView`对象的实例方法`DataView.prototype.getBigInt64()`和`DataView.prototype.getBigUint64()`,返回的也是 BigInt。 + +### 转换规则 + +可以使用`Boolean()`、`Number()`和`String()`这三个方法,将 BigInt 可以转为布尔值、数值和字符串类型。 + +```javascript +Boolean(0n) // false +Boolean(1n) // true +Number(1n) // 1 +String(1n) // "1" +``` + +上面代码中,注意最后一个例子,转为字符串时后缀`n`会消失。 + +另外,取反运算符(`!`)也可以将 BigInt 转为布尔值。 + +```javascript +!0n // true +!1n // false +``` + +### 数学运算 + +数学运算方面,BigInt 类型的`+`、`-`、`*`和`**`这四个二元运算符,与 Number 类型的行为一致。除法运算`/`会舍去小数部分,返回一个整数。 + +```javascript +9n / 5n +// 1n +``` + +几乎所有的数值运算符都可以用在 BigInt,但是有两个例外。 + +- 不带符号的右移位运算符`>>>` +- 一元的求正运算符`+` + +上面两个运算符用在 BigInt 会报错。前者是因为`>>>`运算符是不带符号的,但是 BigInt 总是带有符号的,导致该运算无意义,完全等同于右移运算符`>>`。后者是因为一元运算符`+`在 asm.js 里面总是返回 Number 类型,为了不破坏 asm.js 就规定`+1n`会报错。 + +BigInt 不能与普通数值进行混合运算。 + +```javascript +1n + 1.3 // 报错 +``` + +上面代码报错是因为无论返回的是 BigInt 或 Number,都会导致丢失精度信息。比如`(2n**53n + 1n) + 0.5`这个表达式,如果返回 BigInt 类型,`0.5`这个小数部分会丢失;如果返回 Number 类型,有效精度只能保持 53 位,导致精度下降。 + +同样的原因,如果一个标准库函数的参数预期是 Number 类型,但是得到的是一个 BigInt,就会报错。 + +```javascript +// 错误的写法 +Math.sqrt(4n) // 报错 + +// 正确的写法 +Math.sqrt(Number(4n)) // 2 +``` + +上面代码中,`Math.sqrt`的参数预期是 Number 类型,如果是 BigInt 就会报错,必须先用`Number`方法转一下类型,才能进行计算。 + +asm.js 里面,`|0`跟在一个数值的后面会返回一个32位整数。根据不能与 Number 类型混合运算的规则,BigInt 如果与`|0`进行运算会报错。 + +```javascript +1n | 0 // 报错 +``` + +### 其他运算 + +BigInt 对应的布尔值,与 Number 类型一致,即`0n`会转为`false`,其他值转为`true`。 + +```javascript +if (0n) { + console.log('if'); +} else { + console.log('else'); +} +// else +``` + +上面代码中,`0n`对应`false`,所以会进入`else`子句。 + +比较运算符(比如`>`)和相等运算符(`==`)允许 BigInt 与其他类型的值混合计算,因为这样做不会损失精度。 + +```javascript +0n < 1 // true +0n < true // true +0n == 0 // true +0n == false // true +0n === 0 // false +``` + +BigInt 与字符串混合运算时,会先转为字符串,再进行运算。 + +```javascript +'' + 123n // "123" +``` + +## Math.signbit() + +`Math.sign()`用来判断一个值的正负,但是如果参数是`-0`,它会返回`-0`。 + +```javascript +Math.sign(-0) // -0 +``` + +这导致对于判断符号位的正负,`Math.sign()`不是很有用。JavaScript 内部使用 64 位浮点数(国际标准 IEEE 754)表示数值,IEEE 754 规定第一位是符号位,`0`表示正数,`1`表示负数。所以会有两种零,`+0`是符号位为`0`时的零值,`-0`是符号位为`1`时的零值。实际编程中,判断一个值是`+0`还是`-0`非常麻烦,因为它们是相等的。 + +```javascript ++0 === -0 // true +``` + +目前,有一个[提案](http://jfbastien.github.io/papers/Math.signbit.html),引入了`Math.signbit()`方法判断一个数的符号位是否设置了。 + +```javascript +Math.signbit(2) //false +Math.signbit(-2) //true +Math.signbit(0) //false +Math.signbit(-0) //true +``` + +可以看到,该方法正确返回了`-0`的符号位是设置了的。 + +该方法的算法如下。 + +- 如果参数是`NaN`,返回`false` +- 如果参数是`-0`,返回`true` +- 如果参数是负值,返回`true` +- 其他情况返回`false` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/proxy.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proxy.md" old mode 100644 new mode 100755 similarity index 75% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/proxy.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proxy.md" index 790bd6adc..a9b1d4ddd --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/proxy.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/proxy.md" @@ -116,70 +116,28 @@ var fproxy = new Proxy(function(x, y) { }, handler); fproxy(1, 2) // 1 -new fproxy(1,2) // {value: 2} +new fproxy(1, 2) // {value: 2} fproxy.prototype === Object.prototype // true -fproxy.foo // "Hello, foo" +fproxy.foo === "Hello, foo" // true ``` -下面是 Proxy 支持的拦截操作一览。 - 对于可以设置、但没有设置拦截的操作,则直接落在目标对象上,按照原先的方式产生结果。 -**(1)get(target, propKey, receiver)** - -拦截对象属性的读取,比如`proxy.foo`和`proxy['foo']`。 - -最后一个参数`receiver`是一个对象,可选,参见下面`Reflect.get`的部分。 - -**(2)set(target, propKey, value, receiver)** - -拦截对象属性的设置,比如`proxy.foo = v`或`proxy['foo'] = v`,返回一个布尔值。 - -**(3)has(target, propKey)** - -拦截`propKey in proxy`的操作,返回一个布尔值。 - -**(4)deleteProperty(target, propKey)** - -拦截`delete proxy[propKey]`的操作,返回一个布尔值。 - -**(5)ownKeys(target)** - -拦截`Object.getOwnPropertyNames(proxy)`、`Object.getOwnPropertySymbols(proxy)`、`Object.keys(proxy)`,返回一个数组。该方法返回目标对象所有自身的属性的属性名,而`Object.keys()`的返回结果仅包括目标对象自身的可遍历属性。 - -**(6)getOwnPropertyDescriptor(target, propKey)** - -拦截`Object.getOwnPropertyDescriptor(proxy, propKey)`,返回属性的描述对象。 - -**(7)defineProperty(target, propKey, propDesc)** - -拦截`Object.defineProperty(proxy, propKey, propDesc)`、`Object.defineProperties(proxy, propDescs)`,返回一个布尔值。 - -**(8)preventExtensions(target)** - -拦截`Object.preventExtensions(proxy)`,返回一个布尔值。 - -**(9)getPrototypeOf(target)** - -拦截`Object.getPrototypeOf(proxy)`,返回一个对象。 - -**(10)isExtensible(target)** - -拦截`Object.isExtensible(proxy)`,返回一个布尔值。 - -**(11)setPrototypeOf(target, proto)** - -拦截`Object.setPrototypeOf(proxy, proto)`,返回一个布尔值。 - -如果目标对象是函数,那么还有两种额外操作可以拦截。 - -**(12)apply(target, object, args)** - -拦截 Proxy 实例作为函数调用的操作,比如`proxy(...args)`、`proxy.call(object, ...args)`、`proxy.apply(...)`。 - -**(13)construct(target, args)** - -拦截 Proxy 实例作为构造函数调用的操作,比如`new proxy(...args)`。 +下面是 Proxy 支持的拦截操作一览,一共 13 种。 + +- **get(target, propKey, receiver)**:拦截对象属性的读取,比如`proxy.foo`和`proxy['foo']`。 +- **set(target, propKey, value, receiver)**:拦截对象属性的设置,比如`proxy.foo = v`或`proxy['foo'] = v`,返回一个布尔值。 +- **has(target, propKey)**:拦截`propKey in proxy`的操作,返回一个布尔值。 +- **deleteProperty(target, propKey)**:拦截`delete proxy[propKey]`的操作,返回一个布尔值。 +- **ownKeys(target)**:拦截`Object.getOwnPropertyNames(proxy)`、`Object.getOwnPropertySymbols(proxy)`、`Object.keys(proxy)`、`for...in`循环,返回一个数组。该方法返回目标对象所有自身的属性的属性名,而`Object.keys()`的返回结果仅包括目标对象自身的可遍历属性。 +- **getOwnPropertyDescriptor(target, propKey)**:拦截`Object.getOwnPropertyDescriptor(proxy, propKey)`,返回属性的描述对象。 +- **defineProperty(target, propKey, propDesc)**:拦截`Object.defineProperty(proxy, propKey, propDesc)`、`Object.defineProperties(proxy, propDescs)`,返回一个布尔值。 +- **preventExtensions(target)**:拦截`Object.preventExtensions(proxy)`,返回一个布尔值。 +- **getPrototypeOf(target)**:拦截`Object.getPrototypeOf(proxy)`,返回一个对象。 +- **isExtensible(target)**:拦截`Object.isExtensible(proxy)`,返回一个布尔值。 +- **setPrototypeOf(target, proto)**:拦截`Object.setPrototypeOf(proxy, proto)`,返回一个布尔值。如果目标对象是函数,那么还有两种额外操作可以拦截。 +- **apply(target, object, args)**:拦截 Proxy 实例作为函数调用的操作,比如`proxy(...args)`、`proxy.call(object, ...args)`、`proxy.apply(...)`。 +- **construct(target, args)**:拦截 Proxy 实例作为构造函数调用的操作,比如`new proxy(...args)`。 ## Proxy 实例的方法 @@ -187,7 +145,9 @@ fproxy.foo // "Hello, foo" ### get() -`get`方法用于拦截某个属性的读取操作。上文已经有一个例子,下面是另一个拦截读取操作的例子。 +`get`方法用于拦截某个属性的读取操作,可以接受三个参数,依次为目标对象、属性名和 proxy 实例本身(严格地说,是操作行为所针对的对象),其中最后一个参数可选。 + +`get`方法的用法,上文已经有一个例子,下面是另一个拦截读取操作的例子。 ```javascript var person = { @@ -215,13 +175,13 @@ proxy.age // 抛出一个错误 ```javascript let proto = new Proxy({}, { get(target, propertyKey, receiver) { - console.log('GET '+propertyKey); + console.log('GET ' + propertyKey); return target[propertyKey]; } }); let obj = Object.create(proto); -obj.xxx // "GET xxx" +obj.foo // "GET foo" ``` 上面代码中,拦截操作定义在`Prototype`对象上面,所以如果读取`obj`对象继承的属性时,拦截会生效。 @@ -249,7 +209,7 @@ let arr = createArray('a', 'b', 'c'); arr[-1] // c ``` -上面代码中,数组的位置参数是`-1`,就会输出数组的倒数最后一个成员。 +上面代码中,数组的位置参数是`-1`,就会输出数组的倒数第一个成员。 利用 Proxy,可以将读取属性的操作(`get`),转变为执行某个函数,从而实现属性的链式操作。 @@ -282,7 +242,7 @@ pipe(3).double.pow.reverseInt.get; // 63 上面代码设置 Proxy 以后,达到了将函数名链式使用的效果。 -下面的例子则是利用`get`拦截,实现一个生成各种DOM节点的通用函数`dom`。 +下面的例子则是利用`get`拦截,实现一个生成各种 DOM 节点的通用函数`dom`。 ```javascript const dom = new Proxy({}, { @@ -317,7 +277,33 @@ const el = dom.div({}, document.body.appendChild(el); ``` -如果一个属性不可配置(configurable)和不可写(writable),则该属性不能被代理,通过 Proxy 对象访问该属性会报错。 +下面是一个`get`方法的第三个参数的例子,它总是指向原始的读操作所在的那个对象,一般情况下就是 Proxy 实例。 + +```javascript +const proxy = new Proxy({}, { + get: function(target, property, receiver) { + return receiver; + } +}); +proxy.getReceiver === proxy // true +``` + +上面代码中,`proxy`对象的`getReceiver`属性是由`proxy`对象提供的,所以`receiver`指向`proxy`对象。 + +```javascript +const proxy = new Proxy({}, { + get: function(target, property, receiver) { + return receiver; + } +}); + +const d = Object.create(proxy); +d.a === d // true +``` + +上面代码中,`d`对象本身没有`a`属性,所以读取`d.a`的时候,会去`d`的原型`proxy`对象找。这时,`receiver`就指向`d`,代表原始的读操作所在的那个对象。 + +如果一个属性不可配置(configurable)且不可写(writable),则 Proxy 不能修改该属性,否则通过 Proxy 对象访问该属性会报错。 ```javascript const target = Object.defineProperties({}, { @@ -342,9 +328,9 @@ proxy.foo ### set() -`set`方法用来拦截某个属性的赋值操作。 +`set`方法用来拦截某个属性的赋值操作,可以接受四个参数,依次为目标对象、属性名、属性值和 Proxy 实例本身,其中最后一个参数可选。 -假定`Person`对象有一个`age`属性,该属性应该是一个不大于200的整数,那么可以使用`Proxy`保证`age`的属性值符合要求。 +假定`Person`对象有一个`age`属性,该属性应该是一个不大于 200 的整数,那么可以使用`Proxy`保证`age`的属性值符合要求。 ```javascript let validator = { @@ -358,7 +344,7 @@ let validator = { } } - // 对于age以外的属性,直接保存 + // 对于满足条件的 age 属性以及其他属性,直接保存 obj[prop] = value; } }; @@ -377,7 +363,7 @@ person.age = 300 // 报错 有时,我们会在对象上面设置内部属性,属性名的第一个字符使用下划线开头,表示这些属性不应该被外部使用。结合`get`和`set`方法,就可以做到防止这些内部属性被外部读写。 ```javascript -var handler = { +const handler = { get (target, key) { invariant(key, 'get'); return target[key]; @@ -393,8 +379,8 @@ function invariant (key, action) { throw new Error(`Invalid attempt to ${action} private "${key}" property`); } } -var target = {}; -var proxy = new Proxy(target, handler); +const target = {}; +const proxy = new Proxy(target, handler); proxy._prop // Error: Invalid attempt to get private "_prop" property proxy._prop = 'c' @@ -403,7 +389,76 @@ proxy._prop = 'c' 上面代码中,只要读写的属性名的第一个字符是下划线,一律抛错,从而达到禁止读写内部属性的目的。 -注意,如果目标对象自身的某个属性,不可写也不可配置,那么`set`不得改变这个属性的值,只能返回同样的值,否则报错。 +下面是`set`方法第四个参数的例子。 + +```javascript +const handler = { + set: function(obj, prop, value, receiver) { + obj[prop] = receiver; + } +}; +const proxy = new Proxy({}, handler); +proxy.foo = 'bar'; +proxy.foo === proxy // true +``` + +上面代码中,`set`方法的第四个参数`receiver`,指的是原始的操作行为所在的那个对象,一般情况下是`proxy`实例本身,请看下面的例子。 + +```javascript +const handler = { + set: function(obj, prop, value, receiver) { + obj[prop] = receiver; + } +}; +const proxy = new Proxy({}, handler); +const myObj = {}; +Object.setPrototypeOf(myObj, proxy); + +myObj.foo = 'bar'; +myObj.foo === myObj // true +``` + +上面代码中,设置`myObj.foo`属性的值时,`myObj`并没有`foo`属性,因此引擎会到`myObj`的原型链去找`foo`属性。`myObj`的原型对象`proxy`是一个 Proxy 实例,设置它的`foo`属性会触发`set`方法。这时,第四个参数`receiver`就指向原始赋值行为所在的对象`myObj`。 + +注意,如果目标对象自身的某个属性,不可写且不可配置,那么`set`方法将不起作用。 + +```javascript +const obj = {}; +Object.defineProperty(obj, 'foo', { + value: 'bar', + writable: false, +}); + +const handler = { + set: function(obj, prop, value, receiver) { + obj[prop] = 'baz'; + } +}; + +const proxy = new Proxy(obj, handler); +proxy.foo = 'baz'; +proxy.foo // "bar" +``` + +上面代码中,`obj.foo`属性不可写,Proxy 对这个属性的`set`代理将不会生效。 + +注意,严格模式下,`set`代理如果没有返回`true`,就会报错。 + +```javascript +'use strict'; +const handler = { + set: function(obj, prop, value, receiver) { + obj[prop] = receiver; + // 无论有没有下面这一行,都会报错 + return false; + } +}; +const proxy = new Proxy({}, handler); +proxy.foo = 'bar'; +// TypeError: 'set' on proxy: trap returned falsish for property 'foo' +``` + +上面代码中,严格模式下,`set`代理返回`false`或者`undefined`,都会报错。 ### apply() @@ -466,6 +521,8 @@ Reflect.apply(proxy, null, [9, 10]) // 38 `has`方法用来拦截`HasProperty`操作,即判断对象是否具有某个属性时,这个方法会生效。典型的操作就是`in`运算符。 +`has`方法可以接受两个参数,分别是目标对象、需查询的属性名。 + 下面的例子使用`has`方法隐藏某些属性,不被`in`运算符发现。 ```javascript @@ -542,7 +599,7 @@ for (let b in oproxy2) { // 99 ``` -上面代码中,`has`拦截只对`in`循环生效,对`for...in`循环不生效,导致不符合要求的属性没有被排除在`for...in`循环之外。 +上面代码中,`has`拦截只对`in`运算符生效,对`for...in`循环不生效,导致不符合要求的属性没有被`for...in`循环所排除。 ### construct() @@ -558,10 +615,9 @@ var handler = { `construct`方法可以接受两个参数。 -- `target`: 目标对象 -- `args`:构建函数的参数对象 - -下面是一个例子。 +- `target`:目标对象 +- `args`:构造函数的参数对象 +- `newTarget`:创造实例对象时,`new`命令作用的构造函数(下面例子的`p`) ```javascript var p = new Proxy(function () {}, { @@ -586,6 +642,7 @@ var p = new Proxy(function() {}, { }); new p() // 报错 +// Uncaught TypeError: 'construct' on proxy: trap returned non-object ('1') ``` ### deleteProperty() @@ -596,6 +653,7 @@ new p() // 报错 var handler = { deleteProperty (target, key) { invariant(key, 'delete'); + delete target[key]; return true; } }; @@ -627,17 +685,16 @@ var handler = { }; var target = {}; var proxy = new Proxy(target, handler); -proxy.foo = 'bar' -// TypeError: proxy defineProperty handler returned false for property '"foo"' +proxy.foo = 'bar' // 不会生效 ``` -上面代码中,`defineProperty`方法返回`false`,导致添加新属性会抛出错误。 +上面代码中,`defineProperty`方法返回`false`,导致添加新属性总是无效。 -注意,如果目标对象不可扩展(extensible),则`defineProperty`不能增加目标对象上不存在的属性,否则会报错。另外,如果目标对象的某个属性不可写(writable)或不可配置(configurable),则`defineProperty`方法不得改变这两个设置。 +注意,如果目标对象不可扩展(non-extensible),则`defineProperty`不能增加目标对象上不存在的属性,否则会报错。另外,如果目标对象的某个属性不可写(writable)或不可配置(configurable),则`defineProperty`方法不得改变这两个设置。 ### getOwnPropertyDescriptor() -`getOwnPropertyDescriptor`方法拦截`Object.getOwnPropertyDescriptor`,返回一个属性描述对象或者`undefined`。 +`getOwnPropertyDescriptor`方法拦截`Object.getOwnPropertyDescriptor()`,返回一个属性描述对象或者`undefined`。 ```javascript var handler = { @@ -662,13 +719,13 @@ Object.getOwnPropertyDescriptor(proxy, 'baz') ### getPrototypeOf() -`getPrototypeOf`方法主要用来拦截`Object.getPrototypeOf()`运算符,以及其他一些操作。 +`getPrototypeOf`方法主要用来拦截获取对象原型。具体来说,拦截下面这些操作。 - `Object.prototype.__proto__` - `Object.prototype.isPrototypeOf()` - `Object.getPrototypeOf()` - `Reflect.getPrototypeOf()` -- `instanceof`运算符 +- `instanceof` 下面是一个例子。 @@ -684,7 +741,7 @@ Object.getPrototypeOf(p) === proto // true 上面代码中,`getPrototypeOf`方法拦截`Object.getPrototypeOf()`,返回`proto`对象。 -注意,`getPrototypeOf`方法的返回值必须是对象或者`null`,否则报错。另外,如果目标对象不可扩展(extensible), `getPrototypeOf`方法必须返回目标对象的原型对象。 +注意,`getPrototypeOf`方法的返回值必须是对象或者`null`,否则报错。另外,如果目标对象不可扩展(non-extensible), `getPrototypeOf`方法必须返回目标对象的原型对象。 ### isExtensible() @@ -722,16 +779,18 @@ var p = new Proxy({}, { } }); -Object.isExtensible(p) // 报错 +Object.isExtensible(p) +// Uncaught TypeError: 'isExtensible' on proxy: trap result does not reflect extensibility of proxy target (which is 'true') ``` ### ownKeys() -`ownKeys`方法用来拦截以下操作。 +`ownKeys`方法用来拦截对象自身属性的读取操作。具体来说,拦截以下操作。 - `Object.getOwnPropertyNames()` - `Object.getOwnPropertySymbols()` - `Object.keys()` +- `for...in`循环 下面是拦截`Object.keys()`的例子。 @@ -826,6 +885,23 @@ Object.getOwnPropertyNames(p) // [ 'a', 'b', 'c' ] ``` +`for...in`循环也受到`ownKeys`方法的拦截。 + +```javascript +const obj = { hello: 'world' }; +const proxy = new Proxy(obj, { + ownKeys: function () { + return ['a', 'b']; + } +}); + +for (let key in proxy) { + console.log(key); // 没有任何输出 +} +``` + +上面代码中,`ownkeys`指定只返回`a`和`b`属性,由于`obj`没有这两个属性,因此`for...in`循环不会有任何输出。 + `ownKeys`方法返回的数组成员,只能是字符串或 Symbol 值。如果有其他类型的值,或者返回的根本不是数组,就会报错。 ```javascript @@ -865,7 +941,7 @@ Object.getOwnPropertyNames(p) 上面代码中,`obj`对象的`a`属性是不可配置的,这时`ownKeys`方法返回的数组之中,必须包含`a`,否则会报错。 -另外,如果目标对象是不可扩展的(non-extensition),这时`ownKeys`方法返回的数组之中,必须包含原对象的所有属性,且不能包含多余的属性,否则报错。 +另外,如果目标对象是不可扩展的(non-extensible),这时`ownKeys`方法返回的数组之中,必须包含原对象的所有属性,且不能包含多余的属性,否则报错。 ```javascript var obj = { @@ -884,7 +960,7 @@ Object.getOwnPropertyNames(p) // Uncaught TypeError: 'ownKeys' on proxy: trap returned extra keys but proxy target is non-extensible ``` -上面代码中,`Obj`对象是不可扩展的,这时`ownKeys`方法返回的数组之中,包含了`obj`对象的多余属性`b`,所以导致了报错。 +上面代码中,`obj`对象是不可扩展的,这时`ownKeys`方法返回的数组之中,包含了`obj`对象的多余属性`b`,所以导致了报错。 ### preventExtensions() @@ -893,13 +969,14 @@ Object.getOwnPropertyNames(p) 这个方法有一个限制,只有目标对象不可扩展时(即`Object.isExtensible(proxy)`为`false`),`proxy.preventExtensions`才能返回`true`,否则会报错。 ```javascript -var p = new Proxy({}, { +var proxy = new Proxy({}, { preventExtensions: function(target) { return true; } }); -Object.preventExtensions(p) // 报错 +Object.preventExtensions(proxy) +// Uncaught TypeError: 'preventExtensions' on proxy: trap returned truish but the proxy target is extensible ``` 上面代码中,`proxy.preventExtensions`方法返回`true`,但这时`Object.isExtensible(proxy)`会返回`true`,因此报错。 @@ -907,7 +984,7 @@ Object.preventExtensions(p) // 报错 为了防止出现这个问题,通常要在`proxy.preventExtensions`方法里面,调用一次`Object.preventExtensions`。 ```javascript -var p = new Proxy({}, { +var proxy = new Proxy({}, { preventExtensions: function(target) { console.log('called'); Object.preventExtensions(target); @@ -915,9 +992,9 @@ var p = new Proxy({}, { } }); -Object.preventExtensions(p) +Object.preventExtensions(proxy) // "called" -// true +// Proxy {} ``` ### setPrototypeOf() @@ -941,7 +1018,7 @@ Object.setPrototypeOf(proxy, proto); 上面代码中,只要修改`target`的原型对象,就会报错。 -注意,该方法只能返回布尔值,否则会被自动转为布尔值。另外,如果目标对象不可扩展(extensible),`setPrototypeOf`方法不得改变目标对象的原型。 +注意,该方法只能返回布尔值,否则会被自动转为布尔值。另外,如果目标对象不可扩展(non-extensible),`setPrototypeOf`方法不得改变目标对象的原型。 ## Proxy.revocable() @@ -1061,4 +1138,3 @@ function createWebService(baseUrl) { ``` 同理,Proxy 也可以用来实现数据库的 ORM 层。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reference.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reference.md" new file mode 100755 index 000000000..a2a989fe8 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reference.md" @@ -0,0 +1,261 @@ +# 参考链接 + +## 官方文件 + +- [ECMAScript® 2015 Language Specification](http://www.ecma-international.org/ecma-262/6.0/index.html): ECMAScript 2015 规格 +- [ECMAScript® 2016 Language Specification](http://www.ecma-international.org/ecma-262/7.0/): ECMAScript 2016 规格 +- [ECMAScript® 2017 Language Specification](https://tc39.github.io/ecma262/):ECMAScript 2017 规格(草案) +- [ECMAScript Current Proposals](https://github.com/tc39/ecma262): ECMAScript 当前的所有提案 +- [ECMAScript Active Proposals](https://github.com/tc39/proposals): 已经进入正式流程的提案 +- [ECMAScript proposals](https://github.com/hemanth/es-next):从阶段 0 到阶段 4 的所有提案列表 +- [TC39 meeting agendas](https://github.com/tc39/agendas): TC39 委员会历年的会议记录 +- [ECMAScript Daily](https://ecmascript-daily.github.io/): TC39 委员会的动态 +- [The TC39 Process](https://tc39.github.io/process-document/): 提案进入正式规格的流程 +- [TC39: A Process Sketch, Stages 0 and 1](https://thefeedbackloop.xyz/tc39-a-process-sketch-stages-0-and-1/): Stage 0 和 Stage 1 的含义 +- [TC39 Process Sketch, Stage 2](https://thefeedbackloop.xyz/tc39-process-sketch-stage-2/): Stage 2 的含义 + +## 综合介绍 + +- Axel Rauschmayer, [Exploring ES6: Upgrade to the next version of JavaScript](http://exploringjs.com/es6/): ES6 的专著,本书的许多代码实例来自该书 +- Sayanee Basu, [Use ECMAScript 6 Today](http://net.tutsplus.com/articles/news/ecmascript-6-today/) +- Ariya Hidayat, [Toward Modern Web Apps with ECMAScript 6](http://www.sencha.com/blog/toward-modern-web-apps-with-ecmascript-6/) +- Dale Schouten, [10 Ecmascript-6 tricks you can perform right now](http://html5hub.com/10-ecmascript-6-tricks-you-can-perform-right-now/) +- Colin Toh, [Lightweight ES6 Features That Pack A Punch](http://colintoh.com/blog/lightweight-es6-features): ES6 的一些“轻量级”的特性介绍 +- Domenic Denicola, [ES6: The Awesome Parts](http://www.slideshare.net/domenicdenicola/es6-the-awesome-parts) +- Nicholas C. Zakas, [Understanding ECMAScript 6](https://github.com/nzakas/understandinges6) +- Justin Drake, [ECMAScript 6 in Node.JS](https://github.com/JustinDrake/node-es6-examples) +- Ryan Dao, [Summary of ECMAScript 6 major features](http://ryandao.net/portal/content/summary-ecmascript-6-major-features) +- Luke Hoban, [ES6 features](https://github.com/lukehoban/es6features): ES6 新语法点的罗列 +- Traceur-compiler, [Language Features](https://github.com/google/traceur-compiler/wiki/LanguageFeatures): Traceur 文档列出的一些 ES6 例子 +- Axel Rauschmayer, [ECMAScript 6: what’s next for JavaScript?](https://speakerdeck.com/rauschma/ecmascript-6-whats-next-for-javascript-august-2014): 关于 ES6 新增语法的综合介绍,有很多例子 +- Axel Rauschmayer, [Getting started with ECMAScript 6](http://www.2ality.com/2015/08/getting-started-es6.html): ES6 语法点的综合介绍 +- Toby Ho, [ES6 in io.js](http://davidwalsh.name/es6-io) +- Guillermo Rauch, [ECMAScript 6](http://rauchg.com/2015/ecmascript-6/) +- Benjamin De Cock, [Frontend Guidelines](https://github.com/bendc/frontend-guidelines): ES6 最佳实践 +- Jani Hartikainen, [ES6: What are the benefits of the new features in practice?](http://codeutopia.net/blog/2015/01/06/es6-what-are-the-benefits-of-the-new-features-in-practice/) +- kangax, [JavaScript quiz. ES6 edition](http://perfectionkills.com/javascript-quiz-es6/): ES6 小测试 +- Jeremy Fairbank, [HTML5DevConf ES7 and Beyond!](https://speakerdeck.com/jfairbank/html5devconf-es7-and-beyond): ES7 新增语法点介绍 +- Timothy Gu, [How to Read the ECMAScript Specification](https://timothygu.me/es-howto/): 如何读懂 ES6 规格 + +## let 和 const + +- Kyle Simpson, [For and against let](http://davidwalsh.name/for-and-against-let): 讨论 let 命令的作用域 +- kangax, [Why typeof is no longer “safe”](http://es-discourse.com/t/why-typeof-is-no-longer-safe/15): 讨论在块级作用域内,let 命令的变量声明和赋值的行为 +- Axel Rauschmayer, [Variables and scoping in ECMAScript 6](http://www.2ality.com/2015/02/es6-scoping.html): 讨论块级作用域与 let 和 const 的行为 +- Nicolas Bevacqua, [ES6 Let, Const and the “Temporal Dead Zone” (TDZ) in Depth](http://ponyfoo.com/articles/es6-let-const-and-temporal-dead-zone-in-depth) +- acorn, [Function statements in strict mode](https://github.com/ternjs/acorn/issues/118): 块级作用域对严格模式的函数声明的影响 +- Axel Rauschmayer, [ES proposal: global](http://www.2ality.com/2016/09/global.html): 顶层对象`global` + +## 解构赋值 + +- Nick Fitzgerald, [Destructuring Assignment in ECMAScript 6](http://fitzgeraldnick.com/weblog/50/): 详细介绍解构赋值的用法 +- Nicholas C. Zakas, [ECMAScript 6 destructuring gotcha](https://www.nczonline.net/blog/2015/10/ecmascript-6-destructuring-gotcha/) + +## 字符串 + +- Nicholas C. Zakas, [A critical review of ECMAScript 6 quasi-literals](http://www.nczonline.net/blog/2012/08/01/a-critical-review-of-ecmascript-6-quasi-literals/) +- Mozilla Developer Network, [Template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings) +- Addy Osmani, [Getting Literal With ES6 Template Strings](http://updates.html5rocks.com/2015/01/ES6-Template-Strings): 模板字符串的介绍 +- Blake Winton, [ES6 Templates](https://weblog.latte.ca/blake/tech/firefox/templates.html): 模板字符串的介绍 +- Peter Jaszkowiak, [How to write a template compiler in JavaScript](https://medium.com/@PitaJ/how-to-write-a-template-compiler-in-javascript-f174df6f32f): 使用模板字符串,编写一个模板编译函数 +- Axel Rauschmayer, [ES.stage3: string padding](http://www.2ality.com/2015/11/string-padding.html) + +## 正则 + +- Mathias Bynens, [Unicode-aware regular expressions in ES6](https://mathiasbynens.be/notes/es6-unicode-regex): 详细介绍正则表达式的 u 修饰符 +- Axel Rauschmayer, [New regular expression features in ECMAScript 6](http://www.2ality.com/2015/07/regexp-es6.html):ES6 正则特性的详细介绍 +- Yang Guo, [RegExp lookbehind assertions](http://v8project.blogspot.jp/2016/02/regexp-lookbehind-assertions.html):介绍后行断言 +- Axel Rauschmayer, [ES proposal: RegExp named capture groups](http://2ality.com/2017/05/regexp-named-capture-groups.html): 具名组匹配的介绍 +- Mathias Bynens, [ECMAScript regular expressions are getting better!](https://mathiasbynens.be/notes/es-regexp-proposals): 介绍 ES2018 添加的多项正则语法 + +## 数值 + +- Nicolas Bevacqua, [ES6 Number Improvements in Depth](http://ponyfoo.com/articles/es6-number-improvements-in-depth) +- Axel Rauschmayer, [ES proposal: arbitrary precision integers](http://2ality.com/2017/03/es-integer.html) +- Mathias Bynens, [BigInt: arbitrary-precision integers in JavaScript](https://developers.google.com/web/updates/2018/05/bigint) + +## 数组 + +- Axel Rauschmayer, [ECMAScript 6’s new array methods](http://www.2ality.com/2014/05/es6-array-methods.html): 对 ES6 新增的数组方法的全面介绍 +- TC39, [Array.prototype.includes](https://github.com/tc39/Array.prototype.includes/): 数组的 includes 方法的规格 +- Axel Rauschmayer, [ECMAScript 6: holes in Arrays](http://www.2ality.com/2015/09/holes-arrays-es6.html): 数组的空位问题 + +## 函数 + +- Nicholas C. Zakas, [Understanding ECMAScript 6 arrow functions](http://www.nczonline.net/blog/2013/09/10/understanding-ecmascript-6-arrow-functions/) +- Jack Franklin, [Real Life ES6 - Arrow Functions](http://javascriptplayground.com/blog/2014/04/real-life-es6-arrow-fn/) +- Axel Rauschmayer, [Handling required parameters in ECMAScript 6](http://www.2ality.com/2014/04/required-parameters-es6.html) +- Dmitry Soshnikov, [ES6 Notes: Default values of parameters](http://dmitrysoshnikov.com/ecmascript/es6-notes-default-values-of-parameters/): 介绍参数的默认值 +- Ragan Wald, [Destructuring and Recursion in ES6](http://raganwald.com/2015/02/02/destructuring.html): rest 参数和扩展运算符的详细介绍 +- Axel Rauschmayer, [The names of functions in ES6](http://www.2ality.com/2015/09/function-names-es6.html): 函数的 name 属性的详细介绍 +- Kyle Simpson, [Arrow This](http://blog.getify.com/arrow-this/): 箭头函数并没有自己的 this +- Derick Bailey, [Do ES6 Arrow Functions Really Solve “this” In JavaScript?](http://derickbailey.com/2015/09/28/do-es6-arrow-functions-really-solve-this-in-javascript/):使用箭头函数处理 this 指向,必须非常小心 +- Mark McDonnell, [Understanding recursion in functional JavaScript programming](http://www.integralist.co.uk/posts/js-recursion.html): 如何自己实现尾递归优化 +- Nicholas C. Zakas, [The ECMAScript 2016 change you probably don't know](https://www.nczonline.net/blog/2016/10/the-ecmascript-2016-change-you-probably-dont-know/): 使用参数默认值时,不能在函数内部显式开启严格模式 +- Axel Rauschmayer, [ES proposal: optional catch binding](http://2ality.com/2017/08/optional-catch-binding.html) +- Cynthia Lee, [When you should use ES6 arrow functions — and when you shouldn’t](https://medium.freecodecamp.org/when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt-3d851d7f0b26): 讨论箭头函数的适用场合 + +## 对象 + +- Addy Osmani, [Data-binding Revolutions with Object.observe()](http://www.html5rocks.com/en/tutorials/es7/observe/): 介绍 Object.observe()的概念 +- Sella Rafaeli, [Native JavaScript Data-Binding](http://www.sellarafaeli.com/blog/native_javascript_data_binding): 如何使用 Object.observe 方法,实现数据对象与 DOM 对象的双向绑定 +- Axel Rauschmayer, [`__proto__` in ECMAScript 6](http://www.2ality.com/2015/09/proto-es6.html) +- Axel Rauschmayer, [Enumerability in ECMAScript 6](http://www.2ality.com/2015/10/enumerability-es6.html) +- Axel Rauschmayer, [ES proposal: Object.getOwnPropertyDescriptors()](http://www.2ality.com/2016/02/object-getownpropertydescriptors.html) +- TC39, [Object.getOwnPropertyDescriptors Proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) +- David Titarenco, [How Spread Syntax Breaks JavaScript](https://dvt.name/2018/06/02/spread-syntax-breaks-javascript/): 扩展运算符的一些不合理的地方 + +## Symbol + +- Axel Rauschmayer, [Symbols in ECMAScript 6](http://www.2ality.com/2014/12/es6-symbols.html): Symbol 简介 +- MDN, [Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): Symbol 类型的详细介绍 +- Jason Orendorff, [ES6 In Depth: Symbols](https://hacks.mozilla.org/2015/06/es6-in-depth-symbols/) +- Keith Cirkel, [Metaprogramming in ES6: Symbols and why they're awesome](http://blog.keithcirkel.co.uk/metaprogramming-in-es6-symbols/): Symbol 的深入介绍 +- Axel Rauschmayer, [Customizing ES6 via well-known symbols](http://www.2ality.com/2015/09/well-known-symbols-es6.html) +- Derick Bailey, [Creating A True Singleton In Node.js, With ES6 Symbols](https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/) +- Das Surma, [How to read web specs Part IIa – Or: ECMAScript Symbols](https://dassur.ma/things/reading-specs-2/): 介绍 Symbol 的规格 + +## Set 和 Map + +- Mozilla Developer Network, [WeakSet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet):介绍 WeakSet 数据结构 +- Dwayne Charrington, [What Are Weakmaps In ES6?](http://ilikekillnerds.com/2015/02/what-are-weakmaps-in-es6/): WeakMap 数据结构介绍 +- Axel Rauschmayer, [ECMAScript 6: maps and sets](http://www.2ality.com/2015/01/es6-maps-sets.html): Set 和 Map 结构的详细介绍 +- Jason Orendorff, [ES6 In Depth: Collections](https://hacks.mozilla.org/2015/06/es6-in-depth-collections/):Set 和 Map 结构的设计思想 +- Axel Rauschmayer, [Converting ES6 Maps to and from JSON](http://www.2ality.com/2015/08/es6-map-json.html): 如何将 Map 与其他数据结构互相转换 + +## Proxy 和 Reflect + +- Nicholas C. Zakas, [Creating defensive objects with ES6 proxies](http://www.nczonline.net/blog/2014/04/22/creating-defensive-objects-with-es6-proxies/) +- Axel Rauschmayer, [Meta programming with ECMAScript 6 proxies](http://www.2ality.com/2014/12/es6-proxies.html): Proxy 详解 +- Daniel Zautner, [Meta-programming JavaScript Using Proxies](http://dzautner.com/meta-programming-javascript-using-proxies/): 使用 Proxy 实现元编程 +- Tom Van Cutsem, [Harmony-reflect](https://github.com/tvcutsem/harmony-reflect/wiki): Reflect 对象的设计目的 +- Tom Van Cutsem, [Proxy Traps](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/traps.md): Proxy 拦截操作一览 +- Tom Van Cutsem, [Reflect API](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/api.md) +- Tom Van Cutsem, [Proxy Handler API](https://github.com/tvcutsem/harmony-reflect/blob/master/doc/handler_api.md) +- Nicolas Bevacqua, [ES6 Proxies in Depth](http://ponyfoo.com/articles/es6-proxies-in-depth) +- Nicolas Bevacqua, [ES6 Proxy Traps in Depth](http://ponyfoo.com/articles/es6-proxy-traps-in-depth) +- Nicolas Bevacqua, [More ES6 Proxy Traps in Depth](http://ponyfoo.com/articles/more-es6-proxy-traps-in-depth) +- Axel Rauschmayer, [Pitfall: not all objects can be wrapped transparently by proxies](http://www.2ality.com/2016/11/proxying-builtins.html) +- Bertalan Miklos, [Writing a JavaScript Framework - Data Binding with ES6 Proxies](https://blog.risingstack.com/writing-a-javascript-framework-data-binding-es6-proxy/): 使用 Proxy 实现观察者模式 +- Keith Cirkel, [Metaprogramming in ES6: Part 2 - Reflect](https://www.keithcirkel.co.uk/metaprogramming-in-es6-part-2-reflect/): Reflect API 的详细介绍 + +## Promise 对象 + +- Jake Archibald, [JavaScript Promises: There and back again](http://www.html5rocks.com/en/tutorials/es6/promises/) +- Jake Archibald, [Tasks, microtasks, queues and schedules](https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/) +- Tilde, [rsvp.js](https://github.com/tildeio/rsvp.js) +- Sandeep Panda, [An Overview of JavaScript Promises](http://www.sitepoint.com/overview-javascript-promises/): ES6 Promise 入门介绍 +- Dave Atchley, [ES6 Promises](http://www.datchley.name/es6-promises/): Promise 的语法介绍 +- Axel Rauschmayer, [ECMAScript 6 promises (2/2): the API](http://www.2ality.com/2014/10/es6-promises-api.html): 对 ES6 Promise 规格和用法的详细介绍 +- Jack Franklin, [Embracing Promises in JavaScript](http://javascriptplayground.com/blog/2015/02/promises/): catch 方法的例子 +- Ronald Chen, [How to escape Promise Hell](https://medium.com/@pyrolistical/how-to-get-out-of-promise-hell-8c20e0ab0513#.2an1he6vf): 如何使用`Promise.all`方法的一些很好的例子 +- Jordan Harband, [proposal-promise-try](https://github.com/ljharb/proposal-promise-try): Promise.try() 方法的提案 +- Sven Slootweg, [What is Promise.try, and why does it matter?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/): Promise.try() 方法的优点 +- Yehuda Katz, [TC39: Promises, Promises](https://thefeedbackloop.xyz/tc39-promises-promises/): Promise.try() 的用处 + +## Iterator + +- Mozilla Developer Network, [Iterators and generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators) +- Mozilla Developer Network, [The Iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol) +- Jason Orendorff, [ES6 In Depth: Iterators and the for-of loop](https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop/): 遍历器与 for...of 循环的介绍 +- Axel Rauschmayer, [Iterators and generators in ECMAScript 6](http://www.2ality.com/2013/06/iterators-generators.html): 探讨 Iterator 和 Generator 的设计目的 +- Axel Rauschmayer, [Iterables and iterators in ECMAScript 6](http://www.2ality.com/2015/02/es6-iteration.html): Iterator 的详细介绍 +- Kyle Simpson, [Iterating ES6 Numbers](http://blog.getify.com/iterating-es6-numbers/): 在数值对象上部署遍历器 + +## Generator + +- Matt Baker, [Replacing callbacks with ES6 Generators](http://flippinawesome.org/2014/02/10/replacing-callbacks-with-es6-generators/) +- Steven Sanderson, [Experiments with Koa and JavaScript Generators](http://blog.stevensanderson.com/2013/12/21/experiments-with-koa-and-javascript-generators/) +- jmar777, [What's the Big Deal with Generators?](http://devsmash.com/blog/whats-the-big-deal-with-generators) +- Marc Harter, [Generators in Node.js: Common Misconceptions and Three Good Use Cases](http://strongloop.com/strongblog/how-to-generators-node-js-yield-use-cases/): 讨论 Generator 函数的作用 +- StackOverflow, [ES6 yield : what happens to the arguments of the first call next()?](http://stackoverflow.com/questions/20977379/es6-yield-what-happens-to-the-arguments-of-the-first-call-next): 第一次使用 next 方法时不能带有参数 +- Kyle Simpson, [ES6 Generators: Complete Series](http://davidwalsh.name/es6-generators): 由浅入深探讨 Generator 的系列文章,共四篇 +- Gajus Kuizinas, [The Definitive Guide to the JavaScript Generators](http://gajus.com/blog/2/the-definetive-guide-to-the-javascript-generators): 对 Generator 的综合介绍 +- Jan Krems, [Generators Are Like Arrays](https://gist.github.com/jkrems/04a2b34fb9893e4c2b5c): 讨论 Generator 可以被当作数据结构看待 +- Harold Cooper, [Coroutine Event Loops in JavaScript](http://syzygy.st/javascript-coroutines/): Generator 用于实现状态机 +- Ruslan Ismagilov, [learn-generators](https://github.com/isRuslan/learn-generators): 编程练习,共 6 道题 +- Steven Sanderson, [Experiments with Koa and JavaScript Generators](http://blog.stevensanderson.com/2013/12/21/experiments-with-koa-and-javascript-generators/): Generator 入门介绍,以 Koa 框架为例 +- Mahdi Dibaiee, [ES7 Array and Generator comprehensions](http://dibaiee.ir/es7-array-generator-comprehensions/):ES7 的 Generator 推导 +- Nicolas Bevacqua, [ES6 Generators in Depth](http://ponyfoo.com/articles/es6-generators-in-depth) +- Axel Rauschmayer, [ES6 generators in depth](http://www.2ality.com/2015/03/es6-generators.html): Generator 规格的详尽讲解 +- Derick Bailey, [Using ES6 Generators To Short-Circuit Hierarchical Data Iteration](https://derickbailey.com/2015/10/05/using-es6-generators-to-short-circuit-hierarchical-data-iteration/):使用 for...of 循环完成预定的操作步骤 + +## 异步操作和 Async 函数 + +- Luke Hoban, [Async Functions for ECMAScript](https://github.com/lukehoban/ecmascript-asyncawait): Async 函数的设计思想,与 Promise、Gernerator 函数的关系 +- Jafar Husain, [Asynchronous Generators for ES7](https://github.com/jhusain/asyncgenerator): Async 函数的深入讨论 +- Nolan Lawson, [Taming the asynchronous beast with ES7](http://pouchdb.com/2015/03/05/taming-the-async-beast-with-es7.html): async 函数通俗的实例讲解 +- Jafar Husain, [Async Generators](https://docs.google.com/file/d/0B4PVbLpUIdzoMDR5dWstRllXblU/view?sle=true): 对 async 与 Generator 混合使用的一些讨论 +- Daniel Brain, [Understand promises before you start using async/await](https://medium.com/@bluepnume/learn-about-promises-before-you-start-using-async-await-eb148164a9c8): 讨论 async/await 与 Promise 的关系 +- Jake Archibald, [Async functions - making promises friendly](https://developers.google.com/web/fundamentals/getting-started/primers/async-functions) +- Axel Rauschmayer, [ES proposal: asynchronous iteration](http://www.2ality.com/2016/10/asynchronous-iteration.html): 异步遍历器的详细介绍 +- Dima Grossman, [How to write async await without try-catch blocks in JavaScript](http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/): 除了 try/catch 以外的 async 函数内部捕捉错误的方法 +- Mostafa Gaafa, [6 Reasons Why JavaScript’s Async/Await Blows Promises Away](https://hackernoon.com/6-reasons-why-javascripts-async-await-blows-promises-away-tutorial-c7ec10518dd9): Async 函数的6个好处 +- Mathias Bynens, [Asynchronous stack traces: why await beats Promise#then()](https://mathiasbynens.be/notes/async-stack-traces): async 函数可以保留错误堆栈 + +## Class + +- Sebastian Porto, [ES6 classes and JavaScript prototypes](https://reinteractive.net/posts/235-es6-classes-and-javascript-prototypes): ES6 Class 的写法与 ES5 Prototype 的写法对比 +- Jack Franklin, [An introduction to ES6 classes](http://javascriptplayground.com/blog/2014/07/introduction-to-es6-classes-tutorial/): ES6 class 的入门介绍 +- Axel Rauschmayer, [ECMAScript 6: new OOP features besides classes](http://www.2ality.com/2014/12/es6-oop.html) +- Axel Rauschmayer, [Classes in ECMAScript 6 (final semantics)](http://www.2ality.com/2015/02/es6-classes-final.html): Class 语法的详细介绍和设计思想分析 +- Eric Faust, [ES6 In Depth: Subclassing](https://hacks.mozilla.org/2015/08/es6-in-depth-subclassing/): Class 语法的深入介绍 +- Nicolás Bevacqua, [Binding Methods to Class Instance Objects](https://ponyfoo.com/articles/binding-methods-to-class-instance-objects): 如何绑定类的实例中的 this +- Jamie Kyle, [JavaScript's new #private class fields](https://jamie.build/javascripts-new-private-class-fields.html):私有属性的介绍。 +- Mathias Bynens, [Public and private class fields](https://developers.google.com/web/updates/2018/12/class-fields):实例属性的新写法的介绍。 + +## Decorator + +- Maximiliano Fierro, [Declarative vs Imperative](http://elmasse.github.io/js/decorators-bindings-es7.html): Decorators 和 Mixin 介绍 +- Justin Fagnani, ["Real" Mixins with JavaScript Classes](http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/): 使用类的继承实现 Mixin +- Addy Osmani, [Exploring ES2016 Decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841): Decorator 的深入介绍 +- Sebastian McKenzie, [Allow decorators for functions as well](https://github.com/wycats/javascript-decorators/issues/4): 为什么修饰器不能用于函数 +- Maximiliano Fierro, [Traits with ES7 Decorators](http://cocktailjs.github.io/blog/traits-with-es7-decorators.html): Trait 的用法介绍 +- Jonathan Creamer: [Using ES2016 Decorators to Publish on an Event Bus](http://jonathancreamer.com/using-es2016-decorators-to-publish-on-an-event-bus/): 使用修饰器实现自动发布事件 + +## Module + +- Jack Franklin, [JavaScript Modules the ES6 Way](http://24ways.org/2014/javascript-modules-the-es6-way/): ES6 模块入门 +- Axel Rauschmayer, [ECMAScript 6 modules: the final syntax](http://www.2ality.com/2014/09/es6-modules-final.html): ES6 模块的介绍,以及与 CommonJS 规格的详细比较 +- Dave Herman, [Static module resolution](http://calculist.org/blog/2012/06/29/static-module-resolution/): ES6 模块的静态化设计思想 +- Jason Orendorff, [ES6 In Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/): ES6 模块设计思想的介绍 +- Ben Newman, [The Importance of import and export](http://benjamn.github.io/empirenode-2015/#/): ES6 模块的设计思想 +- ESDiscuss, [Why is "export default var a = 1;" invalid syntax?](https://esdiscuss.org/topic/why-is-export-default-var-a-1-invalid-syntax) +- Bradley Meck, [ES6 Module Interoperability](https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md): 介绍 Node 如何处理 ES6 语法加载 CommonJS 模块 +- Axel Rauschmayer, [Making transpiled ES modules more spec-compliant](http://www.2ality.com/2017/01/babel-esm-spec-mode.html): ES6 模块编译成 CommonJS 模块的详细介绍 +- Axel Rauschmayer, [ES proposal: import() – dynamically importing ES modules](http://www.2ality.com/2017/01/import-operator.html): import() 的用法 +- Node EPS, [ES Module Interoperability](https://github.com/nodejs/node-eps/blob/master/002-es-modules.md): Node 对 ES6 模块的处理规格 + +## 二进制数组 + +- Ilmari Heikkinen, [Typed Arrays: Binary Data in the Browser](http://www.html5rocks.com/en/tutorials/webgl/typed_arrays/) +- Khronos, [Typed Array Specification](http://www.khronos.org/registry/typedarray/specs/latest/) +- Ian Elliot, [Reading A BMP File In JavaScript](http://www.i-programmer.info/projects/36-web/6234-reading-a-bmp-file-in-javascript.html) +- Renato Mangini, [How to convert ArrayBuffer to and from String](http://updates.html5rocks.com/2012/06/How-to-convert-ArrayBuffer-to-and-from-String) +- Axel Rauschmayer, [Typed Arrays in ECMAScript 6](http://www.2ality.com/2015/09/typed-arrays.html) +- Axel Rauschmayer, [ES proposal: Shared memory and atomics](http://2ality.com/2017/01/shared-array-buffer.html) +- Lin Clark, [Avoiding race conditions in SharedArrayBuffers with Atomics](https://hacks.mozilla.org/2017/06/avoiding-race-conditions-in-sharedarraybuffers-with-atomics/): Atomics 对象使用场景的解释 +- Lars T Hansen, [Shared memory - a brief tutorial](https://github.com/tc39/ecmascript_sharedmem/blob/master/TUTORIAL.md) +- James Milner, [The Return of SharedArrayBuffers and Atomics](https://www.sitepen.com/blog/2018/09/19/the-return-of-sharedarraybuffers-and-atomics/) + +## SIMD + +- TC39, [SIMD.js Stage 2](https://docs.google.com/presentation/d/1MY9NHrHmL7ma7C8dyNXvmYNNGgVmmxXk8ZIiQtPlfH4/edit#slide=id.p19) +- MDN, [SIMD](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SIMD) +- TC39, [ECMAScript SIMD](https://github.com/tc39/ecmascript_simd) +- Axel Rauschmayer, [JavaScript gains support for SIMD](http://www.2ality.com/2013/12/simd-js.html) + +## 工具 + +- Babel, [Babel Handbook](https://github.com/thejameskyle/babel-handbook/tree/master/translations/en): Babel 的用法介绍 +- Google, [traceur-compiler](https://github.com/google/traceur-compiler): Traceur 编译器 +- Casper Beyer, [ECMAScript 6 Features and Tools](http://caspervonb.github.io/2014/03/05/ecmascript6-features-and-tools.html) +- Stoyan Stefanov, [Writing ES6 today with jstransform](http://www.phpied.com/writing-es6-today-with-jstransform/) +- ES6 Module Loader, [ES6 Module Loader Polyfill](https://github.com/ModuleLoader/es6-module-loader): 在浏览器和 node.js 加载 ES6 模块的一个库,文档里对 ES6 模块有详细解释 +- Paul Miller, [es6-shim](https://github.com/paulmillr/es6-shim): 一个针对老式浏览器,模拟 ES6 部分功能的垫片库(shim) +- army8735, [JavaScript Downcast](https://github.com/army8735/jsdc): 国产的 ES6 到 ES5 的转码器 +- esnext, [ES6 Module Transpiler](https://github.com/esnext/es6-module-transpiler):基于 node.js 的将 ES6 模块转为 ES5 代码的命令行工具 +- Sebastian McKenzie, [BabelJS](http://babeljs.io/): ES6 转译器 +- SystemJS, [SystemJS](https://github.com/systemjs/systemjs): 在浏览器中加载 AMD、CJS、ES6 模块的一个垫片库 +- Modernizr, [HTML5 Cross Browser Polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#ecmascript-6-harmony): ES6 垫片库清单 +- Facebook, [regenerator](https://github.com/facebook/regenerator): 将 Generator 函数转为 ES5 的转码器 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reflect.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reflect.md" old mode 100644 new mode 100755 similarity index 79% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reflect.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reflect.md" index ed9b028bd..0af5a1df6 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/reflect.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/reflect.md" @@ -42,7 +42,7 @@ Proxy(target, { set: function(target, name, value, receiver) { var success = Reflect.set(target,name, value, receiver); if (success) { - log('property ' + name + ' on ' + target + ' set to ' + value); + console.log('property ' + name + ' on ' + target + ' set to ' + value); } return success; } @@ -84,15 +84,15 @@ Reflect.apply(Math.floor, undefined, [1.75]) // 1 ## 静态方法 -`Reflect`对象一共有13个静态方法。 +`Reflect`对象一共有 13 个静态方法。 -- Reflect.apply(target,thisArg,args) -- Reflect.construct(target,args) -- Reflect.get(target,name,receiver) -- Reflect.set(target,name,value,receiver) -- Reflect.defineProperty(target,name,desc) -- Reflect.deleteProperty(target,name) -- Reflect.has(target,name) +- Reflect.apply(target, thisArg, args) +- Reflect.construct(target, args) +- Reflect.get(target, name, receiver) +- Reflect.set(target, name, value, receiver) +- Reflect.defineProperty(target, name, desc) +- Reflect.deleteProperty(target, name) +- Reflect.has(target, name) - Reflect.ownKeys(target) - Reflect.isExtensible(target) - Reflect.preventExtensions(target) @@ -186,6 +186,53 @@ myObject.foo // 4 myReceiverObject.foo // 1 ``` +注意,如果 `Proxy`对象和 `Reflect`对象联合使用,前者拦截赋值操作,后者完成赋值的默认行为,而且传入了`receiver`,那么`Reflect.set`会触发`Proxy.defineProperty`拦截。 + +```javascript +let p = { + a: 'a' +}; + +let handler = { + set(target, key, value, receiver) { + console.log('set'); + Reflect.set(target, key, value, receiver) + }, + defineProperty(target, key, attribute) { + console.log('defineProperty'); + Reflect.defineProperty(target, key, attribute); + } +}; + +let obj = new Proxy(p, handler); +obj.a = 'A'; +// set +// defineProperty +``` + +上面代码中,`Proxy.set`拦截里面使用了`Reflect.set`,而且传入了`receiver`,导致触发`Proxy.defineProperty`拦截。这是因为`Proxy.set`的`receiver`参数总是指向当前的 `Proxy`实例(即上例的`obj`),而`Reflect.set`一旦传入`receiver`,就会将属性赋值到`receiver`上面(即`obj`),导致触发`defineProperty`拦截。如果`Reflect.set`没有传入`receiver`,那么就不会触发`defineProperty`拦截。 + +```javascript +let p = { + a: 'a' +}; + +let handler = { + set(target, key, value, receiver) { + console.log('set'); + Reflect.set(target, key, value) + }, + defineProperty(target, key, attribute) { + console.log('defineProperty'); + Reflect.defineProperty(target, key, attribute); + } +}; + +let obj = new Proxy(p, handler); +obj.a = 'A'; +// set +``` + 如果第一个参数不是对象,`Reflect.set`会报错。 ```javascript @@ -266,16 +313,27 @@ Reflect.getPrototypeOf(1) // 报错 ### Reflect.setPrototypeOf(obj, newProto) -`Reflect.setPrototypeOf`方法用于设置对象的`__proto__`属性,返回第一个参数对象,对应`Object.setPrototypeOf(obj, newProto)`。 +`Reflect.setPrototypeOf`方法用于设置目标对象的原型(prototype),对应`Object.setPrototypeOf(obj, newProto)`方法。它返回一个布尔值,表示是否设置成功。 ```javascript -const myObj = new FancyThing(); +const myObj = {}; // 旧写法 -Object.setPrototypeOf(myObj, OtherThing.prototype); +Object.setPrototypeOf(myObj, Array.prototype); // 新写法 -Reflect.setPrototypeOf(myObj, OtherThing.prototype); +Reflect.setPrototypeOf(myObj, Array.prototype); + +myObj.length // 0 +``` + +如果无法设置目标对象的原型(比如,目标对象禁止扩展),`Reflect.setPrototypeOf`方法返回`false`。 + +```javascript +Reflect.setPrototypeOf({}, null) +// true +Reflect.setPrototypeOf(Object.freeze({}), null) +// false ``` 如果第一个参数不是对象,`Object.setPrototypeOf`会返回第一个参数本身,而`Reflect.setPrototypeOf`会报错。 @@ -315,7 +373,7 @@ const type = Object.prototype.toString.call(youngest); // 新写法 const youngest = Reflect.apply(Math.min, Math, ages); const oldest = Reflect.apply(Math.max, Math, ages); -const type = Reflect.apply(Object.prototype.toString, youngest); +const type = Reflect.apply(Object.prototype.toString, youngest, []); ``` ### Reflect.defineProperty(target, propertyKey, attributes) @@ -329,17 +387,35 @@ function MyDate() { // 旧写法 Object.defineProperty(MyDate, 'now', { - value: () => new Date.now() + value: () => Date.now() }); // 新写法 Reflect.defineProperty(MyDate, 'now', { - value: () => new Date.now() + value: () => Date.now() }); ``` 如果`Reflect.defineProperty`的第一个参数不是对象,就会抛出错误,比如`Reflect.defineProperty(1, 'foo')`。 +这个方法可以与`Proxy.defineProperty`配合使用。 + +```javascript +const p = new Proxy({}, { + defineProperty(target, prop, descriptor) { + console.log(descriptor); + return Reflect.defineProperty(target, prop, descriptor); + } +}); + +p.foo = 'bar'; +// {value: "bar", writable: true, enumerable: true, configurable: true} + +p.foo // "bar" +``` + +上面代码中,`Proxy.defineProperty`对属性赋值设置了拦截,然后使用`Reflect.defineProperty`完成了赋值。 + ### Reflect.getOwnPropertyDescriptor(target, propertyKey) `Reflect.getOwnPropertyDescriptor`基本等同于`Object.getOwnPropertyDescriptor`,用于得到指定属性的描述对象,将来会替代掉后者。 @@ -389,19 +465,19 @@ Reflect.isExtensible(1) // 报错 var myObject = {}; // 旧写法 -Object.isExtensible(myObject) // true +Object.preventExtensions(myObject) // Object {} // 新写法 Reflect.preventExtensions(myObject) // true ``` -如果参数不是对象,`Object.isExtensible`在 ES5 环境报错,在 ES6 环境返回这个参数,而`Reflect.preventExtensions`会报错。 +如果参数不是对象,`Object.preventExtensions`在 ES5 环境报错,在 ES6 环境返回传入的参数,而`Reflect.preventExtensions`会报错。 ```javascript -// ES5 +// ES5 环境 Object.preventExtensions(1) // 报错 -// ES6 +// ES6 环境 Object.preventExtensions(1) // 1 // 新写法 @@ -425,11 +501,11 @@ Object.getOwnPropertyNames(myObject) // ['foo', 'bar'] Object.getOwnPropertySymbols(myObject) -//[Symbol.for('baz'), Symbol.for('bing')] +//[Symbol(baz), Symbol(bing)] // 新写法 Reflect.ownKeys(myObject) -// ['foo', 'bar', Symbol.for('baz'), Symbol.for('bing')] +// ['foo', 'bar', Symbol(baz), Symbol(bing)] ``` ## 实例:使用 Proxy 实现观察者模式 @@ -470,4 +546,3 @@ function set(target, key, value, receiver) { ``` 上面代码中,先定义了一个`Set`集合,所有观察者函数都放进这个集合。然后,`observable`函数返回原始对象的代理,拦截赋值操作。拦截函数`set`之中,会自动执行所有观察者。 - diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/regex.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/regex.md" new file mode 100755 index 000000000..9fa854fa2 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/regex.md" @@ -0,0 +1,636 @@ +# 正则的扩展 + +## RegExp 构造函数 + +在 ES5 中,`RegExp`构造函数的参数有两种情况。 + +第一种情况是,参数是字符串,这时第二个参数表示正则表达式的修饰符(flag)。 + +```javascript +var regex = new RegExp('xyz', 'i'); +// 等价于 +var regex = /xyz/i; +``` + +第二种情况是,参数是一个正则表示式,这时会返回一个原有正则表达式的拷贝。 + +```javascript +var regex = new RegExp(/xyz/i); +// 等价于 +var regex = /xyz/i; +``` + +但是,ES5 不允许此时使用第二个参数添加修饰符,否则会报错。 + +```javascript +var regex = new RegExp(/xyz/, 'i'); +// Uncaught TypeError: Cannot supply flags when constructing one RegExp from another +``` + +ES6 改变了这种行为。如果`RegExp`构造函数第一个参数是一个正则对象,那么可以使用第二个参数指定修饰符。而且,返回的正则表达式会忽略原有的正则表达式的修饰符,只使用新指定的修饰符。 + +```javascript +new RegExp(/abc/ig, 'i').flags +// "i" +``` + +上面代码中,原有正则对象的修饰符是`ig`,它会被第二个参数`i`覆盖。 + +## 字符串的正则方法 + +字符串对象共有 4 个方法,可以使用正则表达式:`match()`、`replace()`、`search()`和`split()`。 + +ES6 将这 4 个方法,在语言内部全部调用`RegExp`的实例方法,从而做到所有与正则相关的方法,全都定义在`RegExp`对象上。 + +- `String.prototype.match` 调用 `RegExp.prototype[Symbol.match]` +- `String.prototype.replace` 调用 `RegExp.prototype[Symbol.replace]` +- `String.prototype.search` 调用 `RegExp.prototype[Symbol.search]` +- `String.prototype.split` 调用 `RegExp.prototype[Symbol.split]` + +## u 修饰符 + +ES6 对正则表达式添加了`u`修饰符,含义为“Unicode 模式”,用来正确处理大于`\uFFFF`的 Unicode 字符。也就是说,会正确处理四个字节的 UTF-16 编码。 + +```javascript +/^\uD83D/u.test('\uD83D\uDC2A') // false +/^\uD83D/.test('\uD83D\uDC2A') // true +``` + +上面代码中,`\uD83D\uDC2A`是一个四个字节的 UTF-16 编码,代表一个字符。但是,ES5 不支持四个字节的 UTF-16 编码,会将其识别为两个字符,导致第二行代码结果为`true`。加了`u`修饰符以后,ES6 就会识别其为一个字符,所以第一行代码结果为`false`。 + +一旦加上`u`修饰符号,就会修改下面这些正则表达式的行为。 + +**(1)点字符** + +点(`.`)字符在正则表达式中,含义是除了换行符以外的任意单个字符。对于码点大于`0xFFFF`的 Unicode 字符,点字符不能识别,必须加上`u`修饰符。 + +```javascript +var s = '𠮷'; + +/^.$/.test(s) // false +/^.$/u.test(s) // true +``` + +上面代码表示,如果不添加`u`修饰符,正则表达式就会认为字符串为两个字符,从而匹配失败。 + +**(2)Unicode 字符表示法** + +ES6 新增了使用大括号表示 Unicode 字符,这种表示法在正则表达式中必须加上`u`修饰符,才能识别当中的大括号,否则会被解读为量词。 + +```javascript +/\u{61}/.test('a') // false +/\u{61}/u.test('a') // true +/\u{20BB7}/u.test('𠮷') // true +``` + +上面代码表示,如果不加`u`修饰符,正则表达式无法识别`\u{61}`这种表示法,只会认为这匹配 61 个连续的`u`。 + +**(3)量词** + +使用`u`修饰符后,所有量词都会正确识别码点大于`0xFFFF`的 Unicode 字符。 + +```javascript +/a{2}/.test('aa') // true +/a{2}/u.test('aa') // true +/𠮷{2}/.test('𠮷𠮷') // false +/𠮷{2}/u.test('𠮷𠮷') // true +``` + +**(4)预定义模式** + +`u`修饰符也影响到预定义模式,能否正确识别码点大于`0xFFFF`的 Unicode 字符。 + +```javascript +/^\S$/.test('𠮷') // false +/^\S$/u.test('𠮷') // true +``` + +上面代码的`\S`是预定义模式,匹配所有非空白字符。只有加了`u`修饰符,它才能正确匹配码点大于`0xFFFF`的 Unicode 字符。 + +利用这一点,可以写出一个正确返回字符串长度的函数。 + +```javascript +function codePointLength(text) { + var result = text.match(/[\s\S]/gu); + return result ? result.length : 0; +} + +var s = '𠮷𠮷'; + +s.length // 4 +codePointLength(s) // 2 +``` + +**(5)i 修饰符** + +有些 Unicode 字符的编码不同,但是字型很相近,比如,`\u004B`与`\u212A`都是大写的`K`。 + +```javascript +/[a-z]/i.test('\u212A') // false +/[a-z]/iu.test('\u212A') // true +``` + +上面代码中,不加`u`修饰符,就无法识别非规范的`K`字符。 + +## RegExp.prototype.unicode 属性 + +正则实例对象新增`unicode`属性,表示是否设置了`u`修饰符。 + +```javascript +const r1 = /hello/; +const r2 = /hello/u; + +r1.unicode // false +r2.unicode // true +``` + +上面代码中,正则表达式是否设置了`u`修饰符,可以从`unicode`属性看出来。 + +## y 修饰符 + +除了`u`修饰符,ES6 还为正则表达式添加了`y`修饰符,叫做“粘连”(sticky)修饰符。 + +`y`修饰符的作用与`g`修饰符类似,也是全局匹配,后一次匹配都从上一次匹配成功的下一个位置开始。不同之处在于,`g`修饰符只要剩余位置中存在匹配就可,而`y`修饰符确保匹配必须从剩余的第一个位置开始,这也就是“粘连”的涵义。 + +```javascript +var s = 'aaa_aa_a'; +var r1 = /a+/g; +var r2 = /a+/y; + +r1.exec(s) // ["aaa"] +r2.exec(s) // ["aaa"] + +r1.exec(s) // ["aa"] +r2.exec(s) // null +``` + +上面代码有两个正则表达式,一个使用`g`修饰符,另一个使用`y`修饰符。这两个正则表达式各执行了两次,第一次执行的时候,两者行为相同,剩余字符串都是`_aa_a`。由于`g`修饰没有位置要求,所以第二次执行会返回结果,而`y`修饰符要求匹配必须从头部开始,所以返回`null`。 + +如果改一下正则表达式,保证每次都能头部匹配,`y`修饰符就会返回结果了。 + +```javascript +var s = 'aaa_aa_a'; +var r = /a+_/y; + +r.exec(s) // ["aaa_"] +r.exec(s) // ["aa_"] +``` + +上面代码每次匹配,都是从剩余字符串的头部开始。 + +使用`lastIndex`属性,可以更好地说明`y`修饰符。 + +```javascript +const REGEX = /a/g; + +// 指定从2号位置(y)开始匹配 +REGEX.lastIndex = 2; + +// 匹配成功 +const match = REGEX.exec('xaya'); + +// 在3号位置匹配成功 +match.index // 3 + +// 下一次匹配从4号位开始 +REGEX.lastIndex // 4 + +// 4号位开始匹配失败 +REGEX.exec('xaya') // null +``` + +上面代码中,`lastIndex`属性指定每次搜索的开始位置,`g`修饰符从这个位置开始向后搜索,直到发现匹配为止。 + +`y`修饰符同样遵守`lastIndex`属性,但是要求必须在`lastIndex`指定的位置发现匹配。 + +```javascript +const REGEX = /a/y; + +// 指定从2号位置开始匹配 +REGEX.lastIndex = 2; + +// 不是粘连,匹配失败 +REGEX.exec('xaya') // null + +// 指定从3号位置开始匹配 +REGEX.lastIndex = 3; + +// 3号位置是粘连,匹配成功 +const match = REGEX.exec('xaya'); +match.index // 3 +REGEX.lastIndex // 4 +``` + +实际上,`y`修饰符号隐含了头部匹配的标志`^`。 + +```javascript +/b/y.exec('aba') +// null +``` + +上面代码由于不能保证头部匹配,所以返回`null`。`y`修饰符的设计本意,就是让头部匹配的标志`^`在全局匹配中都有效。 + +下面是字符串对象的`replace`方法的例子。 + +```javascript +const REGEX = /a/gy; +'aaxa'.replace(REGEX, '-') // '--xa' +``` + +上面代码中,最后一个`a`因为不是出现在下一次匹配的头部,所以不会被替换。 + +单单一个`y`修饰符对`match`方法,只能返回第一个匹配,必须与`g`修饰符联用,才能返回所有匹配。 + +```javascript +'a1a2a3'.match(/a\d/y) // ["a1"] +'a1a2a3'.match(/a\d/gy) // ["a1", "a2", "a3"] +``` + +`y`修饰符的一个应用,是从字符串提取 token(词元),`y`修饰符确保了匹配之间不会有漏掉的字符。 + +```javascript +const TOKEN_Y = /\s*(\+|[0-9]+)\s*/y; +const TOKEN_G = /\s*(\+|[0-9]+)\s*/g; + +tokenize(TOKEN_Y, '3 + 4') +// [ '3', '+', '4' ] +tokenize(TOKEN_G, '3 + 4') +// [ '3', '+', '4' ] + +function tokenize(TOKEN_REGEX, str) { + let result = []; + let match; + while (match = TOKEN_REGEX.exec(str)) { + result.push(match[1]); + } + return result; +} +``` + +上面代码中,如果字符串里面没有非法字符,`y`修饰符与`g`修饰符的提取结果是一样的。但是,一旦出现非法字符,两者的行为就不一样了。 + +```javascript +tokenize(TOKEN_Y, '3x + 4') +// [ '3' ] +tokenize(TOKEN_G, '3x + 4') +// [ '3', '+', '4' ] +``` + +上面代码中,`g`修饰符会忽略非法字符,而`y`修饰符不会,这样就很容易发现错误。 + +## RegExp.prototype.sticky 属性 + +与`y`修饰符相匹配,ES6 的正则实例对象多了`sticky`属性,表示是否设置了`y`修饰符。 + +```javascript +var r = /hello\d/y; +r.sticky // true +``` + +## RegExp.prototype.flags 属性 + +ES6 为正则表达式新增了`flags`属性,会返回正则表达式的修饰符。 + +```javascript +// ES5 的 source 属性 +// 返回正则表达式的正文 +/abc/ig.source +// "abc" + +// ES6 的 flags 属性 +// 返回正则表达式的修饰符 +/abc/ig.flags +// 'gi' +``` + +## s 修饰符:dotAll 模式 + +正则表达式中,点(`.`)是一个特殊字符,代表任意的单个字符,但是有两个例外。一个是四个字节的 UTF-16 字符,这个可以用`u`修饰符解决;另一个是行终止符(line terminator character)。 + +所谓行终止符,就是该字符表示一行的终结。以下四个字符属于“行终止符”。 + +- U+000A 换行符(`\n`) +- U+000D 回车符(`\r`) +- U+2028 行分隔符(line separator) +- U+2029 段分隔符(paragraph separator) + +```javascript +/foo.bar/.test('foo\nbar') +// false +``` + +上面代码中,因为`.`不匹配`\n`,所以正则表达式返回`false`。 + +但是,很多时候我们希望匹配的是任意单个字符,这时有一种变通的写法。 + +```javascript +/foo[^]bar/.test('foo\nbar') +// true +``` + +这种解决方案毕竟不太符合直觉,ES2018 [引入](https://github.com/tc39/proposal-regexp-dotall-flag)`s`修饰符,使得`.`可以匹配任意单个字符。 + +```javascript +/foo.bar/s.test('foo\nbar') // true +``` + +这被称为`dotAll`模式,即点(dot)代表一切字符。所以,正则表达式还引入了一个`dotAll`属性,返回一个布尔值,表示该正则表达式是否处在`dotAll`模式。 + +```javascript +const re = /foo.bar/s; +// 另一种写法 +// const re = new RegExp('foo.bar', 's'); + +re.test('foo\nbar') // true +re.dotAll // true +re.flags // 's' +``` + +`/s`修饰符和多行修饰符`/m`不冲突,两者一起使用的情况下,`.`匹配所有字符,而`^`和`$`匹配每一行的行首和行尾。 + +## 后行断言 + +JavaScript 语言的正则表达式,只支持先行断言(lookahead)和先行否定断言(negative lookahead),不支持后行断言(lookbehind)和后行否定断言(negative lookbehind)。ES2018 引入[后行断言](https://github.com/tc39/proposal-regexp-lookbehind),V8 引擎 4.9 版(Chrome 62)已经支持。 + +“先行断言”指的是,`x`只有在`y`前面才匹配,必须写成`/x(?=y)/`。比如,只匹配百分号之前的数字,要写成`/\d+(?=%)/`。“先行否定断言”指的是,`x`只有不在`y`前面才匹配,必须写成`/x(?!y)/`。比如,只匹配不在百分号之前的数字,要写成`/\d+(?!%)/`。 + +```javascript +/\d+(?=%)/.exec('100% of US presidents have been male') // ["100"] +/\d+(?!%)/.exec('that’s all 44 of them') // ["44"] +``` + +上面两个字符串,如果互换正则表达式,就不会得到相同结果。另外,还可以看到,“先行断言”括号之中的部分(`(?=%)`),是不计入返回结果的。 + +“后行断言”正好与“先行断言”相反,`x`只有在`y`后面才匹配,必须写成`/(?<=y)x/`。比如,只匹配美元符号之后的数字,要写成`/(?<=\$)\d+/`。“后行否定断言”则与“先行否定断言”相反,`x`只有不在`y`后面才匹配,必须写成`/(?<!y)x/`。比如,只匹配不在美元符号后面的数字,要写成`/(?<!\$)\d+/`。 + +```javascript +/(?<=\$)\d+/.exec('Benjamin Franklin is on the $100 bill') // ["100"] +/(?<!\$)\d+/.exec('it’s is worth about €90') // ["90"] +``` + +上面的例子中,“后行断言”的括号之中的部分(`(?<=\$)`),也是不计入返回结果。 + +下面的例子是使用后行断言进行字符串替换。 + +```javascript +const RE_DOLLAR_PREFIX = /(?<=\$)foo/g; +'$foo %foo foo'.replace(RE_DOLLAR_PREFIX, 'bar'); +// '$bar %foo foo' +``` + +上面代码中,只有在美元符号后面的`foo`才会被替换。 + +“后行断言”的实现,需要先匹配`/(?<=y)x/`的`x`,然后再回到左边,匹配`y`的部分。这种“先右后左”的执行顺序,与所有其他正则操作相反,导致了一些不符合预期的行为。 + +首先,后行断言的组匹配,与正常情况下结果是不一样的。 + +```javascript +/(?<=(\d+)(\d+))$/.exec('1053') // ["", "1", "053"] +/^(\d+)(\d+)$/.exec('1053') // ["1053", "105", "3"] +``` + +上面代码中,需要捕捉两个组匹配。没有“后行断言”时,第一个括号是贪婪模式,第二个括号只能捕获一个字符,所以结果是`105`和`3`。而“后行断言”时,由于执行顺序是从右到左,第二个括号是贪婪模式,第一个括号只能捕获一个字符,所以结果是`1`和`053`。 + +其次,“后行断言”的反斜杠引用,也与通常的顺序相反,必须放在对应的那个括号之前。 + +```javascript +/(?<=(o)d\1)r/.exec('hodor') // null +/(?<=\1d(o))r/.exec('hodor') // ["r", "o"] +``` + +上面代码中,如果后行断言的反斜杠引用(`\1`)放在括号的后面,就不会得到匹配结果,必须放在前面才可以。因为后行断言是先从左到右扫描,发现匹配以后再回过头,从右到左完成反斜杠引用。 + +## Unicode 属性类 + +ES2018 [引入](https://github.com/tc39/proposal-regexp-unicode-property-escapes)了一种新的类的写法`\p{...}`和`\P{...}`,允许正则表达式匹配符合 Unicode 某种属性的所有字符。 + +```javascript +const regexGreekSymbol = /\p{Script=Greek}/u; +regexGreekSymbol.test('π') // true +``` + +上面代码中,`\p{Script=Greek}`指定匹配一个希腊文字母,所以匹配`π`成功。 + +Unicode 属性类要指定属性名和属性值。 + +```javascript +\p{UnicodePropertyName=UnicodePropertyValue} +``` + +对于某些属性,可以只写属性名,或者只写属性值。 + +```javascript +\p{UnicodePropertyName} +\p{UnicodePropertyValue} +``` + +`\P{…}`是`\p{…}`的反向匹配,即匹配不满足条件的字符。 + +注意,这两种类只对 Unicode 有效,所以使用的时候一定要加上`u`修饰符。如果不加`u`修饰符,正则表达式使用`\p`和`\P`会报错,ECMAScript 预留了这两个类。 + +由于 Unicode 的各种属性非常多,所以这种新的类的表达能力非常强。 + +```javascript +const regex = /^\p{Decimal_Number}+$/u; +regex.test('𝟏𝟐𝟑𝟜𝟝𝟞𝟩𝟪𝟫𝟬𝟭𝟮𝟯𝟺𝟻𝟼') // true +``` + +上面代码中,属性类指定匹配所有十进制字符,可以看到各种字型的十进制字符都会匹配成功。 + +`\p{Number}`甚至能匹配罗马数字。 + +```javascript +// 匹配所有数字 +const regex = /^\p{Number}+$/u; +regex.test('²³¹¼½¾') // true +regex.test('㉛㉜㉝') // true +regex.test('ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ') // true +``` + +下面是其他一些例子。 + +```javascript +// 匹配所有空格 +\p{White_Space} + +// 匹配各种文字的所有字母,等同于 Unicode 版的 \w +[\p{Alphabetic}\p{Mark}\p{Decimal_Number}\p{Connector_Punctuation}\p{Join_Control}] + +// 匹配各种文字的所有非字母的字符,等同于 Unicode 版的 \W +[^\p{Alphabetic}\p{Mark}\p{Decimal_Number}\p{Connector_Punctuation}\p{Join_Control}] + +// 匹配 Emoji +/\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu + +// 匹配所有的箭头字符 +const regexArrows = /^\p{Block=Arrows}+$/u; +regexArrows.test('←↑→↓↔↕↖↗↘↙⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇧⇩') // true +``` + +## 具名组匹配 + +### 简介 + +正则表达式使用圆括号进行组匹配。 + +```javascript +const RE_DATE = /(\d{4})-(\d{2})-(\d{2})/; +``` + +上面代码中,正则表达式里面有三组圆括号。使用`exec`方法,就可以将这三组匹配结果提取出来。 + +```javascript +const RE_DATE = /(\d{4})-(\d{2})-(\d{2})/; + +const matchObj = RE_DATE.exec('1999-12-31'); +const year = matchObj[1]; // 1999 +const month = matchObj[2]; // 12 +const day = matchObj[3]; // 31 +``` + +组匹配的一个问题是,每一组的匹配含义不容易看出来,而且只能用数字序号(比如`matchObj[1]`)引用,要是组的顺序变了,引用的时候就必须修改序号。 + +ES2018 引入了[具名组匹配](https://github.com/tc39/proposal-regexp-named-groups)(Named Capture Groups),允许为每一个组匹配指定一个名字,既便于阅读代码,又便于引用。 + +```javascript +const RE_DATE = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/; + +const matchObj = RE_DATE.exec('1999-12-31'); +const year = matchObj.groups.year; // 1999 +const month = matchObj.groups.month; // 12 +const day = matchObj.groups.day; // 31 +``` + +上面代码中,“具名组匹配”在圆括号内部,模式的头部添加“问号 + 尖括号 + 组名”(`?<year>`),然后就可以在`exec`方法返回结果的`groups`属性上引用该组名。同时,数字序号(`matchObj[1]`)依然有效。 + +具名组匹配等于为每一组匹配加上了 ID,便于描述匹配的目的。如果组的顺序变了,也不用改变匹配后的处理代码。 + +如果具名组没有匹配,那么对应的`groups`对象属性会是`undefined`。 + +```javascript +const RE_OPT_A = /^(?<as>a+)?$/; +const matchObj = RE_OPT_A.exec(''); + +matchObj.groups.as // undefined +'as' in matchObj.groups // true +``` + +上面代码中,具名组`as`没有找到匹配,那么`matchObj.groups.as`属性值就是`undefined`,并且`as`这个键名在`groups`是始终存在的。 + +### 解构赋值和替换 + +有了具名组匹配以后,可以使用解构赋值直接从匹配结果上为变量赋值。 + +```javascript +let {groups: {one, two}} = /^(?<one>.*):(?<two>.*)$/u.exec('foo:bar'); +one // foo +two // bar +``` + +字符串替换时,使用`$<组名>`引用具名组。 + +```javascript +let re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/u; + +'2015-01-02'.replace(re, '$<day>/$<month>/$<year>') +// '02/01/2015' +``` + +上面代码中,`replace`方法的第二个参数是一个字符串,而不是正则表达式。 + +`replace`方法的第二个参数也可以是函数,该函数的参数序列如下。 + +```javascript +'2015-01-02'.replace(re, ( + matched, // 整个匹配结果 2015-01-02 + capture1, // 第一个组匹配 2015 + capture2, // 第二个组匹配 01 + capture3, // 第三个组匹配 02 + position, // 匹配开始的位置 0 + S, // 原字符串 2015-01-02 + groups // 具名组构成的一个对象 {year, month, day} + ) => { + let {day, month, year} = groups; + return `${day}/${month}/${year}`; +}); +``` + +具名组匹配在原来的基础上,新增了最后一个函数参数:具名组构成的一个对象。函数内部可以直接对这个对象进行解构赋值。 + +### 引用 + +如果要在正则表达式内部引用某个“具名组匹配”,可以使用`\k<组名>`的写法。 + +```javascript +const RE_TWICE = /^(?<word>[a-z]+)!\k<word>$/; +RE_TWICE.test('abc!abc') // true +RE_TWICE.test('abc!ab') // false +``` + +数字引用(`\1`)依然有效。 + +```javascript +const RE_TWICE = /^(?<word>[a-z]+)!\1$/; +RE_TWICE.test('abc!abc') // true +RE_TWICE.test('abc!ab') // false +``` + +这两种引用语法还可以同时使用。 + +```javascript +const RE_TWICE = /^(?<word>[a-z]+)!\k<word>!\1$/; +RE_TWICE.test('abc!abc!abc') // true +RE_TWICE.test('abc!abc!ab') // false +``` + +## String.prototype.matchAll + +如果一个正则表达式在字符串里面有多个匹配,现在一般使用`g`修饰符或`y`修饰符,在循环里面逐一取出。 + +```javascript +var regex = /t(e)(st(\d?))/g; +var string = 'test1test2test3'; + +var matches = []; +var match; +while (match = regex.exec(string)) { + matches.push(match); +} + +matches +// [ +// ["test1", "e", "st1", "1", index: 0, input: "test1test2test3"], +// ["test2", "e", "st2", "2", index: 5, input: "test1test2test3"], +// ["test3", "e", "st3", "3", index: 10, input: "test1test2test3"] +// ] +``` + +上面代码中,`while`循环取出每一轮的正则匹配,一共三轮。 + +目前有一个[提案](https://github.com/tc39/proposal-string-matchall),增加了`String.prototype.matchAll`方法,可以一次性取出所有匹配。不过,它返回的是一个遍历器(Iterator),而不是数组。 + +```javascript +const string = 'test1test2test3'; + +// g 修饰符加不加都可以 +const regex = /t(e)(st(\d?))/g; + +for (const match of string.matchAll(regex)) { + console.log(match); +} +// ["test1", "e", "st1", "1", index: 0, input: "test1test2test3"] +// ["test2", "e", "st2", "2", index: 5, input: "test1test2test3"] +// ["test3", "e", "st3", "3", index: 10, input: "test1test2test3"] +``` + +上面代码中,由于`string.matchAll(regex)`返回的是遍历器,所以可以用`for...of`循环取出。相对于返回数组,返回遍历器的好处在于,如果匹配结果是一个很大的数组,那么遍历器比较节省资源。 + +遍历器转为数组是非常简单的,使用`...`运算符和`Array.from`方法就可以了。 + +```javascript +// 转为数组方法一 +[...string.matchAll(regex)] + +// 转为数组方法二 +Array.from(string.matchAll(regex)); +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/set-map.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/set-map.md" new file mode 100755 index 000000000..29afcc7da --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/set-map.md" @@ -0,0 +1,1128 @@ +# Set 和 Map 数据结构 + +## Set + +### 基本用法 + +ES6 提供了新的数据结构 Set。它类似于数组,但是成员的值都是唯一的,没有重复的值。 + +`Set`本身是一个构造函数,用来生成 Set 数据结构。 + +```javascript +const s = new Set(); + +[2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); + +for (let i of s) { + console.log(i); +} +// 2 3 5 4 +``` + +上面代码通过`add()`方法向 Set 结构加入成员,结果表明 Set 结构不会添加重复的值。 + +`Set`函数可以接受一个数组(或者具有 iterable 接口的其他数据结构)作为参数,用来初始化。 + +```javascript +// 例一 +const set = new Set([1, 2, 3, 4, 4]); +[...set] +// [1, 2, 3, 4] + +// 例二 +const items = new Set([1, 2, 3, 4, 5, 5, 5, 5]); +items.size // 5 + +// 例三 +const set = new Set(document.querySelectorAll('div')); +set.size // 56 + +// 类似于 +const set = new Set(); +document + .querySelectorAll('div') + .forEach(div => set.add(div)); +set.size // 56 +``` + +上面代码中,例一和例二都是`Set`函数接受数组作为参数,例三是接受类似数组的对象作为参数。 + +上面代码也展示了一种去除数组重复成员的方法。 + +```javascript +// 去除数组的重复成员 +[...new Set(array)] +``` + +上面的方法也可以用于,去除字符串里面的重复字符。 + +```javascript +[...new Set('ababbc')].join('') +// "abc" +``` + +向 Set 加入值的时候,不会发生类型转换,所以`5`和`"5"`是两个不同的值。Set 内部判断两个值是否不同,使用的算法叫做“Same-value-zero equality”,它类似于精确相等运算符(`===`),主要的区别是`NaN`等于自身,而精确相等运算符认为`NaN`不等于自身。 + +```javascript +let set = new Set(); +let a = NaN; +let b = NaN; +set.add(a); +set.add(b); +set // Set {NaN} +``` + +上面代码向 Set 实例添加了两个`NaN`,但是只能加入一个。这表明,在 Set 内部,两个`NaN`是相等。 + +另外,两个对象总是不相等的。 + +```javascript +let set = new Set(); + +set.add({}); +set.size // 1 + +set.add({}); +set.size // 2 +``` + +上面代码表示,由于两个空对象不相等,所以它们被视为两个值。 + +### Set 实例的属性和方法 + +Set 结构的实例有以下属性。 + +- `Set.prototype.constructor`:构造函数,默认就是`Set`函数。 +- `Set.prototype.size`:返回`Set`实例的成员总数。 + +Set 实例的方法分为两大类:操作方法(用于操作数据)和遍历方法(用于遍历成员)。下面先介绍四个操作方法。 + +- `add(value)`:添加某个值,返回 Set 结构本身。 +- `delete(value)`:删除某个值,返回一个布尔值,表示删除是否成功。 +- `has(value)`:返回一个布尔值,表示该值是否为`Set`的成员。 +- `clear()`:清除所有成员,没有返回值。 + +上面这些属性和方法的实例如下。 + +```javascript +s.add(1).add(2).add(2); +// 注意2被加入了两次 + +s.size // 2 + +s.has(1) // true +s.has(2) // true +s.has(3) // false + +s.delete(2); +s.has(2) // false +``` + +下面是一个对比,看看在判断是否包括一个键上面,`Object`结构和`Set`结构的写法不同。 + +```javascript +// 对象的写法 +const properties = { + 'width': 1, + 'height': 1 +}; + +if (properties[someName]) { + // do something +} + +// Set的写法 +const properties = new Set(); + +properties.add('width'); +properties.add('height'); + +if (properties.has(someName)) { + // do something +} +``` + +`Array.from`方法可以将 Set 结构转为数组。 + +```javascript +const items = new Set([1, 2, 3, 4, 5]); +const array = Array.from(items); +``` + +这就提供了去除数组重复成员的另一种方法。 + +```javascript +function dedupe(array) { + return Array.from(new Set(array)); +} + +dedupe([1, 1, 2, 3]) // [1, 2, 3] +``` + +### 遍历操作 + +Set 结构的实例有四个遍历方法,可以用于遍历成员。 + +- `keys()`:返回键名的遍历器 +- `values()`:返回键值的遍历器 +- `entries()`:返回键值对的遍历器 +- `forEach()`:使用回调函数遍历每个成员 + +需要特别指出的是,`Set`的遍历顺序就是插入顺序。这个特性有时非常有用,比如使用 Set 保存一个回调函数列表,调用时就能保证按照添加顺序调用。 + +**(1)`keys()`,`values()`,`entries()`** + +`keys`方法、`values`方法、`entries`方法返回的都是遍历器对象(详见《Iterator 对象》一章)。由于 Set 结构没有键名,只有键值(或者说键名和键值是同一个值),所以`keys`方法和`values`方法的行为完全一致。 + +```javascript +let set = new Set(['red', 'green', 'blue']); + +for (let item of set.keys()) { + console.log(item); +} +// red +// green +// blue + +for (let item of set.values()) { + console.log(item); +} +// red +// green +// blue + +for (let item of set.entries()) { + console.log(item); +} +// ["red", "red"] +// ["green", "green"] +// ["blue", "blue"] +``` + +上面代码中,`entries`方法返回的遍历器,同时包括键名和键值,所以每次输出一个数组,它的两个成员完全相等。 + +Set 结构的实例默认可遍历,它的默认遍历器生成函数就是它的`values`方法。 + +```javascript +Set.prototype[Symbol.iterator] === Set.prototype.values +// true +``` + +这意味着,可以省略`values`方法,直接用`for...of`循环遍历 Set。 + +```javascript +let set = new Set(['red', 'green', 'blue']); + +for (let x of set) { + console.log(x); +} +// red +// green +// blue +``` + +**(2)`forEach()`** + +Set 结构的实例与数组一样,也拥有`forEach`方法,用于对每个成员执行某种操作,没有返回值。 + +```javascript +let set = new Set([1, 4, 9]); +set.forEach((value, key) => console.log(key + ' : ' + value)) +// 1 : 1 +// 4 : 4 +// 9 : 9 +``` + +上面代码说明,`forEach`方法的参数就是一个处理函数。该函数的参数与数组的`forEach`一致,依次为键值、键名、集合本身(上例省略了该参数)。这里需要注意,Set 结构的键名就是键值(两者是同一个值),因此第一个参数与第二个参数的值永远都是一样的。 + +另外,`forEach`方法还可以有第二个参数,表示绑定处理函数内部的`this`对象。 + +**(3)遍历的应用** + +扩展运算符(`...`)内部使用`for...of`循环,所以也可以用于 Set 结构。 + +```javascript +let set = new Set(['red', 'green', 'blue']); +let arr = [...set]; +// ['red', 'green', 'blue'] +``` + +扩展运算符和 Set 结构相结合,就可以去除数组的重复成员。 + +```javascript +let arr = [3, 5, 2, 2, 5, 5]; +let unique = [...new Set(arr)]; +// [3, 5, 2] +``` + +而且,数组的`map`和`filter`方法也可以间接用于 Set 了。 + +```javascript +let set = new Set([1, 2, 3]); +set = new Set([...set].map(x => x * 2)); +// 返回Set结构:{2, 4, 6} + +let set = new Set([1, 2, 3, 4, 5]); +set = new Set([...set].filter(x => (x % 2) == 0)); +// 返回Set结构:{2, 4} +``` + +因此使用 Set 可以很容易地实现并集(Union)、交集(Intersect)和差集(Difference)。 + +```javascript +let a = new Set([1, 2, 3]); +let b = new Set([4, 3, 2]); + +// 并集 +let union = new Set([...a, ...b]); +// Set {1, 2, 3, 4} + +// 交集 +let intersect = new Set([...a].filter(x => b.has(x))); +// set {2, 3} + +// 差集 +let difference = new Set([...a].filter(x => !b.has(x))); +// Set {1} +``` + +如果想在遍历操作中,同步改变原来的 Set 结构,目前没有直接的方法,但有两种变通方法。一种是利用原 Set 结构映射出一个新的结构,然后赋值给原来的 Set 结构;另一种是利用`Array.from`方法。 + +```javascript +// 方法一 +let set = new Set([1, 2, 3]); +set = new Set([...set].map(val => val * 2)); +// set的值是2, 4, 6 + +// 方法二 +let set = new Set([1, 2, 3]); +set = new Set(Array.from(set, val => val * 2)); +// set的值是2, 4, 6 +``` + +上面代码提供了两种方法,直接在遍历操作中改变原来的 Set 结构。 + +## WeakSet + +### 含义 + +WeakSet 结构与 Set 类似,也是不重复的值的集合。但是,它与 Set 有两个区别。 + +首先,WeakSet 的成员只能是对象,而不能是其他类型的值。 + +```javascript +const ws = new WeakSet(); +ws.add(1) +// TypeError: Invalid value used in weak set +ws.add(Symbol()) +// TypeError: invalid value used in weak set +``` + +上面代码试图向 WeakSet 添加一个数值和`Symbol`值,结果报错,因为 WeakSet 只能放置对象。 + +其次,WeakSet 中的对象都是弱引用,即垃圾回收机制不考虑 WeakSet 对该对象的引用,也就是说,如果其他对象都不再引用该对象,那么垃圾回收机制会自动回收该对象所占用的内存,不考虑该对象还存在于 WeakSet 之中。 + +这是因为垃圾回收机制依赖引用计数,如果一个值的引用次数不为`0`,垃圾回收机制就不会释放这块内存。结束使用该值之后,有时会忘记取消引用,导致内存无法释放,进而可能会引发内存泄漏。WeakSet 里面的引用,都不计入垃圾回收机制,所以就不存在这个问题。因此,WeakSet 适合临时存放一组对象,以及存放跟对象绑定的信息。只要这些对象在外部消失,它在 WeakSet 里面的引用就会自动消失。 + +由于上面这个特点,WeakSet 的成员是不适合引用的,因为它会随时消失。另外,由于 WeakSet 内部有多少个成员,取决于垃圾回收机制有没有运行,运行前后很可能成员个数是不一样的,而垃圾回收机制何时运行是不可预测的,因此 ES6 规定 WeakSet 不可遍历。 + +这些特点同样适用于本章后面要介绍的 WeakMap 结构。 + +### 语法 + +WeakSet 是一个构造函数,可以使用`new`命令,创建 WeakSet 数据结构。 + +```javascript +const ws = new WeakSet(); +``` + +作为构造函数,WeakSet 可以接受一个数组或类似数组的对象作为参数。(实际上,任何具有 Iterable 接口的对象,都可以作为 WeakSet 的参数。)该数组的所有成员,都会自动成为 WeakSet 实例对象的成员。 + +```javascript +const a = [[1, 2], [3, 4]]; +const ws = new WeakSet(a); +// WeakSet {[1, 2], [3, 4]} +``` + +上面代码中,`a`是一个数组,它有两个成员,也都是数组。将`a`作为 WeakSet 构造函数的参数,`a`的成员会自动成为 WeakSet 的成员。 + +注意,是`a`数组的成员成为 WeakSet 的成员,而不是`a`数组本身。这意味着,数组的成员只能是对象。 + +```javascript +const b = [3, 4]; +const ws = new WeakSet(b); +// Uncaught TypeError: Invalid value used in weak set(…) +``` + +上面代码中,数组`b`的成员不是对象,加入 WeaKSet 就会报错。 + +WeakSet 结构有以下三个方法。 + +- **WeakSet.prototype.add(value)**:向 WeakSet 实例添加一个新成员。 +- **WeakSet.prototype.delete(value)**:清除 WeakSet 实例的指定成员。 +- **WeakSet.prototype.has(value)**:返回一个布尔值,表示某个值是否在 WeakSet 实例之中。 + +下面是一个例子。 + +```javascript +const ws = new WeakSet(); +const obj = {}; +const foo = {}; + +ws.add(window); +ws.add(obj); + +ws.has(window); // true +ws.has(foo); // false + +ws.delete(window); +ws.has(window); // false +``` + +WeakSet 没有`size`属性,没有办法遍历它的成员。 + +```javascript +ws.size // undefined +ws.forEach // undefined + +ws.forEach(function(item){ console.log('WeakSet has ' + item)}) +// TypeError: undefined is not a function +``` + +上面代码试图获取`size`和`forEach`属性,结果都不能成功。 + +WeakSet 不能遍历,是因为成员都是弱引用,随时可能消失,遍历机制无法保证成员的存在,很可能刚刚遍历结束,成员就取不到了。WeakSet 的一个用处,是储存 DOM 节点,而不用担心这些节点从文档移除时,会引发内存泄漏。 + +下面是 WeakSet 的另一个例子。 + +```javascript +const foos = new WeakSet() +class Foo { + constructor() { + foos.add(this) + } + method () { + if (!foos.has(this)) { + throw new TypeError('Foo.prototype.method 只能在Foo的实例上调用!'); + } + } +} +``` + +上面代码保证了`Foo`的实例方法,只能在`Foo`的实例上调用。这里使用 WeakSet 的好处是,`foos`对实例的引用,不会被计入内存回收机制,所以删除实例的时候,不用考虑`foos`,也不会出现内存泄漏。 + +## Map + +### 含义和基本用法 + +JavaScript 的对象(Object),本质上是键值对的集合(Hash 结构),但是传统上只能用字符串当作键。这给它的使用带来了很大的限制。 + +```javascript +const data = {}; +const element = document.getElementById('myDiv'); + +data[element] = 'metadata'; +data['[object HTMLDivElement]'] // "metadata" +``` + +上面代码原意是将一个 DOM 节点作为对象`data`的键,但是由于对象只接受字符串作为键名,所以`element`被自动转为字符串`[object HTMLDivElement]`。 + +为了解决这个问题,ES6 提供了 Map 数据结构。它类似于对象,也是键值对的集合,但是“键”的范围不限于字符串,各种类型的值(包括对象)都可以当作键。也就是说,Object 结构提供了“字符串—值”的对应,Map 结构提供了“值—值”的对应,是一种更完善的 Hash 结构实现。如果你需要“键值对”的数据结构,Map 比 Object 更合适。 + +```javascript +const m = new Map(); +const o = {p: 'Hello World'}; + +m.set(o, 'content') +m.get(o) // "content" + +m.has(o) // true +m.delete(o) // true +m.has(o) // false +``` + +上面代码使用 Map 结构的`set`方法,将对象`o`当作`m`的一个键,然后又使用`get`方法读取这个键,接着使用`delete`方法删除了这个键。 + +上面的例子展示了如何向 Map 添加成员。作为构造函数,Map 也可以接受一个数组作为参数。该数组的成员是一个个表示键值对的数组。 + +```javascript +const map = new Map([ + ['name', '张三'], + ['title', 'Author'] +]); + +map.size // 2 +map.has('name') // true +map.get('name') // "张三" +map.has('title') // true +map.get('title') // "Author" +``` + +上面代码在新建 Map 实例时,就指定了两个键`name`和`title`。 + +`Map`构造函数接受数组作为参数,实际上执行的是下面的算法。 + +```javascript +const items = [ + ['name', '张三'], + ['title', 'Author'] +]; + +const map = new Map(); + +items.forEach( + ([key, value]) => map.set(key, value) +); +``` + +事实上,不仅仅是数组,任何具有 Iterator 接口、且每个成员都是一个双元素的数组的数据结构(详见《Iterator》一章)都可以当作`Map`构造函数的参数。这就是说,`Set`和`Map`都可以用来生成新的 Map。 + +```javascript +const set = new Set([ + ['foo', 1], + ['bar', 2] +]); +const m1 = new Map(set); +m1.get('foo') // 1 + +const m2 = new Map([['baz', 3]]); +const m3 = new Map(m2); +m3.get('baz') // 3 +``` + +上面代码中,我们分别使用 Set 对象和 Map 对象,当作`Map`构造函数的参数,结果都生成了新的 Map 对象。 + +如果对同一个键多次赋值,后面的值将覆盖前面的值。 + +```javascript +const map = new Map(); + +map +.set(1, 'aaa') +.set(1, 'bbb'); + +map.get(1) // "bbb" +``` + +上面代码对键`1`连续赋值两次,后一次的值覆盖前一次的值。 + +如果读取一个未知的键,则返回`undefined`。 + +```javascript +new Map().get('asfddfsasadf') +// undefined +``` + +注意,只有对同一个对象的引用,Map 结构才将其视为同一个键。这一点要非常小心。 + +```javascript +const map = new Map(); + +map.set(['a'], 555); +map.get(['a']) // undefined +``` + +上面代码的`set`和`get`方法,表面是针对同一个键,但实际上这是两个值,内存地址是不一样的,因此`get`方法无法读取该键,返回`undefined`。 + +同理,同样的值的两个实例,在 Map 结构中被视为两个键。 + +```javascript +const map = new Map(); + +const k1 = ['a']; +const k2 = ['a']; + +map +.set(k1, 111) +.set(k2, 222); + +map.get(k1) // 111 +map.get(k2) // 222 +``` + +上面代码中,变量`k1`和`k2`的值是一样的,但是它们在 Map 结构中被视为两个键。 + +由上可知,Map 的键实际上是跟内存地址绑定的,只要内存地址不一样,就视为两个键。这就解决了同名属性碰撞(clash)的问题,我们扩展别人的库的时候,如果使用对象作为键名,就不用担心自己的属性与原作者的属性同名。 + +如果 Map 的键是一个简单类型的值(数字、字符串、布尔值),则只要两个值严格相等,Map 将其视为一个键,比如`0`和`-0`就是一个键,布尔值`true`和字符串`true`则是两个不同的键。另外,`undefined`和`null`也是两个不同的键。虽然`NaN`不严格相等于自身,但 Map 将其视为同一个键。 + +```javascript +let map = new Map(); + +map.set(-0, 123); +map.get(+0) // 123 + +map.set(true, 1); +map.set('true', 2); +map.get(true) // 1 + +map.set(undefined, 3); +map.set(null, 4); +map.get(undefined) // 3 + +map.set(NaN, 123); +map.get(NaN) // 123 +``` + +### 实例的属性和操作方法 + +Map 结构的实例有以下属性和操作方法。 + +**(1)size 属性** + +`size`属性返回 Map 结构的成员总数。 + +```javascript +const map = new Map(); +map.set('foo', true); +map.set('bar', false); + +map.size // 2 +``` + +**(2)set(key, value)** + +`set`方法设置键名`key`对应的键值为`value`,然后返回整个 Map 结构。如果`key`已经有值,则键值会被更新,否则就新生成该键。 + +```javascript +const m = new Map(); + +m.set('edition', 6) // 键是字符串 +m.set(262, 'standard') // 键是数值 +m.set(undefined, 'nah') // 键是 undefined +``` + +`set`方法返回的是当前的`Map`对象,因此可以采用链式写法。 + +```javascript +let map = new Map() + .set(1, 'a') + .set(2, 'b') + .set(3, 'c'); +``` + +**(3)get(key)** + +`get`方法读取`key`对应的键值,如果找不到`key`,返回`undefined`。 + +```javascript +const m = new Map(); + +const hello = function() {console.log('hello');}; +m.set(hello, 'Hello ES6!') // 键是函数 + +m.get(hello) // Hello ES6! +``` + +**(4)has(key)** + +`has`方法返回一个布尔值,表示某个键是否在当前 Map 对象之中。 + +```javascript +const m = new Map(); + +m.set('edition', 6); +m.set(262, 'standard'); +m.set(undefined, 'nah'); + +m.has('edition') // true +m.has('years') // false +m.has(262) // true +m.has(undefined) // true +``` + +**(5)delete(key)** + +`delete`方法删除某个键,返回`true`。如果删除失败,返回`false`。 + +```javascript +const m = new Map(); +m.set(undefined, 'nah'); +m.has(undefined) // true + +m.delete(undefined) +m.has(undefined) // false +``` + +**(6)clear()** + +`clear`方法清除所有成员,没有返回值。 + +```javascript +let map = new Map(); +map.set('foo', true); +map.set('bar', false); + +map.size // 2 +map.clear() +map.size // 0 +``` + +### 遍历方法 + +Map 结构原生提供三个遍历器生成函数和一个遍历方法。 + +- `keys()`:返回键名的遍历器。 +- `values()`:返回键值的遍历器。 +- `entries()`:返回所有成员的遍历器。 +- `forEach()`:遍历 Map 的所有成员。 + +需要特别注意的是,Map 的遍历顺序就是插入顺序。 + +```javascript +const map = new Map([ + ['F', 'no'], + ['T', 'yes'], +]); + +for (let key of map.keys()) { + console.log(key); +} +// "F" +// "T" + +for (let value of map.values()) { + console.log(value); +} +// "no" +// "yes" + +for (let item of map.entries()) { + console.log(item[0], item[1]); +} +// "F" "no" +// "T" "yes" + +// 或者 +for (let [key, value] of map.entries()) { + console.log(key, value); +} +// "F" "no" +// "T" "yes" + +// 等同于使用map.entries() +for (let [key, value] of map) { + console.log(key, value); +} +// "F" "no" +// "T" "yes" +``` + +上面代码最后的那个例子,表示 Map 结构的默认遍历器接口(`Symbol.iterator`属性),就是`entries`方法。 + +```javascript +map[Symbol.iterator] === map.entries +// true +``` + +Map 结构转为数组结构,比较快速的方法是使用扩展运算符(`...`)。 + +```javascript +const map = new Map([ + [1, 'one'], + [2, 'two'], + [3, 'three'], +]); + +[...map.keys()] +// [1, 2, 3] + +[...map.values()] +// ['one', 'two', 'three'] + +[...map.entries()] +// [[1,'one'], [2, 'two'], [3, 'three']] + +[...map] +// [[1,'one'], [2, 'two'], [3, 'three']] +``` + +结合数组的`map`方法、`filter`方法,可以实现 Map 的遍历和过滤(Map 本身没有`map`和`filter`方法)。 + +```javascript +const map0 = new Map() + .set(1, 'a') + .set(2, 'b') + .set(3, 'c'); + +const map1 = new Map( + [...map0].filter(([k, v]) => k < 3) +); +// 产生 Map 结构 {1 => 'a', 2 => 'b'} + +const map2 = new Map( + [...map0].map(([k, v]) => [k * 2, '_' + v]) + ); +// 产生 Map 结构 {2 => '_a', 4 => '_b', 6 => '_c'} +``` + +此外,Map 还有一个`forEach`方法,与数组的`forEach`方法类似,也可以实现遍历。 + +```javascript +map.forEach(function(value, key, map) { + console.log("Key: %s, Value: %s", key, value); +}); +``` + +`forEach`方法还可以接受第二个参数,用来绑定`this`。 + +```javascript +const reporter = { + report: function(key, value) { + console.log("Key: %s, Value: %s", key, value); + } +}; + +map.forEach(function(value, key, map) { + this.report(key, value); +}, reporter); +``` + +上面代码中,`forEach`方法的回调函数的`this`,就指向`reporter`。 + +### 与其他数据结构的互相转换 + +**(1)Map 转为数组** + +前面已经提过,Map 转为数组最方便的方法,就是使用扩展运算符(`...`)。 + +```javascript +const myMap = new Map() + .set(true, 7) + .set({foo: 3}, ['abc']); +[...myMap] +// [ [ true, 7 ], [ { foo: 3 }, [ 'abc' ] ] ] +``` + +**(2)数组 转为 Map** + +将数组传入 Map 构造函数,就可以转为 Map。 + +```javascript +new Map([ + [true, 7], + [{foo: 3}, ['abc']] +]) +// Map { +// true => 7, +// Object {foo: 3} => ['abc'] +// } +``` + +**(3)Map 转为对象** + +如果所有 Map 的键都是字符串,它可以无损地转为对象。 + +```javascript +function strMapToObj(strMap) { + let obj = Object.create(null); + for (let [k,v] of strMap) { + obj[k] = v; + } + return obj; +} + +const myMap = new Map() + .set('yes', true) + .set('no', false); +strMapToObj(myMap) +// { yes: true, no: false } +``` + +如果有非字符串的键名,那么这个键名会被转成字符串,再作为对象的键名。 + +**(4)对象转为 Map** + +```javascript +function objToStrMap(obj) { + let strMap = new Map(); + for (let k of Object.keys(obj)) { + strMap.set(k, obj[k]); + } + return strMap; +} + +objToStrMap({yes: true, no: false}) +// Map {"yes" => true, "no" => false} +``` + +**(5)Map 转为 JSON** + +Map 转为 JSON 要区分两种情况。一种情况是,Map 的键名都是字符串,这时可以选择转为对象 JSON。 + +```javascript +function strMapToJson(strMap) { + return JSON.stringify(strMapToObj(strMap)); +} + +let myMap = new Map().set('yes', true).set('no', false); +strMapToJson(myMap) +// '{"yes":true,"no":false}' +``` + +另一种情况是,Map 的键名有非字符串,这时可以选择转为数组 JSON。 + +```javascript +function mapToArrayJson(map) { + return JSON.stringify([...map]); +} + +let myMap = new Map().set(true, 7).set({foo: 3}, ['abc']); +mapToArrayJson(myMap) +// '[[true,7],[{"foo":3},["abc"]]]' +``` + +**(6)JSON 转为 Map** + +JSON 转为 Map,正常情况下,所有键名都是字符串。 + +```javascript +function jsonToStrMap(jsonStr) { + return objToStrMap(JSON.parse(jsonStr)); +} + +jsonToStrMap('{"yes": true, "no": false}') +// Map {'yes' => true, 'no' => false} +``` + +但是,有一种特殊情况,整个 JSON 就是一个数组,且每个数组成员本身,又是一个有两个成员的数组。这时,它可以一一对应地转为 Map。这往往是 Map 转为数组 JSON 的逆操作。 + +```javascript +function jsonToMap(jsonStr) { + return new Map(JSON.parse(jsonStr)); +} + +jsonToMap('[[true,7],[{"foo":3},["abc"]]]') +// Map {true => 7, Object {foo: 3} => ['abc']} +``` + +## WeakMap + +### 含义 + +`WeakMap`结构与`Map`结构类似,也是用于生成键值对的集合。 + +```javascript +// WeakMap 可以使用 set 方法添加成员 +const wm1 = new WeakMap(); +const key = {foo: 1}; +wm1.set(key, 2); +wm1.get(key) // 2 + +// WeakMap 也可以接受一个数组, +// 作为构造函数的参数 +const k1 = [1, 2, 3]; +const k2 = [4, 5, 6]; +const wm2 = new WeakMap([[k1, 'foo'], [k2, 'bar']]); +wm2.get(k2) // "bar" +``` + +`WeakMap`与`Map`的区别有两点。 + +首先,`WeakMap`只接受对象作为键名(`null`除外),不接受其他类型的值作为键名。 + +```javascript +const map = new WeakMap(); +map.set(1, 2) +// TypeError: 1 is not an object! +map.set(Symbol(), 2) +// TypeError: Invalid value used as weak map key +map.set(null, 2) +// TypeError: Invalid value used as weak map key +``` + +上面代码中,如果将数值`1`和`Symbol`值作为 WeakMap 的键名,都会报错。 + +其次,`WeakMap`的键名所指向的对象,不计入垃圾回收机制。 + +`WeakMap`的设计目的在于,有时我们想在某个对象上面存放一些数据,但是这会形成对于这个对象的引用。请看下面的例子。 + +```javascript +const e1 = document.getElementById('foo'); +const e2 = document.getElementById('bar'); +const arr = [ + [e1, 'foo 元素'], + [e2, 'bar 元素'], +]; +``` + +上面代码中,`e1`和`e2`是两个对象,我们通过`arr`数组对这两个对象添加一些文字说明。这就形成了`arr`对`e1`和`e2`的引用。 + +一旦不再需要这两个对象,我们就必须手动删除这个引用,否则垃圾回收机制就不会释放`e1`和`e2`占用的内存。 + +```javascript +// 不需要 e1 和 e2 的时候 +// 必须手动删除引用 +arr [0] = null; +arr [1] = null; +``` + +上面这样的写法显然很不方便。一旦忘了写,就会造成内存泄露。 + +WeakMap 就是为了解决这个问题而诞生的,它的键名所引用的对象都是弱引用,即垃圾回收机制不将该引用考虑在内。因此,只要所引用的对象的其他引用都被清除,垃圾回收机制就会释放该对象所占用的内存。也就是说,一旦不再需要,WeakMap 里面的键名对象和所对应的键值对会自动消失,不用手动删除引用。 + +基本上,如果你要往对象上添加数据,又不想干扰垃圾回收机制,就可以使用 WeakMap。一个典型应用场景是,在网页的 DOM 元素上添加数据,就可以使用`WeakMap`结构。当该 DOM 元素被清除,其所对应的`WeakMap`记录就会自动被移除。 + +```javascript +const wm = new WeakMap(); + +const element = document.getElementById('example'); + +wm.set(element, 'some information'); +wm.get(element) // "some information" +``` + +上面代码中,先新建一个 Weakmap 实例。然后,将一个 DOM 节点作为键名存入该实例,并将一些附加信息作为键值,一起存放在 WeakMap 里面。这时,WeakMap 里面对`element`的引用就是弱引用,不会被计入垃圾回收机制。 + +也就是说,上面的 DOM 节点对象的引用计数是`1`,而不是`2`。这时,一旦消除对该节点的引用,它占用的内存就会被垃圾回收机制释放。Weakmap 保存的这个键值对,也会自动消失。 + +总之,`WeakMap`的专用场合就是,它的键所对应的对象,可能会在将来消失。`WeakMap`结构有助于防止内存泄漏。 + +注意,WeakMap 弱引用的只是键名,而不是键值。键值依然是正常引用。 + +```javascript +const wm = new WeakMap(); +let key = {}; +let obj = {foo: 1}; + +wm.set(key, obj); +obj = null; +wm.get(key) +// Object {foo: 1} +``` + +上面代码中,键值`obj`是正常引用。所以,即使在 WeakMap 外部消除了`obj`的引用,WeakMap 内部的引用依然存在。 + +### WeakMap 的语法 + +WeakMap 与 Map 在 API 上的区别主要是两个,一是没有遍历操作(即没有`keys()`、`values()`和`entries()`方法),也没有`size`属性。因为没有办法列出所有键名,某个键名是否存在完全不可预测,跟垃圾回收机制是否运行相关。这一刻可以取到键名,下一刻垃圾回收机制突然运行了,这个键名就没了,为了防止出现不确定性,就统一规定不能取到键名。二是无法清空,即不支持`clear`方法。因此,`WeakMap`只有四个方法可用:`get()`、`set()`、`has()`、`delete()`。 + +```javascript +const wm = new WeakMap(); + +// size、forEach、clear 方法都不存在 +wm.size // undefined +wm.forEach // undefined +wm.clear // undefined +``` + +### WeakMap 的示例 + +WeakMap 的例子很难演示,因为无法观察它里面的引用会自动消失。此时,其他引用都解除了,已经没有引用指向 WeakMap 的键名了,导致无法证实那个键名是不是存在。 + +贺师俊老师[提示](https://github.com/ruanyf/es6tutorial/issues/362#issuecomment-292109104),如果引用所指向的值占用特别多的内存,就可以通过 Node 的`process.memoryUsage`方法看出来。根据这个思路,网友[vtxf](https://github.com/ruanyf/es6tutorial/issues/362#issuecomment-292451925)补充了下面的例子。 + +首先,打开 Node 命令行。 + +```bash +$ node --expose-gc +``` + +上面代码中,`--expose-gc`参数表示允许手动执行垃圾回收机制。 + +然后,执行下面的代码。 + +```javascript +// 手动执行一次垃圾回收,保证获取的内存使用状态准确 +> global.gc(); +undefined + +// 查看内存占用的初始状态,heapUsed 为 4M 左右 +> process.memoryUsage(); +{ rss: 21106688, + heapTotal: 7376896, + heapUsed: 4153936, + external: 9059 } + +> let wm = new WeakMap(); +undefined + +// 新建一个变量 key,指向一个 5*1024*1024 的数组 +> let key = new Array(5 * 1024 * 1024); +undefined + +// 设置 WeakMap 实例的键名,也指向 key 数组 +// 这时,key 数组实际被引用了两次, +// 变量 key 引用一次,WeakMap 的键名引用了第二次 +// 但是,WeakMap 是弱引用,对于引擎来说,引用计数还是1 +> wm.set(key, 1); +WeakMap {} + +> global.gc(); +undefined + +// 这时内存占用 heapUsed 增加到 45M 了 +> process.memoryUsage(); +{ rss: 67538944, + heapTotal: 7376896, + heapUsed: 45782816, + external: 8945 } + +// 清除变量 key 对数组的引用, +// 但没有手动清除 WeakMap 实例的键名对数组的引用 +> key = null; +null + +// 再次执行垃圾回收 +> global.gc(); +undefined + +// 内存占用 heapUsed 变回 4M 左右, +// 可以看到 WeakMap 的键名引用没有阻止 gc 对内存的回收 +> process.memoryUsage(); +{ rss: 20639744, + heapTotal: 8425472, + heapUsed: 3979792, + external: 8956 } +``` + +上面代码中,只要外部的引用消失,WeakMap 内部的引用,就会自动被垃圾回收清除。由此可见,有了 WeakMap 的帮助,解决内存泄漏就会简单很多。 + +### WeakMap 的用途 + +前文说过,WeakMap 应用的典型场合就是 DOM 节点作为键名。下面是一个例子。 + +```javascript +let myElement = document.getElementById('logo'); +let myWeakmap = new WeakMap(); + +myWeakmap.set(myElement, {timesClicked: 0}); + +myElement.addEventListener('click', function() { + let logoData = myWeakmap.get(myElement); + logoData.timesClicked++; +}, false); +``` + +上面代码中,`myElement`是一个 DOM 节点,每当发生`click`事件,就更新一下状态。我们将这个状态作为键值放在 WeakMap 里,对应的键名就是`myElement`。一旦这个 DOM 节点删除,该状态就会自动消失,不存在内存泄漏风险。 + +WeakMap 的另一个用处是部署私有属性。 + +```javascript +const _counter = new WeakMap(); +const _action = new WeakMap(); + +class Countdown { + constructor(counter, action) { + _counter.set(this, counter); + _action.set(this, action); + } + dec() { + let counter = _counter.get(this); + if (counter < 1) return; + counter--; + _counter.set(this, counter); + if (counter === 0) { + _action.get(this)(); + } + } +} + +const c = new Countdown(2, () => console.log('DONE')); + +c.dec() +c.dec() +// DONE +``` + +上面代码中,`Countdown`类的两个内部属性`_counter`和`_action`,是实例的弱引用,所以如果删除实例,它们也就随之消失,不会造成内存泄漏。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/simd.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/simd.md" new file mode 100755 index 000000000..c52d5c2c7 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/simd.md" @@ -0,0 +1,715 @@ +# SIMD + +## 概述 + +SIMD(发音`/sim-dee/`)是“Single Instruction/Multiple Data”的缩写,意为“单指令,多数据”。它是 JavaScript 操作 CPU 对应指令的接口,你可以看做这是一种不同的运算执行模式。与它相对的是 SISD(“Single Instruction/Single Data”),即“单指令,单数据”。 + +SIMD 的含义是使用一个指令,完成多个数据的运算;SISD 的含义是使用一个指令,完成单个数据的运算,这是 JavaScript 的默认运算模式。显而易见,SIMD 的执行效率要高于 SISD,所以被广泛用于 3D 图形运算、物理模拟等运算量超大的项目之中。 + +为了理解 SIMD,请看下面的例子。 + +```javascript +var a = [1, 2, 3, 4]; +var b = [5, 6, 7, 8]; +var c = []; + +c[0] = a[0] + b[0]; +c[1] = a[1] + b[1]; +c[2] = a[2] + b[2]; +c[3] = a[3] + b[3]; +c // Array[6, 8, 10, 12] +``` + +上面代码中,数组`a`和`b`的对应成员相加,结果放入数组`c`。它的运算模式是依次处理每个数组成员,一共有四个数组成员,所以需要运算 4 次。 + +如果采用 SIMD 模式,只要运算一次就够了。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 4); +var b = SIMD.Float32x4(5, 6, 7, 8); +var c = SIMD.Float32x4.add(a, b); // Float32x4[6, 8, 10, 12] +``` + +上面代码之中,数组`a`和`b`的四个成员的各自相加,只用一条指令就完成了。因此,速度比上一种写法提高了 4 倍。 + +一次 SIMD 运算,可以处理多个数据,这些数据被称为“通道”(lane)。上面代码中,一次运算了四个数据,因此就是四个通道。 + +SIMD 通常用于矢量运算。 + +```javascript +v + w = 〈v1, …, vn〉+ 〈w1, …, wn〉 + = 〈v1+w1, …, vn+wn〉 +``` + +上面代码中,`v`和`w`是两个多元矢量。它们的加运算,在 SIMD 下是一个指令、而不是 n 个指令完成的,这就大大提高了效率。这对于 3D 动画、图像处理、信号处理、数值处理、加密等运算是非常重要的。比如,Canvas 的`getImageData()`会将图像文件读成一个二进制数组,SIMD 就很适合对于这种数组的处理。 + +总的来说,SIMD 是数据并行处理(parallelism)的一种手段,可以加速一些运算密集型操作的速度。将来与 WebAssembly 结合以后,可以让 JavaScript 达到二进制代码的运行速度。 + +## 数据类型 + +SIMD 提供 12 种数据类型,总长度都是 128 个二进制位。 + +- Float32x4:四个 32 位浮点数 +- Float64x2:两个 64 位浮点数 +- Int32x4:四个 32 位整数 +- Int16x8:八个 16 位整数 +- Int8x16:十六个 8 位整数 +- Uint32x4:四个无符号的 32 位整数 +- Uint16x8:八个无符号的 16 位整数 +- Uint8x16:十六个无符号的 8 位整数 +- Bool32x4:四个 32 位布尔值 +- Bool16x8:八个 16 位布尔值 +- Bool8x16:十六个 8 位布尔值 +- Bool64x2:两个 64 位布尔值 + +每种数据类型被`x`符号分隔成两部分,后面的部分表示通道数,前面的部分表示每个通道的宽度和类型。比如,`Float32x4`就表示这个值有 4 个通道,每个通道是一个 32 位浮点数。 + +每个通道之中,可以放置四种数据。 + +- 浮点数(float,比如 1.0) +- 带符号的整数(Int,比如-1) +- 无符号的整数(Uint,比如 1) +- 布尔值(Bool,包含`true`和`false`两种值) + +每种 SIMD 的数据类型都是一个函数方法,可以传入参数,生成对应的值。 + +```javascript +var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +``` + +上面代码中,变量`a`就是一个 128 位、包含四个 32 位浮点数(即四个通道)的值。 + +注意,这些数据类型方法都不是构造函数,前面不能加`new`,否则会报错。 + +```javascript +var v = new SIMD.Float32x4(0, 1, 2, 3); +// TypeError: SIMD.Float32x4 is not a constructor +``` + +## 静态方法:数学运算 + +每种数据类型都有一系列运算符,支持基本的数学运算。 + +### SIMD.%type%.abs(),SIMD.%type%.neg() + +`abs`方法接受一个 SIMD 值作为参数,将它的每个通道都转成绝对值,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 0, NaN); +SIMD.Float32x4.abs(a) +// Float32x4[1, 2, 0, NaN] +``` + +`neg`方法接受一个 SIMD 值作为参数,将它的每个通道都转成负值,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 3, 0); +SIMD.Float32x4.neg(a) +// Float32x4[1, 2, -3, -0] + +var b = SIMD.Float64x2(NaN, Infinity); +SIMD.Float64x2.neg(b) +// Float64x2[NaN, -Infinity] +``` + +### SIMD.%type%.add(),SIMD.%type%.addSaturate() + +`add`方法接受两个 SIMD 值作为参数,将它们的每个通道相加,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +var b = SIMD.Float32x4(5.0, 10.0, 15.0, 20.0); +var c = SIMD.Float32x4.add(a, b); +``` + +上面代码中,经过加法运算,新的 SIMD 值为`(6.0, 12.0, 18.0. 24.0)`。 + +`addSaturate`方法跟`add`方法的作用相同,都是两个通道相加,但是溢出的处理不一致。对于`add`方法,如果两个值相加发生溢出,溢出的二进制位会被丢弃; `addSaturate`方法则是返回该数据类型的最大值。 + +```javascript +var a = SIMD.Uint16x8(65533, 65534, 65535, 65535, 1, 1, 1, 1); +var b = SIMD.Uint16x8(1, 1, 1, 5000, 1, 1, 1, 1); +SIMD.Uint16x8.addSaturate(a, b); +// Uint16x8[65534, 65535, 65535, 65535, 2, 2, 2, 2] + +var c = SIMD.Int16x8(32765, 32766, 32767, 32767, 1, 1, 1, 1); +var d = SIMD.Int16x8(1, 1, 1, 5000, 1, 1, 1, 1); +SIMD.Int16x8.addSaturate(c, d); +// Int16x8[32766, 32767, 32767, 32767, 2, 2, 2, 2] +``` + +上面代码中,`Uint16`的最大值是 65535,`Int16`的最大值是 32767。一旦发生溢出,就返回这两个值。 + +注意,`Uint32x4`和`Int32x4`这两种数据类型没有`addSaturate`方法。 + +### SIMD.%type%.sub(),SIMD.%type%.subSaturate() + +`sub`方法接受两个 SIMD 值作为参数,将它们的每个通道相减,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 3, 4); +var b = SIMD.Float32x4(3, 3, 3, 3); +SIMD.Float32x4.sub(a, b) +// Float32x4[-4, -5, 0, 1] +``` + +`subSaturate`方法跟`sub`方法的作用相同,都是两个通道相减,但是溢出的处理不一致。对于`sub`方法,如果两个值相减发生溢出,溢出的二进制位会被丢弃; `subSaturate`方法则是返回该数据类型的最小值。 + +```javascript +var a = SIMD.Uint16x8(5, 1, 1, 1, 1, 1, 1, 1); +var b = SIMD.Uint16x8(10, 1, 1, 1, 1, 1, 1, 1); +SIMD.Uint16x8.subSaturate(a, b) +// Uint16x8[0, 0, 0, 0, 0, 0, 0, 0] + +var c = SIMD.Int16x8(-100, 0, 0, 0, 0, 0, 0, 0); +var d = SIMD.Int16x8(32767, 0, 0, 0, 0, 0, 0, 0); +SIMD.Int16x8.subSaturate(c, d) +// Int16x8[-32768, 0, 0, 0, 0, 0, 0, 0, 0] +``` + +上面代码中,`Uint16`的最小值是`0`,`Int16`的最小值是`-32678`。一旦运算发生溢出,就返回最小值。 + +### SIMD.%type%.mul(),SIMD.%type%.div(),SIMD.%type%.sqrt() + +`mul`方法接受两个 SIMD 值作为参数,将它们的每个通道相乘,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 3, 4); +var b = SIMD.Float32x4(3, 3, 3, 3); +SIMD.Float32x4.mul(a, b) +// Float32x4[-3, -6, 9, 12] +``` + +`div`方法接受两个 SIMD 值作为参数,将它们的每个通道相除,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(2, 2, 2, 2); +var b = SIMD.Float32x4(4, 4, 4, 4); +SIMD.Float32x4.div(a, b) +// Float32x4[0.5, 0.5, 0.5, 0.5] +``` + +`sqrt`方法接受一个 SIMD 值作为参数,求出每个通道的平方根,作为一个新的 SIMD 值返回。 + +```javascript +var b = SIMD.Float64x2(4, 8); +SIMD.Float64x2.sqrt(b) +// Float64x2[2, 2.8284271247461903] +``` + +### SIMD.%FloatType%.reciprocalApproximation(),SIMD.%type%.reciprocalSqrtApproximation() + +`reciprocalApproximation`方法接受一个 SIMD 值作为参数,求出每个通道的倒数(`1 / x`),作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 4); +SIMD.Float32x4.reciprocalApproximation(a); +// Float32x4[1, 0.5, 0.3333333432674408, 0.25] +``` + +`reciprocalSqrtApproximation`方法接受一个 SIMD 值作为参数,求出每个通道的平方根的倒数(`1 / (x^0.5)`),作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 4); +SIMD.Float32x4.reciprocalSqrtApproximation(a) +// Float32x4[1, 0.7071067690849304, 0.5773502588272095, 0.5] +``` + +注意,只有浮点数的数据类型才有这两个方法。 + +### SIMD.%IntegerType%.shiftLeftByScalar() + +`shiftLeftByScalar`方法接受一个 SIMD 值作为参数,然后将每个通道的值左移指定的位数,作为一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, 8); +SIMD.Int32x4.shiftLeftByScalar(a, 1); +// Int32x4[2, 4, 8, 16] +``` + +如果左移后,新的值超出了当前数据类型的位数,溢出的部分会被丢弃。 + +```javascript +var ix4 = SIMD.Int32x4(1, 2, 3, 4); +var jx4 = SIMD.Int32x4.shiftLeftByScalar(ix4, 32); +// Int32x4[0, 0, 0, 0] +``` + +注意,只有整数的数据类型才有这个方法。 + +### SIMD.%IntegerType%.shiftRightByScalar() + +`shiftRightByScalar`方法接受一个 SIMD 值作为参数,然后将每个通道的值右移指定的位数,返回一个新的 SIMD 值。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, -8); +SIMD.Int32x4.shiftRightByScalar(a, 1); +// Int32x4[0, 1, 2, -4] +``` + +如果原来通道的值是带符号的值,则符号位保持不变,不受右移影响。如果是不带符号位的值,则右移后头部会补`0`。 + +```javascript +var a = SIMD.Uint32x4(1, 2, 4, -8); +SIMD.Uint32x4.shiftRightByScalar(a, 1); +// Uint32x4[0, 1, 2, 2147483644] +``` + +上面代码中,`-8`右移一位变成了`2147483644`,是因为对于 32 位无符号整数来说,`-8`的二进制形式是`11111111111111111111111111111000`,右移一位就变成了`01111111111111111111111111111100`,相当于`2147483644`。 + +注意,只有整数的数据类型才有这个方法。 + +## 静态方法:通道处理 + +### SIMD.%type%.check() + +`check`方法用于检查一个值是否为当前类型的 SIMD 值。如果是的,就返回这个值,否则就报错。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 9); + +SIMD.Float32x4.check(a); +// Float32x4[1, 2, 3, 9] + +SIMD.Float32x4.check([1,2,3,4]) // 报错 +SIMD.Int32x4.check(a) // 报错 +SIMD.Int32x4.check('hello world') // 报错 +``` + +### SIMD.%type%.extractLane(),SIMD.%type%.replaceLane() + +`extractLane`方法用于返回给定通道的值。它接受两个参数,分别是 SIMD 值和通道编号。 + +```javascript +var t = SIMD.Float32x4(1, 2, 3, 4); +SIMD.Float32x4.extractLane(t, 2) // 3 +``` + +`replaceLane`方法用于替换指定通道的值,并返回一个新的 SIMD 值。它接受三个参数,分别是原来的 SIMD 值、通道编号和新的通道值。 + +```javascript +var t = SIMD.Float32x4(1, 2, 3, 4); +SIMD.Float32x4.replaceLane(t, 2, 42) +// Float32x4[1, 2, 42, 4] +``` + +### SIMD.%type%.load() + +`load`方法用于从二进制数组读入数据,生成一个新的 SIMD 值。 + +```javascript +var a = new Int32Array([1,2,3,4,5,6,7,8]); +SIMD.Int32x4.load(a, 0); +// Int32x4[1, 2, 3, 4] + +var b = new Int32Array([1,2,3,4,5,6,7,8]); +SIMD.Int32x4.load(a, 2); +// Int32x4[3, 4, 5, 6] +``` + +`load`方法接受两个参数:一个二进制数组和开始读取的位置(从 0 开始)。如果位置不合法(比如`-1`或者超出二进制数组的大小),就会抛出一个错误。 + +这个方法还有三个变种`load1()`、`load2()`、`load3()`,表示从指定位置开始,只加载一个通道、二个通道、三个通道的值。 + +```javascript +// 格式 +SIMD.Int32x4.load(tarray, index) +SIMD.Int32x4.load1(tarray, index) +SIMD.Int32x4.load2(tarray, index) +SIMD.Int32x4.load3(tarray, index) + +// 实例 +var a = new Int32Array([1,2,3,4,5,6,7,8]); +SIMD.Int32x4.load1(a, 0); +// Int32x4[1, 0, 0, 0] +SIMD.Int32x4.load2(a, 0); +// Int32x4[1, 2, 0, 0] +SIMD.Int32x4.load3(a, 0); +// Int32x4[1, 2, 3,0] +``` + +### SIMD.%type%.store() + +`store`方法用于将一个 SIMD 值,写入一个二进制数组。它接受三个参数,分别是二进制数组、开始写入的数组位置、SIMD 值。它返回写入值以后的二进制数组。 + +```javascript +var t1 = new Int32Array(8); +var v1 = SIMD.Int32x4(1, 2, 3, 4); +SIMD.Int32x4.store(t1, 0, v1) +// Int32Array[1, 2, 3, 4, 0, 0, 0, 0] + +var t2 = new Int32Array(8); +var v2 = SIMD.Int32x4(1, 2, 3, 4); +SIMD.Int32x4.store(t2, 2, v2) +// Int32Array[0, 0, 1, 2, 3, 4, 0, 0] +``` + +上面代码中,`t1`是一个二进制数组,`v1`是一个 SIMD 值,只有四个通道。所以写入`t1`以后,只有前四个位置有值,后四个位置都是 0。而`t2`是从 2 号位置开始写入,所以前两个位置和后两个位置都是 0。 + +这个方法还有三个变种`store1()`、`store2()`和`store3()`,表示只写入一个通道、二个通道和三个通道的值。 + +```javascript +var tarray = new Int32Array(8); +var value = SIMD.Int32x4(1, 2, 3, 4); +SIMD.Int32x4.store1(tarray, 0, value); +// Int32Array[1, 0, 0, 0, 0, 0, 0, 0] +``` + +### SIMD.%type%.splat() + +`splat`方法返回一个新的 SIMD 值,该值的所有通道都会设成同一个预先给定的值。 + +```javascript +SIMD.Float32x4.splat(3); +// Float32x4[3, 3, 3, 3] +SIMD.Float64x2.splat(3); +// Float64x2[3, 3] +``` + +如果省略参数,所有整数型的 SIMD 值都会设定`0`,浮点型的 SIMD 值都会设成`NaN`。 + +### SIMD.%type%.swizzle() + +`swizzle`方法返回一个新的 SIMD 值,重新排列原有的 SIMD 值的通道顺序。 + +```javascript +var t = SIMD.Float32x4(1, 2, 3, 4); +SIMD.Float32x4.swizzle(t, 1, 2, 0, 3); +// Float32x4[2,3,1,4] +``` + +上面代码中,`swizzle`方法的第一个参数是原有的 SIMD 值,后面的参数对应将要返回的 SIMD 值的四个通道。它的意思是新的 SIMD 的四个通道,依次是原来 SIMD 值的 1 号通道、2 号通道、0 号通道、3 号通道。由于 SIMD 值最多可以有 16 个通道,所以`swizzle`方法除了第一个参数以外,最多还可以接受 16 个参数。 + +下面是另一个例子。 + +```javascript +var a = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +// Float32x4[1.0, 2.0, 3.0, 4.0] + +var b = SIMD.Float32x4.swizzle(a, 0, 0, 1, 1); +// Float32x4[1.0, 1.0, 2.0, 2.0] + +var c = SIMD.Float32x4.swizzle(a, 3, 3, 3, 3); +// Float32x4[4.0, 4.0, 4.0, 4.0] + +var d = SIMD.Float32x4.swizzle(a, 3, 2, 1, 0); +// Float32x4[4.0, 3.0, 2.0, 1.0] +``` + +### SIMD.%type%.shuffle() + +`shuffle`方法从两个 SIMD 值之中取出指定通道,返回一个新的 SIMD 值。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 4); +var b = SIMD.Float32x4(5, 6, 7, 8); + +SIMD.Float32x4.shuffle(a, b, 1, 5, 7, 2); +// Float32x4[2, 6, 8, 3] +``` + +上面代码中,`a`和`b`一共有 8 个通道,依次编号为 0 到 7。`shuffle`根据编号,取出相应的通道,返回一个新的 SIMD 值。 + +## 静态方法:比较运算 + +### SIMD.%type%.equal(),SIMD.%type%.notEqual() + +`equal`方法用来比较两个 SIMD 值`a`和`b`的每一个通道,根据两者是否精确相等(`a === b`),得到一个布尔值。最后,所有通道的比较结果,组成一个新的 SIMD 值,作为掩码返回。`notEqual`方法则是比较两个通道是否不相等(`a !== b`)。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 9); +var b = SIMD.Float32x4(1, 4, 7, 9); + +SIMD.Float32x4.equal(a,b) +// Bool32x4[true, false, false, true] + +SIMD.Float32x4.notEqual(a,b); +// Bool32x4[false, true, true, false] +``` + +### SIMD.%type%.greaterThan(),SIMD.%type%.greaterThanOrEqual() + +`greatThan`方法用来比较两个 SIMD 值`a`和`b`的每一个通道,如果在该通道中,`a`较大就得到`true`,否则得到`false`。最后,所有通道的比较结果,组成一个新的 SIMD 值,作为掩码返回。`greaterThanOrEqual`则是比较`a`是否大于等于`b`。 + +```javascript +var a = SIMD.Float32x4(1, 6, 3, 11); +var b = SIMD.Float32x4(1, 4, 7, 9); + +SIMD.Float32x4.greaterThan(a, b) +// Bool32x4[false, true, false, true] + +SIMD.Float32x4.greaterThanOrEqual(a, b) +// Bool32x4[true, true, false, true] +``` + +### SIMD.%type%.lessThan(),SIMD.%type%.lessThanOrEqual() + +`lessThan`方法用来比较两个 SIMD 值`a`和`b`的每一个通道,如果在该通道中,`a`较小就得到`true`,否则得到`false`。最后,所有通道的比较结果,会组成一个新的 SIMD 值,作为掩码返回。`lessThanOrEqual`方法则是比较`a`是否等于`b`。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 11); +var b = SIMD.Float32x4(1, 4, 7, 9); + +SIMD.Float32x4.lessThan(a, b) +// Bool32x4[false, true, true, false] + +SIMD.Float32x4.lessThanOrEqual(a, b) +// Bool32x4[true, true, true, false] +``` + +### SIMD.%type%.select() + +`select`方法通过掩码生成一个新的 SIMD 值。它接受三个参数,分别是掩码和两个 SIMD 值。 + +```javascript +var a = SIMD.Float32x4(1, 2, 3, 4); +var b = SIMD.Float32x4(5, 6, 7, 8); + +var mask = SIMD.Bool32x4(true, false, false, true); + +SIMD.Float32x4.select(mask, a, b); +// Float32x4[1, 6, 7, 4] +``` + +上面代码中,`select`方法接受掩码和两个 SIMD 值作为参数。当某个通道对应的掩码为`true`时,会选择第一个 SIMD 值的对应通道,否则选择第二个 SIMD 值的对应通道。 + +这个方法通常与比较运算符结合使用。 + +```javascript +var a = SIMD.Float32x4(0, 12, 3, 4); +var b = SIMD.Float32x4(0, 6, 7, 50); + +var mask = SIMD.Float32x4.lessThan(a,b); +// Bool32x4[false, false, true, true] + +var result = SIMD.Float32x4.select(mask, a, b); +// Float32x4[0, 6, 3, 4] +``` + +上面代码中,先通过`lessThan`方法生成一个掩码,然后通过`select`方法生成一个由每个通道的较小值组成的新的 SIMD 值。 + +### SIMD.%BooleanType%.allTrue(),SIMD.%BooleanType%.anyTrue() + +`allTrue`方法接受一个 SIMD 值作为参数,然后返回一个布尔值,表示该 SIMD 值的所有通道是否都为`true`。 + +```javascript +var a = SIMD.Bool32x4(true, true, true, true); +var b = SIMD.Bool32x4(true, false, true, true); + +SIMD.Bool32x4.allTrue(a); // true +SIMD.Bool32x4.allTrue(b); // false +``` + +`anyTrue`方法则是只要有一个通道为`true`,就返回`true`,否则返回`false`。 + +```javascript +var a = SIMD.Bool32x4(false, false, false, false); +var b = SIMD.Bool32x4(false, false, true, false); + +SIMD.Bool32x4.anyTrue(a); // false +SIMD.Bool32x4.anyTrue(b); // true +``` + +注意,只有四种布尔值数据类型(`Bool32x4`、`Bool16x8`、`Bool8x16`、`Bool64x2`)才有这两个方法。 + +这两个方法通常与比较运算符结合使用。 + +```javascript +var ax4 = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +var bx4 = SIMD.Float32x4(0.0, 6.0, 7.0, 8.0); +var ix4 = SIMD.Float32x4.lessThan(ax4, bx4); +var b1 = SIMD.Int32x4.allTrue(ix4); // false +var b2 = SIMD.Int32x4.anyTrue(ix4); // true +``` + +### SIMD.%type%.min(),SIMD.%type%.minNum() + +`min`方法接受两个 SIMD 值作为参数,将两者的对应通道的较小值,组成一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 3, 5.2); +var b = SIMD.Float32x4(0, -4, 6, 5.5); +SIMD.Float32x4.min(a, b); +// Float32x4[-1, -4, 3, 5.2] +``` + +如果有一个通道的值是`NaN`,则会优先返回`NaN`。 + +```javascript +var c = SIMD.Float64x2(NaN, Infinity) +var d = SIMD.Float64x2(1337, 42); +SIMD.Float64x2.min(c, d); +// Float64x2[NaN, 42] +``` + +`minNum`方法与`min`的作用一模一样,唯一的区别是如果有一个通道的值是`NaN`,则会优先返回另一个通道的值。 + +```javascript +var ax4 = SIMD.Float32x4(1.0, 2.0, NaN, NaN); +var bx4 = SIMD.Float32x4(2.0, 1.0, 3.0, NaN); +var cx4 = SIMD.Float32x4.min(ax4, bx4); +// Float32x4[1.0, 1.0, NaN, NaN] +var dx4 = SIMD.Float32x4.minNum(ax4, bx4); +// Float32x4[1.0, 1.0, 3.0, NaN] +``` + +### SIMD.%type%.max(),SIMD.%type%.maxNum() + +`max`方法接受两个 SIMD 值作为参数,将两者的对应通道的较大值,组成一个新的 SIMD 值返回。 + +```javascript +var a = SIMD.Float32x4(-1, -2, 3, 5.2); +var b = SIMD.Float32x4(0, -4, 6, 5.5); +SIMD.Float32x4.max(a, b); +// Float32x4[0, -2, 6, 5.5] +``` + +如果有一个通道的值是`NaN`,则会优先返回`NaN`。 + +```javascript +var c = SIMD.Float64x2(NaN, Infinity) +var d = SIMD.Float64x2(1337, 42); +SIMD.Float64x2.max(c, d) +// Float64x2[NaN, Infinity] +``` + +`maxNum`方法与`max`的作用一模一样,唯一的区别是如果有一个通道的值是`NaN`,则会优先返回另一个通道的值。 + +```javascript +var c = SIMD.Float64x2(NaN, Infinity) +var d = SIMD.Float64x2(1337, 42); +SIMD.Float64x2.maxNum(c, d) +// Float64x2[1337, Infinity] +``` + +## 静态方法:位运算 + +### SIMD.%type%.and(),SIMD.%type%.or(),SIMD.%type%.xor(),SIMD.%type%.not() + +`and`方法接受两个 SIMD 值作为参数,返回两者对应的通道进行二进制`AND`运算(`&`)后得到的新的 SIMD 值。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, 8); +var b = SIMD.Int32x4(5, 5, 5, 5); +SIMD.Int32x4.and(a, b) +// Int32x4[1, 0, 4, 0] +``` + +上面代码中,以通道`0`为例,`1`的二进制形式是`0001`,`5`的二进制形式是`01001`,所以进行`AND`运算以后,得到`0001`。 + +`or`方法接受两个 SIMD 值作为参数,返回两者对应的通道进行二进制`OR`运算(`|`)后得到的新的 SIMD 值。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, 8); +var b = SIMD.Int32x4(5, 5, 5, 5); +SIMD.Int32x4.or(a, b) +// Int32x4[5, 7, 5, 13] +``` + +`xor`方法接受两个 SIMD 值作为参数,返回两者对应的通道进行二进制“异或”运算(`^`)后得到的新的 SIMD 值。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, 8); +var b = SIMD.Int32x4(5, 5, 5, 5); +SIMD.Int32x4.xor(a, b) +// Int32x4[4, 7, 1, 13] +``` + +`not`方法接受一个 SIMD 值作为参数,返回每个通道进行二进制“否”运算(`~`)后得到的新的 SIMD 值。 + +```javascript +var a = SIMD.Int32x4(1, 2, 4, 8); +SIMD.Int32x4.not(a) +// Int32x4[-2, -3, -5, -9] +``` + +上面代码中,`1`的否运算之所以得到`-2`,是因为在计算机内部,负数采用”2 的补码“这种形式进行表示。也就是说,整数`n`的负数形式`-n`,是对每一个二进制位取反以后,再加上 1。因此,直接取反就相当于负数形式再减去 1,比如`1`的负数形式是`-1`,再减去 1,就得到了`-2`。 + +## 静态方法:数据类型转换 + +SIMD 提供以下方法,用来将一种数据类型转为另一种数据类型。 + +- `SIMD.%type%.fromFloat32x4()` +- `SIMD.%type%.fromFloat32x4Bits()` +- `SIMD.%type%.fromFloat64x2Bits()` +- `SIMD.%type%.fromInt32x4()` +- `SIMD.%type%.fromInt32x4Bits()` +- `SIMD.%type%.fromInt16x8Bits()` +- `SIMD.%type%.fromInt8x16Bits()` +- `SIMD.%type%.fromUint32x4()` +- `SIMD.%type%.fromUint32x4Bits()` +- `SIMD.%type%.fromUint16x8Bits()` +- `SIMD.%type%.fromUint8x16Bits()` + +带有`Bits`后缀的方法,会原封不动地将二进制位拷贝到新的数据类型;不带后缀的方法,则会进行数据类型转换。 + +```javascript +var t = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +SIMD.Int32x4.fromFloat32x4(t); +// Int32x4[1, 2, 3, 4] + +SIMD.Int32x4.fromFloat32x4Bits(t); +// Int32x4[1065353216, 1073741824, 1077936128, 1082130432] +``` + +上面代码中,`fromFloat32x4`是将浮点数转为整数,然后存入新的数据类型;`fromFloat32x4Bits`则是将二进制位原封不动地拷贝进入新的数据类型,然后进行解读。 + +`Bits`后缀的方法,还可以用于通道数目不对等的拷贝。 + +```javascript +var t = SIMD.Float32x4(1.0, 2.0, 3.0, 4.0); +SIMD.Int16x8.fromFloat32x4Bits(t); +// Int16x8[0, 16256, 0, 16384, 0, 16448, 0, 16512] +``` + +上面代码中,原始 SIMD 值`t`是 4 通道的,而目标值是 8 通道的。 + +如果数据转换时,原通道的数据大小,超过了目标通道的最大宽度,就会报错。 + +## 实例方法 + +### SIMD.%type%.prototype.toString() + +`toString`方法返回一个 SIMD 值的字符串形式。 + +```javascript +var a = SIMD.Float32x4(11, 22, 33, 44); +a.toString() // "SIMD.Float32x4(11, 22, 33, 44)" +``` + +## 实例:求平均值 + +正常模式下,计算`n`个值的平均值,需要运算`n`次。 + +```javascript +function average(list) { + var n = list.length; + var sum = 0.0; + for (var i = 0; i < n; i++) { + sum += list[i]; + } + return sum / n; +} +``` + +使用 SIMD,可以将计算次数减少到`n`次的四分之一。 + +```javascript +function average(list) { + var n = list.length; + var sum = SIMD.Float32x4.splat(0.0); + for (var i = 0; i < n; i += 4) { + sum = SIMD.Float32x4.add( + sum, + SIMD.Float32x4.load(list, i) + ); + } + var total = SIMD.Float32x4.extractLane(sum, 0) + + SIMD.Float32x4.extractLane(sum, 1) + + SIMD.Float32x4.extractLane(sum, 2) + + SIMD.Float32x4.extractLane(sum, 3); + return total / n; +} +``` + +上面代码先是每隔四位,将所有的值读入一个 SIMD,然后立刻累加。然后,得到累加值四个通道的总和,再除以`n`就可以了。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/spec.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/spec.md" new file mode 100755 index 000000000..f1c1e0eee --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/spec.md" @@ -0,0 +1,313 @@ +# 读懂 ECMAScript 规格 + +## 概述 + +规格文件是计算机语言的官方标准,详细描述语法规则和实现方法。 + +一般来说,没有必要阅读规格,除非你要写编译器。因为规格写得非常抽象和精炼,又缺乏实例,不容易理解,而且对于解决实际的应用问题,帮助不大。但是,如果你遇到疑难的语法问题,实在找不到答案,这时可以去查看规格文件,了解语言标准是怎么说的。规格是解决问题的“最后一招”。 + +这对 JavaScript 语言很有必要。因为它的使用场景复杂,语法规则不统一,例外很多,各种运行环境的行为不一致,导致奇怪的语法问题层出不穷,任何语法书都不可能囊括所有情况。查看规格,不失为一种解决语法问题的最可靠、最权威的终极方法。 + +本章介绍如何读懂 ECMAScript 6 的规格文件。 + +ECMAScript 6 的规格,可以在 ECMA 国际标准组织的官方网站([www.ecma-international.org/ecma-262/6.0/](http://www.ecma-international.org/ecma-262/6.0/))免费下载和在线阅读。 + +这个规格文件相当庞大,一共有 26 章,A4 打印的话,足足有 545 页。它的特点就是规定得非常细致,每一个语法行为、每一个函数的实现都做了详尽的清晰的描述。基本上,编译器作者只要把每一步翻译成代码就可以了。这很大程度上,保证了所有 ES6 实现都有一致的行为。 + +ECMAScript 6 规格的 26 章之中,第 1 章到第 3 章是对文件本身的介绍,与语言关系不大。第 4 章是对这门语言总体设计的描述,有兴趣的读者可以读一下。第 5 章到第 8 章是语言宏观层面的描述。第 5 章是规格的名词解释和写法的介绍,第 6 章介绍数据类型,第 7 章介绍语言内部用到的抽象操作,第 8 章介绍代码如何运行。第 9 章到第 26 章介绍具体的语法。 + +对于一般用户来说,除了第 4 章,其他章节都涉及某一方面的细节,不用通读,只要在用到的时候,查阅相关章节即可。 + +## 术语 + +ES6 规格使用了一些专门的术语,了解这些术语,可以帮助你读懂规格。本节介绍其中的几个。 + +### 抽象操作 + +所谓“抽象操作”(abstract operations)就是引擎的一些内部方法,外部不能调用。规格定义了一系列的抽象操作,规定了它们的行为,留给各种引擎自己去实现。 + +举例来说,`Boolean(value)`的算法,第一步是这样的。 + +> 1. Let `b` be `ToBoolean(value)`. + +这里的`ToBoolean`就是一个抽象操作,是引擎内部求出布尔值的算法。 + +许多函数的算法都会多次用到同样的步骤,所以 ES6 规格将它们抽出来,定义成“抽象操作”,方便描述。 + +### Record 和 field + +ES6 规格将键值对(key-value map)的数据结构称为 Record,其中的每一组键值对称为 field。这就是说,一个 Record 由多个 field 组成,而每个 field 都包含一个键名(key)和一个键值(value)。 + +### [[Notation]] + +ES6 规格大量使用`[[Notation]]`这种书写法,比如`[[Value]]`、`[[Writable]]`、`[[Get]]`、`[[Set]]`等等。它用来指代 field 的键名。 + +举例来说,`obj`是一个 Record,它有一个`Prototype`属性。ES6 规格不会写`obj.Prototype`,而是写`obj.[[Prototype]]`。一般来说,使用`[[Notation]]`这种书写法的属性,都是对象的内部属性。 + +所有的 JavaScript 函数都有一个内部属性`[[Call]]`,用来运行该函数。 + +```javascript +F.[[Call]](V, argumentsList) +``` + +上面代码中,`F`是一个函数对象,`[[Call]]`是它的内部方法,`F.[[call]]()`表示运行该函数,`V`表示`[[Call]]`运行时`this`的值,`argumentsList`则是调用时传入函数的参数。 + +### Completion Record + +每一个语句都会返回一个 Completion Record,表示运行结果。每个 Completion Record 有一个`[[Type]]`属性,表示运行结果的类型。 + +`[[Type]]`属性有五种可能的值。 + +- normal +- return +- throw +- break +- continue + +如果`[[Type]]`的值是`normal`,就称为 normal completion,表示运行正常。其他的值,都称为 abrupt completion。其中,开发者只需要关注`[[Type]]`为`throw`的情况,即运行出错;`break`、`continue`、`return`这三个值都只出现在特定场景,可以不用考虑。 + +## 抽象操作的标准流程 + +抽象操作的运行流程,一般是下面这样。 + +> 1. Let `resultCompletionRecord` be `AbstractOp()`. +> 1. If `resultCompletionRecord` is an abrupt completion, return `resultCompletionRecord`. +> 1. Let `result` be `resultCompletionRecord.[[Value]]`. +> 1. return `result`. + +上面的第一步是调用抽象操作`AbstractOp()`,得到`resultCompletionRecord`,这是一个 Completion Record。第二步,如果这个 Record 属于 abrupt completion,就将`resultCompletionRecord`返回给用户。如果此处没有返回,就表示运行结果正常,所得的值存放在`resultCompletionRecord.[[Value]]`属性。第三步,将这个值记为`result`。第四步,将`result`返回给用户。 + +ES6 规格将这个标准流程,使用简写的方式表达。 + +> 1. Let `result` be `AbstractOp()`. +> 1. `ReturnIfAbrupt(result)`. +> 1. return `result`. + +这个简写方式里面的`ReturnIfAbrupt(result)`,就代表了上面的第二步和第三步,即如果有报错,就返回错误,否则取出值。 + +甚至还有进一步的简写格式。 + +> 1. Let `result` be `? AbstractOp()`. +> 1. return `result`. + +上面流程的`?`,就代表`AbstractOp()`可能会报错。一旦报错,就返回错误,否则取出值。 + +除了`?`,ES 6 规格还使用另一个简写符号`!`。 + +> 1. Let `result` be `! AbstractOp()`. +> 1. return `result`. + +上面流程的`!`,代表`AbstractOp()`不会报错,返回的一定是 normal completion,总是可以取出值。 + +## 相等运算符 + +下面通过一些例子,介绍如何使用这份规格。 + +相等运算符(`==`)是一个很让人头痛的运算符,它的语法行为多变,不符合直觉。这个小节就看看规格怎么规定它的行为。 + +请看下面这个表达式,请问它的值是多少。 + +```javascript +0 == null +``` + +如果你不确定答案,或者想知道语言内部怎么处理,就可以去查看规格,[7.2.12 小节](http://www.ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison)是对相等运算符(`==`)的描述。 + +规格对每一种语法行为的描述,都分成两部分:先是总体的行为描述,然后是实现的算法细节。相等运算符的总体描述,只有一句话。 + +> “The comparison `x == y`, where `x` and `y` are values, produces `true` or `false`.” + +上面这句话的意思是,相等运算符用于比较两个值,返回`true`或`false`。 + +下面是算法细节。 + +> 1. ReturnIfAbrupt(x). +> 1. ReturnIfAbrupt(y). +> 1. If `Type(x)` is the same as `Type(y)`, then +> 1. Return the result of performing Strict Equality Comparison `x === y`. +> 1. If `x` is `null` and `y` is `undefined`, return `true`. +> 1. If `x` is `undefined` and `y` is `null`, return `true`. +> 1. If `Type(x)` is Number and `Type(y)` is String, +> return the result of the comparison `x == ToNumber(y)`. +> 1. If `Type(x)` is String and `Type(y)` is Number, +> return the result of the comparison `ToNumber(x) == y`. +> 1. If `Type(x)` is Boolean, return the result of the comparison `ToNumber(x) == y`. +> 1. If `Type(y)` is Boolean, return the result of the comparison `x == ToNumber(y)`. +> 1. If `Type(x)` is either String, Number, or Symbol and `Type(y)` is Object, then +> return the result of the comparison `x == ToPrimitive(y)`. +> 1. If `Type(x)` is Object and `Type(y)` is either String, Number, or Symbol, then +> return the result of the comparison `ToPrimitive(x) == y`. +> 1. Return `false`. + +上面这段算法,一共有 12 步,翻译如下。 + +> 1. 如果`x`不是正常值(比如抛出一个错误),中断执行。 +> 1. 如果`y`不是正常值,中断执行。 +> 1. 如果`Type(x)`与`Type(y)`相同,执行严格相等运算`x === y`。 +> 1. 如果`x`是`null`,`y`是`undefined`,返回`true`。 +> 1. 如果`x`是`undefined`,`y`是`null`,返回`true`。 +> 1. 如果`Type(x)`是数值,`Type(y)`是字符串,返回`x == ToNumber(y)`的结果。 +> 1. 如果`Type(x)`是字符串,`Type(y)`是数值,返回`ToNumber(x) == y`的结果。 +> 1. 如果`Type(x)`是布尔值,返回`ToNumber(x) == y`的结果。 +> 1. 如果`Type(y)`是布尔值,返回`x == ToNumber(y)`的结果。 +> 1. 如果`Type(x)`是字符串或数值或`Symbol`值,`Type(y)`是对象,返回`x == ToPrimitive(y)`的结果。 +> 1. 如果`Type(x)`是对象,`Type(y)`是字符串或数值或`Symbol`值,返回`ToPrimitive(x) == y`的结果。 +> 1. 返回`false`。 + +由于`0`的类型是数值,`null`的类型是 Null(这是规格[4.3.13 小节](http://www.ecma-international.org/ecma-262/6.0/#sec-terms-and-definitions-null-type)的规定,是内部 Type 运算的结果,跟`typeof`运算符无关)。因此上面的前 11 步都得不到结果,要到第 12 步才能得到`false`。 + +```javascript +0 == null // false +``` + +## 数组的空位 + +下面再看另一个例子。 + +```javascript +const a1 = [undefined, undefined, undefined]; +const a2 = [, , ,]; + +a1.length // 3 +a2.length // 3 + +a1[0] // undefined +a2[0] // undefined + +a1[0] === a2[0] // true +``` + +上面代码中,数组`a1`的成员是三个`undefined`,数组`a2`的成员是三个空位。这两个数组很相似,长度都是 3,每个位置的成员读取出来都是`undefined`。 + +但是,它们实际上存在重大差异。 + +```javascript +0 in a1 // true +0 in a2 // false + +a1.hasOwnProperty(0) // true +a2.hasOwnProperty(0) // false + +Object.keys(a1) // ["0", "1", "2"] +Object.keys(a2) // [] + +a1.map(n => 1) // [1, 1, 1] +a2.map(n => 1) // [, , ,] +``` + +上面代码一共列出了四种运算,数组`a1`和`a2`的结果都不一样。前三种运算(`in`运算符、数组的`hasOwnProperty`方法、`Object.keys`方法)都说明,数组`a2`取不到属性名。最后一种运算(数组的`map`方法)说明,数组`a2`没有发生遍历。 + +为什么`a1`与`a2`成员的行为不一致?数组的成员是`undefined`或空位,到底有什么不同? + +规格的[12.2.5 小节《数组的初始化》](http://www.ecma-international.org/ecma-262/6.0/#sec-array-initializer)给出了答案。 + +> “Array elements may be elided at the beginning, middle or end of the element list. Whenever a comma in the element list is not preceded by an AssignmentExpression (i.e., a comma at the beginning or after another comma), the missing array element contributes to the length of the Array and increases the index of subsequent elements. Elided array elements are not defined. If an element is elided at the end of an array, that element does not contribute to the length of the Array.” + +翻译如下。 + +> "数组成员可以省略。只要逗号前面没有任何表达式,数组的`length`属性就会加 1,并且相应增加其后成员的位置索引。被省略的成员不会被定义。如果被省略的成员是数组最后一个成员,则不会导致数组`length`属性增加。” + +上面的规格说得很清楚,数组的空位会反映在`length`属性,也就是说空位有自己的位置,但是这个位置的值是未定义,即这个值是不存在的。如果一定要读取,结果就是`undefined`(因为`undefined`在 JavaScript 语言中表示不存在)。 + +这就解释了为什么`in`运算符、数组的`hasOwnProperty`方法、`Object.keys`方法,都取不到空位的属性名。因为这个属性名根本就不存在,规格里面没说要为空位分配属性名(位置索引),只说要为下一个元素的位置索引加 1。 + +至于为什么数组的`map`方法会跳过空位,请看下一节。 + +## 数组的 map 方法 + +规格的[22.1.3.15 小节](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.map)定义了数组的`map`方法。该小节先是总体描述`map`方法的行为,里面没有提到数组空位。 + +后面的算法描述是这样的。 + +> 1. Let `O` be `ToObject(this value)`. +> 1. `ReturnIfAbrupt(O)`. +> 1. Let `len` be `ToLength(Get(O, "length"))`. +> 1. `ReturnIfAbrupt(len)`. +> 1. If `IsCallable(callbackfn)` is `false`, throw a TypeError exception. +> 1. If `thisArg` was supplied, let `T` be `thisArg`; else let `T` be `undefined`. +> 1. Let `A` be `ArraySpeciesCreate(O, len)`. +> 1. `ReturnIfAbrupt(A)`. +> 1. Let `k` be 0. +> 1. Repeat, while `k` < `len` +> 1. Let `Pk` be `ToString(k)`. +> 1. Let `kPresent` be `HasProperty(O, Pk)`. +> 1. `ReturnIfAbrupt(kPresent)`. +> 1. If `kPresent` is `true`, then +> 1. Let `kValue` be `Get(O, Pk)`. +> 1. `ReturnIfAbrupt(kValue)`. +> 1. Let `mappedValue` be `Call(callbackfn, T, «kValue, k, O»)`. +> 1. `ReturnIfAbrupt(mappedValue)`. +> 1. Let `status` be `CreateDataPropertyOrThrow (A, Pk, mappedValue)`. +> 1. `ReturnIfAbrupt(status)`. +> 1. Increase `k` by 1. +> 1. Return `A`. + +翻译如下。 + +> 1. 得到当前数组的`this`对象 +> 1. 如果报错就返回 +> 1. 求出当前数组的`length`属性 +> 1. 如果报错就返回 +> 1. 如果 map 方法的参数`callbackfn`不可执行,就报错 +> 1. 如果 map 方法的参数之中,指定了`this`,就让`T`等于该参数,否则`T`为`undefined` +> 1. 生成一个新的数组`A`,跟当前数组的`length`属性保持一致 +> 1. 如果报错就返回 +> 1. 设定`k`等于 0 +> 1. 只要`k`小于当前数组的`length`属性,就重复下面步骤 +> 1. 设定`Pk`等于`ToString(k)`,即将`K`转为字符串 +> 1. 设定`kPresent`等于`HasProperty(O, Pk)`,即求当前数组有没有指定属性 +> 1. 如果报错就返回 +> 1. 如果`kPresent`等于`true`,则进行下面步骤 +> 1. 设定`kValue`等于`Get(O, Pk)`,取出当前数组的指定属性 +> 1. 如果报错就返回 +> 1. 设定`mappedValue`等于`Call(callbackfn, T, «kValue, k, O»)`,即执行回调函数 +> 1. 如果报错就返回 +> 1. 设定`status`等于`CreateDataPropertyOrThrow (A, Pk, mappedValue)`,即将回调函数的值放入`A`数组的指定位置 +> 1. 如果报错就返回 +> 1. `k`增加 1 +> 1. 返回`A` + +仔细查看上面的算法,可以发现,当处理一个全是空位的数组时,前面步骤都没有问题。进入第 10 步中第 2 步时,`kPresent`会报错,因为空位对应的属性名,对于数组来说是不存在的,因此就会返回,不会进行后面的步骤。 + +```javascript +const arr = [, , ,]; +arr.map(n => { + console.log(n); + return 1; +}) // [, , ,] +``` + +上面代码中,`arr`是一个全是空位的数组,`map`方法遍历成员时,发现是空位,就直接跳过,不会进入回调函数。因此,回调函数里面的`console.log`语句根本不会执行,整个`map`方法返回一个全是空位的新数组。 + +V8 引擎对`map`方法的[实现](https://github.com/v8/v8/blob/44c44521ae11859478b42004f57ea93df52526ee/src/js/array.js#L1347)如下,可以看到跟规格的算法描述完全一致。 + +```javascript +function ArrayMap(f, receiver) { + CHECK_OBJECT_COERCIBLE(this, "Array.prototype.map"); + + // Pull out the length so that modifications to the length in the + // loop will not affect the looping and side effects are visible. + var array = TO_OBJECT(this); + var length = TO_LENGTH_OR_UINT32(array.length); + return InnerArrayMap(f, receiver, array, length); +} + +function InnerArrayMap(f, receiver, array, length) { + if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); + + var accumulator = new InternalArray(length); + var is_array = IS_ARRAY(array); + var stepping = DEBUG_IS_STEPPING(f); + for (var i = 0; i < length; i++) { + if (HAS_INDEX(array, i, is_array)) { + var element = array[i]; + // Prepare break slots for debugger step in. + if (stepping) %DebugPrepareStepInIfStepping(f); + accumulator[i] = %_Call(f, receiver, element, i, array); + } + } + var result = new GlobalArray(); + %MoveArrayContents(accumulator, result); + return result; +} +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/string.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/string.md" new file mode 100755 index 000000000..22540184b --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/string.md" @@ -0,0 +1,932 @@ +# 字符串的扩展 + +ES6 加强了对 Unicode 的支持,并且扩展了字符串对象。 + +## 字符的 Unicode 表示法 + +JavaScript 允许采用`\uxxxx`形式表示一个字符,其中`xxxx`表示字符的 Unicode 码点。 + +```javascript +"\u0061" +// "a" +``` + +但是,这种表示法只限于码点在`\u0000`~`\uFFFF`之间的字符。超出这个范围的字符,必须用两个双字节的形式表示。 + +```javascript +"\uD842\uDFB7" +// "𠮷" + +"\u20BB7" +// " 7" +``` + +上面代码表示,如果直接在`\u`后面跟上超过`0xFFFF`的数值(比如`\u20BB7`),JavaScript 会理解成`\u20BB+7`。由于`\u20BB`是一个不可打印字符,所以只会显示一个空格,后面跟着一个`7`。 + +ES6 对这一点做出了改进,只要将码点放入大括号,就能正确解读该字符。 + +```javascript +"\u{20BB7}" +// "𠮷" + +"\u{41}\u{42}\u{43}" +// "ABC" + +let hello = 123; +hell\u{6F} // 123 + +'\u{1F680}' === '\uD83D\uDE80' +// true +``` + +上面代码中,最后一个例子表明,大括号表示法与四字节的 UTF-16 编码是等价的。 + +有了这种表示法之后,JavaScript 共有 6 种方法可以表示一个字符。 + +```javascript +'\z' === 'z' // true +'\172' === 'z' // true +'\x7A' === 'z' // true +'\u007A' === 'z' // true +'\u{7A}' === 'z' // true +``` + +## codePointAt() + +JavaScript 内部,字符以 UTF-16 的格式储存,每个字符固定为`2`个字节。对于那些需要`4`个字节储存的字符(Unicode 码点大于`0xFFFF`的字符),JavaScript 会认为它们是两个字符。 + +```javascript +var s = "𠮷"; + +s.length // 2 +s.charAt(0) // '' +s.charAt(1) // '' +s.charCodeAt(0) // 55362 +s.charCodeAt(1) // 57271 +``` + +上面代码中,汉字“𠮷”(注意,这个字不是“吉祥”的“吉”)的码点是`0x20BB7`,UTF-16 编码为`0xD842 0xDFB7`(十进制为`55362 57271`),需要`4`个字节储存。对于这种`4`个字节的字符,JavaScript 不能正确处理,字符串长度会误判为`2`,而且`charAt`方法无法读取整个字符,`charCodeAt`方法只能分别返回前两个字节和后两个字节的值。 + +ES6 提供了`codePointAt`方法,能够正确处理 4 个字节储存的字符,返回一个字符的码点。 + +```javascript +let s = '𠮷a'; + +s.codePointAt(0) // 134071 +s.codePointAt(1) // 57271 + +s.codePointAt(2) // 97 +``` + +`codePointAt`方法的参数,是字符在字符串中的位置(从 0 开始)。上面代码中,JavaScript 将“𠮷a”视为三个字符,codePointAt 方法在第一个字符上,正确地识别了“𠮷”,返回了它的十进制码点 134071(即十六进制的`20BB7`)。在第二个字符(即“𠮷”的后两个字节)和第三个字符“a”上,`codePointAt`方法的结果与`charCodeAt`方法相同。 + +总之,`codePointAt`方法会正确返回 32 位的 UTF-16 字符的码点。对于那些两个字节储存的常规字符,它的返回结果与`charCodeAt`方法相同。 + +`codePointAt`方法返回的是码点的十进制值,如果想要十六进制的值,可以使用`toString`方法转换一下。 + +```javascript +let s = '𠮷a'; + +s.codePointAt(0).toString(16) // "20bb7" +s.codePointAt(2).toString(16) // "61" +``` + +你可能注意到了,`codePointAt`方法的参数,仍然是不正确的。比如,上面代码中,字符`a`在字符串`s`的正确位置序号应该是 1,但是必须向`codePointAt`方法传入 2。解决这个问题的一个办法是使用`for...of`循环,因为它会正确识别 32 位的 UTF-16 字符。 + +```javascript +let s = '𠮷a'; +for (let ch of s) { + console.log(ch.codePointAt(0).toString(16)); +} +// 20bb7 +// 61 +``` + +`codePointAt`方法是测试一个字符由两个字节还是由四个字节组成的最简单方法。 + +```javascript +function is32Bit(c) { + return c.codePointAt(0) > 0xFFFF; +} + +is32Bit("𠮷") // true +is32Bit("a") // false +``` + +## String.fromCodePoint() + +ES5 提供`String.fromCharCode`方法,用于从码点返回对应字符,但是这个方法不能识别 32 位的 UTF-16 字符(Unicode 编号大于`0xFFFF`)。 + +```javascript +String.fromCharCode(0x20BB7) +// "ஷ" +``` + +上面代码中,`String.fromCharCode`不能识别大于`0xFFFF`的码点,所以`0x20BB7`就发生了溢出,最高位`2`被舍弃了,最后返回码点`U+0BB7`对应的字符,而不是码点`U+20BB7`对应的字符。 + +ES6 提供了`String.fromCodePoint`方法,可以识别大于`0xFFFF`的字符,弥补了`String.fromCharCode`方法的不足。在作用上,正好与`codePointAt`方法相反。 + +```javascript +String.fromCodePoint(0x20BB7) +// "𠮷" +String.fromCodePoint(0x78, 0x1f680, 0x79) === 'x\uD83D\uDE80y' +// true +``` + +上面代码中,如果`String.fromCodePoint`方法有多个参数,则它们会被合并成一个字符串返回。 + +注意,`fromCodePoint`方法定义在`String`对象上,而`codePointAt`方法定义在字符串的实例对象上。 + +## 字符串的遍历器接口 + +ES6 为字符串添加了遍历器接口(详见《Iterator》一章),使得字符串可以被`for...of`循环遍历。 + +```javascript +for (let codePoint of 'foo') { + console.log(codePoint) +} +// "f" +// "o" +// "o" +``` + +除了遍历字符串,这个遍历器最大的优点是可以识别大于`0xFFFF`的码点,传统的`for`循环无法识别这样的码点。 + +```javascript +let text = String.fromCodePoint(0x20BB7); + +for (let i = 0; i < text.length; i++) { + console.log(text[i]); +} +// " " +// " " + +for (let i of text) { + console.log(i); +} +// "𠮷" +``` + +上面代码中,字符串`text`只有一个字符,但是`for`循环会认为它包含两个字符(都不可打印),而`for...of`循环会正确识别出这一个字符。 + +## normalize() + +许多欧洲语言有语调符号和重音符号。为了表示它们,Unicode 提供了两种方法。一种是直接提供带重音符号的字符,比如`Ǒ`(\u01D1)。另一种是提供合成符号(combining character),即原字符与重音符号的合成,两个字符合成一个字符,比如`O`(\u004F)和`ˇ`(\u030C)合成`Ǒ`(\u004F\u030C)。 + +这两种表示方法,在视觉和语义上都等价,但是 JavaScript 不能识别。 + +```javascript +'\u01D1'==='\u004F\u030C' //false + +'\u01D1'.length // 1 +'\u004F\u030C'.length // 2 +``` + +上面代码表示,JavaScript 将合成字符视为两个字符,导致两种表示方法不相等。 + +ES6 提供字符串实例的`normalize()`方法,用来将字符的不同表示方法统一为同样的形式,这称为 Unicode 正规化。 + +```javascript +'\u01D1'.normalize() === '\u004F\u030C'.normalize() +// true +``` + +`normalize`方法可以接受一个参数来指定`normalize`的方式,参数的四个可选值如下。 + +- `NFC`,默认参数,表示“标准等价合成”(Normalization Form Canonical Composition),返回多个简单字符的合成字符。所谓“标准等价”指的是视觉和语义上的等价。 +- `NFD`,表示“标准等价分解”(Normalization Form Canonical Decomposition),即在标准等价的前提下,返回合成字符分解的多个简单字符。 +- `NFKC`,表示“兼容等价合成”(Normalization Form Compatibility Composition),返回合成字符。所谓“兼容等价”指的是语义上存在等价,但视觉上不等价,比如“囍”和“喜喜”。(这只是用来举例,`normalize`方法不能识别中文。) +- `NFKD`,表示“兼容等价分解”(Normalization Form Compatibility Decomposition),即在兼容等价的前提下,返回合成字符分解的多个简单字符。 + +```javascript +'\u004F\u030C'.normalize('NFC').length // 1 +'\u004F\u030C'.normalize('NFD').length // 2 +``` + +上面代码表示,`NFC`参数返回字符的合成形式,`NFD`参数返回字符的分解形式。 + +不过,`normalize`方法目前不能识别三个或三个以上字符的合成。这种情况下,还是只能使用正则表达式,通过 Unicode 编号区间判断。 + +## includes(), startsWith(), endsWith() + +传统上,JavaScript 只有`indexOf`方法,可以用来确定一个字符串是否包含在另一个字符串中。ES6 又提供了三种新方法。 + +- **includes()**:返回布尔值,表示是否找到了参数字符串。 +- **startsWith()**:返回布尔值,表示参数字符串是否在原字符串的头部。 +- **endsWith()**:返回布尔值,表示参数字符串是否在原字符串的尾部。 + +```javascript +let s = 'Hello world!'; + +s.startsWith('Hello') // true +s.endsWith('!') // true +s.includes('o') // true +``` + +这三个方法都支持第二个参数,表示开始搜索的位置。 + +```javascript +let s = 'Hello world!'; + +s.startsWith('world', 6) // true +s.endsWith('Hello', 5) // true +s.includes('Hello', 6) // false +``` + +上面代码表示,使用第二个参数`n`时,`endsWith`的行为与其他两个方法有所不同。它针对前`n`个字符,而其他两个方法针对从第`n`个位置直到字符串结束。 + +## repeat() + +`repeat`方法返回一个新字符串,表示将原字符串重复`n`次。 + +```javascript +'x'.repeat(3) // "xxx" +'hello'.repeat(2) // "hellohello" +'na'.repeat(0) // "" +``` + +参数如果是小数,会被取整。 + +```javascript +'na'.repeat(2.9) // "nana" +``` + +如果`repeat`的参数是负数或者`Infinity`,会报错。 + +```javascript +'na'.repeat(Infinity) +// RangeError +'na'.repeat(-1) +// RangeError +``` + +但是,如果参数是 0 到-1 之间的小数,则等同于 0,这是因为会先进行取整运算。0 到-1 之间的小数,取整以后等于`-0`,`repeat`视同为 0。 + +```javascript +'na'.repeat(-0.9) // "" +``` + +参数`NaN`等同于 0。 + +```javascript +'na'.repeat(NaN) // "" +``` + +如果`repeat`的参数是字符串,则会先转换成数字。 + +```javascript +'na'.repeat('na') // "" +'na'.repeat('3') // "nanana" +``` + +## padStart(),padEnd() + +ES2017 引入了字符串补全长度的功能。如果某个字符串不够指定长度,会在头部或尾部补全。`padStart()`用于头部补全,`padEnd()`用于尾部补全。 + +```javascript +'x'.padStart(5, 'ab') // 'ababx' +'x'.padStart(4, 'ab') // 'abax' + +'x'.padEnd(5, 'ab') // 'xabab' +'x'.padEnd(4, 'ab') // 'xaba' +``` + +上面代码中,`padStart()`和`padEnd()`一共接受两个参数,第一个参数是字符串补全生效的最大长度,第二个参数是用来补全的字符串。 + +如果原字符串的长度,等于或大于最大长度,则字符串补全不生效,返回原字符串。 + +```javascript +'xxx'.padStart(2, 'ab') // 'xxx' +'xxx'.padEnd(2, 'ab') // 'xxx' +``` + +如果用来补全的字符串与原字符串,两者的长度之和超过了最大长度,则会截去超出位数的补全字符串。 + +```javascript +'abc'.padStart(10, '0123456789') +// '0123456abc' +``` + +如果省略第二个参数,默认使用空格补全长度。 + +```javascript +'x'.padStart(4) // ' x' +'x'.padEnd(4) // 'x ' +``` + +`padStart()`的常见用途是为数值补全指定位数。下面代码生成 10 位的数值字符串。 + +```javascript +'1'.padStart(10, '0') // "0000000001" +'12'.padStart(10, '0') // "0000000012" +'123456'.padStart(10, '0') // "0000123456" +``` + +另一个用途是提示字符串格式。 + +```javascript +'12'.padStart(10, 'YYYY-MM-DD') // "YYYY-MM-12" +'09-12'.padStart(10, 'YYYY-MM-DD') // "YYYY-09-12" +``` + +## matchAll() + +`matchAll`方法返回一个正则表达式在当前字符串的所有匹配,详见《正则的扩展》的一章。 + +## 模板字符串 + +传统的 JavaScript 语言,输出模板通常是这样写的(下面使用了 jQuery 的方法)。 + +```javascript +$('#result').append( + 'There are <b>' + basket.count + '</b> ' + + 'items in your basket, ' + + '<em>' + basket.onSale + + '</em> are on sale!' +); +``` + +上面这种写法相当繁琐不方便,ES6 引入了模板字符串解决这个问题。 + +```javascript +$('#result').append(` + There are <b>${basket.count}</b> items + in your basket, <em>${basket.onSale}</em> + are on sale! +`); +``` + +模板字符串(template string)是增强版的字符串,用反引号(`)标识。它可以当作普通字符串使用,也可以用来定义多行字符串,或者在字符串中嵌入变量。 + +```javascript +// 普通字符串 +`In JavaScript '\n' is a line-feed.` + +// 多行字符串 +`In JavaScript this is + not legal.` + +console.log(`string text line 1 +string text line 2`); + +// 字符串中嵌入变量 +let name = "Bob", time = "today"; +`Hello ${name}, how are you ${time}?` +``` + +上面代码中的模板字符串,都是用反引号表示。如果在模板字符串中需要使用反引号,则前面要用反斜杠转义。 + +```javascript +let greeting = `\`Yo\` World!`; +``` + +如果使用模板字符串表示多行字符串,所有的空格和缩进都会被保留在输出之中。 + +```javascript +$('#list').html(` +<ul> + <li>first</li> + <li>second</li> +</ul> +`); +``` + +上面代码中,所有模板字符串的空格和换行,都是被保留的,比如`<ul>`标签前面会有一个换行。如果你不想要这个换行,可以使用`trim`方法消除它。 + +```javascript +$('#list').html(` +<ul> + <li>first</li> + <li>second</li> +</ul> +`.trim()); +``` + +模板字符串中嵌入变量,需要将变量名写在`${}`之中。 + +```javascript +function authorize(user, action) { + if (!user.hasPrivilege(action)) { + throw new Error( + // 传统写法为 + // 'User ' + // + user.name + // + ' is not authorized to do ' + // + action + // + '.' + `User ${user.name} is not authorized to do ${action}.`); + } +} +``` + +大括号内部可以放入任意的 JavaScript 表达式,可以进行运算,以及引用对象属性。 + +```javascript +let x = 1; +let y = 2; + +`${x} + ${y} = ${x + y}` +// "1 + 2 = 3" + +`${x} + ${y * 2} = ${x + y * 2}` +// "1 + 4 = 5" + +let obj = {x: 1, y: 2}; +`${obj.x + obj.y}` +// "3" +``` + +模板字符串之中还能调用函数。 + +```javascript +function fn() { + return "Hello World"; +} + +`foo ${fn()} bar` +// foo Hello World bar +``` + +如果大括号中的值不是字符串,将按照一般的规则转为字符串。比如,大括号中是一个对象,将默认调用对象的`toString`方法。 + +如果模板字符串中的变量没有声明,将报错。 + +```javascript +// 变量place没有声明 +let msg = `Hello, ${place}`; +// 报错 +``` + +由于模板字符串的大括号内部,就是执行 JavaScript 代码,因此如果大括号内部是一个字符串,将会原样输出。 + +```javascript +`Hello ${'World'}` +// "Hello World" +``` + +模板字符串甚至还能嵌套。 + +```javascript +const tmpl = addrs => ` + <table> + ${addrs.map(addr => ` + <tr><td>${addr.first}</td></tr> + <tr><td>${addr.last}</td></tr> + `).join('')} + </table> +`; +``` + +上面代码中,模板字符串的变量之中,又嵌入了另一个模板字符串,使用方法如下。 + +```javascript +const data = [ + { first: '<Jane>', last: 'Bond' }, + { first: 'Lars', last: '<Croft>' }, +]; + +console.log(tmpl(data)); +// <table> +// +// <tr><td><Jane></td></tr> +// <tr><td>Bond</td></tr> +// +// <tr><td>Lars</td></tr> +// <tr><td><Croft></td></tr> +// +// </table> +``` + +如果需要引用模板字符串本身,在需要时执行,可以像下面这样写。 + +```javascript +// 写法一 +let str = 'return ' + '`Hello ${name}!`'; +let func = new Function('name', str); +func('Jack') // "Hello Jack!" + +// 写法二 +let str = '(name) => `Hello ${name}!`'; +let func = eval.call(null, str); +func('Jack') // "Hello Jack!" +``` + +## 实例:模板编译 + +下面,我们来看一个通过模板字符串,生成正式模板的实例。 + +```javascript +let template = ` +<ul> + <% for(let i=0; i < data.supplies.length; i++) { %> + <li><%= data.supplies[i] %></li> + <% } %> +</ul> +`; +``` + +上面代码在模板字符串之中,放置了一个常规模板。该模板使用`<%...%>`放置 JavaScript 代码,使用`<%= ... %>`输出 JavaScript 表达式。 + +怎么编译这个模板字符串呢? + +一种思路是将其转换为 JavaScript 表达式字符串。 + +```javascript +echo('<ul>'); +for(let i=0; i < data.supplies.length; i++) { + echo('<li>'); + echo(data.supplies[i]); + echo('</li>'); +}; +echo('</ul>'); +``` + +这个转换使用正则表达式就行了。 + +```javascript +let evalExpr = /<%=(.+?)%>/g; +let expr = /<%([\s\S]+?)%>/g; + +template = template + .replace(evalExpr, '`); \n echo( $1 ); \n echo(`') + .replace(expr, '`); \n $1 \n echo(`'); + +template = 'echo(`' + template + '`);'; +``` + +然后,将`template`封装在一个函数里面返回,就可以了。 + +```javascript +let script = +`(function parse(data){ + let output = ""; + + function echo(html){ + output += html; + } + + ${ template } + + return output; +})`; + +return script; +``` + +将上面的内容拼装成一个模板编译函数`compile`。 + +```javascript +function compile(template){ + const evalExpr = /<%=(.+?)%>/g; + const expr = /<%([\s\S]+?)%>/g; + + template = template + .replace(evalExpr, '`); \n echo( $1 ); \n echo(`') + .replace(expr, '`); \n $1 \n echo(`'); + + template = 'echo(`' + template + '`);'; + + let script = + `(function parse(data){ + let output = ""; + + function echo(html){ + output += html; + } + + ${ template } + + return output; + })`; + + return script; +} +``` + +`compile`函数的用法如下。 + +```javascript +let parse = eval(compile(template)); +div.innerHTML = parse({ supplies: [ "broom", "mop", "cleaner" ] }); +// <ul> +// <li>broom</li> +// <li>mop</li> +// <li>cleaner</li> +// </ul> +``` + +## 标签模板 + +模板字符串的功能,不仅仅是上面这些。它可以紧跟在一个函数名后面,该函数将被调用来处理这个模板字符串。这被称为“标签模板”功能(tagged template)。 + +```javascript +alert`123` +// 等同于 +alert(123) +``` + +标签模板其实不是模板,而是函数调用的一种特殊形式。“标签”指的就是函数,紧跟在后面的模板字符串就是它的参数。 + +但是,如果模板字符里面有变量,就不是简单的调用了,而是会将模板字符串先处理成多个参数,再调用函数。 + +```javascript +let a = 5; +let b = 10; + +tag`Hello ${ a + b } world ${ a * b }`; +// 等同于 +tag(['Hello ', ' world ', ''], 15, 50); +``` + +上面代码中,模板字符串前面有一个标识名`tag`,它是一个函数。整个表达式的返回值,就是`tag`函数处理模板字符串后的返回值。 + +函数`tag`依次会接收到多个参数。 + +```javascript +function tag(stringArr, value1, value2){ + // ... +} + +// 等同于 + +function tag(stringArr, ...values){ + // ... +} +``` + +`tag`函数的第一个参数是一个数组,该数组的成员是模板字符串中那些没有变量替换的部分,也就是说,变量替换只发生在数组的第一个成员与第二个成员之间、第二个成员与第三个成员之间,以此类推。 + +`tag`函数的其他参数,都是模板字符串各个变量被替换后的值。由于本例中,模板字符串含有两个变量,因此`tag`会接受到`value1`和`value2`两个参数。 + +`tag`函数所有参数的实际值如下。 + +- 第一个参数:`['Hello ', ' world ', '']` +- 第二个参数: 15 +- 第三个参数:50 + +也就是说,`tag`函数实际上以下面的形式调用。 + +```javascript +tag(['Hello ', ' world ', ''], 15, 50) +``` + +我们可以按照需要编写`tag`函数的代码。下面是`tag`函数的一种写法,以及运行结果。 + +```javascript +let a = 5; +let b = 10; + +function tag(s, v1, v2) { + console.log(s[0]); + console.log(s[1]); + console.log(s[2]); + console.log(v1); + console.log(v2); + + return "OK"; +} + +tag`Hello ${ a + b } world ${ a * b}`; +// "Hello " +// " world " +// "" +// 15 +// 50 +// "OK" +``` + +下面是一个更复杂的例子。 + +```javascript +let total = 30; +let msg = passthru`The total is ${total} (${total*1.05} with tax)`; + +function passthru(literals) { + let result = ''; + let i = 0; + + while (i < literals.length) { + result += literals[i++]; + if (i < arguments.length) { + result += arguments[i]; + } + } + + return result; +} + +msg // "The total is 30 (31.5 with tax)" +``` + +上面这个例子展示了,如何将各个参数按照原来的位置拼合回去。 + +`passthru`函数采用 rest 参数的写法如下。 + +```javascript +function passthru(literals, ...values) { + let output = ""; + let index; + for (index = 0; index < values.length; index++) { + output += literals[index] + values[index]; + } + + output += literals[index] + return output; +} +``` + +“标签模板”的一个重要应用,就是过滤 HTML 字符串,防止用户输入恶意内容。 + +```javascript +let message = + SaferHTML`<p>${sender} has sent you a message.</p>`; + +function SaferHTML(templateData) { + let s = templateData[0]; + for (let i = 1; i < arguments.length; i++) { + let arg = String(arguments[i]); + + // Escape special characters in the substitution. + s += arg.replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">"); + + // Don't escape special characters in the template. + s += templateData[i]; + } + return s; +} +``` + +上面代码中,`sender`变量往往是用户提供的,经过`SaferHTML`函数处理,里面的特殊字符都会被转义。 + +```javascript +let sender = '<script>alert("abc")</script>'; // 恶意代码 +let message = SaferHTML`<p>${sender} has sent you a message.</p>`; + +message +// <p><script>alert("abc")</script> has sent you a message.</p> +``` + +标签模板的另一个应用,就是多语言转换(国际化处理)。 + +```javascript +i18n`Welcome to ${siteName}, you are visitor number ${visitorNumber}!` +// "欢迎访问xxx,您是第xxxx位访问者!" +``` + +模板字符串本身并不能取代 Mustache 之类的模板库,因为没有条件判断和循环处理功能,但是通过标签函数,你可以自己添加这些功能。 + +```javascript +// 下面的hashTemplate函数 +// 是一个自定义的模板处理函数 +let libraryHtml = hashTemplate` + <ul> + #for book in ${myBooks} + <li><i>#{book.title}</i> by #{book.author}</li> + #end + </ul> +`; +``` + +除此之外,你甚至可以使用标签模板,在 JavaScript 语言之中嵌入其他语言。 + +```javascript +jsx` + <div> + <input + ref='input' + onChange='${this.handleChange}' + defaultValue='${this.state.value}' /> + ${this.state.value} + </div> +` +``` + +上面的代码通过`jsx`函数,将一个 DOM 字符串转为 React 对象。你可以在 GitHub 找到`jsx`函数的[具体实现](https://gist.github.com/lygaret/a68220defa69174bdec5)。 + +下面则是一个假想的例子,通过`java`函数,在 JavaScript 代码之中运行 Java 代码。 + +```javascript +java` +class HelloWorldApp { + public static void main(String[] args) { + System.out.println("Hello World!"); // Display the string. + } +} +` +HelloWorldApp.main(); +``` + +模板处理函数的第一个参数(模板字符串数组),还有一个`raw`属性。 + +```javascript +console.log`123` +// ["123", raw: Array[1]] +``` + +上面代码中,`console.log`接受的参数,实际上是一个数组。该数组有一个`raw`属性,保存的是转义后的原字符串。 + +请看下面的例子。 + +```javascript +tag`First line\nSecond line` + +function tag(strings) { + console.log(strings.raw[0]); + // strings.raw[0] 为 "First line\\nSecond line" + // 打印输出 "First line\nSecond line" +} +``` + +上面代码中,`tag`函数的第一个参数`strings`,有一个`raw`属性,也指向一个数组。该数组的成员与`strings`数组完全一致。比如,`strings`数组是`["First line\nSecond line"]`,那么`strings.raw`数组就是`["First line\\nSecond line"]`。两者唯一的区别,就是字符串里面的斜杠都被转义了。比如,strings.raw 数组会将`\n`视为`\\`和`n`两个字符,而不是换行符。这是为了方便取得转义之前的原始模板而设计的。 + +## String.raw() + +ES6 还为原生的 String 对象,提供了一个`raw`方法。 + +`String.raw`方法,往往用来充当模板字符串的处理函数,返回一个斜杠都被转义(即斜杠前面再加一个斜杠)的字符串,对应于替换变量后的模板字符串。 + +```javascript +String.raw`Hi\n${2+3}!`; +// 返回 "Hi\\n5!" + +String.raw`Hi\u000A!`; +// 返回 "Hi\\u000A!" +``` + +如果原字符串的斜杠已经转义,那么`String.raw`会进行再次转义。 + +```javascript +String.raw`Hi\\n` +// 返回 "Hi\\\\n" +``` + +`String.raw`方法可以作为处理模板字符串的基本方法,它会将所有变量替换,而且对斜杠进行转义,方便下一步作为字符串来使用。 + +`String.raw`方法也可以作为正常的函数使用。这时,它的第一个参数,应该是一个具有`raw`属性的对象,且`raw`属性的值应该是一个数组。 + +```javascript +String.raw({ raw: 'test' }, 0, 1, 2); +// 't0e1s2t' + +// 等同于 +String.raw({ raw: ['t','e','s','t'] }, 0, 1, 2); +``` + +作为函数,`String.raw`的代码实现基本如下。 + +```javascript +String.raw = function (strings, ...values) { + let output = ''; + let index; + for (index = 0; index < values.length; index++) { + output += strings.raw[index] + values[index]; + } + + output += strings.raw[index] + return output; +} +``` + +## 模板字符串的限制 + +前面提到标签模板里面,可以内嵌其他语言。但是,模板字符串默认会将字符串转义,导致无法嵌入其他语言。 + +举例来说,标签模板里面可以嵌入 LaTEX 语言。 + +```javascript +function latex(strings) { + // ... +} + +let document = latex` +\newcommand{\fun}{\textbf{Fun!}} // 正常工作 +\newcommand{\unicode}{\textbf{Unicode!}} // 报错 +\newcommand{\xerxes}{\textbf{King!}} // 报错 + +Breve over the h goes \u{h}ere // 报错 +` +``` + +上面代码中,变量`document`内嵌的模板字符串,对于 LaTEX 语言来说完全是合法的,但是 JavaScript 引擎会报错。原因就在于字符串的转义。 + +模板字符串会将`\u00FF`和`\u{42}`当作 Unicode 字符进行转义,所以`\unicode`解析时报错;而`\x56`会被当作十六进制字符串转义,所以`\xerxes`会报错。也就是说,`\u`和`\x`在 LaTEX 里面有特殊含义,但是 JavaScript 将它们转义了。 + +为了解决这个问题,ES2018 [放松](https://tc39.github.io/proposal-template-literal-revision/)了对标签模板里面的字符串转义的限制。如果遇到不合法的字符串转义,就返回`undefined`,而不是报错,并且从`raw`属性上面可以得到原始字符串。 + +```javascript +function tag(strs) { + strs[0] === undefined + strs.raw[0] === "\\unicode and \\u{55}"; +} +tag`\unicode and \u{55}` +``` + +上面代码中,模板字符串原本是应该报错的,但是由于放松了对字符串转义的限制,所以不报错了,JavaScript 引擎将第一个字符设置为`undefined`,但是`raw`属性依然可以得到原始字符串,因此`tag`函数还是可以对原字符串进行处理。 + +注意,这种对字符串转义的放松,只在标签模板解析字符串时生效,不是标签模板的场合,依然会报错。 + +```javascript +let bad = `bad escape sequence: \unicode`; // 报错 +``` diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/style.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/style.md" old mode 100644 new mode 100755 similarity index 76% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/style.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/style.md" index 37f1ae4d7..14d4aece0 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/docs/style.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/style.md" @@ -1,14 +1,14 @@ # 编程风格 -本章探讨如何将ES6的新语法,运用到编码实践之中,与传统的JavaScript语法结合在一起,写出合理的、易于阅读和维护的代码。 +本章探讨如何将 ES6 的新语法,运用到编码实践之中,与传统的 JavaScript 语法结合在一起,写出合理的、易于阅读和维护的代码。 -多家公司和组织已经公开了它们的风格规范,具体可参阅[jscs.info](http://jscs.info/),下面的内容主要参考了[Airbnb](https://github.com/airbnb/javascript)的JavaScript风格规范。 +多家公司和组织已经公开了它们的风格规范,下面的内容主要参考了 [Airbnb](https://github.com/airbnb/javascript) 公司的 JavaScript 风格规范。 ## 块级作用域 **(1)let 取代 var** -ES6提出了两个新的声明变量的命令:`let`和`const`。其中,`let`完全可以取代`var`,因为两者语义相同,而且`let`没有副作用。 +ES6 提出了两个新的声明变量的命令:`let`和`const`。其中,`let`完全可以取代`var`,因为两者语义相同,而且`let`没有副作用。 ```javascript 'use strict'; @@ -29,7 +29,7 @@ for (let i = 0; i < 10; i++) { ```javascript 'use strict'; -if(true) { +if (true) { console.log(x); // ReferenceError let x = 'hello'; } @@ -43,7 +43,7 @@ if(true) { 在`let`和`const`之间,建议优先使用`const`,尤其是在全局环境,不应该设置变量,只应设置常量。 -`const`优于`let`有几个原因。一个是`const`可以提醒阅读程序的人,这个变量不应该改变;另一个是`const`比较符合函数式编程思想,运算不改变值,只是新建值,而且这样也有利于将来的分布式运算;最后一个原因是 JavaScript 编译器会对`const`进行优化,所以多使用`const`,有利于提供程序的运行效率,也就是说`let`和`const`的本质区别,其实是编译器内部的处理不同。 +`const`优于`let`有几个原因。一个是`const`可以提醒阅读程序的人,这个变量不应该改变;另一个是`const`比较符合函数式编程思想,运算不改变值,只是新建值,而且这样也有利于将来的分布式运算;最后一个原因是 JavaScript 编译器会对`const`进行优化,所以多使用`const`,有利于提高程序的运行效率,也就是说`let`和`const`的本质区别,其实是编译器内部的处理不同。 ```javascript // bad @@ -62,7 +62,7 @@ const [a, b, c] = [1, 2, 3]; 所有的函数都应该设置为常量。 -长远来看,JavaScript可能会有多线程的实现(比如Intel的River Trail那一类的项目),这时`let`表示的变量,只应出现在单线程运行的代码中,不能是多线程共享的,这样有利于保证线程安全。 +长远来看,JavaScript 可能会有多线程的实现(比如 Intel 公司的 River Trail 那一类的项目),这时`let`表示的变量,只应出现在单线程运行的代码中,不能是多线程共享的,这样有利于保证线程安全。 ## 字符串 @@ -79,7 +79,6 @@ const c = `foobar`; // good const a = 'foobar'; const b = `foo${a}bar`; -const c = 'foobar'; ``` ## 解构赋值 @@ -234,7 +233,7 @@ for (i = 0; i < len; i++) { const itemsCopy = [...items]; ``` -使用Array.from方法,将类似数组的对象转为数组。 +使用 Array.from 方法,将类似数组的对象转为数组。 ```javascript const foo = document.querySelectorAll('.foo'); @@ -251,7 +250,7 @@ const nodes = Array.from(foo); })(); ``` -那些需要使用函数表达式的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了this。 +那些需要使用函数表达式的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了 this。 ```javascript // bad @@ -268,7 +267,7 @@ const nodes = Array.from(foo); [1, 2, 3].map(x => x * x); ``` -箭头函数取代`Function.prototype.bind`,不应再用self/\_this/that绑定 this。 +箭头函数取代`Function.prototype.bind`,不应再用 self/\_this/that 绑定 this。 ```javascript // bad @@ -298,7 +297,7 @@ function divide(a, b, { option = false } = {}) { } ``` -不要在函数体内使用arguments变量,使用rest运算符(...)代替。因为rest运算符显式表明你想要获取参数,而且arguments是一个类似数组的对象,而rest运算符可以提供一个真正的数组。 +不要在函数体内使用 arguments 变量,使用 rest 运算符(...)代替。因为 rest 运算符显式表明你想要获取参数,而且 arguments 是一个类似数组的对象,而 rest 运算符可以提供一个真正的数组。 ```javascript // bad @@ -327,9 +326,9 @@ function handleThings(opts = {}) { } ``` -## Map结构 +## Map 结构 -注意区分Object和Map,只有模拟现实世界的实体对象时,才使用Object。如果只是需要`key: value`的数据结构,使用Map结构。因为Map有内建的遍历机制。 +注意区分 Object 和 Map,只有模拟现实世界的实体对象时,才使用 Object。如果只是需要`key: value`的数据结构,使用 Map 结构。因为 Map 有内建的遍历机制。 ```javascript let map = new Map(arr); @@ -349,7 +348,7 @@ for (let item of map.entries()) { ## Class -总是用Class,取代需要prototype的操作。因为Class的写法更简洁,更易于理解。 +总是用 Class,取代需要 prototype 的操作。因为 Class 的写法更简洁,更易于理解。 ```javascript // bad @@ -398,7 +397,7 @@ class PeekableQueue extends Queue { ## 模块 -首先,Module语法是JavaScript模块的标准写法,坚持使用这种写法。使用`import`取代`require`。 +首先,Module 语法是 JavaScript 模块的标准写法,坚持使用这种写法。使用`import`取代`require`。 ```javascript // bad @@ -427,22 +426,22 @@ module.exports = Breadcrumbs; // ES6的写法 import React from 'react'; -const Breadcrumbs = React.createClass({ +class Breadcrumbs extends React.Component { render() { return <nav />; } -}); +}; -export default Breadcrumbs +export default Breadcrumbs; ``` -如果模块只有一个输出值,就使用`export default`,如果模块有多个输出值,就不使用`export default`,不要`export default`与普通的`export`同时使用。 +如果模块只有一个输出值,就使用`export default`,如果模块有多个输出值,就不使用`export default`,`export default`与普通的`export`不要同时使用。 不要在模块输入中使用通配符。因为这样可以确保你的模块之中,有一个默认输出(export default)。 ```javascript // bad -import * as myObject './importModule'; +import * as myObject from './importModule'; // good import myObject from './importModule'; @@ -468,23 +467,24 @@ const StyleGuide = { export default StyleGuide; ``` -## ESLint的使用 +## ESLint 的使用 -ESLint是一个语法规则和代码风格的检查工具,可以用来保证写出语法正确、风格统一的代码。 +ESLint 是一个语法规则和代码风格的检查工具,可以用来保证写出语法正确、风格统一的代码。 -首先,安装ESLint。 +首先,安装 ESLint。 ```bash $ npm i -g eslint ``` -然后,安装Airbnb语法规则。 +然后,安装 Airbnb 语法规则,以及 import、a11y、react 插件。 ```bash $ npm i -g eslint-config-airbnb +$ npm i -g eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react ``` -最后,在项目的根目录下新建一个`.eslintrc`文件,配置ESLint。 +最后,在项目的根目录下新建一个`.eslintrc`文件,配置 ESLint。 ```javascript { @@ -507,16 +507,18 @@ function greet() { greet(); ``` -使用ESLint检查这个文件。 +使用 ESLint 检查这个文件,就会报出错误。 ```bash $ eslint index.js index.js + 1:1 error Unexpected var, use let or const instead no-var 1:5 error unusued is defined but never used no-unused-vars 4:5 error Expected indentation of 2 characters but found 4 indent + 4:5 error Unexpected var, use let or const instead no-var 5:5 error Expected indentation of 2 characters but found 4 indent -✖ 3 problems (3 errors, 0 warnings) +✖ 5 problems (5 errors, 0 warnings) ``` -上面代码说明,原文件有三个错误,一个是定义了变量,却没有使用,另外两个是行首缩进为4个空格,而不是规定的2个空格。 +上面代码说明,原文件有五个错误,其中两个是不应该使用`var`命令,而要使用`let`或`const`;一个是定义了变量,却没有使用;另外两个是行首缩进为 4 个空格,而不是规定的 2 个空格。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/symbol.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/symbol.md" new file mode 100755 index 000000000..f86005be1 --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/docs/symbol.md" @@ -0,0 +1,898 @@ +# Symbol + +## 概述 + +ES5 的对象属性名都是字符串,这容易造成属性名的冲突。比如,你使用了一个他人提供的对象,但又想为这个对象添加新的方法(mixin 模式),新方法的名字就有可能与现有方法产生冲突。如果有一种机制,保证每个属性的名字都是独一无二的就好了,这样就从根本上防止属性名的冲突。这就是 ES6 引入`Symbol`的原因。 + +ES6 引入了一种新的原始数据类型`Symbol`,表示独一无二的值。它是 JavaScript 语言的第七种数据类型,前六种是:`undefined`、`null`、布尔值(Boolean)、字符串(String)、数值(Number)、对象(Object)。 + +Symbol 值通过`Symbol`函数生成。这就是说,对象的属性名现在可以有两种类型,一种是原来就有的字符串,另一种就是新增的 Symbol 类型。凡是属性名属于 Symbol 类型,就都是独一无二的,可以保证不会与其他属性名产生冲突。 + +```javascript +let s = Symbol(); + +typeof s +// "symbol" +``` + +上面代码中,变量`s`就是一个独一无二的值。`typeof`运算符的结果,表明变量`s`是 Symbol 数据类型,而不是字符串之类的其他类型。 + +注意,`Symbol`函数前不能使用`new`命令,否则会报错。这是因为生成的 Symbol 是一个原始类型的值,不是对象。也就是说,由于 Symbol 值不是对象,所以不能添加属性。基本上,它是一种类似于字符串的数据类型。 + +`Symbol`函数可以接受一个字符串作为参数,表示对 Symbol 实例的描述,主要是为了在控制台显示,或者转为字符串时,比较容易区分。 + +```javascript +let s1 = Symbol('foo'); +let s2 = Symbol('bar'); + +s1 // Symbol(foo) +s2 // Symbol(bar) + +s1.toString() // "Symbol(foo)" +s2.toString() // "Symbol(bar)" +``` + +上面代码中,`s1`和`s2`是两个 Symbol 值。如果不加参数,它们在控制台的输出都是`Symbol()`,不利于区分。有了参数以后,就等于为它们加上了描述,输出的时候就能够分清,到底是哪一个值。 + +如果 Symbol 的参数是一个对象,就会调用该对象的`toString`方法,将其转为字符串,然后才生成一个 Symbol 值。 + +```javascript +const obj = { + toString() { + return 'abc'; + } +}; +const sym = Symbol(obj); +sym // Symbol(abc) +``` + +注意,`Symbol`函数的参数只是表示对当前 Symbol 值的描述,因此相同参数的`Symbol`函数的返回值是不相等的。 + +```javascript +// 没有参数的情况 +let s1 = Symbol(); +let s2 = Symbol(); + +s1 === s2 // false + +// 有参数的情况 +let s1 = Symbol('foo'); +let s2 = Symbol('foo'); + +s1 === s2 // false +``` + +上面代码中,`s1`和`s2`都是`Symbol`函数的返回值,而且参数相同,但是它们是不相等的。 + +Symbol 值不能与其他类型的值进行运算,会报错。 + +```javascript +let sym = Symbol('My symbol'); + +"your symbol is " + sym +// TypeError: can't convert symbol to string +`your symbol is ${sym}` +// TypeError: can't convert symbol to string +``` + +但是,Symbol 值可以显式转为字符串。 + +```javascript +let sym = Symbol('My symbol'); + +String(sym) // 'Symbol(My symbol)' +sym.toString() // 'Symbol(My symbol)' +``` + +另外,Symbol 值也可以转为布尔值,但是不能转为数值。 + +```javascript +let sym = Symbol(); +Boolean(sym) // true +!sym // false + +if (sym) { + // ... +} + +Number(sym) // TypeError +sym + 2 // TypeError +``` + +## 作为属性名的 Symbol + +由于每一个 Symbol 值都是不相等的,这意味着 Symbol 值可以作为标识符,用于对象的属性名,就能保证不会出现同名的属性。这对于一个对象由多个模块构成的情况非常有用,能防止某一个键被不小心改写或覆盖。 + +```javascript +let mySymbol = Symbol(); + +// 第一种写法 +let a = {}; +a[mySymbol] = 'Hello!'; + +// 第二种写法 +let a = { + [mySymbol]: 'Hello!' +}; + +// 第三种写法 +let a = {}; +Object.defineProperty(a, mySymbol, { value: 'Hello!' }); + +// 以上写法都得到同样结果 +a[mySymbol] // "Hello!" +``` + +上面代码通过方括号结构和`Object.defineProperty`,将对象的属性名指定为一个 Symbol 值。 + +注意,Symbol 值作为对象属性名时,不能用点运算符。 + +```javascript +const mySymbol = Symbol(); +const a = {}; + +a.mySymbol = 'Hello!'; +a[mySymbol] // undefined +a['mySymbol'] // "Hello!" +``` + +上面代码中,因为点运算符后面总是字符串,所以不会读取`mySymbol`作为标识名所指代的那个值,导致`a`的属性名实际上是一个字符串,而不是一个 Symbol 值。 + +同理,在对象的内部,使用 Symbol 值定义属性时,Symbol 值必须放在方括号之中。 + +```javascript +let s = Symbol(); + +let obj = { + [s]: function (arg) { ... } +}; + +obj[s](123); +``` + +上面代码中,如果`s`不放在方括号中,该属性的键名就是字符串`s`,而不是`s`所代表的那个 Symbol 值。 + +采用增强的对象写法,上面代码的`obj`对象可以写得更简洁一些。 + +```javascript +let obj = { + [s](arg) { ... } +}; +``` + +Symbol 类型还可以用于定义一组常量,保证这组常量的值都是不相等的。 + +```javascript +const log = {}; + +log.levels = { + DEBUG: Symbol('debug'), + INFO: Symbol('info'), + WARN: Symbol('warn') +}; +console.log(log.levels.DEBUG, 'debug message'); +console.log(log.levels.INFO, 'info message'); +``` + +下面是另外一个例子。 + +```javascript +const COLOR_RED = Symbol(); +const COLOR_GREEN = Symbol(); + +function getComplement(color) { + switch (color) { + case COLOR_RED: + return COLOR_GREEN; + case COLOR_GREEN: + return COLOR_RED; + default: + throw new Error('Undefined color'); + } +} +``` + +常量使用 Symbol 值最大的好处,就是其他任何值都不可能有相同的值了,因此可以保证上面的`switch`语句会按设计的方式工作。 + +还有一点需要注意,Symbol 值作为属性名时,该属性还是公开属性,不是私有属性。 + +## 实例:消除魔术字符串 + +魔术字符串指的是,在代码之中多次出现、与代码形成强耦合的某一个具体的字符串或者数值。风格良好的代码,应该尽量消除魔术字符串,改由含义清晰的变量代替。 + +```javascript +function getArea(shape, options) { + let area = 0; + + switch (shape) { + case 'Triangle': // 魔术字符串 + area = .5 * options.width * options.height; + break; + /* ... more code ... */ + } + + return area; +} + +getArea('Triangle', { width: 100, height: 100 }); // 魔术字符串 +``` + +上面代码中,字符串`Triangle`就是一个魔术字符串。它多次出现,与代码形成“强耦合”,不利于将来的修改和维护。 + +常用的消除魔术字符串的方法,就是把它写成一个变量。 + +```javascript +const shapeType = { + triangle: 'Triangle' +}; + +function getArea(shape, options) { + let area = 0; + switch (shape) { + case shapeType.triangle: + area = .5 * options.width * options.height; + break; + } + return area; +} + +getArea(shapeType.triangle, { width: 100, height: 100 }); +``` + +上面代码中,我们把`Triangle`写成`shapeType`对象的`triangle`属性,这样就消除了强耦合。 + +如果仔细分析,可以发现`shapeType.triangle`等于哪个值并不重要,只要确保不会跟其他`shapeType`属性的值冲突即可。因此,这里就很适合改用 Symbol 值。 + +```javascript +const shapeType = { + triangle: Symbol() +}; +``` + +上面代码中,除了将`shapeType.triangle`的值设为一个 Symbol,其他地方都不用修改。 + +## 属性名的遍历 + +Symbol 作为属性名,该属性不会出现在`for...in`、`for...of`循环中,也不会被`Object.keys()`、`Object.getOwnPropertyNames()`、`JSON.stringify()`返回。但是,它也不是私有属性,有一个`Object.getOwnPropertySymbols`方法,可以获取指定对象的所有 Symbol 属性名。 + +`Object.getOwnPropertySymbols`方法返回一个数组,成员是当前对象的所有用作属性名的 Symbol 值。 + +```javascript +const obj = {}; +let a = Symbol('a'); +let b = Symbol('b'); + +obj[a] = 'Hello'; +obj[b] = 'World'; + +const objectSymbols = Object.getOwnPropertySymbols(obj); + +objectSymbols +// [Symbol(a), Symbol(b)] +``` + +下面是另一个例子,`Object.getOwnPropertySymbols`方法与`for...in`循环、`Object.getOwnPropertyNames`方法进行对比的例子。 + +```javascript +const obj = {}; + +let foo = Symbol("foo"); + +Object.defineProperty(obj, foo, { + value: "foobar", +}); + +for (let i in obj) { + console.log(i); // 无输出 +} + +Object.getOwnPropertyNames(obj) +// [] + +Object.getOwnPropertySymbols(obj) +// [Symbol(foo)] +``` + +上面代码中,使用`Object.getOwnPropertyNames`方法得不到`Symbol`属性名,需要使用`Object.getOwnPropertySymbols`方法。 + +另一个新的 API,`Reflect.ownKeys`方法可以返回所有类型的键名,包括常规键名和 Symbol 键名。 + +```javascript +let obj = { + [Symbol('my_key')]: 1, + enum: 2, + nonEnum: 3 +}; + +Reflect.ownKeys(obj) +// ["enum", "nonEnum", Symbol(my_key)] +``` + +由于以 Symbol 值作为名称的属性,不会被常规方法遍历得到。我们可以利用这个特性,为对象定义一些非私有的、但又希望只用于内部的方法。 + +```javascript +let size = Symbol('size'); + +class Collection { + constructor() { + this[size] = 0; + } + + add(item) { + this[this[size]] = item; + this[size]++; + } + + static sizeOf(instance) { + return instance[size]; + } +} + +let x = new Collection(); +Collection.sizeOf(x) // 0 + +x.add('foo'); +Collection.sizeOf(x) // 1 + +Object.keys(x) // ['0'] +Object.getOwnPropertyNames(x) // ['0'] +Object.getOwnPropertySymbols(x) // [Symbol(size)] +``` + +上面代码中,对象`x`的`size`属性是一个 Symbol 值,所以`Object.keys(x)`、`Object.getOwnPropertyNames(x)`都无法获取它。这就造成了一种非私有的内部方法的效果。 + +## Symbol.for(),Symbol.keyFor() + +有时,我们希望重新使用同一个 Symbol 值,`Symbol.for`方法可以做到这一点。它接受一个字符串作为参数,然后搜索有没有以该参数作为名称的 Symbol 值。如果有,就返回这个 Symbol 值,否则就新建并返回一个以该字符串为名称的 Symbol 值。 + +```javascript +let s1 = Symbol.for('foo'); +let s2 = Symbol.for('foo'); + +s1 === s2 // true +``` + +上面代码中,`s1`和`s2`都是 Symbol 值,但是它们都是同样参数的`Symbol.for`方法生成的,所以实际上是同一个值。 + +`Symbol.for()`与`Symbol()`这两种写法,都会生成新的 Symbol。它们的区别是,前者会被登记在全局环境中供搜索,后者不会。`Symbol.for()`不会每次调用就返回一个新的 Symbol 类型的值,而是会先检查给定的`key`是否已经存在,如果不存在才会新建一个值。比如,如果你调用`Symbol.for("cat")`30 次,每次都会返回同一个 Symbol 值,但是调用`Symbol("cat")`30 次,会返回 30 个不同的 Symbol 值。 + +```javascript +Symbol.for("bar") === Symbol.for("bar") +// true + +Symbol("bar") === Symbol("bar") +// false +``` + +上面代码中,由于`Symbol()`写法没有登记机制,所以每次调用都会返回一个不同的值。 + +`Symbol.keyFor`方法返回一个已登记的 Symbol 类型值的`key`。 + +```javascript +let s1 = Symbol.for("foo"); +Symbol.keyFor(s1) // "foo" + +let s2 = Symbol("foo"); +Symbol.keyFor(s2) // undefined +``` + +上面代码中,变量`s2`属于未登记的 Symbol 值,所以返回`undefined`。 + +需要注意的是,`Symbol.for`为 Symbol 值登记的名字,是全局环境的,可以在不同的 iframe 或 service worker 中取到同一个值。 + +```javascript +iframe = document.createElement('iframe'); +iframe.src = String(window.location); +document.body.appendChild(iframe); + +iframe.contentWindow.Symbol.for('foo') === Symbol.for('foo') +// true +``` + +上面代码中,iframe 窗口生成的 Symbol 值,可以在主页面得到。 + +## 实例:模块的 Singleton 模式 + +Singleton 模式指的是调用一个类,任何时候返回的都是同一个实例。 + +对于 Node 来说,模块文件可以看成是一个类。怎么保证每次执行这个模块文件,返回的都是同一个实例呢? + +很容易想到,可以把实例放到顶层对象`global`。 + +```javascript +// mod.js +function A() { + this.foo = 'hello'; +} + +if (!global._foo) { + global._foo = new A(); +} + +module.exports = global._foo; +``` + +然后,加载上面的`mod.js`。 + +```javascript +const a = require('./mod.js'); +console.log(a.foo); +``` + +上面代码中,变量`a`任何时候加载的都是`A`的同一个实例。 + +但是,这里有一个问题,全局变量`global._foo`是可写的,任何文件都可以修改。 + +```javascript +global._foo = { foo: 'world' }; + +const a = require('./mod.js'); +console.log(a.foo); +``` + +上面的代码,会使得加载`mod.js`的脚本都失真。 + +为了防止这种情况出现,我们就可以使用 Symbol。 + +```javascript +// mod.js +const FOO_KEY = Symbol.for('foo'); + +function A() { + this.foo = 'hello'; +} + +if (!global[FOO_KEY]) { + global[FOO_KEY] = new A(); +} + +module.exports = global[FOO_KEY]; +``` + +上面代码中,可以保证`global[FOO_KEY]`不会被无意间覆盖,但还是可以被改写。 + +```javascript +global[Symbol.for('foo')] = { foo: 'world' }; + +const a = require('./mod.js'); +``` + +如果键名使用`Symbol`方法生成,那么外部将无法引用这个值,当然也就无法改写。 + +```javascript +// mod.js +const FOO_KEY = Symbol('foo'); + +// 后面代码相同 …… +``` + +上面代码将导致其他脚本都无法引用`FOO_KEY`。但这样也有一个问题,就是如果多次执行这个脚本,每次得到的`FOO_KEY`都是不一样的。虽然 Node 会将脚本的执行结果缓存,一般情况下,不会多次执行同一个脚本,但是用户可以手动清除缓存,所以也不是绝对可靠。 + +## 内置的 Symbol 值 + +除了定义自己使用的 Symbol 值以外,ES6 还提供了 11 个内置的 Symbol 值,指向语言内部使用的方法。 + +### Symbol.hasInstance + +对象的`Symbol.hasInstance`属性,指向一个内部方法。当其他对象使用`instanceof`运算符,判断是否为该对象的实例时,会调用这个方法。比如,`foo instanceof Foo`在语言内部,实际调用的是`Foo[Symbol.hasInstance](foo)`。 + +```javascript +class MyClass { + [Symbol.hasInstance](foo) { + return foo instanceof Array; + } +} + +[1, 2, 3] instanceof new MyClass() // true +``` + +上面代码中,`MyClass`是一个类,`new MyClass()`会返回一个实例。该实例的`Symbol.hasInstance`方法,会在进行`instanceof`运算时自动调用,判断左侧的运算子是否为`Array`的实例。 + +下面是另一个例子。 + +```javascript +class Even { + static [Symbol.hasInstance](obj) { + return Number(obj) % 2 === 0; + } +} + +// 等同于 +const Even = { + [Symbol.hasInstance](obj) { + return Number(obj) % 2 === 0; + } +}; + +1 instanceof Even // false +2 instanceof Even // true +12345 instanceof Even // false +``` + +### Symbol.isConcatSpreadable + +对象的`Symbol.isConcatSpreadable`属性等于一个布尔值,表示该对象用于`Array.prototype.concat()`时,是否可以展开。 + +```javascript +let arr1 = ['c', 'd']; +['a', 'b'].concat(arr1, 'e') // ['a', 'b', 'c', 'd', 'e'] +arr1[Symbol.isConcatSpreadable] // undefined + +let arr2 = ['c', 'd']; +arr2[Symbol.isConcatSpreadable] = false; +['a', 'b'].concat(arr2, 'e') // ['a', 'b', ['c','d'], 'e'] +``` + +上面代码说明,数组的默认行为是可以展开,`Symbol.isConcatSpreadable`默认等于`undefined`。该属性等于`true`时,也有展开的效果。 + +类似数组的对象正好相反,默认不展开。它的`Symbol.isConcatSpreadable`属性设为`true`,才可以展开。 + +```javascript +let obj = {length: 2, 0: 'c', 1: 'd'}; +['a', 'b'].concat(obj, 'e') // ['a', 'b', obj, 'e'] + +obj[Symbol.isConcatSpreadable] = true; +['a', 'b'].concat(obj, 'e') // ['a', 'b', 'c', 'd', 'e'] +``` + +`Symbol.isConcatSpreadable`属性也可以定义在类里面。 + +```javascript +class A1 extends Array { + constructor(args) { + super(args); + this[Symbol.isConcatSpreadable] = true; + } +} +class A2 extends Array { + constructor(args) { + super(args); + } + get [Symbol.isConcatSpreadable] () { + return false; + } +} +let a1 = new A1(); +a1[0] = 3; +a1[1] = 4; +let a2 = new A2(); +a2[0] = 5; +a2[1] = 6; +[1, 2].concat(a1).concat(a2) +// [1, 2, 3, 4, [5, 6]] +``` + +上面代码中,类`A1`是可展开的,类`A2`是不可展开的,所以使用`concat`时有不一样的结果。 + +注意,`Symbol.isConcatSpreadable`的位置差异,`A1`是定义在实例上,`A2`是定义在类本身,效果相同。 + +### Symbol.species + +对象的`Symbol.species`属性,指向一个构造函数。创建衍生对象时,会使用该属性。 + +```javascript +class MyArray extends Array { +} + +const a = new MyArray(1, 2, 3); +const b = a.map(x => x); +const c = a.filter(x => x > 1); + +b instanceof MyArray // true +c instanceof MyArray // true +``` + +上面代码中,子类`MyArray`继承了父类`Array`,`a`是`MyArray`的实例,`b`和`c`是`a`的衍生对象。你可能会认为,`b`和`c`都是调用数组方法生成的,所以应该是数组(`Array`的实例),但实际上它们也是`MyArray`的实例。 + +`Symbol.species`属性就是为了解决这个问题而提供的。现在,我们可以为`MyArray`设置`Symbol.species`属性。 + +```javascript +class MyArray extends Array { + static get [Symbol.species]() { return Array; } +} +``` + +上面代码中,由于定义了`Symbol.species`属性,创建衍生对象时就会使用这个属性返回的函数,作为构造函数。这个例子也说明,定义`Symbol.species`属性要采用`get`取值器。默认的`Symbol.species`属性等同于下面的写法。 + +```javascript +static get [Symbol.species]() { + return this; +} +``` + +现在,再来看前面的例子。 + +```javascript +class MyArray extends Array { + static get [Symbol.species]() { return Array; } +} + +const a = new MyArray(); +const b = a.map(x => x); + +b instanceof MyArray // false +b instanceof Array // true +``` + +上面代码中,`a.map(x => x)`生成的衍生对象,就不是`MyArray`的实例,而直接就是`Array`的实例。 + +再看一个例子。 + +```javascript +class T1 extends Promise { +} + +class T2 extends Promise { + static get [Symbol.species]() { + return Promise; + } +} + +new T1(r => r()).then(v => v) instanceof T1 // true +new T2(r => r()).then(v => v) instanceof T2 // false +``` + +上面代码中,`T2`定义了`Symbol.species`属性,`T1`没有。结果就导致了创建衍生对象时(`then`方法),`T1`调用的是自身的构造方法,而`T2`调用的是`Promise`的构造方法。 + +总之,`Symbol.species`的作用在于,实例对象在运行过程中,需要再次调用自身的构造函数时,会调用该属性指定的构造函数。它主要的用途是,有些类库是在基类的基础上修改的,那么子类使用继承的方法时,作者可能希望返回基类的实例,而不是子类的实例。 + +### Symbol.match + +对象的`Symbol.match`属性,指向一个函数。当执行`str.match(myObject)`时,如果该属性存在,会调用它,返回该方法的返回值。 + +```javascript +String.prototype.match(regexp) +// 等同于 +regexp[Symbol.match](this) + +class MyMatcher { + [Symbol.match](string) { + return 'hello world'.indexOf(string); + } +} + +'e'.match(new MyMatcher()) // 1 +``` + +### Symbol.replace + +对象的`Symbol.replace`属性,指向一个方法,当该对象被`String.prototype.replace`方法调用时,会返回该方法的返回值。 + +```javascript +String.prototype.replace(searchValue, replaceValue) +// 等同于 +searchValue[Symbol.replace](this, replaceValue) +``` + +下面是一个例子。 + +```javascript +const x = {}; +x[Symbol.replace] = (...s) => console.log(s); + +'Hello'.replace(x, 'World') // ["Hello", "World"] +``` + +`Symbol.replace`方法会收到两个参数,第一个参数是`replace`方法正在作用的对象,上面例子是`Hello`,第二个参数是替换后的值,上面例子是`World`。 + +### Symbol.search + +对象的`Symbol.search`属性,指向一个方法,当该对象被`String.prototype.search`方法调用时,会返回该方法的返回值。 + +```javascript +String.prototype.search(regexp) +// 等同于 +regexp[Symbol.search](this) + +class MySearch { + constructor(value) { + this.value = value; + } + [Symbol.search](string) { + return string.indexOf(this.value); + } +} +'foobar'.search(new MySearch('foo')) // 0 +``` + +### Symbol.split + +对象的`Symbol.split`属性,指向一个方法,当该对象被`String.prototype.split`方法调用时,会返回该方法的返回值。 + +```javascript +String.prototype.split(separator, limit) +// 等同于 +separator[Symbol.split](this, limit) +``` + +下面是一个例子。 + +```javascript +class MySplitter { + constructor(value) { + this.value = value; + } + [Symbol.split](string) { + let index = string.indexOf(this.value); + if (index === -1) { + return string; + } + return [ + string.substr(0, index), + string.substr(index + this.value.length) + ]; + } +} + +'foobar'.split(new MySplitter('foo')) +// ['', 'bar'] + +'foobar'.split(new MySplitter('bar')) +// ['foo', ''] + +'foobar'.split(new MySplitter('baz')) +// 'foobar' +``` + +上面方法使用`Symbol.split`方法,重新定义了字符串对象的`split`方法的行为, + +### Symbol.iterator + +对象的`Symbol.iterator`属性,指向该对象的默认遍历器方法。 + +```javascript +const myIterable = {}; +myIterable[Symbol.iterator] = function* () { + yield 1; + yield 2; + yield 3; +}; + +[...myIterable] // [1, 2, 3] +``` + +对象进行`for...of`循环时,会调用`Symbol.iterator`方法,返回该对象的默认遍历器,详细介绍参见《Iterator 和 for...of 循环》一章。 + +```javascript +class Collection { + *[Symbol.iterator]() { + let i = 0; + while(this[i] !== undefined) { + yield this[i]; + ++i; + } + } +} + +let myCollection = new Collection(); +myCollection[0] = 1; +myCollection[1] = 2; + +for(let value of myCollection) { + console.log(value); +} +// 1 +// 2 +``` + +### Symbol.toPrimitive + +对象的`Symbol.toPrimitive`属性,指向一个方法。该对象被转为原始类型的值时,会调用这个方法,返回该对象对应的原始类型值。 + +`Symbol.toPrimitive`被调用时,会接受一个字符串参数,表示当前运算的模式,一共有三种模式。 + +- Number:该场合需要转成数值 +- String:该场合需要转成字符串 +- Default:该场合可以转成数值,也可以转成字符串 + +```javascript +let obj = { + [Symbol.toPrimitive](hint) { + switch (hint) { + case 'number': + return 123; + case 'string': + return 'str'; + case 'default': + return 'default'; + default: + throw new Error(); + } + } +}; + +2 * obj // 246 +3 + obj // '3default' +obj == 'default' // true +String(obj) // 'str' +``` + +### Symbol.toStringTag + +对象的`Symbol.toStringTag`属性,指向一个方法。在该对象上面调用`Object.prototype.toString`方法时,如果这个属性存在,它的返回值会出现在`toString`方法返回的字符串之中,表示对象的类型。也就是说,这个属性可以用来定制`[object Object]`或`[object Array]`中`object`后面的那个字符串。 + +```javascript +// 例一 +({[Symbol.toStringTag]: 'Foo'}.toString()) +// "[object Foo]" + +// 例二 +class Collection { + get [Symbol.toStringTag]() { + return 'xxx'; + } +} +let x = new Collection(); +Object.prototype.toString.call(x) // "[object xxx]" +``` + +ES6 新增内置对象的`Symbol.toStringTag`属性值如下。 + +- `JSON[Symbol.toStringTag]`:'JSON' +- `Math[Symbol.toStringTag]`:'Math' +- Module 对象`M[Symbol.toStringTag]`:'Module' +- `ArrayBuffer.prototype[Symbol.toStringTag]`:'ArrayBuffer' +- `DataView.prototype[Symbol.toStringTag]`:'DataView' +- `Map.prototype[Symbol.toStringTag]`:'Map' +- `Promise.prototype[Symbol.toStringTag]`:'Promise' +- `Set.prototype[Symbol.toStringTag]`:'Set' +- `%TypedArray%.prototype[Symbol.toStringTag]`:'Uint8Array'等 +- `WeakMap.prototype[Symbol.toStringTag]`:'WeakMap' +- `WeakSet.prototype[Symbol.toStringTag]`:'WeakSet' +- `%MapIteratorPrototype%[Symbol.toStringTag]`:'Map Iterator' +- `%SetIteratorPrototype%[Symbol.toStringTag]`:'Set Iterator' +- `%StringIteratorPrototype%[Symbol.toStringTag]`:'String Iterator' +- `Symbol.prototype[Symbol.toStringTag]`:'Symbol' +- `Generator.prototype[Symbol.toStringTag]`:'Generator' +- `GeneratorFunction.prototype[Symbol.toStringTag]`:'GeneratorFunction' + +### Symbol.unscopables + +对象的`Symbol.unscopables`属性,指向一个对象。该对象指定了使用`with`关键字时,哪些属性会被`with`环境排除。 + +```javascript +Array.prototype[Symbol.unscopables] +// { +// copyWithin: true, +// entries: true, +// fill: true, +// find: true, +//   findIndex: true, +// includes: true, +// keys: true +// } + +Object.keys(Array.prototype[Symbol.unscopables]) +// ['copyWithin', 'entries', 'fill', 'find', 'findIndex', 'includes', 'keys'] +``` + +上面代码说明,数组有 7 个属性,会被`with`命令排除。 + +```javascript +// 没有 unscopables 时 +class MyClass { + foo() { return 1; } +} + +var foo = function () { return 2; }; + +with (MyClass.prototype) { + foo(); // 1 +} + +// 有 unscopables 时 +class MyClass { + foo() { return 1; } + get [Symbol.unscopables]() { + return { foo: true }; + } +} + +var foo = function () { return 2; }; + +with (MyClass.prototype) { + foo(); // 2 +} +``` + +上面代码通过指定`Symbol.unscopables`属性,使得`with`语法块不会在当前作用域寻找`foo`属性,即`foo`将指向外层作用域的变量。 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/favicon.ico" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/favicon.ico" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/favicon.ico" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/favicon.ico" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/copyright.png" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/copyright.png" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/copyright.png" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/copyright.png" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover-2nd.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover-2nd.jpg" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover-2nd.jpg" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover-2nd.jpg" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover-3rd.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover-3rd.jpg" new file mode 100755 index 000000000..df94fe6ae Binary files /dev/null and "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover-3rd.jpg" differ diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover.jpg" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover.jpg" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover.jpg" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover_thumbnail.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover_thumbnail.jpg" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/cover_thumbnail.jpg" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover_thumbnail.jpg" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover_thumbnail_3rd.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover_thumbnail_3rd.jpg" new file mode 100755 index 000000000..2c097bb8b Binary files /dev/null and "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/cover_thumbnail_3rd.jpg" differ diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/magnifier.jpg" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/magnifier.jpg" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/magnifier.jpg" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/magnifier.jpg" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/page1.png" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/page1.png" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/page1.png" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/page1.png" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/page2.png" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/page2.png" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/images/page2.png" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/images/page2.png" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/index.html" new file mode 100755 index 000000000..98936328a --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/index.html" @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="app/bower_components/normalize-css/normalize.css"> + <link rel="stylesheet" href="css/app.css"> + <title>ECMAScript 6入门 + + + + + + + + + + + + +
+ +
back to top
+
edit
+
Loading ...
+
Oops! ... File not found!
+
上一章
下一章
+
+ + + + + diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/ditto.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/ditto.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/ditto.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/ditto.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/jquery-1.11.0.min.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/jquery-1.11.0.min.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/jquery-1.11.0.min.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/jquery-1.11.0.min.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/jquery-ui.min.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/jquery-ui.min.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/jquery-ui.min.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/jquery-ui.min.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/marked.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/marked.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/marked.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/marked.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/prism.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/prism.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/prism.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/prism.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/store.js" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/store.js" old mode 100644 new mode 100755 similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/js/store.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/js/store.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/sidebar.md" "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/sidebar.md" old mode 100644 new mode 100755 similarity index 86% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/sidebar.md" rename to "02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/sidebar.md" index 4017f308d..baf321063 --- "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/es6tutorial-gh-pages/sidebar.md" +++ "b/02-ES\346\226\260\347\211\271\346\200\247/es6tutorial-gh-pages/sidebar.md" @@ -12,9 +12,10 @@ 1. [字符串的扩展](#docs/string) 1. [正则的扩展](#docs/regex) 1. [数值的扩展](#docs/number) -1. [数组的扩展](#docs/array) 1. [函数的扩展](#docs/function) +1. [数组的扩展](#docs/array) 1. [对象的扩展](#docs/object) +1. [对象的新增方法](#docs/object-methods) 1. [Symbol](#docs/symbol) 1. [Set 和 Map 数据结构](#docs/set-map) 1. [Proxy](#docs/proxy) @@ -24,14 +25,15 @@ 1. [Generator 函数的语法](#docs/generator) 1. [Generator 函数的异步应用](#docs/generator-async) 1. [async 函数](#docs/async) -1. [Class](#docs/class) -1. [Decorator](#docs/decorator) +1. [Class 的基本语法](#docs/class) +1. [Class 的继承](#docs/class-extends) 1. [Module 的语法](#docs/module) 1. [Module 的加载实现](#docs/module-loader) 1. [编程风格](#docs/style) 1. [读懂规格](#docs/spec) -1. [二进制数组](#docs/arraybuffer) -1. [SIMD](#docs/simd) +1. [ArrayBuffer](#docs/arraybuffer) +1. [最新提案](#docs/proposals) +1. [Decorator](#docs/decorator) 1. [参考链接](#docs/reference) ## 其他 diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/index.html" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/index.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/index.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel/index.html" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/index.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel/index.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/js/browser.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel/js/browser.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/js/browser.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel/js/browser.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/js/browser.min.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel/js/browser.min.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel/js/browser.min.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel/js/browser.min.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/index.html" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/index.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/index.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/js/babel.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/js/babel.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/js/babel.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/js/babel.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/js/babel.min.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/js/babel.min.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/babel_standalone/js/babel.min.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/babel_standalone/js/babel.min.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/index.html" "b/02-ES\346\226\260\347\211\271\346\200\247/js/traceur/index.html" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/index.html" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/traceur/index.html" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/BrowserSystem.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/BrowserSystem.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/BrowserSystem.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/BrowserSystem.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/bootstrap.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/bootstrap.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/bootstrap.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/bootstrap.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/traceur.js" "b/02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/traceur.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES6/js/traceur/js/traceur.js" rename to "02-ES\346\226\260\347\211\271\346\200\247/js/traceur/js/traceur.js" diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/\347\216\257\345\242\203\345\256\211\350\243\205.md" "b/02-ES\346\226\260\347\211\271\346\200\247/\347\216\257\345\242\203\345\256\211\350\243\205.md" new file mode 100644 index 000000000..78c94dabb --- /dev/null +++ "b/02-ES\346\226\260\347\211\271\346\200\247/\347\216\257\345\242\203\345\256\211\350\243\205.md" @@ -0,0 +1,16 @@ + +# ES6-10 + +## 1. 环境安装 +``` +$ npx es10-cli create es2019 +$ cd es2019 +$ npm start +``` + diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\345\237\272\346\234\254\344\275\277\347\224\250demo.html" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/artTemplate\345\237\272\346\234\254\344\275\277\347\224\250demo.html" similarity index 100% rename from "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\345\237\272\346\234\254\344\275\277\347\224\250demo.html" rename to "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/artTemplate\345\237\272\346\234\254\344\275\277\347\224\250demo.html" diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/template-native.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/template-native.js" similarity index 100% rename from "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/template-native.js" rename to "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/template-native.js" diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/template-web.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/template-web.js" similarity index 100% rename from "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/template-web.js" rename to "04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/template-web.js" diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/\346\265\217\350\247\210\345\231\250demo.html" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/\346\265\217\350\247\210\345\231\250demo.html" new file mode 100644 index 000000000..f59b513f3 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/03-artTemplate\346\265\217\350\247\210\345\231\250\347\211\210\346\234\254/\346\265\217\350\247\210\345\231\250demo.html" @@ -0,0 +1,25 @@ + + +
+ + + + \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/index.art" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/index.art" new file mode 100644 index 000000000..654fb896a --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/index.art" @@ -0,0 +1,9 @@ +{{if isAdmin}} +

{{title}}

+
    + {{each list value i}} +
  • 索引 {{i + 1}} :{{value}}
  • + {{/each}} +
+{{/if}} +{{$data}} diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/main.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/main.js" new file mode 100644 index 000000000..d81ee36a6 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/main.js" @@ -0,0 +1,12 @@ +// npm install art-template --save +// 安装 vscode 相关插件 + +const path = require('path'); +const template = require('art-template'); +const data = { + title: '基本例子', + isAdmin: true, + list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他'] +}; +const html = template(path.resolve(__dirname, 'index.art'), data); +console.log(html); \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package-lock.json" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package-lock.json" new file mode 100644 index 000000000..5607264bb --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package-lock.json" @@ -0,0 +1,243 @@ +{ + "name": "art-template-demo", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" + }, + "art-template": { + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/art-template/-/art-template-4.13.2.tgz", + "integrity": "sha512-04ws5k+ndA5DghfheY4c8F1304XJKeTcaXqZCLpxFkNMSkaR3ChW1pX2i9d3sEEOZuLy7de8lFriRaik1jEeOQ==", + "requires": { + "acorn": "^5.0.3", + "escodegen": "^1.8.1", + "estraverse": "^4.2.0", + "html-minifier": "^3.4.3", + "is-keyword-js": "^1.0.3", + "js-tokens": "^3.0.1", + "merge-source-map": "^1.0.3", + "source-map": "^0.5.6" + } + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "html-minifier": { + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", + "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.2.x", + "commander": "2.17.x", + "he": "1.2.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.4.x" + } + }, + "is-keyword-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-keyword-js/-/is-keyword-js-1.0.3.tgz", + "integrity": "sha1-rDDc81tnH0snsX9ctXI1EmAhEy0=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "requires": { + "lower-case": "^1.1.1" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "requires": { + "no-case": "^2.2.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "uglify-js": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", + "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", + "requires": { + "commander": "~2.19.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + } + } +} diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package.json" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package.json" new file mode 100644 index 000000000..73860ec7b --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/04-js\346\250\241\346\235\277\345\274\225\346\223\216/artTemplate/04-webpack\347\211\210\346\234\254/package.json" @@ -0,0 +1,15 @@ +{ + "name": "art-template-demo", + "version": "1.0.0", + "description": "", + "main": "main.js", + "scripts": { + "start": "node main.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "art-template": "^4.13.2" + } +} diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/01-\346\227\240\345\272\217\351\242\204\345\212\240\350\275\275.html" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/01-\346\227\240\345\272\217\351\242\204\345\212\240\350\275\275.html" new file mode 100644 index 000000000..91f910673 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/01-\346\227\240\345\272\217\351\242\204\345\212\240\350\275\275.html" @@ -0,0 +1,81 @@ + + + + + + +图片无序预加载 + + + +
+ pic +

+ prev + next +

+
+
0%
+ + + + + + \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/02-\346\234\211\345\272\217\351\242\204\345\212\240\350\275\275.html" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/02-\346\234\211\345\272\217\351\242\204\345\212\240\350\275\275.html" new file mode 100644 index 000000000..e31ffba92 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/02-\346\234\211\345\272\217\351\242\204\345\212\240\350\275\275.html" @@ -0,0 +1,66 @@ + + + + + + +图片有序预加载 + + + +
+ pic +

+ prev + next +

+
+ + + + + + \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/preload.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/preload.js" new file mode 100644 index 000000000..0700a9177 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/07-\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275/preload.js" @@ -0,0 +1,73 @@ +(function($) { + // 面向对象 + function PreLoad(imgs, options) { + this.imgs = (typeof imgs === 'string') ? [imgs] : imgs; + this.opts = $.extend({}, PreLoad.DEFAULTS, options); // options和PreLoad.DEFAULTS这2个对象融合,生成新的对象,将新对象返回给opts保存下来 + if (this.opts.order === 'ordered') { + this._ordered(); + } else { + this._unordered(); // _表示只在函数内部使用,而不在外部调用 + } + } + PreLoad.DEFAULTS = { + order: 'unordered', // 无序 / 有序 预加载 + eachCb: null, // 每一张图片加载完毕后执行 + allCb: null // 所有图片加载完毕后执行 + }; + // 面向对象将方法写在原型上,可以使得每次实例化时保持一份 + // 有序预加载 + PreLoad.prototype._ordered = function() { //方法写在原型链上 + var opts = this.opts, // 保存为局部变量 + imgs = this.imgs, + len = imgs.length, + count = 0; + var imgObj = new Image(); + load(); + function load() { + $(imgObj).on('load error', function() { + opts.eachCb && opts.eachCb(count); + if (count >=len) { + // 所有图片已经加载完毕 + opts.allCb && opts.allCb(); + } else { + load(); + } + count++; + }); + imgObj.src = imgs[count]; + } + }, + // 无序预加载 + PreLoad.prototype._unordered = function () { // 无序加载 + var imgs = this.imgs, + opts = this.opts, + count = 0, + len = imgs.length; + $.each(imgs, function(i, src) { + if (typeof src != 'string') return; + var imgObj = new Image(); + $(imgObj).on('load error', function() { + opts.eachCb && opts.eachCb(count); // 如果opts.eachCb存在,执行opts.eachCb方法 + if (count >= len - 1) { + opts.allCb && opts.allCb(); + } + count ++; + }); + imgObj.src = src; + }); + } + + // 1. jQuery.extend(object); 为扩展jQuery类本身,为类添加新的方法 + // 2. jQuery.fn.extend(object); 给jQuery对象添加方法 + // jQuery.fn.extend = jQuery.prototype.extend + + // $.extend --> $.preload(); + // $.fn.extend --> $('#img').preload(); + + // 成为插件方式 + $.extend({ + preload: function(imgs, opts) { + new PreLoad(imgs, opts); + } + }); +})(jQuery); \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/debounce & throttle demo.html" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/debounce & throttle demo.html" new file mode 100644 index 000000000..7e73d07f9 --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/debounce & throttle demo.html" @@ -0,0 +1,61 @@ + + + + debounce & throttle demo + + + +
+ move your mouse here +
+ + + + + + + \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/demo.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/demo.js" new file mode 100644 index 000000000..c9502473f --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/demo.js" @@ -0,0 +1,89 @@ +/** + * Created by thephpjo on 21.04.14. + */ + + +function NIM_demo(){ + this.canvas = document.getElementById("paintonme"); + this.context = this.canvas.getContext("2d"); + + this.movearea = document.getElementById("moveonme"); + + this.canvasTimeScale = 5 * 1000; + + this.paintColors = ["#bbd","#464","#d88"]; + this.totalLanes = this.paintColors.length; + + this.leftMargin = 100; + + var self = this; + + this.init = function(){ + this.canvas.width = window.innerWidth - 250; + this.flush(); + this.movearea.addEventListener("mousemove",this.regularHandler); + this.movearea.addEventListener("mousemove",helpers.debounce(self.debounceHandler,100,this)); + this.movearea.addEventListener("mousemove",helpers.throttle(self.throttleHander,100,this)); + } + + /** + * painting the rectangle / line + * @param lane + * @param time + */ + this.paintRect = function(lane,time){ + if(time > this.canvasTimeScale){ + this.startTime += time; + time = 0; + this.flush() + } +// console.log(lane,time); + this.context.fillStyle = this.paintColors[lane]; + + var x = (this.canvas.width - this.leftMargin) / this.canvasTimeScale * time + this.leftMargin; + var y = this.canvas.height / this.totalLanes * lane; + var height = this.canvas.height / this.totalLanes; + var width = 1; + + this.context.fillRect(x,y,width,height); + } + + this.flush = function(){ + this.context.fillStyle = "#ffffff"; + this.context.fillRect(0,0,this.canvas.width,this.canvas.height); + + this.context.font = "200 18px Roboto,Helvetica,Arial"; + this.context.fillStyle = this.paintColors[0]; + this.context.fillText("Regular", 0, 100); + + this.context.fillStyle = this.paintColors[1]; + this.context.fillText("debounce", 0, 300); + + this.context.fillStyle = this.paintColors[2]; + this.context.fillText("throttle", 0, 500); + } + /** + * get the time difference + * @returns {number} + */ + this.getTimeDiff = function(){ + var time = new Date().getTime(); + if(!this.startTime){ + this.startTime = time; + } + time -= this.startTime; + return time; + } + + this.regularHandler = function(){ + self.paintRect(0,self.getTimeDiff()); + } + this.debounceHandler = function(){ + self.paintRect(1,self.getTimeDiff()); + } + this.throttleHander = function(){ + self.paintRect(2,self.getTimeDiff()); + } +} + + diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/helpers.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/helpers.js" new file mode 100644 index 000000000..d24aa242f --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/08-debounce&throttle/helpers.js" @@ -0,0 +1,57 @@ +/** + * Created by thephpjo on 21.04.14. + */ + + +var helpers = { + + /** + * debouncing, executes the function if there was no new event in $wait milliseconds + * @param func + * @param wait + * @param scope + * @returns {Function} + */ + debounce: function (func, wait, scope) { + var timeout; + return function () { + var context = scope || this, args = arguments; + var later = function () { + timeout = null; + func.apply(context, args); + }; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + }; + }, + + /** + * in case of a "storm of events", this executes once every $threshold + * @param fn + * @param threshhold + * @param scope + * @returns {Function} + */ + throttle: function (fn, threshhold, scope) { + threshhold || (threshhold = 250); + var last, + deferTimer; + return function () { + var context = scope || this; + + var now = +new Date, + args = arguments; + if (last && now < last + threshhold) { + // hold on to it + clearTimeout(deferTimer); + deferTimer = setTimeout(function () { + last = now; + fn.apply(context, args); + }, threshhold); + } else { + last = now; + fn.apply(context, args); + } + }; + } +} \ No newline at end of file diff --git "a/04-\345\270\270\347\224\250\345\212\237\350\203\275/page_visible_api.js" "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/page_visible_api.js" new file mode 100644 index 000000000..d8662966c --- /dev/null +++ "b/04-\345\270\270\347\224\250\345\212\237\350\203\275/page_visible_api.js" @@ -0,0 +1,44 @@ +/** + * 【 page visible api 】 + * 可以用于控制页面元素,如后台停止音乐播放等 + * - hidden: document存储的页面状态的属性名 + * - visibilityChange: 监听事件名 + */ +(function (show, hide) { + var hidden, visibilityChange; + if (typeof document.hidden !== "undefined") { + hidden = "hidden"; + visibilityChange = "visibilitychange"; + } else if (typeof document.mozHidden !== "undefined") { + hidden = "mozHidden"; + visibilityChange = "mozvisibilitychange"; + } else if (typeof document.msHidden !== "undefined") { + hidden = "msHidden"; + visibilityChange = "msvisibilitychange"; + } else if (typeof document.webkitHidden !== "undefined") { + hidden = "webkitHidden"; + visibilityChange = "webkitvisibilitychange"; + } else if (typeof document.onfocusin !== "undefined") { + document.onfocusin = document.onfocusout = onchange; + } else { + window.onpageshow = window.onpagehide = window.onfocus = window.onblur = onchange; + } + if (hidden) { + document.addEventListener(visibilityChange, onchange, false); + } + function onchange () { + console.log("当前页面是否被隐藏:" + document[hidden]); + if (document[hidden]) { + pageHide(); + } else { + pageShow(); + } + } +})(pageShow, pageHide); + +function pageShow () { + console.log("page is show"); +} +function pageHide () { + console.log("page is hide"); +} diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/0 \346\210\221\347\232\204\346\200\273\347\273\223.md" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/0 \346\210\221\347\232\204\346\200\273\347\273\223.md" new file mode 100644 index 000000000..6b48681a9 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/0 \346\210\221\347\232\204\346\200\273\347\273\223.md" @@ -0,0 +1,32 @@ +# 我的总结 +【未完结】 + +## 适用场景区别 + +职责链模式 vs 模板方法模式 +职责链目的在于找到合适的处理方法 +模板方法模式在于执行一系列方法 + + +装饰者模式和代理模式的结构看起来非常相像,两种模式都描述了怎样为对象提供一定程度上的间接引用,它们的实现部分都保留了对另外一个对象的引用,并且向那个对象发送请求。 +目的不同: +1. 代理模式的目的是,当直接访问本体不方便或者不符合需要时,为这个本体提供一个替代者。 +本体定义了关键功能,而代理提供或拒绝对它的访问,或者在访问本体之前做一些额外的事情。 +2. 装饰者模式的作用就是为对象动态加入行为。 +换句话说,代理模式强调一种关系(Proxy 与它的实体之间的关系),这种关系可以静态的表达,也就是说,这种关系在一开始就可以被确定。 +而装饰者模式用于一开始不能确定对象的全部功能时。 +代理模式通常只有一层 代理 - 本体 的引用,而装饰者模式经常会形成一条长长的装饰链。 + +在虚拟代理实现图片预加载的例子中,本体负责设置 img 节点的 src,代理则提供了预加载 +的功能,这看起来也是“加入行为”的一种方式,但这种加入行为的方式和装饰者模式的偏重点 +是不一样的。装饰者模式是实实在在的为对象增加新的职责和行为,而代理做的事情还是跟本体 +一样,最终都是设置 src。但代理可以加入一些“聪明”的功能,比如在图片真正加载好之前,先使用一张占位的 loadin 图片反馈给 + +状态模式和策略模式的关系 + + 装饰者模式和代理模式也不会改变原有对象的接口,但装饰者模式的作用是为了给对象 +增加功能。装饰者模式常常形成一条长的装饰链,而适配器模式通常只包装一次。代理 +模式是为了控制对对象的访问,通常也只包装一次。 + 外观模式的作用倒是和适配器比较相似,有人把外观模式看成一组对象的适配器,但外 +观模式最显著的特点是定义了一个新的接口 + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\344\274\230\345\212\277.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\344\274\230\345\212\277.html" new file mode 100644 index 000000000..ceb1ee874 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\344\274\230\345\212\277.html" @@ -0,0 +1,27 @@ +笔记:动态类型语言不必借助超类就能轻松实现一个原则:“面向接口编程,而不是面向实现编程” + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\347\261\273\345\236\213.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\347\261\273\345\236\213.html" deleted file mode 100644 index 95b03eb49..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.1 \345\212\250\346\200\201\350\257\255\350\250\200\347\261\273\345\236\213.html" +++ /dev/null @@ -1,27 +0,0 @@ - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2 \345\244\232\346\200\201-\345\217\215\351\235\242\346\225\231\346\235\220.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2 \345\244\232\346\200\201-\345\217\215\351\235\242\346\225\231\346\235\220.html" new file mode 100644 index 000000000..96cbb7fe0 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2 \345\244\232\346\200\201-\345\217\215\351\235\242\346\225\231\346\235\220.html" @@ -0,0 +1,18 @@ +笔记:反面教材 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.1 \345\244\232\346\200\2011.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.1 \345\244\232\346\200\2011.html" deleted file mode 100644 index 507e8f4a3..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.1 \345\244\232\346\200\2011.html" +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.2 \345\244\232\346\200\2012.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.2 \345\244\232\346\200\2012.html" deleted file mode 100644 index dc811bf47..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.2 \345\244\232\346\200\2012.html" +++ /dev/null @@ -1,30 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.3 \345\244\232\346\200\2013.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.3 \345\244\232\346\200\2013.html" deleted file mode 100644 index 4fda09ae7..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.2.3 \345\244\232\346\200\2013.html" +++ /dev/null @@ -1,56 +0,0 @@ - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\244\232\346\200\201-\346\224\271\345\206\231.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\244\232\346\200\201-\346\224\271\345\206\231.html" new file mode 100644 index 000000000..cadf1c227 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\244\232\346\200\201-\346\224\271\345\206\231.html" @@ -0,0 +1,34 @@ +笔记:改写后,把不变的部分隔离出来,makeSound +1. 多态的思想实际是把“做什么”和“谁去做”分离开,归根结底先要消除类型之间的耦合关系 +本例中 makeSound 方法中未指定发出叫声的对象是某个类型,因此可被替换为另外一个类型 +2. 在 Java 中,通过向上转型来实现多态 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\260\201\350\243\205.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\260\201\350\243\205.html" deleted file mode 100644 index d8c465008..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.3 \345\260\201\350\243\205.html" +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\257\271\350\261\241\345\205\213\351\232\206.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\257\271\350\261\241\345\205\213\351\232\206.html" deleted file mode 100644 index 80469a1f2..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\257\271\350\261\241\345\205\213\351\232\206.html" +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\260\201\350\243\205.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\260\201\350\243\205.html" new file mode 100644 index 000000000..8b30c5b93 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.4 \345\260\201\350\243\205.html" @@ -0,0 +1,29 @@ +笔记: +1. 封装的目的是将信息隐藏,包括封装数据、实现、类型和变化 +2. 封装数据: +JavaScript只能依赖变量的作用域模拟出 public 和 private 两种封装性 +3. 封装实现: +对象间只通过暴露的 API 接口来通信 +4. 封装类型: +工厂方法模式、组合模式 +静态语言通过抽象类和接口实现 +JavaScript 没有能力,也没必要做得更多 +5. 封装变化 +【创建型模式】封装创建对象的变化 +【结构型模式】封装对象之间的组合关系 +【行为型模式】封装对象的行为变化 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\216\237\345\236\213\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\216\237\345\236\213\346\250\241\345\274\217.html" deleted file mode 100644 index b8189d91a..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\216\237\345\236\213\346\250\241\345\274\217.html" +++ /dev/null @@ -1,89 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\244\232\346\200\201-demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\244\232\346\200\201-demo.html" new file mode 100644 index 000000000..ba9bcd267 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.5 \345\244\232\346\200\201-demo.html" @@ -0,0 +1,50 @@ +笔记:多态的最佳实践 demo +1. 多态最根本的作用把过程化的条件分支语句转化为对象的多态性 +从而消除这些条件分支语句: renderMap2 => renderMap +2. 将行为分布在各个对象中,并让这些对象各自负责自己的行为,这正是面向对象设计的优点 +3. 案例:命令模式、组合模式、策略模式 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.6 \345\216\237\345\236\213\346\250\241\345\274\217\345\237\272\347\241\200-\345\257\271\350\261\241\345\205\213\351\232\206.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.6 \345\216\237\345\236\213\346\250\241\345\274\217\345\237\272\347\241\200-\345\257\271\350\261\241\345\205\213\351\232\206.html" new file mode 100644 index 000000000..f0b83af19 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.6 \345\216\237\345\236\213\346\250\241\345\274\217\345\237\272\347\241\200-\345\257\271\350\261\241\345\205\213\351\232\206.html" @@ -0,0 +1,30 @@ +笔记: +1. 面向对象中,对象从类中创建而来 +而在原型编程思想中,类并不是必需的,一个对象是通过克隆另外一个对象得到 +2. 原型模式的实现关键,是语言本身是否提供了clone 方法 +ECMAScript 5 提供了 Object.create 方法,可以用来克隆对象 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.7 \345\216\237\345\236\213\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.7 \345\216\237\345\236\213\346\250\241\345\274\217.html" new file mode 100644 index 000000000..6b92c0421 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.7 \345\216\237\345\236\213\346\250\241\345\274\217.html" @@ -0,0 +1,58 @@ +笔记: +JavaScript 遵守原型编程的基本规则 + 1. 所有的数据都是对象 + 2. 要得到一个对象,不是通过实例化类,而是找到一个对象作为原型并克隆它 + 3. 对象会记住它的原型 + 4. 如果对象无法响应某个请求,它会把这个请求委托给它自己的原型 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.8 \345\216\237\345\236\213\347\273\247\346\211\277.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.8 \345\216\237\345\236\213\347\273\247\346\211\277.html" new file mode 100644 index 000000000..1de9dc3d5 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/1.8 \345\216\237\345\236\213\347\273\247\346\211\277.html" @@ -0,0 +1,44 @@ +笔记:原型继承,续上一节 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.1 \347\273\204\345\220\210\346\250\241\345\274\217-\345\221\275\344\273\244\346\250\241\345\274\217\344\274\230\345\214\226.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.1 \347\273\204\345\220\210\346\250\241\345\274\217-\345\221\275\344\273\244\346\250\241\345\274\217\344\274\230\345\214\226.html" new file mode 100644 index 000000000..8aa040628 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.1 \347\273\204\345\220\210\346\250\241\345\274\217-\345\221\275\344\273\244\346\250\241\345\274\217\344\274\230\345\214\226.html" @@ -0,0 +1,78 @@ +组合模式可以使用树形方式创建对象的结构 +可以把相同的操作应用在组合对象和单个对象上,可以忽略组合对象和单个对象之间的差别,用一致的方式来处理它们 + + + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.2 \347\273\204\345\220\210\346\250\241\345\274\217-\346\226\207\344\273\266\347\256\241\347\220\206.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.2 \347\273\204\345\220\210\346\250\241\345\274\217-\346\226\207\344\273\266\347\256\241\347\220\206.html" new file mode 100644 index 000000000..09eaecdb1 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.2 \347\273\204\345\220\210\346\250\241\345\274\217-\346\226\207\344\273\266\347\256\241\347\220\206.html" @@ -0,0 +1,55 @@ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.3 \347\273\204\345\220\210\346\250\241\345\274\217-\345\274\225\347\224\250\347\210\266\345\257\271\350\261\241.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.3 \347\273\204\345\220\210\346\250\241\345\274\217-\345\274\225\347\224\250\347\210\266\345\257\271\350\261\241.html" new file mode 100644 index 000000000..33a1e1703 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10.3 \347\273\204\345\220\210\346\250\241\345\274\217-\345\274\225\347\224\250\347\210\266\345\257\271\350\261\241.html" @@ -0,0 +1,75 @@ +组合对象保存了它下面的子节点的引用,这是组合模式的特点,此时树结构是从上至下的 +但有时候我们需要在子节点上保持对父节点的引用,比如在组合模式中使用职责链时,有可能需要让请求从子节点往父节点上冒泡传递 +还有当我们删除某个文件的时候,实际上是从这个文件所在的上层文件夹中删除该文件的 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/10/10.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/10/10.html" deleted file mode 100644 index 11fccaa10..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/10/10.html" +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.1 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.1 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" new file mode 100644 index 000000000..10f9ad416 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.1 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" @@ -0,0 +1,56 @@ +模板方法模式 +模板方法模式是一种典型的通过封装变化提高系统扩展性的设计模式。 +在传统的面向对象语言中,一个运用了模板方法模式的程序中,子类的方法种类和执行顺序都是不变的,所以我们把这部分逻辑抽象到父类的模板方法里面。 +而子类的方法具体怎么实现则是可变的,于是我们把这部分变化的逻辑封装到子类中。 +通过增加新的子类,我们便能给系统增加新的功能,并不需要改动抽象父类以及其他子类,这也是符合开放封闭原则的。 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.2 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217-\351\222\251\345\255\220\346\226\271\346\263\225&\346\212\275\350\261\241\347\272\246\346\235\237.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.2 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217-\351\222\251\345\255\220\346\226\271\346\263\225&\346\212\275\350\261\241\347\272\246\346\235\237.html" new file mode 100644 index 000000000..434b9c9d2 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.2 \346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217-\351\222\251\345\255\220\346\226\271\346\263\225&\346\212\275\350\261\241\347\272\246\346\235\237.html" @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.3 \345\245\275\350\216\261\345\235\236\345\216\237\345\210\231&\351\253\230\351\230\266\345\207\275\346\225\260\346\233\277\344\273\243\346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.3 \345\245\275\350\216\261\345\235\236\345\216\237\345\210\231&\351\253\230\351\230\266\345\207\275\346\225\260\346\233\277\344\273\243\346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" new file mode 100644 index 000000000..dbe769c90 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11.3 \345\245\275\350\216\261\345\235\236\345\216\237\345\210\231&\351\253\230\351\230\266\345\207\275\346\225\260\346\233\277\344\273\243\346\250\241\346\235\277\346\226\271\346\263\225\346\250\241\345\274\217.html" @@ -0,0 +1,70 @@ +【 好莱坞原则 】 +模板方法模式是好莱坞原则的一个典型使用场景,它与好莱坞原则的联系非常明显 +当我们用模板方法模式编写一个程序时,就意味着子类放弃了对自己的控制权,而是改为父类通知子类,哪些方法应该在什么时候被调用 +作为子类,只负责提供一些设计上的细节。 +除此之外,好莱坞原则还常常应用于其他模式和场景,例如:发布订阅模式 和 回调函数 + +【高阶函数替代】 +模板方法模式是基于继承的一种设计模式,父类封装了子类的算法框架和方法的执行顺序 +子类继承父类之后,父类通知子类执行这些方法,好莱坞原则很好地诠释了这种设计技巧,即高层组件调用底层组件 +模板方法模式是为数不多的基于继承的设计模式,但 JavaScript 语言实际上没有提供真正的类式继承,继承是通过对象与对象之间的委托来实现的 +大多数情况下,其实我们可以通过高阶函数替代js不正宗的模板方法模式 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/11/11.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/11/11.html" deleted file mode 100644 index 5c6ab55ec..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/11/11.html" +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.1 \344\272\253\345\205\203\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.1 \344\272\253\345\205\203\346\250\241\345\274\217.html" new file mode 100644 index 000000000..aa056e779 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.1 \344\272\253\345\205\203\346\250\241\345\274\217.html" @@ -0,0 +1,54 @@ +享元模式是为解决性能问题而生的模式,这跟大部分模式的诞生原因都不一样。 +在一个存在大量相似对象的系统中,享元模式可以运用共享技术很好地解决大量对象带来的性能问题。 + +实现享元模式的关键是把内部状态和外部状态分离开来 +有多少种内部状态的组合,系统中便最多存在多少个共享对象 +而外部状态储存在共享对象的外部,在必要时被传入共享对象来组装成一个完整的对象 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.2 \344\272\253\345\205\203\346\250\241\345\274\217-\345\257\271\350\261\241\346\261\240\345\267\245\345\216\202\346\226\207\344\273\266\344\270\212\344\274\240.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.2 \344\272\253\345\205\203\346\250\241\345\274\217-\345\257\271\350\261\241\346\261\240\345\267\245\345\216\202\346\226\207\344\273\266\344\270\212\344\274\240.html" new file mode 100644 index 000000000..938be203b --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.2 \344\272\253\345\205\203\346\250\241\345\274\217-\345\257\271\350\261\241\346\261\240\345\267\245\345\216\202\346\226\207\344\273\266\344\270\212\344\274\240.html" @@ -0,0 +1,119 @@ +享元模式的适用性 + 一个程序中使用了大量的相似对象。 + 由于使用了大量对象,造成很大的内存开销。 + 对象的大多数状态都可以变为外部状态。 + 剥离出对象的外部状态之后,可以用相对较少的共享对象取代大量对象 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.3 \351\200\232\347\224\250\345\257\271\350\261\241\346\261\240.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.3 \351\200\232\347\224\250\345\257\271\350\261\241\346\261\240.html" new file mode 100644 index 000000000..6bbeaa927 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12.3 \351\200\232\347\224\250\345\257\271\350\261\241\346\261\240.html" @@ -0,0 +1,50 @@ +通用对象池实现 +【 此案例没有尝试分离出内部状态,因此不算享元模式 】 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/12/12.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/12/12.html" deleted file mode 100644 index 6f511cffe..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/12/12.html" +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.1 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.1 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" new file mode 100644 index 000000000..b4fae6e8e --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.1 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" @@ -0,0 +1,73 @@ +职责链模式的最大优点就是解耦了 请求发送者 和 N个接收者 之间的复杂关系 +由于不知道链中的哪个节点可以处理发出的请求,所以只需把请求传递给第一个节点即可 +无论是作用域链、原型链,还是 DOM 节点中的事件冒泡,我们都能从中找到职责链模式的影子 + +1 对 N 环形关系 ===> 链式关系 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.2 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\347\201\265\346\264\273\350\201\214\350\264\243\351\223\276\350\212\202\347\202\271.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.2 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\347\201\265\346\264\273\350\201\214\350\264\243\351\223\276\350\212\202\347\202\271.html" new file mode 100644 index 000000000..b0235e502 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.2 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-\347\201\265\346\264\273\350\201\214\350\264\243\351\223\276\350\212\202\347\202\271.html" @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.3 \345\274\202\346\255\245\350\201\214\350\264\243\351\223\276.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.3 \345\274\202\346\255\245\350\201\214\350\264\243\351\223\276.html" new file mode 100644 index 000000000..36e637c04 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.3 \345\274\202\346\255\245\350\201\214\350\264\243\351\223\276.html" @@ -0,0 +1,56 @@ +前面的 passRequest 用于自动传递同步请求,不能处理异步请求,往往职责链的传递是在异步 ajax 请求结束后才能确定的 +本demo额外给职责链添加 next 方法处理异步请求 +需要在异步处理函数中主动调用 next 进行下一步 + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.4 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-AOP.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.4 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-AOP.html" new file mode 100644 index 000000000..2ea0cbf0f --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13.4 \350\201\214\350\264\243\351\223\276\346\250\241\345\274\217-AOP.html" @@ -0,0 +1,84 @@ +利用 JavaScript 的函数式特性,有一种更加方便的方法来创建职责链 +用 AOP 来实现职责链既简单又巧妙,但这种把函数叠在一起的方式,同时也叠加了函数的作用域,如果链条太长的话,也会对性能有较大的影响 + +【 OOP 与 AOP 的区别 】 +面向目标不同:OOP 面向名词领域,AOP 面向动词领域 +思想结构不同:OOP 是纵向结构,AOP 是横向结构 +注重方面不同:OOP 注重业务逻辑单元的划分,AOP 偏重业务处理过程中的某个步骤或阶段 +【 OOP 与 AOP 的联系 】 +两者之间是一个相互补充和完善的关系 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13/13.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/13/13.html" deleted file mode 100644 index a7114af56..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/13/13.html" +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.1 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\346\270\270\346\210\217\347\216\251\345\256\266demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.1 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\346\270\270\346\210\217\347\216\251\345\256\266demo.html" new file mode 100644 index 000000000..85c138dfd --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.1 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\346\270\270\346\210\217\347\216\251\345\256\266demo.html" @@ -0,0 +1,126 @@ +中介者模式使各个对象之间得以解耦,以中介者和对象之间的一对多关系取代了对象之间的网状多对多关系 +各个对象只需关注自身功能的实现,对象之间的交互关系交给了中介者对象来实现和维护 +中介者模式是迎合迪米特法则(最少知识原则)的一种实现 +迪米特法则是指:一个对象应该尽可能少地了解另外的对象(不和陌生人说话) +在中介者模式里,对象之间几乎不知道彼此的存在,它们只能通过中介者对象来互相影响对方 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.2 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\350\264\255\347\211\251\350\275\246demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.2 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\350\264\255\347\211\251\350\275\246demo.html" new file mode 100644 index 000000000..62ac8f8a5 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/14.2 \344\270\255\344\273\213\350\200\205\346\250\241\345\274\217-\350\264\255\347\211\251\350\275\246demo.html" @@ -0,0 +1,77 @@ + + 选择颜色: + 选择内存: + 输入购买数量:
+ 您选择了颜色:

+ 您选择了内存:

+ 您输入了数量:

+ + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/14/14.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/14/14.html" deleted file mode 100644 index 9c4f3c74e..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/14/14.html" +++ /dev/null @@ -1,219 +0,0 @@ - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.1 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217\345\257\271\346\257\224\347\273\247\346\211\277&\346\250\241\346\213\237\344\274\240\347\273\237\345\256\236\347\216\260.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.1 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217\345\257\271\346\257\224\347\273\247\346\211\277&\346\250\241\346\213\237\344\274\240\347\273\237\345\256\236\347\216\260.html" new file mode 100644 index 000000000..915b2d224 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.1 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217\345\257\271\346\257\224\347\273\247\346\211\277&\346\250\241\346\213\237\344\274\240\347\273\237\345\256\236\347\216\260.html" @@ -0,0 +1,46 @@ +在传统的面向对象语言中,给对象添加功能常常使用继承的方式,但是继承的方式并不灵活,还会带来许多问题: +1. 一方面会导致超类和子类之间存在强耦合性,当超类改变时,子类也会随之改变; +2. 另一方面,继承这种功能复用方式通常被称为“白箱复用”,“白箱”是相对可见性而言的,在继承方式中,超类的内部细节是对子类可见的,继承常常被认为破坏了封装性。 +3. 使用继承还会带来另外一个问题,在完成一些功能复用的同时,有可能创建出大量的子类,使子类的数量呈爆炸性增长。比如现在有 4 种型号的自行车,我们为每种自行车都定义了一个单独的类。 +现在要给每种自行车都装上前灯、尾灯和铃铛这 3 种配件。如果使用继承的方式来给每种自行车创建子类,则需要 4×3 = 12 个子类。 +但是如果把前灯、尾灯、铃铛这些对象动态组合到自行车上面,则只需要额外增加 3 个子类。 + +这种给对象动态地增加职责的方式称为装饰者(decorator)模式。 +装饰者模式能够在不改变对象自身的基础上,在程序运行期间给对象动态地添加职责。 +跟继承相比,装饰者是一种更轻便灵活的做法,这是一种“即用即付”的方式。 + +装饰者对象和它所装饰的对象拥有一致的接口,所以它们对使用该对象的客户来说是透明的, +被装饰的对象也并不需要了解它曾经被装饰过,这种透明性使得我们可以递归地嵌套任意多个装饰者对象 + +从功能上而言,decorator 能很好地描述这个模式,但从结构上看,wrapper 的说法更加贴切。 +装饰者模式将一个对象嵌入另一个对象之中,实际上相当于这个对象被另一个对象包装起来,形成一条包装链。 +请求随着这条链依次传递到所有的对象,每个对象都有处理这条请求的机会, + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.2 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217-js\347\233\264\346\216\245\346\224\271\345\206\231\345\207\275\346\225\260.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.2 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217-js\347\233\264\346\216\245\346\224\271\345\206\231\345\207\275\346\225\260.html" new file mode 100644 index 000000000..f3c8cc6bb --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.2 \350\243\205\351\245\260\345\231\250\346\250\241\345\274\217-js\347\233\264\346\216\245\346\224\271\345\206\231\345\207\275\346\225\260.html" @@ -0,0 +1,32 @@ +要想为函数添加一些功能,最简单粗暴的方式就是直接改写该函数 +但这是最差的办法,直接违反了开放封闭原则 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.3 AOP\345\260\201\350\243\205\350\243\205\351\245\260\345\207\275\346\225\260.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.3 AOP\345\260\201\350\243\205\350\243\205\351\245\260\345\207\275\346\225\260.html" new file mode 100644 index 000000000..1bbad792b --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.3 AOP\345\260\201\350\243\205\350\243\205\351\245\260\345\207\275\346\225\260.html" @@ -0,0 +1,75 @@ +缺点:下面方法1 的 AOP 实现是在 Function.prototype 上添加 before 和 after 方法,这种方式会污染原型 +可以做一些变通,把原函数和装饰函数都作为参数传入 before 或者 after 方法,如方法2 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.4 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\225\260\346\215\256\347\273\237\350\256\241\344\270\212\346\212\245.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.4 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\225\260\346\215\256\347\273\237\350\256\241\344\270\212\346\212\245.html" new file mode 100644 index 000000000..bdd76c8ea --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.4 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\225\260\346\215\256\347\273\237\350\256\241\344\270\212\346\212\245.html" @@ -0,0 +1,46 @@ + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.5 AOP\345\212\250\346\200\201\346\224\271\345\217\230\345\207\275\346\225\260\345\217\202\346\225\260-CSRF\346\224\273\345\207\273\351\230\262\350\214\203.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.5 AOP\345\212\250\346\200\201\346\224\271\345\217\230\345\207\275\346\225\260\345\217\202\346\225\260-CSRF\346\224\273\345\207\273\351\230\262\350\214\203.html" new file mode 100644 index 000000000..91b2c854e --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.5 AOP\345\212\250\346\200\201\346\224\271\345\217\230\345\207\275\346\225\260\345\217\202\346\225\260-CSRF\346\224\273\345\207\273\351\230\262\350\214\203.html" @@ -0,0 +1,30 @@ +解决 CSRF 攻击最简单的一个办法就是在 HTTP 请求中带上一个 Token 参数 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.6 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\217\222\344\273\266\345\274\217\350\241\250\345\215\225\351\252\214\350\257\201.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.6 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\217\222\344\273\266\345\274\217\350\241\250\345\215\225\351\252\214\350\257\201.html" new file mode 100644 index 000000000..737bc0111 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15.6 AOP\345\272\224\347\224\250\345\256\236\344\276\213-\346\217\222\344\273\266\345\274\217\350\241\250\345\215\225\351\252\214\350\257\201.html" @@ -0,0 +1,65 @@ + + 用户名: + 密码: + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15/15.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/15/15.html" deleted file mode 100644 index ce8af1c14..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/15/15.html" +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - 用户名: - - 密码: - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.1 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.1 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" new file mode 100644 index 000000000..8ac1cd858 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.1 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220.html" @@ -0,0 +1,51 @@ +GOF:状态模式 - 允许一个对象在其内部状态改变时改变它的行为,对象看起来似乎修改了它的类 +1. 将状态封装成独立的类,并将请求委托给当前的状态对象,当对象的内部状态改变时,会带来不同的行为变化 +2. 从客户的角度来看,我们使用的对象,在不同的状态下具有截然不同的行为,这个对象看起来是从不同的类中实例化而来的,实际上这是使用了委托的效果 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.2 \347\212\266\346\200\201\346\250\241\345\274\217-\345\274\200\345\205\263\347\201\257demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.2 \347\212\266\346\200\201\346\250\241\345\274\217-\345\274\200\345\205\263\347\201\257demo.html" new file mode 100644 index 000000000..eb5c12ce0 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.2 \347\212\266\346\200\201\346\250\241\345\274\217-\345\274\200\345\205\263\347\201\257demo.html" @@ -0,0 +1,69 @@ + +使用状态模式的好处很明显, +它可以使每一种状态和它对应的行为之间的关系局部化,这些行为被分散和封装在各自对应的状态类之中,便于阅读和管理代码。 +另外,状态之间的切换都被分布在状态类内部,这使得我们无需编写过多的 if、else 条件分支语言来控制状态之间的转换。 +当我们需要为 light 对象增加一种新的状态时,只需要增加一个新的状态类,再稍稍改变一些现有的代码即可。 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.3 \347\212\266\346\200\201\346\250\241\345\274\217-\346\212\275\350\261\241\347\261\273\344\274\230\345\214\226\345\274\200\345\205\263\347\201\257demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.3 \347\212\266\346\200\201\346\250\241\345\274\217-\346\212\275\350\261\241\347\261\273\344\274\230\345\214\226\345\274\200\345\205\263\347\201\257demo.html" new file mode 100644 index 000000000..074538d22 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.3 \347\212\266\346\200\201\346\250\241\345\274\217-\346\212\275\350\261\241\347\261\273\344\274\230\345\214\226\345\274\200\345\205\263\347\201\257demo.html" @@ -0,0 +1,77 @@ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.4 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220\346\226\207\344\273\266\344\270\212\344\274\240demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.4 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220\346\226\207\344\273\266\344\270\212\344\274\240demo.html" new file mode 100644 index 000000000..072bb9546 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.4 \347\212\266\346\200\201\346\250\241\345\274\217-\345\217\215\351\235\242\346\225\231\346\235\220\346\226\207\344\273\266\344\270\212\344\274\240demo.html" @@ -0,0 +1,143 @@ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.5 \347\212\266\346\200\201\346\250\241\345\274\217-\344\274\230\345\214\226\346\226\207\344\273\266\344\270\212\344\274\240.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.5 \347\212\266\346\200\201\346\250\241\345\274\217-\344\274\230\345\214\226\346\226\207\344\273\266\344\270\212\344\274\240.html" new file mode 100644 index 000000000..fcbb5aa7b --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.5 \347\212\266\346\200\201\346\250\241\345\274\217-\344\274\230\345\214\226\346\226\207\344\273\266\344\270\212\344\274\240.html" @@ -0,0 +1,200 @@ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.6 \347\212\266\346\200\201\346\250\241\345\274\217-\347\212\266\346\200\201\346\234\272\347\212\266\346\200\201\345\205\261\344\272\253.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.6 \347\212\266\346\200\201\346\250\241\345\274\217-\347\212\266\346\200\201\346\234\272\347\212\266\346\200\201\345\205\261\344\272\253.html" new file mode 100644 index 000000000..d183290d8 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.6 \347\212\266\346\200\201\346\250\241\345\274\217-\347\212\266\346\200\201\346\234\272\347\212\266\346\200\201\345\205\261\344\272\253.html" @@ -0,0 +1,51 @@ +状态机状态共享,提升性能 +前面两个示例都是模拟传统面向对象语言的状态模式实现 +为每种状态都定义一个状态子类,然后在 Context 中持有这些状态对象的引用,以便把 currState 设置为当前的状态对象 + +但在 JavaScript 这种“无类”语言中,没有规定状态对象一定要从类中创建而来,JavaScript 可以非常方便地使用委托技术,实现更加轻巧 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.7 delegate\345\207\275\346\225\260\347\211\210\347\212\266\346\200\201\346\234\272.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.7 delegate\345\207\275\346\225\260\347\211\210\347\212\266\346\200\201\346\234\272.html" new file mode 100644 index 000000000..deb585ffc --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.7 delegate\345\207\275\346\225\260\347\211\210\347\212\266\346\200\201\346\234\272.html" @@ -0,0 +1,65 @@ +利用 delegate 函数来完成状态机编写 +这是面向对象设计和闭包互换的一个例子 +前者把变量保存为对象的属性,而后者把变量封闭在闭包形成的环境中 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.8? \350\241\250\351\251\261\345\212\250\347\232\204\346\234\211\351\231\220\347\212\266\346\200\201\346\234\272.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.8? \350\241\250\351\251\261\345\212\250\347\232\204\346\234\211\351\231\220\347\212\266\346\200\201\346\234\272.html" new file mode 100644 index 000000000..477d61fc8 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.8? \350\241\250\351\251\261\345\212\250\347\232\204\346\234\211\351\231\220\347\212\266\346\200\201\346\234\272.html" @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.9 \347\212\266\346\200\201\346\234\272demo.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.9 \347\212\266\346\200\201\346\234\272demo.html" new file mode 100644 index 000000000..230db0154 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16.9 \347\212\266\346\200\201\346\234\272demo.html" @@ -0,0 +1,34 @@ +在实际开发中,很多场景都可以用状态机来模拟, +比如一个下拉菜单在 hover 动作下有显示、悬浮、隐藏等状态 +一次 TCP 请求有建立连接、监听、关闭等状态 +一个格斗游戏中人物有攻击、防御、跳跃、跌倒等状态。 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16/16.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/16/16.html" deleted file mode 100644 index f64ab773e..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/16/16.html" +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/17.1 \351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/17.1 \351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.html" new file mode 100644 index 000000000..2f6644dff --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/17.1 \351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.html" @@ -0,0 +1,30 @@ +适配器模式主要用来解决两个已有接口之间不匹配的问题,它不考虑这些接口是怎样实现的,也不考虑它们将来可能会如何演化。 +适配器模式不需要改变已有的接口,就能够使它们协同作用。 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/17/17.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/17/17.html" deleted file mode 100644 index cb6924264..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/17/17.html" +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/18.1 \345\215\225\344\270\200\350\201\214\350\264\243\345\216\237\345\210\231.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/18.1 \345\215\225\344\270\200\350\201\214\350\264\243\345\216\237\345\210\231.html" new file mode 100644 index 000000000..f006598b6 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/18.1 \345\215\225\344\270\200\350\201\214\350\264\243\345\216\237\345\210\231.html" @@ -0,0 +1,17 @@ +单一职责原则(SRP) +js中,SRP 原则体现为:一个对象(方法)只做一件事情 + +SRP 原则在很多设计模式中都有着广泛的运用,例如代理模式、迭代器模式、单例模式和装饰者模式 +1. 代理模式 +我们在第 6 章中已经见过这个图片预加载的例子了。通过增加虚拟代理的方式,把预加载图片的职责放到代理对象中,而本体仅仅负责往页面中添加 img 标签,这也是它最原始的职责。 +2. 迭代器模式 +appendDiv 函数本来只是负责渲染数据,但是在这里它还承担了遍历聚合对象 data 的职责。当把迭代聚合对象的职责单独封装在 each 函数中后,即使以后还要增加新的迭代方式, +我们只需要修改 each 函数即可,appendDiv 函数不会受到牵连。 +3. 单例模式 + +4. 装饰者模式 + +SRP 原则的优点是降低了单个类或者对象的复杂度,按照职责把对象分解成更小的粒度,这有助于代码的复用,也有利于进行单元测试。 +当一个职责需要变更的时候,不会影响到其他的职责。 +但 SRP 原则也有一些缺点,最明显的是会增加编写代码的复杂度。 +当我们按照职责把对象分解成更小的粒度之后,实际上也增大了这些对象之间相互联系的难度。 diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/18/18.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/18/18.html" deleted file mode 100644 index d728271e4..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/18/18.html" +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/19.1 \346\234\200\345\260\221\347\237\245\350\257\206\345\216\237\345\210\231.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/19.1 \346\234\200\345\260\221\347\237\245\350\257\206\345\216\237\345\210\231.html" new file mode 100644 index 000000000..2dd8636f8 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/19.1 \346\234\200\345\260\221\347\237\245\350\257\206\345\216\237\345\210\231.html" @@ -0,0 +1,53 @@ +最少知识原则(LKP,迪米特法则)说的是一个软件实体应当尽可能少地与其他实体发生相互作用 + +单一职责原则指导我们把对象划分成较小的粒度,可以提高对象的可复用性。 +但越来越多的对象之间可能会产生错综复杂的联系,最少知识原则要求我们在设计程序时,应当尽量减少对象之间的交互。 +常见的做法是引入一个第三者对象,来承担这些对象之间的通信作用。 +虽然遵守最小知识原则减少了对象之间的依赖,但也有可能增加一些庞大到难以维护的第三者对象。 + +【 设计模式中的最少知识原则 】 +1. 中介者模式 +通过增加一个中介者对象,让所有的相关对象都通过中介者对象来通信,而不是互相引用。 +所以,当一个对象发生改变时,只需要通知中介者对象即可。 + +2. 外观模式 +外观模式的作用是对客户屏蔽一组子系统的复杂性。外观模式对客户提供一个简单易用的高层接口,高层接口会把客户的请求转发给子系统来完成具体的功能实现。 +例如洗衣机的自动模式。 + + +【 封装在最少知识原则中的体现 】 +把变量的可见性限制在一个尽可能小的范围内,这个变量对其他不相关模块的影响就越小,变量被改写和发生冲突的机会也越小。 +这也是广义的最少知识原则的一种体现。 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/19/19.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/19/19.html" deleted file mode 100644 index 06b70d886..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/19/19.html" +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this&call&apply1.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this&call&apply1.html" deleted file mode 100644 index 7b2f00562..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this&call&apply1.html" +++ /dev/null @@ -1,122 +0,0 @@ - - - - -
我是一个div
- - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this\346\214\207\345\220\221.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this\346\214\207\345\220\221.html" new file mode 100644 index 000000000..7d703990a --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.1 this\346\214\207\345\220\221.html" @@ -0,0 +1,97 @@ +笔记: +1. JavaScript 的 this 总是动态绑定指向一个对象 +2. 除去不常用的 with 和 eval,this 的指向大致可以分为以下 4 种 + 作为对象的方法调用,this 指向该对象 + 作为普通函数调用 + 构造器调用 + Function.prototype.call 或 Function.prototype.apply 调用 + + +
我是一个div
+ + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this&call&apply2.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this&call&apply2.html" deleted file mode 100644 index 465792dc1..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this&call&apply2.html" +++ /dev/null @@ -1,43 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this\346\214\207\345\220\221\344\277\256\346\255\243.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this\346\214\207\345\220\221\344\277\256\346\255\243.html" new file mode 100644 index 000000000..880ec300d --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.2 this\346\214\207\345\220\221\344\277\256\346\255\243.html" @@ -0,0 +1,36 @@ +笔记: + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 call&apply\345\237\272\347\241\200.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 call&apply\345\237\272\347\241\200.html" new file mode 100644 index 000000000..138014f5f --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 call&apply\345\237\272\347\241\200.html" @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 this&call&apply3.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 this&call&apply3.html" deleted file mode 100644 index 758289694..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.3 this&call&apply3.html" +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4 this&call&apply4.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4 this&call&apply4.html" deleted file mode 100644 index 359041e05..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4 this&call&apply4.html" +++ /dev/null @@ -1,100 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4? call&apply\345\272\224\347\224\250.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4? call&apply\345\272\224\347\224\250.html" new file mode 100644 index 000000000..b73b9cebd --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/2.4? call&apply\345\272\224\347\224\250.html" @@ -0,0 +1,122 @@ +笔记: + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/20.1 \345\274\200\346\224\276-\345\260\201\351\227\255\345\216\237\345\210\231.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/20.1 \345\274\200\346\224\276-\345\260\201\351\227\255\345\216\237\345\210\231.html" new file mode 100644 index 000000000..5b624924b --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/20.1 \345\274\200\346\224\276-\345\260\201\351\227\255\345\216\237\345\210\231.html" @@ -0,0 +1,43 @@ +开放封闭原则(OCP)是面向对象最重要的一条原则 +软件实体(类、模块、函数)等应该是可以扩展的,但是不可修改。 + +1. 扩展window.onload 函数 + + +2. 用对象的多态性消除条件分支 +参见 1.3 多态 + +3. 找出变化的地方 +封装程序中变化的部分 +例如:动物的叫声不同,而动物都会叫这是不变的,于是封装 makeSound 成一个稳定和封闭的函数 + +其他辅助实现开闭原则代码的方法: +3.1 放置挂钩(hook) +参见 11.2 钩子方法 +3.2 使用回调函数 +函数可以作为参数传递给另外一个函数,这是高阶函数的意义之一,我们通常会把这个函数称为回调函数。 +在 JavaScript 版本的设计模式中,策略模式和命令模式等都可以用回调函数轻松实现。 +回调函数是一种特殊的挂钩,我们可以把一部分易于变化的逻辑封装在回调函数里,然后把回调函数当作参数传入一个稳定和封闭的函数中。 + +4. 设计模式中的开放-封闭原则 +4.1 发布-订阅模式 + +4.2 模板方法模式 + +4.3 策略模式 + +4.4 代理模式 + +4.5 职责链模式 diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/20/20.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/20/20.html" deleted file mode 100644 index fc038cbb2..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/20/20.html" +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/21.1 \346\216\245\345\217\243\345\222\214\351\235\242\345\220\221\346\216\245\345\217\243\347\274\226\347\250\213.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/21.1 \346\216\245\345\217\243\345\222\214\351\235\242\345\220\221\346\216\245\345\217\243\347\274\226\347\250\213.html" new file mode 100644 index 000000000..0292a4890 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/21.1 \346\216\245\345\217\243\345\222\214\351\235\242\345\220\221\346\216\245\345\217\243\347\274\226\347\250\213.html" @@ -0,0 +1,72 @@ +面向接口编程,而不是面向实现编程 +接口是对象能响应的请求的集合 + +静态类型语言通常设计为可以“向上转型”, 对象的具体类型被隐藏在“超类型”身后 +当对象类型之间的耦合关系被解除之后,这些对象才能在类型检查系统的监视下相互替换使用,这样才能看到对象的多态性。 + +总而言之,不关注对象的具体类型,而仅仅针对超类型中的“契约方法”来编写程序,可以产生可靠性高的程序, +也可以极大地减少子系统实现之间的相互依赖关系 + + + + +typescript 实现 interface + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/21/21.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/21/21.html" deleted file mode 100644 index ef0e92977..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/21/21.html" +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/22.1 \344\273\243\347\240\201\351\207\215\346\236\204.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/22.1 \344\273\243\347\240\201\351\207\215\346\236\204.html" new file mode 100644 index 000000000..dac786de6 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/22.1 \344\273\243\347\240\201\351\207\215\346\236\204.html" @@ -0,0 +1,321 @@ +1. 提炼函数 +独立出新的公共函数 + 避免出现超大函数 + 独立出来的函数有助于代码复用 + 独立出来的函数更容易被覆写 + 独立出来的函数如果拥有一个良好的命名,它本身就起到了注释的作用 + + +2. 合并重复的条件片段 + + +3. 把条件分支语句提炼成函数 + + +4. 合理使用循环 + + +5. 提前让函数退出代替嵌套条件分支 + + +6. 传递对象参数代替过长的参数列表 + + +7. 尽量减少参数数量 + + +8. 少用三目运算符 + + +9. 合理使用链式调用 + + +10. 分解大型类 + + +11. 用 return 退出多重循环 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/22/22.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/22/22.html" deleted file mode 100644 index 0f59e5d5d..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/22/22.html" +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.1 \347\255\226\347\225\245\346\250\241\345\274\217-\350\256\241\347\256\227\345\245\226\351\207\221.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.1 \347\255\226\347\225\245\346\250\241\345\274\217-\350\256\241\347\256\227\345\245\226\351\207\221.html" new file mode 100644 index 000000000..4be70adba --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.1 \347\255\226\347\225\245\346\250\241\345\274\217-\350\256\241\347\256\227\345\245\226\351\207\221.html" @@ -0,0 +1,66 @@ +策略模式: +定义一系列算法,把它们各自封装成策略类 +每次请求委托给这些策略对象中的某一个进行计算 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.3 \347\255\226\347\225\245\346\250\241\345\274\217demo-\347\274\223\345\212\250\345\212\250\347\224\273.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.3 \347\255\226\347\225\245\346\250\241\345\274\217demo-\347\274\223\345\212\250\345\212\250\347\224\273.html" new file mode 100644 index 000000000..9a388b3ad --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.3 \347\255\226\347\225\245\346\250\241\345\274\217demo-\347\274\223\345\212\250\345\212\250\347\224\273.html" @@ -0,0 +1,84 @@ + + 策略模式封装缓动动画 +
我是div
+ + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.4 \347\255\226\347\225\245\346\250\241\345\274\217demo-\350\241\250\345\215\225\346\240\241\351\252\214.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.4 \347\255\226\347\225\245\346\250\241\345\274\217demo-\350\241\250\345\215\225\346\240\241\351\252\214.html" new file mode 100644 index 000000000..18e7d925b --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.4 \347\255\226\347\225\245\346\250\241\345\274\217demo-\350\241\250\345\215\225\346\240\241\351\252\214.html" @@ -0,0 +1,95 @@ + + +
+ 请输入用户名: + 请输入密码: + 请输入手机号码: + +
+ + + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.5 \347\255\226\347\225\245\346\250\241\345\274\217demo-\344\274\230\345\214\226\350\241\250\345\215\225\346\240\241\351\252\214.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.5 \347\255\226\347\225\245\346\250\241\345\274\217demo-\344\274\230\345\214\226\350\241\250\345\215\225\346\240\241\351\252\214.html" new file mode 100644 index 000000000..1bd8ea44c --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5.5 \347\255\226\347\225\245\346\250\241\345\274\217demo-\344\274\230\345\214\226\350\241\250\345\215\225\346\240\241\351\252\214.html" @@ -0,0 +1,83 @@ + + +优化:支持单个dom进行多个校验 +
+请输入用户名: +请输入密码: +请输入手机号码: + +
+ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5/5.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/5/5.html" deleted file mode 100644 index 9ff8cb56d..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/5/5.html" +++ /dev/null @@ -1,347 +0,0 @@ - - - -
我是div
- - - - - - -
- 请输入用户名: - 请输入密码: - - 请输入手机号码: - -
- - - - - - - - -
- 请输入用户名: - 请输入密码: - 请输入手机号码: - -
- - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.1 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\256\236\347\216\260\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.1 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\256\236\347\216\260\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275.html" new file mode 100644 index 000000000..f4464611f --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.1 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\256\236\347\216\260\345\233\276\347\211\207\351\242\204\345\212\240\350\275\275.html" @@ -0,0 +1,73 @@ +在 JavaScript 开发中最常用的是虚拟代理和缓存代理 + +虚拟代理实现图片预加载 +通过 proxyImage 间接地访问 MyImage +proxyImage 控制了客户对 MyImage 的访问,并且在此过程中加入一些额外的操作 +比如在真正的图片加载好之前,先把 img 节点的 src 设置为一张本地的 loading 图片 + + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.2 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\220\210\345\271\266HTTP\350\257\267\346\261\202.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.2 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\220\210\345\271\266HTTP\350\257\267\346\261\202.html" new file mode 100644 index 000000000..295c764a1 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.2 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\220\210\345\271\266HTTP\350\257\267\346\261\202.html" @@ -0,0 +1,66 @@ +check的同时向服务器同步文件 +通过一个代理函数 proxySynchronousFile 来收集一段时间之内的请求,最后一次性发送给服务器 +比如我们等待 2 秒之后才把这 2 秒之内需要同步的文件 ID 打包发给 服务器 +如果不是对实时性要求非常高的系统,2 秒的延迟不会带来太大副作用,却能大大减轻 服务器的压力 + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.3 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\234\250\346\203\260\346\200\247\345\212\240\350\275\275\344\270\255\347\232\204\345\272\224\347\224\250.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.3 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\234\250\346\203\260\346\200\247\345\212\240\350\275\275\344\270\255\347\232\204\345\272\224\347\224\250.html" new file mode 100644 index 000000000..d0c42c776 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.3 \344\273\243\347\220\206\346\250\241\345\274\217-\350\231\232\346\213\237\344\273\243\347\220\206\345\234\250\346\203\260\346\200\247\345\212\240\350\275\275\344\270\255\347\232\204\345\272\224\347\224\250.html" @@ -0,0 +1,88 @@ +miniConsole.js 库比较大,不适合初始化页面时加载,需要在用户按下 F2 以后加载 +在 miniConsole.js 加载之前,为了能够让用户正常地使用里面的 API,可以用一个占位的 miniConsole 代理对象来给用户提前使用 +这个代理对象提供给用户的接口,跟实际的 miniConsole 是一样的 +等用户按下 F2 唤出控制台的时候,才开始加载真正的 miniConsole.js 的代码,加载完成之后将遍历 miniConsole 代理对象中的缓存函数队列,同时依次执行它们 + + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.4 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.4 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257.html" new file mode 100644 index 000000000..5c571d86e --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.4 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257.html" @@ -0,0 +1,35 @@ +缓存代理可以为一些开销大的运算结果提供暂时的存储 +在下次运算时,如果传递进来的参数跟之前一致,则可以直接返回前面存储的运算结果 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.5 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257\344\274\230\345\214\226.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.5 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257\344\274\230\345\214\226.html" new file mode 100644 index 000000000..a886def8a --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6.5 \344\273\243\347\220\206\346\250\241\345\274\217-\347\274\223\345\255\230\344\273\243\347\220\206\350\256\241\347\256\227\344\271\230\347\247\257\344\274\230\345\214\226.html" @@ -0,0 +1,46 @@ +在缓存代理计算乘积基础上,结合工厂模式 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6/6.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/6/6.html" deleted file mode 100644 index 96b9213f9..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/6/6.html" +++ /dev/null @@ -1,337 +0,0 @@ - - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.1 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\206\205\351\203\250\350\277\255\344\273\243\345\231\250.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.1 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\206\205\351\203\250\350\277\255\344\273\243\345\231\250.html" new file mode 100644 index 000000000..d9a2bf740 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.1 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\206\205\351\203\250\350\277\255\344\273\243\345\231\250.html" @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.2 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\244\226\351\203\250\350\277\255\344\273\243\345\231\250.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.2 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\244\226\351\203\250\350\277\255\344\273\243\345\231\250.html" new file mode 100644 index 000000000..b2cfe6f75 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/7.2 \350\277\255\344\273\243\345\231\250\346\250\241\345\274\217-\345\244\226\351\203\250\350\277\255\344\273\243\345\231\250.html" @@ -0,0 +1,78 @@ +外部迭代器必须显式地请求迭代下一个元素 +外部迭代器增加了一些调用的复杂度,但相对也增强了迭代器的灵活性,我们可以手工控制迭代的过程或者顺序 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/7/7.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/7/7.html" deleted file mode 100644 index 54192e3df..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/7/7.html" +++ /dev/null @@ -1,112 +0,0 @@ - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.1 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.1 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205.html" new file mode 100644 index 000000000..5b8a3c8c9 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.1 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205.html" @@ -0,0 +1,59 @@ +观察者模式,封装发布订阅模式 - 全局对象方案 + diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.2 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205\344\274\230\345\214\226.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.2 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205\344\274\230\345\214\226.html" new file mode 100644 index 000000000..12f1f0ba8 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/8.2 \345\217\221\345\270\203\350\256\242\351\230\205\346\250\241\345\274\217-\345\260\201\350\243\205\344\274\230\345\214\226.html" @@ -0,0 +1,126 @@ +全局的发布—订阅对象里只有一个 clinetList 来存放消息名和回调函数 +难免会出现事件名冲突的情况,所以还可以给 Event 对象提供创建命名空间的功能 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/8/8.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/8/8.html" deleted file mode 100644 index 34f1312bb..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/8/8.html" +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.1 \345\221\275\344\273\244\346\250\241\345\274\217.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.1 \345\221\275\344\273\244\346\250\241\345\274\217.html" new file mode 100644 index 000000000..279907519 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.1 \345\221\275\344\273\244\346\250\241\345\274\217.html" @@ -0,0 +1,58 @@ +命令模式 +解耦请求发送者和请求接收者之间的耦合关系 + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.2 \345\221\275\344\273\244\346\250\241\345\274\217-\346\222\244\351\224\200\345\221\275\344\273\244.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.2 \345\221\275\344\273\244\346\250\241\345\274\217-\346\222\244\351\224\200\345\221\275\344\273\244.html" new file mode 100644 index 000000000..2c6cbcf49 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.2 \345\221\275\344\273\244\346\250\241\345\274\217-\346\222\244\351\224\200\345\221\275\344\273\244.html" @@ -0,0 +1,42 @@ +
+输入小球移动后的位置: + + + + + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.4 \345\221\275\344\273\244\346\250\241\345\274\217-\345\221\275\344\273\244\351\230\237\345\210\227&\345\256\217\345\221\275\344\273\244.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.4 \345\221\275\344\273\244\346\250\241\345\274\217-\345\221\275\344\273\244\351\230\237\345\210\227&\345\256\217\345\221\275\344\273\244.html" new file mode 100644 index 000000000..84613dd51 --- /dev/null +++ "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9.4 \345\221\275\344\273\244\346\250\241\345\274\217-\345\221\275\344\273\244\351\230\237\345\210\227&\345\256\217\345\221\275\344\273\244.html" @@ -0,0 +1,45 @@ +宏命令是一组命令的集合,通过执行宏命令的方式,可以一次执行一批命令 + \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/9/9.html" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/9/9.html" deleted file mode 100644 index 4d05c7501..000000000 --- "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/9/9.html" +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 输入小球移动后的位置: - -
- 输入小球移动后的位置: - - - - - - - - \ No newline at end of file diff --git "a/06-\350\256\276\350\256\241\346\250\241\345\274\217/JavaScript\350\256\276\350\256\241\346\250\241\345\274\217\344\270\216\345\274\200\345\217\221\345\256\236\350\267\265.pdf" "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/JavaScript\350\256\276\350\256\241\346\250\241\345\274\217\344\270\216\345\274\200\345\217\221\345\256\236\350\267\265.pdf" new file mode 100644 index 000000000..3892dd3ec Binary files /dev/null and "b/06-\350\256\276\350\256\241\346\250\241\345\274\217/JavaScript\350\256\276\350\256\241\346\250\241\345\274\217\344\270\216\345\274\200\345\217\221\345\256\236\350\267\265.pdf" differ diff --git a/09-PWA/01-start/PWA.md b/09-PWA/01-start/PWA.md deleted file mode 100644 index 64d80a730..000000000 --- a/09-PWA/01-start/PWA.md +++ /dev/null @@ -1,26 +0,0 @@ -# pwa - -progressive web apps - -## 1. 特点 - -快速:缓存 - -可靠:断网访问 - -粘性:图标 - -## 2. 技术 - -web app manifest - -service worker - -push api & notification api - -app shell & app skeleton - -## 3. 基础 - -https - diff --git a/09-PWA/02-manifest/README.md b/09-PWA/02-manifest/README.md deleted file mode 100755 index bbef61263..000000000 --- a/09-PWA/02-manifest/README.md +++ /dev/null @@ -1,8 +0,0 @@ -介绍 Web App Manifest 相关的基础知识,学习如何使网站可以添加至手机桌面。 - -## Usage - -1. ` npm install ` -2. ` npm run start` -3. 访问 http://localhost:8080 -4. 学习和修改 `manifest.json` 中的相关设置 \ No newline at end of file diff --git a/09-PWA/02-manifest/index.html b/09-PWA/02-manifest/index.html deleted file mode 100755 index f8203ea37..000000000 --- a/09-PWA/02-manifest/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - Home - PWA Lesson - - - - - - - - - - - - - - - -
-
-
-
PWA Lesson
-
-
- -

manifest

-
-【 name 】
-【 short_name 】
-【 display 】
-    fullscreen | standalone | minimal-ui | browser
-【 start_url 】 启动页
-    "/"
-        
-

添加图标

-
-1. 主动添加
-2. 横幅提示添加(safari不支持)
-    部署manifest.json
-    注册service worker
-    支持https访问
-    用户在统一浏览器中至少访问两次,两次至少间隔5分钟
-        
-
- - - \ No newline at end of file diff --git a/09-PWA/03-service-worker/README.md b/09-PWA/03-service-worker/README.md deleted file mode 100755 index e1a0d1649..000000000 --- a/09-PWA/03-service-worker/README.md +++ /dev/null @@ -1,7 +0,0 @@ -介绍如何在现有项目中使用 service worker 构建一个具有离线访问能力的 webapp。 - -## Usage - -1. ` npm install ` -2. ` npm run start` -3. 访问 http://localhost:8080 diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/css/main.css" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/css/main.css" deleted file mode 100755 index f732a4b6a..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/css/main.css" +++ /dev/null @@ -1,87 +0,0 @@ -body { - background: #fff; - padding-bottom: 100px; -} - -.logo { - width: 60px; - float: left; - margin-left: 3.5rem; - margin-top: 0.12rem; - position: absolute; -} - -.logo img { - width: 100%; -} - -h1 { - font-size: 16px; - text-align: center; -} - -ul { - margin: 0 auto; - overflow: hidden; -} - -li { - list-style: none; - border-radius: 5px; - background: #fff; - padding: 1rem; - margin: 1rem; - max-width: 10rem; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); - float: left; -} - -li img { - width: 100%; - height: 15rem; -} - -.ui-toast { - display: block; - position: fixed; - text-align: center; - bottom: 0; - transform: translateY(100%); - left: 50%; - width: 240px; - margin-left: -150px; - min-height: 1rem; - background: #fff6ee; - color: #faa05a; - border-radius: 2px; - padding: 15px 30px; - transition: cubic-bezier(0.075, 0.82, 0.165, 1) .2s; -} - -.danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} - -.warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} - -.info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.ui-toast.show { - transform: translateY(-20%); -} \ No newline at end of file diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/index.html" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/index.html" deleted file mode 100755 index ef6c9c970..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/index.html" +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Service Worker - - - - - -

电影热播榜单

-
    - -
- - - - - - diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/main.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/main.js" deleted file mode 100755 index 3debc39aa..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/main.js" +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file main.js - */ - -define(function (require) { - 'use strict'; - let axios = require('axios'); - let render = require('./render'); - - // 异步请求数据,并在前端渲染 - axios.get('/api/movies').then(function (response) { - let $movieList = document.querySelector('.movie-list'); - - if (response.status !== 200) { - $movieList.innerHTML = '网络错误'; - return; - } - $movieList.innerHTML = render(response.data); - }); -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/ui.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/ui.js" deleted file mode 100755 index c1ba70b15..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/ui.js" +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file ui.js - */ - -define(function (require) { - 'use strict'; - - function createDom(text, type) { - let $dom = document.querySelector('.ui-toast'); - if ($dom) { - $dom.remove(); - } - - $dom = document.createElement('div'); - $dom.classList.add('ui-toast'); - $dom.classList.add(type || 'default'); - $dom.innerHTML = text; - return $dom; - } - - return { - showToast(text, type) { - let $dom = createDom(text, type); - document.body.appendChild($dom); - setTimeout(() => { - $dom.classList.add('show'); - }, 1); - - $dom.addEventListener('click', function (event) { - $dom.classList.remove('show'); - }); - } - }; -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/package.json" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/package.json" deleted file mode 100755 index b253deff0..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/package.json" +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scripts": { - "start": "node server/index.js" - }, - "dependencies": { - "express": "^4.16.3" - } -} diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/img/logo.png" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/img/logo.png" deleted file mode 100755 index db1dd7b3d..000000000 Binary files "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/img/logo.png" and /dev/null differ diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/main.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/main.js" deleted file mode 100755 index 30fdd8e7a..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/main.js" +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file main.js - */ - -define(function (require) { - 'use strict'; - let axios = require('axios'); - let render = require('./render'); - let ui = require('./ui'); - // 异步请求数据,并在前端渲染 - axios.get('/api/movies').then(function (response) { - let $movieList = document.querySelector('.movie-list'); - if (response.status !== 200) { - $movieList.innerHTML = '网络错误'; - return; - } - $movieList.innerHTML = render(response.data); - }); - /** - * 注册 service worker 流程 - */ - // 判断是否能使用 service worker - if ('serviceWorker' in navigator) { - // 等待页面加载完成后再执行 service worker 注册 - window.addEventListener('load', function (event) { - // 注册 service worker - navigator.serviceWorker.register('/sw.js', { - // 作用域,只能比当前service worker的域小,例如:/a/b/sw.js,scope可以为/a/b/c/,若为/a会报错 - scope: '/' - }) - .then(function (registeration) { - // 注册成功回调 - console.log('Service worker register success with scope ' + registeration.scope); - }); - }); - - // 页面更新 - navigator.serviceWorker.oncontrollerchange = function (event) { - ui.showToast('页面已更新', 'info'); - }; - - // 如果用户处于断网状态进入页面,用户可能无法感知内容是过期,需要提示用户断网了,并在重新连接后告诉用户 - if (!window.navigator.onLine) { - ui.showToast('网络断开,内容可能已过期', 'info'); - - window.addEventListener('online', function () { - ui.showToast('已连接网络', 'info'); - }); - - } - } -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/render.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/render.js" deleted file mode 100755 index ed1c7fe25..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/render.js" +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file render.js - */ - -define(function (require) { - 'use strict'; - - return function (data) { - let html = data.subjects.map(function (subject) { - return ` -
  • - -

    ${subject.title}

    -
  • - `; - }).join(''); - return html; - }; -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/sw.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/sw.js" deleted file mode 100755 index 9f8eef2a9..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/sw.js" +++ /dev/null @@ -1,121 +0,0 @@ -/** - * @file sw.js - */ - -let VERSION = 0; -let CACHE_NAME = 'cache_v' + VERSION; -let CACHE_URLS = [ - '/', - '/api/movies', - '/css/main.css', - '/js/main.js', - '/js/ui.js', - '/js/render.js', - '/img/logo.png' -]; - -/** - * 缓存到 cacheStorage 里 - * - * @param {Request} req 请求对象 - * @param {Response} res 响应对象 - */ -function saveToCache(req, res) { - // 操作 CacheStorage 缓存,使用之前需要先通过 caches.open() 打开对应缓存空间 - return caches - .open(CACHE_NAME) - .then(cache => cache.put(req, res)); -} - -/** - * 预缓存 - * - * @return {Promise} 缓存成功的promise - */ -function precache() { - return caches.open(CACHE_NAME).then(function (cache) { - // 通过 cache 缓存对象的 addAll 方法添加 precache 缓存 - return cache.addAll(CACHE_URLS); - }); -} - -/** - * 清除过期的 cache - * - * @return {Promise} promise - */ -function clearStaleCache() { - return caches.keys().then(keys => { - keys.forEach(key => { - if (CACHE_NAME !== key) { - caches.delete(key); - } - }); - }); -} - -/** - * 请求并缓存内容 - * - * @param {Request} req request - * @return {Promise} - */ -function fetchAndCache(req) { - return fetch(req) - .then(function (res) { - // http请求已返回 - // 请求失败则直接返回失败结果 - if (!res || res.status !== 200) { - return res - } - // 请求成功,缓存克隆的请求 res.clone - saveToCache(req, res.clone()) - return res - }); -} - -// 监听 service worker 的 install 事件 -// 下载新的缓存 -self.addEventListener('install', function (event) { - // 如果监听到 service worker 已经安装会调用 event.waitUntil 回调函数 - event.waitUntil( - // 更新后进入waiting状态,此时新旧sw并存,需要skipWaiting才能执行新sw - precache().then(self.skipWaiting) - ); -}); - -// 删除旧的缓存 -self.addEventListener('activate', function (event) { - event.waitUntil( - Promise.all([ - // Clients 接口的 claim() 方法允许一个激活的 service worker 将自己设置为其 scope 内所有clients 的controller - // 这会在由此service worker 控制的任何 clients 中触发 navigator.serviceWorker 上的 "controllerchange" 事件 - //(触发页面更新回调) - self.clients.claim(), - clearStaleCache() - ]) - ); -}); - -self.addEventListener('fetch', function (event) { - // 只对同源的资源走 sw,cdn 上的资源利用 http 缓存策略 - if (new URL(event.request.url).origin !== self.origin) { - return; - } - if (event.request.url.includes('/api/movies')) { - event.respondWith( - // 获取数据并更新缓存,获取失败则直接读缓存 - fetchAndCache(event.request) - .catch(function () { - return caches.match(event.request); - }) - ); - return; - } - event.respondWith( - // 获取数据失败则取缓存 - fetch(event.request).catch(function () { - return caches.match(event.request); - }) - ); -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/index.js" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/index.js" deleted file mode 100755 index bf7a3a563..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/index.js" +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file index.js - */ - -let path = require('path'); -let express = require('express'); -let fs = require('fs'); - -let app = express(); -let port = 8080; - -let movies = JSON.parse( - fs.readFileSync( - path.join(__dirname, '/movies.json'), - { - encoding: 'utf-8' - } - ) -); - -/** - * Shuffles array in place. ES6 version - * - * @param {Array} a items An array containing the items. - * @return {Array} shuffled array - */ -function shuffle(a) { - for (let i = a.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); - [a[i], a[j]] = [a[j], a[i]]; - } - return a; -} - -// 静态资源响应 -app.use(express.static('public')); - -// 首页 html 响应 -app.get('/', function (req, res) { - res.sendFile('index.html', {root: 'public'}); -}); - -// 电影列表数据接口 -app.get('/api/movies', function (req, res) { - shuffle(movies.subjects); - res.json(movies); -}); - -// 启动服务器 -app.listen(port, function () { - console.log(`Listening on port ${port}`); -}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/movies.json" "b/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/movies.json" deleted file mode 100755 index 4d918f2b2..000000000 --- "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/server/movies.json" +++ /dev/null @@ -1,1339 +0,0 @@ -{ - "count": 20, - "start": 0, - "total": 29, - "subjects": [ - { - "rating": { - "max": 10, - "average": 8.9, - "stars": "45", - "min": 0 - }, - "genres": [ - "\u52a8\u4f5c", - "\u79d1\u5e7b", - "\u5192\u9669" - ], - "title": "\u5934\u53f7\u73a9\u5bb6", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1328390\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1464678182.3.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1464678182.3.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1464678182.3.webp" - }, - "name": "\u6cf0\u4f0a\u00b7\u8c22\u91cc\u4e39", - "id": "1328390" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1327806\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p8u95Rxw3ebIcel_avatar_uploaded1365073023.28.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p8u95Rxw3ebIcel_avatar_uploaded1365073023.28.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p8u95Rxw3ebIcel_avatar_uploaded1365073023.28.webp" - }, - "name": " \u5965\u5229\u7ef4\u4e9a\u00b7\u5e93\u514b", - "id": "1327806" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1000248\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p5681.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p5681.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p5681.webp" - }, - "name": "\u672c\u00b7\u95e8\u5fb7\u5c14\u68ee", - "id": "1000248" - } - ], - "collect_count": 338142, - "original_title": "Ready Player One", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1054440\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p34602.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p34602.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p34602.webp" - }, - "name": "\u53f2\u8482\u6587\u00b7\u65af\u76ae\u5c14\u4f2f\u683c", - "id": "1054440" - } - ], - "year": "2018", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516578307.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516578307.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516578307.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/4920389\/", - "id": "4920389" - }, - { - "rating": { - "max": 10, - "average": 8.1, - "stars": "40", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u559c\u5267" - ], - "title": "\u8d77\u8dd1\u7ebf", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1108861\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48861.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48861.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48861.webp" - }, - "name": "\u4f0a\u5c14\u51e1\u00b7\u53ef\u6c57", - "id": "1108861" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1263714\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477506649.77.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477506649.77.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477506649.77.webp" - }, - "name": "\u8428\u5df4\u00b7\u5361\u739b\u5c14", - "id": "1263714" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1049993\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1521775712.45.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1521775712.45.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1521775712.45.webp" - }, - "name": "\u5185\u54c8\u00b7\u8fea\u80e1\u76ae\u963f", - "id": "1049993" - } - ], - "collect_count": 41377, - "original_title": "Hindi Medium", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1383681\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510019957.97.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510019957.97.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1510019957.97.webp" - }, - "name": "\u8428\u57fa\u7279\u00b7\u4e54\u675c\u91cc", - "id": "1383681" - } - ], - "year": "2017", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517518428.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517518428.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517518428.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26942631\/", - "id": "26942631" - }, - { - "rating": { - "max": 10, - "average": 8.3, - "stars": "45", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u72af\u7f6a", - "\u60ac\u7591" - ], - "title": "\u66b4\u88c2\u65e0\u58f0", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1316200\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449349437.71.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449349437.71.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449349437.71.webp" - }, - "name": "\u5b8b\u6d0b", - "id": "1316200" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274290\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p27203.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p27203.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p27203.webp" - }, - "name": "\u59dc\u6b66", - "id": "1274290" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274820\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6464.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6464.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6464.webp" - }, - "name": "\u8881\u6587\u5eb7", - "id": "1274820" - } - ], - "collect_count": 54770, - "original_title": "\u66b4\u88c2\u65e0\u58f0", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1341214\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1513848601.01.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1513848601.01.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1513848601.01.webp" - }, - "name": "\u5ffb\u94b0\u5764", - "id": "1341214" - } - ], - "year": "2017", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517333671.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517333671.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517333671.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26647117\/", - "id": "26647117" - }, - { - "rating": { - "max": 10, - "average": 5.8, - "stars": "30", - "min": 0 - }, - "genres": [ - "\u52a8\u4f5c", - "\u79d1\u5e7b", - "\u5192\u9669" - ], - "title": "\u73af\u592a\u5e73\u6d0b\uff1a\u96f7\u9706\u518d\u8d77", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1339915\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1447164061.84.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1447164061.84.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1447164061.84.webp" - }, - "name": "\u7ea6\u7ff0\u00b7\u535a\u8036\u52a0", - "id": "1339915" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1000188\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1418720473.76.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1418720473.76.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1418720473.76.webp" - }, - "name": "\u65af\u79d1\u7279\u00b7\u4f0a\u65af\u7279\u4f0d\u5fb7", - "id": "1000188" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1362560\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1479205212.79.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1479205212.79.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1479205212.79.webp" - }, - "name": "\u5361\u8389\u00b7\u53f2\u6d3e\u59ae", - "id": "1362560" - } - ], - "collect_count": 85518, - "original_title": "Pacific Rim: Uprising", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1340823\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pqiCuEHOtvNIcel_avatar_uploaded1403339434.41.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pqiCuEHOtvNIcel_avatar_uploaded1403339434.41.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pqiCuEHOtvNIcel_avatar_uploaded1403339434.41.webp" - }, - "name": "\u65af\u8482\u6587\u00b7S\u00b7\u8fea\u5948\u7279", - "id": "1340823" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512933684.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512933684.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512933684.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/20435622\/", - "id": "20435622" - }, - { - "rating": { - "max": 10, - "average": 8.5, - "stars": "45", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u52a8\u4f5c", - "\u72af\u7f6a" - ], - "title": "\u7ea2\u6d77\u884c\u52a8", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274761\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489386626.47.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489386626.47.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1489386626.47.webp" - }, - "name": "\u5f20\u8bd1", - "id": "1274761" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1354442\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458138265.51.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458138265.51.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458138265.51.webp" - }, - "name": "\u9ec4\u666f\u745c", - "id": "1354442" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1272245\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p49399.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p49399.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p49399.webp" - }, - "name": "\u6d77\u6e05", - "id": "1272245" - } - ], - "collect_count": 363632, - "original_title": "\u7ea2\u6d77\u884c\u52a8", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1275075\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1372934445.18.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1372934445.18.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1372934445.18.webp" - }, - "name": "\u6797\u8d85\u8d24", - "id": "1275075" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514119443.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514119443.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514119443.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26861685\/", - "id": "26861685" - }, - { - "rating": { - "max": 10, - "average": 4.4, - "stars": "25", - "min": 0 - }, - "genres": [ - "\u52a8\u753b", - "\u5192\u9669", - "\u5bb6\u5ead" - ], - "title": "\u51b0\u96ea\u5973\u738b3\uff1a\u706b\u4e0e\u51b0", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1059406\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20303.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20303.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20303.webp" - }, - "name": "\u8fea\u00b7\u5e03\u62c9\u96f7\u00b7\u8d1d\u514b\u5c14", - "id": "1059406" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1390987\/", - "avatars": { - "small": "https://img1.doubanio.com\/f\/movie\/ca527386eb8c4e325611e22dfcb04cc116d6b423\/pics\/movie\/celebrity-default-small.png", - "large": "https://img3.doubanio.com\/f\/movie\/63acc16ca6309ef191f0378faf793d1096a3e606\/pics\/movie\/celebrity-default-large.png", - "medium": "https://img1.doubanio.com\/f\/movie\/8dd0c794499fe925ae2ae89ee30cd225750457b4\/pics\/movie\/celebrity-default-medium.png" - }, - "name": "\u6d1b\u745e\u00b7\u52a0\u7eb3", - "id": "1390987" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1390988\/", - "avatars": { - "small": "https://img1.doubanio.com\/f\/movie\/ca527386eb8c4e325611e22dfcb04cc116d6b423\/pics\/movie\/celebrity-default-small.png", - "large": "https://img3.doubanio.com\/f\/movie\/63acc16ca6309ef191f0378faf793d1096a3e606\/pics\/movie\/celebrity-default-large.png", - "medium": "https://img1.doubanio.com\/f\/movie\/8dd0c794499fe925ae2ae89ee30cd225750457b4\/pics\/movie\/celebrity-default-medium.png" - }, - "name": "Devin Bailey Griffin", - "id": "1390988" - } - ], - "collect_count": 622, - "original_title": "\u0421\u043d\u0435\u0436\u043d\u0430\u044f \u043a\u043e\u0440\u043e\u043b\u0435\u0432\u0430 3: \u041e\u0433\u043e\u043d\u044c \u0438 \u043b\u0435\u0434", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1362482\/", - "avatars": { - "small": "https://img1.doubanio.com\/f\/movie\/ca527386eb8c4e325611e22dfcb04cc116d6b423\/pics\/movie\/celebrity-default-small.png", - "large": "https://img3.doubanio.com\/f\/movie\/63acc16ca6309ef191f0378faf793d1096a3e606\/pics\/movie\/celebrity-default-large.png", - "medium": "https://img1.doubanio.com\/f\/movie\/8dd0c794499fe925ae2ae89ee30cd225750457b4\/pics\/movie\/celebrity-default-medium.png" - }, - "name": "\u963f\u5217\u514b\u8c22\u00b7\u7279\u65af\u8482\u65af\u6797", - "id": "1362482" - } - ], - "year": "2016", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517033932.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517033932.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517033932.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26588783\/", - "id": "26588783" - }, - { - "rating": { - "max": 10, - "average": 6.8, - "stars": "35", - "min": 0 - }, - "genres": [ - "\u52a8\u4f5c", - "\u72af\u7f6a", - "\u60ca\u609a" - ], - "title": "\u901a\u52e4\u8425\u6551", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1031220\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p44906.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p44906.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p44906.webp" - }, - "name": "\u8fde\u59c6\u00b7\u5c3c\u68ee", - "id": "1031220" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1053584\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p11871.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p11871.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p11871.webp" - }, - "name": "\u7ef4\u62c9\u00b7\u6cd5\u7c73\u52a0", - "id": "1053584" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1006919\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1386481612.26.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1386481612.26.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1386481612.26.webp" - }, - "name": "\u5e15\u7279\u91cc\u514b\u00b7\u5a01\u5c14\u68ee", - "id": "1006919" - } - ], - "collect_count": 19255, - "original_title": "The Commuter", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1214705\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20263.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20263.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p20263.webp" - }, - "name": "\u4f50\u7c73\u00b7\u5e0c\u5c14\u62c9", - "id": "1214705" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517770792.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517770792.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517770792.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/7056414\/", - "id": "7056414" - }, - { - "rating": { - "max": 10, - "average": 0, - "stars": "00", - "min": 0 - }, - "genres": [ - "\u7eaa\u5f55\u7247" - ], - "title": "\u5389\u5bb3\u4e86\uff0c\u6211\u7684\u56fd", - "casts": [], - "collect_count": 124, - "original_title": "\u5389\u5bb3\u4e86\uff0c\u6211\u7684\u56fd", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1322050\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p52221.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p52221.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p52221.webp" - }, - "name": "\u536b\u94c1", - "id": "1322050" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514293556.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514293556.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2514293556.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/30152451\/", - "id": "30152451" - }, - { - "rating": { - "max": 10, - "average": 4.5, - "stars": "25", - "min": 0 - }, - "genres": [ - "\u559c\u5267", - "\u7231\u60c5" - ], - "title": "\u5947\u8469\u6735\u6735", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1313867\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1473417780.64.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1473417780.64.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1473417780.64.webp" - }, - "name": "\u5f20\u82e5\u6600", - "id": "1313867" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1275243\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477464497.27.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477464497.27.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1477464497.27.webp" - }, - "name": "\u9a6c\u601d\u7eaf", - "id": "1275243" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1324619\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1441517265.3.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1441517265.3.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1441517265.3.webp" - }, - "name": "\u674e\u73b0", - "id": "1324619" - } - ], - "collect_count": 1693, - "original_title": "\u5947\u8469\u6735\u6735", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1320856\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1485223315.79.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1485223315.79.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1485223315.79.webp" - }, - "name": "\u674e\u6b23", - "id": "1320856" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1327371\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1522382442.45.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1522382442.45.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1522382442.45.webp" - }, - "name": "\u674e\u6d0b", - "id": "1327371" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517679011.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517679011.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517679011.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26718803\/", - "id": "26718803" - }, - { - "rating": { - "max": 10, - "average": 6.3, - "stars": "35", - "min": 0 - }, - "genres": [ - "\u52a8\u753b", - "\u5192\u9669", - "\u5bb6\u5ead" - ], - "title": "\u732b\u4e0e\u6843\u82b1\u6e90", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1389747\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590388.09.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590388.09.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590388.09.webp" - }, - "name": "\u674e\u5b87\u5cf0", - "id": "1389747" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1379781\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590401.26.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590401.26.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1520590401.26.webp" - }, - "name": "\u6768\u781a\u94ce", - "id": "1379781" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1038045\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3629.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3629.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3629.webp" - }, - "name": "\u5468\u534e\u5065", - "id": "1038045" - } - ], - "collect_count": 1017, - "original_title": "\u732b\u4e0e\u6843\u82b1\u6e90", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1348285\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1480411564.71.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1480411564.71.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1480411564.71.webp" - }, - "name": "\u738b\u5fae", - "id": "1348285" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517516405.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517516405.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517516405.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/27114911\/", - "id": "27114911" - }, - { - "rating": { - "max": 10, - "average": 6.4, - "stars": "35", - "min": 0 - }, - "genres": [ - "\u52a8\u4f5c", - "\u5192\u9669" - ], - "title": "\u53e4\u5893\u4e3d\u5f71\uff1a\u6e90\u8d77\u4e4b\u6218", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1233154\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1427204716.36.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1427204716.36.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1427204716.36.webp" - }, - "name": "\u827e\u4e3d\u897f\u4e9a\u00b7\u7ef4\u574e\u5fb7", - "id": "1233154" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1027173\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4228.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4228.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4228.webp" - }, - "name": "\u591a\u7c73\u5c3c\u514b\u00b7\u5a01\u65af\u7279", - "id": "1027173" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1098551\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p50351.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p50351.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p50351.webp" - }, - "name": "\u6c83\u5c14\u987f\u00b7\u6208\u91d1\u65af", - "id": "1098551" - } - ], - "collect_count": 53870, - "original_title": "Tomb Raider", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1051062\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1492880241.68.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1492880241.68.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1492880241.68.webp" - }, - "name": "\u7f57\u963f\u5c14\u00b7\u4e4c\u7d22\u683c", - "id": "1051062" - } - ], - "year": "2018", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512717509.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512717509.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2512717509.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/3445906\/", - "id": "3445906" - }, - { - "rating": { - "max": 10, - "average": 7.2, - "stars": "40", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u7231\u60c5", - "\u8fd0\u52a8" - ], - "title": "\u82b1\u6ed1\u5973\u738b", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1384010\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077039.05.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077039.05.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077039.05.webp" - }, - "name": "\u963f\u683c\u62c9\u5a05\u00b7\u5854\u62c9\u7d22\u5a03", - "id": "1384010" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1370381\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077095.41.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077095.41.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518077095.41.webp" - }, - "name": "\u4e9a\u5386\u5c71\u5927\u00b7\u4f69\u7279\u7f57\u592b", - "id": "1370381" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1332438\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pXZEBgcm0vI4cel_avatar_uploaded1375591876.94.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pXZEBgcm0vI4cel_avatar_uploaded1375591876.94.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pXZEBgcm0vI4cel_avatar_uploaded1375591876.94.webp" - }, - "name": "\u7c73\u6d1b\u65af\u00b7\u6bd4\u67ef\u7ef4\u5947", - "id": "1332438" - } - ], - "collect_count": 7016, - "original_title": "\u041b\u0451\u0434", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1384009\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518076789.91.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518076789.91.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1518076789.91.webp" - }, - "name": "\u5965\u5217\u683c\u00b7\u7279\u7f57\u8d39\u59c6", - "id": "1384009" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517485270.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517485270.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2517485270.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/27196380\/", - "id": "27196380" - }, - { - "rating": { - "max": 10, - "average": 4.8, - "stars": "25", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u559c\u5267", - "\u7231\u60c5" - ], - "title": "\u9047\u89c1\u4f60\u771f\u597d", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1332932\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pmk5M2yEclAMcel_avatar_uploaded1376453132.87.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pmk5M2yEclAMcel_avatar_uploaded1376453132.87.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pmk5M2yEclAMcel_avatar_uploaded1376453132.87.webp" - }, - "name": "\u767d\u5ba2", - "id": "1332932" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1318954\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45514.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45514.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45514.webp" - }, - "name": "\u84dd\u76c8\u83b9", - "id": "1318954" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1364842\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1481737131.45.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1481737131.45.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1481737131.45.webp" - }, - "name": "\u5f20\u6d77\u5b87", - "id": "1364842" - } - ], - "collect_count": 6265, - "original_title": "\u9047\u89c1\u4f60\u771f\u597d", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1037747\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1423.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1423.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1423.webp" - }, - "name": "\u987e\u957f\u536b", - "id": "1037747" - } - ], - "year": "2018", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516082047.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516082047.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516082047.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26967920\/", - "id": "26967920" - }, - { - "rating": { - "max": 10, - "average": 7.1, - "stars": "35", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u72af\u7f6a", - "\u60ac\u7591" - ], - "title": "\u7b2c\u4e09\u5ea6\u5acc\u7591\u4eba", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1006103\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1209.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1209.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1209.webp" - }, - "name": "\u798f\u5c71\u96c5\u6cbb", - "id": "1006103" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1165478\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1458.webp" - }, - "name": "\u5f79\u6240\u5e7f\u53f8", - "id": "1165478" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1328056\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1475053232.53.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1475053232.53.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1475053232.53.webp" - }, - "name": "\u5e7f\u6fd1\u94c3", - "id": "1328056" - } - ], - "collect_count": 14085, - "original_title": "\u4e09\u5ea6\u76ee\u306e\u6bba\u4eba", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274351\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1363134033.35.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1363134033.35.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1363134033.35.webp" - }, - "name": "\u662f\u679d\u88d5\u548c", - "id": "1274351" - } - ], - "year": "2017", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516825103.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516825103.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516825103.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26952153\/", - "id": "26952153" - }, - { - "rating": { - "max": 10, - "average": 7.5, - "stars": "40", - "min": 0 - }, - "genres": [ - "\u559c\u5267", - "\u52a8\u753b", - "\u5192\u9669" - ], - "title": "\u6bd4\u5f97\u5154", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1017966\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449532609.88.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449532609.88.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1449532609.88.webp" - }, - "name": "\u8a79\u59c6\u65af\u00b7\u67ef\u767b", - "id": "1017966" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1313116\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1361026097.22.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1361026097.22.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1361026097.22.webp" - }, - "name": "\u591a\u59c6\u7eb3\u5c14\u00b7\u683c\u91cc\u68ee", - "id": "1313116" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1022562\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3186.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3186.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p3186.webp" - }, - "name": "\u841d\u4e1d\u00b7\u62dc\u6069", - "id": "1022562" - } - ], - "collect_count": 25175, - "original_title": "Peter Rabbit", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274281\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p12038.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p12038.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p12038.webp" - }, - "name": "\u5a01\u5c14\u00b7\u53e4\u52d2", - "id": "1274281" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515434674.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515434674.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515434674.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26649604\/", - "id": "26649604" - }, - { - "rating": { - "max": 10, - "average": 7.3, - "stars": "40", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u7231\u60c5", - "\u5947\u5e7b" - ], - "title": "\u6c34\u5f62\u7269\u8bed", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1044915\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48056.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48056.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p48056.webp" - }, - "name": "\u838e\u8389\u00b7\u970d\u91d1\u65af", - "id": "1044915" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1019031\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p18795.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p18795.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p18795.webp" - }, - "name": "\u9053\u683c\u00b7\u743c\u65af", - "id": "1019031" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1144415\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p57057.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p57057.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p57057.webp" - }, - "name": "\u8fc8\u514b\u5c14\u00b7\u73ca\u519c", - "id": "1144415" - } - ], - "collect_count": 197030, - "original_title": "The Shape of Water", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1027182\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4294.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4294.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p4294.webp" - }, - "name": "\u5409\u5c14\u83ab\u00b7\u5fb7\u5c14\u00b7\u6258\u7f57", - "id": "1027182" - } - ], - "year": "2017", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515650989.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515650989.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515650989.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26752852\/", - "id": "26752852" - }, - { - "rating": { - "max": 10, - "average": 4.8, - "stars": "25", - "min": 0 - }, - "genres": [ - "\u559c\u5267", - "\u52a8\u4f5c", - "\u60ac\u7591" - ], - "title": "\u6211\u8bf4\u7684\u90fd\u662f\u771f\u7684", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274081\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6398.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6398.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p6398.webp" - }, - "name": "\u5c0f\u6c88\u9633", - "id": "1274081" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1274316\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p31663.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p31663.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p31663.webp" - }, - "name": "\u9648\u610f\u6db5", - "id": "1274316" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1314321\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45924.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45924.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p45924.webp" - }, - "name": "\u5434\u6a3e", - "id": "1314321" - } - ], - "collect_count": 886, - "original_title": "\u6211\u8bf4\u7684\u90fd\u662f\u771f\u7684", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1315726\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1417885062.06.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1417885062.06.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1417885062.06.webp" - }, - "name": "\u5218\u4eea\u4f1f", - "id": "1315726" - } - ], - "year": "2018", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515774685.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515774685.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2515774685.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26806316\/", - "id": "26806316" - }, - { - "rating": { - "max": 10, - "average": 8.7, - "stars": "45", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u72af\u7f6a" - ], - "title": "\u4e09\u5757\u5e7f\u544a\u724c", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1010548\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1436865941.42.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1436865941.42.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1436865941.42.webp" - }, - "name": "\u5f17\u5170\u897f\u65af\u00b7\u9ea6\u514b\u591a\u8499\u5fb7", - "id": "1010548" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1053560\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p501.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p501.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p501.webp" - }, - "name": "\u4f0d\u8fea\u00b7\u54c8\u91cc\u68ee", - "id": "1053560" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1047972\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1358812490.58.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1358812490.58.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1358812490.58.webp" - }, - "name": "\u5c71\u59c6\u00b7\u6d1b\u514b\u5a01\u5c14", - "id": "1047972" - } - ], - "collect_count": 257292, - "original_title": "Three Billboards Outside Ebbing, Missouri", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1000304\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1406649730.61.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1406649730.61.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1406649730.61.webp" - }, - "name": "\u9a6c\u4e01\u00b7\u9ea6\u514b\u5510\u7eb3", - "id": "1000304" - } - ], - "year": "2017", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2510081688.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2510081688.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2510081688.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26611804\/", - "id": "26611804" - }, - { - "rating": { - "max": 10, - "average": 6.6, - "stars": "35", - "min": 0 - }, - "genres": [ - "\u5267\u60c5" - ], - "title": "\u6e05\u6c34\u91cc\u7684\u5200\u5b50", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1371658\/", - "avatars": { - "small": "https://img1.doubanio.com\/f\/movie\/ca527386eb8c4e325611e22dfcb04cc116d6b423\/pics\/movie\/celebrity-default-small.png", - "large": "https://img3.doubanio.com\/f\/movie\/63acc16ca6309ef191f0378faf793d1096a3e606\/pics\/movie\/celebrity-default-large.png", - "medium": "https://img1.doubanio.com\/f\/movie\/8dd0c794499fe925ae2ae89ee30cd225750457b4\/pics\/movie\/celebrity-default-medium.png" - }, - "name": "\u6768\u751f\u4ed3", - "id": "1371658" - } - ], - "collect_count": 1769, - "original_title": "\u6e05\u6c34\u91cc\u7684\u5200\u5b50", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1371653\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1491549066.4.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1491549066.4.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1491549066.4.webp" - }, - "name": "\u738b\u5b66\u535a", - "id": "1371653" - } - ], - "year": "2016", - "images": { - "small": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516999755.webp", - "large": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516999755.webp", - "medium": "https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516999755.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26593732\/", - "id": "26593732" - }, - { - "rating": { - "max": 10, - "average": 7.3, - "stars": "40", - "min": 0 - }, - "genres": [ - "\u5267\u60c5", - "\u79d1\u5e7b", - "\u60ca\u609a" - ], - "title": "\u6e6e\u706d", - "casts": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1054454\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p2274.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p2274.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p2274.webp" - }, - "name": "\u5a1c\u5854\u8389\u00b7\u6ce2\u7279\u66fc", - "id": "1054454" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1004588\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1424.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1424.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1424.webp" - }, - "name": "\u8a79\u59ae\u5f17\u00b7\u6770\u68ee\u00b7\u674e", - "id": "1004588" - }, - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1328190\/", - "avatars": { - "small": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pfFyUvfteUGwcel_avatar_uploaded1366276814.07.webp", - "large": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pfFyUvfteUGwcel_avatar_uploaded1366276814.07.webp", - "medium": "https://img1.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/pfFyUvfteUGwcel_avatar_uploaded1366276814.07.webp" - }, - "name": "\u5409\u5a1c\u00b7\u7f57\u5fb7\u91cc\u683c\u5179", - "id": "1328190" - } - ], - "collect_count": 54923, - "original_title": "Annihilation", - "subtype": "movie", - "directors": [ - { - "alt": "https:\/\/movie.douban.com\/celebrity\/1284570\/", - "avatars": { - "small": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1433647152.45.webp", - "large": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1433647152.45.webp", - "medium": "https://img3.doubanio.com\/view\/celebrity\/s_ratio_celebrity\/public\/p1433647152.45.webp" - }, - "name": "\u4e9a\u5386\u514b\u65af\u00b7\u5609\u5170", - "id": "1284570" - } - ], - "year": "2018", - "images": { - "small": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516914607.webp", - "large": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516914607.webp", - "medium": "https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2516914607.webp" - }, - "alt": "https:\/\/movie.douban.com\/subject\/26384741\/", - "id": "26384741" - } - ], - "title": "\u6b63\u5728\u4e0a\u6620\u7684\u7535\u5f71-\u5317\u4eac" -} \ No newline at end of file diff --git a/09-PWA/study1/01-start/PWA.md b/09-PWA/study1/01-start/PWA.md new file mode 100644 index 000000000..ed7f106cb --- /dev/null +++ b/09-PWA/study1/01-start/PWA.md @@ -0,0 +1,22 @@ +# pwa +progressive web apps + +## 1. 特点 +快速:缓存 +可靠:断网访问 +粘性:图标 + +## 2. 技术 +web app manifest +service worker +push api & notification api +app shell & app skeleton + +## 3. 基础 +https + +## 4. 改造过程 +step1: 全站 HTTPS 化,HTTPS 是 PWA 的基础,没有 HTTPS 就没有 Service Worker +step2: Service Worker 提升基础性能,离线提供静态文件,提升用户首屏体验 +step3: App Manifest,可以和第二步同时进行 +step4: 离线消息推送等其他特性 \ No newline at end of file diff --git "a/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/README.md" "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/README.md" new file mode 100755 index 000000000..ccc800cf8 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/README.md" @@ -0,0 +1,38 @@ +介绍 Web App Manifest 相关的基础知识,学习如何使网站可以添加至手机桌面。 + +## Usage + +1. ` npm install ` +2. ` npm run start` +3. 访问 http://localhost:8080 +4. 学习和修改 `manifest.json` 中的相关设置 + +关注 manifest.json 和 index.html + +// manifest.json +{ + "dir": "ltr", + "lang": "en", + "name": "xxx", + "scope": "/", + "display": "standalone", + "start_url": "/", + "short_name": "xxx", + "theme_color": "transparent", + "description": "xxxxxx", + "orientation": "any", + "background_color": "transparent", + "related_applications": [], + "prefer_related_applications": false, + "icons": [{ + "src": "assets/img/logo/size-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "assets/img/logo/size-48.png", + "sizes": "48x48", + "type": "image/png" + }], + "gcm_sender_id": "...", + "applicationServerKey": "..." +} \ No newline at end of file diff --git "a/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/index.html" "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/index.html" new file mode 100755 index 000000000..92ca7a2d7 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/index.html" @@ -0,0 +1,87 @@ + + + + + + Home - PWA Lesson + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    PWA Lesson
    +
    +
    + +

    manifest

    +
    +【 name 】 应用名称,用于安装横幅、启动画面显示
    +【 short_name 】 应用短名称,用于主屏幕显示
    +【 display 】
    +    fullscreen	应用的显示界面将占满整个屏幕
    +    standalone	浏览器相关UI(如导航栏、工具栏等)将会被隐藏
    +    minimal-ui	显示形式与standalone类似,浏览器相关UI会最小化为一个按钮,不同浏览器在实现上略有不同
    +    browser	    浏览器模式,与普通网页在浏览器中打开的显示一致
    +【 start_url 】 启动页
    +    "/"
    +【 scope 】 作用域
    +        
    +

    添加图标

    +
    +1. 主动添加
    +2. 横幅提示添加(safari不支持)PWA站点满足下列条件时自动添加
    +    部署manifest.json (配置了short_name、name、icons[image/png]、start_url、display[standalone/fullscreen]属性)
    +    注册service worker
    +    支持https访问
    +    用户在同一浏览器中至少访问两次,两次至少间隔5分钟
    +        
    +
    + + + \ No newline at end of file diff --git a/09-PWA/02-manifest/manifest.json "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/manifest.json" similarity index 100% rename from 09-PWA/02-manifest/manifest.json rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/manifest.json" diff --git a/09-PWA/02-manifest/package.json "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/package.json" similarity index 100% rename from 09-PWA/02-manifest/package.json rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/package.json" diff --git a/09-PWA/02-manifest/src/index.js "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/src/index.js" similarity index 100% rename from 09-PWA/02-manifest/src/index.js rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/src/index.js" diff --git a/09-PWA/02-manifest/static/img/android-chrome-144x144.png "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-144x144.png" similarity index 100% rename from 09-PWA/02-manifest/static/img/android-chrome-144x144.png rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-144x144.png" diff --git a/09-PWA/02-manifest/static/img/android-chrome-192x192.png "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-192x192.png" similarity index 100% rename from 09-PWA/02-manifest/static/img/android-chrome-192x192.png rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-192x192.png" diff --git a/09-PWA/02-manifest/static/img/android-chrome-512x512.png "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-512x512.png" similarity index 100% rename from 09-PWA/02-manifest/static/img/android-chrome-512x512.png rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/android-chrome-512x512.png" diff --git a/09-PWA/02-manifest/static/img/apple-touch-icon-152x152.png "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/apple-touch-icon-152x152.png" similarity index 100% rename from 09-PWA/02-manifest/static/img/apple-touch-icon-152x152.png rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/img/apple-touch-icon-152x152.png" diff --git a/09-PWA/02-manifest/static/styles/main.css "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/styles/main.css" similarity index 100% rename from 09-PWA/02-manifest/static/styles/main.css rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/static/styles/main.css" diff --git a/09-PWA/02-manifest/sw.js "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/sw.js" similarity index 100% rename from 09-PWA/02-manifest/sw.js rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/sw.js" diff --git a/09-PWA/02-manifest/webpack.conf.js "b/09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/webpack.conf.js" similarity index 100% rename from 09-PWA/02-manifest/webpack.conf.js rename to "09-PWA/study1/02-app-manifest/01-manifest\345\261\236\346\200\247&\346\267\273\345\212\240\345\233\276\346\240\207&\345\220\257\345\212\250\351\241\265/webpack.conf.js" diff --git "a/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/index.html" "b/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/index.html" new file mode 100644 index 000000000..d0e1817c8 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/index.html" @@ -0,0 +1,88 @@ + + + + + basic + + + + + + + +
    +
    Hello PWA!
    +
    点击显示横幅
    +
    + + + + diff --git "a/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/manifest.json" "b/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/manifest.json" new file mode 100644 index 000000000..0074972b6 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/manifest.json" @@ -0,0 +1,13 @@ +{ + "short_name": "独立模式", + "name": "这是一个完整名称", + "icons": [ + { + "src": "../../images/logo-144x144.png", + "type": "image/png", + "sizes": "144x144" + } + ], + "start_url": "./index.html", + "display": "standalone" +} \ No newline at end of file diff --git "a/02-ES\346\226\260\347\211\271\346\200\247/ES7/README.md" "b/09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/sw.js" similarity index 100% rename from "02-ES\346\226\260\347\211\271\346\200\247/ES7/README.md" rename to "09-PWA/study1/02-app-manifest/02-\345\273\266\350\277\237\346\250\252\345\271\205\345\261\225\347\244\272/sw.js" diff --git "a/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/index.html" "b/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/index.html" new file mode 100644 index 000000000..0901038f4 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/index.html" @@ -0,0 +1,97 @@ + + + + + basic + + + + + + + +

    显示原生应用安装横幅的条件

    +
    +        1. 站点部署 manifest.json,该文件需配置如下属性:
    +            short_name (用于主屏幕显示)
    +            name (用于安装横幅显示)
    +            icons (其中必须包含一个 192x192 且 mime 类型为 image/png 的图标声明)
    +        2. 包含原生应用相关信息的 related_applications 对象
    +        3. 站点注册 Service Worker
    +        4. 站点支持 HTTPS 访问
    +        5. 站点在同一浏览器中被访问至少两次,两次访问间隔至少为 2 天。
    +        
    +        【 related_applications 】关联应用列表
    +        "related_applications": [
    +            {
    +                "platform": "play",
    +                "id": "com.baidu.samples.apps.iosched"
    +            }
    +        ]
    +        
    +        如果只希望用户安装原生应用,而不需要弹出横幅引导用户安装 PWA,可以在 manifest.json 设置:
    +        "prefer_related_applications": true
    +    
    +
    +
    点击显示横幅
    +
    + + + + diff --git "a/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/manifest.json" "b/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/manifest.json" new file mode 100644 index 000000000..0074972b6 --- /dev/null +++ "b/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/manifest.json" @@ -0,0 +1,13 @@ +{ + "short_name": "独立模式", + "name": "这是一个完整名称", + "icons": [ + { + "src": "../../images/logo-144x144.png", + "type": "image/png", + "sizes": "144x144" + } + ], + "start_url": "./index.html", + "display": "standalone" +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/README.md" "b/09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/sw.js" similarity index 100% rename from "11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/README.md" rename to "09-PWA/study1/02-app-manifest/03-\346\250\252\345\271\205\346\216\250\345\271\277\345\256\211\350\243\205\345\216\237\347\224\237\345\272\224\347\224\250/sw.js" diff --git a/09-PWA/03-service-worker/.gitignore b/09-PWA/study1/03-service-worker/.gitignore similarity index 100% rename from 09-PWA/03-service-worker/.gitignore rename to 09-PWA/study1/03-service-worker/.gitignore diff --git a/09-PWA/study1/03-service-worker/README.md b/09-PWA/study1/03-service-worker/README.md new file mode 100755 index 000000000..86d5148bf --- /dev/null +++ b/09-PWA/study1/03-service-worker/README.md @@ -0,0 +1,17 @@ +介绍如何在现有项目中使用 service worker 构建一个具有离线访问能力的 webapp + +## Usage + +1. ` npm install ` +2. ` npm run start` +3. 访问 http://localhost:8080 + +## 核心章节 +main.js 中包含 service worker 的注册 +sw.js 包含 service worker 的核心操作 + 1. 使用了 sw 新的标志性的存储 cache API + 2. 自定义请求响应 + +localStorage 的用法和 Service Worker cache 的用法很相似 +但是由于 localStorage 是同步的用法,所以不允许在 Service Worker 中使用 +IndexedDB 也可以在 Service Worker 内做数据存储 diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/package.json" b/09-PWA/study1/03-service-worker/package.json similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/package.json" rename to 09-PWA/study1/03-service-worker/package.json diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/css/main.css" b/09-PWA/study1/03-service-worker/public/css/main.css similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/css/main.css" rename to 09-PWA/study1/03-service-worker/public/css/main.css diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/img/logo.png" b/09-PWA/study1/03-service-worker/public/img/logo.png similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/img/logo.png" rename to 09-PWA/study1/03-service-worker/public/img/logo.png diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/index.html" b/09-PWA/study1/03-service-worker/public/index.html similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/index.html" rename to 09-PWA/study1/03-service-worker/public/index.html diff --git a/09-PWA/study1/03-service-worker/public/js/main.js b/09-PWA/study1/03-service-worker/public/js/main.js new file mode 100755 index 000000000..3794a4cee --- /dev/null +++ b/09-PWA/study1/03-service-worker/public/js/main.js @@ -0,0 +1,66 @@ +/** + * @file main.js + */ + +define(function (require) { + 'use strict'; + let axios = require('axios'); + let render = require('./render'); + let ui = require('./ui'); + // 异步请求数据,并在前端渲染 + axios.get('/api/movies').then(function (response) { + let $movieList = document.querySelector('.movie-list'); + if (response.status !== 200) { + $movieList.innerHTML = '网络错误'; + return; + } + $movieList.innerHTML = render(response.data); + }); + /** + * 注册 service worker 流程 + */ + // 判断是否能使用 service worker + if ('serviceWorker' in navigator) { + // 等待页面加载完成后再执行 service worker 注册 + window.addEventListener('load', function (event) { + // 注册 service worker + navigator.serviceWorker.register('/sw.js', { + // 作用域,只能比当前service worker的域小,例如:/a/b/sw.js,scope可以为/a/b/c/,若为/a会报错 + scope: '/' + }) + .then(function (registration) { + /** + * 手动更新 registration.update() + */ + // const version = 1.0 + // if (localStorage.getItem('sw_version') !== version) { + // registration.update().then(function () { + // localStorage.setItem('sw_version', version) + // }); + // } + + // 注册成功 + console.log('ServiceWorker registration successful with scope: ', registration.scope); + }) + .catch(function (err) { + // 注册失败:( + console.log('ServiceWorker registration failed: ', err); + }); + }); + + // 页面更新,由sw.js中的clients.claim()触发 + navigator.serviceWorker.oncontrollerchange = function (event) { + ui.showToast('页面已更新', 'info'); + }; + + // 如果用户处于断网状态进入页面,用户可能无法感知内容是过期,需要提示用户断网了,并在重新连接后告诉用户 + if (!window.navigator.onLine) { + ui.showToast('网络断开,内容可能已过期', 'info'); + + window.addEventListener('online', function () { + ui.showToast('已连接网络', 'info'); + }); + + } + } +}); diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/render.js" b/09-PWA/study1/03-service-worker/public/js/render.js similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/public/js/render.js" rename to 09-PWA/study1/03-service-worker/public/js/render.js diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/ui.js" b/09-PWA/study1/03-service-worker/public/js/ui.js similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\220\216/public/js/ui.js" rename to 09-PWA/study1/03-service-worker/public/js/ui.js diff --git a/09-PWA/study1/03-service-worker/public/sw.js b/09-PWA/study1/03-service-worker/public/sw.js new file mode 100755 index 000000000..edf56153c --- /dev/null +++ b/09-PWA/study1/03-service-worker/public/sw.js @@ -0,0 +1,147 @@ +/** + * @file sw.js + */ + +let VERSION = 0; +let CACHE_NAME = 'cache_v' + VERSION; +let CACHE_URLS = [ + '/', + '/api/movies', + '/css/main.css', + '/js/main.js', + '/js/ui.js', + '/js/render.js', + '/img/logo.png' +]; + +/** + * 可以在 install 的时候进行静态资源缓存 + * 也可以通过 fetch 事件处理回调来代理页面请求从而实现动态资源缓存 + * + * on install 的优点是第二次访问即可离线,缺点是需要将需要缓存的 URL 在编译时插入到脚本中,增加代码量和降低可维护性 + * on fetch 的优点是无需更改编译过程,也不会产生额外的流量,缺点是需要多一次访问才能离线可用 + */ + +// 监听 service worker 的 install 事件 +// 下载新的缓存 +self.addEventListener('install', function (event) { + // 如果监听到 service worker 已经安装会调用 event.waitUntil 回调函数 + // event.waitUntil 可以确保 Service Worker 不会在 waitUntil() 里面的代码执行完毕之前安装完成 + event.waitUntil( + // Service Worker 被载入后立即激活可以保证每次 /sw.js 为最新的 + // 更新后进入 waiting 状态,此时新旧sw并存,需要 skipWaiting 才能执行新sw + precache().then(self.skipWaiting) + ); +}); + +// 删除旧的缓存 +self.addEventListener('activate', function (event) { + event.waitUntil( + Promise.all([ + // Clients 接口的 claim() 方法允许一个激活的 service worker 将自己设置为其 scope 内所有 clients 的 controller + // 这会在由此service worker 控制的任何 clients 中触发 navigator.serviceWorker 上的 "controllerchange" 事件 + //(触发页面更新回调) + // 更新客户端 + self.clients.claim(), + // 清理旧版本 + clearStaleCache() + ]) + ); +}); + +self.addEventListener('fetch', function (event) { + // 只对同源的资源走 sw,cdn 上的资源利用 http 缓存策略 + if (new URL(event.request.url).origin !== self.origin) { + return; + } + // 限制url + if (event.request.url.includes('/api/movies')) { + // event.respondWith(data) + event.respondWith( + // 获取数据并更新缓存,获取失败则直接读缓存 + fetchAndCache(event.request) + .catch(function () { + return caches.match(event.request); + }) + ); + return; + } + event.respondWith( + // 获取数据失败则取缓存 + fetch(event.request).catch(function () { + return caches.match(event.request); + }) + ); +}); + +/** + * cache api + */ +// caches.open(name) 创建了一个名为name的新的缓存 +// cache.addAll(Array) 缓存列表资源,传入相对于 origin 的 URL 组成的数组 +// cache.put(key, value) +// caches.keys() +// caches.delete(key) +// Cache.match() 返回一个 Promise 解析为(resolve to)与 Cache 对象中的第一个匹配请求相关联的Response,如果没有找到匹配,Promise 解析为 undefined + +/** + * 缓存到 cacheStorage 里 + * + * @param {Request} req 请求对象 + * @param {Response} res 响应对象 + */ +function saveToCache(req, res) { + // 操作 CacheStorage 缓存,使用之前需要先通过 caches.open() 打开对应缓存空间 + return caches + .open(CACHE_NAME) + .then(cache => cache.put(req, res)); +} + +/** + * 预缓存 + * + * @return {Promise} 缓存成功的promise + */ +function precache() { + return caches.open(CACHE_NAME).then(function (cache) { + // 通过 cache 缓存对象的 addAll 方法添加 precache 缓存 + return cache.addAll(CACHE_URLS); + }); +} + +/** + * 清除过期的 cache + * 删除非 CACHE_NAME 的缓存数据 + * + * @return {Promise} promise + */ +function clearStaleCache() { + return caches.keys().then(keys => { + keys.forEach(key => { + if (CACHE_NAME !== key) { + caches.delete(key); + } + }); + }); +} + +/** + * 发起请求并缓存内容 + * + * @param {Request} req request + * @return {Promise} + */ +function fetchAndCache(req) { + // fetch 发起请求,res为返回结果 + return fetch(req) + .then(function (res) { + // http请求已返回 + // 请求失败则直接返回失败结果,不进行缓存 + if (!res || res.status !== 200) { + return res + } + // 请求成功,缓存克隆的请求 res.clone + saveToCache(req, res.clone()) + return res + }); +} diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/server/index.js" b/09-PWA/study1/03-service-worker/server/index.js similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/server/index.js" rename to 09-PWA/study1/03-service-worker/server/index.js diff --git "a/09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/server/movies.json" b/09-PWA/study1/03-service-worker/server/movies.json similarity index 100% rename from "09-PWA/03-service-worker/pwa\346\224\271\351\200\240\345\211\215/server/movies.json" rename to 09-PWA/study1/03-service-worker/server/movies.json diff --git a/09-PWA/study1/03-service-worker/sw-lifecycle.png b/09-PWA/study1/03-service-worker/sw-lifecycle.png new file mode 100644 index 000000000..9cc9b0299 Binary files /dev/null and b/09-PWA/study1/03-service-worker/sw-lifecycle.png differ diff --git "a/09-PWA/03-service-worker/sw\346\233\264\346\226\260\350\277\207\347\250\213.png" "b/09-PWA/study1/03-service-worker/sw\346\233\264\346\226\260\350\277\207\347\250\213.png" similarity index 100% rename from "09-PWA/03-service-worker/sw\346\233\264\346\226\260\350\277\207\347\250\213.png" rename to "09-PWA/study1/03-service-worker/sw\346\233\264\346\226\260\350\277\207\347\250\213.png" diff --git a/09-PWA/04-appShell-skeleton/README.md b/09-PWA/study1/04-appShell-skeleton/README.md similarity index 100% rename from 09-PWA/04-appShell-skeleton/README.md rename to 09-PWA/study1/04-appShell-skeleton/README.md diff --git a/09-PWA/04-appShell-skeleton/app.js b/09-PWA/study1/04-appShell-skeleton/app.js similarity index 100% rename from 09-PWA/04-appShell-skeleton/app.js rename to 09-PWA/study1/04-appShell-skeleton/app.js diff --git a/09-PWA/04-appShell-skeleton/index.html b/09-PWA/study1/04-appShell-skeleton/index.html similarity index 100% rename from 09-PWA/04-appShell-skeleton/index.html rename to 09-PWA/study1/04-appShell-skeleton/index.html diff --git a/09-PWA/04-appShell-skeleton/style.css b/09-PWA/study1/04-appShell-skeleton/style.css similarity index 100% rename from 09-PWA/04-appShell-skeleton/style.css rename to 09-PWA/study1/04-appShell-skeleton/style.css diff --git a/09-PWA/04-appShell-skeleton/sw.js b/09-PWA/study1/04-appShell-skeleton/sw.js similarity index 100% rename from 09-PWA/04-appShell-skeleton/sw.js rename to 09-PWA/study1/04-appShell-skeleton/sw.js diff --git a/09-PWA/05-service-worker-update/cat.jpeg b/09-PWA/study1/05-service-worker-update/cat.jpeg similarity index 100% rename from 09-PWA/05-service-worker-update/cat.jpeg rename to 09-PWA/study1/05-service-worker-update/cat.jpeg diff --git a/09-PWA/05-service-worker-update/dog.jpeg b/09-PWA/study1/05-service-worker-update/dog.jpeg similarity index 100% rename from 09-PWA/05-service-worker-update/dog.jpeg rename to 09-PWA/study1/05-service-worker-update/dog.jpeg diff --git a/09-PWA/05-service-worker-update/index.html b/09-PWA/study1/05-service-worker-update/index.html similarity index 100% rename from 09-PWA/05-service-worker-update/index.html rename to 09-PWA/study1/05-service-worker-update/index.html diff --git a/09-PWA/05-service-worker-update/monkey.jpeg b/09-PWA/study1/05-service-worker-update/monkey.jpeg similarity index 100% rename from 09-PWA/05-service-worker-update/monkey.jpeg rename to 09-PWA/study1/05-service-worker-update/monkey.jpeg diff --git a/09-PWA/05-service-worker-update/sw-register.js b/09-PWA/study1/05-service-worker-update/sw-register.js similarity index 100% rename from 09-PWA/05-service-worker-update/sw-register.js rename to 09-PWA/study1/05-service-worker-update/sw-register.js diff --git a/09-PWA/05-service-worker-update/sw.js b/09-PWA/study1/05-service-worker-update/sw.js similarity index 100% rename from 09-PWA/05-service-worker-update/sw.js rename to 09-PWA/study1/05-service-worker-update/sw.js diff --git a/09-PWA/06-ssr-service-worker/.babelrc b/09-PWA/study1/06-ssr-service-worker/.babelrc similarity index 100% rename from 09-PWA/06-ssr-service-worker/.babelrc rename to 09-PWA/study1/06-ssr-service-worker/.babelrc diff --git a/09-PWA/06-ssr-service-worker/.editorconfig b/09-PWA/study1/06-ssr-service-worker/.editorconfig similarity index 100% rename from 09-PWA/06-ssr-service-worker/.editorconfig rename to 09-PWA/study1/06-ssr-service-worker/.editorconfig diff --git a/09-PWA/06-ssr-service-worker/.eslintignore b/09-PWA/study1/06-ssr-service-worker/.eslintignore similarity index 100% rename from 09-PWA/06-ssr-service-worker/.eslintignore rename to 09-PWA/study1/06-ssr-service-worker/.eslintignore diff --git a/09-PWA/06-ssr-service-worker/.eslintrc.js b/09-PWA/study1/06-ssr-service-worker/.eslintrc.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/.eslintrc.js rename to 09-PWA/study1/06-ssr-service-worker/.eslintrc.js diff --git a/09-PWA/06-ssr-service-worker/.gitignore b/09-PWA/study1/06-ssr-service-worker/.gitignore similarity index 100% rename from 09-PWA/06-ssr-service-worker/.gitignore rename to 09-PWA/study1/06-ssr-service-worker/.gitignore diff --git a/09-PWA/06-ssr-service-worker/.postcssrc.js b/09-PWA/study1/06-ssr-service-worker/.postcssrc.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/.postcssrc.js rename to 09-PWA/study1/06-ssr-service-worker/.postcssrc.js diff --git a/09-PWA/06-ssr-service-worker/README.md b/09-PWA/study1/06-ssr-service-worker/README.md similarity index 100% rename from 09-PWA/06-ssr-service-worker/README.md rename to 09-PWA/study1/06-ssr-service-worker/README.md diff --git a/09-PWA/06-ssr-service-worker/config/dev.env.js b/09-PWA/study1/06-ssr-service-worker/config/dev.env.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/config/dev.env.js rename to 09-PWA/study1/06-ssr-service-worker/config/dev.env.js diff --git a/09-PWA/06-ssr-service-worker/config/index.js b/09-PWA/study1/06-ssr-service-worker/config/index.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/config/index.js rename to 09-PWA/study1/06-ssr-service-worker/config/index.js diff --git a/09-PWA/06-ssr-service-worker/config/prod.env.js b/09-PWA/study1/06-ssr-service-worker/config/prod.env.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/config/prod.env.js rename to 09-PWA/study1/06-ssr-service-worker/config/prod.env.js diff --git a/09-PWA/06-ssr-service-worker/package-lock.json b/09-PWA/study1/06-ssr-service-worker/package-lock.json similarity index 100% rename from 09-PWA/06-ssr-service-worker/package-lock.json rename to 09-PWA/study1/06-ssr-service-worker/package-lock.json diff --git a/09-PWA/06-ssr-service-worker/package.json b/09-PWA/study1/06-ssr-service-worker/package.json similarity index 100% rename from 09-PWA/06-ssr-service-worker/package.json rename to 09-PWA/study1/06-ssr-service-worker/package.json diff --git a/09-PWA/06-ssr-service-worker/server.js b/09-PWA/study1/06-ssr-service-worker/server.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/server.js rename to 09-PWA/study1/06-ssr-service-worker/server.js diff --git a/09-PWA/06-ssr-service-worker/src/App.vue b/09-PWA/study1/06-ssr-service-worker/src/App.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/App.vue rename to 09-PWA/study1/06-ssr-service-worker/src/App.vue diff --git a/09-PWA/06-ssr-service-worker/src/app.js b/09-PWA/study1/06-ssr-service-worker/src/app.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/app.js rename to 09-PWA/study1/06-ssr-service-worker/src/app.js diff --git a/09-PWA/06-ssr-service-worker/src/assets/logo.png b/09-PWA/study1/06-ssr-service-worker/src/assets/logo.png similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/assets/logo.png rename to 09-PWA/study1/06-ssr-service-worker/src/assets/logo.png diff --git a/09-PWA/06-ssr-service-worker/src/components/HelloWorld.vue b/09-PWA/study1/06-ssr-service-worker/src/components/HelloWorld.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/components/HelloWorld.vue rename to 09-PWA/study1/06-ssr-service-worker/src/components/HelloWorld.vue diff --git a/09-PWA/06-ssr-service-worker/src/entry-client.js b/09-PWA/study1/06-ssr-service-worker/src/entry-client.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/entry-client.js rename to 09-PWA/study1/06-ssr-service-worker/src/entry-client.js diff --git a/09-PWA/06-ssr-service-worker/src/entry-server.js b/09-PWA/study1/06-ssr-service-worker/src/entry-server.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/entry-server.js rename to 09-PWA/study1/06-ssr-service-worker/src/entry-server.js diff --git a/09-PWA/06-ssr-service-worker/src/index.template.html b/09-PWA/study1/06-ssr-service-worker/src/index.template.html similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/index.template.html rename to 09-PWA/study1/06-ssr-service-worker/src/index.template.html diff --git a/09-PWA/06-ssr-service-worker/src/pages/Appshell.vue b/09-PWA/study1/06-ssr-service-worker/src/pages/Appshell.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/pages/Appshell.vue rename to 09-PWA/study1/06-ssr-service-worker/src/pages/Appshell.vue diff --git a/09-PWA/06-ssr-service-worker/src/pages/Home.vue b/09-PWA/study1/06-ssr-service-worker/src/pages/Home.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/pages/Home.vue rename to 09-PWA/study1/06-ssr-service-worker/src/pages/Home.vue diff --git a/09-PWA/06-ssr-service-worker/src/pages/List.vue b/09-PWA/study1/06-ssr-service-worker/src/pages/List.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/pages/List.vue rename to 09-PWA/study1/06-ssr-service-worker/src/pages/List.vue diff --git a/09-PWA/06-ssr-service-worker/src/pages/NotFound.vue b/09-PWA/study1/06-ssr-service-worker/src/pages/NotFound.vue similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/pages/NotFound.vue rename to 09-PWA/study1/06-ssr-service-worker/src/pages/NotFound.vue diff --git a/09-PWA/06-ssr-service-worker/src/router.js b/09-PWA/study1/06-ssr-service-worker/src/router.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/router.js rename to 09-PWA/study1/06-ssr-service-worker/src/router.js diff --git a/09-PWA/06-ssr-service-worker/src/store.js b/09-PWA/study1/06-ssr-service-worker/src/store.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/src/store.js rename to 09-PWA/study1/06-ssr-service-worker/src/store.js diff --git a/09-PWA/06-ssr-service-worker/static/favicon-32x32.png b/09-PWA/study1/06-ssr-service-worker/static/favicon-32x32.png similarity index 100% rename from 09-PWA/06-ssr-service-worker/static/favicon-32x32.png rename to 09-PWA/study1/06-ssr-service-worker/static/favicon-32x32.png diff --git a/09-PWA/06-ssr-service-worker/static/sw.js b/09-PWA/study1/06-ssr-service-worker/static/sw.js similarity index 100% rename from 09-PWA/06-ssr-service-worker/static/sw.js rename to 09-PWA/study1/06-ssr-service-worker/static/sw.js diff --git a/09-PWA/study1/07-notifications-api/android-chrome-144x144.png b/09-PWA/study1/07-notifications-api/android-chrome-144x144.png new file mode 100755 index 000000000..b1af26ef1 Binary files /dev/null and b/09-PWA/study1/07-notifications-api/android-chrome-144x144.png differ diff --git a/09-PWA/study1/07-notifications-api/index.html b/09-PWA/study1/07-notifications-api/index.html new file mode 100755 index 000000000..bf5e1fcfb --- /dev/null +++ b/09-PWA/study1/07-notifications-api/index.html @@ -0,0 +1,148 @@ + + + + + + Home - PWA Lesson + + + + +
    +

    消息推送

    +
    +        
    +
    + + + \ No newline at end of file diff --git a/09-PWA/study1/07-notifications-api/manifest.json b/09-PWA/study1/07-notifications-api/manifest.json new file mode 100755 index 000000000..c946c04a5 --- /dev/null +++ b/09-PWA/study1/07-notifications-api/manifest.json @@ -0,0 +1,13 @@ +{ + "name": "PWA Lesson Demo", + "short_name": "PWA Lesson", + "display": "standalone", + "start_url": "/", + "icons": [{ + "src": "./android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + }], + "background_color": "#1976d2", + "theme_color": "#2F3BA2" +} \ No newline at end of file diff --git "a/13-mock\346\225\260\346\215\256/README.md" b/09-PWA/study1/07-notifications-api/sw.js old mode 100644 new mode 100755 similarity index 100% rename from "13-mock\346\225\260\346\215\256/README.md" rename to 09-PWA/study1/07-notifications-api/sw.js diff --git a/09-PWA/study2/01-basic/README.md b/09-PWA/study2/01-basic/README.md new file mode 100755 index 000000000..10c6f53d5 --- /dev/null +++ b/09-PWA/study2/01-basic/README.md @@ -0,0 +1,46 @@ +# 项目DEMO——一个基础的Web App +为了配合PWA中相关知识的学习,我专门创建了一个demo Web App—— + +一个根据关键字查询图书信息的demo。 + +这个Web App最开始是不具备任何PWA的能力。我会在这一系列文章中以这个demo为例,阐述各项技术的同时,将其应用在demo上。也就是说,在这一系列的文章中,我会和大家一起将一个普通的网页应用逐步升级为一个简单的PWA,通过这种方式一起学习。 + +首先简单介绍一下这个demo。这是一个根据关键词搜索图书信息的应用,用户在前端输入关键词,点击搜索,会请求我们自己的服务器,而服务器使用[豆瓣图书API V2](https://developers.douban.com/wiki/?title=book_v2)来获取数据。 + +![图书搜索demo](https://upload-images.jianshu.io/upload_images/6476654-61e8e1ee38c99d84.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +项目使用[KOA](http://koajs.com/)来搭建node服务器,所以需要node版本>7.6.0,可以使用[nvm](https://github.com/creationix/nvm)来切换到适合的node版本。 + +要运行该项目,首先 +```bash +git clone git@github.com:alienzhou/learning-pwa.git +# 切换到基础项目分支 +git checkout basic +``` +注意,需要切换到basic分支,master分支是上经过PWA升级后最新的demo代码。只有在basic分支才能看到原始的Web App。接下来,安装依赖: +``` +npm install +``` +最后,运行项目: +``` +npm run start +``` +然后就可以在`127.0.0.1:8085`上访问到该项目。 + +基础demo的代码比较简单,这里就不去赘述demo中的代码细节了。简单了解一下项目结构,前端代码都存放于`public`目录中,具体结构如下: +``` +|---public---|---index.html // 前端页面 +| |---index.js // browser的JavaScript脚本 +| |---style.css // 样式文件 +| |---img // 图片文件夹 +|---app.js // node服务启动入口 +|---util.js // node服务工具库 +``` + +值得一提的是,后续文章内的代码会以分支的形式存在,每篇文章的最终代码会存放于一个对应的分支中。你可以通过方便得切换分支,来查看每篇文章对应的示例代码。 + +- basic分支:基础项目demo,一个普通的图书搜索应用(网站); +- manifest分支:基于basic分支,添加manifest等功能; +- sw-cache分支:基于manifest分支,添加缓存与离线功能; +- master分支:应用的最新代码。 +- …… diff --git a/09-PWA/study2/01-basic/app.js b/09-PWA/study2/01-basic/app.js new file mode 100644 index 000000000..808f65b67 --- /dev/null +++ b/09-PWA/study2/01-basic/app.js @@ -0,0 +1,23 @@ +const get = require('./util').get; +const http = require('http'); +const Koa = require('koa'); +const serve = require('koa-static'); +const Router = require('koa-router'); + +const port = process.env.PORT || 8085; +const app = new Koa(); +const router = new Router(); + +router.get('/movie', async (ctx, next) => { + let query = ctx.request.query; + let {q, fields} = query; + let url = `https://api.douban.com/v2/movie/search?q=${q}&fields=${fields}&count=10`; + let res = await get(url); + ctx.response.body = res; +}); + +app.use(router.routes()); +app.use(serve(__dirname + '/public')); +app.listen(port, () => { + console.log(`listen on port: ${port}`); +}); \ No newline at end of file diff --git a/09-PWA/study2/01-basic/package.json b/09-PWA/study2/01-basic/package.json new file mode 100644 index 000000000..22195c755 --- /dev/null +++ b/09-PWA/study2/01-basic/package.json @@ -0,0 +1,44 @@ +{ + "name": "learning-pwa", + "version": "0.1.0", + "description": "some samples and blogs about how to start with your first PWA", + "main": "app.js", + "scripts": { + "start": "node app.js", + "release": "standard-version", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/alienzhou/learning-pwa.git" + }, + "keywords": [ + "PWA", + "koa", + "sample" + ], + "author": "alienzhou", + "license": "ISC", + "bugs": { + "url": "https://github.com/alienzhou/learning-pwa/issues" + }, + "homepage": "https://github.com/alienzhou/learning-pwa#readme", + "dependencies": { + "koa-router": "^7.4.0", + "koa-static": "^4.0.2", + "nedb": "^1.8.0", + "request": "^2.85.0" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -e $GIT_PARAMS" + } + }, + "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "husky": "^0.15.0-rc.13", + "koa": "^2.7.0", + "standard-version": "^4.3.0" + } +} diff --git a/09-PWA/study2/01-basic/public/img/book.png b/09-PWA/study2/01-basic/public/img/book.png new file mode 100644 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/01-basic/public/img/book.png differ diff --git a/09-PWA/study2/01-basic/public/img/loading.svg b/09-PWA/study2/01-basic/public/img/loading.svg new file mode 100644 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/01-basic/public/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/01-basic/public/index.html b/09-PWA/study2/01-basic/public/index.html new file mode 100644 index 000000000..3735b34ba --- /dev/null +++ b/09-PWA/study2/01-basic/public/index.html @@ -0,0 +1,24 @@ + + + + + + + + PWA: 电影搜索 + + +
    + + + +
    +
    +
    +
    +
      + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
      + + + \ No newline at end of file diff --git a/09-PWA/study2/01-basic/public/index.js b/09-PWA/study2/01-basic/public/index.js new file mode 100644 index 000000000..a9a9851a6 --- /dev/null +++ b/09-PWA/study2/01-basic/public/index.js @@ -0,0 +1,125 @@ +(function() { + /** + * 生成列表卡片(dom元素) + * @param {Object} movie 相关数据 + */ + function createCard(movie) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var genres = document.createElement('div'); + var desc = document.createElement('div'); + var casts = document.createElement('span'); + title.className = 'title'; + genres.className = 'genres'; + desc.className = 'desc'; + // img.src = movie.image; + title.innerText = movie.title; + genres.innerText = movie.genres.join(', '); + casts.innerText = movie.casts.map((ele) => { return ele.name }).join(','); + movie.casts && desc.appendChild(casts); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(genres); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成展示列表 + * @param {Array} list 列表数据 + */ + function fillList(list) { + list.forEach(function (movie) { + var node = createCard(movie); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 控制loading动画的展示 + * @param {boolean | undefined} isloading 是否展示loading + */ + function loading(isloading) { + if (isloading) { + tip(); + document.querySelector('#js-loading').style = 'display: block'; + } + else { + document.querySelector('#js-loading').style = 'display: none'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryMovie() { + var input = document.querySelector('#js-search-input'); + var query = input.value; + var xhr = new XMLHttpRequest(); + var url = '/movie?q=' + query + '&fields=id,title,image,author,publisher,price'; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + loading(false); + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + tip(); + if (response.subjects.length === 0) { + tip('无结果'); + } + else { + input.blur(); + fillList(response.subjects); + document.querySelector('#js-thanks').style = 'display: block'; + } + } + }; + xhr.open('GET', url, true); + xhr.send(null); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryMovie(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryMovie(); + } + }); +})(); \ No newline at end of file diff --git a/09-PWA/study2/01-basic/public/style.css b/09-PWA/study2/01-basic/public/style.css new file mode 100644 index 000000000..1e30092b5 --- /dev/null +++ b/09-PWA/study2/01-basic/public/style.css @@ -0,0 +1,143 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .genres { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} \ No newline at end of file diff --git a/09-PWA/study2/01-basic/util.js b/09-PWA/study2/01-basic/util.js new file mode 100644 index 000000000..b2ebe09b2 --- /dev/null +++ b/09-PWA/study2/01-basic/util.js @@ -0,0 +1,24 @@ +const request = require('request'); +module.exports.get = function (url, opt = {}) { + return new Promise((r, j) => { + request.get(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.post = function (url, opt = {}) { + return new Promise((r, j) => { + request.post(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; \ No newline at end of file diff --git a/09-PWA/study2/02-manifest/README.md b/09-PWA/study2/02-manifest/README.md new file mode 100755 index 000000000..99f576a4a --- /dev/null +++ b/09-PWA/study2/02-manifest/README.md @@ -0,0 +1,167 @@ +## 1. 引言 + +我们知道,在chrome(等一些现代浏览器)中,你可以将访问的网站添加到桌面,这样就会在桌面生成一个类似“快捷方式”的图标,当你点击该图标时,便可以快速访问该网站(Web App)。我们以basic分支中的demo为例,其添加到桌面后以及重新打开时的状态如下: + +![普通Web App被添加到桌面后的展示形式](https://upload-images.jianshu.io/upload_images/6476654-209c518d6c44597e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +然而,对于PWA来说,有一些重要的特性: + +- Web App可以被添加到桌面并有它自己的应用图标; +- 同时,从桌面开启时,会和原生app一样有它自己的“开屏图”; +- 更进一步的,这个Web App在的样子几乎和原生应用一样——没有浏览器的地址栏、工具条,似乎和Native App一样运行在一个独立的容器中。 + +就像下面这样: + +![PWA被添加到桌面后的展示形式](https://upload-images.jianshu.io/upload_images/6476654-802aae8ac8508d5c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +接下来,我们会基于basic分支上的一个普通Web App的demo来进行改造,来实现PWA的这一效果。 + +## 2. Web App Manifest +Manifest是一个JSON格式的文件,你可以把它理解为一个指定了Web App桌面图标、名称、开屏图标、运行模式等一系列资源的一个清单。 + +> manifest 的目的是将Web应用程序安装到设备的主屏幕,为用户提供更快的访问和更丰富的体验。 —— MDN + +我们来看一下,learning-pwa中的[manifest.json](https://github.com/alienzhou/learning-pwa/blob/manifest/public/manifest.json)文件内容 + +``` +{ + "name": "图书搜索", + "short_name": "书查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索图书的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} +``` +可以看出,上面的JSON配置文件非常直观,通过声明各个属性的值,即可改造我们的Web App。那么下面就针对每个具体值进行简单的介绍。 +### 2.1. name, short_name +指定了Web App的名称。`short_name`其实是该应用的一个简称。一般来说,当没有足够空间展示应用的`name`时,系统就会使用`short_name`。可以看到本文的例子中,图书搜索这个应用在桌面上展示的名称就是`short_name`书查。 + +### 2.2. start_url +这个属性指定了用户打开该Web App时加载的URL。相对URL会相对于manifest。这里我们指定了`start_url`为`/`,访问根目录。 + +### 2.3. display +`display`控制了应用的显示模式,它有四个值可以选择:`fullscreen `、`standalone `、`minimal-ui`和`browser `。 + +- `fullscreen `:全屏显示,会尽可能将所有的显示区域都占满; +- `standalone `:独立应用模式,这种模式下打开的应用有自己的启动图标,并且不会有浏览器的地址栏。因此看起来更像一个Native App; +- `minimal-ui`:与`standalone `相比,该模式会多出地址栏; +- `browser `:一般来说,会和正常使用浏览器打开样式一致。 + +让我们来看下这四种模式的差异: + +![display四种模式的差异](https://upload-images.jianshu.io/upload_images/6476654-1f9c956ccf2a2589.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +当然,不同的系统所表现出的具体样式也不完全一样。就像示例中的虚拟按键在`fullscreen `模式下会默认隐藏。 + +### 2.4. orientation +控制Web App的方向。设置某些值会具有类似锁屏的效果(禁止旋转),例如例子中的`portrait-primary`。具体的值包括:`any, natural, landscape, landscape-primary, landscape-secondary, portrait, portrait-primary, portrait-secondary`。 + +### 2.5. icons, background_color +`icons`用来指定应用的桌面图标。icons本身是一个数组,每个元素包含三个属性: +- sizes:图标的大小。通过指定大小,系统会选取最合适的图标展示在相应位置上。 +- src:图标的文件路径。注意相对路径是相对于manifest。 +- type:图标的图片类型。 + +需要指出的是,我一直提的“开屏图”其实是背景颜色+图标的展示模式(并不会设置一张所谓的开屏图)。`background_color`是在应用的样式资源为加载完毕前的默认背景,因此会展示在开屏界面。`background_color`加上我们刚才定义的`icons`就组成了Web App打开时的“开屏图”。 + +### 2.6. theme_color +定义应用程序的默认主题颜色。 这有时会影响操作系统显示应用程序的方式(例如,在Android的任务切换器上,主题颜色包围应用程序)。此外,还可以在meta标签中设置theme_color:`` + +### 2.7. description +这个字段的含义非常简单,就是一段对该应用的描述。 + +## 3. 使用Manifest +创建好manifest文件后,下一步就是需要知道如何能让我们的Web App使用它——非常简单,只需要在head中添加一个link标签: +```html + + +``` +这样,在android上我们使用chrome将应用添加到桌面,就会拥有文章开头处的PWA效果。你可在这里验证manifest.json的内容:[Web Manifest Validator](https://manifest-validator.appspot.com/) + +如果你看到这里,那么恭喜你,已经知道如何让我们的Web App看起来更像一个独立的Native App。是不是非常简单? + +## 4. iOS, Windows? +上面的一切看似美好,然而真的如此么? + +到目前为止,我们的工作都非常顺利:创建manifest.json,添加meta标签,然后把我们的Web App添加到桌面。然而,如果我们在iPhone上访问我们的站点,然后“添加到主屏幕”,你会发现——一切都失效了!是的,你没有看错,一切都回到了原样。 + +![manifest的兼容性](https://upload-images.jianshu.io/upload_images/6476654-c2950b87963296f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +如果你看过[caniuse](https://caniuse.com/#search=manifest)上manifest的兼容性,那会令你更加头疼。但是,也不必太过忧伤,在iOS与windows上,我们有其他的方式 + +## 5. iOS(safari)中的处理方式 +safari虽然不支持Web App Manifest,但是它有自己的一些head标签来定义相应的资源与展示形式: + +- `apple-touch-icon`:桌面图标,通过在head中添加``即可。其中还可以添加sizes属性,来指示系统使用在各类平台(iphone、ipad…)中使用最合适的图标 +- `apple-mobile-web-app-title`:应用的标题。注意,这里需要使用meta标签`` +- `apple-mobile-web-app-capable`:类似于manifest中的display的功能,通过设置为yes可以进入standalone模式,同样也是meta标签`` +- `apple-mobile-web-app-status-bar-style`:这会改变iOS移动设备的状态栏的样式,并且只有在standalone模式中才会有效果。``,不过在iPhoneX上black会导致状态栏不显示任何东西。 + +下面是learning-pwa项目中的相关设置 +```html + + + + +``` +## 6. 在IE、edge中的处理方式 +与Safari类似,IE中也有自己的meta标签来指示相应的资源。其中比较重要的有: +- `application-name`:指明了app的名称 +- `msapplication-TileColor`:指明了“tile”的背景颜色 +- `msapplication-xxxlogo`:不同大小的“tile”所使用的图标,包括这几种:`msapplication-square70x70logo, msapplication-square150x150logo, msapplication-wide310x150logo, msapplication-square310x310logo` + +下面是learning-pwa项目中的相关设置,其中图标的设置为了方便就复用了已有的图标文件 +```html + + + + + +``` + +## 写在最后 +本文主要探索如何让被添加到桌面的Web App具有更贴近Native App的使用体验(桌面图标、开屏页、shell…)。 + +因此,我们使用了Web App Manifest。通过我们添加manifest文件,并在HTML中设置相应的meta标签来使用它即可;而在safari与ie中,可以通过一些特有的meta、link标签来实现。是不是很简单,很方便?这就使得我们能够以很低成本的改动我们Web App。这也就是PWA概念的理念之一:你可以渐进式地提高Web App的能力,同时在兼容性上,也会根据不同的浏览器的支持度提供渐进增强的能力。 + +好了,这篇文章的内容就到这里了。希望你能够喜欢!同时,想要了解PWA背后的更多相关技术,欢迎关注《PWA技术学习与实践》后续文章。 + +## 参考资料 +- [Web App Manifest(MDN)](https://developer.mozilla.org/zh-CN/docs/Web/Manifest) +- [Configuring Web Applications(Safari)](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html) +- [Pinned site enhancements (Internet Explorer)](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/dev-guides/bg183312(v=vs.85)) +- [caniuse manifest](https://caniuse.com/#search=manifest) +- [Web Manifest Validator](https://manifest-validator.appspot.com/) +- [Address Bar Matches Brand Colors](https://developers.google.com/web/tools/lighthouse/audits/address-bar) diff --git a/09-PWA/study2/02-manifest/img/book.png b/09-PWA/study2/02-manifest/img/book.png new file mode 100644 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/02-manifest/img/book.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-128.png b/09-PWA/study2/02-manifest/img/icons/book-128.png new file mode 100644 index 000000000..744f006ff Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-128.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-144.png b/09-PWA/study2/02-manifest/img/icons/book-144.png new file mode 100644 index 000000000..d03af1c14 Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-144.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-192.png b/09-PWA/study2/02-manifest/img/icons/book-192.png new file mode 100644 index 000000000..a1c04b208 Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-192.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-256.png b/09-PWA/study2/02-manifest/img/icons/book-256.png new file mode 100644 index 000000000..ad4789069 Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-256.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-32.png b/09-PWA/study2/02-manifest/img/icons/book-32.png new file mode 100644 index 000000000..2fa6a9faf Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-32.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-512.png b/09-PWA/study2/02-manifest/img/icons/book-512.png new file mode 100644 index 000000000..bb5b0f380 Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-512.png differ diff --git a/09-PWA/study2/02-manifest/img/icons/book-72.png b/09-PWA/study2/02-manifest/img/icons/book-72.png new file mode 100644 index 000000000..e04b29572 Binary files /dev/null and b/09-PWA/study2/02-manifest/img/icons/book-72.png differ diff --git a/09-PWA/study2/02-manifest/img/loading.svg b/09-PWA/study2/02-manifest/img/loading.svg new file mode 100644 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/02-manifest/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/02-manifest/index.html b/09-PWA/study2/02-manifest/index.html new file mode 100644 index 000000000..6f72fa8a3 --- /dev/null +++ b/09-PWA/study2/02-manifest/index.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + PWA: 电影搜索 + + +
      + + + +
      +
      +
      +
      +
        + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
        + + + \ No newline at end of file diff --git a/09-PWA/study2/02-manifest/index.js b/09-PWA/study2/02-manifest/index.js new file mode 100644 index 000000000..e8bcbe7f6 --- /dev/null +++ b/09-PWA/study2/02-manifest/index.js @@ -0,0 +1,147 @@ +(function() { + /** + * 生成列表卡片(dom元素) + * @param {Object} movie 相关数据 + */ + function createCard(movie) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var genres = document.createElement('div'); + var desc = document.createElement('div'); + var casts = document.createElement('span'); + title.className = 'title'; + genres.className = 'genres'; + desc.className = 'desc'; + // img.src = movie.image; + title.innerText = movie.title; + genres.innerText = movie.genres.join(', '); + casts.innerText = movie.casts.map((ele) => { return ele.name }).join(','); + movie.casts && desc.appendChild(casts); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(genres); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成展示列表 + * @param {Array} list 列表数据 + */ + function fillList(list) { + list.forEach(function (movie) { + var node = createCard(movie); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 控制loading动画的展示 + * @param {boolean | undefined} isloading 是否展示loading + */ + function loading(isloading) { + if (isloading) { + tip(); + document.querySelector('#js-loading').style = 'display: block'; + } + else { + document.querySelector('#js-loading').style = 'display: none'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryMovie() { + var input = document.querySelector('#js-search-input'); + var query = input.value; + var url = `https://api.douban.com/v2/movie/search?q=${query}&fields=id,title,image,author,publisher,price&count=10` + /* + var xhr = new XMLHttpRequest(); + // var url = '/movie?q=' + query + '&fields=id,title,image,author,publisher,price'; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + loading(false); + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + tip(); + if (response.subjects.length === 0) { + tip('无结果'); + } + else { + input.blur(); + fillList(response.subjects); + document.querySelector('#js-thanks').style = 'display: block'; + } + } + }; + xhr.open('GET', url, true); + xhr.send(null); + */ + $.ajax({ + contentType: "application/x-www-form-urlencoded;charset=UTF-8", + type : "post", + url : url, + cache : false, //默认值true + dataType : "jsonp", + jsonp: "callback", // 必须,返回的响应需要以此为前缀 + success : function(data){ + tip(); + if (data.subjects.length === 0) { + tip('无结果'); + } + else { + input.blur(); + fillList(data.subjects); + document.querySelector('#js-thanks').style = 'display: block'; + } + } + }); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryMovie(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryMovie(); + } + }); +})(); \ No newline at end of file diff --git a/09-PWA/study2/02-manifest/manifest.json b/09-PWA/study2/02-manifest/manifest.json new file mode 100644 index 000000000..cd0b0e4e8 --- /dev/null +++ b/09-PWA/study2/02-manifest/manifest.json @@ -0,0 +1,39 @@ +{ + "name": "电影搜索", + "short_name": "影查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索电影的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} \ No newline at end of file diff --git a/09-PWA/study2/02-manifest/style.css b/09-PWA/study2/02-manifest/style.css new file mode 100644 index 000000000..1e30092b5 --- /dev/null +++ b/09-PWA/study2/02-manifest/style.css @@ -0,0 +1,143 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .genres { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/.gitignore b/09-PWA/study2/03-service-worker/.gitignore new file mode 100755 index 000000000..564309e28 --- /dev/null +++ b/09-PWA/study2/03-service-worker/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +.vscode/ +package-lock.json \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/README.md b/09-PWA/study2/03-service-worker/README.md new file mode 100755 index 000000000..cfad78b8c --- /dev/null +++ b/09-PWA/study2/03-service-worker/README.md @@ -0,0 +1,324 @@ +## 1. 引言 +PWA其中一个令人着迷的能力就是离线(offline)可用。 + +![即使在离线状态下,依然可以访问的PWA](https://user-gold-cdn.xitu.io/2018/4/8/162a560d0b7dfb84?w=1161&h=728&f=gif&s=1190874) + +离线只是它的一种功能表现而已,具体说来,它可以: +- 让我们的Web App在无网(offline)情况下可以访问,甚至使用部分功能,而不是展示“无网络连接”的错误页; +- 让我们在弱网的情况下,能使用缓存快速访问我们的应用,提升体验; +- 在正常的网络情况下,也可以通过各种自发控制的缓存方式来节省部分请求带宽; +- …… + +而这一切,其实都要归功于PWA背后的英雄 —— **Service Worker**。 + +那么,Service Worker是什么呢?你可以把Service Worker简单理解为一个独立于前端页面,在后台运行的进程。因此,它不会阻塞浏览器脚本的运行,同时也无法直接访问浏览器相关的API(例如:DOM、localStorage等)。此外,即使在离开你的Web App,甚至是关闭浏览器后,它仍然可以运行。它就像是一个在Web应用背后默默工作的勤劳小蜜蜂,处理着缓存、推送、通知与同步等工作。所以,要学习PWA,绕不开的就是Service Worker。 + +![PWA背后的英雄 —— Service Worker](https://user-gold-cdn.xitu.io/2018/4/8/162a560d0b6f194f?w=670&h=447&f=png&s=631884) + +在接下来的几篇文章里,我会从如何使用Service Worker来实现资源的缓存、消息的推送、消息的通知以及后台同步这几个角度,来介绍相关原理与技术实现。这些部分会是PWA技术的重点。需要特别注意的是,由于Service Worker所具有的强大能力,因此规范规定,**Service Worker只能运行在HTTPS域下**。然而我们开发时候没有HTTPS怎么办?别着急,还有一个贴心的地方——为方便本地开发,**Service Worker也可以运行在localhost(127.0.0.1)域下**。 + +好了,简单了解了Service Worker与它能实现的功能后,我们还是要回到这一篇的主题,也就是Service Worker的第一部分——如何利用Service Worker来实现前端资源的缓存,从而提升产品的访问速度,做到离线可用。 + +## 2. Service Worker是如何实现离线可用的? +这一小节会告诉大家,Service Worker是如何让我们在离线的情况下也能访问Web App的。当然,离线访问只是其中一种表现。 + +首先,我们想一下,当访问一个web网站时,我们实际上做了什么呢?总体上来说,我们通过与与服务器建立连接,获取资源,然后获取到的部分资源还会去请求新的资源(例如html中使用的css、js等)。所以,粗粒度来说,我们访问一个网站,就是在获取/访问这些资源。 + +可想而知,当处于离线或弱网环境时,我们无法有效访问这些资源,这就是制约我们的关键因素。因此,一个最直观的思路就是:如果我们把这些资源缓存起来,在某些情况下,将网络请求变为本地访问,这样是否能解决这一问题?是的。但这就需要我们有一个本地的cache,可以灵活地将各类资源进行本地存取。 + +![如何获取所需的资源?](https://user-gold-cdn.xitu.io/2018/4/8/162a560d0ba6b18b?w=567&h=219&f=png&s=7993) + +有了本地的cache还不够,我们还需要能够有效地使用缓存、更新缓存与清除缓存,进一步应用各种个性化的缓存策略。而这就需要我们有个能够控制缓存的“worker”——这也就是Service Worker的部分工作之一。顺便多说一句,可能有人还记得 [ApplicationCache](https://developer.mozilla.org/en-US/docs/Web/API/Window/applicationCache) 这个API。当初它的设计同样也是为了实现Web资源的缓存,然而就是因为不够灵活等各种缺陷,如今已被Service Worker与cache API所取代了。 + +Service Worker有一个非常重要的特性:你可以在Service Worker中监听所有客户端(Web)发出的请求,然后通过Service Worker来代理,向后端服务发起请求。通过监听用户请求信息,Service Worker可以决定是否使用缓存来作为Web请求的返回。 + +下图展示普通Web App与添加了Service Worker的Web App在网络请求上的差异: + +![普通Web请求(上)与使用Service Worker代理(下)的区别](https://user-gold-cdn.xitu.io/2018/4/8/162a560d0bdb6ed1?w=567&h=271&f=png&s=14952) + +这里需要强调一下,虽然图中好像将浏览器、SW(Service Worker)与后端服务三者并列放置了,但实际上浏览器(你的Web应用)和SW都是运行在你的本机上的,所以这个场景下的SW类似一个“客户端代理”。 + +了解了基本概念之后,就可以具体来看下,我们如何应用这个技术来实现一个离线可用的Web应用。 + +## 3. 如何使用Service Worker实现离线可用的“秒开”应用 +还记得我们之前的那个图书搜索的demo Web App么?不了解的朋友可以看下本系列的[第一篇文章](https://juejin.im/post/5ac8a67c5188255c5668b0b8),当然你可以忽略细节,继续往下了解技术原理。 + +没错,这次我仍然会基于它进行改造。在[上一篇添加了manifest](https://juejin.im/post/5ac8a89ef265da238440d60a)后,它已经拥有了自己的桌面图标,并有一个很像Native App的外壳;而今天,我会让它变得更酷。 + +> 如果想要跟着文章内容一起实践,可以在[这里下载到所需的全部代码](https://github.com/alienzhou/learning-pwa/tree/master)。 +记得切换到`manifest`分支,因为本篇内容,是基于上一篇的最终代码进行相应的开发与升级。毕竟我们的最终目标是将这个普通的“图书搜索”demo升级为PWA。 + +### 3.1. 注册Service Worker +注意,我们的应用始终应该是渐进可用的,在不支持Service Worker的环境下,也需要保证其可用性。要实现这点,可以通过特性检测,在index.js中来注册我们的Service Worker(sw.js): + +```javascript +// index.js +// 注册service worker,service worker脚本文件为sw.js +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('./sw.js').then(function () { + console.log('Service Worker 注册成功'); + }); +} +``` +这里我们将sw.js文件注册为一个Service Worker,注意文件的路径不要写错了。 + +值得一提的是,Service Worker的各类操作都被设计为异步,用以避免一些长时间的阻塞操作。这些API都是以Promise的形式来调用的。所以你会在接下来的各段代码中不断看到Promise的使用。如果你完全不了解Promise,可以先在这里了解基本的Promise概念:[Promise(MDN)](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise)和[JavaScript Promise:简介](https://developers.google.com/web/fundamentals/primers/promises)。 + +### 3.2. Service Worker的生命周期 +当我们注册了Service Worker后,它会经历生命周期的各个阶段,同时会触发相应的事件。整个生命周期包括了:installing --> installed --> activating --> activated --> redundant。当Service Worker安装(installed)完毕后,会触发install事件;而激活(activated)后,则会触发activate事件。 + +![Service Worker生命周期](https://user-gold-cdn.xitu.io/2018/4/8/162a560d0bdaf33b?w=579&h=867&f=png&s=39680) + +下面的例子监听了install事件: +```javascript +// 监听install事件 +self.addEventListener('install', function (e) { + console.log('Service Worker 状态: install'); +}); +``` +`self`是Service Worker中一个特殊的全局变量,类似于我们最常见的`window`对象。`self`引用了当前这个Service Worker。 + +### 3.3. 缓存静态资源 +通过上一节,我们已经学会了如何添加事件监听,来在合适的时机触发Service Worker的相应操作。现在,要使我们的Web App离线可用,就需要将所需资源缓存下来。我们需要一个资源列表,当Service Worker被激活时,会将该列表内的资源缓存进cache。 + +```javascript +// sw.js +var cacheName = 'bs-0-2-0'; +var cacheFiles = [ + '/', + './index.html', + './index.js', + './style.css', + './img/book.png', + './img/loading.svg' +]; + +// 监听install事件,安装完成后,进行文件缓存 +self.addEventListener('install', function (e) { + console.log('Service Worker 状态: install'); + var cacheOpenPromise = caches.open(cacheName).then(function (cache) { + return cache.addAll(cacheFiles); + }); + e.waitUntil(cacheOpenPromise); +}); +``` + +可以看到,首先在`cacheFiles`中我们列出了所有的静态资源依赖。注意其中的`'/'`,由于根路径也可以访问我们的应用,因此不要忘了将其也缓存下来。当Service Worker install时,我们就会通过`caches.open()`与`cache.addAll()`方法将资源缓存起来。这里我们给缓存起了一个`cacheName`,这个值会成为这些缓存的key。 + +上面这段代码中,`caches`是一个全局变量,通过它我们可以操作Cache相关接口。 + +> Cache 接口提供缓存的 Request / Response 对象对的存储机制。Cache 接口像 workers 一样, 是暴露在 window 作用域下的。尽管它被定义在 service worker 的标准中, 但是它不必一定要配合 service worker 使用。——MDN + +### 3.4 使用缓存的静态资源 +到目前为止,我们仅仅是注册了一个Service Worker,并在其install时缓存了一些静态资源。然而,如果这时运行这个demo你会发现——“图书搜索”这个Web App依然无法离线使用。 + +为什么呢?因为我们仅仅缓存了这些资源,然而浏览器并不知道需要如何使用它们;换言之,浏览器仍然会通过向服务器发送请求来等待并使用这些资源。那怎么办? + +聪明的你应该想起来了,我们在文章前半部分介绍Service Worker时提到了“客户端代理”——用Service Worker来帮我们决定如何使用缓存。 + +下图是一个简单的策略: + +![有cache时的静态资源请求流程](https://user-gold-cdn.xitu.io/2018/4/8/162a560d2d6b1798?w=567&h=284&f=png&s=19408) + +![无cache时的静态资源请求流程](https://user-gold-cdn.xitu.io/2018/4/8/162a560d30b47136?w=567&h=284&f=png&s=13705) + +1. 浏览器发起请求,请求各类静态资源(html/js/css/img); +1. Service Worker拦截浏览器请求,并查询当前cache; +1. 若存在cache则直接返回,结束; +1. 若不存在cache,则通过`fetch`方法向服务端发起请求,并返回请求结果给浏览器 + +```javascript +// sw.js +self.addEventListener('fetch', function (e) { + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); +}); +``` +`fetch`事件会监听所有浏览器的请求。`e.respondWith()`方法接受Promise作为参数,通过它让Service Worker向浏览器返回数据。`caches.match(e.request)`则可以查看当前的请求是否有一份本地缓存:如果有缓存,则直接向浏览器返回`cache`;否则Service Worker会向后端服务发起一个`fetch(e.request)`的请求,并将请求结果返回给浏览器。 + +到目前为止,运行我们的demo:当第一联网打开“图书搜索”Web App后,所依赖的静态资源就会被缓存在本地;以后再访问时,就会使用这些缓存而不发起网络请求。因此,即使在无网情况下,我们似乎依旧能“访问”该应用。 + +### 3.5. 更新静态缓存资源 +然而,如果你细心的话,会发现一个小问题:当我们将资源缓存后,除非注销(unregister)sw.js、手动清除缓存,否则新的静态资源将无法缓存。 + +解决这个问题的一个简单方法就是修改`cacheName`。由于浏览器判断sw.js是否更新是通过字节方式,因此修改`cacheName`会重新触发install并缓存资源。此外,在activate事件中,我们需要检查`cacheName`是否变化,如果变化则表示有了新的缓存资源,原有缓存需要删除。 + +```javascript +// sw.js +// 监听activate事件,激活后通过cache的key来判断是否更新cache中的静态资源 +self.addEventListener('activate', function (e) { + console.log('Service Worker 状态: activate'); + var cachePromise = caches.keys().then(function (keys) { + return Promise.all(keys.map(function (key) { + if (key !== cacheName) { + return caches.delete(key); + } + })); + }) + e.waitUntil(cachePromise); + return self.clients.claim(); +}); +``` + +### 3.6. 缓存API数据的“离线搜索” +到这里,我们的应用基本已经完成了离线访问的改造。但是,如果你注意到文章开头的图片就会发现,离线时我们不仅可以访问,还可以使用搜索功能。 + +![离线/无网环境下普通Web App(左)与PWA(右)的差异](https://user-gold-cdn.xitu.io/2018/4/8/162a560d5f79572c?w=1238&h=698&f=png&s=130127) + +这是怎么回事呢?其实这背后的秘密就在于,这个Web App也会把XHR请求的数据缓存一份。而再次请求时,我们会优先使用本地缓存(如果有缓存的话);然后向服务端请求数据,服务端返回数据后,基于该数据替换展示。大致过程如下: + +![图书查询接口的缓存与使用策略](https://user-gold-cdn.xitu.io/2018/4/8/162a560d35c15a67?w=567&h=266&f=png&s=16946) + +首先我们改造一下前一节的代码在sw.js的`fetch`事件里进行API数据的缓存 +```javascript +// sw.js +var apiCacheName = 'api-0-1-1'; +self.addEventListener('fetch', function (e) { + // 需要缓存的xhr请求 + var cacheRequestUrls = [ + '/book?' + ]; + console.log('现在正在请求:' + e.request.url); + + // 判断当前请求是否需要缓存 + var needCache = cacheRequestUrls.some(function (url) { + return e.request.url.indexOf(url) > -1; + }); + + /**** 这里是对XHR数据缓存的相关操作 ****/ + if (needCache) { + // 需要缓存 + // 使用fetch请求数据,并将请求结果clone一份缓存到cache + // 此部分缓存后在browser中使用全局变量caches获取 + caches.open(apiCacheName).then(function (cache) { + return fetch(e.request).then(function (response) { + cache.put(e.request.url, response.clone()); + return response; + }); + }); + } + /* ******************************* */ + + else { + // 非api请求,直接查询cache + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); + } +}); +``` +这里,我们也为API缓存的数据创建一个专门的缓存位置,key值为变量`apiCacheName`。在`fetch`事件中,我们首先通过对比当前请求与`cacheRequestUrls`来判断是否是需要缓存的XHR请求数据,如果是的话,就会使用`fetch`方法向后端发起请求。 + +在`fetch.then`中我们以请求的URL为key,向cache中更新了一份当前请求所返回数据的缓存:`cache.put(e.request.url, response.clone())`。这里使用`.clone()`方法拷贝一份响应数据,这样我们就可以对响应缓存进行各类操作而不用担心原响应信息被修改了。 + +### 3.7. 应用离线XHR数据,完成“离线搜索”,提升响应速度 +如果你跟着做到了这一步,那么恭喜你,距离我们酷酷的离线应用还差最后一步了! + +目前为止,我们对Service Worker(sw.js)的改造已经完毕了。最后只剩下如何在XHR请求时有策略的使用缓存了,这一部分的改造全部集中于index.js,也就是我们的前端脚本。 + +还是回到上一节的这张图: + +![图书查询接口的缓存与使用策略](https://user-gold-cdn.xitu.io/2018/4/8/162a560d35c15a67?w=567&h=266&f=png&s=16946) + +和普通情况不同,这里我们的前端浏览器会首先去尝试获取缓存数据并使用其来渲染界面;同时,浏览器也会发起一个XHR请求,Service Worker通过将请求返回的数据更新到存储中的同时向前端Web应用返回数据(这一步分就是上一节提到的缓存策略);最终,如果判断返回的数据与最开始取到的cache不一致,则重新渲染界面,否则忽略。 + +为了是代码更清晰,我们将原本的XHR请求部分单独剥离出来,作为一个方法`getApiDataRemote()`以供调用,同时将其改造为了Promise。为了节省篇幅,我部分的代码比较简单,就不单独贴出了。 + +这一节最重要的部分其实是读取缓存。我们知道,在Service Worker中是可以通过`caches`变量来访问到缓存对象的。令人高兴的是,在我们的前端应用中,也仍然可以通过`caches`来访问缓存。当然,为了保证渐进可用,我们需要先进行判断`'caches' in window`。为了代码的统一,我将获取该请求的缓存数据也封装成了一个Promise方法: + +```javascript +function getApiDataFromCache(url) { + if ('caches' in window) { + return caches.match(url).then(function (cache) { + if (!cache) { + return; + } + return cache.json(); + }); + } + else { + return Promise.resolve(); + } +} +``` +而原本我们在`queryBook()`方法中,我们会请求后端数据,然后渲染页面;而现在,我们加上基于缓存的渲染: +```javascript +function queryBook() { + // …… + // 远程请求 + var remotePromise = getApiDataRemote(url); + var cacheData; + // 首先使用缓存数据渲染 + getApiDataFromCache(url).then(function (data) { + if (data) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + cacheData = data || {}; + return remotePromise; + }).then(function (data) { + if (JSON.stringify(data) !== JSON.stringify(cacheData)) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + }); + // …… +} +``` +如果`getApiDataFromCache(url).then`返回缓存数据,则使用它先进行渲染。而当`remotePromise`的数据返回时,与`cacheData`进行比对,只有在数据不一致时需要重新渲染页面(注意这里为了简便,粗略地使用了`JSON.stringify()`方法进行对象间的比较)。这么做有两个优势: + +1. 离线可用。如果我们之前访问过某些URL,那么即使在离线的情况下,重复相应的操作依然可以正常展示页面; +2. 优化体验,提高访问速度。读取本地cache耗时相比于网络请求是非常低的,因此就会给我们的用户一种“秒开”、“秒响应”的感觉。 + +## 4. 使用Lighthouse测试我们的应用 +至此,我们完成了PWA的两大基本功能:Web App Manifest和Service Worker的离线缓存。这两大功能可以很好地提升用户体验与应用性能。我们用Chrome中的Lighthouse来检测一下目前的应用: + +![Lighthouse检测结果](https://user-gold-cdn.xitu.io/2018/4/8/162a560d5f48ee00?w=724&h=130&f=png&s=22130) + +![Lighthouse检测结果 - PWA](https://user-gold-cdn.xitu.io/2018/4/8/162a560d65ba5c20?w=723&h=224&f=png&s=27543) + +可以看到,在PWA评分上,我们的这个Web App已经非常不错了。其中唯一个扣分项是在HTTPS协议上:由于是本地调试,所以使用了http://127.0.0.1:8085,在生产肯定会替换为HTTPS。 + +## 5. 这太酷了,但是兼容性呢? +随着今年(2018年)年初,Apple在iOS 11.3中开始支持Service Worker,加上Apple一直以来较为良好的系统升级率,整个PWA在兼容性问题上有了重大的突破。 + +虽然Service Worker中的一些其他功能(例如推送、后台同步)Apple并未表态,但是Web App Manifest和Service Worker的离线缓存是iOS 11.3所支持的。这两大核心功能不仅效果拔群,而且目前看来具有还不错的兼容性,非常适合投入生产。 + +更何况,作为渐进式网页应用,其最重要的一个特点就是在兼容性支持时自动升级功能与体验;而在不支持时,会静默回退部分新功能。在保证我们的正常服务情况下,尽可能利用浏览器特性,提供更优质的服务。 + +![Service Worker兼容性](https://user-gold-cdn.xitu.io/2018/4/8/162a560d66590ff7?w=1240&h=473&f=png&s=133285) + +## 6. 写在最后 +本文中所有的代码示例均可以在[learn-pwa/sw-cache](https://github.com/alienzhou/learning-pwa/tree/sw-cache)上找到。注意在git clone之后,切换到sw-cache分支,本文所有的代码均存在于该分支上。切换其他分值可以看到不同的版本: +- basic分支:基础项目demo,一个普通的图书搜索应用(网站); +- manifest分支:基于basic分支,添加manifest等功能,具体可以看[上一篇文章](https://juejin.im/post/5ac8a89ef265da238440d60a)了解; +- sw-cache分支:基于manifest分支,添加缓存与离线功能; +- master分支:应用的最新代码。 + +如果你喜欢或想要了解更多的PWA相关知识,欢迎关注我,关注[《PWA学习与实践》](https://juejin.im/user/59ad5377518825244d206d2d/posts)系列文章。我会总结整理自己学习PWA过程的遇到的疑问与技术点,并通过实际代码和大家一起实践。 + +> 最后声明一下,文中的代码作为demo,主要是用于了解与学习PWA技术原理,可能会存在一些不完善的地方,因此,不建议直接使用到生产环境。 + +## 参考资料 +- [Using Service Workers(MDN)](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers) +- [Cache(MDN)](https://developer.mozilla.org/zh-CN/docs/Web/API/Cache) +- [Service Worker使用方式](https://developers.google.com/web/fundamentals/primers/service-workers/) +- [JavaScript Promise:简介](https://developers.google.com/web/fundamentals/primers/promises) +- [Promise(MDN)](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise) \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/app.js b/09-PWA/study2/03-service-worker/app.js new file mode 100755 index 000000000..04e5277e4 --- /dev/null +++ b/09-PWA/study2/03-service-worker/app.js @@ -0,0 +1,103 @@ +const util = require('./util'); +const http = require('http'); +const Koa = require('koa'); +const serve = require('koa-static'); +const Router = require('koa-router'); +const koaBody = require('koa-body'); +const webpush = require('web-push'); + +const port = process.env.PORT || 8085; +const app = new Koa(); +const router = new Router(); + +/** + * 根据关键词获取图书信息 + */ +router.get('/book', async (ctx, next) => { + let query = ctx.request.query; + let {q, fields} = query; + let url = `https://api.douban.com/v2/book/search?q=${q}&fields=${fields}&count=10`; + let res = await util.get(url); + ctx.response.body = res; +}); + +/* ===================== */ +/* 使用web-push进行消息推送 */ +/* ===================== */ +const options={ + proxy: 'http://localhost:1087', +}; + +/** + * VAPID值 + */ +const vapidKeys = { + publicKey: 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A', + privateKey: 'TVe_nJlciDOn130gFyFYP8UiGxxWd3QdH6C5axXpSgM' +}; + +// 设置web-push的VAPID值 +webpush.setVapidDetails( + 'mailto:alienzhou16@163.com', + vapidKeys.publicKey, + vapidKeys.privateKey +); + +/** + * 提交subscription信息,并保存 + */ +router.post('/subscription', koaBody(), async ctx => { + let body = ctx.request.body; + await util.saveRecord(body); + ctx.response.body = { + status: 0 + }; +}); + + +/** + * 向push service推送信息 + * @param {*} subscription + * @param {*} data + */ +function pushMessage(subscription, data = {}) { + webpush.sendNotification(subscription, data, options).then(data => { + console.log('push service的相应数据:', JSON.stringify(data)); + return; + }).catch(err => { + // 判断状态码,440和410表示失效 + if (err.statusCode === 410 || err.statusCode === 404) { + return util.remove(subscription); + } + else { + console.log(subscription); + console.log(err); + } + }) +} + +/** + * 消息推送API,可以在管理后台进行调用 + * 本例子中,可以直接post一个请求来查看效果 + */ +router.post('/push', koaBody(), async ctx => { + let payload = ctx.request.body; + let list = await util.findAll(); + let status = list.length > 0 ? 0 : -1; + + for (let i = 0; i < list.length; i++) { + let subscription = list[i]; + pushMessage(subscription, JSON.stringify(payload)); + } + + ctx.response.body = { + status + }; +}); +/* ===================== */ + +app.use(router.routes()); +app.use(serve(__dirname + '/public')); +app.listen(port, () => { + console.log(`listen on port: ${port}`); +}); \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/package.json b/09-PWA/study2/03-service-worker/package.json new file mode 100755 index 000000000..3fcd83595 --- /dev/null +++ b/09-PWA/study2/03-service-worker/package.json @@ -0,0 +1,47 @@ +{ + "name": "learning-pwa", + "version": "0.1.0", + "description": "some samples and blogs about how to start with your first PWA", + "main": "app.js", + "scripts": { + "start": "node app.js", + "release": "standard-version", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/alienzhou/learning-pwa.git" + }, + "keywords": [ + "PWA", + "koa", + "sample" + ], + "author": "alienzhou", + "license": "ISC", + "bugs": { + "url": "https://github.com/alienzhou/learning-pwa/issues" + }, + "homepage": "https://github.com/alienzhou/learning-pwa#readme", + "dependencies": { + "https-proxy-agent": "^2.2.1", + "koa": "^2.5.0", + "koa-body": "^2.5.0", + "koa-router": "^7.4.0", + "koa-static": "^4.0.2", + "nedb": "^1.8.0", + "request": "^2.85.0", + "web-push": "^3.3.0" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -e $GIT_PARAMS" + } + }, + "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "husky": "^0.15.0-rc.13", + "standard-version": "^4.3.0" + } +} diff --git a/09-PWA/study2/03-service-worker/public/base64util.js b/09-PWA/study2/03-service-worker/public/base64util.js new file mode 100755 index 000000000..801c8915c --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/base64util.js @@ -0,0 +1,19 @@ +/** + * 将base64的公钥字符串转为Unit8Array + * base64的相关操作,具体可以参考 + * https://github.com/web-push-libs/web-push#using-vapid-key-for-applicationserverkey + */ +window.urlBase64ToUint8Array = function (base64String) { + const padding = '='.repeat((4 - base64String.length % 4) % 4); + const base64 = (base64String + padding) + .replace(/\-/g, '+') + .replace(/_/g, '/'); + + const rawData = window.atob(base64); + const outputArray = new Uint8Array(rawData.length); + + for (let i = 0; i < rawData.length; ++i) { + outputArray[i] = rawData.charCodeAt(i); + } + return outputArray; +} \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/img/book.png b/09-PWA/study2/03-service-worker/public/img/book.png new file mode 100755 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/book.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-128.png b/09-PWA/study2/03-service-worker/public/img/icons/book-128.png new file mode 100755 index 000000000..744f006ff Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-128.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-144.png b/09-PWA/study2/03-service-worker/public/img/icons/book-144.png new file mode 100755 index 000000000..d03af1c14 Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-144.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-192.png b/09-PWA/study2/03-service-worker/public/img/icons/book-192.png new file mode 100755 index 000000000..a1c04b208 Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-192.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-256.png b/09-PWA/study2/03-service-worker/public/img/icons/book-256.png new file mode 100755 index 000000000..ad4789069 Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-256.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-32.png b/09-PWA/study2/03-service-worker/public/img/icons/book-32.png new file mode 100755 index 000000000..2fa6a9faf Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-32.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-512.png b/09-PWA/study2/03-service-worker/public/img/icons/book-512.png new file mode 100755 index 000000000..bb5b0f380 Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-512.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/icons/book-72.png b/09-PWA/study2/03-service-worker/public/img/icons/book-72.png new file mode 100755 index 000000000..e04b29572 Binary files /dev/null and b/09-PWA/study2/03-service-worker/public/img/icons/book-72.png differ diff --git a/09-PWA/study2/03-service-worker/public/img/loading.svg b/09-PWA/study2/03-service-worker/public/img/loading.svg new file mode 100755 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/index.html b/09-PWA/study2/03-service-worker/public/index.html new file mode 100755 index 000000000..ec94bd838 --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/index.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + PWA: 电影搜索 + + +
        + + + +
        +
        +
        +
        +
          + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
          + + + + + \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/index.js b/09-PWA/study2/03-service-worker/public/index.js new file mode 100755 index 000000000..9a9df6d8f --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/index.js @@ -0,0 +1,266 @@ +(function() { + /** + * 生成列表卡片(dom元素) + * @param {Object} movie 相关数据 + */ + function createCard(movie) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var genres = document.createElement('div'); + var desc = document.createElement('div'); + var casts = document.createElement('span'); + title.className = 'title'; + genres.className = 'genres'; + desc.className = 'desc'; + // img.src = movie.image; + title.innerText = movie.title; + genres.innerText = movie.genres.join(', '); + casts.innerText = movie.casts.map((ele) => { return ele.name }).join(','); + movie.casts && desc.appendChild(casts); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(genres); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成展示列表 + * @param {Array} list 列表数据 + */ + function fillList(list) { + list.forEach(function (movie) { + var node = createCard(movie); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryMovie() { + // var input = document.querySelector('#js-search-input'); + // var query = input.value; + // var url = `https://api.douban.com/v2/movie/search?q=${query}&fields=id,title,image,author,publisher,price&count=10` + // $.ajax({ + // contentType: "application/x-www-form-urlencoded;charset=UTF-8", + // type : "post", + // url : url, + // cache : false, //默认值true + // dataType : "jsonp", + // jsonp: "callback", // 必须,返回的响应需要以此为前缀 + // success : function(data){ + // tip(); + // if (data.subjects.length === 0) { + // tip('无结果'); + // } + // else { + // input.blur(); + // fillList(data.subjects); + // document.querySelector('#js-thanks').style = 'display: block'; + // } + // } + // }); + var input = document.querySelector('#js-search-input'); + var query = input.value; + var xhr = new XMLHttpRequest(); + var url = '/movie?q=' + query + '&fields=id,title,image,author,publisher,price'; + var cacheData; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + var remotePromise = getApiDataRemote(url); + // 策略:优先读缓存,同时获取远程数据,如果远程数据和本地不同,更新 + getApiDataFromCache(url).then(function (data) { + if (data) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + cacheData = data || {}; + return remotePromise; + }).then(function (data) { + if (JSON.stringify(data) !== JSON.stringify(cacheData)) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + }); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryMovie(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryMovie(); + } + }); + + /** + * 获取该请求的缓存数据 + * @param {string} url 请求的url + * @return {Promise} + */ + function getApiDataFromCache(url) { + if ('caches' in window) { + return caches.match(url).then(function (cache) { + if (!cache) { + return; + } + return cache.json(); + }); + } + else { + return Promise.resolve(); + } + } + + function getApiDataRemote(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('GET', url, true); + xhr.send(null); + }); + } + + /* ========================== */ + /* service worker push相关部分 */ + /* ========================== */ + /** + * 将service worker的注册封装为一个方法,方便使用 + * @param {string} file service worker文件路径 + * @return {Promise} + */ + function registerServiceWorker(file) { + return navigator.serviceWorker.register(file); + } + + /** + * 用户订阅相关的push信息,用来发起订阅 + * 会生成对应的pushSubscription数据,用于标识用户与安全验证 + * @param {ServiceWorker Registration} registration + * @param {string} publicKey 公钥 + * @return {Promise} + */ + function subscribeUserToPush(registration, publicKey) { + var subscribeOptions = { + userVisibleOnly: true, // 显性提醒 + applicationServerKey: window.urlBase64ToUint8Array(publicKey) + }; + return registration.pushManager.subscribe(subscribeOptions).then(function (pushSubscription) { + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return pushSubscription; + }); + } + + /** + * 将浏览器生成的subscription信息提交到服务端 + * 服务端保存该信息用于向特定的客户端用户推送 + * 普通的XHR请求,会向接口post订阅信息 + * @param {string} body 请求体 + * @param {string} url 提交的api路径,默认为/subscription + * @return {Promise} + */ + function sendSubscriptionToServer(body, url) { + url = url || '/subscription'; + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('POST', url, true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(body); + }); + } + + if ('serviceWorker' in navigator && 'PushManager' in window) { + var publicKey = 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A'; + // 注册service worker + registerServiceWorker('./sw.js').then(function (registration) { + // 安装完成后触发 + console.log('02 - Service Worker 注册成功'); + // 开启该客户端的消息推送订阅功能 + return subscribeUserToPush(registration, publicKey); + }).then(function (subscription) { + console.log('将生成的客户端订阅信息存储在自己的服务器上'); + // 将生成的客户端订阅信息存储在自己的服务器上 + var body = {subscription: subscription}; + // 为了方便之后的推送,为每个客户端简单生成一个标识 + body.uniqueid = new Date().getTime(); + console.log('uniqueid', body.uniqueid); + // 将生成的客户端订阅信息存储在自己的服务器上 + return sendSubscriptionToServer(JSON.stringify(body)); + }).then(function (res) { + console.log(res); + }).catch(function (err) { + console.log(err); + }); + } + /* ========================== */ +})(); \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/manifest.json b/09-PWA/study2/03-service-worker/public/manifest.json new file mode 100755 index 000000000..cd0b0e4e8 --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/manifest.json @@ -0,0 +1,39 @@ +{ + "name": "电影搜索", + "short_name": "影查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索电影的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/style.css b/09-PWA/study2/03-service-worker/public/style.css new file mode 100755 index 000000000..09e690f3e --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/style.css @@ -0,0 +1,143 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .author { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/public/sw.js b/09-PWA/study2/03-service-worker/public/sw.js new file mode 100755 index 000000000..d508758c5 --- /dev/null +++ b/09-PWA/study2/03-service-worker/public/sw.js @@ -0,0 +1,98 @@ +/** + * service worker + */ +var cacheName = 'cache-v1'; +var apiCacheName = 'api-v1'; +var cacheFiles = [ + '/', + './index.html', + './base64util.js', + './index.js', + './style.css', + './img/book.png', + './img/loading.svg', + 'https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js' +]; + +// 监听install事件,安装完成后,进行文件缓存 +self.addEventListener('install', function (e) { + // 安装时首先触发 + console.log('01 - Service Worker 状态: install'); + var cacheOpenPromise = caches.open(cacheName).then(function (cache) { + return cache.addAll(cacheFiles); + }); + e.waitUntil(cacheOpenPromise); +}); + +// 监听activate事件,激活后通过cache的key来判断是否更新cache中的静态资源 +self.addEventListener('activate', function (e) { + console.log('03 - Service Worker 状态: activate'); + var cachePromise = caches.keys().then(function (keys) { + return Promise.all(keys.map(function (key) { + if (key !== cacheName && key !== apiCacheName) { + // 删除旧的cache + return caches.delete(key); + } + })); + }) + e.waitUntil(cachePromise); + // 注意不能忽略这行代码,否则第一次加载会导致fetch事件不触发 + return self.clients.claim(); +}); + +// 监听请求 +self.addEventListener('fetch', function (e) { + // 是否是需要缓存的XHR请求数据 + var cacheRequestUrls = [ + '/movie' + ]; + console.log('现在正在请求:' + e.request.url); + // 判断当前请求是否需要缓存 + var needCache = cacheRequestUrls.some(function (url) { + return e.request.url.indexOf(url) > -1; + }); + if (needCache) { + // 需要缓存 + // 使用fetch请求数据,并将请求结果clone一份缓存到cache + // 此部分缓存后在browser中使用全局变量caches获取 + caches.open(apiCacheName).then(function (cache) { + return fetch(e.request).then(function (response) { + cache.put(e.request.url, response.clone()); + return response; + }); + }); + } else { + // 非api请求,直接查询cache + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); + } +}); + +/* ============== */ +/* push处理相关部分 */ +/* ============== +浏览器发起订阅,并将订阅信息发送至后端; +将订阅信息保存在服务端,以便今后推送使用; +服务端推送消息,向Push Service发起请求; +浏览器接收Push信息并处理。 +*/ +// 添加service worker对push的监听 +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + self.registration.showNotification(data.text); + } + else { + console.log('push没有任何数据'); + } +}); +/* ============== */ \ No newline at end of file diff --git a/09-PWA/study2/03-service-worker/util.js b/09-PWA/study2/03-service-worker/util.js new file mode 100755 index 000000000..101d6dd6e --- /dev/null +++ b/09-PWA/study2/03-service-worker/util.js @@ -0,0 +1,76 @@ +const request = require('request'); +const Datastore = require('nedb'); + +const db = new Datastore(); + +module.exports.get = function (url, opt = {}) { + return new Promise((r, j) => { + request.get(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.post = function (url, opt = {}) { + return new Promise((r, j) => { + request.post(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.saveRecord = function (obj) { + return new Promise((r, j) => { + db.findOne(obj, (err, res) => { + if (err) { + j(err); + return; + } + if (res) { + console.log('已存在'); + r(obj); + return; + } + db.insert(obj, (err, item) => { + if (err) { + j(err); + return; + } + console.log('存储完毕'); + r(obj); + }); + }); + }); +}; + +module.exports.findAll = function () { + return new Promise((r, j) => { + db.find({}, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.remove = function (obj) { + return new Promise((r, j) => { + db.remove(obj, {multi: true}, (err, num) => { + if (err) { + j(err); + return; + } + r(num); + }); + }); +}; \ No newline at end of file diff --git a/09-PWA/study2/04-push/.commitlintrc.js b/09-PWA/study2/04-push/.commitlintrc.js new file mode 100755 index 000000000..be2a5fd98 --- /dev/null +++ b/09-PWA/study2/04-push/.commitlintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: [ + '@commitlint/config-conventional' + ], + rules: { + } +}; \ No newline at end of file diff --git a/09-PWA/study2/04-push/.gitignore b/09-PWA/study2/04-push/.gitignore new file mode 100755 index 000000000..564309e28 --- /dev/null +++ b/09-PWA/study2/04-push/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +.vscode/ +package-lock.json \ No newline at end of file diff --git a/09-PWA/study2/04-push/README.md b/09-PWA/study2/04-push/README.md new file mode 100755 index 000000000..e6b5aee75 --- /dev/null +++ b/09-PWA/study2/04-push/README.md @@ -0,0 +1,350 @@ +## 1. 引言 +在之前的几篇文章中,我和大家分享了如何使用manifest(以及meta标签)让你的Web App更加“native”;以及如何使用Service Worker来cache资源,加速Web App的访问速度,提供部分离线功能。在接下来的内容里,我们会探究PWA中的另一个重要功能——消息推送与提醒(Push & Notification)。这个能力让我们可以从服务端向用户推送各类消息并引导用户触发相应交互。 + +![Web Push效果](https://user-gold-cdn.xitu.io/2018/4/13/162bc97ba69e1679?w=1284&h=746&f=gif&s=1843125) + +实际上,消息推送与提醒是两个功能——Push API 和 Notification API。为了大家能够更好理解其中的相关技术,我也会分为Push(推送消息)与Notification(展示提醒)两部分来介绍。在这一篇里,我们先来学习如何使用Push API进行消息推送。 + +> Push API 和 Notification API其实是两个独立的技术,完全可以分开使用;不过Push API 和 Notification API相结合是一个常见的模式。 + +## 2. 浏览器是如何实现服务器消息Push的 +Web Push的整个流程相较之前的内容来说有些复杂。因此,在进入具体技术细节之前,我们需要先了解一下整个Push的基本流程与相关概念。 + +如果你对Push完全不了解,可能会认为,Push是我们的服务端直接与浏览器进行交互,使用长连接、WebSocket或是其他技术手段来向客户端推送消息。然而,这里的Web Push并非如此,它其实是一个三方交互的过程。 + +在Push中登场的三个重要“角色”分别是: +- 浏览器:就是我们的客户端 +- Push Service:专门的Push服务,你可以认为是一个第三方服务,目前chrome与firefox都有自己的Push Service Service。理论上只要浏览器支持,可以使用任意的Push Service +- 后端服务:这里就是指我们自己的后端服务 + +下面就介绍一下这三者在Web Push中是如何交互。 + +### 2.1. 消息推送流程 +下图来自[Web Push协议草案](https://tools.ietf.org/html/draft-ietf-webpush-protocol-12),是Web Push的整个流程: + +``` + +-------+ +--------------+ +-------------+ + | UA | | Push Service | | Application | + +-------+ +--------------+ | Server | + | | +-------------+ + | Subscribe | | + |--------------------->| | + | Monitor | | + |<====================>| | + | | | + | Distribute Push Resource | + |-------------------------------------------->| + | | | + : : : + | | Push Message | + | Push Message |<---------------------| + |<---------------------| | + | | | +``` + +该时序图表明了Web Push的各个步骤,我们可以将其分为订阅(subscribe)与推送(push)两部分来看。 + +- **subscribe**,首先是订阅: + 1. Ask Permission:这一步不再上图的流程中,这其实是浏览器中的策略。浏览器会询问用户是否允许通知,只有在用户允许后,才能进行后面的操作。 + 1. Subscribe:浏览器(客户端)需要向Push Service发起订阅(subscribe),订阅后会得到一个[`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)对象 + 2. Monitor:订阅操作会和Push Service进行通信,生成相应的订阅信息,Push Service会维护相应信息,并基于此保持与客户端的联系; + 3. Distribute Push Resource:浏览器订阅完成后,会获取订阅的相关信息(存在于`PushSubscription`对象中),我们需要将这些信息发送到自己的服务端,在服务端进行保存。 + +![](https://user-gold-cdn.xitu.io/2018/4/12/162ba587f2a42eca?w=832&h=207&f=png&s=28689) + +- **Push Message**,然后是推送: + 1. Push Message阶段一:我们的服务端需要推送消息时,不直接和客户端交互,而是通过Web Push协议,将相关信息通知Push Service; + 2. Push Message阶段二:Push Service收到消息,通过校验后,基于其维护的客户端信息,将消息推送给订阅了的客户端; + 3. 最后,客户端收到消息,完成整个推送过程。 + +![](https://user-gold-cdn.xitu.io/2018/4/12/162ba59261481104?w=817&h=218&f=png&s=31789) + +### 2.2. 什么是Push Service +在上面的Push流程中,出现了一个比较少接触到的角色:Push Service。那么什么是Push Service呢? + +> A push service receives a network request, validates it and delivers a push message to the appropriate browser. + +Push Service可以接收网络请求,校验该请求并将其推送给合适的浏览器客户端。Push Service还有一个非常重要的功能:当用户离线时,可以帮我们保存消息队列,直到用户联网后再发送给他们。 + +目前,不同的浏览器厂商使用了不同的Push Service。例如,chrome使用了google自家的FCM(前身为GCM),firefox也是使用自家的服务。那么我们是否需要写不同的代码来兼容不同的浏览器所使用的服务呢?答案是并不用。Push Service遵循[Web Push Protocol](https://tools.ietf.org/html/draft-ietf-webpush-protocol-12),其规定了请求及其处理的各种细节,这就保证了,不同的Push Service也会具有标准的调用方式。 + +这里再提一点:我们在上一节中说了Push的标准流程,其中第一步就是浏览器发起订阅,生成一个`PushSubscription`对。Push Service会为每个发起订阅的浏览器生成一个唯一的URL,这样,我们在服务端推送消息时,向这个URL进行推送后,Push Service就会知道要通知哪个浏览器。而这个URL信息也在`PushSubscription`对象里,叫做`endpoint`。 + +![](https://user-gold-cdn.xitu.io/2018/4/14/162bfd2d499ba656?w=1408&h=300&f=png&s=86505) + +那么,如果我们知道了`endpoint`的值,是否就代表我们可以向客户端推送消息了呢?并非如此。下面会简单介绍一下Web Push中的安全策略。 + +### 2.3. 如何保证Push的安全性 +在Web Push中,为了保证客户端只会收到其订阅的服务端推送的消息(其他的服务端即使在拿到`endpoint`也无法推送消息),需要对推送信息进行数字签名。该过程大致如下: + +在Web Push中会有一对公钥与私钥。客户端持有公钥,而服务端持有私钥。客户端在订阅时,会将公钥发送给Push Service,而Push Service会将该公钥与相应的`endpoint`维护起来。而当服务端要推送消息时,会使用私钥对发送的数据进行数字签名,并根据数字签名生成一个叫】`Authorization`请求头。Push Service收到请求后,根据`endpoint`取到公钥,对数字签名解密验证,如果信息相符则表明该请求是通过对应的私钥加密而成,也表明该请求来自浏览器所订阅的服务端。反之亦然。 + +![](https://user-gold-cdn.xitu.io/2018/4/12/162ba68f0d4a5861?w=998&h=441&f=png&s=83966) + +而公钥与私钥如何生成,会在第三部分的实例中讲解。 + +## 3. 如何使用Push API来推送向用户推送信息 +到这里,我们已经基本了解了Web Push的流程。光说不练假把式,下面我就通过具体代码来说明如何使用Web Push。 + +这部分会基于[sw-cache](https://github.com/alienzhou/learning-pwa/tree/sw-cache)分支上的代码,继续增强我们的“图书搜索”WebApp。 + +为了使文章与代码更清晰,将Web Push分为这几个部分: +1. 浏览器发起订阅,并将订阅信息发送至后端; +2. 将订阅信息保存在服务端,以便今后推送使用; +3. 服务端推送消息,向Push Service发起请求; +4. 浏览器接收Push信息并处理。 + +> 友情提醒:由于Chrome所依赖的Push Service——FCM在国内不可访问,所以要正常运行demo中的代码需要“梯子”,或者可以选择Firefox来进行测试。 + +### 3.1. 浏览器(客户端)生成subscription信息 +首先,我们需要使用`PushManager`的`subscribe`方法来在浏览器中进行订阅。 + +在[《让你的WebApp离线可用》](https://juejin.im/post/5aca14b6f265da237c692e6f)中我们已经知道了如何注册Service Worker。当我们注册完Service Worker后会得到一个`Registration`对象,通过调用`Registration`对象的`registration.pushManager.subscribe()`方法可以发起订阅。 + +为了使代码更清晰,本篇demo在之前的基础上,先抽离出Service Worker的注册方法: + +```javascript +// index.js +function registerServiceWorker(file) { + return navigator.serviceWorker.register(file); +} +``` + +然后定义了`subscribeUserToPush()`方法来发起订阅: + +```javascript +// index.js +function subscribeUserToPush(registration, publicKey) { + var subscribeOptions = { + userVisibleOnly: true, + applicationServerKey: window.urlBase64ToUint8Array(publicKey) + }; + return registration.pushManager.subscribe(subscribeOptions).then(function (pushSubscription) { + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return pushSubscription; + }); +} + +``` + +这里使用了`registration.pushManager.subscribe()`方法中的两个配置参数:`userVisibleOnly`和`applicationServerKey`。 + +- `userVisibleOnly`表明该推送是否需要显性地展示给用户,即推送时是否会有消息提醒。如果没有消息提醒就表明是进行“静默”推送。在Chrome中,必须要将其设置为`true`,否则浏览器就会在控制台报错: + +![userVisibleOnly不为true时的报错信息](https://user-gold-cdn.xitu.io/2018/4/13/162ba99a6b69af03?w=1458&h=120&f=png&s=58047) + +- `applicationServerKey`是一个客户端的公钥,[VAPID](https://tools.ietf.org/html/draft-thomson-webpush-vapid-02)定义了其规范,因此也可以称为VAPID keys。如果你还记得2.3中提到的安全策略,应该对这个公钥不陌生。该参数需要Unit8Array类型。因此定义了一个[`urlBase64ToUint8Array`](https://github.com/alienzhou/learning-pwa/blob/push/public/base64util.js)方法将base64的公钥字符串转为Unit8Array。`subscribe()`也是一个Promise方法,在then中我们可以得到订阅的相关信息——一个`PushSubscription`对象。下图展示了这个对象中的一些信息。注意其中的`endpoint`,Push Service会为每个客户端随机生成一个不同的值. + +![PushSubscription信息](https://user-gold-cdn.xitu.io/2018/4/14/162bfd2d499ba656?w=1408&h=300&f=png&s=86505) + +之后,我们再将`PushSubscription`信息发送到后端。这里定义了一个`sendSubscriptionToServer()`方法,该方法就是一个普通的XHR请求,会向接口post订阅信息,为了节约篇幅就不列出具体代码了。 + +最后,将这一系列方法组合在一起。当然,使用Web Push前,还是需要进行特性检测`'PushManager' in window`。 + +```javascript +// index.js +if ('serviceWorker' in navigator && 'PushManager' in window) { + var publicKey = 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A'; + // 注册service worker + registerServiceWorker('./sw.js').then(function (registration) { + console.log('Service Worker 注册成功'); + // 开启该客户端的消息推送订阅功能 + return subscribeUserToPush(registration, publicKey); + }).then(function (subscription) { + var body = {subscription: subscription}; + // 为了方便之后的推送,为每个客户端简单生成一个标识 + body.uniqueid = new Date().getTime(); + console.log('uniqueid', body.uniqueid); + // 将生成的客户端订阅信息存储在自己的服务器上 + return sendSubscriptionToServer(JSON.stringify(body)); + }).then(function (res) { + console.log(res); + }).catch(function (err) { + console.log(err); + }); +} +``` + +注意,这里为了方便我们后面的推送,为每个客户端生成了一个唯一ID`uniqueid`,这里使用了时间戳生成简单的`uniqueid`。 + +此外,由于`userVisibleOnly`为`true`,所以需要用户授权开启通知权限,因此我们会看到下面的提示框,选择“允许”即可。你可以在设置中进行通知的管理。 + +![](https://user-gold-cdn.xitu.io/2018/4/12/162ba85304cba1f5?w=724&h=340&f=png&s=39311) + +### 3.2. 服务端存储客户端subscription信息 +为了存储浏览器post来的订阅信息,服务端需要增加一个接口`/subscription`,同时添加中间件`koa-body`用于处理body + +```javascript +// app.js +const koaBody = require('koa-body'); +/** + * 提交subscription信息,并保存 + */ +router.post('/subscription', koaBody(), async ctx => { + let body = ctx.request.body; + await util.saveRecord(body); + ctx.response.body = { + status: 0 + }; +}); +``` + +接收到subscription信息后,需要在服务端进行保存,你可使用任何方式来保存它:mysql、redis、mongodb……这里为了方便,我使用了[nedb](https://github.com/louischatriot/nedb)来进行简单的存储。nedb不需要部署安装,可以将数据存储在内存中,也可以持久化,nedb的api和mongodb也比较类似。 + +这里`util.saveRecord()`做了这些工作:首先,查询`subscription`信息是否存在,若已存在则只更新`uniqueid`;否则,直接进行存储。 + +至此,我们就将客户端的订阅信息存储完毕了。现在,就可以等待今后推送时使用。 + +### 3.3. 使用subscription信息推送信息 +在实际中,我们一般会给运营或产品同学提供一个推送配置后台。可以选择相应的客户端,填写推送信息,并发起推送。为了简单起见,我并没有写一个推送配置后台,而只提供了一个post接口`/push`来提交推送信息。后期我们完全可以开发相应的推送后台来调用该接口。 + +```javascript +// app.js +/** + * 消息推送API,可以在管理后台进行调用 + * 本例子中,可以直接post一个请求来查看效果 + */ +router.post('/push', koaBody(), async ctx => { + let {uniqueid, payload} = ctx.request.body; + let list = uniqueid ? await util.find({uniqueid}) : await util.findAll(); + let status = list.length > 0 ? 0 : -1; + + for (let i = 0; i < list.length; i++) { + let subscription = list[i].subscription; + pushMessage(subscription, JSON.stringify(payload)); + } + + ctx.response.body = { + status + }; +}); +``` + +来看一下`/push`接口。 + +1. 首先,根据post的参数不同,我们可以通过`uniqueid`来查询某条订阅信息:`util.find({uniqueid})`;也可以从数据库中查询出所有订阅信息:`util.findAll()`。 +2. 然后通过`pushMessage()`方法向Push Service发送请求。根据第二节的介绍,我们知道,该请求需要符合Web Push协议。然而,Web Push协议的请求封装、加密处理相关操作非常繁琐。因此,Web Push为各种语言的开发者提供了一系列对应的库:[Web Push Libaray](https://github.com/web-push-libs),目前有NodeJS、PHP、Python、Java等。把这些复杂而繁琐的操作交给它们可以让我们事半功倍。 +3. 最后返回结果,这里只是简单的根据是否有订阅信息来进行返回。 + +安装node版web-push + +```bash +npm install web-push --save +``` + +前面我们提到的公钥与私钥,也可以通过web-push来生成 + +![](https://user-gold-cdn.xitu.io/2018/4/13/162badb18824ff12?w=644&h=159&f=png&s=26820) + +使用web-push非常简单,首先设置VAPID keys: + +```javascript +// app.js +const webpush = require('web-push'); +/** + * VAPID值 + * 这里可以替换为你业务中实际的值 + */ +const vapidKeys = { + publicKey: 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A', + privateKey: 'TVe_nJlciDOn130gFyFYP8UiGxxWd3QdH6C5axXpSgM' +}; + +// 设置web-push的VAPID值 +webpush.setVapidDetails( + 'mailto:alienzhou16@163.com', + vapidKeys.publicKey, + vapidKeys.privateKey +); +``` +设置完成后即可使用`webpush.sendNotification()`方法向Push Service发起请求。 + +最后我们来看下`pushMessage()`方法的细节: + +```javascript +// app.js +/** + * 向push service推送信息 + * @param {*} subscription + * @param {*} data + */ +function pushMessage(subscription, data = {}) { + webpush.sendNotification(subscription, data, options).then(data => { + console.log('push service的相应数据:', JSON.stringify(data)); + return; + }).catch(err => { + // 判断状态码,440和410表示失效 + if (err.statusCode === 410 || err.statusCode === 404) { + return util.remove(subscription); + } + else { + console.log(subscription); + console.log(err); + } + }) +} +``` +`webpush.sendNotification`为我们封装了请求的处理细节。状态码401和404表示该subscription已经无效,可以从数据库中删除。 + +### 3.4. Service Worker监听Push消息 +调用`webpush.sendNotification()`后,我们就已经把消息发送至Push Service了;而Push Service会将我们的消息推送至浏览器。 + +要想在浏览器中获取推送信息,只需在Service Worker中监听`push`的事件即可: + +```javascript +// sw.js +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + self.registration.showNotification(data.text); + } + else { + console.log('push没有任何数据'); + } +}); +``` + +## 4. 效果展示 +我们同时使用firefox与chrome来访问该WebApp,并分别向这两个客户端推送消息。我们可以使用console中打印出来的uniqueid,在postman中发起`/push`请求进行测试。 + +![Web Push效果](https://user-gold-cdn.xitu.io/2018/4/13/162bc954b09d78cf?w=1277&h=774&f=gif&s=2877596) + +可以看到,我们分别向firefox与chrome中推送了“welcome to PWA”这条消息。console中的输出来自于Service Worker中对push事件的监听。而弹出的浏览器提醒则来自于之前提到的、订阅时配置的`userVisibleOnly: true`属性。在后续的文章里,我继续带大家了解Notification API(提醒)的使用。 + +正如前文所述,Push Service可以在设备离线时,帮你维护推送消息。当浏览器设备重新联网时,就会收到该推送。下面展示了在设备恢复联网后,就会收到推送: + +![恢复网络则会收到推送消息](https://user-gold-cdn.xitu.io/2018/4/14/162bfe83b578881f?w=2560&h=1600&f=gif&s=2478281) + +## 5. 万恶的兼容性 +又到了查看[兼容性](https://caniuse.com/#search=push)的时间了。比较重要的是,对于Push API,目前Safari团队并没有明确表态计划支持。 + +![](https://user-gold-cdn.xitu.io/2018/4/13/162bfa0147d2b40d?w=2346&h=918&f=png&s=192351) + +当然,其实比兼容性更大的一个问题是,Chrome所依赖的FCM服务在国内是无法访问的,而Firefox的服务在国内可以正常使用。这也是为什么在代码中会有这一项设置: + +```javascript +const options = { + // proxy: 'http://localhost:1087' // 使用FCM(Chrome)需要配置代理 +}; +``` + +上面代码其实是用来配置web-push代理的。这里有一点需要注意,目前从npm上安装的web-push是不支持设置代理选项的。针对这点github上专门有[issue](https://github.com/web-push-libs/web-push/issues/280)进行了讨论,并在最近(两周前)合入了[相应的PR](https://github.com/web-push-libs/web-push/commit/f099ec8ff97e86fb6778ece04bd27a36ef93655e)。因此,如果需要web-push支持代理,简单的方式就是基于master进行web-push代码的相应调整。 + +虽然由于google服务被屏蔽,导致国内Push功能无法在chrome上使用,但是作为一个重要的技术点,Web Push还是非常值得我们了解与学习的。 + +## 6. 写在最后 +本文中所有的代码示例均可以在[learn-pwa/push](https://github.com/alienzhou/learning-pwa/tree/push)上找到。注意在git clone之后,切换到push分支。切换其他分支可以看到不同的版本: +- basic分支:基础项目demo,一个普通的图书搜索应用(网站); +- manifest分支:基于basic分支,添加manifest等功能; +- sw-cache分支:基于manifest分支,添加缓存与离线功能; +- push分支:基于sw-cache分支,添加服务端消息推送功能; +- master分支:应用的最新代码。 + +如果你喜欢或想要了解更多的PWA相关知识,欢迎关注我,关注[《PWA学习与实践》](https://juejin.im/user/59ad5377518825244d206d2d/posts)系列文章。我会总结整理自己学习PWA过程的遇到的疑问与技术点,并通过实际代码和大家一起实践。 + +## 参考资料 +- [Generic Event Delivery Using HTTP Pus (draft-ietf-webpush-protocol-12)](https://tools.ietf.org/html/draft-ietf-webpush-protocol-12) +- [FCM简单介绍](https://segmentfault.com/a/1190000010977980) +- [How Push Works](https://developers.google.com/web/fundamentals/push-notifications/how-push-works) \ No newline at end of file diff --git a/09-PWA/study2/04-push/app.js b/09-PWA/study2/04-push/app.js new file mode 100755 index 000000000..d1e13fff5 --- /dev/null +++ b/09-PWA/study2/04-push/app.js @@ -0,0 +1,103 @@ +const util = require('./util'); +const http = require('http'); +const Koa = require('koa'); +const serve = require('koa-static'); +const Router = require('koa-router'); +const koaBody = require('koa-body'); +const webpush = require('web-push'); + +const port = process.env.PORT || 8085; +const app = new Koa(); +const router = new Router(); + +/** + * 根据关键词获取图书信息 + */ +router.get('/book', async (ctx, next) => { + let query = ctx.request.query; + let {q, fields} = query; + let url = `https://api.douban.com/v2/book/search?q=${q}&fields=${fields}&count=10`; + let res = await util.get(url); + ctx.response.body = res; +}); + +/* ===================== */ +/* 使用web-push进行消息推送 */ +/* ===================== */ +const options = { + // proxy: 'http://localhost:1087' // 使用FCM(Chrome)需要配置代理 +}; + +/** + * VAPID值 + */ +const vapidKeys = { + publicKey: 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A', + privateKey: 'TVe_nJlciDOn130gFyFYP8UiGxxWd3QdH6C5axXpSgM' +}; + +// 设置web-push的VAPID值 +webpush.setVapidDetails( + 'mailto:alienzhou16@163.com', + vapidKeys.publicKey, + vapidKeys.privateKey +); + +/** + * 提交subscription信息,并保存 + */ +router.post('/subscription', koaBody(), async ctx => { + let body = ctx.request.body; + await util.saveRecord(body); + ctx.response.body = { + status: 0 + }; +}); + + +/** + * 向push service推送信息 + * @param {*} subscription + * @param {*} data + */ +function pushMessage(subscription, data = {}) { + webpush.sendNotification(subscription, data, options).then(data => { + console.log('push service的相应数据:', JSON.stringify(data)); + return; + }).catch(err => { + // 判断状态码,440和410表示失效 + if (err.statusCode === 410 || err.statusCode === 404) { + return util.remove(subscription); + } + else { + console.log(subscription); + console.log(err); + } + }) +} + +/** + * 消息推送API,可以在管理后台进行调用 + * 本例子中,可以直接post一个请求来查看效果 + */ +router.post('/push', koaBody(), async ctx => { + let {uniqueid, payload} = ctx.request.body; + let list = uniqueid ? await util.find({uniqueid}) : await util.findAll(); + let status = list.length > 0 ? 0 : -1; + + for (let i = 0; i < list.length; i++) { + let subscription = list[i].subscription; + pushMessage(subscription, JSON.stringify(payload)); + } + + ctx.response.body = { + status + }; +}); +/* ===================== */ + +app.use(router.routes()); +app.use(serve(__dirname + '/public')); +app.listen(port, () => { + console.log(`listen on port: ${port}`); +}); \ No newline at end of file diff --git a/09-PWA/study2/04-push/package.json b/09-PWA/study2/04-push/package.json new file mode 100755 index 000000000..3fcd83595 --- /dev/null +++ b/09-PWA/study2/04-push/package.json @@ -0,0 +1,47 @@ +{ + "name": "learning-pwa", + "version": "0.1.0", + "description": "some samples and blogs about how to start with your first PWA", + "main": "app.js", + "scripts": { + "start": "node app.js", + "release": "standard-version", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/alienzhou/learning-pwa.git" + }, + "keywords": [ + "PWA", + "koa", + "sample" + ], + "author": "alienzhou", + "license": "ISC", + "bugs": { + "url": "https://github.com/alienzhou/learning-pwa/issues" + }, + "homepage": "https://github.com/alienzhou/learning-pwa#readme", + "dependencies": { + "https-proxy-agent": "^2.2.1", + "koa": "^2.5.0", + "koa-body": "^2.5.0", + "koa-router": "^7.4.0", + "koa-static": "^4.0.2", + "nedb": "^1.8.0", + "request": "^2.85.0", + "web-push": "^3.3.0" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -e $GIT_PARAMS" + } + }, + "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "husky": "^0.15.0-rc.13", + "standard-version": "^4.3.0" + } +} diff --git a/09-PWA/study2/04-push/public/base64util.js b/09-PWA/study2/04-push/public/base64util.js new file mode 100755 index 000000000..b131f3e7a --- /dev/null +++ b/09-PWA/study2/04-push/public/base64util.js @@ -0,0 +1,18 @@ +/** + * base64的相关操作,具体可以参考 + * https://github.com/web-push-libs/web-push#using-vapid-key-for-applicationserverkey + */ +window.urlBase64ToUint8Array = function (base64String) { + const padding = '='.repeat((4 - base64String.length % 4) % 4); + const base64 = (base64String + padding) + .replace(/\-/g, '+') + .replace(/_/g, '/'); + + const rawData = window.atob(base64); + const outputArray = new Uint8Array(rawData.length); + + for (let i = 0; i < rawData.length; ++i) { + outputArray[i] = rawData.charCodeAt(i); + } + return outputArray; +} \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/img/book.png b/09-PWA/study2/04-push/public/img/book.png new file mode 100755 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/04-push/public/img/book.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-128.png b/09-PWA/study2/04-push/public/img/icons/book-128.png new file mode 100755 index 000000000..744f006ff Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-128.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-144.png b/09-PWA/study2/04-push/public/img/icons/book-144.png new file mode 100755 index 000000000..d03af1c14 Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-144.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-192.png b/09-PWA/study2/04-push/public/img/icons/book-192.png new file mode 100755 index 000000000..a1c04b208 Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-192.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-256.png b/09-PWA/study2/04-push/public/img/icons/book-256.png new file mode 100755 index 000000000..ad4789069 Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-256.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-32.png b/09-PWA/study2/04-push/public/img/icons/book-32.png new file mode 100755 index 000000000..2fa6a9faf Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-32.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-512.png b/09-PWA/study2/04-push/public/img/icons/book-512.png new file mode 100755 index 000000000..bb5b0f380 Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-512.png differ diff --git a/09-PWA/study2/04-push/public/img/icons/book-72.png b/09-PWA/study2/04-push/public/img/icons/book-72.png new file mode 100755 index 000000000..e04b29572 Binary files /dev/null and b/09-PWA/study2/04-push/public/img/icons/book-72.png differ diff --git a/09-PWA/study2/04-push/public/img/loading.svg b/09-PWA/study2/04-push/public/img/loading.svg new file mode 100755 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/04-push/public/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/index.html b/09-PWA/study2/04-push/public/index.html new file mode 100755 index 000000000..3246990bc --- /dev/null +++ b/09-PWA/study2/04-push/public/index.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + PWA: 图书搜索 + + +
          + + + +
          +
          +
          +
          +
            + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
            + + + + \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/index.js b/09-PWA/study2/04-push/public/index.js new file mode 100755 index 000000000..e67ac204a --- /dev/null +++ b/09-PWA/study2/04-push/public/index.js @@ -0,0 +1,259 @@ +(function() { + /** + * 生成书籍列表卡片(dom元素) + * @param {Object} book 书籍相关数据 + */ + function createCard(book) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var author = document.createElement('div'); + var desc = document.createElement('div'); + var publisher = document.createElement('span'); + var price = document.createElement('span'); + title.className = 'title'; + author.className = 'author'; + desc.className = 'desc'; + // img.src = book.image; + title.innerText = book.title; + author.innerText = book.author; + publisher.innerText = book.publisher; + price.innerText = book.price; + + book.publisher && desc.appendChild(publisher); + book.price && desc.appendChild(price); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(author); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成书籍展示列表 + * @param {Array} list 书籍列表数据 + */ + function fillList(list) { + list.forEach(function (book) { + var node = createCard(book); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 控制loading动画的展示 + * @param {boolean | undefined} isloading 是否展示loading + */ + function loading(isloading) { + if (isloading) { + tip(); + document.querySelector('#js-loading').style = 'display: block'; + } + else { + document.querySelector('#js-loading').style = 'display: none'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryBook() { + var input = document.querySelector('#js-search-input'); + var query = input.value; + var xhr = new XMLHttpRequest(); + var url = '/book?q=' + query + '&fields=id,title,image,author,publisher,price'; + var cacheData; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + var remotePromise = getApiDataRemote(url); + getApiDataFromCache(url).then(function (data) { + if (data) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + cacheData = data || {}; + return remotePromise; + }).then(function (data) { + if (JSON.stringify(data) !== JSON.stringify(cacheData)) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + }); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryBook(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryBook(); + } + }); + + /** + * 获取该请求的缓存数据 + * @param {string} url 请求的url + * @return {Promise} + */ + function getApiDataFromCache(url) { + if ('caches' in window) { + return caches.match(url).then(function (cache) { + if (!cache) { + return; + } + return cache.json(); + }); + } + else { + return Promise.resolve(); + } + } + + function getApiDataRemote(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('GET', url, true); + xhr.send(null); + }); + } + + /* ========================== */ + /* service worker push相关部分 */ + /* ========================== */ + /** + * 注意这里修改了前一篇文章中service worker注册部分的代码 + * 将service worker的注册封装为一个方法,方便使用 + * @param {string} file service worker文件路径 + * @return {Promise} + */ + function registerServiceWorker(file) { + return navigator.serviceWorker.register(file); + } + + /** + * 用户订阅相关的push信息 + * 会生成对应的pushSubscription数据,用于标识用户与安全验证 + * @param {ServiceWorker Registration} registration + * @param {string} publicKey 公钥 + * @return {Promise} + */ + function subscribeUserToPush(registration, publicKey) { + var subscribeOptions = { + userVisibleOnly: true, + applicationServerKey: window.urlBase64ToUint8Array(publicKey) + }; + return registration.pushManager.subscribe(subscribeOptions).then(function (pushSubscription) { + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return pushSubscription; + }); + } + + /** + * 将浏览器生成的subscription信息提交到服务端 + * 服务端保存该信息用于向特定的客户端用户推送 + * @param {string} body 请求体 + * @param {string} url 提交的api路径,默认为/subscription + * @return {Promise} + */ + function sendSubscriptionToServer(body, url) { + url = url || '/subscription'; + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('POST', url, true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(body); + }); + } + + if ('serviceWorker' in navigator && 'PushManager' in window) { + var publicKey = 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A'; + // 注册service worker + registerServiceWorker('./sw.js').then(function (registration) { + console.log('Service Worker 注册成功'); + // 开启该客户端的消息推送订阅功能 + return subscribeUserToPush(registration, publicKey); + }).then(function (subscription) { + var body = {subscription: subscription}; + // 为了方便之后的推送,为每个客户端简单生成一个标识 + body.uniqueid = new Date().getTime(); + console.log('uniqueid', body.uniqueid); + // 将生成的客户端订阅信息存储在自己的服务器上 + return sendSubscriptionToServer(JSON.stringify(body)); + }).then(function (res) { + console.log(res); + }).catch(function (err) { + console.log(err); + }); + } + /* ========================== */ +})(); \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/manifest.json b/09-PWA/study2/04-push/public/manifest.json new file mode 100755 index 000000000..e8cf3be7d --- /dev/null +++ b/09-PWA/study2/04-push/public/manifest.json @@ -0,0 +1,39 @@ +{ + "name": "图书搜索", + "short_name": "书查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索图书的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/style.css b/09-PWA/study2/04-push/public/style.css new file mode 100755 index 000000000..09e690f3e --- /dev/null +++ b/09-PWA/study2/04-push/public/style.css @@ -0,0 +1,143 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .author { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} \ No newline at end of file diff --git a/09-PWA/study2/04-push/public/sw.js b/09-PWA/study2/04-push/public/sw.js new file mode 100755 index 000000000..49ddb8d56 --- /dev/null +++ b/09-PWA/study2/04-push/public/sw.js @@ -0,0 +1,92 @@ +/** + * service worker + */ +var cacheName = 'bs-0-2-0'; +var apiCacheName = 'api-0-1-1'; +var cacheFiles = [ + '/', + './index.html', + './base64util.js', + './index.js', + './style.css', + './img/book.png', + './img/loading.svg' +]; + +// 监听install事件,安装完成后,进行文件缓存 +self.addEventListener('install', function (e) { + console.log('Service Worker 状态: install'); + var cacheOpenPromise = caches.open(cacheName).then(function (cache) { + return cache.addAll(cacheFiles); + }); + e.waitUntil(cacheOpenPromise); +}); + +// 监听activate事件,激活后通过cache的key来判断是否更新cache中的静态资源 +self.addEventListener('activate', function (e) { + console.log('Service Worker 状态: activate'); + var cachePromise = caches.keys().then(function (keys) { + return Promise.all(keys.map(function (key) { + if (key !== cacheName && key !== apiCacheName) { + return caches.delete(key); + } + })); + }) + e.waitUntil(cachePromise); + // 注意不能忽略这行代码,否则第一次加载会导致fetch事件不触发 + return self.clients.claim(); +}); + +self.addEventListener('fetch', function (e) { + // 需要缓存的xhr请求 + var cacheRequestUrls = [ + '/book?' + ]; + console.log('现在正在请求:' + e.request.url); + + // 判断当前请求是否需要缓存 + var needCache = cacheRequestUrls.some(function (url) { + return e.request.url.indexOf(url) > -1; + }); + + if (needCache) { + // 需要缓存 + // 使用fetch请求数据,并将请求结果clone一份缓存到cache + // 此部分缓存后在browser中使用全局变量caches获取 + caches.open(apiCacheName).then(function (cache) { + return fetch(e.request).then(function (response) { + cache.put(e.request.url, response.clone()); + return response; + }); + }); + } + else { + // 非api请求,直接查询cache + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); + } +}); + +/* ============== */ +/* push处理相关部分 */ +/* ============== */ +// 添加service worker对push的监听 +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + self.registration.showNotification(data.text); + } + else { + console.log('push没有任何数据'); + } +}); +/* ============== */ \ No newline at end of file diff --git a/09-PWA/study2/04-push/util.js b/09-PWA/study2/04-push/util.js new file mode 100755 index 000000000..b7b3a650a --- /dev/null +++ b/09-PWA/study2/04-push/util.js @@ -0,0 +1,96 @@ +const request = require('request'); +const Datastore = require('nedb'); + +const db = new Datastore(); + +module.exports.get = function (url, opt = {}) { + return new Promise((r, j) => { + request.get(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.post = function (url, opt = {}) { + return new Promise((r, j) => { + request.post(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.saveRecord = function (obj) { + let {uniqueid, subscription} = obj; + return new Promise((r, j) => { + db.findOne({'subscription.endpoint': subscription.endpoint}, (err, res) => { + if (err) { + j(err); + return; + } + if (res) { + console.log('已存在'); + res.uniqueid = uniqueid; + db.update({subscription}, res, {}, err => { + if (err) { + j(err); + return; + } + r(obj); + }); + return; + } + db.insert(obj, (err, item) => { + if (err) { + j(err); + return; + } + console.log('存储完毕'); + r(obj); + }); + }); + }); +}; + +module.exports.findAll = function () { + return new Promise((r, j) => { + db.find({}, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.find = function (query) { + return new Promise((r, j) => { + db.find(query, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.remove = function (obj) { + return new Promise((r, j) => { + db.remove(obj, {multi: true}, (err, num) => { + if (err) { + j(err); + return; + } + r(num); + }); + }); +}; \ No newline at end of file diff --git a/09-PWA/study2/05-notification/.commitlintrc.js b/09-PWA/study2/05-notification/.commitlintrc.js new file mode 100755 index 000000000..be2a5fd98 --- /dev/null +++ b/09-PWA/study2/05-notification/.commitlintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: [ + '@commitlint/config-conventional' + ], + rules: { + } +}; \ No newline at end of file diff --git a/09-PWA/study2/05-notification/.gitignore b/09-PWA/study2/05-notification/.gitignore new file mode 100755 index 000000000..564309e28 --- /dev/null +++ b/09-PWA/study2/05-notification/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +.vscode/ +package-lock.json \ No newline at end of file diff --git a/09-PWA/study2/05-notification/README.md b/09-PWA/study2/05-notification/README.md new file mode 100755 index 000000000..4ef124edc --- /dev/null +++ b/09-PWA/study2/05-notification/README.md @@ -0,0 +1,385 @@ +## 1. 引言 +在第五篇文章[《Web中进行服务端消息推送》](https://juejin.im/post/5accd1355188252b0b201fb9)中,我介绍了如何使用Push API进行服务端消息推送。提到Push就不得不说与其联系紧密的另一个API——Notification API。它让我们可以在“网站外”显示消息提示: + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631a562ba773ddd?w=1275&h=762&f=gif&s=384884) + +即使当你切换到其他Tab,也可以通过提醒交互来快速让用户回到你的网站;甚至当用户离开当前网站,仍然可以收到系统的提醒消息,并且可以通过消息提醒快速打开你的网站。 + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631b52052cccb59?w=1270&h=676&f=gif&s=2317289) + +Notification的功能本身与Push并不耦合,你完全可以只使用Notification API或者Push API来构建Web App的某些功能。因此,本文会先介绍如何使用Notification API。然后,作为Notification的“黄金搭档”,本文还会介绍如何组合使用Push & Notification(消息推送与提醒)。 + +## 2. 使用Notification API +在这第二节里,我们先来了解如何独立使用Notification功能。相较于第五篇中的Push功能,Notification API更加简洁易懂。 + +### 2.1. 获取提醒权限 + +首先,进行调用消息提醒API需要获得用户的授权。 + +在调用Notification相关API之前,需要先使用`Notification`对象上的静态方法`Notification.requestPermission()`来获取授权。由于`Notification.requestPermission()`在某些版本浏览器中会接收一个回调函数(`Notification.requestPermission(callback)`)作为参数,而在另一些浏览器版本中会返回一个promise,因此将该方法进行包装,统一为promise调用: + +```javascript +// index.js +function askPermission() { + return new Promise(function (resolve, reject) { + var permissionResult = Notification.requestPermission(function (result) { + resolve(result); + }); + + if (permissionResult) { + permissionResult.then(resolve, reject); + } + }).then(function (permissionResult) { + if (permissionResult !== 'granted') { + throw new Error('We weren\'t granted permission.'); + } + }); +} + + +registerServiceWorker('./sw.js').then(function (registration) { + return Promise.all([ + registration, + askPermission() + ]) + }) +``` +我们创建了一个`askPermission()`方法来统一`Notification.requestPermission()`的调用形式,并在Service Worker注册完成后调用该方法。调用`Notification.requestPermission()`获取的`permissionResult`可能的值为: + +- denied:用户拒绝了通知的显示 +- granted:用户允许了通知的显示 +- default:因为不知道用户的选择,所以浏览器的行为与denied时相同 + +chrome中,可以在`chrome://settings/content/notifications`里进行通知的设置与管理。 + +### 2.2. 设置你的提醒内容 +获取用户授权后,我们就可以通过`registration.showNotification()`方法进行消息提醒了。 + +当我们注册完Service Worker后,`then`方法的回调函数会接收一个`registration`参数,通过调用其上的`showNotification()`方法即可触发提醒: + +```javascript +// index.js +registerServiceWorker('./sw.js').then(function (registration) { + return Promise.all([ + registration, + askPermission() + ]) +}).then(function (result) { + var registration = result[0]; + /* ===== 添加提醒功能 ====== */ + document.querySelector('#js-notification-btn').addEventListener('click', function () { + var title = 'PWA即学即用'; + var options = { + body: '邀请你一起学习', + icon: '/img/icons/book-128.png', + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + registration.showNotification(title, options); + }); + /* ======================= */ +}) +``` + +上面这段代码为页面上的button添加了一个click事件监听:当点击后,调用`registration.showNotification()`方法来显示消息提醒,该方法接收两个参数:`title`与`option`。`title`用来设置该提醒的主标题,`option`中则包含了一些其他设置。 + +- body:提醒的内容 +- icon:提醒的图标 +- actions:提醒可以包含一些自定义操作 +- tag:相当于是ID,通过该ID标识可以操作特定的notification +- renotify:是否允许重复提醒,默认为false。当不允许重复提醒时,同一个tag的notification只会显示一次 + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631a6c6007ffec9?w=800&h=300&f=jpeg&s=114296) + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631a6f12cc17f0c?w=800&h=161&f=jpeg&s=66563) + +> 注意,由于不同浏览器中,对于`option`属性的支持情况并不相同。部分属性在一些浏览器中并不支持。 + +### 2.3. 捕获用户的点击 +在上一部分中,我们已经为Web App添加了提醒功能。点击页面中的“提醒”按钮,系统就会弹出提醒框,并展示相关提醒消息。 + +然而更多的时候,我们并不仅仅希望只展示有限的信息,更希望能引导用户进行交互。例如推荐一本新书,让用户点击阅读或购买。在上一部分我们设置的提醒框中,包含了“去看看”和“联系我”两个按钮选项,那么怎么做才能捕获用户的点击操作,并且知道用户点击了哪个呢?这一小节,就会告诉你如何实现。 + +还记的上一部分里我们定义的actions么? + +```javascript +… +actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' +}] +… +``` +为了能够响应用户对于提醒框的点击事件,我们需要在Service Worker中监听`notificationclick`事件。在该事件的回调函数中我们可以获取点击的相关信息: + +```javascript +// sw.js +self.addEventListener('notificationclick', function (e) { + var action = e.action; + console.log(`action tag: ${e.notification.tag}`, `action: ${action}`); + + switch (action) { + case 'show-book': + console.log('show-book'); + break; + case 'contact-me': + console.log('contact-me'); + break; + default: + console.log(`未处理的action: ${e.action}`); + action = 'default'; + break; + } + e.notification.close(); +}); +``` + +`e.action`获取的值,就是我们在`showNotification()`中定义的actions里的action。因此,通过`e.action`就可以知道用户点击了哪一个操作选项。注意,当用户点击提醒本身时,也会触发`notificationclick`,但是不包含任何action值,所以在代码中将其置于default默认操作中。 + +现在试一下,我们就可以捕获用户对于不同选项的点击了。点击后在Console中会有不同的输出。 + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631a855e6ac1712?w=1120&h=188&f=png&s=52210) + +### 2.4. Service Worker与client通信 +到目前为止,我们已经可以顺利得给用户展示提醒,并且在用户操作提醒后准确捕获到用户的操作。然而,还缺最重要的一步——针对不同的操作,触发不同的交互。例如, +- 点击提醒本身会弹出书籍简介; +- 点击“看一看”会给用户展示本书的详情; +- 点击“联系我”会向应用管理者发邮件等等。 + +这里有个很重要的地方:我们在Service Worker中捕获用户操作,但是需要在client(这里的client是指前端页面的脚本环境)中触发相应操作(调用页面方法/进行页面跳转…)。因此,这就需要让Service Worker与client进行通信。通信包括下面两个部分: + +1. 在Service Worker中使用Worker的`postMessage()`方法来通知client: + +```javascript +// sw.js +self.addEventListener('notificationclick', function (e) { + …… // 略去上一节内容 + + e.waitUntil( + // 获取所有clients + self.clients.matchAll().then(function (clients) { + if (!clients || clients.length === 0) { + return; + } + clients.forEach(function (client) { + // 使用postMessage进行通信 + client.postMessage(action); + }); + }) + ); +}); +``` + +2. 在client中监听`message`事件,判断`data`,进行不同的操作: + +```javascript +// index.js +navigator.serviceWorker.addEventListener('message', function (e) { + var action = e.data; + console.log(`receive post-message from sw, action is '${e.data}'`); + switch (action) { + case 'show-book': + location.href = 'https://book.douban.com/subject/20515024/'; + break; + case 'contact-me': + location.href = 'mailto:someone@sample.com'; + break; + default: + document.querySelector('.panel').classList.add('show'); + break; + } +}); +``` + +当用户点击提醒后,我们在`notificationclick`监听中,将action通过`postMessage()`通信给client;然后在client中监听`message`事件,基于action(`e.data`)来进行不同的操作(跳转到图书详情页/发送邮件/显示简介面板)。 + +至此,一个比较简单与完整的消息提醒(Notification)功能就完成了。 + +然而目前的消息提醒还存在一定的局限性。例如,只有在用户访问网站期间才能有机会触发提醒。正如本文一开始所说,Push & Notification的结合将会帮助我们构筑一个强大推送与提醒功能。下面就来看下它们的简单结合。 + +## 3. 消息推送与提醒 +在第五篇[《Web中进行服务端消息推送》](https://juejin.im/post/5accd1355188252b0b201fb9)最后,我们通过监听`push`事件来处理服务端推送: + +```javascript +// sw.js +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + self.registration.showNotification(data.text); + } + else { + console.log('push没有任何数据'); + } +}); +``` + +简单修改以上代码,与我们本文中的提醒功能相结合: + +```javascript +// sw.js +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + var title = 'PWA即学即用'; + var options = { + body: data, + icon: '/img/icons/book-128.png', + image: '/img/icons/book-521.png', // no effect + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + self.registration.showNotification(title, options); + } + else { + console.log('push没有任何数据'); + } +}); +``` + +使用Push来向用户推送信息,并在Service Worker中直接调用Notification API来展示该信息的提醒框。这样,即使是在用户关闭该Web App时,依然可以收到提醒,类似于Native中的消息推送与提醒。 + +我们还可以将这个功能再丰富一些。由于用户在关闭该网站时仍然可以收到提醒,因此加入一些更强大功能: +- 当用户切换到其他Tab时,点击提醒会立刻回到网站的tab; +- 当用户未打开该网站时,点击提醒可以直接打开网站。 + +```javascript +// sw.js +self.addEventListener('notificationclick', function (e) { + var action = e.action; + console.log(`action tag: ${e.notification.tag}`, `action: ${action}`); + + switch (action) { + case 'show-book': + console.log('show-book'); + break; + case 'contact-me': + console.log('contact-me'); + break; + default: + console.log(`未处理的action: ${e.action}`); + action = 'default'; + break; + } + e.notification.close(); + + e.waitUntil( + // 获取所有clients + self.clients.matchAll().then(function (clients) { + if (!clients || clients.length === 0) { + // 当不存在client时,打开该网站 + self.clients.openWindow && self.clients.openWindow('http://127.0.0.1:8085'); + return; + } + // 切换到该站点的tab + clients[0].focus && clients[0].focus(); + clients.forEach(function (client) { + // 使用postMessage进行通信 + client.postMessage(action); + }); + }) + ); +}); +``` + +注意这两行代码,第一行会在网站关闭时打开该网站,第二行会在存在tab时自动切换到网站的tab。 + +```javascript +self.clients.openWindow && self.clients.openWindow('http://127.0.0.1:8085'); + +clients[0].focus && clients[0].focus(); +``` + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631b52052cccb59?w=1270&h=676&f=gif&s=2317289) + +## 4. MacOS Safari中的Web Notification +看一下[Web Notification的兼容性](https://caniuse.com/#search=notification): + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631afa349ff2f0c?w=2344&h=918&f=png&s=222023) + +目前移动端浏览器普遍还不支持该特性。但是在Mac OS上的safari里面是支持该特性的,不过其调用方式与上文代码有些不太一样。在safari中使用Web Notification不是调用`registration.showNotification()`方法,而是需要创建一个Notification对象。 + +```javascript +// index.js +…… +document.querySelector('#js-notification-btn').addEventListener('click', function () { + var title = 'PWA即学即用'; + var options = { + body: '邀请你一起学习', + icon: '/img/icons/book-128.png', + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + // registration.showNotification(title, options); + + // 使用Notification构造函数创建提醒框 + // 而非registration.showNotification()方法 + var notification = new Notification(title, options); +}); +…… +``` +Notification对象继承自EventTarget接口,因此在safari中需要通过添加click事件的监听来触发提醒框的交互操作: + +```javascript +// index.js +notification.addEventListener('click', function (e) { + document.querySelector('.panel').classList.add('show'); +}); +``` + +![](https://user-gold-cdn.xitu.io/2018/5/1/1631b1ef1e592c36?w=677&h=369&f=gif&s=308375) + +该功能示例可以在[learn-pwa/notify4safari](https://github.com/alienzhou/learning-pwa/tree/notify4safari)中找到。 + +## 5. 写在最后 +Web Notification是一个非常强大的API,尤其在和Push结合后,为WebApp带来了类似Native的丰富能力。 + +本文中所有的代码示例均可以在[learn-pwa/notification](https://github.com/alienzhou/learning-pwa/tree/notification)上找到。 + +如果你喜欢或想要了解更多的PWA相关知识,欢迎关注我,关注[《PWA学习与实践》](https://juejin.im/user/59ad5377518825244d206d2d/posts)系列文章。我会总结整理自己学习PWA过程的遇到的疑问与技术点,并通过实际代码和大家一起实践。 + +到目前为止,我们已经学习了[Manifest](https://juejin.im/post/5ac8a89ef265da238440d60a)、[离线缓存](https://juejin.im/post/5aca14b6f265da237c692e6f)、[消息推送](https://juejin.im/post/5accd1355188252b0b201fb9)、消息提醒、[Debug](https://juejin.im/post/5ae56f926fb9a07aca79edf6)等一些基础知识。在下一篇文章里,我们会继续了解与学习PWA中的一个重要功能——后台同步。 + +## 《PWA学习与实践》系列 +- [第一篇:2018,开始你的PWA学习之旅](https://juejin.im/post/5ac8a67c5188255c5668b0b8) +- [第二篇:10分钟学会使用Manifest,让你的WebApp更“Native”](https://juejin.im/post/5ac8a89ef265da238440d60a) +- [第三篇:从今天起,让你的WebApp离线可用](https://juejin.im/post/5aca14b6f265da237c692e6f) +- [第四篇:TroubleShooting: 解决FireBase login验证失败问题](https://juejin.im/post/5accc3c9f265da23870f2abc) +- [第五篇:与你的用户保持联系: Web Push功能](https://juejin.im/post/5accd1355188252b0b201fb9) +- [第六篇:How to Debug? 在chrome中调试你的PWA](https://juejin.im/post/5ae56f926fb9a07aca79edf6) +- 第七篇:增强交互:使用Notification API来进行提醒(本文) +- 第八篇:使用Service Worker进行后台数据同步(写作中……) + +## 参考资料 +- [MDN: notification](https://developer.mozilla.org/zh-CN/docs/Web/API/notification) +- [MDN: ServiceWorkerRegistration.showNotification()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification) +- [MDN: WindowClient](https://developer.mozilla.org/en-US/docs/Web/API/WindowClient) +- [MDN: Clients](https://developer.mozilla.org/en-US/docs/Web/API/Clients) +- [WWDC2013](https://developer.apple.com/videos/play/wwdc2013/614/) diff --git a/09-PWA/study2/05-notification/app.js b/09-PWA/study2/05-notification/app.js new file mode 100755 index 000000000..d1e13fff5 --- /dev/null +++ b/09-PWA/study2/05-notification/app.js @@ -0,0 +1,103 @@ +const util = require('./util'); +const http = require('http'); +const Koa = require('koa'); +const serve = require('koa-static'); +const Router = require('koa-router'); +const koaBody = require('koa-body'); +const webpush = require('web-push'); + +const port = process.env.PORT || 8085; +const app = new Koa(); +const router = new Router(); + +/** + * 根据关键词获取图书信息 + */ +router.get('/book', async (ctx, next) => { + let query = ctx.request.query; + let {q, fields} = query; + let url = `https://api.douban.com/v2/book/search?q=${q}&fields=${fields}&count=10`; + let res = await util.get(url); + ctx.response.body = res; +}); + +/* ===================== */ +/* 使用web-push进行消息推送 */ +/* ===================== */ +const options = { + // proxy: 'http://localhost:1087' // 使用FCM(Chrome)需要配置代理 +}; + +/** + * VAPID值 + */ +const vapidKeys = { + publicKey: 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A', + privateKey: 'TVe_nJlciDOn130gFyFYP8UiGxxWd3QdH6C5axXpSgM' +}; + +// 设置web-push的VAPID值 +webpush.setVapidDetails( + 'mailto:alienzhou16@163.com', + vapidKeys.publicKey, + vapidKeys.privateKey +); + +/** + * 提交subscription信息,并保存 + */ +router.post('/subscription', koaBody(), async ctx => { + let body = ctx.request.body; + await util.saveRecord(body); + ctx.response.body = { + status: 0 + }; +}); + + +/** + * 向push service推送信息 + * @param {*} subscription + * @param {*} data + */ +function pushMessage(subscription, data = {}) { + webpush.sendNotification(subscription, data, options).then(data => { + console.log('push service的相应数据:', JSON.stringify(data)); + return; + }).catch(err => { + // 判断状态码,440和410表示失效 + if (err.statusCode === 410 || err.statusCode === 404) { + return util.remove(subscription); + } + else { + console.log(subscription); + console.log(err); + } + }) +} + +/** + * 消息推送API,可以在管理后台进行调用 + * 本例子中,可以直接post一个请求来查看效果 + */ +router.post('/push', koaBody(), async ctx => { + let {uniqueid, payload} = ctx.request.body; + let list = uniqueid ? await util.find({uniqueid}) : await util.findAll(); + let status = list.length > 0 ? 0 : -1; + + for (let i = 0; i < list.length; i++) { + let subscription = list[i].subscription; + pushMessage(subscription, JSON.stringify(payload)); + } + + ctx.response.body = { + status + }; +}); +/* ===================== */ + +app.use(router.routes()); +app.use(serve(__dirname + '/public')); +app.listen(port, () => { + console.log(`listen on port: ${port}`); +}); \ No newline at end of file diff --git a/09-PWA/study2/05-notification/package.json b/09-PWA/study2/05-notification/package.json new file mode 100755 index 000000000..3fcd83595 --- /dev/null +++ b/09-PWA/study2/05-notification/package.json @@ -0,0 +1,47 @@ +{ + "name": "learning-pwa", + "version": "0.1.0", + "description": "some samples and blogs about how to start with your first PWA", + "main": "app.js", + "scripts": { + "start": "node app.js", + "release": "standard-version", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/alienzhou/learning-pwa.git" + }, + "keywords": [ + "PWA", + "koa", + "sample" + ], + "author": "alienzhou", + "license": "ISC", + "bugs": { + "url": "https://github.com/alienzhou/learning-pwa/issues" + }, + "homepage": "https://github.com/alienzhou/learning-pwa#readme", + "dependencies": { + "https-proxy-agent": "^2.2.1", + "koa": "^2.5.0", + "koa-body": "^2.5.0", + "koa-router": "^7.4.0", + "koa-static": "^4.0.2", + "nedb": "^1.8.0", + "request": "^2.85.0", + "web-push": "^3.3.0" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -e $GIT_PARAMS" + } + }, + "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "husky": "^0.15.0-rc.13", + "standard-version": "^4.3.0" + } +} diff --git a/09-PWA/study2/05-notification/public/base64util.js b/09-PWA/study2/05-notification/public/base64util.js new file mode 100755 index 000000000..b131f3e7a --- /dev/null +++ b/09-PWA/study2/05-notification/public/base64util.js @@ -0,0 +1,18 @@ +/** + * base64的相关操作,具体可以参考 + * https://github.com/web-push-libs/web-push#using-vapid-key-for-applicationserverkey + */ +window.urlBase64ToUint8Array = function (base64String) { + const padding = '='.repeat((4 - base64String.length % 4) % 4); + const base64 = (base64String + padding) + .replace(/\-/g, '+') + .replace(/_/g, '/'); + + const rawData = window.atob(base64); + const outputArray = new Uint8Array(rawData.length); + + for (let i = 0; i < rawData.length; ++i) { + outputArray[i] = rawData.charCodeAt(i); + } + return outputArray; +} \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/img/book.png b/09-PWA/study2/05-notification/public/img/book.png new file mode 100755 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/book.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-128.png b/09-PWA/study2/05-notification/public/img/icons/book-128.png new file mode 100755 index 000000000..744f006ff Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-128.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-144.png b/09-PWA/study2/05-notification/public/img/icons/book-144.png new file mode 100755 index 000000000..d03af1c14 Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-144.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-192.png b/09-PWA/study2/05-notification/public/img/icons/book-192.png new file mode 100755 index 000000000..a1c04b208 Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-192.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-256.png b/09-PWA/study2/05-notification/public/img/icons/book-256.png new file mode 100755 index 000000000..ad4789069 Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-256.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-32.png b/09-PWA/study2/05-notification/public/img/icons/book-32.png new file mode 100755 index 000000000..2fa6a9faf Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-32.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-512.png b/09-PWA/study2/05-notification/public/img/icons/book-512.png new file mode 100755 index 000000000..bb5b0f380 Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-512.png differ diff --git a/09-PWA/study2/05-notification/public/img/icons/book-72.png b/09-PWA/study2/05-notification/public/img/icons/book-72.png new file mode 100755 index 000000000..e04b29572 Binary files /dev/null and b/09-PWA/study2/05-notification/public/img/icons/book-72.png differ diff --git a/09-PWA/study2/05-notification/public/img/loading.svg b/09-PWA/study2/05-notification/public/img/loading.svg new file mode 100755 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/05-notification/public/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/index.html b/09-PWA/study2/05-notification/public/index.html new file mode 100755 index 000000000..1626ee3fb --- /dev/null +++ b/09-PWA/study2/05-notification/public/index.html @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + PWA: 图书搜索 + + +
            + + + + +
            +
            +
            +
            +
              + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
              +
              +

              + 讲解如何用Node构建可扩展因特网应用,是全面的实用指南, + 除了详细介绍Node提供的API外,还用大量篇幅介绍了服务 + 器事件驱动开发的重要概念。内容涉及跨服务器的并发连接、 + 非阻塞I/O和事件驱动的编程、如何支持各种数据库和数据存 + 储工具、NodeAPI的使用示例等。适合对JavaScript及编程 + 有一定程度了解的读者阅读。 +

              +
              + + + + \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/index.js b/09-PWA/study2/05-notification/public/index.js new file mode 100755 index 000000000..0dd362460 --- /dev/null +++ b/09-PWA/study2/05-notification/public/index.js @@ -0,0 +1,331 @@ +(function() { + /** + * 生成书籍列表卡片(dom元素) + * @param {Object} book 书籍相关数据 + */ + function createCard(book) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var author = document.createElement('div'); + var desc = document.createElement('div'); + var publisher = document.createElement('span'); + var price = document.createElement('span'); + title.className = 'title'; + author.className = 'author'; + desc.className = 'desc'; + // img.src = book.image; + title.innerText = book.title; + author.innerText = book.author; + publisher.innerText = book.publisher; + price.innerText = book.price; + + book.publisher && desc.appendChild(publisher); + book.price && desc.appendChild(price); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(author); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成书籍展示列表 + * @param {Array} list 书籍列表数据 + */ + function fillList(list) { + list.forEach(function (book) { + var node = createCard(book); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 控制loading动画的展示 + * @param {boolean | undefined} isloading 是否展示loading + */ + function loading(isloading) { + if (isloading) { + tip(); + document.querySelector('#js-loading').style = 'display: block'; + } + else { + document.querySelector('#js-loading').style = 'display: none'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryBook() { + var input = document.querySelector('#js-search-input'); + var query = input.value; + var xhr = new XMLHttpRequest(); + var url = '/book?q=' + query + '&fields=id,title,image,author,publisher,price'; + var cacheData; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + var remotePromise = getApiDataRemote(url); + getApiDataFromCache(url).then(function (data) { + if (data) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + cacheData = data || {}; + return remotePromise; + }).then(function (data) { + if (JSON.stringify(data) !== JSON.stringify(cacheData)) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + }); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryBook(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryBook(); + } + }); + + /** + * 获取该请求的缓存数据 + * @param {string} url 请求的url + * @return {Promise} + */ + function getApiDataFromCache(url) { + if ('caches' in window) { + return caches.match(url).then(function (cache) { + if (!cache) { + return; + } + return cache.json(); + }); + } + else { + return Promise.resolve(); + } + } + + function getApiDataRemote(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('GET', url, true); + xhr.send(null); + }); + } + + /* ========================================== */ + /* service worker push 与 notification 相关部分 */ + /* ========================================== */ + /** + * 注意这里修改了前一篇文章中service worker注册部分的代码 + * 将service worker的注册封装为一个方法,方便使用 + * @param {string} file service worker文件路径 + * @return {Promise} + */ + function registerServiceWorker(file) { + return navigator.serviceWorker.register(file); + } + + /** + * 用户订阅相关的push信息 + * 会生成对应的pushSubscription数据,用于标识用户与安全验证 + * @param {ServiceWorker Registration} registration + * @param {string} publicKey 公钥 + * @return {Promise} + */ + function subscribeUserToPush(registration, publicKey) { + var subscribeOptions = { + userVisibleOnly: true, + applicationServerKey: window.urlBase64ToUint8Array(publicKey) + }; + return registration.pushManager.subscribe(subscribeOptions).then(function (pushSubscription) { + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return pushSubscription; + }); + } + + /** + * 将浏览器生成的subscription信息提交到服务端 + * 服务端保存该信息用于向特定的客户端用户推送 + * @param {string} body 请求体 + * @param {string} url 提交的api路径,默认为/subscription + * @return {Promise} + */ + function sendSubscriptionToServer(body, url) { + url = url || '/subscription'; + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('POST', url, true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(body); + }); + } + + if ('serviceWorker' in navigator && 'PushManager' in window) { + var publicKey = 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A'; + // 注册service worker + registerServiceWorker('./sw.js').then(function (registration) { + return Promise.all([ + registration, + askPermission() + ]) + }).then(function (result) { + var registration = result[0]; + /* ===== 添加提醒功能 ====== */ + document.querySelector('#js-notification-btn').addEventListener('click', function () { + var title = 'PWA即学即用'; + var options = { + body: '邀请你一起学习', + icon: '/img/icons/book-128.png', + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + registration.showNotification(title, options); + }); + /* ======================= */ + + console.log('Service Worker 注册成功'); + + // 开启该客户端的消息推送订阅功能 + return subscribeUserToPush(registration, publicKey); + + }).then(function (subscription) { + var body = {subscription: subscription}; + + // 为了方便之后的推送,为每个客户端简单生成一个标识 + body.uniqueid = new Date().getTime(); + console.log('uniqueid', body.uniqueid); + + // 将生成的客户端订阅信息存储在自己的服务器上 + return sendSubscriptionToServer(JSON.stringify(body)); + }).then(function (res) { + console.log(res); + }).catch(function (err) { + console.log(err); + }); + } + + /* ======= 消息通信 ======= */ + if ('serviceWorker' in navigator) { + navigator.serviceWorker.addEventListener('message', function (e) { + var action = e.data; + console.log(`receive post-message from sw, action is '${e.data}'`); + switch (action) { + case 'show-book': + location.href = 'https://book.douban.com/subject/20515024/'; + break; + case 'contact-me': + location.href = 'mailto:someone@sample.com'; + break; + default: + document.querySelector('.panel').classList.add('show'); + break; + } + }); + } + /* ======================= */ + + /** + * 获取用户授权,将 + */ + function askPermission() { + return new Promise(function (resolve, reject) { + var permissionResult = Notification.requestPermission(function (result) { + resolve(result); + }); + + if (permissionResult) { + permissionResult.then(resolve, reject); + } + }).then(function (permissionResult) { + if (permissionResult !== 'granted') { + throw new Error('We weren\'t granted permission.'); + } + }); + } + + /* ========================================== */ + /* ================== fin =================== */ + /* ========================================== */ +})(); \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/manifest.json b/09-PWA/study2/05-notification/public/manifest.json new file mode 100755 index 000000000..e8cf3be7d --- /dev/null +++ b/09-PWA/study2/05-notification/public/manifest.json @@ -0,0 +1,39 @@ +{ + "name": "图书搜索", + "short_name": "书查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索图书的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/style.css b/09-PWA/study2/05-notification/public/style.css new file mode 100755 index 000000000..6912a0b77 --- /dev/null +++ b/09-PWA/study2/05-notification/public/style.css @@ -0,0 +1,183 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .author { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} + +.notify-btn { + position: fixed; + bottom: 30px; + right: 20px; + background: #be4469; +} + +.panel { + position: fixed; + border-radius: 3px; + padding: 10px 20px; + width: 250px; + height: 100px; + left: -50px; + bottom: 30px; + z-index: -1; + opacity: 0; + box-shadow: 2px 5px 5px #afafaf; + overflow: hidden; + background: #f2f2f2; + transition: all .2s; +} + +.panel > p { + margin: 5px 0 0 0; + font-size: 13px; + color: #222; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; +} + +.panel.show { + left: 0; + z-index: 1; + opacity: 1; +} \ No newline at end of file diff --git a/09-PWA/study2/05-notification/public/sw.js b/09-PWA/study2/05-notification/public/sw.js new file mode 100755 index 000000000..2f61f9f95 --- /dev/null +++ b/09-PWA/study2/05-notification/public/sw.js @@ -0,0 +1,148 @@ +/** + * service worker + */ +var cacheName = 'bs-0-2-0'; +var apiCacheName = 'api-0-1-1'; +var cacheFiles = [ + '/', + './index.html', + './base64util.js', + './index.js', + './style.css', + './img/book.png', + './img/loading.svg' +]; + +// 监听install事件,安装完成后,进行文件缓存 +self.addEventListener('install', function (e) { + console.log('Service Worker 状态: install'); + var cacheOpenPromise = caches.open(cacheName).then(function (cache) { + return cache.addAll(cacheFiles); + }); + e.waitUntil(cacheOpenPromise); +}); + +// 监听activate事件,激活后通过cache的key来判断是否更新cache中的静态资源 +self.addEventListener('activate', function (e) { + console.log('Service Worker 状态: activate'); + var cachePromise = caches.keys().then(function (keys) { + return Promise.all(keys.map(function (key) { + if (key !== cacheName && key !== apiCacheName) { + return caches.delete(key); + } + })); + }) + e.waitUntil(cachePromise); + // 注意不能忽略这行代码,否则第一次加载会导致fetch事件不触发 + return self.clients.claim(); +}); + +self.addEventListener('fetch', function (e) { + // 需要缓存的xhr请求 + var cacheRequestUrls = [ + '/book?' + ]; + console.log('现在正在请求:' + e.request.url); + + // 判断当前请求是否需要缓存 + var needCache = cacheRequestUrls.some(function (url) { + return e.request.url.indexOf(url) > -1; + }); + + if (needCache) { + // 需要缓存 + // 使用fetch请求数据,并将请求结果clone一份缓存到cache + // 此部分缓存后在browser中使用全局变量caches获取 + caches.open(apiCacheName).then(function (cache) { + return fetch(e.request).then(function (response) { + cache.put(e.request.url, response.clone()); + return response; + }); + }); + } + else { + // 非api请求,直接查询cache + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); + } +}); + +/* ======================================= */ +/* push处理相关部分,已添加对notification的调用 */ +/* ======================================= */ +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + var title = 'PWA即学即用'; + var options = { + body: data, + icon: '/img/icons/book-128.png', + image: '/img/icons/book-521.png', // no effect + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + self.registration.showNotification(title, options); + } + else { + console.log('push没有任何数据'); + } +}); +/* ======================================= */ +/* ================= fin ================= */ +/* ======================================= */ + +/* ======================== */ +/* notification demo相关部分 */ +/* ======================= */ +self.addEventListener('notificationclick', function (e) { + var action = e.action; + console.log(`action tag: ${e.notification.tag}`, `action: ${action}`); + + switch (action) { + case 'show-book': + console.log('show-book'); + break; + case 'contact-me': + console.log('contact-me'); + break; + default: + console.log(`未处理的action: ${e.action}`); + action = 'default'; + break; + } + e.notification.close(); + + e.waitUntil( + // 获取所有clients + self.clients.matchAll().then(function (clients) { + if (!clients || clients.length === 0) { + self.clients.openWindow && self.clients.openWindow('http://127.0.0.1:8085'); + return; + } + clients[0].focus && clients[0].focus(); + clients.forEach(function (client) { + // 使用postMessage进行通信 + client.postMessage(action); + }); + }) + ); +}); +/* ======================= */ +/* ========= fin ========= */ +/* ======================= */ \ No newline at end of file diff --git a/09-PWA/study2/05-notification/util.js b/09-PWA/study2/05-notification/util.js new file mode 100755 index 000000000..b7b3a650a --- /dev/null +++ b/09-PWA/study2/05-notification/util.js @@ -0,0 +1,96 @@ +const request = require('request'); +const Datastore = require('nedb'); + +const db = new Datastore(); + +module.exports.get = function (url, opt = {}) { + return new Promise((r, j) => { + request.get(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.post = function (url, opt = {}) { + return new Promise((r, j) => { + request.post(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.saveRecord = function (obj) { + let {uniqueid, subscription} = obj; + return new Promise((r, j) => { + db.findOne({'subscription.endpoint': subscription.endpoint}, (err, res) => { + if (err) { + j(err); + return; + } + if (res) { + console.log('已存在'); + res.uniqueid = uniqueid; + db.update({subscription}, res, {}, err => { + if (err) { + j(err); + return; + } + r(obj); + }); + return; + } + db.insert(obj, (err, item) => { + if (err) { + j(err); + return; + } + console.log('存储完毕'); + r(obj); + }); + }); + }); +}; + +module.exports.findAll = function () { + return new Promise((r, j) => { + db.find({}, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.find = function (query) { + return new Promise((r, j) => { + db.find(query, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.remove = function (obj) { + return new Promise((r, j) => { + db.remove(obj, {multi: true}, (err, num) => { + if (err) { + j(err); + return; + } + r(num); + }); + }); +}; \ No newline at end of file diff --git a/09-PWA/study2/06-sync/.commitlintrc.js b/09-PWA/study2/06-sync/.commitlintrc.js new file mode 100755 index 000000000..be2a5fd98 --- /dev/null +++ b/09-PWA/study2/06-sync/.commitlintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: [ + '@commitlint/config-conventional' + ], + rules: { + } +}; \ No newline at end of file diff --git a/09-PWA/study2/06-sync/.gitignore b/09-PWA/study2/06-sync/.gitignore new file mode 100755 index 000000000..564309e28 --- /dev/null +++ b/09-PWA/study2/06-sync/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +.vscode/ +package-lock.json \ No newline at end of file diff --git a/09-PWA/study2/06-sync/README.md b/09-PWA/study2/06-sync/README.md new file mode 100755 index 000000000..f36bb5416 --- /dev/null +++ b/09-PWA/study2/06-sync/README.md @@ -0,0 +1,438 @@ +## 1. 引言 +生活中经常会有这样的场景: + +用户拿出手机,浏览着我们的网站,发现了一个很有趣的信息,点击了“提交”按钮。然而不幸的是,这时用户到了一个网络环境极差的地方,或者是根本没有网络。他能够做的只有看着页面上的提示框和不断旋转的等待小圆圈。1s、5s、30s、1min……无尽的等待后,用户将手机放回了口袋,而这一次的请求也被终止了——由于当下极差的网络终止在了客户端。 + +上面的场景其实暴露了两个问题: + +1. 普通的页面发起的请求会随着浏览器进程的结束/或者Tab页面的关闭而终止; +2. 无网环境下,没有一种机制能“维持”住该请求,以待有网情况下再进行请求。 + +然而,Service Worker的后台同步功能规避了这些缺陷。下面就让我们先来了解下后台同步(Background Sync)的工作原理。 + +## 2. 后台同步是如何工作的? + +后台同步应该算是Service Worker相关功能(API)中比较易于理解与使用的一个。 + +其大致的流程如下: + +![](https://user-gold-cdn.xitu.io/2018/5/13/1635905056b125a7?w=573&h=129&f=png&s=8623) + +1. 首先,你需要在Service Worker中监听sync事件; +2. 然后,在浏览器中发起后台同步sync(图中第一步); +3. 之后,会触发Service Worker的sync事件,在该监听的回调中进行操作,例如向后端发起请求(图中第二步) +4. 最后,可以在Service Worker中对服务端返回的数据进行处理。 + +由于Service Worker在用户关闭该网站后仍可以运行,因此该流程名为“后台同步”实在是非常贴切。 + +怎么样,在我们已经有了一定的Service Worker基础之后,后台同步这一功能相比之前的功能,是不是非常易于理解? + +## 3. 如何使用后台同步功能? + +既然已经理解了该功能的大致流程,那么接下来就让我们来实际操作一下吧。 + +### 3.1 client触发sync事件 + +```javascript +// index.js +navigator.serviceWorker.ready.then(function (registration) { + var tag = "sample_sync"; + document.getElementById('js-sync-btn').addEventListener('click', function () { + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); +}); +``` +由于后台同步功能需要在Service Worker注册完成后触发,因此较好的一个方式是在`navigator.serviceWorker.ready`之后绑定相关操作。例如上面的代码中,我们在ready后绑定了按钮的点击事件。当按钮被点击后,会使用`registration.sync.register()`方法来触发Service Worker的sync事件。 + +`registration.sync`返回一个[`SyncManager`对象](https://developer.mozilla.org/en-US/docs/Web/API/SyncManager),其上包含`register`和`getTags`两个方法: + +> `register()` Create a new sync registration and return a Promise. + +> `getTags()` Return a list of developer-defined identifiers for SyncManager registration. + +`register()`方法可以注册一个后台同步事件,其中接收的参数`tag`用于作为这个后台同步的唯一标识。 + +当然,如果想要代码更健壮的话,我们还需要在调用前进行特性检测: + +```javascript +// index.js +if ('serviceWorker' in navigator && 'SyncManager' in window) { + // …… +} +``` + +### 3.2 在Service Worker中监听sync事件 +当client触发了sync事件后,剩下的就交给Service Worker。理论上此时就不需要client(前端站点)参与了。例如另一个经典场景:用户离开时页面(unload)时在client端触发sync事件,剩下的操作交给Service Worker,Service Worker的操作可以在离开页面后正常进行。 + +像添加fetch和push事件监听那样,我们可以为Service Worker添加sync事件的监听: + +```javascript +// sw.js +self.addEventListener('sync', function (e) { + // …… +}); +``` + +在sync事件的event对象上可以取到tag值,该值就是我们在上一节注册sync时的唯一标识。通过这个tag就可以区分出不同的后台同步事件。例如,当该值为'sample_sync'时我们向后端发送一个请求: + +```javascript +// sw.js +self.addEventListener('sync', function (e) { + console.log(`service worker需要进行后台同步,tag: ${e.tag}`); + var init = { + method: 'GET' + }; + if (e.tag === 'sample_sync') { + var request = new Request(`sync?name=AlienZHOU`, init); + e.waitUntil( + fetch(request).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } +}); +``` +这里我通过`e.tag`来判断client触发的不同sync事件,并在监听到tag为'sample_sync'的sync事件后,构建了一个request对象,使用fetch API来进行后端请求。 + +需要特别注意的是,fetch请求一定要放在`e.waitUntil()`内。因为我们要保证“后台同步”,将Promise对象放在`e.waitUntil()`内可以确保在用户离开我们的网站后,Service Worker会持续在后台运行,等待该请求完成。 + +### 3.3 完善我们的后端服务 +实际上,经过上面两小节,我们的大致工作已经完成。不过还缺少一个小环节:我们的KOA服务器上还没有sync路由和接口。添加一下,以保证demo可以正常运行: + +```javascript +// app.js +router.get('/sync', async (ctx, next) => { + console.log(`Hello ${ctx.request.query.name}, I have received your msg`); + ctx.response.body = { + status: 0 + }; +}); +``` + +### 3.4 Demo效果展示 + +下面就来看一下这个demo的运行效果: + +![](https://user-gold-cdn.xitu.io/2018/5/13/1635975104e68836?w=800&h=499&f=gif&s=1947627) + +可以看到,在网络环境正常的情况下,点击“同步”按钮会立即触发Service Worker中的sync事件监听,并向服务端发送请求;而在断网情况下,点击“同步”按钮,控制台虽然显示注册了同步事件,但是并不会触发Service Worker的sync监听回调,指到恢复网络连接,才会在后台(Service Worker)中进行相关处理。 + +下面再来看一下触发sync事件后,关闭网站的效果: + +![](https://user-gold-cdn.xitu.io/2018/5/13/163598ca174364ed?w=800&h=499&f=gif&s=2269837) + +可以看到,即使在关闭网站后再重新连接网络,服务端依然可以收到来自客户端的请求(说明Service Worker在后台进行了相关处理)。 + +## 4. 如何在后台同步时获取所需的数据? + +其实上一节结束,我们就已经可以了解最基础的后台同步功能了。而这部分则会进一步探讨后台同步中的一个重要问题:如何在后台同步时获取并发送client中的数据? + +例如在我们的上一个Demo中,用户的姓名name是硬编码在Service Worker中的,而实际上,我们希望能在页面上提供一个输入框,将用户的输入内容在后台同步中进行发送。 + +实现的方式有两种:使用postMessage或使用indexedDB。 + +### 4.1 使用postMessage + +我们知道,在浏览器主线程与Web Worker线程之间可以通过postMessage来进行通信。因此,我们也可以使用这个方法来向Service Worker“传输”数据。 + +大致思路如下: + +1. client触发sync事件; +2. 在sync注册完成后,使用postMessage和Service Worker通信; +3. 在Service Worker的sync事件回调中等待message事件的消息; +4. 收到message事件的消息后,将其中的信息提交到服务端。 + +```javascript +// index.js +// 使用postMessage来传输sync数据 +navigator.serviceWorker.ready.then(function (registration) { + var tag = 'sample_sync_event'; + + document.getElementById('js-sync-event-btn').addEventListener('click', function () { + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + + // 使用postMessage进行数据通信 + var inputValue = document.querySelector('#js-search-input').value; + var msg = JSON.stringify({type: 'bgsync', msg: {name: inputValue}}); + navigator.serviceWorker.controller.postMessage(msg); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); +}); +``` + +在`registration.sync.register`完成后,调用`navigator.serviceWorker.controller.postMessage`来向Service Worker Post数据。 + +为了提高代码的可维护性,我在sw.js中创建了一个`SimpleEvent`类,你可以把它看做一个最简单的EventBus。用来解耦Service Worker的message事件和sync事件。 + +```javascript +// sw.js +class SimpleEvent { + constructor() { + this.listenrs = {}; + } + + once(tag, cb) { + this.listenrs[tag] || (this.listenrs[tag] = []); + this.listenrs[tag].push(cb); + } + + trigger(tag, data) { + this.listenrs[tag] = this.listenrs[tag] || []; + let listenr; + while (listenr = this.listenrs[tag].shift()) { + listenr(data) + } + } +} +``` + +在message事件中监听client发来的消息,并通过SimpleEvent通知所有监听者。 + +```javascript +// sw.js +const simpleEvent = new SimpleEvent(); +self.addEventListener('message', function (e) { + var data = JSON.parse(e.data); + var type = data.type; + var msg = data.msg; + console.log(`service worker收到消息 type:${type};msg:${JSON.stringify(msg)}`); + + simpleEvent.trigger(type, msg); +}); +``` + +在sync事件中,使用SimpleEvent监听bgsync来获取数据,然后再调用fetch方法。注意,由于`e.waitUntil()`需要接收Promise作为参数,因此需要对`SimpleEvent.once`进行Promisfy。 + +```javascript +// sw.js +self.addEventListener('sync', function (e) { + if (e.tag === xxx) { + // …… + } + + // sample_sync_event同步事件,使用postMessage来进行数据通信 + else if (e.tag === 'sample_sync_event') { + // 将SimpleEvent.once封装为Promise调用 + let msgPromise = new Promise(function (resolve, reject) { + // 监听message事件中触发的事件通知 + simpleEvent.once('bgsync', function (data) { + resolve(data); + }); + // 五秒超时 + setTimeout(resolve, 5000); + }); + + e.waitUntil( + msgPromise.then(function (data) { + var name = data && data.name ? data.name : 'anonymous'; + var request = new Request(`sync?name=${name}`, init); + return fetch(request) + }).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } +}); +``` + +是不是非常简单? + +![](https://user-gold-cdn.xitu.io/2018/5/14/1635a5723bed476c?w=800&h=499&f=gif&s=2772919) + +进行后台同步时,使用postMessage来实现client向Service Worker的传输数据,方便与直观,是一个不错的方法。 + +### 4.2 使用indexedDB + +在client与Servcie Worker之间同步数据,还有一个可行的思路:client先将数据存在某处,待Servcie Worker需要时再读取使用即可。 + +为此需要找一个存数据的地方。你第一个想到的可能就是localStorage了。 + +然而,不知道你是否还记得我在最开始介绍Service Worker时所提到的,为了保证性能,实现部分操作的非阻塞,在Service Worker中我们经常会碰到异步操作(因此大多数API都是Promise形式的)。那么像localStorage这样的同步API会变成异步化么?答案很简单:不会,并且localStorage在Servcie Worker中无法调用。 + +不过不要气馁,我们还另一个强大的数据存储方式——indexedDB。它是可以在Service Worker中使用的。对于indexedDB的使用方式,本系列后续会有文章具体介绍,因此在这里的就不重点讲解indexedDB的使用方式了。 + +首先,需要一个方法用于连接数据库并创建相应的store: + +```javascript +// index.js +function openStore(storeName) { + return new Promise(function (resolve, reject) { + if (!('indexedDB' in window)) { + reject('don\'t support indexedDB'); + } + var request = indexedDB.open('PWA_DB', 1); + request.onerror = function(e) { + console.log('连接数据库失败'); + reject(e); + } + request.onsuccess = function(e) { + console.log('连接数据库成功'); + resolve(e.target.result); + } + request.onupgradeneeded = function (e) { + console.log('数据库版本升级'); + var db = e.srcElement.result; + if (e.oldVersion === 0) { + if (!db.objectStoreNames.contains(storeName)) { + var store = db.createObjectStore(storeName, { + keyPath: 'tag' + }); + store.createIndex(storeName + 'Index', 'tag', {unique: false}); + console.log('创建索引成功'); + } + } + } + }); +} +``` + +然后,在`navigator.serviceWorker.ready`中打开该数据库连接,并在点击按钮时,先将数据存入indexedDB,再注册sync: + +```javascript +// index.js +navigator.serviceWorker.ready.then(function (registration) { + return Promise.all([ + openStore(STORE_NAME), + registration + ]); +}).then(function (result) { + var db = result[0]; + var registration = result[1]; + var tag = 'sample_sync_db'; + + document.getElementById('js-sync-db-btn').addEventListener('click', function () { + // 将数据存储进indexedDB + var inputValue = document.querySelector('#js-search-input').value; + var tx = db.transaction(STORE_NAME, 'readwrite'); + var store = tx.objectStore(STORE_NAME); + var item = { + tag: tag, + name: inputValue + }; + store.put(item); + + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); +}); +``` + +同样的,在Service Worker中也需要相应的数据库连接方法: + +```javascript +// sw.js +function openStore(storeName) { + return new Promise(function (resolve, reject) { + var request = indexedDB.open('PWA_DB', 1); + request.onerror = function(e) { + console.log('连接数据库失败'); + reject(e); + } + request.onsuccess = function(e) { + console.log('连接数据库成功'); + resolve(e.target.result); + } + }); +} +``` + +并且在sync事件的回调中,get到indexedDB中对应的数据,最后再向后端发送请求: + +```javascript +// index.js +self.addEventListener('sync', function (e) { + if (e.tag === xxx) { + // …… + } + else if (e.tag === yyy) { + // …… + } + + // sample_sync_db同步事件,使用indexedDB来获取需要同步的数据 + else if (e.tag === 'sample_sync_db') { + // 将数据库查询封装为Promise类型的请求 + var dbQueryPromise = new Promise(function (resolve, reject) { + var STORE_NAME = 'SyncData'; + // 连接indexedDB + openStore(e.tag).then(function (db) { + try { + // 创建事务进行数据库查询 + var tx = db.transaction(STORE_NAME, 'readonly'); + var store = tx.objectStore(STORE_NAME); + var dbRequest = store.get(e.tag); + dbRequest.onsuccess = function (e) { + resolve(e.target.result); + }; + dbRequest.onerror = function (err) { + reject(err); + }; + } + catch (err) { + reject(err); + } + }); + }); + + e.waitUntil( + // 通过数据库查询获取需要同步的数据 + dbQueryPromise.then(function (data) { + console.log(data); + var name = data && data.name ? data.name : 'anonymous'; + var request = new Request(`sync?name=${name}`, init); + return fetch(request) + }).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } +}); +``` + +相比于postMessage,使用indexedDB的方案要更复杂一点。它比较适用于一些需要数据持久化的场景。 + +![](https://user-gold-cdn.xitu.io/2018/5/14/1635a579ba845ce7?w=800&h=499&f=gif&s=953776) + +## 5. 兼容性 + +依照惯例,我们还是来简单看一下文中相关功能的兼容性。 + +先是[Background Sync](https://caniuse.com/#search=Background%20Sync%20API): + +![](https://user-gold-cdn.xitu.io/2018/5/13/16359f504955c8b8?w=1240&h=592&f=png&s=134469) + +令人悲伤的是,基本只有Google自家的Chrome可用。 + +然后是[indexedDB](https://caniuse.com/#search=indexedDB): + +![](https://user-gold-cdn.xitu.io/2018/5/13/16359f671e79ba6b?w=1240&h=580&f=png&s=155435) + +相较于Background Sync还是有着不错的兼容性的。而且在safari(包括iOS safari)中也得到了支持。 + +## 6. 写在最后 +从文中的内容以及[google developer中的一些实例](https://developers.google.com/web/updates/2015/12/background-sync#the_solution)来看,Background Sync是一个非常有潜力的API。然而令人堪忧的兼容性在一定程度上限制了它的发挥空间。不过,作为一项技术,还是非常值得我们学习与了解的。 + +本文中所有的代码示例均可以在[learn-pwa/sync](https://github.com/alienzhou/learning-pwa/tree/sync)上找到。 + +如果你喜欢或想要了解更多的PWA相关知识,欢迎关注我,关注[《PWA学习与实践》](https://juejin.im/user/59ad5377518825244d206d2d/posts)系列文章。我会总结整理自己学习PWA过程的遇到的疑问与技术点,并通过实际代码和大家一起实践。 + +到目前为止,我们已经学习了PWA中的多个知识点,在其基础上,已经可以帮助我们进行原有站点的PWA升级。学习是一方面,实践是另一方面。在下一篇文章里,我会整理一些在业务中升级PWA时碰到的问题,以及对应的解决方案。 + +## 参考资料 +- [Web Background Synchronization](https://wicg.github.io/BackgroundSync/spec/) +- [MDN: SyncManager](https://developer.mozilla.org/en-US/docs/Web/API/SyncManager) +- [MDN: SyncManager.register()](https://developer.mozilla.org/en-US/docs/Web/API/SyncManager/register) +- [MDN: SyncRegistration](https://developer.mozilla.org/en-US/docs/Web/API/SyncRegistration) +- [Introducing Background Sync](https://developers.google.com/web/updates/2015/12/background-sync) diff --git a/09-PWA/study2/06-sync/app.js b/09-PWA/study2/06-sync/app.js new file mode 100755 index 000000000..21b3827a2 --- /dev/null +++ b/09-PWA/study2/06-sync/app.js @@ -0,0 +1,114 @@ +const util = require('./util'); +const http = require('http'); +const Koa = require('koa'); +const serve = require('koa-static'); +const Router = require('koa-router'); +const koaBody = require('koa-body'); +const webpush = require('web-push'); + +const port = process.env.PORT || 8085; +const app = new Koa(); +const router = new Router(); + +/** + * 根据关键词获取图书信息 + */ +router.get('/book', async (ctx, next) => { + let query = ctx.request.query; + let {q, fields} = query; + let url = `https://api.douban.com/v2/book/search?q=${q}&fields=${fields}&count=10`; + let res = await util.get(url); + ctx.response.body = res; +}); + +/* ===================== */ +/* 使用web-push进行消息推送 */ +/* ===================== */ +const options = { + // proxy: 'http://localhost:1087' // 使用FCM(Chrome)需要配置代理 +}; + +/** + * VAPID值 + */ +const vapidKeys = { + publicKey: 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A', + privateKey: 'TVe_nJlciDOn130gFyFYP8UiGxxWd3QdH6C5axXpSgM' +}; + +// 设置web-push的VAPID值 +webpush.setVapidDetails( + 'mailto:alienzhou16@163.com', + vapidKeys.publicKey, + vapidKeys.privateKey +); + +/** + * 提交subscription信息,并保存 + */ +router.post('/subscription', koaBody(), async ctx => { + let body = ctx.request.body; + await util.saveRecord(body); + ctx.response.body = { + status: 0 + }; +}); + + +/** + * 向push service推送信息 + * @param {*} subscription + * @param {*} data + */ +function pushMessage(subscription, data = {}) { + webpush.sendNotification(subscription, data, options).then(data => { + console.log('push service的相应数据:', JSON.stringify(data)); + return; + }).catch(err => { + // 判断状态码,440和410表示失效 + if (err.statusCode === 410 || err.statusCode === 404) { + return util.remove(subscription); + } + else { + console.log(subscription); + console.log(err); + } + }) +} + +/** + * 消息推送API,可以在管理后台进行调用 + * 本例子中,可以直接post一个请求来查看效果 + */ +router.post('/push', koaBody(), async ctx => { + let {uniqueid, payload} = ctx.request.body; + let list = uniqueid ? await util.find({uniqueid}) : await util.findAll(); + let status = list.length > 0 ? 0 : -1; + + for (let i = 0; i < list.length; i++) { + let subscription = list[i].subscription; + pushMessage(subscription, JSON.stringify(payload)); + } + + ctx.response.body = { + status + }; +}); +/* ===================== */ + +/* ================================ */ +/* 添加一个接口,用以相应后台同步内的请求 */ +/* ================================ */ +router.get('/sync', async (ctx, next) => { + console.log(`Hello ${ctx.request.query.name}, I have received your msg`); + ctx.response.body = { + status: 0 + }; +}); +/* ================================ */ + +app.use(router.routes()); +app.use(serve(__dirname + '/public')); +app.listen(port, () => { + console.log(`listen on port: ${port}`); +}); \ No newline at end of file diff --git a/09-PWA/study2/06-sync/package.json b/09-PWA/study2/06-sync/package.json new file mode 100755 index 000000000..3fcd83595 --- /dev/null +++ b/09-PWA/study2/06-sync/package.json @@ -0,0 +1,47 @@ +{ + "name": "learning-pwa", + "version": "0.1.0", + "description": "some samples and blogs about how to start with your first PWA", + "main": "app.js", + "scripts": { + "start": "node app.js", + "release": "standard-version", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/alienzhou/learning-pwa.git" + }, + "keywords": [ + "PWA", + "koa", + "sample" + ], + "author": "alienzhou", + "license": "ISC", + "bugs": { + "url": "https://github.com/alienzhou/learning-pwa/issues" + }, + "homepage": "https://github.com/alienzhou/learning-pwa#readme", + "dependencies": { + "https-proxy-agent": "^2.2.1", + "koa": "^2.5.0", + "koa-body": "^2.5.0", + "koa-router": "^7.4.0", + "koa-static": "^4.0.2", + "nedb": "^1.8.0", + "request": "^2.85.0", + "web-push": "^3.3.0" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -e $GIT_PARAMS" + } + }, + "devDependencies": { + "@commitlint/cli": "^6.1.3", + "@commitlint/config-conventional": "^6.1.3", + "husky": "^0.15.0-rc.13", + "standard-version": "^4.3.0" + } +} diff --git a/09-PWA/study2/06-sync/public/base64util.js b/09-PWA/study2/06-sync/public/base64util.js new file mode 100755 index 000000000..b131f3e7a --- /dev/null +++ b/09-PWA/study2/06-sync/public/base64util.js @@ -0,0 +1,18 @@ +/** + * base64的相关操作,具体可以参考 + * https://github.com/web-push-libs/web-push#using-vapid-key-for-applicationserverkey + */ +window.urlBase64ToUint8Array = function (base64String) { + const padding = '='.repeat((4 - base64String.length % 4) % 4); + const base64 = (base64String + padding) + .replace(/\-/g, '+') + .replace(/_/g, '/'); + + const rawData = window.atob(base64); + const outputArray = new Uint8Array(rawData.length); + + for (let i = 0; i < rawData.length; ++i) { + outputArray[i] = rawData.charCodeAt(i); + } + return outputArray; +} \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/img/book.png b/09-PWA/study2/06-sync/public/img/book.png new file mode 100755 index 000000000..12bd77d1c Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/book.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-128.png b/09-PWA/study2/06-sync/public/img/icons/book-128.png new file mode 100755 index 000000000..744f006ff Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-128.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-144.png b/09-PWA/study2/06-sync/public/img/icons/book-144.png new file mode 100755 index 000000000..d03af1c14 Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-144.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-192.png b/09-PWA/study2/06-sync/public/img/icons/book-192.png new file mode 100755 index 000000000..a1c04b208 Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-192.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-256.png b/09-PWA/study2/06-sync/public/img/icons/book-256.png new file mode 100755 index 000000000..ad4789069 Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-256.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-32.png b/09-PWA/study2/06-sync/public/img/icons/book-32.png new file mode 100755 index 000000000..2fa6a9faf Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-32.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-512.png b/09-PWA/study2/06-sync/public/img/icons/book-512.png new file mode 100755 index 000000000..bb5b0f380 Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-512.png differ diff --git a/09-PWA/study2/06-sync/public/img/icons/book-72.png b/09-PWA/study2/06-sync/public/img/icons/book-72.png new file mode 100755 index 000000000..e04b29572 Binary files /dev/null and b/09-PWA/study2/06-sync/public/img/icons/book-72.png differ diff --git a/09-PWA/study2/06-sync/public/img/loading.svg b/09-PWA/study2/06-sync/public/img/loading.svg new file mode 100755 index 000000000..2e10b2c49 --- /dev/null +++ b/09-PWA/study2/06-sync/public/img/loading.svg @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/index.html b/09-PWA/study2/06-sync/public/index.html new file mode 100755 index 000000000..4515552a8 --- /dev/null +++ b/09-PWA/study2/06-sync/public/index.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + PWA: 图书搜索 + + +
              + + + + + + + +
              +
              +
              +
              +
                + - 本Demo基于豆瓣API,感谢豆瓣开放平台 - +
                +
                +

                + 讲解如何用Node构建可扩展因特网应用,是全面的实用指南, + 除了详细介绍Node提供的API外,还用大量篇幅介绍了服务 + 器事件驱动开发的重要概念。内容涉及跨服务器的并发连接、 + 非阻塞I/O和事件驱动的编程、如何支持各种数据库和数据存 + 储工具、NodeAPI的使用示例等。适合对JavaScript及编程 + 有一定程度了解的读者阅读。 +

                +
                + + + + \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/index.js b/09-PWA/study2/06-sync/public/index.js new file mode 100755 index 000000000..807b97e5e --- /dev/null +++ b/09-PWA/study2/06-sync/public/index.js @@ -0,0 +1,437 @@ +(function() { + /** + * 生成书籍列表卡片(dom元素) + * @param {Object} book 书籍相关数据 + */ + function createCard(book) { + var li = document.createElement('li'); + // var img = document.createElement('img'); + var title = document.createElement('div'); + var author = document.createElement('div'); + var desc = document.createElement('div'); + var publisher = document.createElement('span'); + var price = document.createElement('span'); + title.className = 'title'; + author.className = 'author'; + desc.className = 'desc'; + // img.src = book.image; + title.innerText = book.title; + author.innerText = book.author; + publisher.innerText = book.publisher; + price.innerText = book.price; + + book.publisher && desc.appendChild(publisher); + book.price && desc.appendChild(price); + // li.appendChild(img); + li.appendChild(title); + li.appendChild(author); + li.appendChild(desc); + + return li; + } + + /** + * 根据获取的数据列表,生成书籍展示列表 + * @param {Array} list 书籍列表数据 + */ + function fillList(list) { + list.forEach(function (book) { + var node = createCard(book); + document.querySelector('#js-list').appendChild(node); + }); + } + + /** + * 控制tip展示与显示的内容 + * @param {string | undefined} text tip的提示内容 + */ + function tip(text) { + if (text === undefined) { + document.querySelector('#js-tip').style = 'display: none'; + } + else { + document.querySelector('#js-tip').innerHTML = text; + document.querySelector('#js-tip').style = 'display: block'; + } + } + + /** + * 控制loading动画的展示 + * @param {boolean | undefined} isloading 是否展示loading + */ + function loading(isloading) { + if (isloading) { + tip(); + document.querySelector('#js-loading').style = 'display: block'; + } + else { + document.querySelector('#js-loading').style = 'display: none'; + } + } + + /** + * 根据用户输入结果 + * 使用XMLHttpRequest查询并展示数据列表 + */ + function queryBook() { + var input = document.querySelector('#js-search-input'); + var query = input.value; + var xhr = new XMLHttpRequest(); + var url = '/book?q=' + query + '&fields=id,title,image,author,publisher,price'; + var cacheData; + if (query === '') { + tip('请输入关键词'); + return; + } + document.querySelector('#js-list').innerHTML = ''; + document.querySelector('#js-thanks').style = 'display: none'; + loading(true); + var remotePromise = getApiDataRemote(url); + getApiDataFromCache(url).then(function (data) { + if (data) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + cacheData = data || {}; + return remotePromise; + }).then(function (data) { + if (JSON.stringify(data) !== JSON.stringify(cacheData)) { + loading(false); + input.blur(); + fillList(data.books); + document.querySelector('#js-thanks').style = 'display: block'; + } + }); + } + + /** + * 监听“搜索”按钮点击事件 + */ + document.querySelector('#js-search-btn').addEventListener('click', function () { + queryBook(); + }); + + /** + * 监听“回车”事件 + */ + window.addEventListener('keypress', function (e) { + if (e.keyCode === 13) { + queryBook(); + } + }); + + /** + * 获取该请求的缓存数据 + * @param {string} url 请求的url + * @return {Promise} + */ + function getApiDataFromCache(url) { + if ('caches' in window) { + return caches.match(url).then(function (cache) { + if (!cache) { + return; + } + return cache.json(); + }); + } + else { + return Promise.resolve(); + } + } + + function getApiDataRemote(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('GET', url, true); + xhr.send(null); + }); + } + + /* ========================================== */ + /* service worker push 与 notification 相关部分 */ + /* ========================================== */ + /** + * 注意这里修改了前一篇文章中service worker注册部分的代码 + * 将service worker的注册封装为一个方法,方便使用 + * @param {string} file service worker文件路径 + * @return {Promise} + */ + function registerServiceWorker(file) { + return navigator.serviceWorker.register(file); + } + + /** + * 用户订阅相关的push信息 + * 会生成对应的pushSubscription数据,用于标识用户与安全验证 + * @param {ServiceWorker Registration} registration + * @param {string} publicKey 公钥 + * @return {Promise} + */ + function subscribeUserToPush(registration, publicKey) { + var subscribeOptions = { + userVisibleOnly: true, + applicationServerKey: window.urlBase64ToUint8Array(publicKey) + }; + return registration.pushManager.subscribe(subscribeOptions).then(function (pushSubscription) { + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return pushSubscription; + }); + } + + /** + * 将浏览器生成的subscription信息提交到服务端 + * 服务端保存该信息用于向特定的客户端用户推送 + * @param {string} body 请求体 + * @param {string} url 提交的api路径,默认为/subscription + * @return {Promise} + */ + function sendSubscriptionToServer(body, url) { + url = url || '/subscription'; + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.timeout = 60000; + xhr.onreadystatechange = function () { + var response = {}; + if (xhr.readyState === 4 && xhr.status === 200) { + try { + response = JSON.parse(xhr.responseText); + } + catch (e) { + response = xhr.responseText; + } + resolve(response); + } + else if (xhr.readyState === 4) { + resolve(); + } + }; + xhr.onabort = reject; + xhr.onerror = reject; + xhr.ontimeout = reject; + xhr.open('POST', url, true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(body); + }); + } + + if ('serviceWorker' in navigator && 'PushManager' in window) { + var publicKey = 'BOEQSjdhorIf8M0XFNlwohK3sTzO9iJwvbYU-fuXRF0tvRpPPMGO6d_gJC_pUQwBT7wD8rKutpNTFHOHN3VqJ0A'; + // 注册service worker + registerServiceWorker('./sw.js').then(function (registration) { + return Promise.all([ + registration, + askPermission() + ]) + }).then(function (result) { + var registration = result[0]; + /* ===== 添加提醒功能 ====== */ + document.querySelector('#js-notification-btn').addEventListener('click', function () { + var title = 'PWA即学即用'; + var options = { + body: '邀请你一起学习', + icon: '/img/icons/book-128.png', + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + registration.showNotification(title, options); + }); + /* ======================= */ + + console.log('Service Worker 注册成功'); + + // 开启该客户端的消息推送订阅功能 + return subscribeUserToPush(registration, publicKey); + + }).then(function (subscription) { + var body = {subscription: subscription}; + + // 为了方便之后的推送,为每个客户端简单生成一个标识 + body.uniqueid = new Date().getTime(); + console.log('uniqueid', body.uniqueid); + + // 将生成的客户端订阅信息存储在自己的服务器上 + return sendSubscriptionToServer(JSON.stringify(body)); + }).then(function (res) { + console.log(res); + }).catch(function (err) { + console.log(err); + }); + } + + /* ======= 消息通信 ======= */ + if ('serviceWorker' in navigator) { + navigator.serviceWorker.addEventListener('message', function (e) { + var action = e.data; + console.log(`receive post-message from sw, action is '${e.data}'`); + switch (action) { + case 'show-book': + location.href = 'https://book.douban.com/subject/20515024/'; + break; + case 'contact-me': + location.href = 'mailto:someone@sample.com'; + break; + default: + document.querySelector('.panel').classList.add('show'); + break; + } + }); + } + /* ======================= */ + + /** + * 获取用户授权,将 + */ + function askPermission() { + return new Promise(function (resolve, reject) { + var permissionResult = Notification.requestPermission(function (result) { + resolve(result); + }); + + if (permissionResult) { + permissionResult.then(resolve, reject); + } + }).then(function (permissionResult) { + if (permissionResult !== 'granted') { + throw new Error('We weren\'t granted permission.'); + } + }); + } + /* ========================================== */ + /* ================== fin =================== */ + /* ========================================== */ + + + + /* ========================================== */ + /* service worker background sync 相关部分 */ + /* ========================================== */ + var STORE_NAME = 'SyncData'; + if ('serviceWorker' in navigator && 'SyncManager' in window) { + // 一个background sync的基础版 + navigator.serviceWorker.ready.then(function (registration) { + var tag = 'sample_sync'; + + document.getElementById('js-sync-btn').addEventListener('click', function () { + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); + }); + + // 使用postMessage来传输sync数据 + navigator.serviceWorker.ready.then(function (registration) { + var tag = 'sample_sync_event'; + + document.getElementById('js-sync-event-btn').addEventListener('click', function () { + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + + // 使用postMessage进行数据通信 + var inputValue = document.querySelector('#js-search-input').value; + var msg = JSON.stringify({type: 'bgsync', msg: {name: inputValue}}); + navigator.serviceWorker.controller.postMessage(msg); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); + }); + + // 使用indexedDB来传输sync数据 + navigator.serviceWorker.ready.then(function (registration) { + return Promise.all([ + openStore(STORE_NAME), + registration + ]); + }).then(function (result) { + var db = result[0]; + var registration = result[1]; + var tag = 'sample_sync_db'; + + document.getElementById('js-sync-db-btn').addEventListener('click', function () { + // 将数据存储进indexedDB + var inputValue = document.querySelector('#js-search-input').value; + var tx = db.transaction(STORE_NAME, 'readwrite'); + var store = tx.objectStore(STORE_NAME); + var item = { + tag: tag, + name: inputValue + }; + store.put(item); + + registration.sync.register(tag).then(function () { + console.log('后台同步已触发', tag); + }).catch(function (err) { + console.log('后台同步触发失败', err); + }); + }); + }); + } + + /** + * 连接并打开存储,使用indexedDB + * @param {string} storeName 存储的名称 + * @return {Promise} + */ + function openStore(storeName) { + return new Promise(function (resolve, reject) { + if (!('indexedDB' in window)) { + reject('don\'t support indexedDB'); + } + var request = indexedDB.open('PWA_DB', 1); + request.onerror = function(e) { + console.log('连接数据库失败'); + reject(e); + } + request.onsuccess = function(e) { + console.log('连接数据库成功'); + resolve(e.target.result); + } + request.onupgradeneeded = function (e) { + console.log('数据库版本升级'); + var db = e.srcElement.result; + if (e.oldVersion === 0) { + if (!db.objectStoreNames.contains(storeName)) { + var store = db.createObjectStore(storeName, { + keyPath: 'tag' + }); + store.createIndex(storeName + 'Index', 'tag', {unique: false}); + console.log('创建索引成功'); + } + } + } + }); + } + /* ========================================== */ + /* ================== fin =================== */ + /* ========================================== */ +})(); \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/manifest.json b/09-PWA/study2/06-sync/public/manifest.json new file mode 100755 index 000000000..e8cf3be7d --- /dev/null +++ b/09-PWA/study2/06-sync/public/manifest.json @@ -0,0 +1,39 @@ +{ + "name": "图书搜索", + "short_name": "书查", + "start_url": "/", + "display": "standalone", + "background_color": "#333", + "description": "一个搜索图书的小WebAPP(基于豆瓣开放接口)", + "orientation": "portrait-primary", + "theme_color": "#5eace0", + "icons": [{ + "src": "img/icons/book-32.png", + "sizes": "32x32", + "type": "image/png" + }, { + "src": "img/icons/book-72.png", + "sizes": "72x72", + "type": "image/png" + }, { + "src": "img/icons/book-128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "img/icons/book-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "img/icons/book-192.png", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "img/icons/book-256.png", + "sizes": "256x256", + "type": "image/png" + }, { + "src": "img/icons/book-512.png", + "sizes": "512x512", + "type": "image/png" + }] +} \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/style.css b/09-PWA/study2/06-sync/public/style.css new file mode 100755 index 000000000..c8567d718 --- /dev/null +++ b/09-PWA/study2/06-sync/public/style.css @@ -0,0 +1,200 @@ +:root { + --gap: 16px; + --contentMargin: 10px; +} + +*, *::after, *::before { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +header { + margin: 0; + padding: var(--gap); + width: 100%; + color: #fff; + background: #000; + overflow: hidden; +} + +header > .logo { + --iconWidth: 25px; + margin-right: var(--gap); + padding-left: calc(var(--iconWidth) + 2px); + background: url(/img/book.png) 0 center no-repeat; + background-size: var(--iconWidth); + vertical-align: middle; + font-size: 30px; +} + +header > input { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 10px; + margin-right: 5px; + width: 180px; + background: #555; + color: #fff; + line-height: 30px; + font-size: 14px; +} + +header > button { + border-radius: 3px; + border: none; + outline: none; + padding: 5px 8px 5px 12px; + background: rgb(17, 149, 72); + color: #fff; + line-height: 20px; + font-size: 12px; + letter-spacing: 4px; +} + +main { + text-align: center; +} + +.loading { + display: none; + margin: 200px auto; + width: 80px; + height: 80px; + background: url(/img/loading.svg) 0 0 no-repeat; +} + +.tip { + display: none; + margin: 200px 0; + text-align: center; + font-size: 20px; +} + +.list { + margin: 0; + padding: var(--gap); +} + +.list > li { + border-bottom: 1px solid #eee; + list-style: none; + padding-bottom: calc(var(--gap) / 2); + margin-bottom: calc(var(--gap) / 2); +} + +.list > li::after { + content: ''; + display: block; + clear: both; +} + +/* .list > li > img { + float: left; + border-radius: 3px; + margin-right: var(--contentMargin); + width: 82px; + height: 110px; +} */ + +.list > li > .title { + margin-bottom: var(--contentMargin); + font-size: 18px; + color: #222; + text-align: left; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.list > li > .author { + margin-bottom: var(--contentMargin); + font-size: 14px; + color: #222; + text-align: left; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.list > li > .desc { + text-align: left; + font-size: 14px; + color: #999; +} + +.list > li > .desc > span:first-child::after { + content: ''; + display: inline; + margin-right: var(--contentMargin); +} + +.thanks { + display: none; + padding: var(--gap); + text-decoration: none; + font-size: 12px; + color: #777; +} + +.notify-btn { + position: fixed; + bottom: 30px; + right: 20px; + background: #be4469; +} + +.sync-btn { + position: fixed; + bottom: 70px; + right: 20px; + background: #473d80; +} + +.sync-event-btn { + bottom: 150px; + letter-spacing: 0; +} + +.sync-db-btn { + bottom: 110px; + letter-spacing: 0; +} + +.panel { + position: fixed; + border-radius: 3px; + padding: 10px 20px; + width: 250px; + height: 100px; + left: -50px; + bottom: 30px; + z-index: -1; + opacity: 0; + box-shadow: 2px 5px 5px #afafaf; + overflow: hidden; + background: #f2f2f2; + transition: all .2s; +} + +.panel > p { + margin: 5px 0 0 0; + font-size: 13px; + color: #222; + overflow : hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; +} + +.panel.show { + left: 0; + z-index: 1; + opacity: 1; +} \ No newline at end of file diff --git a/09-PWA/study2/06-sync/public/sw.js b/09-PWA/study2/06-sync/public/sw.js new file mode 100755 index 000000000..0f2348e87 --- /dev/null +++ b/09-PWA/study2/06-sync/public/sw.js @@ -0,0 +1,282 @@ +/** + * service worker + */ +var cacheName = 'bs-0-2-0'; +var apiCacheName = 'api-0-1-1'; +var cacheFiles = [ + '/', + './index.html', + './base64util.js', + './index.js', + './style.css', + './img/book.png', + './img/loading.svg' +]; + +// 监听install事件,安装完成后,进行文件缓存 +self.addEventListener('install', function (e) { + console.log('Service Worker 状态: install'); + var cacheOpenPromise = caches.open(cacheName).then(function (cache) { + return cache.addAll(cacheFiles); + }); + e.waitUntil(cacheOpenPromise); +}); + +// 监听activate事件,激活后通过cache的key来判断是否更新cache中的静态资源 +self.addEventListener('activate', function (e) { + console.log('Service Worker 状态: activate'); + var cachePromise = caches.keys().then(function (keys) { + return Promise.all(keys.map(function (key) { + if (key !== cacheName && key !== apiCacheName) { + return caches.delete(key); + } + })); + }) + e.waitUntil(cachePromise); + // 注意不能忽略这行代码,否则第一次加载会导致fetch事件不触发 + return self.clients.claim(); +}); + +self.addEventListener('fetch', function (e) { + // 需要缓存的xhr请求 + var cacheRequestUrls = [ + '/book?' + ]; + console.log('现在正在请求:' + e.request.url); + + // 判断当前请求是否需要缓存 + var needCache = cacheRequestUrls.some(function (url) { + return e.request.url.indexOf(url) > -1; + }); + + if (needCache) { + // 需要缓存 + // 使用fetch请求数据,并将请求结果clone一份缓存到cache + // 此部分缓存后在browser中使用全局变量caches获取 + caches.open(apiCacheName).then(function (cache) { + return fetch(e.request).then(function (response) { + cache.put(e.request.url, response.clone()); + return response; + }); + }); + } + else { + // 非api请求,直接查询cache + // 如果有cache则直接返回,否则通过fetch请求 + e.respondWith( + caches.match(e.request).then(function (cache) { + return cache || fetch(e.request); + }).catch(function (err) { + console.log(err); + return fetch(e.request); + }) + ); + } +}); + +/* ======================================= */ +/* push处理相关部分,已添加对notification的调用 */ +/* ======================================= */ +self.addEventListener('push', function (e) { + var data = e.data; + if (e.data) { + data = data.json(); + console.log('push的数据为:', data); + var title = 'PWA即学即用'; + var options = { + body: data, + icon: '/img/icons/book-128.png', + image: '/img/icons/book-521.png', // no effect + actions: [{ + action: 'show-book', + title: '去看看' + }, { + action: 'contact-me', + title: '联系我' + }], + tag: 'pwa-starter', + renotify: true + }; + self.registration.showNotification(title, options); + } + else { + console.log('push没有任何数据'); + } +}); +/* ======================================= */ +/* ================= fin ================= */ +/* ======================================= */ + +/* ======================== */ +/* notification demo相关部分 */ +/* ======================= */ +self.addEventListener('notificationclick', function (e) { + var action = e.action; + console.log(`action tag: ${e.notification.tag}`, `action: ${action}`); + + switch (action) { + case 'show-book': + console.log('show-book'); + break; + case 'contact-me': + console.log('contact-me'); + break; + default: + console.log(`未处理的action: ${e.action}`); + action = 'default'; + break; + } + e.notification.close(); + + e.waitUntil( + // 获取所有clients + self.clients.matchAll().then(function (clients) { + if (!clients || clients.length === 0) { + self.clients.openWindow && self.clients.openWindow('http://127.0.0.1:8085'); + return; + } + clients[0].focus && clients[0].focus(); + clients.forEach(function (client) { + // 使用postMessage进行通信 + client.postMessage(action); + }); + }) + ); +}); +/* ======================= */ +/* ========= fin ========= */ +/* ======================= */ + + + +/* =========================== */ +/* background sync demo相关部分 */ +/* =========================== */ +class SimpleEvent { + constructor() { + this.listenrs = {}; + } + + once(tag, cb) { + this.listenrs[tag] || (this.listenrs[tag] = []); + this.listenrs[tag].push(cb); + } + + trigger(tag, data) { + this.listenrs[tag] = this.listenrs[tag] || []; + let listenr; + while (listenr = this.listenrs[tag].shift()) { + listenr(data) + } + } +} + +const simpleEvent = new SimpleEvent(); +self.addEventListener('sync', function (e) { + console.log(`service worker需要进行后台同步,tag: ${e.tag}`); + var init = { + method: 'GET' + }; + if (e.tag === 'sample_sync') { + var request = new Request(`sync?name=AlienZHOU`, init); + e.waitUntil( + fetch(request).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } + + // sample_sync_event同步事件,使用postMessage来进行数据通信 + else if (e.tag === 'sample_sync_event') { + let msgPromise = new Promise(function (resolve, reject) { + // 监听message事件中触发的事件通知 + simpleEvent.once('bgsync', function (data) { + resolve(data); + }); + // 五秒超时 + setTimeout(resolve, 5000); + }); + + e.waitUntil( + msgPromise.then(function (data) { + var name = data && data.name ? data.name : 'anonymous'; + var request = new Request(`sync?name=${name}`, init); + return fetch(request) + }).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } + + // sample_sync_db同步事件,使用indexedDB来获取需要同步的数据 + else if (e.tag === 'sample_sync_db') { + // 将数据库查询封装为Promise类型的请求 + var dbQueryPromise = new Promise(function (resolve, reject) { + var STORE_NAME = 'SyncData'; + // 连接indexedDB + openStore(e.tag).then(function (db) { + try { + // 创建事务进行数据库查询 + var tx = db.transaction(STORE_NAME, 'readonly'); + var store = tx.objectStore(STORE_NAME); + var dbRequest = store.get(e.tag); + dbRequest.onsuccess = function (e) { + resolve(e.target.result); + }; + dbRequest.onerror = function (err) { + reject(err); + }; + } + catch (err) { + reject(err); + } + }); + }); + + e.waitUntil( + // 通过数据库查询获取需要同步的数据 + dbQueryPromise.then(function (data) { + console.log(data); + var name = data && data.name ? data.name : 'anonymous'; + var request = new Request(`sync?name=${name}`, init); + return fetch(request) + }).then(function (response) { + response.json().then(console.log.bind(console)); + return response; + }) + ); + } +}); + +self.addEventListener('message', function (e) { + var data = JSON.parse(e.data); + var type = data.type; + var msg = data.msg; + console.log(`service worker收到消息 type:${type};msg:${JSON.stringify(msg)}`); + + simpleEvent.trigger(type, msg); +}); + +/** + * 连接并打开存储 + * @param {string} storeName 存储的名称 + * @return {Promise} + */ +function openStore(storeName) { + return new Promise(function (resolve, reject) { + var request = indexedDB.open('PWA_DB', 1); + request.onerror = function(e) { + console.log('连接数据库失败'); + reject(e); + } + request.onsuccess = function(e) { + console.log('连接数据库成功'); + resolve(e.target.result); + } + }); +} +/* =========================== */ +/* =========== fin =========== */ +/* =========================== */ diff --git a/09-PWA/study2/06-sync/util.js b/09-PWA/study2/06-sync/util.js new file mode 100755 index 000000000..b7b3a650a --- /dev/null +++ b/09-PWA/study2/06-sync/util.js @@ -0,0 +1,96 @@ +const request = require('request'); +const Datastore = require('nedb'); + +const db = new Datastore(); + +module.exports.get = function (url, opt = {}) { + return new Promise((r, j) => { + request.get(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.post = function (url, opt = {}) { + return new Promise((r, j) => { + request.post(url, opt, (err, res, body) => { + if (err) { + j(err); + return; + } + r(body); + }); + }); +}; + +module.exports.saveRecord = function (obj) { + let {uniqueid, subscription} = obj; + return new Promise((r, j) => { + db.findOne({'subscription.endpoint': subscription.endpoint}, (err, res) => { + if (err) { + j(err); + return; + } + if (res) { + console.log('已存在'); + res.uniqueid = uniqueid; + db.update({subscription}, res, {}, err => { + if (err) { + j(err); + return; + } + r(obj); + }); + return; + } + db.insert(obj, (err, item) => { + if (err) { + j(err); + return; + } + console.log('存储完毕'); + r(obj); + }); + }); + }); +}; + +module.exports.findAll = function () { + return new Promise((r, j) => { + db.find({}, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.find = function (query) { + return new Promise((r, j) => { + db.find(query, (err, list) => { + if (err) { + j(err); + return; + } + r(list); + }); + }); +}; + +module.exports.remove = function (obj) { + return new Promise((r, j) => { + db.remove(obj, {multi: true}, (err, num) => { + if (err) { + j(err); + return; + } + r(num); + }); + }); +}; \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/Grunt\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/Grunt\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" new file mode 100644 index 000000000..d8ff7b8e1 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/Grunt\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" @@ -0,0 +1,318 @@ +# Grunt快速入门教程 + +* Grunt介绍 + + * 中文主页 : http://www.gruntjs.net/ + * 是一套前端**自动化构建**工具,一个基于nodeJs的命令行工具 + * 它是一个**任务运行器**, 配合其丰富强大的**插件** + * 常用功能: + * **合并文件**(js/css) + * **压缩文件**(js/css) + * **语法检查**(js) + * **less/sass预编译处理** + * 其它... + +* 安装nodejs, 查看版本 + ``` + node -v + ``` + +* 创建一个简单的应用grunt_test + ``` + |- build----------构建生成的文件所在的文件夹 + |- src------------源码文件夹 + |- js---------------js源文件夹 + |- css--------------css源文件夹 + |- index.html-----页面文件 + |- Gruntfile.js---grunt配置文件(注意首字母大写) + |- package.json---项目包配置文件 + { + "name": "grunt_test", + "version": "1.0.0" + } + ``` + +* 全局安装 grunt-cli + ``` + npm install -g grunt-cli + ``` + +* 安装grunt + ``` + npm install grunt --save-dev + ``` + +* 运行构建项目命令 + ``` + grunt //提示 Warning: Task "default" not found + ``` + +* 配置文件: Gruntfile.js + * 此配置文件本质就是一个node函数类型模块 + * 配置编码包含3步: + 1. 初始化插件配置 + 2. 加载插件任务 + 3. 注册构建任务 + * 基本编码: + ``` + module.exports = function(grunt){ + // 1. 初始化插件配置 + grunt.initConfig({ + //主要编码处 + }); + // 2. 加载插件任务 + // grunt.loadNpmTasks('grunt-contrib-concat'); + // 3. 注册构建任务 + grunt.registerTask('default', []); + }; + ``` + * 命令: grunt //提示成功, 但没有任何效果(还没有使用插件定义任务) 同步执行命令 + +* Grunt插件介绍 + * grunt官网的插件列表页面 http://www.gruntjs.net/plugins + * 插件分类: + * grunt团队贡献的插件 : 插件名大都以contrib-开头 + * 第三方提供的插件 : 大都不以contrib-开头 + * 常用的插件: + * grunt-contrib-clean——清除文件(打包处理生成的) + * grunt-contrib-concat——合并多个文件的代码到一个文件中 + * grunt-contrib-uglify——压缩js文件 + * grunt-contrib-jshint——javascript语法错误检查; + * grunt-contrib-cssmin——压缩/合并css文件 + * grunt-contrib-htmlmin——压缩html文件 + * grunt-contrib-imagemin——压缩图片文件(无损) + * grunt-contrib-copy——复制文件、文件夹 + * grunt-contrib-watch——实时监控文件变化、调用相应的任务重新执行 + +* 合并js: 使用concat插件 + * 命令: + ``` + npm install grunt-contrib-concat --save-dev + ``` + * 编码: + * src/js/test1.js + ``` + (function () { + function add(num1, num2) { + return num1 + num2; + } + console.log(add(10, 20)); + })(); + ``` + * src/js/test2.js + ``` + (function () { + var arr = [2,3,4].map(function (item, index) { + return item+1; + }); + console.log(arr); + })(); + ``` + * 配置: Gruntfile.js + * 配置任务: + ``` + concat: { + options: { //可选项配置 + separator: ';' //使用;连接合并 + }, + build: { //此名称任意 + src: ["src/js/*.js"], //合并哪些js文件 + dest: "build/js/built.js" //输出的js文件 + } + } + ``` + * 加载插件: + ``` + grunt.loadNpmTasks('grunt-contrib-concat'); + ``` + * 注册任务: + ``` + grunt.registerTask('default', ['concat']); + ``` + * 命令: + ``` + grunt //会在build下生成一个built.js + ``` + +* 压缩js: 使用uglify插件 + * 下载 + ``` + npm install grunt-contrib-uglify --save-dev + ``` + * 配置: Gruntfile.js + * 配置任务: + ``` + pkg : grunt.file.readJSON('package.json'), + uglify : { + options: { //不是必须的 + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> */' + }, + build: { + files: { + 'build/js/built-<%=pkg.name%>-<%=pkg.version%>.min.js': ['build/js/built.js'] + } + } + } + ``` + * 加载任务: + ``` + grunt.loadNpmTasks('grunt-contrib-uglify'); + ``` + * 注册任务: + ``` + grunt.registerTask('default', ['concat', 'uglify']); + ``` + * 命令: + ``` + grunt //会在build下生成一个压缩的js文件 + ``` + +* js语法检查: 使用jshint插件 + * 命令: + ``` + npm install grunt-contrib-jshint --save-dev + ``` + * 编码: .jshintrc + ``` + { + "curly": true, + "eqeqeq": true, + "eqnull": true, + "expr" : true, + "immed": true, + "newcap": true, + "noempty": true, + "noarg": true, + "regexp": true, + "browser": true, + "devel": true, + "node": true, + "boss": false, + + //不能使用未定义的变量 + "undef": true, + //语句后面必须有分号 + "asi": false, + //预定义不检查的全局变量 + "predef": [ "define", "BMap", "angular", "BMAP_STATUS_SUCCESS"] + } + ``` + * 修改src/js/test1.js + ``` + (function () { + function add(num1, num2) { + num1 = num1 + num3 + return num1 + num2; + } + console.log(add(10, 20)); + })(); + ``` + * 配置 : Gruntfile.js + * 配置任务: + ``` + jshint : { + options: { + jshintrc : '.jshintrc' //指定配置文件 + }, + build : ['Gruntfile.js', 'src/js/*.js'] //指定检查的文件 + } + ``` + * 加载任务: + ``` + grunt.loadNpmTasks('grunt-contrib-jshint'); + ``` + * 注册任务: + ``` + grunt.registerTask('default', ['concat', 'uglify', 'jshint']); + ``` + * 命令: + ``` + grunt //提示变量未定义和语句后未加分号 -->修改后重新编译 + ``` + +* 使用cssmin插件 + * 安装: + ``` + npm install grunt-contrib-cssmin --save-dev + ``` + * 编码: + * test1.css + ``` + #box1 { + width: 100px; + height: 100px; + background: red; + } + ``` + * test2.css + ``` + #box2 { + width: 200px; + height: 200px; + background: blue; + } + ``` + * index.html + ``` + +
                +
                + ``` + + * 配置 : Gruntfile.js + * 配置任务: + ``` + cssmin:{ + options: { + shorthandCompacting: false, + roundingPrecision: -1 + }, + build: { + files: { + 'build/css/output.min.css': ['src/css/*.css'] + } + } + } + ``` + * 加载任务: + ``` + grunt.loadNpmTasks('grunt-contrib-cssmin'); + ``` + * 注册任务: + ``` + grunt.registerTask('default', ['concat', 'uglify', 'jshint', 'cssmin']); + ``` + * 命令: + ``` + grunt //在build/css/下生成output.min.css + ``` + +* 使用watch插件(真正实现自动化) + * 命令: npm install grunt-contrib-watch --save-dev + * 配置 : Gruntfile.js + + * 配置任务: + ``` + watch : { + scripts : { + files : ['src/js/*.js', 'src/css/*.css'], + tasks : ['concat', 'jshint', 'uglify', 'cssmin'], + options : {spawn : false} + } + } + ``` + * 加载任务: + ``` + grunt.loadNpmTasks('grunt-contrib-watch'); + ``` + * 注册任务: + ``` + grunt.registerTask('default', ['concat', 'uglify', 'jshint', 'watch']); + 改进:grunt.registerTask('myWatch', ['default','watch']); + ``` + * 命令: + ``` + grunt //控制台提示watch已经开始监听, 修改保存后自动编译处理 + // 优化后 grunt myWatch 用于开发,grunt 用于打包 + ``` diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/.jshintrc" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/.jshintrc" new file mode 100644 index 000000000..c1935a14d --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/.jshintrc" @@ -0,0 +1,18 @@ +{ + "curly": true, + "eqeqeq": true, + "eqnull": true, + "expr" : true, + "immed": true, + "newcap": true, + "noempty": true, + "noarg": true, + "regexp": true, + "browser": true, + "devel": true, + "node": true, + "boss": false, + "undef": true, + "asi": false, + "predef": [ "define", "BMap", "angular", "BMAP_STATUS_SUCCESS"] +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/Gruntfile.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/Gruntfile.js" new file mode 100644 index 000000000..cd5d75854 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/Gruntfile.js" @@ -0,0 +1,69 @@ +/* + * @Author: victorsun - csxiaoyao + * @Date: 2020-02-01 17:07:04 + * @LastEditors : victorsun + * @LastEditTime : 2020-02-01 21:03:23 + * @Description: www.csxiaoyao.com + */ +module.exports = function(grunt){ + // 1. 初始化插件配置 + grunt.initConfig({ + //主要编码处 + concat: { // 任务名 + options: { //可选项配置 + separator: ';' //使用;连接合并 + }, + build: { //此名称任意 + src: ["src/js/*.js"], //合并哪些js文件 + dest: "build/js/built.js" //输出的js文件 + } + }, + pkg : grunt.file.readJSON('package.json'), + uglify : { + options: { //不是必须的 + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> */' + }, + build: { + files: { + 'build/js/built-<%=pkg.name%>-<%=pkg.version%>.min.js': ['build/js/built.js'] + } + } + }, + jshint : { + options: { + jshintrc : '.jshintrc' //指定配置文件 + }, + build : ['Gruntfile.js', 'src/js/*.js'] //指定检查的文件 + }, + cssmin:{ + options: { + shorthandCompacting: false, + roundingPrecision: -1 + }, + build: { + files: { + 'build/css/output.min.css': ['src/css/*.css'] + } + } + }, + watch : { + scripts : { + files : ['src/js/*.js', 'src/css/*.css'], + tasks : ['concat', 'jshint', 'uglify', 'cssmin'], + options : {spawn : false} + } + } + }); + // 2. 加载插件任务 + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-watch'); + // 3. 注册构建任务 + // grunt.registerTask('default', ['concat', 'uglify', 'jshint', 'cssmin', 'watch']); // 同步执行 + // 优化 + grunt.registerTask('default', ['concat', 'uglify', 'jshint', 'cssmin']); // 同步执行 + grunt.registerTask('myWatch', ['default','watch']); // 同步执行 +}; \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/index.html" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/index.html" new file mode 100644 index 000000000..e7e0fa17c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/index.html" @@ -0,0 +1,22 @@ + + + + + + + + Document + + + +
                +
                + + + \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/package.json" new file mode 100644 index 000000000..47fe83e53 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/package.json" @@ -0,0 +1,12 @@ +{ + "name": "grunt_study", + "version": "1.0.0", + "devDependencies": { + "grunt": "^1.0.4", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-cssmin": "^3.0.0", + "grunt-contrib-jshint": "^2.1.0", + "grunt-contrib-uglify": "^4.0.1", + "grunt-contrib-watch": "^1.1.0" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test1.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test1.css" new file mode 100644 index 000000000..c98e2021c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test1.css" @@ -0,0 +1,5 @@ +#box1 { + width: 100px; + height: 100px; + background: red; +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test2.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test2.css" new file mode 100644 index 000000000..3bc19be2e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/css/test2.css" @@ -0,0 +1,5 @@ +#box2 { + width: 200px; + height: 200px; + background: blue; +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test1.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test1.js" new file mode 100644 index 000000000..767acfa43 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test1.js" @@ -0,0 +1,13 @@ +/* + * @Author: victorsun - csxiaoyao + * @Date: 2020-02-01 18:44:11 + * @LastEditors : victorsun + * @LastEditTime : 2020-02-01 18:45:12 + * @Description: www.csxiaoyao.com + */ +(function () { + function add(num1, num2) { + return num1 + num2; + } + console.log(add(10, 20)); +})(); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test2.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test2.js" new file mode 100644 index 000000000..122bddacb --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/02-grunt/grunt_study/src/js/test2.js" @@ -0,0 +1,13 @@ +/* + * @Author: victorsun - csxiaoyao + * @Date: 2020-02-01 18:44:18 + * @LastEditors : victorsun + * @LastEditTime : 2020-02-01 18:45:05 + * @Description: www.csxiaoyao.com + */ +(function () { + var arr = [2,3,4].map(function (item, index) { + return item+1; + }); + console.log(arr); +})(); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/Gulp\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/Gulp\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" new file mode 100644 index 000000000..ed15fa950 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/Gulp\345\277\253\351\200\237\345\205\245\351\227\250\346\225\231\347\250\213.md" @@ -0,0 +1,259 @@ +# Gulp快速入门教程 + +* Gulp介绍 + + * 中文主页: http://www.gulpjs.com.cn/ + * gulp是与grunt功能类似的**前端项目构建**工具, 也是基于Nodejs的自动**任务运行器** + * 能自动化地完成 javascript/coffee/sass/less/html/image/css 等文件的 + 合并、压缩、检查、监听文件变化、浏览器自动刷新、测试等任务 + * gulp更高效(异步多任务), 更易于使用, 插件高质量 + +* 安装 nodejs, 查看版本: node -v + +* 创建一个简单的应用gulp_test + ``` + |- dist + |- src + |- js + |- css + |- less + |- index.html + |- gulpfile.js-----gulp配置文件 + |- package.json + { + "name": "gulp_test", + "version": "1.0.0" + } + ``` + +* 安装gulp: + * 全局安装gulp + ``` + npm install gulp -g + ``` + * 局部安装gulp + ``` + npm install gulp --save-dev + ``` + * 配置编码: gulpfile.js + ``` + //引入gulp模块 + var gulp = require('gulp'); + //定义默认任务 + gulp.task('任务名', function() { + // 将你的任务的任务代码放在这 + }); + gulp.task('default', ['任务'])//异步执行 + ``` + * 构建命令: + ``` + gulp + ``` + +* 使用gulp插件 + * 相关插件: + * gulp-concat : 合并文件(js/css) + * gulp-uglify : 压缩js文件 + * gulp-rename : 文件重命名 + * gulp-less : 编译less + * gulp-clean-css : 压缩css + * gulp-livereload : 实时自动编译刷新 + * 重要API + * gulp.src(filePath/pathArr) : + * 指向指定路径的所有文件, 返回文件流对象 + * 用于读取文件 + * gulp.dest(dirPath/pathArr) + * 指向指定的所有文件夹 + * 用于向文件夹中输出文件 + * gulp.task(name, [deps], fn) + * 定义一个任务 + * gulp.watch() + * 监视文件的变化 + * 处理js + * 创建js文件 + * src/js/test1.js + ``` + (function () { + function add(num1, num2) { + var num3 = 0; + num1 = num2 + num3; + return num1 + num2; + } + console.log(add(10, 30)); + })(); + ``` + * src/js/test2.js + ``` + (function () { + var arr = [2,3,4].map(function (item, index) { + return item+1; + }); + console.log(arr); + })(); + ``` + * 下载插件: + ``` + npm install gulp-concat gulp-uglify gulp-rename --save-dev + ``` + * 配置编码 + ``` + var concat = require('gulp-concat'); + var uglify = require('gulp-uglify'); + var rename = require('gulp-rename'); + + gulp.task('minifyjs', function() { + return gulp.src('src/js/*.js') //操作的源文件 + .pipe(concat('built.js')) //合并到临时文件 + .pipe(gulp.dest('dist/js')) //生成到目标文件夹 + .pipe(rename({suffix: '.min'})) //重命名 + .pipe(uglify()) //压缩 + .pipe(gulp.dest('dist/js')); + }); + + gulp.task('default', ['minifyjs']); + ``` + * 页面引入js浏览测试 : index.html + ``` + + ``` + * 打包测试: gulp + * 处理css + * 创建less/css文件 + * src/css/test1.css + ``` + #div1 { + width: 100px; + height: 100px; + background: green; + } + ``` + * src/css/test2.css + ``` + #div2 { + width: 200px; + height: 200px; + background: blue; + } + ``` + * src/less/test3.less + ``` + @base: yellow; + .index1 { color: @base; } + .index2 { color: green; } + ``` + * 下载插件: + ``` + npm install gulp-less gulp-clean-css --save-dev + ``` + * 配置编码 + ``` + var less = require('gulp-less'); + var cleanCSS = require('gulp-clean-css'); + + //less处理任务 + gulp.task('lessTask', function () { + return gulp.src('src/less/*.less') + .pipe(less()) + + .pipe(gulp.dest('src/css')); + }) + //css处理任务, 指定依赖的任务 + gulp.task('cssTask',['lessTask'], function () { + + return gulp.src('src/css/*.css') + .pipe(concat('built.css')) + .pipe(gulp.dest('dist/css')) + .pipe(rename({suffix: '.min'})) + .pipe(cleanCSS({compatibility: 'ie8'})) + .pipe(gulp.dest('dist/css')); + }); + + gulp.task('default', ['minifyjs', 'cssTask']); + ``` + * 页面引入css浏览测试 : index.html + ``` + +
                div1111111
                +
                div2222222
                + ``` + * 打包测试: gulp + * 处理html + * 下载插件: + ``` + npm install gulp-htmlmin --save-dev + ``` + * 配置编码 + ``` + var htmlmin = require('gulp-htmlmin'); + //压缩html任务 + gulp.task('htmlMinify', function() { + return gulp.src('index.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('dist')); + }); + gulp.task('default', ['minifyjs', 'cssTask', 'htmlMinify']); + ``` + * 修改页面引入 + ``` + + + ``` + * 打包测试: gulp + * 自动编译 + * 下载插件 + ``` + npm install gulp-livereload --save-dev + ``` + * 配置编码: + ``` + var livereload = require('gulp-livereload'); + + //所有的pipe + .pipe(livereload()); + + gulp.task('watch', ['default'], function () { + //开启监视 + livereload.listen(); + //监视指定的文件, 并指定对应的处理任务 + gulp.watch('src/js/*.js', ['minifyjs']) + gulp.watch(['src/css/*.css','src/less/*.less'], ['cssTask','lessTask']); + }); + ``` + + * 热加载(实时加载) + * 下载插件:gulp-connect + ``` + 1、 npm install gulp-connect --save-dev + 2、 注册 热加载的任务 server,注意依赖build任务 + 3、注册热加载的任务 + //配置加载的选项 + connect.server({ + root : 'dist/',//提供服务的根路径 + livereload : true,//是否实时刷新 + port : 5000//开启端口号 + }); + // 自动开启链接 + open('http://localhost:5000');//npm install open --save-dev + // 监视目标文件 + gulp.watch('src/js/*.js', ['js']); + gulp.watch(['src/css/*.css', 'src/css/*.less'], ['cssMin', 'less']); + ``` + + * 扩展 + * 打包加载gulp插件 + * 前提:将插件下载好。 + * 下载打包插件: gulp-load-plugins + * npm install gulp-load-plugins --save-dev + * 引入: var $ = require('gulp-load-plugins')();!!!引入的插件是个方法,必须记住调用。 + * 神来之笔:其他的插件不用再引入了 + * 使用方法: + ``` + * 所有的插件用 $ 引出,其他插件的方法名统一为插件的功能名字(即插件名字的最后一部分):如:concat,connect,cssmin... + gulp.task('lib', function() { + gulp.src('bower_components/**/*.js') + .pipe(gulp.dest(app.devPath + 'vendor')) + .pipe(gulp.dest(app.prdPath + 'vendor')) + .pipe($.connect.reload()); + }); + + ``` \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.css" new file mode 100644 index 000000000..5d43f442c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.css" @@ -0,0 +1,16 @@ +#div1 { + width: 100px; + height: 100px; + background: greenyellow; +} +#div2 { + width: 200px; + height: 200px; + background: deeppink; +} +.index1 { + color: yellow; +} +.index2 { + color: green; +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.min.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.min.css" new file mode 100644 index 000000000..954b7007e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/css/build.min.css" @@ -0,0 +1 @@ +#div1{width:100px;height:100px;background:#adff2f}#div2{width:200px;height:200px;background:#ff1493}.index1{color:#ff0}.index2{color:green} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/index.html" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/index.html" new file mode 100644 index 000000000..613d37d25 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/index.html" @@ -0,0 +1 @@ +Title
                1111
                2222
                \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.js" new file mode 100644 index 000000000..af433a03b --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.js" @@ -0,0 +1,15 @@ +(function () { + function add(num1, num2) { + var num3 = 0; + num1 = num2 + num3; + return num1 + num2; + } + console.log(add(10, 30)); +})(); + +(function () { + var arr = [2,3,4].map(function (item, index) { + return item+1; + }); + console.log(arr); +})(); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.min.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.min.js" new file mode 100644 index 000000000..872585450 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/dist/js/build.min.js" @@ -0,0 +1 @@ +!function(){console.log(function(n,o){return o+0+o}(0,30))}(),function(){var n=[2,3,4].map(function(n,o){return n+1});console.log(n)}(); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/gulpfile.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/gulpfile.js" new file mode 100644 index 000000000..a44ccf0fe --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/gulpfile.js" @@ -0,0 +1,90 @@ +var gulp = require('gulp'); +var $ = require('gulp-load-plugins')()//引入的是函数,调用以后返回的是对象 + + +// var concat = require('gulp-concat'); +// var rename = require('gulp-rename'); +// var uglify = require('gulp-uglify'); +// var less = require('gulp-less'); +// var cssClean = require('gulp-clean-css'); +// var htmlMin = require('gulp-htmlmin'); +// var livereload = require('gulp-livereload'); +// var connect = require('gulp-connect'); +var open = require('open'); + +//注册合并压缩js的任务 +gulp.task('js', function () { + //你的任务执行 具体过程 + return gulp.src('src/js/*.js')//找目标原文件 将原文件的数据读取到gulp的内存中 + .pipe($.concat('build.js'))//合并js文件 + .pipe(gulp.dest('dist/js/'))//临时输出 + .pipe($.uglify())//压缩js文件 + .pipe($.rename({suffix:'.min'}))//重命名 + .pipe(gulp.dest('dist/js/'))//输出 + //.pipe(livereload())//实时加载 + .pipe($.connect.reload()) +}); + +//注册编译less的任务 +gulp.task('less', function () { + return gulp.src('src/less/*.less') + .pipe($.less())//将less文件转换为css文件 + .pipe(gulp.dest('src/css/')) + //.pipe(livereload())//实时加载 + .pipe($.connect.reload()) +}); + +//注册合并压缩css的任务 +gulp.task('css',['less'] ,function () { + return gulp.src('src/css/*.css') + .pipe($.concat('build.css')) + .pipe(gulp.dest('dist/css/')) + .pipe($.rename({suffix:'.min'})) + .pipe($.cleanCss({compatibility: 'ie8'})) + .pipe(gulp.dest('dist/css/')) + //.pipe(livereload())//实时加载 + .pipe($.connect.reload()) + +}); + +//注册压缩html的任务 +gulp.task('html', function () { + return gulp.src('index.html') + .pipe($.htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('dist/')) + //.pipe(livereload())//实时加载 + .pipe($.connect.reload()) +}); + +//注册监视的任务--->半自动 +gulp.task('watch',['default'], function () { + //开启监视 + livereload.listen(); + + //确认监视的目标并且绑定相应的任务 + gulp.watch('src/js/*.js', ['js']); + gulp.watch(['src/css/*.css', 'src/less/*.less'], ['css', 'less']); +}); + +//注册一个全自动的任务 +gulp.task('server',['default'], function () { + //配置服务器选项 + $.connect.server({ + root : 'dist/',//监视的源目标文件路径 + livereload : true,//是否实时刷新 + port : 5000//开启端口号 + }); + open('http://localhost:5000/'); + + //确认监视的目标并且绑定相应的任务 + gulp.watch('src/js/*.js', ['js']); + gulp.watch(['src/css/*.css', 'src/less/*.less'], ['css', 'less']); +}) + + + + +//注册一个默认任务 +gulp.task('default', ['js', 'less', 'css','html']); + + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/index.html" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/index.html" new file mode 100644 index 000000000..998bc5f82 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/index.html" @@ -0,0 +1,14 @@ + + + + + Title + + + +
                1111
                +
                2222
                + + + + \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package-lock.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package-lock.json" new file mode 100644 index 000000000..be5d38c7a --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package-lock.json" @@ -0,0 +1,2799 @@ +{ + "name": "gulp_test", + "version": "1.0.0", + "lockfileVersion": 1, + "dependencies": { + "accepts": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz", + "integrity": "sha1-5fHzkoxtlf2WVYw27D2dDeSm7Oo=", + "dev": true + }, + "accord": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/accord/-/accord-0.27.3.tgz", + "integrity": "sha1-f7kSlwkoXK6oTrNyxOiCAxtxOOg=", + "dev": true, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true + } + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true + }, + "arr-flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", + "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "asap": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz", + "integrity": "sha1-UidltQw1EEkOUtfc/ghe+bqWlY8=", + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-url": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz", + "integrity": "sha1-GZ/WYXAqDnt9yubgaYuwicUvbXg=", + "dev": true + }, + "basic-auth": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.4.tgz", + "integrity": "sha1-Awk1sB3nyblKgksp8/zLdQ06UpA=", + "dev": true + }, + "basic-auth-connect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz", + "integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI=", + "dev": true + }, + "batch": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz", + "integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "body-parser": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", + "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "qs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", + "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=", + "dev": true + } + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true + }, + "bufferstreams": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.1.tgz", + "integrity": "sha1-AWE3MGCsWYjv+ZBYcxEU9uGV1R4=", + "dev": true, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true + } + } + }, + "bytes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", + "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true + }, + "clean-css": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.5.tgz", + "integrity": "sha1-0JqHoCpTdRF1iXlq52oGPKzbVBo=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true + }, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true + }, + "compressible": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.10.tgz", + "integrity": "sha1-/tocf3YXkScyspv4zyYlKiC57s0=", + "dev": true + }, + "compression": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.5.2.tgz", + "integrity": "sha1-sDuNhub4rSloPLqN+R3cb/x3s5U=", + "dev": true, + "dependencies": { + "bytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz", + "integrity": "sha1-rJPEEOL/ycx89LRks4KJBn9eR7Q=", + "dev": true + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-with-sourcemaps": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz", + "integrity": "sha1-9Vs74q60dgGxCi1SWcz7cP0vHdY=", + "dev": true + }, + "connect": { + "version": "2.30.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-2.30.2.tgz", + "integrity": "sha1-jam8vooFTT0xjXTf7JA7XDmhtgk=", + "dev": true, + "dependencies": { + "body-parser": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.13.3.tgz", + "integrity": "sha1-wIzzMMM1jhUQFqBXRvE/ApyX+pc=", + "dev": true + }, + "bytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz", + "integrity": "sha1-rJPEEOL/ycx89LRks4KJBn9eR7Q=", + "dev": true + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "depd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz", + "integrity": "sha1-gK7GTJ1tl+ZcwqnKqTwKpqv3Oqo=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz", + "integrity": "sha1-LstC/SlHRJIiCaLnxATayHk9it4=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "qs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz", + "integrity": "sha1-wx2bdOwn33XlQ6hseHKO2NRiNgc=", + "dev": true + } + } + }, + "connect-livereload": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.5.4.tgz", + "integrity": "sha1-gBV9E3HJ83zBQDmrGJWXDRGdw7w=", + "dev": true + }, + "connect-timeout": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.6.2.tgz", + "integrity": "sha1-3ppexh4zoStu2qt7XwYumMWZuI4=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "cookie": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz", + "integrity": "sha1-5zSlwUF/zkctWu+Cw4HKu2TRpDU=", + "dev": true + }, + "cookie-parser": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.5.tgz", + "integrity": "sha1-nXVVcPtdF4kHcSJ6AjFNm+fPg1Y=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "crc": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.3.0.tgz", + "integrity": "sha1-+mIuG8OIvyVzCQgta2UgDOZwkLo=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "optional": true + }, + "csrf": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz", + "integrity": "sha1-thEg3c7q/JHnbtUxO7XAsmZ7cQo=", + "dev": true + }, + "csurf": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.8.3.tgz", + "integrity": "sha1-I/KhO/HY/OHQyZZYg5RELLqGpWo=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "dateformat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", + "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=", + "dev": true + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=", + "dev": true + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "dev": true + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true + }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "dev": true, + "optional": true + }, + "errorhandler": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz", + "integrity": "sha1-t7cO2PNZ6duICS8tIMD4MUIK2D8=", + "dev": true, + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + } + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "etag": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz", + "integrity": "sha1-A9MLX2fdbmMtKUXTDWZScxo01dg=", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "dev": true + }, + "express-session": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.11.3.tgz", + "integrity": "sha1-XMmPP1/4Ttg1+Ry/CqvQxxB0AK8=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "depd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz", + "integrity": "sha1-gK7GTJ1tl+ZcwqnKqTwKpqv3Oqo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "uid-safe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz", + "integrity": "sha1-p/PGymSh9qXQTsDvPkw9U2cxcTc=", + "dev": true + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", + "dev": true + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "dev": true + }, + "faye-websocket": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz", + "integrity": "sha1-zEB0x/Sk39A69U3WXDVLE1EyzhE=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true + }, + "finalhandler": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz", + "integrity": "sha1-llpS2ejQXSuFdUhUH7ibU6JJfZs=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "escape-html": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz", + "integrity": "sha1-130y+pjjjC9BroXpJ44ODmuhAiw=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "dev": true + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true + }, + "fresh": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz", + "integrity": "sha1-ZR+DjiJCTnVm3hYdg1jKoZn4PU8=", + "dev": true + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "dev": true + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "dev": true + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "dev": true + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true + }, + "gulp-clean-css": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-3.5.0.tgz", + "integrity": "sha1-1D50fEGVeZXsSbuWEvhitkMp8bA=", + "dev": true + }, + "gulp-concat": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", + "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", + "dev": true, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "dev": true + } + } + }, + "gulp-connect": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gulp-connect/-/gulp-connect-5.0.0.tgz", + "integrity": "sha1-8v3zBq6RFGg2jCKF8teC8T7dr04=", + "dev": true + }, + "gulp-htmlmin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-htmlmin/-/gulp-htmlmin-3.0.0.tgz", + "integrity": "sha1-GeqAAtEjHWsfGKEtIPKmand3D7M=", + "dev": true, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true + } + } + }, + "gulp-less": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-3.3.2.tgz", + "integrity": "sha1-9mNq3MZhUKiQJxn6WZY/x/hipJo=", + "dev": true, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + } + } + }, + "gulp-livereload": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz", + "integrity": "sha1-APdEstdJ0+njdGWJyKRKysd5tQ8=", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + } + } + }, + "gulp-load-plugins": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/gulp-load-plugins/-/gulp-load-plugins-1.5.0.tgz", + "integrity": "sha1-TEGffldk2aDjMGG6uWGPgbc9QXE=", + "dev": true + }, + "gulp-rename": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", + "integrity": "sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc=", + "dev": true + }, + "gulp-uglify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.0.tgz", + "integrity": "sha1-DfAzHXKg0wLj434QlIXd3zPG0co=", + "dev": true, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "optional": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "optional": true + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true + }, + "html-minifier": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.2.tgz", + "integrity": "sha1-1zvD/0SJQkCIGM5gm/P7DqfvTrc=", + "dev": true + }, + "http-errors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true, + "optional": true + }, + "indx": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/indx/-/indx-0.2.3.tgz", + "integrity": "sha1-Fdz1bunPZcAjTFE8J/vVgOcPvFA=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.3.tgz", + "integrity": "sha1-wVvz5LZrYtcu+vKSWEhmPsvGGbY=", + "dev": true, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "less": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/less/-/less-2.7.2.tgz", + "integrity": "sha1-No1sxz4fsDmBGDKAkYdDxdz5s98=", + "dev": true, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true, + "optional": true + } + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "dev": true + }, + "livereload-js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz", + "integrity": "sha1-bIclfmSKtHW8JOoldFftzB+NC8I=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "dev": true + }, + "lodash.clone": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", + "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=", + "dev": true + }, + "lodash.partialright": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.partialright/-/lodash.partialright-4.2.1.tgz", + "integrity": "sha1-ATDYDoM2MmTUAHTzKbij56ihzEs=", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "make-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", + "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "method-override": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.9.tgz", + "integrity": "sha1-vRUfLONM8Bp2ykAKuVwBKxAtj3E=", + "dev": true, + "dependencies": { + "vary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=", + "dev": true + } + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true + }, + "mime": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", + "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=", + "dev": true, + "optional": true + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "dev": true + }, + "mini-lr": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz", + "integrity": "sha1-AhmdJzR5U9H9HW297UJh8Yey0PY=", + "dev": true, + "dependencies": { + "qs": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz", + "integrity": "sha1-EIirr53MCuWuRbcJ5sa1iIsjkjw=", + "dev": true + } + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "morgan": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz", + "integrity": "sha1-X9gYOYxoGcuiinzWZk8pL+HAu/I=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "depd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz", + "integrity": "sha1-gK7GTJ1tl+ZcwqnKqTwKpqv3Oqo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multiparty": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.3.2.tgz", + "integrity": "sha1-Nd5oBNwZZD5SSfPT473GyM4wHT8=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=", + "dev": true + }, + "ncname": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", + "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", + "dev": true + }, + "negotiator": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz", + "integrity": "sha1-Jp1cR2gQ7JLtvntsLygxY4T5p+g=", + "dev": true + }, + "no-case": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.1.tgz", + "integrity": "sha1-euuhxzpSGEJlVUt9wDuvcg34AIE=", + "dev": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true + }, + "object.pick": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.2.0.tgz", + "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true + }, + "open": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz", + "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw=", + "dev": true + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "pause": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.1.0.tgz", + "integrity": "sha1-68ikqGGf8LioGsFRPDQ0/0af23Q=", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "optional": true + }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true + } + } + }, + "range-parser": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz", + "integrity": "sha1-aHKCNTXGkuLCoBA4Jq/YLC4P8XU=", + "dev": true + }, + "raw-body": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", + "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", + "dev": true, + "dependencies": { + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", + "dev": true + } + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "dev": true + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", + "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "optional": true + }, + "resolve": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "dev": true + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "dev": true + }, + "response-time": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/response-time/-/response-time-2.3.2.tgz", + "integrity": "sha1-/6cbq5UtYvfB1Jt0NDVfvGjf/Fo=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true + }, + "rndm": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", + "integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "send": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.13.2.tgz", + "integrity": "sha1-dl52B8gFVFK7pvCwUllTUJhgNt4=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "statuses": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz", + "integrity": "sha1-3e1FzBglbVHtQK7BQkidXGECbSg=", + "dev": true + } + } + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "serve-favicon": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz", + "integrity": "sha1-3UGeJo3gEqtysxnTN/IQUBP5OB8=", + "dev": true, + "dependencies": { + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "serve-index": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.7.3.tgz", + "integrity": "sha1-egV/xu4o3GP2RWbl+lexEahq7NI=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "serve-static": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz", + "integrity": "sha1-zlpuzTEB/tXsCYJ9rCKpwpv7BTU=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "optional": true + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "dev": true + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", + "dev": true + }, + "stream-counter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz", + "integrity": "sha1-3tJmVWMZyLDiIoErnPOyb6fZR94=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true + } + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "tiny-lr": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.2.1.tgz", + "integrity": "sha1-s/26gC5dVqM8L28QeUsy5Hescp0=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "qs": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-5.1.0.tgz", + "integrity": "sha1-TZMuXH6kEcynajEtOaYGIA/VDNk=", + "dev": true + } + } + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true, + "optional": true + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "tsscmp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", + "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "dev": true + }, + "uglify-js": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.23.tgz", + "integrity": "sha512-miLHbO2QcdQGxL/q1wLcUr6TGIRHhMnpKyywUbAdZRkJMqCeZCDmBsgYu1Wlj26xHBXN+sU5tHaWh38QsN208g==", + "dev": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uid-safe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.4.tgz", + "integrity": "sha1-Otbzg2jG1MjHXsF2I/t5qh0HHYE=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=", + "dev": true + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true, + "optional": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true + }, + "vary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz", + "integrity": "sha1-meSYFWaihhGN+yuBc1ffeZM3bRA=", + "dev": true + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "dev": true, + "optional": true + }, + "vhost": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/vhost/-/vhost-3.0.2.tgz", + "integrity": "sha1-L7HezUxGaqiLD5NBrzPcGv8keNU=", + "dev": true + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "dev": true + }, + "websocket-extensions": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", + "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=", + "dev": true + }, + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", + "dev": true + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-char-classes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", + "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true + } + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package.json" new file mode 100644 index 000000000..6dff8ca4e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/package.json" @@ -0,0 +1,17 @@ +{ + "name": "gulp_test", + "version": "1.0.0", + "devDependencies": { + "gulp": "^3.9.1", + "gulp-clean-css": "^3.5.0", + "gulp-concat": "^2.6.1", + "gulp-connect": "^5.0.0", + "gulp-htmlmin": "^3.0.0", + "gulp-less": "^3.3.2", + "gulp-livereload": "^3.8.1", + "gulp-load-plugins": "^1.5.0", + "gulp-rename": "^1.2.2", + "gulp-uglify": "^3.0.0", + "open": "0.0.5" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test1.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test1.css" new file mode 100644 index 000000000..194b3b88f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test1.css" @@ -0,0 +1,5 @@ +#div1 { + width: 100px; + height: 100px; + background: greenyellow; +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test2.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test2.css" new file mode 100644 index 000000000..660600891 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test2.css" @@ -0,0 +1,5 @@ +#div2 { + width: 200px; + height: 200px; + background: deeppink; +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test3.css" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test3.css" new file mode 100644 index 000000000..30c3ecaef --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/css/test3.css" @@ -0,0 +1,6 @@ +.index1 { + color: yellow; +} +.index2 { + color: green; +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test1.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test1.js" new file mode 100644 index 000000000..682f9f218 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test1.js" @@ -0,0 +1,8 @@ +(function () { + function add(num1, num2) { + var num3 = 0; + num1 = num2 + num3; + return num1 + num2; + } + console.log(add(10, 30)); +})(); diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test2.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test2.js" new file mode 100644 index 000000000..01001eaeb --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/js/test2.js" @@ -0,0 +1,6 @@ +(function () { + var arr = [2,3,4].map(function (item, index) { + return item+1; + }); + console.log(arr); +})(); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/less/test3.less" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/less/test3.less" new file mode 100644 index 000000000..cee5bfc7c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/03-gulp/gulp_study/src/less/test3.less" @@ -0,0 +1,3 @@ +@base: yellow; +.index1 { color: @base; } +.index2 { color: green; } \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/01-start.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/01-start.js" new file mode 100644 index 000000000..a91fb9d98 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/01-start.js" @@ -0,0 +1,34 @@ +// https://ssr.vuejs.org/zh/ + +const Vue = require('vue') +const server = require('express')() +const renderer = require('vue-server-renderer').createRenderer() + +server.get('*', (req, res) => { + const app = new Vue({ + data: { + name: 'csxiaoyao' + }, + template: `
                {{ name }}
                `, + created: function () { + console.log('name is: ' + this.name) + } + }) + + renderer.renderToString(app, (err, html) => { + if (err) { + res.status(500).end('Internal Server Error') + return + } + res.end(` + + + Hello + ${html} + + `) + }) + +}) + +server.listen(8080) diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/02-simple-ssr.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/02-simple-ssr.js" new file mode 100644 index 000000000..1365cb4bd --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/02-simple-ssr.js" @@ -0,0 +1,36 @@ +const Vue = require('vue'); +const server = require('express')(); + +const template = require('fs').readFileSync('./index.template.html', 'utf-8'); + +const renderer = require('vue-server-renderer').createRenderer({ + template, +}); + +const context = { + title: 'vue ssr', + metas: ` + + + `, +}; + +server.get('*', (req, res) => { + const app = new Vue({ + data: { + url: req.url + }, + template: `
                访问的 URL 是: {{ url }}
                `, + }); + + renderer.renderToString(app, context, (err, html) => { + console.log(html); + if (err) { + res.status(500).end('Internal Server Error') + return; + } + res.end(html); + }); +}) + +server.listen(8080); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/03-info.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/03-info.js" new file mode 100644 index 000000000..305611d26 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/03-info.js" @@ -0,0 +1,3 @@ +// 由于没有动态更新,所有的生命周期钩子函数中 +// 只有 beforeCreate 和 created 会在服务器端渲染 (SSR) 过程中被调用 +// 这就是说任何其他生命周期钩子函数中的代码(例如 beforeMount 或 mounted),只会在客户端执行 diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/app.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/app.js" new file mode 100644 index 000000000..6fae05f06 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/app.js" @@ -0,0 +1,13 @@ +const Vue = require('vue') + +module.exports = function createApp (context) { + return new Vue({ + data: { + url: context.url + }, + template: `
                访问的 URL 是: {{ url }}
                `, + created () { + this.url += '~~~' + } + }) +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/server.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/server.js" new file mode 100644 index 000000000..b806d3b72 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/04-demo/server.js" @@ -0,0 +1,19 @@ +const createApp = require('./app') +const server = require('express')(); +const template = require('fs').readFileSync('./index.template.html', 'utf-8'); + +const renderer = require('vue-server-renderer').createRenderer({ + template, +}); + +server.get('*', (req, res) => { + const context = { url: req.url } + const app = createApp(context) + + renderer.renderToString(app, (err, html) => { + // 处理错误…… + res.end(html) + }) +}) + +server.listen(8080); diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/README.md" new file mode 100644 index 000000000..d49947da0 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/README.md" @@ -0,0 +1,12 @@ + +``` +src +├── components +│ ├── Foo.vue +│ ├── Bar.vue +│ └── Baz.vue +├── App.vue +├── app.js # 通用 entry(universal entry) +├── entry-client.js # 仅运行于浏览器 +└── entry-server.js # 仅运行于服务器 +``` \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/App.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/App.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/app.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/app.js" new file mode 100644 index 000000000..099c62fe5 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/app.js" @@ -0,0 +1,12 @@ +import Vue from 'vue' +import App from './App.vue' + +// 导出一个工厂函数,用于创建新的 +// 应用程序、router 和 store 实例 +export function createApp () { + const app = new Vue({ + // 根实例简单的渲染应用程序组件。 + render: h => h(App) + }) + return { app } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Bar.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Bar.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Baz.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Baz.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Foo.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/components/Foo.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-client.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-client.js" new file mode 100644 index 000000000..51bc64820 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-client.js" @@ -0,0 +1,8 @@ +import { createApp } from './app' + +// 客户端特定引导逻辑…… + +const { app } = createApp() + +// 这里假定 App.vue 模板中根元素具有 `id="app"` +app.$mount('#app') \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-server.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-server.js" new file mode 100644 index 000000000..568b2f2b2 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/05-webpack-demo/src/entry-server.js" @@ -0,0 +1,6 @@ +import { createApp } from './app' + +export default context => { + const { app } = createApp() + return app +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/README.md" new file mode 100644 index 000000000..d49947da0 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/README.md" @@ -0,0 +1,12 @@ + +``` +src +├── components +│ ├── Foo.vue +│ ├── Bar.vue +│ └── Baz.vue +├── App.vue +├── app.js # 通用 entry(universal entry) +├── entry-client.js # 仅运行于浏览器 +└── entry-server.js # 仅运行于服务器 +``` \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/App.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/App.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/app.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/app.js" new file mode 100644 index 000000000..ef92b36a2 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/app.js" @@ -0,0 +1,19 @@ +import Vue from 'vue' +import App from './App.vue' +import { createRouter } from './router' + +// 导出一个工厂函数,用于创建新的 +// 应用程序、router 和 store 实例 +export function createApp () { + // 创建 router 实例 + const router = createRouter() + + const app = new Vue({ + // 注入 router 到根 Vue 实例 + router, + render: h => h(App) + }) + + // 返回 app 和 router + return { app, router } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Bar.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Bar.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Baz.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Baz.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Foo.vue" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/components/Foo.vue" new file mode 100644 index 000000000..e69de29bb diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-client.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-client.js" new file mode 100644 index 000000000..51bc64820 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-client.js" @@ -0,0 +1,8 @@ +import { createApp } from './app' + +// 客户端特定引导逻辑…… + +const { app } = createApp() + +// 这里假定 App.vue 模板中根元素具有 `id="app"` +app.$mount('#app') \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-server.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-server.js" new file mode 100644 index 000000000..3236349c4 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/entry-server.js" @@ -0,0 +1,26 @@ +// entry-server.js +import { createApp } from './app' + +export default context => { + // 因为有可能会是异步路由钩子函数或组件,所以我们将返回一个 Promise, + // 以便服务器能够等待所有的内容在渲染前, + // 就已经准备就绪。 + return new Promise((resolve, reject) => { + const { app, router } = createApp() + + // 设置服务器端 router 的位置 + router.push(context.url) + + // 等到 router 将可能的异步组件和钩子函数解析完 + router.onReady(() => { + const matchedComponents = router.getMatchedComponents() + // 匹配不到的路由,执行 reject 函数,并返回 404 + if (!matchedComponents.length) { + return reject({ code: 404 }) + } + + // Promise 应该 resolve 应用程序实例,以便它可以渲染 + resolve(app) + }, reject) + }) +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/router.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/router.js" new file mode 100644 index 000000000..58b0eecf3 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/router.js" @@ -0,0 +1,15 @@ +// router.js +import Vue from 'vue' +import Router from 'vue-router' + +Vue.use(Router) + +export function createRouter () { + return new Router({ + mode: 'history', + routes: [ + { path: '/', component: () => import('./components/Home.vue') }, + { path: '/item/:id', component: () => import('./components/Item.vue') } + ] + }) +} \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/server.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/server.js" new file mode 100644 index 000000000..31c182ceb --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/06-router/src/server.js" @@ -0,0 +1,20 @@ +// server.js +const createApp = require('/path/to/built-server-bundle.js') + +server.get('*', (req, res) => { + const context = { url: req.url } + + createApp(context).then(app => { + renderer.renderToString(app, (err, html) => { + if (err) { + if (err.code === 404) { + res.status(404).end('Page not found') + } else { + res.status(500).end('Internal Server Error') + } + } else { + res.end(html) + } + }) + }) +}) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/index.template.html" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/index.template.html" new file mode 100644 index 000000000..d363dd991 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/index.template.html" @@ -0,0 +1,7 @@ + + + Hello + + + + \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package-lock.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package-lock.json" new file mode 100644 index 000000000..a4fd6e566 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package-lock.json" @@ -0,0 +1,502 @@ +{ + "name": "vue-ssr", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "vue": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz", + "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" + }, + "vue-server-renderer": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/vue-server-renderer/-/vue-server-renderer-2.6.11.tgz", + "integrity": "sha512-V3faFJHr2KYfdSIalL+JjinZSHYUhlrvJ9pzCIjjwSh77+pkrsXpK4PucdPcng57+N77pd1LrKqwbqjQdktU1A==", + "requires": { + "chalk": "^1.1.3", + "hash-sum": "^1.0.2", + "he": "^1.1.0", + "lodash.template": "^4.5.0", + "lodash.uniq": "^4.5.0", + "resolve": "^1.2.0", + "serialize-javascript": "^2.1.2", + "source-map": "0.5.6" + } + } + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package.json" new file mode 100644 index 000000000..3c545c181 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/04-ssr/vue-ssr/package.json" @@ -0,0 +1,16 @@ +{ + "name": "vue-ssr", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.17.1", + "vue": "^2.6.11", + "vue-server-renderer": "^2.6.11" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/README.md" new file mode 100644 index 000000000..ba0d15187 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/README.md" @@ -0,0 +1,28 @@ +# 01-start 创建 csxiaoyao-cli + +1. 创建 /bin 文件夹 +2. 修改 package.json,添加命令及文件 + +``` +"bin": { + "csxiaoyao": "./bin/csxiaoyao.js" +}, +``` + +3. 编写csxiaoyao.js代码文件 +``` +#!/user/bin/env node +``` + +4. 添加软链接 +``` +$ sudo npm link +# 取消 +$ npm unlink +$ npm link --force +``` + +5. process.argv 接收命令行参数 + + + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/bin/csxiaoyao.js" new file mode 100755 index 000000000..03c6a958e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/bin/csxiaoyao.js" @@ -0,0 +1,12 @@ +#!/usr/bin/env node +console.log('hello world'); + +/** + * [ process.argv ] return Array + * 返回参数1: node.js可执行文件的绝对路径 + * 返回参数2: 正在执行的javascript文件路径 + * 返回参数3开始: 通过命令行传递的参数 + */ +process.argv.forEach(v => { + console.log(v); +}); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/package.json" new file mode 100644 index 000000000..f9758bc02 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/01-csxiaoyao-cli/package.json" @@ -0,0 +1,14 @@ +{ + "name": "csxiaoyao-cli", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "author": "", + "license": "ISC" +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/README.md" new file mode 100644 index 000000000..eee78ab71 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/README.md" @@ -0,0 +1,43 @@ +# 02-commander + +1. 安装commander +``` +$ npm install commander -S +``` + +2. 编写代码查看版本号 +``` +const { program } = require('commander'); +program + .version('0.0.1') + .parse(process.argv) +``` +查看版本号 +``` +$ csxiaoyao -h +Usage: csxiaoyao [options] + +Options: + -V, --version output the version number + -h, --help display help for command + +$csxiaoyao -V +0.0.1 +``` + +3. 修改帮助文档、配置options参数 +``` +.usage(' [csxiaoyao options]') +.option('命令', '说明', '默认值') +``` + +4. 获取输入参数 + +5. 创建命令 +``` +.command('add', 'add a template') +.command('init', 'init a template') +.command('create [options] ', 'create a new project powered by xxx') +``` + + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/bin/csxiaoyao.js" new file mode 100755 index 000000000..457f3d22e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/bin/csxiaoyao.js" @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +/** + * 原生方式 + */ +// process.argv.forEach(v => { +// console.log(v); +// }); + +const { program } = require('commander'); +program + .version('0.0.1') + .usage(' [csxiaoyao options]') + .option('-cr, --classroom ', 'current classroom name') // '命令', '说明', '默认值' + .command('add', 'add a template') + .command('init', 'init a template') + .command('create [options] ', 'create a new project powered by xxx') + .parse(process.argv) + +// 获取输入参数 +console.log(program.opts().classroom); + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/package.json" new file mode 100644 index 000000000..094b20c77 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/02-commander/package.json" @@ -0,0 +1,17 @@ +{ + "name": "commander-study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/README.md" new file mode 100644 index 000000000..1802c9bc6 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/README.md" @@ -0,0 +1,6 @@ +# 03-inquirer + +1. 安装 +``` +$ npm install inquirer +``` diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/bin/csxiaoyao.js" new file mode 100755 index 000000000..143a14982 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/bin/csxiaoyao.js" @@ -0,0 +1,77 @@ +#!/usr/bin/env node + +// const inquirer = require('inquirer'); +import inquirer from 'inquirer'; + +// 定义基本的问答结构 +// 1. 定义问题列表 +const promptList = [ + // 输入 + { + type: 'input', + message: '请输入6位数字ID', + name: 'id', // key + default: '123456', + validate: (val) => { + if (val.match(/^\d{6}$/ig)) { + return true; + } + return '请输入6位数字的ID~~~'; + } + }, + // 是/否选择 + { + type: 'confirm', + message: '是否使用监听模式', + name: 'watch', + prefix: '🌹', // 前缀 + suffix: '🇨🇳', // 后缀 + default: false, + }, + // 级联 + { + type: 'confirm', + message: '是否使用批量监听模式', + name: 'more-watch', + when: (answers) => { // when + if (answers.watch) { + return true; + } else { + return false; // answers中不包含此字段 + } + } + }, + // 单选 + { + type: 'list', + message: '请选择一种单页面前端技术', + name: 'technology', + // default: 'react', + choices: ['vue','react','angular'], + }, + // 多选 + { + type: 'checkbox', + message: '爱好', + name: 'hobby', + choices: ['唱歌', '跳舞', '绘画'], + pageSize: 2, // 分页 + }, + // 密码 + { + type: 'password', + message: '请输入密码', + name: 'pwd', + }, + // 使用编辑器 + { + type: 'editor', + message: '请输入备注文本', + name: 'editor-content', + } +]; + +// 2. 获取问题回答答案 +inquirer.prompt(promptList).then(answers => { + console.log(answers); +}); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/package.json" new file mode 100644 index 000000000..fea5dbbc0 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/03-inquirer/package.json" @@ -0,0 +1,19 @@ +{ + "name": "inquirer-study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0", + "inquirer": "^9.2.10" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/README.md" new file mode 100644 index 000000000..e1dc37712 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/README.md" @@ -0,0 +1,6 @@ +# 04-ora + +一般用于下载拉取模板,安装,注意node版本 +``` +$ npm install ora +``` diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/bin/csxiaoyao.js" new file mode 100755 index 000000000..82faf6182 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/bin/csxiaoyao.js" @@ -0,0 +1,15 @@ +#!/usr/bin/env node + +import ora from 'ora'; + +const spinner = ora('开始下载,加载中').start(); +spinner.color = 'red'; + +setTimeout(() => { + spinner.stop(); // 停止加载 + spinner.succeed('下载成功!'); + // spinner.fail('下载失败'); + // spinner.warn('下载遇到问题'); + // spinner.info('你有一个消息'); + +}, 2000); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/package.json" new file mode 100644 index 000000000..be050089f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/04-ora\345\212\240\350\275\275\345\267\245\345\205\267/package.json" @@ -0,0 +1,18 @@ +{ + "name": "ora-study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "ora": "^7.0.1" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/README.md" new file mode 100644 index 000000000..542efee91 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/README.md" @@ -0,0 +1,6 @@ +# 05-chalk 颜色处理 + + +``` +$ npm install chalk +``` diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/bin/csxiaoyao.js" new file mode 100755 index 000000000..6c2169f40 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/bin/csxiaoyao.js" @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +import chalk from 'chalk'; + +// const log = { +// error(str) { +// chalk.bold.red(str) +// } +// // your own themes +// } +const log = console.log; + +// 文本颜色 +log(chalk.bold.red('csxiaoyao.com')); +log(chalk.yellow('csxiaoyao.com')); +log(chalk.green('csxiaoyao.com')); +log(chalk.white('csxiaoyao.com')); +log(chalk.grey('csxiaoyao.com')); +log(chalk.hex('#DEADED').underline('Hello, world!')); +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// 背景色 +log(chalk.bgRed('csxiaoyao.com')); +log(chalk.bgBlue('csxiaoyao.com')); +log(chalk.rgb(15, 100, 204).inverse('Hello!')) + +// 模板字符串 +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/package.json" new file mode 100644 index 000000000..f4f41fdfe --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/05-chalk\351\242\234\350\211\262\345\244\204\347\220\206/package.json" @@ -0,0 +1,18 @@ +{ + "name": "chalk-study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "chalk": "^5.3.0" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/README.md" new file mode 100644 index 000000000..eb4f84fc9 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/README.md" @@ -0,0 +1,6 @@ +# 06-download-git-repo + + +``` +$ npm install download-git-repo +``` diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/bin/csxiaoyao.js" new file mode 100755 index 000000000..1ba08667e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/bin/csxiaoyao.js" @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +import download from 'download-git-repo'; + +// download(仓库地址, 本地存放地址, 选项配置, 回调函数) +// github作者名/仓库名 +download('vuejs/awesome-vue', 'project/awesome-vue', { + // clone: true, + // proxy: '', + // headers: {}, + // filter +}, (err) => { + if (err) { + console.log(err); + } else { + console.log('success'); + } +}); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/package.json" new file mode 100644 index 000000000..0cdc5dbb0 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/06-download-git-repo/package.json" @@ -0,0 +1,18 @@ +{ + "name": "study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "download-git-repo": "^3.0.2" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/README.md" new file mode 100644 index 000000000..59ba08a68 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/README.md" @@ -0,0 +1,21 @@ +# 07-创建脚手架命令 + +1. 创建命令可执行文件并绑定在 package.json +``` +"csxiaoyao": "./bin/csxiaoyao.js", +"csxiaoyao-add": "./bin/csxiaoyao-add.js", +"csxiaoyao-list": "./bin/csxiaoyao-list.js", +"csxiaoyao-delete": "./bin/csxiaoyao-delete.js", +"csxiaoyao-init": "./bin/csxiaoyao-init.js" +``` + +2. 链接 +``` +$ npm link +``` + +3. 使用命令 +``` +$ csxiaoyao add +$ csxiaoyao-add +``` \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-add.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-add.js" new file mode 100755 index 000000000..ac9c13309 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-add.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao add'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-delete.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-delete.js" new file mode 100755 index 000000000..483f4f698 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-delete.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao delete'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-init.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-init.js" new file mode 100755 index 000000000..709a4b61f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-init.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao init'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-list.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-list.js" new file mode 100755 index 000000000..91ae1503a --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao-list.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao list'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao.js" new file mode 100755 index 000000000..78c5bea69 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/bin/csxiaoyao.js" @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +import { program } from 'commander'; + +program + .version('1.0.0') + .usage(' [csxiaoyao options]') + .command('add', 'add a template') + .command('delete', 'delete a template') + .command('list', 'list all templates') + .command('init', 'generate a new project from template') + .parse(process.argv) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/package.json" new file mode 100644 index 000000000..acc682f12 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/07-\345\210\233\345\273\272\350\204\232\346\211\213\346\236\266\345\221\275\344\273\244/package.json" @@ -0,0 +1,23 @@ +{ + "name": "study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js", + "csxiaoyao-add": "./bin/csxiaoyao-add.js", + "csxiaoyao-list": "./bin/csxiaoyao-list.js", + "csxiaoyao-delete": "./bin/csxiaoyao-delete.js", + "csxiaoyao-init": "./bin/csxiaoyao-init.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0", + "download-git-repo": "^3.0.2" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/README.md" new file mode 100644 index 000000000..a12c6a52c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/README.md" @@ -0,0 +1,7 @@ +# 命令开发 + +1. 创建 csxiaoyao-template.json 存储模板json + +2. 编写 ./bin/csxiaoyao-add.js 逻辑 +3. 编写 ./bin/csxiaoyao-delete.js 逻辑 +4. 编写 ./bin/csxiaoyao-list.js 逻辑 diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-add.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-add.js" new file mode 100755 index 000000000..479d69d54 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-add.js" @@ -0,0 +1,62 @@ +#!/usr/bin/env node +// 引入问答交互模块 +import inquirer from 'inquirer'; +import fs from 'fs'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +const questions = [ + { + type: 'input', + name: 'tpl-name', + message: '请输入模版名称', + // 必须输入且不能重复 + validate: (val) => { + if (val === '') { + return '模板名称不能为空'; + } else if (csxiaoyaoTpls.filter(v => (v.name === val)).length > 0) { + return '当前模板已经存在'; + } else { + return true; + } + } + }, + { + type: 'input', + name: 'tpl-url', + message: '请输入模版地址', + // 必须输入 + validate: (val) => { + if (val === '') { + return '模板地址不能为空'; + } else { + return true; + } + } + } +]; + +inquirer + .prompt(questions).then(answers => { + console.log(answers); + // 获取问答内容 + let tplName = answers['tpl-name']; + let tplUrl = answers['tpl-url']; + + // 更新到 csxiaoyao-template.json 模板文件中 + csxiaoyaoTpls.push({ + name: tplName, + url: tplUrl, + }); + + // 更新文件内容 + fs.writeFileSync(tpath, JSON.stringify(csxiaoyaoTpls)); + + }) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-delete.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-delete.js" new file mode 100755 index 000000000..f8e055bde --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-delete.js" @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +import inquirer from 'inquirer'; +import fs from 'fs'; +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +const questions = [ + { + type: 'input', + name: 'tpl-name', + message: '请输入要删除的模版名称', + validate: (val) => { + if (val === '') { + return '模板名称不能为空'; + } else if (csxiaoyaoTpls.filter(v => (v.name === val)).length === 0) { + return '当前要删除的模板不存在'; + } else { + return true; + } + } + }, +]; + +inquirer + .prompt(questions).then(answers => { + let tplName = answers['tpl-name']; + // 更新文件内容 + fs.writeFileSync(tpath, JSON.stringify(csxiaoyaoTpls.filter(v => v.name !== tplName))); + + console.log(chalk.green('删除成功')); + }) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-init.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-init.js" new file mode 100755 index 000000000..709a4b61f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-init.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao init'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-list.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-list.js" new file mode 100755 index 000000000..ad18ba17a --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao-list.js" @@ -0,0 +1,15 @@ +#!/usr/bin/env node +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +csxiaoyaoTpls.forEach(v => { + console.log(`模板名称: ${chalk.green(v.name)}, 模板地址: ${chalk.yellow(v.url)}`); +}); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao.js" new file mode 100755 index 000000000..78c5bea69 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/bin/csxiaoyao.js" @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +import { program } from 'commander'; + +program + .version('1.0.0') + .usage(' [csxiaoyao options]') + .command('add', 'add a template') + .command('delete', 'delete a template') + .command('list', 'list all templates') + .command('init', 'generate a new project from template') + .parse(process.argv) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/csxiaoyao-template.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/csxiaoyao-template.json" new file mode 100644 index 000000000..092f433e7 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/csxiaoyao-template.json" @@ -0,0 +1 @@ +[{"name":"测试","url":"csxiaoyao/test"}] \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/package.json" new file mode 100644 index 000000000..4899e589f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/08-add&delete&list\345\221\275\344\273\244/package.json" @@ -0,0 +1,24 @@ +{ + "name": "study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js", + "csxiaoyao-add": "./bin/csxiaoyao-add.js", + "csxiaoyao-list": "./bin/csxiaoyao-list.js", + "csxiaoyao-delete": "./bin/csxiaoyao-delete.js", + "csxiaoyao-init": "./bin/csxiaoyao-init.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0", + "download-git-repo": "^3.0.2", + "inquirer": "^9.2.10" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/README.md" new file mode 100644 index 000000000..8f37f9dae --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/README.md" @@ -0,0 +1,2 @@ +# init命令开发 + diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-add.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-add.js" new file mode 100755 index 000000000..ac9c13309 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-add.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao add'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-delete.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-delete.js" new file mode 100755 index 000000000..483f4f698 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-delete.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao delete'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-init.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-init.js" new file mode 100755 index 000000000..2870c0ce6 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-init.js" @@ -0,0 +1,69 @@ +#!/usr/bin/env node + +import { program } from 'commander'; +import download from 'download-git-repo'; +import ora from 'ora'; +import fs from 'fs'; +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +// 定义 csxiaoyao init [project-name] +program + .usage(' [project-name]') + .parse(process.argv) + +// 参数校验,如直接使用 csxiaoyao init 则会提示 help; +if (program.args.length < 1) { + program.help(); +} + +// 获取用户输入参数 +let tName = program.args[0]; +let pName = program.args[1]; + +if (csxiaoyaoTpls.filter(v => tName === v.name).length === 0) { + + console.log(chalk.red('模板名称不存在,请使用 csxiaoyao list 命令查看可输入的模板')); + +} else if (!pName) { + + console.log(chalk.red('项目名称不能为空')); + +} else if (!pName) { + + console.log(chalk.red('项目名称不能为空')); + +} else { + + // 获取模板地址 + let url = csxiaoyaoTpls.filter(v => tName === v.name)[0].url; + + // 开始创建项目 + console.log(chalk.yellow('开始创建项目')); + + // 出现加载图标 + const spinner = ora('下载拉取中...'); + spinner.start(); + + // 传入参数,进行下载 + download(url, pName, err => { + if (err) { + spinner.fail(); + console.log(chalk.red('创建项目失败' + err)); + return; + } + // 成功加载 + spinner.succeed(); + console.log(chalk.green('创建目录成功')); + console.log('\n to start'); + console.log(`cd ${pName}`); + }); +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-list.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-list.js" new file mode 100755 index 000000000..91ae1503a --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao-list.js" @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +console.log('csxiaoyao list'); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao.js" new file mode 100755 index 000000000..78c5bea69 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/bin/csxiaoyao.js" @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +import { program } from 'commander'; + +program + .version('1.0.0') + .usage(' [csxiaoyao options]') + .command('add', 'add a template') + .command('delete', 'delete a template') + .command('list', 'list all templates') + .command('init', 'generate a new project from template') + .parse(process.argv) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/csxiaoyao-template.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/csxiaoyao-template.json" new file mode 100644 index 000000000..7b3ad556e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/csxiaoyao-template.json" @@ -0,0 +1 @@ +[{"name":"vuejs","url":"vuejs/awesome-vue"}] \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/package.json" new file mode 100644 index 000000000..4899e589f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/09-init\345\221\275\344\273\244/package.json" @@ -0,0 +1,24 @@ +{ + "name": "study", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js", + "csxiaoyao-add": "./bin/csxiaoyao-add.js", + "csxiaoyao-list": "./bin/csxiaoyao-list.js", + "csxiaoyao-delete": "./bin/csxiaoyao-delete.js", + "csxiaoyao-init": "./bin/csxiaoyao-init.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0", + "download-git-repo": "^3.0.2", + "inquirer": "^9.2.10" + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/.npmignore" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/.npmignore" new file mode 100644 index 000000000..30bc16279 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/.npmignore" @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/README.md" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/README.md" new file mode 100644 index 000000000..5c9a62af8 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/README.md" @@ -0,0 +1,22 @@ +# npm 发布 + +## 1. 创建npm账号 + +https://npmjs.com + +账号: csxiaoyao + +## 2. 创建npm忽略文件 `.npmignore` + +## 3. 发布 csxiaoyao-cli +``` +$ npm login +$ npm publish +``` + +## 4. 本地安装 +``` +$ npm unlink +$ npm install csxiaoyao-cli --global +$ csxiaoyao +``` \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-add.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-add.js" new file mode 100755 index 000000000..479d69d54 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-add.js" @@ -0,0 +1,62 @@ +#!/usr/bin/env node +// 引入问答交互模块 +import inquirer from 'inquirer'; +import fs from 'fs'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +const questions = [ + { + type: 'input', + name: 'tpl-name', + message: '请输入模版名称', + // 必须输入且不能重复 + validate: (val) => { + if (val === '') { + return '模板名称不能为空'; + } else if (csxiaoyaoTpls.filter(v => (v.name === val)).length > 0) { + return '当前模板已经存在'; + } else { + return true; + } + } + }, + { + type: 'input', + name: 'tpl-url', + message: '请输入模版地址', + // 必须输入 + validate: (val) => { + if (val === '') { + return '模板地址不能为空'; + } else { + return true; + } + } + } +]; + +inquirer + .prompt(questions).then(answers => { + console.log(answers); + // 获取问答内容 + let tplName = answers['tpl-name']; + let tplUrl = answers['tpl-url']; + + // 更新到 csxiaoyao-template.json 模板文件中 + csxiaoyaoTpls.push({ + name: tplName, + url: tplUrl, + }); + + // 更新文件内容 + fs.writeFileSync(tpath, JSON.stringify(csxiaoyaoTpls)); + + }) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-delete.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-delete.js" new file mode 100755 index 000000000..f8e055bde --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-delete.js" @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +import inquirer from 'inquirer'; +import fs from 'fs'; +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +const questions = [ + { + type: 'input', + name: 'tpl-name', + message: '请输入要删除的模版名称', + validate: (val) => { + if (val === '') { + return '模板名称不能为空'; + } else if (csxiaoyaoTpls.filter(v => (v.name === val)).length === 0) { + return '当前要删除的模板不存在'; + } else { + return true; + } + } + }, +]; + +inquirer + .prompt(questions).then(answers => { + let tplName = answers['tpl-name']; + // 更新文件内容 + fs.writeFileSync(tpath, JSON.stringify(csxiaoyaoTpls.filter(v => v.name !== tplName))); + + console.log(chalk.green('删除成功')); + }) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-init.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-init.js" new file mode 100755 index 000000000..2870c0ce6 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-init.js" @@ -0,0 +1,69 @@ +#!/usr/bin/env node + +import { program } from 'commander'; +import download from 'download-git-repo'; +import ora from 'ora'; +import fs from 'fs'; +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +// 定义 csxiaoyao init [project-name] +program + .usage(' [project-name]') + .parse(process.argv) + +// 参数校验,如直接使用 csxiaoyao init 则会提示 help; +if (program.args.length < 1) { + program.help(); +} + +// 获取用户输入参数 +let tName = program.args[0]; +let pName = program.args[1]; + +if (csxiaoyaoTpls.filter(v => tName === v.name).length === 0) { + + console.log(chalk.red('模板名称不存在,请使用 csxiaoyao list 命令查看可输入的模板')); + +} else if (!pName) { + + console.log(chalk.red('项目名称不能为空')); + +} else if (!pName) { + + console.log(chalk.red('项目名称不能为空')); + +} else { + + // 获取模板地址 + let url = csxiaoyaoTpls.filter(v => tName === v.name)[0].url; + + // 开始创建项目 + console.log(chalk.yellow('开始创建项目')); + + // 出现加载图标 + const spinner = ora('下载拉取中...'); + spinner.start(); + + // 传入参数,进行下载 + download(url, pName, err => { + if (err) { + spinner.fail(); + console.log(chalk.red('创建项目失败' + err)); + return; + } + // 成功加载 + spinner.succeed(); + console.log(chalk.green('创建目录成功')); + console.log('\n to start'); + console.log(`cd ${pName}`); + }); +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-list.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-list.js" new file mode 100755 index 000000000..ad18ba17a --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao-list.js" @@ -0,0 +1,15 @@ +#!/usr/bin/env node +import chalk from 'chalk'; + +import { createRequire } from "module"; +import path, { dirname } from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // type=module时 __dirname 不可直接使用 + +const require = createRequire(import.meta.url); +const csxiaoyaoTpls = require(path.resolve(__dirname, '../csxiaoyao-template.json')); + +csxiaoyaoTpls.forEach(v => { + console.log(`模板名称: ${chalk.green(v.name)}, 模板地址: ${chalk.yellow(v.url)}`); +}); \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao.js" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao.js" new file mode 100755 index 000000000..78c5bea69 --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/bin/csxiaoyao.js" @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +import { program } from 'commander'; + +program + .version('1.0.0') + .usage(' [csxiaoyao options]') + .command('add', 'add a template') + .command('delete', 'delete a template') + .command('list', 'list all templates') + .command('init', 'generate a new project from template') + .parse(process.argv) \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/csxiaoyao-template.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/csxiaoyao-template.json" new file mode 100644 index 000000000..7b3ad556e --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/csxiaoyao-template.json" @@ -0,0 +1 @@ +[{"name":"vuejs","url":"vuejs/awesome-vue"}] \ No newline at end of file diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package-lock.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package-lock.json" new file mode 100644 index 000000000..9ed29876c --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package-lock.json" @@ -0,0 +1,1272 @@ +{ + "name": "csxiaoyao-cli", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ljharb/through": { + "version": "2.3.9", + "resolved": "https://mirrors.tencent.com/npm/@ljharb/through/-/through-2.3.9.tgz", + "integrity": "sha512-yN599ZBuMPPK4tdoToLlvgJB4CLK8fGl7ntfy0Wn7U6ttNvHYurd81bfUiK/6sMkiIwm65R6ck4L6+Y3DfVbNQ==" + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://mirrors.tencent.com/npm/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://mirrors.tencent.com/npm/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "archive-type": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "requires": { + "file-type": "^4.2.0" + }, + "dependencies": { + "file-type": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=" + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://mirrors.tencent.com/npm/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bl": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://mirrors.tencent.com/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://mirrors.tencent.com/npm/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + } + } + }, + "caw": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "requires": { + "get-proxy": "^2.0.0", + "isurl": "^1.0.0-alpha5", + "tunnel-agent": "^0.6.0", + "url-to-options": "^1.0.1" + } + }, + "chalk": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==" + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://mirrors.tencent.com/npm/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.9.0", + "resolved": "https://mirrors.tencent.com/npm/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==" + }, + "cli-width": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==" + }, + "clone": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "commander": { + "version": "11.0.0", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-11.0.0.tgz", + "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://mirrors.tencent.com/npm/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://mirrors.tencent.com/npm/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://mirrors.tencent.com/npm/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://mirrors.tencent.com/npm/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "defaults": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "requires": { + "clone": "^1.0.2" + } + }, + "download": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", + "requires": { + "archive-type": "^4.0.0", + "caw": "^2.0.1", + "content-disposition": "^0.5.2", + "decompress": "^4.2.0", + "ext-name": "^5.0.0", + "file-type": "^8.1.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^8.3.1", + "make-dir": "^1.2.0", + "p-event": "^2.1.0", + "pify": "^3.0.0" + } + }, + "download-git-repo": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/download-git-repo/-/download-git-repo-3.0.2.tgz", + "integrity": "sha512-N8hWXD4hXqmEcNoR8TBYFntaOcYvEQ7Bz90mgm3bZRTuteGQqwT32VDMnTyD0KTEvb8BWrMc1tVmzuV9u/WrAg==", + "requires": { + "download": "^7.1.0", + "git-clone": "^0.1.0", + "rimraf": "^3.0.0" + } + }, + "duplexer3": { + "version": "0.1.5", + "resolved": "https://mirrors.tencent.com/npm/duplexer3/-/duplexer3-0.1.5.tgz", + "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://mirrors.tencent.com/npm/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://mirrors.tencent.com/npm/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "requires": { + "mime-db": "^1.28.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "requires": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", + "requires": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==" + } + } + }, + "file-type": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==" + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=" + }, + "filenamify": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-proxy": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "requires": { + "npm-conf": "^1.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "git-clone": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/git-clone/-/git-clone-0.1.0.tgz", + "integrity": "sha1-DXYWN3gJOu9/HDAjjyqe8/B6Lrk=" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "got": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://mirrors.tencent.com/npm/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://mirrors.tencent.com/npm/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://mirrors.tencent.com/npm/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://mirrors.tencent.com/npm/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "inquirer": { + "version": "9.2.10", + "resolved": "https://mirrors.tencent.com/npm/inquirer/-/inquirer-9.2.10.tgz", + "integrity": "sha512-tVVNFIXU8qNHoULiazz612GFl+yqNfjMTbLuViNJE/d860Qxrd3NMrse8dm40VUQLOQeULvaQF8lpAhvysjeyA==", + "requires": { + "@ljharb/through": "^2.3.9", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^5.0.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + } + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://mirrors.tencent.com/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + } + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://mirrors.tencent.com/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mute-stream": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==" + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + } + }, + "npm-conf": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "requires": { + "config-chain": "^1.1.11", + "pify": "^3.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://mirrors.tencent.com/npm/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" + }, + "p-event": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "requires": { + "p-timeout": "^2.0.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "requires": { + "p-finally": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "pend": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==" + }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://mirrors.tencent.com/npm/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "requires": { + "commander": "^2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "requires": { + "sort-keys": "^1.0.0" + }, + "dependencies": { + "sort-keys": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://mirrors.tencent.com/npm/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://mirrors.tencent.com/npm/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://mirrors.tencent.com/npm/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "requires": { + "defaults": "^1.0.3" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://mirrors.tencent.com/npm/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git "a/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package.json" "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package.json" new file mode 100644 index 000000000..80ab07e9f --- /dev/null +++ "b/11-\346\236\204\345\273\272\345\267\245\345\205\267/05-\350\204\232\346\211\213\346\236\266/10-npm\345\217\221\345\270\203/package.json" @@ -0,0 +1,24 @@ +{ + "name": "csxiaoyao-cli", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "bin": { + "csxiaoyao": "./bin/csxiaoyao.js", + "csxiaoyao-add": "./bin/csxiaoyao-add.js", + "csxiaoyao-list": "./bin/csxiaoyao-list.js", + "csxiaoyao-delete": "./bin/csxiaoyao-delete.js", + "csxiaoyao-init": "./bin/csxiaoyao-init.js" + }, + "type": "module", + "author": "", + "license": "ISC", + "dependencies": { + "commander": "^11.0.0", + "download-git-repo": "^3.0.2", + "inquirer": "^9.2.10" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/.gitignore" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/.gitignore" new file mode 100644 index 000000000..b512c09d4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/.gitignore" @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/01-JSX.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/01-JSX.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/01-JSX.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/01-JSX.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/02-components&props.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/02-components&props.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/02-components&props.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/02-components&props.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/03-state.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/03-state.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/03-state.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/03-state.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/04-lifecycle.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/04-lifecycle.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/04-lifecycle.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/04-lifecycle.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/05-events.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/05-events.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/05-events.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/05-events.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/06-lists&keys.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/06-lists&keys.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/06-lists&keys.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/06-lists&keys.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/07-forms.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/07-forms.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/07-forms.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/07-forms.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/08-props.children.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/08-props.children.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/08-props.children.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/08-props.children.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/09-PropTypes.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/09-PropTypes.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/09-PropTypes.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/09-PropTypes.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/10-refs.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/10-refs.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/10-refs.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/10-refs.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/11-ajax.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/11-ajax.html" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/11-ajax.html" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/11-ajax.html" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/README.md" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/README.md" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/README.md" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/README.md" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/README.md" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/README.md" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/app.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/app.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/app.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/app.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/browser.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/browser.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/browser.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/browser.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/package.json" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/package.json" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/package.json" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/server.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/server.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/server.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/server.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/app.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/app.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/app.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/app.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/browser.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/browser.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/browser.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/browser.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/server.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/server.js" similarity index 100% rename from "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/demo/src/server.js" rename to "12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/old/demo/src/server.js" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/01-\344\270\211\344\270\252\346\240\270\345\277\203api.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/01-\344\270\211\344\270\252\346\240\270\345\277\203api.html" new file mode 100644 index 000000000..0bc046bf2 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/01-\344\270\211\344\270\252\346\240\270\345\277\203api.html" @@ -0,0 +1,61 @@ + + + + + Hello World + + + + + + + +
                + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/02-JSX.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/02-JSX.html" new file mode 100644 index 000000000..594f0d66d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/02-JSX.html" @@ -0,0 +1,60 @@ + + + + + JSX + + + + + + + +
                + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/03-create-react-app.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/03-create-react-app.html" new file mode 100644 index 000000000..94e14a2bd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/03-create-react-app.html" @@ -0,0 +1 @@ +create-react-app [项目名] \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/script/babel.min.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/script/babel.min.js" new file mode 100644 index 000000000..10757768a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/00-start/script/babel.min.js" @@ -0,0 +1,25 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,i){n.apply(this,[e,t,i].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function i(e){var t=(e.presets||[]).map(function(e){var t=n(E,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===h(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=d({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return d({babelrc:!1},e,{presets:t,plugins:r})}function s(e,t){return y.transform(e,i(t))}function a(e,t,r){return y.transformFromAst(e,t,i(r))}function o(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function u(e){Object.keys(e).forEach(function(t){return o(t,e[t])})}function l(e,t){E.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),E[e]=t}function c(e){Object.keys(e).forEach(function(t){return l(t,e[t])})}function f(e){(0,v.runScripts)(s,e)}function p(){window.removeEventListener("DOMContentLoaded",f)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.buildExternalHelpers=t.availablePresets=t.availablePlugins=void 0;var d=Object.assign||function(e){for(var t=1;t=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=z.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,B.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,T.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function l(e,t,r){return e.object=z.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=z.memberExpression(t,e.object),e}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=z.toBlock(e[t],e)}function p(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function d(e){var t=p(e);return delete t.loc,t}function h(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=z.cloneDeep(n):Array.isArray(n)&&(n=n.map(z.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!z.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(z.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!z.isStringLiteral(s)){if(z.isMemberExpression(s)){if(s.computed&&!z.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=z.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,T.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}delete e[i]}return e}function v(e,t){return g(e,t),b(e,t),E(e,t),e}function g(e,t){x("trailingComments",e,t)}function b(e,t){x("leadingComments",e,t)}function E(e,t){x("innerComments",e,t)}function x(e,t,r){t&&r&&(t[e]=(0,K.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=z.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,T.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=z.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,T.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;e[p]=t[p]}return z.inheritsComments(e,t),e}function S(e){if(!_(e))throw new TypeError("Not a valid node "+(e&&e.type))}function _(e){return!(!e||!H.VISITOR_KEYS[e.type])}function D(e,t,r){if(e){var n=z.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,T.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,f=Array.isArray(c),p=0,c=f?c:(0,T.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;D(h,t,r)}else D(l,t,r)}}}}function C(e,t){t=t||{};for(var r=t.preserveComments?Z:ee,n=r,i=Array.isArray(n),s=0,n=i?n:(0,T.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,k.default)(e),c=l,f=Array.isArray(c),p=0,c=f?c:(0,T.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}e[d]=null}}function w(e,t){return D(e,C,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isNodesEquivalent=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var P=r(360),k=n(P),F=r(2),T=n(F),O=r(14),B=n(O),R=r(35),I=n(R),M=r(135);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return M.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return M.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return M.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return M.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return M.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return M.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return M.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return M.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return M.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return M.NOT_LOCAL_BINDING}}),t.is=s,t.isType=a,t.validate=o,t.shallowEqual=u,t.appendToMemberExpression=l,t.prependToMemberExpression=c,t.ensureBlock=f,t.clone=p,t.cloneWithoutLoc=d,t.cloneDeep=h,t.buildMatchMemberExpression=m,t.removeComments=y,t.inheritsComments=v,t.inheritTrailingComments=g,t.inheritLeadingComments=b,t.inheritInnerComments=E,t.inherits=A,t.assertNode=S,t.isNode=_,t.traverseFast=D,t.removeProperties=C,t.removePropertiesDeep=w;var N=r(226);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return N.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return N.getOuterBindingIdentifiers}});var L=r(395);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return L.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return L.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return L.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return L.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return L.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return L.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return L.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return L.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return L.isImmutable}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return L.isNodesEquivalent}});var j=r(385);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return j.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return j.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return j.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return j.toIdentifier}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return j.toBindingIdentifierName}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return j.toStatement}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return j.toExpression}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return j.toBlock}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return j.valueToNode}});var U=r(393);Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return U.createUnionTypeAnnotation}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return U.removeTypeDuplicates}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return U.createTypeAnnotationBasedOnTypeof}});var V=r(624),G=n(V),W=r(109),Y=n(W),q=r(600),K=n(q);r(390);var H=r(26),J=r(394),X=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(J),z=t;t.VISITOR_KEYS=H.VISITOR_KEYS,t.ALIAS_KEYS=H.ALIAS_KEYS,t.NODE_FIELDS=H.NODE_FIELDS,t.BUILDER_KEYS=H.BUILDER_KEYS,t.DEPRECATED_KEYS=H.DEPRECATED_KEYS,t.react=X;for(var $ in z.VISITOR_KEYS)i($);z.FLIPPED_ALIAS_KEYS={},(0,B.default)(z.ALIAS_KEYS).forEach(function(e){z.ALIAS_KEYS[e].forEach(function(t){(z.FLIPPED_ALIAS_KEYS[t]=z.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,B.default)(z.FLIPPED_ALIAS_KEYS).forEach(function(e){z[e.toUpperCase()+"_TYPES"]=z.FLIPPED_ALIAS_KEYS[e],i(e)});t.TYPES=(0,B.default)(z.VISITOR_KEYS).concat((0,B.default)(z.FLIPPED_ALIAS_KEYS)).concat((0,B.default)(z.DEPRECATED_KEYS));(0,B.default)(z.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,T.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,c=z.NODE_FIELDS[e][l],f=arguments[n++];void 0===f&&(f=(0,Y.default)(c.default)),t[l]=f}for(var p in t)o(t,p,t[p]);return t}var r=z.BUILDER_KEYS[e];z[e]=t,z[e[0].toLowerCase()+e.slice(1)]=t});for(var Q in z.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=z.DEPRECATED_KEYS[e];z[e]=z[e[0].toLowerCase()+e.slice(1)]=t(z[r]),z["is"+e]=t(z["is"+r]),z["assert"+e]=t(z["assert"+r])}(Q);(0,G.default)(z),(0,G.default)(z.VISITOR_KEYS);var Z=["tokens","start","end","loc","raw","rawValue"],ee=z.COMMENT_KEYS.concat(["comments"]).concat(Z)},function(e,t,r){"use strict";e.exports={default:r(404),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}t.__esModule=!0;var a=r(10),o=i(a);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,f.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=v.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[E]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;if((!s||!s[h])&&o.visit(e,h))return}},s.clearNode=function(e,t){x.removeProperties(e,t),S.path.delete(e)},s.removeProperties=function(e,t){return x.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,b.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){S.clear()},s.clearCache.clearPath=S.clearPath,s.clearCache.clearScope=S.clearScope,s.copyCache=function(e,t){S.path.has(e)&&S.path.set(t,S.path.get(e))}},function(e,t){"use strict";function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function s(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&o())}function o(){if(!m){var e=i(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++y1)for(var r=1;r=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return t=r(n(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),s="/"===a(e,-1);return e=r(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),s=n(r.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u1?t-1:0),n=1;n=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(b.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i(n)===c||b.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&D[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(_[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,d.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var f=t.fields[c];-1===t.builder.indexOf(c)&&(f.optional=!0),void 0===f.default?f.default=null:f.validate||(f.validate=l(i(f.default)))}E[e]=t.visitor,S[e]=t.builder,A[e]=t.fields,x[e]=t.aliases,D[e]=t}t.__esModule=!0,t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var p=r(2),d=n(p),h=r(35),m=n(h),y=r(11),v=n(y);t.assertEach=s,t.assertOneOf=a,t.assertNodeType=o,t.assertNodeOrValueType=u,t.assertValueType=l,t.chain=c,t.default=f;var g=r(1),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),E=t.VISITOR_KEYS={},x=t.ALIAS_KEYS={},A=t.NODE_FIELDS={},S=t.BUILDER_KEYS={},_=t.DEPRECATED_KEYS={},D={}},function(e,t){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(23),i=r(92);e.exports=r(22)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";function n(e){return null==e?void 0===e?u:o:l&&l in Object(e)?s(e):a(e)}var i=r(45),s=r(534),a=r(559),o="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var a=!r;r||(r={});for(var o=-1,u=t.length;++o=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===t)return l.plugin}var c=void 0;if(c="function"==typeof t?t(b):t,"object"===(void 0===c?"undefined":(0,m.default)(c))){var f=new x.default(c,i);return e.memoisedPlugins.push({container:t,plugin:f}),f}throw new TypeError(S.get("pluginNotObject",r,n,void 0===c?"undefined":(0,m.default)(c))+r+n)},e.createBareOptions=function(){var e={};for(var t in M.default){var r=M.default[t];e[t]=(0,O.default)(r.default)}return e},e.normalisePlugin=function(t,r,n,i){if(!((t=t.__esModule?t.default:t)instanceof x.default)){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new TypeError(S.get("pluginNotFunction",r,n,void 0===t?"undefined":(0,m.default)(t)));t=e.memoisePluginContainer(t,r,n,i)}return t.init(r,n),t},e.normalisePlugins=function(t,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:t+"$"+s;if("string"==typeof a){var l=(0,C.default)(a,n);if(!l)throw new ReferenceError(S.get("pluginUnknown",a,t,s,n));a=r(179)(l)}return a=e.normalisePlugin(a,t,s,u),[a,o]})},e.prototype.mergeOptions=function(t){var r=this,i=t.options,s=t.extending,a=t.alias,o=t.loc,u=t.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,F.default)(i,function(e){if(e instanceof x.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){if(!M.default[c]&&this.log)if(L.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+L.default[c].message,ReferenceError);else{var p="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(p+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,_.normaliseOptions)(l),l.plugins&&(l.plugins=e.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,f.default)(s,l):(0,R.default)(s||this.options,l)}},e.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:G.default.dirname(t||"")})})},e.prototype.resolvePresets=function(e,t,n){return e.map(function(e){var i=void 0;if(Array.isArray(e)){if(e.length>2)throw new Error("Unexpected extra options "+(0,l.default)(e.slice(2))+" passed to preset.");var s=e;e=s[0],i=s[1]}var a=void 0;try{if("string"==typeof e){if(!(a=(0,P.default)(e,t)))throw new Error("Couldn't find preset "+(0,l.default)(e)+" relative to directory "+(0,l.default)(t));e=r(179)(a)}if("object"===(void 0===e?"undefined":(0,m.default)(e))&&e.__esModule)if(e.default)e=e.default;else{var u=e,c=(u.__esModule,(0,o.default)(u,["__esModule"]));e=c}if("object"===(void 0===e?"undefined":(0,m.default)(e))&&e.buildPreset&&(e=e.buildPreset),"function"!=typeof e&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof e&&(e=e(b,i,{dirname:t})),"object"!==(void 0===e?"undefined":(0,m.default)(e)))throw new Error("Unsupported preset format: "+e+".");n&&n(e,a)}catch(e){throw a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"),e}return e})},e.prototype.normaliseOptions=function(){var e=this.options;for(var t in M.default){var r=M.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},e.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,U.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,d.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},e}();t.default=W,W.memoisedPlugins=[],e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";e.exports={default:r(405),__esModule:!0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(224),c=n(l),f=r(239),p=i(f),d=r(466),h=i(d),m=r(7),y=i(m),v=r(174),g=i(v),b=r(134),E=i(b),x=r(1),A=n(x),S=r(88),_=(0,p.default)("babel"),D=function(){function e(t,r){(0,u.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,h.default)(i,"To get a node path the parent needs to exist");var u=s[o],l=S.path.get(i)||[];S.path.has(i)||S.path.set(i,l);for(var c=void 0,f=0;f1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,y.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){_.enabled&&_(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=D,(0,g.default)(D.prototype,r(368)),(0,g.default)(D.prototype,r(374)),(0,g.default)(D.prototype,r(382)),(0,g.default)(D.prototype,r(372)),(0,g.default)(D.prototype,r(371)),(0,g.default)(D.prototype,r(377)),(0,g.default)(D.prototype,r(370)),(0,g.default)(D.prototype,r(381)),(0,g.default)(D.prototype,r(380)),(0,g.default)(D.prototype,r(373)),(0,g.default)(D.prototype,r(369));for(var C=A.TYPES,w=Array.isArray(C),P=0,C=w?C:(0,a.default)(C);;){var k;if("break"===function(){if(w){if(P>=C.length)return"break";k=C[P++]}else{if(P=C.next(),P.done)return"break";k=P.value}var e=k,t="is"+e;D.prototype[t]=function(e){return A[t](this.node,e)},D.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var F in c){(function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];D.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(F)}e.exports=t.default},function(e,t,r){"use strict";var n=r(142),i=r(140);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";function n(e,t){var r=s(e,t);return i(r)?r:void 0}var i=r(497),s=r(535);e.exports=n},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!f.isFunction(t))return;var i=p;t.generator&&(i=d);var s=i({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;s.callee._skipModulesRemap=!0;for(var a=s.callee.body.body[0].params,u=0,l=(0,o.default)(t);u0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];(0,p.default)(this,n);var i=(0,h.default)(this,t.call(this));return i.pipeline=r,i.log=new L.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,c.default)((0,u.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new w.Hub(i),i}return(0,y.default)(n,t),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(H.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(E,this)},n.prototype.initOptions=function(e){e=new _.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=q.default.basename(e.filename,q.default.extname(e.filename)),e.ignore=W.arrayify(e.ignore,W.regexify),e.only&&(e.only=W.arrayify(e.only,W.regexify)),(0,M.default)(e,{moduleRoot:e.sourceRoot}),(0,M.default)(e,{sourceRoot:e.moduleRoot}),(0,M.default)(e,{filenameRelative:e.filename});var t=q.default.basename(e.filenameRelative);return(0,M.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(te),r=[],n=[],i=t,s=Array.isArray(i),o=0,i=s?i:(0,a.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l[0],f=l[1];r.push(c.visitor),n.push(new C.default(this,c,f)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(H.importNamespaceSpecifier(i)):"default"===t?s.push(H.importDefaultSpecifier(i)):s.push(H.importSpecifier(i,H.identifier(t)));var a=H.importDeclaration(s,H.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return H.memberExpression(n,H.identifier(e));var s=(0,g.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return H.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=H.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,P.default)(e,re,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new F.default.SourceMapConsumer(t),n=new F.default.SourceMapConsumer(e),i=new F.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(t){var n=V.parse,i=this.opts.parserOpts;if(i&&(i=(0,c.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=q.default.dirname(this.opts.filename)||e.cwd(),a=(0,X.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=r(178)(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,V.parse)(e,i)}}}this.log.debug("Parse start");var o=n(t,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=w.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s,u=o.plugin,l=u[e];l&&l.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=A.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=A.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=ee.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(ee,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var t=this.opts,n=this.ast,i={ast:n};if(!t.code)return this.makeResult(i);var s=O.default;if(t.generatorOpts.generator&&"string"==typeof(s=t.generatorOpts.generator)){var a=q.default.dirname(this.opts.filename)||e.cwd(),o=(0,X.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=r(178)(o).print}this.log.debug("Generation start");var u=s(n,t.generatorOpts?(0,c.default)(t,t.generatorOpts):t,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==t.sourceMaps&&"both"!==t.sourceMaps||(i.code+="\n"+A.default.fromObject(i.map).toComment()),"inline"===t.sourceMaps&&(i.map=null),this.makeResult(i)},n}(U.default);t.default=ne,t.File=ne}).call(t,r(8))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=x[e];return null==t?x[e]=E.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new S(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&g.default.dirname(r)}),n.configs}t.__esModule=!0;var o=r(87),u=i(o),l=r(3),c=i(l);t.default=a;var f=r(118),p=i(f),d=r(470),h=i(d),m=r(604),y=i(m),v=r(19),g=i(v),b=r(115),E=i(b),x={},A={},S=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,y.default)(e)||(e=g.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=g.default.dirname(e));){if(!t){var i=g.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=g.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=g.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=E.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:g.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1 +;this.resolvedConfigs.push(e);var n=E.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:g.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,p.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||"production"||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e}();e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=o.default[t];if(n&&n.alias&&(n=o.default[n.alias]),n){var i=s[n.type];i&&(r=i(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=n;var i=r(53),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=r(33),o=function(e){return e&&e.__esModule?e:{default:e}}(a);t.config=o.default},function(e,t,r){"use strict";function n(e){return!!e}function i(e){return l.booleanify(e)}function s(e){return l.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=n,t.booleanString=i,t.list=s;var a=r(284),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=r(122),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);t.filename=o.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";var n=r(43),i=r(428),s=r(427),a=r(21),o=r(153),u=r(238),l={},c={},f=e.exports=function(e,t,r,f,p){var d,h,m,y,v=p?function(){return e}:u(e),g=n(r,f,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(s(v)){for(d=o(e.length);d>b;b++)if((y=t?g(a(h=e[b])[0],h[1]):g(e[b]))===l||y===c)return y}else for(m=v.call(e);!(h=m.next()).done;)if((y=i(m,g,h.value,t))===l||y===c)return y};f.BREAK=l,f.RETURN=c},function(e,t){"use strict";e.exports={}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(95)("meta"),s=r(16),a=r(28),o=r(23).f,u=0,l=Object.isExtensible||function(){return!0},c=!r(27)(function(){return l(Object.preventExtensions({}))}),f=function(e){o(e,i,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!s(e))return"symbol"==(void 0===e?"undefined":n(e))?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";f(e)}return e[i].i},d=function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;f(e)}return e[i].w},h=function(e){return c&&m.NEED&&l(e)&&!a(e,i)&&f(e),e},m=e.exports={KEY:i,NEED:!1,fastKey:p,getWeak:d,onFreeze:h}},function(e,t,r){"use strict";var n=r(16);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){"use strict";r(440);for(var n=r(15),i=r(29),s=r(56),a=r(13)("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=o?"/":"."),s?(s.path=r,i(s)):r}function a(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(v))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o}function o(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function u(e){return e}function l(e){return f(e)?"$"+e:e}function c(e){return f(e)?e.slice(1):e}function f(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function h(e,t){return e===t?0:e>t?1:-1}function m(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=h(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:h(e.name,t.name))}t.getArg=r;var y=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;t.urlParse=n,t.urlGenerate=i,t.normalize=s,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(y)},t.relative=o;var g=function(){return!("__proto__"in Object.create(null))}();t.toSetString=g?u:l,t.fromSetString=g?u:c,t.compareByOriginalPositions=p,t.compareByGeneratedPositionsDeflated=d,t.compareByGeneratedPositionsInflated=m},function(e,t,r){(function(t){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!d(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){d(e,t,!0)&&f(e,t,r,"notDeepStrictEqual",y)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function g(e){var t;try{e()}catch(e){t=e}return t}function b(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=g(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&f(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&v(i,r)||o)&&f(i,r,"Got unwanted exception"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}var E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x=r(117),A=Object.prototype.hasOwnProperty,S=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),D=e.exports=p,C=/\s*function\s+([^\(\s]*)\s*/;D.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(D.AssertionError,Error),D.fail=f,D.ok=p,D.equal=function(e,t,r){e!=t&&f(e,t,r,"==",D.equal)},D.notEqual=function(e,t,r){e==t&&f(e,t,r,"!=",D.notEqual)},D.deepEqual=function(e,t,r){d(e,t,!1)||f(e,t,r,"deepEqual",D.deepEqual)},D.deepStrictEqual=function(e,t,r){d(e,t,!0)||f(e,t,r,"deepStrictEqual",D.deepStrictEqual)},D.notDeepEqual=function(e,t,r){d(e,t,!1)&&f(e,t,r,"notDeepEqual",D.notDeepEqual)},D.notDeepStrictEqual=y,D.strictEqual=function(e,t,r){e!==t&&f(e,t,r,"===",D.strictEqual)},D.notStrictEqual=function(e,t,r){e===t&&f(e,t,r,"!==",D.notStrictEqual)},D.throws=function(e,t,r){b(!0,e,t,r)},D.doesNotThrow=function(e,t,r){b(!1,e,t,r)},D.ifError=function(e){if(e)throw e};var w=Object.keys||function(e){var t=[];for(var r in e)A.call(e,r)&&t.push(r);return t}}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(3),o=n(a),u=r(42),l=n(u),c=r(41),f=n(c),p=r(34),d=n(p),h=r(20),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=r(119),v=n(y),g=r(7),b=n(g),E=r(174),x=n(E),A=r(109),S=n(A),_=["enter","exit"],D=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,l.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,x.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,S.default)(i.take("visitor"))||{}),i}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(c){var f=c.apply(this,n);null!=f&&(e=f)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=b.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(m.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=_,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(e[i])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return b.default.explode(e),e},t}(v.default);t.default=D,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var n in r.bindings){var s=r.bindings[n];if("const"===s.kind||"module"===s.kind)for(var a=s.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,i.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;throw c.buildCodeFrameError(t.get("readOnly",n))}}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e,t){for(var n=t.get(e),s=n,a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l.node;if(l.isFunctionDeclaration()){var f=r.variableDeclaration("let",[r.variableDeclarator(c.id,r.toExpression(c))]);f._blockHoist=2,c.id=null,l.replaceWith(f)}}}var r=e.types;return{visitor:{BlockStatement:function(e){var n=e.node,i=e.parent;r.isFunction(i,{body:n})||r.isExportDeclaration(i)||t("body",e)},SwitchCase:function(e){t("consequent",e)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return b.isLoop(e.parent)||b.isCatchClause(e.parent)}function s(e){return!!b.isVariableDeclaration(e)&&(!!e[b.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function a(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!b.isFor(r))for(var s=0;s0&&e.traverse(P,t),e.skip()}},v.visitor]),P=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},v.visitor]),k={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=b.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return b.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},F={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},T={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},O={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(O,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(O,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(b.isBreakStatement(r)&&b.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=b.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=b.objectExpression([b.objectProperty(b.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=b.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(b.inherits(s,r)))}}},B=function(){function e(t,r,n,i,s){(0,h.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,p.default)(null),this.hasLetReferences=!1,this.letReferences=(0,p.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=b.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(b.isFunction(this.parent)||b.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!b.isLabeledStatement(this.loopParent)?b.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,x.default)(t),s=(0,x.default)(t),a=this.blockPath.isSwitchStatement(),o=b.functionExpression(null,i,b.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(b.variableDeclaration("var",[b.variableDeclarator(u,o)])));var l=b.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");y.default.hasType(o.body,this.scope,"YieldExpression",b.FUNCTION_TYPES)&&(o.generator=!0,l=b.yieldExpression(l,!0)),y.default.hasType(o.body,this.scope,"AwaitExpression",b.FUNCTION_TYPES)&&(o.async=!0,l=b.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(b.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,T,t);for(var r=0;r=t.length)break;o=t[a++]}else{if(a=t.next(),a.done)break;o=a.value}var u=o;"get"===u.kind||"set"===u.kind?n(e,u):r(e.objId,u,e.body)}}function a(e){for(var s=e.objId,a=e.body,u=e.computedProps,l=e.state,c=u,f=Array.isArray(c),p=0,c=f?c:(0,i.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d,m=o.toComputedKey(h);if("get"===h.kind||"set"===h.kind)n(e,h);else if(o.isStringLiteral(m,{value:"__proto__"}))r(s,h,a);else{if(1===u.length)return o.callExpression(l.addHelper("defineProperty"),[e.initPropExpression,m,t(h)]);a.push(o.expressionStatement(o.callExpression(l.addHelper("defineProperty"),[s,m,t(h)])))}}}var o=e.types,u=e.template,l=u("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");return{visitor:{ObjectExpression:{exit:function(e,t){for(var r=e.node,n=e.parent,u=e.scope,l=!1,c=r.properties,f=Array.isArray(c),p=0,c=f?c:(0,i.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}if(l=!0===d.computed)break}if(l){for(var h=[],m=[],y=!1,v=r.properties,g=Array.isArray(v),b=0,v=g?v:(0,i.default)(v);;){var E;if(g){if(b>=v.length)break;E=v[b++]}else{if(b=v.next(),b.done)break;E=b.value}var x=E;x.computed&&(y=!0),y?m.push(x):h.push(x)}var A=u.generateUidIdentifierBasedOnNode(n),S=o.objectExpression(h),_=[];_.push(o.variableDeclaration("var",[o.variableDeclarator(A,S)]));var D=a;t.opts.loose&&(D=s);var C=void 0,w=function(){return C||(C=u.generateUidIdentifier("mutatorMap"),_.push(o.variableDeclaration("var",[o.variableDeclarator(C,o.objectExpression([]))]))),C},P=D({scope:u,objId:A,body:_,computedProps:m,initPropExpression:S,getMutatorId:w,state:t});C&&_.push(o.expressionStatement(o.callExpression(t.addHelper("defineEnumerableProperties"),[A,C]))),P?e.replaceWith(P):(_.push(o.expressionStatement(A)),e.replaceWithMultiple(_))}}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(2),o=n(a);t.default=function(e){function t(e){for(var t=e.declarations,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isPattern(a.id))return!0}return!1}function r(e){for(var t=e.elements,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isRestElement(a))return!0}return!1}var n=e.types,i={ReferencedIdentifier:function(e,t){t.bindings[e.node.name]&&(t.deopt=!0,e.stop())}},a=function(){function e(t){(0,s.default)(this,e),this.blockHoist=t.blockHoist,this.operator=t.operator,this.arrays={},this.nodes=t.nodes||[],this.scope=t.scope,this.file=t.file,this.kind=t.kind} +return e.prototype.buildVariableAssignment=function(e,t){var r=this.operator;n.isMemberExpression(e)&&(r="=");var i=void 0;return i=r?n.expressionStatement(n.assignmentExpression(r,e,t)):n.variableDeclaration(this.kind,[n.variableDeclarator(e,t)]),i._blockHoist=this.blockHoist,i},e.prototype.buildVariableDeclaration=function(e,t){var r=n.variableDeclaration("var",[n.variableDeclarator(e,t)]);return r._blockHoist=this.blockHoist,r},e.prototype.push=function(e,t){n.isObjectPattern(e)?this.pushObjectPattern(e,t):n.isArrayPattern(e)?this.pushArrayPattern(e,t):n.isAssignmentPattern(e)?this.pushAssignmentPattern(e,t):this.nodes.push(this.buildVariableAssignment(e,t))},e.prototype.toArray=function(e,t){return this.file.opts.loose||n.isIdentifier(e)&&this.arrays[e.name]?e:this.scope.toArray(e,t)},e.prototype.pushAssignmentPattern=function(e,t){var r=this.scope.generateUidIdentifierBasedOnNode(t),i=n.variableDeclaration("var",[n.variableDeclarator(r,t)]);i._blockHoist=this.blockHoist,this.nodes.push(i);var s=n.conditionalExpression(n.binaryExpression("===",r,n.identifier("undefined")),e.right,r),a=e.left;if(n.isPattern(a)){var o=n.expressionStatement(n.assignmentExpression("=",r,s));o._blockHoist=this.blockHoist,this.nodes.push(o),this.push(a,r)}else this.nodes.push(this.buildVariableAssignment(a,s))},e.prototype.pushObjectRest=function(e,t,r,i){for(var s=[],a=0;a=i)break;if(!n.isRestProperty(o)){var u=o.key;n.isIdentifier(u)&&!o.computed&&(u=n.stringLiteral(o.key.name)),s.push(u)}}s=n.arrayExpression(s);var l=n.callExpression(this.file.addHelper("objectWithoutProperties"),[t,s]);this.nodes.push(this.buildVariableAssignment(r.argument,l))},e.prototype.pushObjectProperty=function(e,t){n.isLiteral(e.key)&&(e.computed=!0);var r=e.value,i=n.memberExpression(t,e.key,e.computed);n.isPattern(r)?this.push(r,i):this.nodes.push(this.buildVariableAssignment(r,i))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(n.expressionStatement(n.callExpression(this.file.addHelper("objectDestructuringEmpty"),[t]))),e.properties.length>1&&!this.scope.isStatic(t)){var r=this.scope.generateUidIdentifierBasedOnNode(t);this.nodes.push(this.buildVariableDeclaration(r,t)),t=r}for(var i=0;it.elements.length)){if(e.elements.length=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l;if(!c)return!1;if(n.isMemberExpression(c))return!1}for(var f=t.elements,p=Array.isArray(f),d=0,f=p?f:(0,o.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h;if(n.isSpreadElement(m))return!1;if(n.isCallExpression(m))return!1;if(n.isMemberExpression(m))return!1}var y=n.getBindingIdentifiers(e),v={deopt:!1,bindings:y};return this.scope.traverse(t,i,v),!v.deopt}},e.prototype.pushUnpackedArrayPattern=function(e,t){for(var r=0;r=y.length)break;b=y[g++]}else{if(g=y.next(),g.done)break;b=g.value}var E=b,x=m[m.length-1];if(x&&n.isVariableDeclaration(x)&&n.isVariableDeclaration(E)&&x.kind===E.kind){var A;(A=x.declarations).push.apply(A,E.declarations)}else m.push(E)}for(var S=m,_=Array.isArray(S),D=0,S=_?S:(0,o.default)(S);;){var C;if(_){if(D>=S.length)break;C=S[D++]}else{if(D=S.next(),D.done)break;C=D.value}var w=C;if(w.declarations)for(var P=w.declarations,k=Array.isArray(P),F=0,P=k?P:(0,o.default)(P);;){var T;if(k){if(F>=P.length)break;T=P[F++]}else{if(F=P.next(),F.done)break;T=F.value}var O=T,B=O.id.name;s.bindings[B]&&(s.bindings[B].kind=w.kind)}}1===m.length?e.replaceWith(m[0]):e.replaceWithMultiple(m)}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),f=t.left;return a.isVariableDeclaration(f)?(f.declarations[0].init=c,l.body.body.unshift(f)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",f,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var f=n.generateUidIdentifier("iterator"),p=n.generateUidIdentifier("isArray"),d=u({LOOP_OBJECT:f,IS_ARRAY:p,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||d.body.body.shift();var h=a.isLabeledStatement(s),m=void 0;return h&&(m=a.labeledStatement(s.label,d)),{replaceParent:h,declar:l,node:m||d,loop:d}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),f=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,f));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,f)])}var p=n.generateUidIdentifier("iterator"),d=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:p,STEP_KEY:c,OBJECT:r.right,BODY:null}),h=a.isLabeledStatement(s),m=d[3].block.body,y=m[0];return h&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:h,declar:u,loop:y,node:d}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,f=c.body;e.ensureBlock(),l&&f.body.push(l),f.body=f.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{FunctionExpression:{exit:function(e){if("value"!==e.key&&!e.parentPath.isObjectProperty()){var t=(0,i.default)(e);t&&e.replaceWith(t)}}},ObjectProperty:function(e){var t=e.get("value");if(t.isFunction()){var r=(0,i.default)(t);r&&t.replaceWith(r)}}}}};var n=r(40),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{NumericLiteral:function(e){var t=e.node;t.extra&&/^0[ob]/i.test(t.extra.raw)&&(t.extra=void 0)},StringLiteral:function(e){var t=e.node;t.extra&&/\\[u]/gi.test(t.extra.raw)&&(t.extra=void 0)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(14),s=n(i),a=r(9),o=n(a),u=r(2),l=n(u),c=r(10),f=n(c);t.default=function(){var e=(0,f.default)(),t={ReferencedIdentifier:function(e){var t=e.node.name,r=this.remaps[t];if(r&&this.scope.getBinding(t)===e.scope.getBinding(t)){if(e.parentPath.isCallExpression({callee:e.node}))e.replaceWith(g.sequenceExpression([g.numericLiteral(0),r]));else if(e.isJSXIdentifier()&&g.isMemberExpression(r)){var n=r.object,i=r.property;e.replaceWith(g.JSXMemberExpression(g.JSXIdentifier(n.name),g.JSXIdentifier(i.name)))}else e.replaceWith(r);this.requeueInParent(e)}},AssignmentExpression:function(t){var r=t.node;if(!r[e]){var n=t.get("left");if(n.isIdentifier()){var i=n.node.name,s=this.exports[i];if(!s)return;if(this.scope.getBinding(i)!==t.scope.getBinding(i))return;r[e]=!0;for(var a=s,o=Array.isArray(a),u=0,a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if(u=a.next(),u.done)break;c=u.value}r=S(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}else if(n.isObjectPattern())for(var f=n.node.properties,p=Array.isArray(f),d=0,f=p?f:(0,l.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h,y=m.value.name,v=this.exports[y];if(v){if(this.scope.getBinding(y)!==t.scope.getBinding(y))return;r[e]=!0,t.insertAfter(S(g.identifier(y),g.identifier(y)))}}else if(n.isArrayPattern())for(var b=n.node.elements,E=Array.isArray(b),x=0,b=E?b:(0,l.default)(b);;){var A;if(E){if(x>=b.length)break;A=b[x++]}else{if(x=b.next(),x.done)break;A=x.value}var _=A;if(_){var D=_.name,C=this.exports[D];if(C){if(this.scope.getBinding(D)!==t.scope.getBinding(D))return;r[e]=!0,t.insertAfter(S(g.identifier(D),g.identifier(D)))}}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name;if(this.exports[r]&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=g.assignmentExpression(e.node.operator[0]+"=",t.node,g.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var i=[];i.push(n);var s=void 0;s="--"===e.node.operator?"+":"-",i.push(g.binaryExpression(s,t.node,g.numericLiteral(1))),e.replaceWithMultiple(g.sequenceExpression(i))}}}};return{inherits:y.default,visitor:{ThisExpression:function(e,t){this.ranCommonJS||!0===t.opts.allowTopLevelThis||e.findParent(function(e){return!e.is("shadow")&&D.indexOf(e.type)>=0})||e.replaceWith(g.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var n=C[t];if(n)return n;var i=e.scope.generateUidIdentifier((0,p.basename)(t,(0,p.extname)(t))),s=g.variableDeclaration("var",[g.variableDeclarator(i,b(g.stringLiteral(t)).expression)]);return h[t]&&(s.loc=h[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),C[t]=i}function n(e,t,r){var n=e[t]||[];e[t]=n.concat(r)}this.ranCommonJS=!0;var i=!!this.opts.strict,a=!!this.opts.noInterop,u=e.scope;u.rename("module"),u.rename("exports"),u.rename("require");for(var c=!1,f=!1,d=e.get("body"),h=(0,o.default)(null),m=(0,o.default)(null),y=(0,o.default)(null),v=[],D=(0,o.default)(null),C=(0,o.default)(null),w=d,P=Array.isArray(w),k=0,w=P?w:(0,l.default)(w);;){var F;if(P){if(k>=w.length)break;F=w[k++]}else{if(k=w.next(),k.done)break;F=k.value}var T=F;if(T.isExportDeclaration()){c=!0;for(var O=[].concat(T.get("declaration"),T.get("specifiers")),B=O,R=Array.isArray(B),I=0,B=R?B:(0,l.default)(B);;){var M;if(R){if(I>=B.length)break;M=B[I++]}else{if(I=B.next(),I.done)break;M=I.value}var N=M;if(N.getBindingIdentifiers().__esModule)throw N.buildCodeFrameError('Illegal export "__esModule"')}}if(T.isImportDeclaration()){var L;f=!0;var j=T.node.source.value,U=h[j]||{specifiers:[],maxBlockHoist:0,loc:T.node.loc};(L=U.specifiers).push.apply(L,T.node.specifiers),"number"==typeof T.node._blockHoist&&(U.maxBlockHoist=Math.max(T.node._blockHoist,U.maxBlockHoist)),h[j]=U,T.remove()}else if(T.isExportDefaultDeclaration()){var V=T.get("declaration");if(V.isFunctionDeclaration()){var G=V.node.id,W=g.identifier("default");G?(n(m,G.name,W),v.push(S(W,G)),T.replaceWith(V.node)):(v.push(S(W,g.toExpression(V.node))),T.remove())}else if(V.isClassDeclaration()){var Y=V.node.id,q=g.identifier("default");Y?(n(m,Y.name,q),T.replaceWithMultiple([V.node,S(q,Y)])):(T.replaceWith(S(q,g.toExpression(V.node))),T.parentPath.requeue(T.get("expression.left")))}else T.replaceWith(S(g.identifier("default"),V.node)),T.parentPath.requeue(T.get("expression.left"))}else if(T.isExportNamedDeclaration()){var K=T.get("declaration");if(K.node){if(K.isFunctionDeclaration()){var H=K.node.id;n(m,H.name,H),v.push(S(H,H)),T.replaceWith(K.node)}else if(K.isClassDeclaration()){var J=K.node.id;n(m,J.name,J),T.replaceWithMultiple([K.node,S(J,J)]),y[J.name]=!0}else if(K.isVariableDeclaration()){for(var X=K.get("declarations"),z=X,$=Array.isArray(z),Q=0,z=$?z:(0,l.default)(z);;){var Z;if($){if(Q>=z.length)break;Z=z[Q++]}else{if(Q=z.next(),Q.done)break;Z=Q.value}var ee=Z,te=ee.get("id"),re=ee.get("init"),ne=[];if(re.node||re.replaceWith(g.identifier("undefined")),te.isIdentifier())n(m,te.node.name,te.node),re.replaceWith(S(te.node,re.node).expression),y[te.node.name]=!0;else if(te.isObjectPattern())for(var ie=0;ie=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var ge=ve;ge.isExportNamespaceSpecifier()||ge.isExportDefaultSpecifier()||ge.isExportSpecifier()&&(a||"default"!==ge.node.local.name?v.push(x(g.stringLiteral(ge.node.exported.name),g.memberExpression(de,ge.node.local))):v.push(x(g.stringLiteral(ge.node.exported.name),g.memberExpression(g.callExpression(this.addHelper("interopRequireDefault"),[de]),ge.node.local))),y[ge.node.exported.name]=!0)}else for(var be=ce,Ee=Array.isArray(be),xe=0,be=Ee?be:(0,l.default)(be);;){var Ae;if(Ee){if(xe>=be.length)break;Ae=be[xe++]}else{if(xe=be.next(),xe.done)break;Ae=xe.value}var Se=Ae;Se.isExportSpecifier()&&(n(m,Se.node.local.name,Se.node.exported),y[Se.node.exported.name]=!0,fe.push(S(Se.node.exported,Se.node.local)))}T.replaceWithMultiple(fe)}else if(T.isExportAllDeclaration()){var _e=_({OBJECT:r(T.node.source.value,T.node._blockHoist)});_e.loc=T.node.loc,v.push(_e),T.remove()}}for(var De in h){var Ce=h[De],O=Ce.specifiers,we=Ce.maxBlockHoist;if(O.length){for(var Pe=r(De,we),ke=void 0,Fe=0;Fe0&&(Oe._blockHoist=we),v.push(Oe)}ke=Te.local}else g.isImportDefaultSpecifier(Te)&&(O[Fe]=g.importSpecifier(Te.local,g.identifier("default")))}for(var Be=O,Re=Array.isArray(Be),Ie=0,Be=Re?Be:(0,l.default)(Be);;){var Me;if(Re){if(Ie>=Be.length)break;Me=Be[Ie++]}else{if(Ie=Be.next(),Ie.done)break;Me=Ie.value}var Ne=Me;if(g.isImportSpecifier(Ne)){var Le=Pe;if("default"===Ne.imported.name)if(ke)Le=ke;else if(!a){Le=ke=e.scope.generateUidIdentifier(Pe.name);var je=g.variableDeclaration("var",[g.variableDeclarator(Le,g.callExpression(this.addHelper("interopRequireDefault"),[Pe]))]);we>0&&(je._blockHoist=we),v.push(je)}D[Ne.local.name]=g.memberExpression(Le,g.cloneWithoutLoc(Ne.imported))}}}else{var Ue=b(g.stringLiteral(De));Ue.loc=h[De].loc,v.push(Ue)}}if(f&&(0,s.default)(y).length)for(var Ve=(0,s.default)(y),Ge=0;Ge=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;d.isObjectProperty()&&(d=d.get("value")),t(d,d.node,e.scope,o,i)}a&&(e.scope.push({id:a}),e.replaceWith(r.assignmentExpression("=",a,e.node)))}}}}}};var u=r(193),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0;var i=r(2),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(){return{visitor:a.visitors.merge([{ArrowFunctionExpression:function(e){for(var t=e.get("params"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var o=a;if(o.isRestElement()||o.isAssignmentPattern()){e.arrowFunctionToShadowed();break}}}},u.visitor,p.visitor,c.visitor])}};var a=r(7),o=r(334),u=n(o),l=r(333),c=n(l),f=r(335),p=n(f);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{ObjectMethod:function(e){var t=e.node;if("method"===t.kind){var r=i.functionExpression(null,t.params,t.body,t.generator,t.async);r.returnType=t.returnType,e.replaceWith(i.objectProperty(t.key,r,t.computed))}},ObjectProperty:function(e){var t=e.node;t.shorthand&&(t.shorthand=!1)}}}};var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e,t,r){return r.opts.loose&&!s.isIdentifier(e.argument,{name:"arguments"})?e.argument:t.toArray(e.argument,!0)}function r(e){for(var t=0;t=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;s.isSpreadElement(d)?(a(),o.push(t(d,r,n))):u.push(d)}return a(),o}var s=e.types;return{visitor:{ArrayExpression:function(e,t){var i=e.node,a=e.scope,o=i.elements;if(r(o)){var u=n(o,a,t),l=u.shift();s.isArrayExpression(l)||(u.unshift(l),l=s.arrayExpression([])),e.replaceWith(s.callExpression(s.memberExpression(l,s.identifier("concat")),u))}},CallExpression:function(e,t){var i=e.node,a=e.scope,o=i.arguments;if(r(o)){var u=e.get("callee");if(!u.isSuper()){var l=s.identifier("undefined");i.arguments=[];var c=void 0;c=1===o.length&&"arguments"===o[0].argument.name?[o[0].argument]:n(o,a,t);var f=c.shift();c.length?i.arguments.push(s.callExpression(s.memberExpression(f,s.identifier("concat")),c)):i.arguments.push(f);var p=i.callee;if(u.isMemberExpression()){var d=a.maybeGenerateMemoised(p.object);d?(p.object=s.assignmentExpression("=",d,p.object),l=d):l=p.object,s.appendToMemberExpression(p,s.identifier("apply"))}else i.callee=s.memberExpression(i.callee,s.identifier("apply"));s.isSuper(l)&&(l=s.thisExpression()),i.arguments.unshift(l)}}},NewExpression:function(e,t){var i=e.node,a=e.scope,o=i.arguments;if(r(o)){var u=n(o,a,t),l=s.arrayExpression([s.nullLiteral()]);o=s.callExpression(s.memberExpression(l,s.identifier("concat")),u),e.replaceWith(s.newExpression(s.callExpression(s.memberExpression(s.memberExpression(s.memberExpression(s.identifier("Function"),s.identifier("prototype")),s.identifier("bind")),s.identifier("apply")),[i.callee,o]),[]))}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;s.is(t,"y")&&e.replaceWith(o.newExpression(o.identifier("RegExp"),[o.stringLiteral(t.pattern),o.stringLiteral(t.flags)]))}}}};var i=r(192),s=n(i),a=r(1),o=n(a);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e){return n.isLiteral(e)&&"string"==typeof e.value}function r(e,t){return n.binaryExpression("+",e,t)}var n=e.types;return{visitor:{TaggedTemplateExpression:function(e,t){for(var r=e.node,s=r.quasi,a=[],o=[],u=[],l=s.quasis,c=Array.isArray(l),f=0,l=c?l:(0,i.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;o.push(n.stringLiteral(d.value.cooked)),u.push(n.stringLiteral(d.value.raw))}o=n.arrayExpression(o),u=n.arrayExpression(u);var h="taggedTemplateLiteral";t.opts.loose&&(h+="Loose");var m=t.file.addTemplateObject(h,o,u);a.push(m),a=a.concat(s.expressions),e.replaceWith(n.callExpression(r.tag,a))},TemplateLiteral:function(e,s){for(var a=[],o=e.get("expressions"),u=e.node.quasis,l=Array.isArray(u),c=0,u=l?u:(0,i.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;a.push(n.stringLiteral(p.value.cooked));var d=o.shift();d&&(!s.opts.spec||d.isBaseType("string")||d.isBaseType("number")?a.push(d.node):a.push(n.callExpression(n.identifier("String"),[d.node])))}if(a=a.filter(function(e){return!n.isLiteral(e,{value:""})}),t(a[0])||t(a[1])||a.unshift(n.stringLiteral("")),a.length>1){for(var h=r(a.shift(),a.shift()),m=a,y=Array.isArray(m),v=0,m=y?m:(0,i.default)(m);;){var g;if(y){if(v>=m.length)break;g=m[v++]}else{if(v=m.next(),v.done)break;g=v.value}h=r(h,g)}e.replaceWith(h)}else e.replaceWith(a[0])}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(10),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.types,r=(0,i.default)();return{visitor:{Scope:function(e){var t=e.scope;t.getBinding("Symbol")&&t.rename("Symbol")},UnaryExpression:function(e){var n=e.node,i=e.parent;if(!n[r]&&!e.find(function(e){return e.node&&!!e.node._generated})){if(e.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(i.operator)>=0){var s=e.getOpposite();if(s.isLiteral()&&"symbol"!==s.node.value&&"object"!==s.node.value)return}if("typeof"===n.operator){var a=t.callExpression(this.addHelper("typeof"),[n.argument]);if(e.get("argument").isIdentifier()){var o=t.stringLiteral("undefined"),u=t.unaryExpression("typeof",n.argument);u[r]=!0,e.replaceWith(t.conditionalExpression(t.binaryExpression("===",u,o),o,a))}else e.replaceWith(a)}}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;a.is(t,"u")&&(t.pattern=(0,i.default)(t.pattern,t.flags),a.pullFlag(t,"u"))}}}};var n=r(612),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=r(192),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t,r){"use strict";e.exports=r(606)},function(e,t,r){"use strict";e.exports={default:r(408),__esModule:!0}},function(e,t,r){"use strict";function n(){i(),s()}function i(){t.path=u=new o.default}function s(){t.scope=l=new o.default}t.__esModule=!0,t.scope=t.path=void 0;var a=r(364),o=function(e){return e&&e.__esModule?e:{default:e}}(a);t.clear=n,t.clearPath=i,t.clearScope=s;var u=t.path=new o.default,l=t.scope=new o.default},function(e,t){"use strict";function r(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function n(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}}function i(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):n(e,S)))}function s(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):n(e,S)||n(e,_))))}function a(e){var t={};for(var r in D)t[r]=e&&r in e?e[r]:D[r];return t}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e,t){for(var r=1,n=0;;){N.lastIndex=n;var i=N.exec(e);if(!(i&&i.index>10),56320+(e-65536&1023))}function c(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function f(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function h(e,t){return new J(t,e).parse()}function m(e,t){var r=new J(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var v={6:r("enum await"),strict:r("implements interface let package private protected public static yield"),strictBind:r("eval arguments") +},g=r("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),b="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",E="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",x=new RegExp("["+b+"]"),A=new RegExp("["+b+E+"]");b=E=null;var S=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],_=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],D={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},C="function"==typeof Symbol&&"symbol"===y(Symbol.iterator)?function(e){return void 0===e?"undefined":y(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":y(e)},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},P=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":y(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},k=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":y(t))&&"function"!=typeof t?e:t},F=!0,T=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},O=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,k(this,e.call(this,r,n))}return P(t,e),t}(T),B=function(e){function t(r,n){return w(this,t),k(this,e.call(this,r,{beforeExpr:F,binop:n}))}return P(t,e),t}(T),R={num:new T("num",{startsExpr:!0}),regexp:new T("regexp",{startsExpr:!0}),string:new T("string",{startsExpr:!0}),name:new T("name",{startsExpr:!0}),eof:new T("eof"),bracketL:new T("[",{beforeExpr:F,startsExpr:!0}),bracketR:new T("]"),braceL:new T("{",{beforeExpr:F,startsExpr:!0}),braceBarL:new T("{|",{beforeExpr:F,startsExpr:!0}),braceR:new T("}"),braceBarR:new T("|}"),parenL:new T("(",{beforeExpr:F,startsExpr:!0}),parenR:new T(")"),comma:new T(",",{beforeExpr:F}),semi:new T(";",{beforeExpr:F}),colon:new T(":",{beforeExpr:F}),doubleColon:new T("::",{beforeExpr:F}),dot:new T("."),question:new T("?",{beforeExpr:F}),arrow:new T("=>",{beforeExpr:F}),template:new T("template"),ellipsis:new T("...",{beforeExpr:F}),backQuote:new T("`",{startsExpr:!0}),dollarBraceL:new T("${",{beforeExpr:F,startsExpr:!0}),at:new T("@"),eq:new T("=",{beforeExpr:F,isAssign:!0}),assign:new T("_=",{beforeExpr:F,isAssign:!0}),incDec:new T("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new T("prefix",{beforeExpr:F,prefix:!0,startsExpr:!0}),logicalOR:new B("||",1),logicalAND:new B("&&",2),bitwiseOR:new B("|",3),bitwiseXOR:new B("^",4),bitwiseAND:new B("&",5),equality:new B("==/!=",6),relational:new B("",7),bitShift:new B("<>",8),plusMin:new T("+/-",{beforeExpr:F,binop:9,prefix:!0,startsExpr:!0}),modulo:new B("%",10),star:new B("*",10),slash:new B("/",10),exponent:new T("**",{beforeExpr:F,binop:11,rightAssociative:!0})},I={break:new O("break"),case:new O("case",{beforeExpr:F}),catch:new O("catch"),continue:new O("continue"),debugger:new O("debugger"),default:new O("default",{beforeExpr:F}),do:new O("do",{isLoop:!0,beforeExpr:F}),else:new O("else",{beforeExpr:F}),finally:new O("finally"),for:new O("for",{isLoop:!0}),function:new O("function",{startsExpr:!0}),if:new O("if"),return:new O("return",{beforeExpr:F}),switch:new O("switch"),throw:new O("throw",{beforeExpr:F}),try:new O("try"),var:new O("var"),let:new O("let"),const:new O("const"),while:new O("while",{isLoop:!0}),with:new O("with"),new:new O("new",{beforeExpr:F,startsExpr:!0}),this:new O("this",{startsExpr:!0}),super:new O("super",{startsExpr:!0}),class:new O("class"),extends:new O("extends",{beforeExpr:F}),export:new O("export"),import:new O("import",{startsExpr:!0}),yield:new O("yield",{beforeExpr:F,startsExpr:!0}),null:new O("null",{startsExpr:!0}),true:new O("true",{startsExpr:!0}),false:new O("false",{startsExpr:!0}),in:new O("in",{beforeExpr:F,binop:7}),instanceof:new O("instanceof",{beforeExpr:F,binop:7}),typeof:new O("typeof",{beforeExpr:F,prefix:!0,startsExpr:!0}),void:new O("void",{beforeExpr:F,prefix:!0,startsExpr:!0}),delete:new O("delete",{beforeExpr:F,prefix:!0,startsExpr:!0})};Object.keys(I).forEach(function(e){R["_"+e]=I[e]});var M=/\r\n?|\n|\u2028|\u2029/,N=new RegExp(M.source,"g"),L=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},U={braceStatement:new j("{",!1),braceExpression:new j("{",!0),templateQuasi:new j("${",!0),parenStatement:new j("(",!1),parenExpression:new j("(",!0),template:new j("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new j("function",!0)};R.parenR.updateContext=R.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},R.name.updateContext=function(e){this.state.exprAllowed=!1,e!==R._let&&e!==R._const&&e!==R._var||M.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},R.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},R.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},R.parenL.updateContext=function(e){var t=e===R._if||e===R._for||e===R._with||e===R._while;this.state.context.push(t?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},R.incDec.updateContext=function(){},R._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},R.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var V=function e(t,r){w(this,e),this.line=t,this.column=r},G=function e(t,r){w(this,e),this.start=t,this.end=r},W=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=R.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),Y=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new G(t.startLoc,t.endLoc)},q=function(){function e(t,r){w(this,e),this.state=new W,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new Y(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return g(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(R.num)||this.match(R.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(R.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return i(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new G(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,N.lastIndex=t;for(var n=void 0;(n=N.exec(this.input))&&n.index8&&e<14||e>=5760&&L.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(R.ellipsis)):(++this.state.pos,this.finishToken(R.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?R.star:R.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=R.exponent),61===n&&(r++,t=R.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?R.logicalOR:R.logicalAND,2):61===t?this.finishOp(R.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(R.braceBarR,2):this.finishOp(124===e?R.bitwiseOR:R.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&M.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(R.incDec,2):61===t?this.finishOp(R.assign,2):this.finishOp(R.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(R.assign,r+1):this.finishOp(R.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(R.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(R.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(R.arrow)):this.finishOp(61===e?R.eq:R.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(R.parenL);case 41:return++this.state.pos,this.finishToken(R.parenR);case 59:return++this.state.pos,this.finishToken(R.semi);case 44:return++this.state.pos,this.finishToken(R.comma);case 91:return++this.state.pos,this.finishToken(R.bracketL);case 93:return++this.state.pos,this.finishToken(R.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.braceBarL,2):(++this.state.pos,this.finishToken(R.braceL));case 125:return++this.state.pos,this.finishToken(R.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.doubleColon,2):(++this.state.pos,this.finishToken(R.colon));case 63:return++this.state.pos,this.finishToken(R.question);case 64:return++this.state.pos,this.finishToken(R.at);case 96:return++this.state.pos,this.finishToken(R.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(R.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+l(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(M.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(R.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(R.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var s=this.input.charCodeAt(this.state.pos);46!==s||r||(++this.state.pos,this.readInt(10),n=!0,s=this.input.charCodeAt(this.state.pos)),69!==s&&101!==s||r||(s=this.input.charCodeAt(++this.state.pos),43!==s&&45!==s||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(R.num,o)},e.prototype.readCodePoint=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;if(123===t){var n=++this.state.pos;if(r=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===r)--this.state.invalidTemplateEscapePosition;else if(r>1114111){if(!e)return this.state.invalidTemplateEscapePosition=n-2,null;this.raise(n,"Code point out of bounds")}}else r=this.readHexChar(4,e);return r},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(R.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(R.template)?36===n?(this.state.pos+=2,this.finishToken(R.dollarBraceL)):(++this.state.pos,this.finishToken(R.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(R.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:l(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(K).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=K[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow")),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e}),e.unshift("estree"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=K[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(q),X=J.prototype;X.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},X.isRelational=function(e){return this.match(R.relational)&&this.state.value===e},X.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,R.relational)},X.isContextual=function(e){return this.match(R.name)&&this.state.value===e},X.eatContextual=function(e){return this.state.value===e&&this.eat(R.name)},X.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},X.canInsertSemicolon=function(){return this.match(R.eof)||this.match(R.braceR)||M.test(this.input.slice(this.state.lastTokEnd,this.state.start))},X.isLineTerminator=function(){return this.eat(R.semi)||this.canInsertSemicolon()},X.semicolon=function(){this.isLineTerminator()||this.unexpected(null,R.semi)},X.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},X.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":C(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var z=J.prototype;z.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,R.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var $={kind:"loop"},Q={kind:"switch"};z.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},z.parseStatement=function(e,t){this.match(R.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case R._break:case R._continue:return this.parseBreakContinueStatement(n,r.keyword);case R._debugger:return this.parseDebuggerStatement(n);case R._do:return this.parseDoStatement(n);case R._for:return this.parseForStatement(n);case R._function:return e||this.unexpected(),this.parseFunctionStatement(n);case R._class:return e||this.unexpected(),this.parseClass(n,!0);case R._if:return this.parseIfStatement(n);case R._return:return this.parseReturnStatement(n);case R._switch:return this.parseSwitchStatement(n);case R._throw:return this.parseThrowStatement(n);case R._try:return this.parseTryStatement(n);case R._let:case R._const:e||this.unexpected();case R._var:return this.parseVarStatement(n,r);case R._while:return this.parseWhileStatement(n);case R._with:return this.parseWithStatement(n);case R.braceL:return this.parseBlock();case R.semi:return this.parseEmptyStatement(n);case R._export:case R._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===R.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===R._import?this.parseImport(n):this.parseExport(n);case R.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(R._function)&&!this.canInsertSemicolon())return this.expect(R._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===R.name&&"Identifier"===a.type&&this.eat(R.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},z.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},z.parseDecorators=function(e){for(;this.match(R.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(R._export)||this.match(R._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},z.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},z.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(R.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(R._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){var t=this.startNode();return this.expect(R.braceL),this.parseBlockBody(t,e,!1,R.braceR),this.finishNode(t,"BlockStatement")},z.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},z.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},z.parseFor=function(e,t){return e.init=t,this.expect(R.semi),e.test=this.match(R.semi)?null:this.parseExpression(),this.expect(R.semi),e.update=this.match(R.parenR)?null:this.parseExpression(),this.expect(R.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(R._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(R.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(R.eq)?n.init=this.parseMaybeAssign(t):r!==R._const||this.match(R._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(R._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(R.comma))break}return e},z.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},z.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(R.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(R.name)||this.match(R._yield)||this.unexpected(),(this.match(R.name)||this.match(R._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(R.parenL),e.params=this.parseBindingList(R.parenR)},z.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.isClassProperty=function(){return this.match(R.eq)||this.match(R.semi)||this.match(R.braceR)},z.isClassMethod=function(){return this.match(R.parenL)},z.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},z.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(R.braceL);!this.eat(R.braceR);)if(this.eat(R.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(R.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(R.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(R.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(R.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(R.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(R.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(R.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},z.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(R.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},z.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},z.parseClassId=function(e,t,r){this.match(R.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},z.parseClassSuper=function(e){e.superClass=this.eat(R._extends)?this.parseExprSubscripts():null},z.parseExport=function(e){if(this.next(),this.match(R.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(R.comma)&&this.lookahead().type===R.star){this.expect(R.comma);var n=this.startNode();this.expect(R.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(R._default)){var i=this.startNode(),s=!1;return this.eat(R._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(R._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},z.parseExportDeclaration=function(){return this.parseStatement(!0)},z.isExportDefaultSpecifier=function(){if(this.match(R.name))return"async"!==this.state.value;if(!this.match(R._default))return!1;var e=this.lookahead();return e.type===R.comma||e.type===R.name&&"from"===e.value},z.parseExportSpecifiersMaybe=function(e){this.eat(R.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},z.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(R.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},z.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},z.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;this.checkDeclaration(p.id)}if(this.state.decorators.length){var d=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&d||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},z.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},z.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},z.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},z.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(R.braceL);!this.eat(R.braceR);){if(t)t=!1;else if(this.expect(R.comma),this.eat(R.braceR))break;var n=this.match(R._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},z.parseImport=function(e){return this.eat(R._import),this.match(R.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(R.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},z.parseImportSpecifiers=function(e){var t=!0;if(this.match(R.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(R.comma))return}if(this.match(R.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(R.braceL);!this.eat(R.braceR);){if(t)t=!1;else if(this.eat(R.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(R.comma),this.eat(R.braceR))break;this.parseImportSpecifier(e)}},z.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},z.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ee=J.prototype;ee.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},ee.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,f=Array.isArray(c),p=0,c=f?c:c[Symbol.iterator]();;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;h&&this.checkLVal(h,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var te=J.prototype;te.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},te.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(R.eof)||this.unexpected(),e},te.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(R.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(R.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},te.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(R._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(R.parenL)||this.match(R.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(R.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},te.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},te.parseConditional=function(e,t,r,n){if(this.eat(R.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(R.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},te.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},te.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(R._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===R.logicalOR||o===R.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},te.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(R.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==R.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},te.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},te.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(R.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(R.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(R.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(R.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(R.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(R.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(R.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},te.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(R.comma),this.eat(e))break;this.match(R.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},te.shouldParseAsyncArrow=function(){return this.match(R.arrow)},te.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(R.arrow),this.parseArrowExpression(e,t.arguments,!0)},te.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},te.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case R._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(R.parenL)||this.match(R.bracketL)||this.match(R.dot)||this.unexpected(),this.match(R.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case R._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(R.parenL)||this.unexpected(null,R.parenL),this.finishNode(r,"Import");case R._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case R._yield:this.state.inGenerator&&this.unexpected();case R.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(R._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(R.name)){var a=[this.parseIdentifier()];return this.expect(R.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(R.arrow)?this.parseArrowExpression(r,[s]):s;case R._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case R.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case R.num:return this.parseLiteral(this.state.value,"NumericLiteral");case R.string:return this.parseLiteral(this.state.value,"StringLiteral");case R._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case R._true:case R._false:return r=this.startNode(),r.value=this.match(R._true),this.next(),this.finishNode(r,"BooleanLiteral");case R.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case R.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(R.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case R.braceL:return this.parseObj(!1,e);case R._function:return this.parseFunctionExpression();case R.at:this.parseDecorators();case R._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case R._new:return this.parseNew();case R.backQuote:return this.parseTemplate(!1);case R.doubleColon:r=this.startNode(),this.next(),r.object=null;var f=r.callee=this.parseNoCallExpr();if("MemberExpression"===f.type)return this.finishNode(r,"BindExpression");this.raise(f.start,"Binding should be performed on object property.");default:this.unexpected()}},te.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(R.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},te.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},te.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},te.parseParenExpression=function(){this.expect(R.parenL);var e=this.parseExpression();return this.expect(R.parenR),e},te.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(R.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,f=void 0;!this.match(R.parenR);){if(l)l=!1;else if(this.expect(R.comma,u.start||null),this.match(R.parenR)){f=this.state.start;break} +if(this.match(R.ellipsis)){var p=this.state.start,d=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),p,d));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var h=this.state.start,m=this.state.startLoc;this.expect(R.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var v=a,g=Array.isArray(v),b=0,v=g?v:v[Symbol.iterator]();;){var E;if(g){if(b>=v.length)break;E=v[b++]}else{if(b=v.next(),b.done)break;E=b.value}var x=E;x.extra&&x.extra.parenthesized&&this.unexpected(x.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),f&&this.unexpected(f),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",h,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},te.shouldParseArrow=function(){return!this.canInsertSemicolon()},te.parseArrow=function(e){if(this.eat(R.arrow))return e},te.parseParenItem=function(e){return e},te.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(R.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(R.parenL)?(e.arguments=this.parseExprList(R.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},te.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(R.backQuote),this.finishNode(t,"TemplateElement")},te.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(R.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(R.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},te.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(R.braceR);){if(i)i=!1;else if(this.expect(R.comma),this.eat(R.braceR))break;for(;this.match(R.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,f=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(R.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var p=this.state.start;if(null===a){if(this.eat(R.braceR))break;if(this.match(R.comma)&&this.lookahead().type===R.braceR)continue;a=p;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,f=this.state.startLoc),e||(u=this.eat(R.star)),!e&&this.isContextual("async")){u&&this.unexpected();var d=this.parseIdentifier();this.match(R.colon)||this.match(R.parenL)||this.match(R.braceR)||this.match(R.eq)||this.match(R.comma)?(o.key=d,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(R.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,f,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},te.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(R.string)||this.match(R.num)||this.match(R.bracketL)||this.match(R.name)||this.state.type.keyword)},te.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},te.parseObjectMethod=function(e,t,r,n){return r||t||this.match(R.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},te.parseObjectProperty=function(e,t,r,n,i){return this.eat(R.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(R.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},te.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},te.parsePropertyName=function(e){if(this.eat(R.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(R.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(R.num)||this.match(R.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},te.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},te.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(R.parenL),e.params=this.parseBindingList(R.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},te.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},te.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("use strict"===a.value.value)return!0}return!1},te.parseFunctionBody=function(e,t){var r=t&&!this.match(R.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var f=e.params,p=Array.isArray(f),d=0,f=p?f:f[Symbol.iterator]();;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},te.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(R.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},te.parseExprListItem=function(e,t,r){return e&&this.match(R.comma)?null:this.match(R.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},te.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(R.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},te.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(v.strict(e)||n&&v.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},te.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(R.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},te.parseYield=function(){var e=this.startNode();return this.next(),this.match(R.semi)||this.canInsertSemicolon()||!this.match(R.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(R.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var re=J.prototype,ne=["leadingComments","trailingComments","innerComments"],ie=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new G(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)ne.indexOf(r)<0&&(t[r]=this[r]);return t},e}();re.startNode=function(){return new ie(this.state.start,this.state.startLoc,this.filename)},re.startNodeAt=function(e,t){return new ie(e,t,this.filename)},re.finishNode=function(e,t){return c.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},re.finishNodeAt=function(e,t,r,n){return c.call(this,e,t,r,n)},J.prototype.raise=function(e,t){var r=u(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var se=J.prototype;se.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},se.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=f(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&f(t).start>=e.start&&(r=t.pop());t.length>0&&f(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=f(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=f(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&f(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(f(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;se.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),i=this.state.leadingComments.slice(s),0===i.length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&f(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ae=J.prototype;ae.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ae.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ae.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var oe=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s2?n-2:0),s=2;s=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},ue=["any","mixed","empty","bool","boolean","number","string","void","null"],le=J.prototype;le.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||R.colon);var r=this.flowParseType();return this.state.inType=t,r},le.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(R.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(R.parenL)?(e.expression=this.parseExpression(),this.expect(R.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},le.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(R.colon);var t=null,r=null;return this.match(R.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(R.modulo)&&(r=this.flowParsePredicate())),[t,r]},le.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},le.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(R.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(R.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},le.flowParseDeclare=function(e){return this.match(R._class)?this.flowParseDeclareClass(e):this.match(R._function)?this.flowParseDeclareFunction(e):this.match(R._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===R.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(R._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},le.flowParseDeclareExportDeclaration=function(e){if(this.expect(R._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},le.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},le.flowParseDeclareModule=function(e){this.next(),this.match(R.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(R.braceL);!this.match(R.braceR);){var n=this.startNode();if(this.match(R._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(R.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},le.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(R.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},le.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},le.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},le.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},le.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(R._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(R.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(R.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},le.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},le.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},le.flowParseRestrictedIdentifier=function(e){return ue.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},le.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(R.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},le.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(R.colon)&&(e.supertype=this.flowParseTypeInitialiser(R.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(R.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},le.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(R.eq)&&(this.eat(R.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},le.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(R.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(R.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},le.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(R.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},le.flowParseObjectPropertyKey=function(){return this.match(R.num)||this.match(R.string)?this.parseExprAtom():this.parseIdentifier(!0)},le.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(R.bracketL),this.lookahead().type===R.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(R.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},le.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(R.parenL);!this.match(R.parenR)&&!this.match(R.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(R.parenR)||this.expect(R.comma);return this.eat(R.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(R.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},le.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},le.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},le.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(R.braceBarL)?(this.expect(R.braceBarL),u=R.braceBarR,l=!0):(this.expect(R.braceL),u=R.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,f=this.state.start,p=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==R.colon&&(this.next(),o=!0);var d=this.state.start,h=this.flowParseVariance();this.match(R.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,h)):this.match(R.parenL)||this.isRelational("<")?(h&&this.unexpected(d),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(R.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),h&&this.unexpected(h.start,"Spread properties cannot have variance"),this.expect(R.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(R.parenL)?(h&&this.unexpected(h.start),i.properties.push(this.flowParseObjectTypeMethod(f,p,o,a))):(this.eat(R.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=h,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},le.flowObjectTypeSemicolon=function(){this.eat(R.semi)||this.eat(R.comma)||this.match(R.braceR)||this.match(R.braceBarR)||this.unexpected()},le.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(R.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},le.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},le.flowParseTypeofType=function(){var e=this.startNode();return this.expect(R._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},le.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(R.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};!this.match(R.parenR)&&!this.match(R.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(R.parenR)||this.expect(R.comma);return this.eat(R.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},le.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},le.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case R.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case R.braceL:return this.flowParseObjectType(!1,!1,!0);case R.braceBarL:return this.flowParseObjectType(!1,!0,!0);case R.bracketL:return this.flowParseTupleType();case R.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(R.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(R.parenR),this.expect(R.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case R.parenL:if(this.next(),!this.match(R.parenR)&&!this.match(R.ellipsis))if(this.match(R.name)){var o=this.lookahead().type;s=o!==R.question&&o!==R.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(R.comma)||this.match(R.parenR)&&this.lookahead().type===R.arrow))return this.expect(R.parenR),i;this.eat(R.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(R.parenR),this.expect(R.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case R.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case R._true:case R._false:return r.value=this.match(R._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case R.plusMin:if("-"===this.state.value)return this.next(), +this.match(R.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case R.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case R._null:return r.value=this.match(R._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case R._this:return r.value=this.match(R._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case R.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},le.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(R.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(R.bracketL),this.expect(R.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},le.flowParsePrefixType=function(){var e=this.startNode();return this.eat(R.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},le.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(R.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},le.flowParseIntersectionType=function(){var e=this.startNode();this.eat(R.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(R.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},le.flowParseUnionType=function(){var e=this.startNode();this.eat(R.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(R.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},le.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},le.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(R.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},le.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},le.flowParseVariance=function(){var e=null;return this.match(R.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ce=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(R.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(R.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(R._class)||this.match(R.name)||this.match(R._function)||this.match(R._var)||this.match(R._export))return this.flowParseDeclare(t)}else if(this.match(R.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(R.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(R.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(R.question)&&(t.optional=!0),this.match(R.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(R.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(R.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i2?n-2:0),s=2;s1114111||de(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(a-=65536,t=55296+(a>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=pe.apply(null,e),e.length=0)}return s}}var he=fe,me={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ye=/^[\da-fA-F]+$/,ve=/^\d+$/;U.j_oTag=new j("...",!0,!0),R.jsxName=new T("jsxName"),R.jsxText=new T("jsxText",{beforeExpr:!0}),R.jsxTagStart=new T("jsxTagStart",{startsExpr:!0}),R.jsxTagEnd=new T("jsxTagEnd"),R.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},R.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===U.j_oTag&&e===R.slash||t===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var ge=J.prototype;ge.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(R.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(R.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ge.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ge.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(R.string,t)},ge.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(R.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ge.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var be=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(R.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(R.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===U.j_expr)return this.jsxReadToken();if(r===U.j_oTag||r===U.j_cTag){if(i(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(R.jsxTagEnd);if((34===t||39===t)&&r===U.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(R.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(R.braceL)){var r=this.curContext();r===U.j_oTag?this.state.context.push(U.braceExpression):r===U.j_expr?this.state.context.push(U.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(R.slash)||t!==R.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}}})};K.estree=oe,K.flow=ce,K.jsx=be,t.parse=h,t.parseExpression=m,t.tokTypes=R},function(e,t,r){"use strict";var n=r(21),i=r(431),s=r(141),a=r(150)("IE_PROTO"),o=function(){},u=function(){var e,t=r(230)("iframe"),n=s.length;for(t.style.display="none",r(426).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(" + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/App.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/App.js" new file mode 100644 index 000000000..bd2bad81b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/App.js" @@ -0,0 +1,44 @@ +import React from 'react'; +import {useDispatch, useSelector} from "react-redux"; +import {setName, setAge} from './store/stuSlice'; +import {setName as setSchoolName, setAddress as setSchoolAddress} from "./store/schoolSlice"; + +const App = () => { + // useSelector() 加载state中的数据 + // const student = useSelector(state => state.student); + // const school = useSelector(state => state.school); + const {student, school} = useSelector(state => state); + + // useDispatch() 获取派发器对象 + const dispatch = useDispatch(); + + const setNameHandler = () => { + dispatch(setName('沙和尚')); + }; + const setAgeHandler = () => { + dispatch(setAge(30)); + }; + + return ( +
                +

                + {student.name} | + {student.age} | + {student.gender} | + {student.address} +

                + + + +
                +

                + {school.name} | + {school.address} +

                + + +
                + ); +}; + +export default App; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/index.js" new file mode 100644 index 000000000..0a77a71b5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/index.js" @@ -0,0 +1,11 @@ +import ReactDOM from "react-dom/client"; +import App from "./App"; +import {Provider} from "react-redux"; +import store from './store'; + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render( + + + +); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/index.js" new file mode 100644 index 000000000..587a59912 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/index.js" @@ -0,0 +1,14 @@ +// 使用RTK构建store +import {configureStore} from "@reduxjs/toolkit"; + +import {stuReducer} from "./stuSlice"; +import {schoolReducer} from "./schoolSlice"; + +const store = configureStore({ + reducer:{ + student: stuReducer, + school: schoolReducer, + } +}); + +export default store; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/schoolSlice.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/schoolSlice.js" new file mode 100644 index 000000000..cd99b1562 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/schoolSlice.js" @@ -0,0 +1,21 @@ +// 创建学校的slice +import {createSlice} from "@reduxjs/toolkit"; + +const schoolSlice = createSlice({ + name: 'school', + initialState:{ + name:'花果山一小', + address:'花果山大街28号' + }, + reducers:{ + setName(state, action){ + state.name = action.payload; + }, + setAddress(state, action){ + state.address = action.payload; + } + } +}); + +export const {setName, setAddress} = schoolSlice.actions; +export const {reducer:schoolReducer} = schoolSlice; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/stuSlice.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/stuSlice.js" new file mode 100644 index 000000000..ded5a354d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/02-RTK/store/stuSlice.js" @@ -0,0 +1,25 @@ +import {createSlice} from "@reduxjs/toolkit"; + +// createSlice 创建 reducer 切片 +const stuSlice = createSlice({ + name:'stu', // 对应 action 中的 type + initialState:{ // state的初始值 + name:'孙悟空', + age:18, + gender:'男', + address:'花果山' + }, + reducers:{ // 指定state的操作 + setName(state, action){ + state.name = action.payload; + }, + setAge(state, action){ + state.age = action.payload; + } + } +}); + +// actions中存储切片自动生成action创建器(函数),调用函数后会自动创建action对象 +// action对象的结构 {type:name/函数名, payload:函数的参数} +export const {setName, setAge} = stuSlice.actions; +export const {reducer:stuReducer} = stuSlice; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/App.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/App.js" new file mode 100644 index 000000000..f408802e5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/App.js" @@ -0,0 +1,49 @@ +import React from 'react'; +import {useDelStudentMutation, useGetStudentsQuery} from "./store/studentApi"; +import StudentList from "./components/StudentList"; + +const App = () => { + + const result = useGetStudentsQuery(null, { + // useQuery 可以接收一个对象作为第二个参数,通过该对象可以对请求进行配置 + // selectFromResult: result => { + // if (result.data) { + // result.data = result.data.filter(item => item.attributes.age < 18); + // } + // return result; + // }, // 用来指定useQuery返回的结果 + + pollingInterval:0, // 设置轮询的间隔,单位毫秒 如果为0则表示不轮询 + skip:false, // 设置是否跳过当前请求,默认false + refetchOnMountOrArgChange:false, // 设置是否每次都重新加载数据 false正常使用缓存, + // true每次都重载数据 + // 数字,数据缓存的时间(秒) + refetchOnFocus:false, // 是否在重新获取焦点时重载数据 + refetchOnReconnect:true, // 是否在重新连接后重载数据 + }); + + /* + currentData: undefined // 当前参数的最新数据 + data: undefined // 最新的数据 + isError: false // 布尔值,是否有错误 + error: Error() // 对象,有错时才存在 + isFetching: true // 布尔值,数据是否在加载 + isLoading: true // 布尔值,数据是否第一次加载 + isSuccess: false // 布尔值,请求是否成功 + isUninitialized: false // 布尔值,请求是否还没有开始发送 + refetch: ƒ () // 一个函数,用来重新加载数据 + status: "pending" // 字符串,请求的状态 + */ + + const {data: stus, isSuccess, isLoading, refetch} = result; // 调用Api中的钩子查询数据 + + return ( +
                + + {isLoading &&

                数据加载中...

                } + {isSuccess && } +
                + ); +}; + +export default App; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/Student.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/Student.js" new file mode 100644 index 000000000..4ae814c52 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/Student.js" @@ -0,0 +1,57 @@ +import React, {useCallback, useContext, useState} from 'react'; +import StudentForm from "./StudentForm"; +import {useDelStudentMutation} from "../store/studentApi"; + +const Student = (props) => { + + const [isEdit, setIsEdit] = useState(false); + // 获取删除的钩子,useMutation的钩子返回的是一个数组 + // 数组中有两个东西,第一个是操作的触发器,第二个是结果集 + const [delStudent, {isSuccess}] = useDelStudentMutation(); + + + const deleteHandler = () => { + delStudent(props.stu.id); + }; + + const cancelEdit = () => { + setIsEdit(false); + }; + + return ( + <> + {(!isEdit && !isSuccess) && + + {props.stu.attributes.name} + {props.stu.attributes.gender} + {props.stu.attributes.age} + {props.stu.attributes.address} + + + + + + } + + { + isSuccess && + + 数据已删除! + + + } + + {isEdit && } + + {/*{loading && */} + {/* 正在删除数据...*/} + {/*}*/} + {/*{error && */} + {/* 删除失败...*/} + {/*}*/} + + + ); +}; + +export default Student; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.css" new file mode 100644 index 000000000..35221f33f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.css" @@ -0,0 +1,3 @@ +.student-form input{ + width: 80px; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.js" new file mode 100644 index 000000000..3c3ecb266 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentForm.js" @@ -0,0 +1,118 @@ +import React, {useCallback, useContext, useEffect, useState} from 'react'; +import './StudentForm.css'; +import {useAddStudentMutation, useGetStudentByIdQuery, useUpdateStudentMutation} from "../store/studentApi"; + +const StudentForm = (props) => { + // 调用钩子来加载数据 + const {data:stuData, isSuccess, isFetching} = useGetStudentByIdQuery(props.stuId, { + skip:!props.stuId, + refetchOnMountOrArgChange:false + }); + // 用户修改时,表单中的数据是数据库中最新的数据 + const [inputData, setInputData] = useState({ + name: '', + age: '', + gender: '男', + address: '' + }); + + const [addStudent, {isSuccess:isAddSuccess}] = useAddStudentMutation(); + const [updateStudent, {isSuccess:isUpdateSuccess}] = useUpdateStudentMutation(); + + // StudentForm一加载,应该去自动的加载最新的学生数据 + // console.log(props.stuId); + // console.log(isSuccess, stuData); + + useEffect(()=>{ + if(isSuccess){ + setInputData(stuData.attributes); + } + }, [isSuccess]) + + const nameChangeHandler = (e) => { + setInputData(prevState => ({...prevState, name: e.target.value})); + }; + + const ageChangeHandler = (e) => { + setInputData(prevState => ({...prevState, age: +e.target.value})); + }; + + const genderChangeHandler = (e) => { + setInputData(prevState => ({...prevState, gender: e.target.value})); + }; + + const addressChangeHandler = (e) => { + setInputData(prevState => ({...prevState, address: e.target.value})); + }; + + const submitHandler = () => { + addStudent(inputData); + // 重置数据 + setInputData({ + name: '', + age: '', + gender: '男', + address: '' + }); + }; + + const updateHandler = () => { + updateStudent({ + id:props.stuId, + attributes:inputData + }); + props.onCancel(); + }; + + + return ( + <> + + + + + + + + + + {props.stuId && <> + + + } + {!props.stuId && + + } + + + + {/*{loading && */} + {/* 添加中...*/} + {/*}*/} + {/*{error && */} + {/* 添加失败*/} + {/*}*/} + + + ); +}; + +export default StudentForm; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.css" new file mode 100644 index 000000000..0dc570ad1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.css" @@ -0,0 +1,9 @@ +table{ + width: 500px; + border-collapse: collapse; +} + +td, th{ + border: 1px solid #000; + text-align: center; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.js" new file mode 100644 index 000000000..f5b88a78f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/components/StudentList.js" @@ -0,0 +1,36 @@ +import React from 'react'; +// import Student from "./Student"; +import './StudentList.css'; +import Student from "./Student"; +import StudentForm from "./StudentForm"; +// import StudentForm from "./StudentForm"; + +const StudentList = (props) => { + return ( + + + + + + + + + + + + + + + {props.stus.map(stu => )} + + + + + + + +
                学生列表
                姓名性别年龄地址操作
                + ); +}; + +export default StudentList; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/index.js" new file mode 100644 index 000000000..0a77a71b5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/index.js" @@ -0,0 +1,11 @@ +import ReactDOM from "react-dom/client"; +import App from "./App"; +import {Provider} from "react-redux"; +import store from './store'; + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render( + + + +); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/index.js" new file mode 100644 index 000000000..336f61320 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/index.js" @@ -0,0 +1,16 @@ +import {configureStore} from "@reduxjs/toolkit"; +import studentApi from "./studentApi"; +import {setupListeners} from "@reduxjs/toolkit/query"; + +const store = configureStore({ + reducer:{ + [studentApi.reducerPath]:studentApi.reducer + }, + + middleware:getDefaultMiddleware => + getDefaultMiddleware().concat(studentApi.middleware) +}); + +setupListeners(store.dispatch); // 设置以后,将会支持 refetchOnFocus refetchOnReconnect + +export default store; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/studentApi.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/studentApi.js" new file mode 100644 index 000000000..587669c2b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/16-redux/03-RTKQ(TODO)/store/studentApi.js" @@ -0,0 +1,86 @@ +import {createApi, fetchBaseQuery} from "@reduxjs/toolkit/dist/query/react"; + +// 创建Api对象 +//createApi() 用来创建RTKQ中的API对象 +// RTKQ的所有功能都需要通过该对象来进行 +// createApi() 需要一个对象作为参数 +const studentApi = createApi({ + reducerPath: 'studentApi', // Api的标识,不能和其他的Api或reducer重复 + baseQuery: fetchBaseQuery({ + baseUrl: "http://localhost:1337/api/" + }),// 指定查询的基础信息,发送请求使用的工具 + tagTypes: ['student'], // 用来指定Api中的标签类型 + endpoints(build) { + // build是请求的构建器,通过build来设置请求的相关信息 + return { + getStudents: build.query({ + query() { + // 用来指定请求子路径 + return 'students'; + }, + // transformResponse 用来转换响应数据的格式 + transformResponse(baseQueryReturnValue, meta, arg) { + return baseQueryReturnValue.data; + }, + + providesTags: [{type: 'student', id: 'LIST'}] + }), + getStudentById: build.query({ + query(id) { + //http://localhost:1337/api/students/23 + return `students/${id}`; + }, + transformResponse(baseQueryReturnValue, meta, arg) { + return baseQueryReturnValue.data; + }, + keepUnusedDataFor: 60, // 设置数据缓存的时间,单位秒 默认60s + providesTags: (result, error, id) => [{type: 'student', id}] + }), + delStudent: build.mutation({ + query(id) { + //http://localhost:1337/api/students/4 + return { + // 如果发送的get请求,需要返回一个对象来设置请求的信息 + url: `students/${id}`, + method: 'delete' + }; + } + }), + addStudent: build.mutation({ + query(stu) { + return { + url: 'students', + method: 'post', + body: {data: stu} + }; + }, + invalidatesTags: [{type: 'student', id: 'LIST'}] + }), + updateStudent: build.mutation({ + query(stu) { + return { + url: `students/${stu.id}`, + method: 'put', + body: {data: stu.attributes} + }; + }, + invalidatesTags: ((result, error, stu) => + [{type: 'student', id: stu.id}, {type: 'student', id: 'LIST'}]) + }), + + }; + }// endpoints 用来指定Api中的各种功能,是一个方法,需要一个对象作为返回值 +}); + +// Api对象创建后,对象中会根据各种方法自动的生成对应的钩子函数 +// 通过这些钩子函数,可以来向服务器发送请求 +// 钩子函数的命名规则 getStudents --> useGetStudentsQuery +export const { + useGetStudentsQuery, + useGetStudentByIdQuery, + useDelStudentMutation, + useAddStudentMutation, + useUpdateStudentMutation +} = studentApi; + +export default studentApi; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/17-router/TODO.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/17-router/TODO.md" new file mode 100644 index 000000000..e69de29bb diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/App.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/App.js" new file mode 100644 index 000000000..249b5871f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/App.js" @@ -0,0 +1,79 @@ +import React, { Component } from 'react'; +import { observable, autorun } from 'mobx'; +import store from './store'; +import Tab from './Tab'; + +// npm i mobx@5 + +/** + * 观察普通类型数据 + */ +var observableNumber = observable.box(10); +var observableName = observable.box('test'); +// 监听,订阅者,用到的才会执行,而 subscribe 所有变化都会执行 +autorun(() => { + console.log(observableNumber.get()); +}); +autorun(() => { + console.log(observableName.get()); +}); +setTimeout(() => { observableNumber.set(20); }, 1000); +setTimeout(() => { observableName.set('dev'); }, 2000); + +/** + * 观察对象,通过map 或 不通过map + */ +const myObj1 = observable.map({ + name: 'user name1', + age: 11, +}); + +//////// 【推荐】 /////// +const myObj2 = observable({ + name: 'user name2', + age: 22, +}); +autorun(() => { + console.log('对象1的name属性改变了', myObj1.get('name')); + console.log('对象2的name属性改变了', myObj2.name); +}); +// 不建议直接修改,建议通过action操作 +// 不会触发上面的autorun +setTimeout(() => { myObj1.set('age', 12); }, 1000); +setTimeout(() => { myObj2.age = 23; }, 1000); +// 触发上面的autorun +setTimeout(() => { myObj1.set('name', 'new user name1'); }, 2000); +setTimeout(() => { myObj2.name = 'new user name2'; }, 2000); + +/** + * 观察数组 + */ +const list = observable([1, 2, 4]); +autorun(() => { + console.log('list改变了', list.length); +}); +setTimeout(() => { list[2] = 3; }, 1000); + + +export default class App extends Component { + + state = { + isShow: false, + } + + componentDidMount() { + autorun(() => { + this.setState({ + isShow: store.isTabbarShow, + }) + }) + } + + render() { + return ( +
                + {this.state.isShow && } +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/Tab.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/Tab.js" new file mode 100644 index 000000000..59e50cae8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/Tab.js" @@ -0,0 +1,17 @@ +import React, { Component } from 'react'; +import store from "./store"; + +export default class Tab extends Component { + + hide() { + store.isTabbarShow = false; + } + + render() { + return ( +
                + TabBar +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/index.js" new file mode 100644 index 000000000..6a1657d34 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/index.js" @@ -0,0 +1,9 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; + +import App from './App'; + +ReactDOM.render( + , + document.getElementById('root'), +) \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/store.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/store.js" new file mode 100644 index 000000000..ee62354cb --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/01-start/store.js" @@ -0,0 +1,8 @@ +import {observable} from 'mobx'; + +const store = observable({ + isTabbarShow: true, + list: [], +}); + +export default store; \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/.babelrc" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/.babelrc" new file mode 100644 index 000000000..db07191d9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/.babelrc" @@ -0,0 +1,13 @@ +{ + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ] + ] +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/README.md" new file mode 100644 index 000000000..76ebfcaa8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/README.md" @@ -0,0 +1,76 @@ +# 装饰器环境配置 + +## 1. 配置vscode + +... + +## 2. 配置babel + +```shell +$ npm i @babel/core @babel/plugin-proposal-decorators @babel/preset-env +``` + +创建 .babelrc + +```js +{ + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ] + ] +} +``` + +## 3. 配置脚本 + +```shell +$ npm i customize-cra react-app-rewired +``` + +`config-overrides.js` + +```js +const path = require('path'); +const { override, addDecoratorsLegacy } = require('customize-cra'); + +function resolve(dir) { + return path.join(__dirname, dir); +} + +const customize = () => (config, env) => { + config.resolve.alias['@'] = resolve('src') + if (env === 'production') { + config.externals = { + 'react': 'React', + 'react-dom': 'ReactDOM', + } + } + return config +}; + +module.exports = override (addDecoratorsLegacy(), customize ()) +``` + +`package.json` + +``` +"scripts": { + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test", + "eject": "react-app-rewired eject" +}, +``` + +## 4. 函数式组件 & 取消订阅 + +存在销毁又创建的组件需要注意取消订阅 + +见 Fun.js \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/config-overrides.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/config-overrides.js" new file mode 100644 index 000000000..496d95731 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/config-overrides.js" @@ -0,0 +1,19 @@ +const path = require('path'); +const { override, addDecoratorsLegacy } = require('customize-cra'); + +function resolve(dir) { + return path.join(__dirname, dir); +} + +const customize = () => (config, env) => { + config.resolve.alias['@'] = resolve('src') + if (env === 'production') { + config.externals = { + 'react': 'React', + 'react-dom': 'ReactDOM', + } + } + return config +}; + +module.exports = override (addDecoratorsLegacy(), customize ()) \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/package.json" new file mode 100644 index 000000000..4e340237b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/package.json" @@ -0,0 +1,43 @@ +{ + "name": "04_Learn_Log", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test", + "eject": "react-app-rewired eject" + }, + "dependencies": { + "@babel/core": "^7.21.8", + "@babel/plugin-proposal-decorators": "^7.21.0", + "@babel/preset-env": "^7.21.5", + "@reduxjs/toolkit": "^1.9.3", + "customize-cra": "^1.0.0", + "mobx": "^5.15.7", + "react": "^18.0.0", + "react-app-rewired": "^2.2.1", + "react-dom": "^18.0.0", + "react-redux": "^8.0.5", + "react-scripts": "^5.0.1", + "redux": "^4.2.1" + }, + "eslintConfig": { + "extends": [ + "react-app" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/public/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/public/index.html" new file mode 100644 index 000000000..a9225fb9e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/public/index.html" @@ -0,0 +1,10 @@ + + + + + react + + +
                + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/App.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/App.js" new file mode 100644 index 000000000..d88050df5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/App.js" @@ -0,0 +1,27 @@ +import React, { Component } from 'react'; +import { autorun } from 'mobx'; +import store from './store'; +import Tab from './Tab'; + +export default class App extends Component { + + state = { + isShow: false, + } + + componentDidMount() { + autorun(() => { + this.setState({ + isShow: store.isTabbarShow, + }) + }) + } + + render() { + return ( +
                + {this.state.isShow && } +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Fun.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Fun.js" new file mode 100644 index 000000000..68ac0d468 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Fun.js" @@ -0,0 +1,34 @@ +import React, { useState, useEffect } from 'react'; + +import store from "./store"; +import { autorun } from 'mobx'; + +export default function Fun(Props) { + + const [list, setList] = useState([]) + + useEffect(() => { + + if (store.list.length === 0) { + store.getList(); + } + + var unsubscribe = autorun(() => { + console.log(store.list) + setList(store.list) + }) + + return () => { + // 取消订阅 + unsubscribe() + } + }, []) + + return ( +
                + { + list.map(item =>
                item
                ) + } +
                + ) +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Tab.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Tab.js" new file mode 100644 index 000000000..9f4bc7be3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/Tab.js" @@ -0,0 +1,19 @@ +import React, { Component } from 'react'; +import store from "./store"; + +export default class Tab extends Component { + + hide() { + // store.isTabbarShow = false; + // 使用 mobx action + store.changeHide(); + } + + render() { + return ( +
                + TabBar +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/index.js" new file mode 100644 index 000000000..6a1657d34 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/index.js" @@ -0,0 +1,9 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; + +import App from './App'; + +ReactDOM.render( + , + document.getElementById('root'), +) \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/store.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/store.js" new file mode 100644 index 000000000..749acb9d2 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/02-action/src/store.js" @@ -0,0 +1,39 @@ +import { observable, configure, action } from 'mobx'; + +configure({ + enforceActions: 'always', // 'always' 'never' +}) + +/* +const store = observable({ + isTabbarShow: true, + list: [], + + changeShow() { + this.isTabbarShow = true; + }, + changeHide() { + this.isTabbarShow = false; + }, +}, { + // 标记方法为action + changeShow: action, + changeHide: action, +}); +*/ + +class Store { + @observable isTabbarShow = true + @observable list = [] + + @action changeShow() { + this.isTabbarShow = true; + } + @action changeHide() { + this.isTabbarShow = false; + } +} + +const store = new Store(); + +export default store; \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/03-runInAction/store.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/03-runInAction/store.js" new file mode 100644 index 000000000..aa3ff4e0a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/03-runInAction/store.js" @@ -0,0 +1,30 @@ +import { observable, configure, action, runInAction } from 'mobx'; + +configure({ + enforceActions: 'always', // 'always' 'never' +}) + +class Store { + @observable isTabbarShow = true + @observable list = [] + + @action changeShow() { + this.isTabbarShow = true; + } + @action changeHide() { + this.isTabbarShow = false; + } + + // 处理异步逻辑 runInAction + @action getList() { + setTimeout(() => { + runInAction(() => { + this.list = [1, 2, 3]; + }) + }, 1000); + } +} + +const store = new Store(); + +export default store; \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/App.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/App.js" new file mode 100644 index 000000000..fadda38f9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/App.js" @@ -0,0 +1,36 @@ +import React, { Component } from 'react'; +import Fun from './Fun'; + +// import { autorun } from 'mobx'; +// import store from './store'; +import { inject, observer } from 'mobx-react'; + + +// 构建一个父组件 - 高阶组件 mobx-react +// 注入的名称根据前面传入的名称 ,此处为 store +@inject('store') // 装饰器inject仅作为引入 +@observer +export default class App extends Component { + + // state = { + // isShow: false, + // } + + componentDidMount() { + // autorun(() => { + // this.setState({ + // isShow: store.isTabbarShow, + // }) + // }) + + console.log(this.props) // this.props.store + } + + render() { + return ( +
                + {this.props.store.isTabbarShow && } +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Fun.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Fun.js" new file mode 100644 index 000000000..a3c7d493d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Fun.js" @@ -0,0 +1,41 @@ +import React, { useEffect } from 'react'; + +import store from "./store"; +// import { autorun } from 'mobx'; + +import { Observer } from 'mobx-react'; + +// 不必再操作订阅/取消订阅 +export default function Fun(Props) { + + // const [list, setList] = useState([]) + + useEffect(() => { + + if (store.list.length === 0) { + store.getList(); + } + + // var unsubscribe = autorun(() => { + // console.log(store.list) + // setList(store.list) + // }) + + return () => { + // // 取消订阅 + // unsubscribe() + } + }, []) + + return ( +
                + + { + () => { + return store.list.map(item =>
                item
                ) + } + } +
                +
                + ) +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/README.md" new file mode 100644 index 000000000..9d3c3cbf9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/README.md" @@ -0,0 +1,3 @@ +``` +$ npm i mobx-react@5 +``` \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Tab.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Tab.js" new file mode 100644 index 000000000..72e99526d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/Tab.js" @@ -0,0 +1,20 @@ +import React, { Component } from 'react'; +// import store from "./store"; +import { inject, observer } from 'mobx-react'; + +@inject('store') +@observer +export default class Tab extends Component { + + hide = () => { + this.props.store.changeHide(); + } + + render() { + return ( +
                + TabBar +
                + ) + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/index.js" new file mode 100644 index 000000000..7175d7635 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/index.js" @@ -0,0 +1,13 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; + +import App from './App'; +import { Provider } from 'mobx-react'; +import store from './store'; + +ReactDOM.render( + + + , + document.getElementById('root'), +) \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/store.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/store.js" new file mode 100644 index 000000000..aa3ff4e0a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/18-mobx/04-mobx-react&\345\207\275\346\225\260\345\274\217\347\273\204\344\273\266/store.js" @@ -0,0 +1,30 @@ +import { observable, configure, action, runInAction } from 'mobx'; + +configure({ + enforceActions: 'always', // 'always' 'never' +}) + +class Store { + @observable isTabbarShow = true + @observable list = [] + + @action changeShow() { + this.isTabbarShow = true; + } + @action changeHide() { + this.isTabbarShow = false; + } + + // 处理异步逻辑 runInAction + @action getList() { + setTimeout(() => { + runInAction(() => { + this.list = [1, 2, 3]; + }) + }, 1000); + } +} + +const store = new Store(); + +export default store; \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/.babelrc" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/.babelrc" new file mode 100644 index 000000000..db07191d9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/.babelrc" @@ -0,0 +1,13 @@ +{ + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ] + ] +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/config-overrides.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/config-overrides.js" new file mode 100644 index 000000000..496d95731 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/config-overrides.js" @@ -0,0 +1,19 @@ +const path = require('path'); +const { override, addDecoratorsLegacy } = require('customize-cra'); + +function resolve(dir) { + return path.join(__dirname, dir); +} + +const customize = () => (config, env) => { + config.resolve.alias['@'] = resolve('src') + if (env === 'production') { + config.externals = { + 'react': 'React', + 'react-dom': 'ReactDOM', + } + } + return config +}; + +module.exports = override (addDecoratorsLegacy(), customize ()) \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package-lock.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package-lock.json" new file mode 100644 index 000000000..6e58f0787 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package-lock.json" @@ -0,0 +1,12264 @@ +{ + "name": "04_Learn_Log", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/@ampproject%2fremapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@apideck/better-ajv-errors": { + "version": "0.3.6", + "resolved": "https://mirrors.tencent.com/npm/@apideck%2fbetter-ajv-errors/-/better-ajv-errors-0.3.6.tgz", + "integrity": "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==", + "requires": { + "json-schema": "^0.4.0", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcode-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcompat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==" + }, + "@babel/core": { + "version": "7.21.8", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcore/-/core-7.21.8.tgz", + "integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==", + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helpers": "^7.21.5", + "@babel/parser": "^7.21.8", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcode-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.21.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcompat-data/-/compat-data-7.21.7.tgz", + "integrity": "sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==" + }, + "@babel/generator": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fgenerator/-/generator-7.21.5.tgz", + "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", + "requires": { + "@babel/types": "^7.21.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz", + "integrity": "sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==", + "requires": { + "@babel/compat-data": "^7.21.5", + "@babel/helper-validator-option": "^7.21.0", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz", + "integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==" + }, + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/parser": { + "version": "7.21.8", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fparser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==" + }, + "@babel/traverse": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftraverse/-/traverse-7.21.5.tgz", + "integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==", + "requires": { + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.21.5", + "@babel/types": "^7.21.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/eslint-parser": { + "version": "7.19.1", + "resolved": "https://mirrors.tencent.com/npm/@babel%2feslint-parser/-/eslint-parser-7.19.1.tgz", + "integrity": "sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==", + "requires": { + "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/generator": { + "version": "7.21.1", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fgenerator/-/generator-7.21.1.tgz", + "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", + "requires": { + "@babel/types": "^7.21.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fgen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.21.5.tgz", + "integrity": "sha512-uNrjKztPLkUk7bpCNC0jEKDJzzkvel/W+HguzbN8krA+LPfC1CEobJEvAvGka2A/M+ViOqXdcRL0GqPUJSjx9g==", + "requires": { + "@babel/types": "^7.21.5" + }, + "dependencies": { + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", + "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "requires": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz", + "integrity": "sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-member-expression-to-functions": "^7.21.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.21.8", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.8.tgz", + "integrity": "sha512-zGuSdedkFtsFHGbexAvNuipg1hbtitDLo2XE8/uf6Y9sOQV1xsYX/2pNbtedp/X0eU1pIt+kGvaqHCowkRbS5g==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.3.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "requires": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" + }, + "@babel/helper-function-name": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "requires": { + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", + "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", + "requires": { + "@babel/types": "^7.21.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-module-transforms/-/helper-module-transforms-7.21.5.tgz", + "integrity": "sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==", + "requires": { + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcode-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/generator": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fgenerator/-/generator-7.21.5.tgz", + "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", + "requires": { + "@babel/types": "^7.21.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz", + "integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==" + }, + "@babel/helper-module-imports": { + "version": "7.21.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-module-imports/-/helper-module-imports-7.21.4.tgz", + "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "requires": { + "@babel/types": "^7.21.4" + } + }, + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/parser": { + "version": "7.21.8", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fparser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==" + }, + "@babel/traverse": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftraverse/-/traverse-7.21.5.tgz", + "integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==", + "requires": { + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.21.5", + "@babel/types": "^7.21.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==" + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-replace-supers": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-replace-supers/-/helper-replace-supers-7.20.7.tgz", + "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==", + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.20.7", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.20.7", + "@babel/types": "^7.20.7" + } + }, + "@babel/helper-simple-access": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-simple-access/-/helper-simple-access-7.21.5.tgz", + "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", + "requires": { + "@babel/types": "^7.21.5" + }, + "dependencies": { + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.20.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", + "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", + "requires": { + "@babel/types": "^7.20.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==" + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" + }, + "@babel/helper-validator-option": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==" + }, + "@babel/helper-wrap-function": { + "version": "7.20.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-wrap-function/-/helper-wrap-function-7.20.5.tgz", + "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "requires": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + } + }, + "@babel/helpers": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelpers/-/helpers-7.21.5.tgz", + "integrity": "sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA==", + "requires": { + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcode-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/generator": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fgenerator/-/generator-7.21.5.tgz", + "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", + "requires": { + "@babel/types": "^7.21.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz", + "integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==" + }, + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/parser": { + "version": "7.21.8", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fparser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==" + }, + "@babel/traverse": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftraverse/-/traverse-7.21.5.tgz", + "integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==", + "requires": { + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.21.5", + "@babel/types": "^7.21.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhighlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.21.2", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fparser/-/parser-7.21.2.tgz", + "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==" + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz", + "integrity": "sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/plugin-proposal-optional-chaining": "^7.20.7" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", + "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", + "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-decorators": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-decorators/-/plugin-proposal-decorators-7.21.0.tgz", + "integrity": "sha512-MfgX49uRrFUTL/HvWtmx3zmpyzMMr4MTj3d527MLlr/4RTT9G/ytFFP7qet2uM2Ve03b+BkpWUpK+lRXnQ+v9w==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/plugin-syntax-decorators": "^7.21.0" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", + "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "requires": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", + "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", + "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-decorators": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-decorators/-/plugin-syntax-decorators-7.21.0.tgz", + "integrity": "sha512-tIoPpGBR8UuM4++ccWN3gifhVvQu7ZizuR1fklhRJrd5ewgbkUS+0KVFeWWxELtn18NTLoW32XV7zyOgIAiz+w==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-flow": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz", + "integrity": "sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-import-assertions": { + "version": "7.20.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", + "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz", + "integrity": "sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA==", + "requires": { + "@babel/helper-plugin-utils": "^7.21.5" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz", + "integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q==", + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-remap-async-to-generator": "^7.18.9" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", + "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", + "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz", + "integrity": "sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/template": "^7.20.7" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.21.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz", + "integrity": "sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-flow-strip-types": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.21.0.tgz", + "integrity": "sha512-FlFA2Mj87a6sDkW4gfGrQQqwY/dLlBAyJa2dJEZ+FHXUVHBflO2wyKvg+OOEzXfrKYIa4HWl0mgmbCzt0cMb7w==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-flow": "^7.18.6" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz", + "integrity": "sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.21.5" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "requires": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.20.11", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz", + "integrity": "sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g==", + "requires": { + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz", + "integrity": "sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ==", + "requires": { + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-simple-access": "^7.21.5" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.20.11", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz", + "integrity": "sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw==", + "requires": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-identifier": "^7.19.1" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.20.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", + "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.21.3", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz", + "integrity": "sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-react-constant-elements": { + "version": "7.20.2", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.20.2.tgz", + "integrity": "sha512-KS/G8YI8uwMGKErLFOHS/ekhqdHhpEloxs43NecQHVgo2QuQSyJhGIY1fL8UGl9wy5ItVwwoUL4YxVqsplGq2g==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-react-display-name": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz", + "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz", + "integrity": "sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-jsx": "^7.18.6", + "@babel/types": "^7.21.0" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz", + "integrity": "sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==", + "requires": { + "@babel/plugin-transform-react-jsx": "^7.18.6" + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz", + "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz", + "integrity": "sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w==", + "requires": { + "@babel/helper-plugin-utils": "^7.21.5", + "regenerator-transform": "^0.15.1" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-runtime/-/plugin-transform-runtime-7.21.0.tgz", + "integrity": "sha512-ReY6pxwSzEU0b3r2/T/VhqMKg/AkceBT19X0UptA3/tYi5Pe2eXgEUH+NNMC5nok6c6XQz5tyVTUpuezRfSMSg==", + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz", + "integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-typescript/-/plugin-transform-typescript-7.21.0.tgz", + "integrity": "sha512-xo///XTPp3mDzTtrqXoBlK9eiAYW3wv9JXglcn/u1bi60RW11dEUxIgA8cbnDhutS1zacjMRmAwxE0gMklLnZg==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-typescript": "^7.20.0" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz", + "integrity": "sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg==", + "requires": { + "@babel/helper-plugin-utils": "^7.21.5" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + } + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fplugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/preset-env": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fpreset-env/-/preset-env-7.21.5.tgz", + "integrity": "sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg==", + "requires": { + "@babel/compat-data": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-validator-option": "^7.21.0", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", + "@babel/plugin-proposal-async-generator-functions": "^7.20.7", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.21.0", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.21.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.21.5", + "@babel/plugin-transform-async-to-generator": "^7.20.7", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.21.0", + "@babel/plugin-transform-classes": "^7.21.0", + "@babel/plugin-transform-computed-properties": "^7.21.5", + "@babel/plugin-transform-destructuring": "^7.21.3", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.21.5", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.20.11", + "@babel/plugin-transform-modules-commonjs": "^7.21.5", + "@babel/plugin-transform-modules-systemjs": "^7.20.11", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.21.3", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.21.5", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.20.7", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.21.5", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.21.5", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + }, + "dependencies": { + "@babel/compat-data": { + "version": "7.21.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fcompat-data/-/compat-data-7.21.7.tgz", + "integrity": "sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==" + }, + "@babel/helper-compilation-targets": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz", + "integrity": "sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==", + "requires": { + "@babel/compat-data": "^7.21.5", + "@babel/helper-validator-option": "^7.21.0", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + }, + "@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fhelper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + }, + "@babel/types": { + "version": "7.21.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", + "requires": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fpreset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-react": { + "version": "7.18.6", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fpreset-react/-/preset-react-7.18.6.tgz", + "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-react-display-name": "^7.18.6", + "@babel/plugin-transform-react-jsx": "^7.18.6", + "@babel/plugin-transform-react-jsx-development": "^7.18.6", + "@babel/plugin-transform-react-pure-annotations": "^7.18.6" + } + }, + "@babel/preset-typescript": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fpreset-typescript/-/preset-typescript-7.21.0.tgz", + "integrity": "sha512-myc9mpoVA5m1rF8K8DgLEatOYFDpwC+RkMkjZ0Du6uI62YvDe8uxIEYVs/VCdSJ097nlALiU/yBC7//3nI+hNg==", + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-option": "^7.21.0", + "@babel/plugin-transform-typescript": "^7.21.0" + } + }, + "@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fregjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" + }, + "@babel/runtime": { + "version": "7.21.0", + "resolved": "https://mirrors.tencent.com/npm/@babel%2fruntime/-/runtime-7.21.0.tgz", + "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "requires": { + "regenerator-runtime": "^0.13.11" + } + }, + "@babel/template": { + "version": "7.20.7", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftemplate/-/template-7.20.7.tgz", + "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" + } + }, + "@babel/traverse": { + "version": "7.21.2", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftraverse/-/traverse-7.21.2.tgz", + "integrity": "sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.21.1", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.21.2", + "@babel/types": "^7.21.2", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.21.2", + "resolved": "https://mirrors.tencent.com/npm/@babel%2ftypes/-/types-7.21.2.tgz", + "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", + "requires": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://mirrors.tencent.com/npm/@bcoe%2fv8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" + }, + "@csstools/normalize.css": { + "version": "12.0.0", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fnormalize.css/-/normalize.css-12.0.0.tgz", + "integrity": "sha512-M0qqxAcwCsIVfpFQSlGN5XjXWu8l5JDZN+fPt1LeW5SZexQTgnaEvgXAY+CeygRw0EeppWHi12JxESWiWrB0Sg==" + }, + "@csstools/postcss-cascade-layers": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-cascade-layers/-/postcss-cascade-layers-1.1.1.tgz", + "integrity": "sha512-+KdYrpKC5TgomQr2DlZF4lDEpHcoxnj5IGddYYfBWJAKfj1JtuHUIqMa+E1pJJ+z3kvDViWMqyqPlG4Ja7amQA==", + "requires": { + "@csstools/selector-specificity": "^2.0.2", + "postcss-selector-parser": "^6.0.10" + } + }, + "@csstools/postcss-color-function": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-color-function/-/postcss-color-function-1.1.1.tgz", + "integrity": "sha512-Bc0f62WmHdtRDjf5f3e2STwRAl89N2CLb+9iAwzrv4L2hncrbDwnQD9PCq0gtAt7pOI2leIV08HIBUd4jxD8cw==", + "requires": { + "@csstools/postcss-progressive-custom-properties": "^1.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-font-format-keywords": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-font-format-keywords/-/postcss-font-format-keywords-1.0.1.tgz", + "integrity": "sha512-ZgrlzuUAjXIOc2JueK0X5sZDjCtgimVp/O5CEqTcs5ShWBa6smhWYbS0x5cVc/+rycTDbjjzoP0KTDnUneZGOg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-hwb-function": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-hwb-function/-/postcss-hwb-function-1.0.2.tgz", + "integrity": "sha512-YHdEru4o3Rsbjmu6vHy4UKOXZD+Rn2zmkAmLRfPet6+Jz4Ojw8cbWxe1n42VaXQhD3CQUXXTooIy8OkVbUcL+w==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-ic-unit": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-ic-unit/-/postcss-ic-unit-1.0.1.tgz", + "integrity": "sha512-Ot1rcwRAaRHNKC9tAqoqNZhjdYBzKk1POgWfhN4uCOE47ebGcLRqXjKkApVDpjifL6u2/55ekkpnFcp+s/OZUw==", + "requires": { + "@csstools/postcss-progressive-custom-properties": "^1.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-is-pseudo-class": { + "version": "2.0.7", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-is-pseudo-class/-/postcss-is-pseudo-class-2.0.7.tgz", + "integrity": "sha512-7JPeVVZHd+jxYdULl87lvjgvWldYu+Bc62s9vD/ED6/QTGjy0jy0US/f6BG53sVMTBJ1lzKZFpYmofBN9eaRiA==", + "requires": { + "@csstools/selector-specificity": "^2.0.0", + "postcss-selector-parser": "^6.0.10" + } + }, + "@csstools/postcss-nested-calc": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-nested-calc/-/postcss-nested-calc-1.0.0.tgz", + "integrity": "sha512-JCsQsw1wjYwv1bJmgjKSoZNvf7R6+wuHDAbi5f/7MbFhl2d/+v+TvBTU4BJH3G1X1H87dHl0mh6TfYogbT/dJQ==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-normalize-display-values": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-normalize-display-values/-/postcss-normalize-display-values-1.0.1.tgz", + "integrity": "sha512-jcOanIbv55OFKQ3sYeFD/T0Ti7AMXc9nM1hZWu8m/2722gOTxFg7xYu4RDLJLeZmPUVQlGzo4jhzvTUq3x4ZUw==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-oklab-function": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-oklab-function/-/postcss-oklab-function-1.1.1.tgz", + "integrity": "sha512-nJpJgsdA3dA9y5pgyb/UfEzE7W5Ka7u0CX0/HIMVBNWzWemdcTH3XwANECU6anWv/ao4vVNLTMxhiPNZsTK6iA==", + "requires": { + "@csstools/postcss-progressive-custom-properties": "^1.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-progressive-custom-properties": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-progressive-custom-properties/-/postcss-progressive-custom-properties-1.3.0.tgz", + "integrity": "sha512-ASA9W1aIy5ygskZYuWams4BzafD12ULvSypmaLJT2jvQ8G0M3I8PRQhC0h7mG0Z3LI05+agZjqSR9+K9yaQQjA==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-stepped-value-functions": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-stepped-value-functions/-/postcss-stepped-value-functions-1.0.1.tgz", + "integrity": "sha512-dz0LNoo3ijpTOQqEJLY8nyaapl6umbmDcgj4AD0lgVQ572b2eqA1iGZYTTWhrcrHztWDDRAX2DGYyw2VBjvCvQ==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-text-decoration-shorthand": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-1.0.0.tgz", + "integrity": "sha512-c1XwKJ2eMIWrzQenN0XbcfzckOLLJiczqy+YvfGmzoVXd7pT9FfObiSEfzs84bpE/VqfpEuAZ9tCRbZkZxxbdw==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-trigonometric-functions": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-trigonometric-functions/-/postcss-trigonometric-functions-1.0.2.tgz", + "integrity": "sha512-woKaLO///4bb+zZC2s80l+7cm07M7268MsyG3M0ActXXEFi6SuhvriQYcb58iiKGbjwwIU7n45iRLEHypB47Og==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "@csstools/postcss-unset-value": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fpostcss-unset-value/-/postcss-unset-value-1.0.2.tgz", + "integrity": "sha512-c8J4roPBILnelAsdLr4XOAR/GsTm0GJi4XpcfvoWk3U6KiTCqiFYc63KhRMQQX35jYMp4Ao8Ij9+IZRgMfJp1g==" + }, + "@csstools/selector-specificity": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/@csstools%2fselector-specificity/-/selector-specificity-2.1.1.tgz", + "integrity": "sha512-jwx+WCqszn53YHOfvFMJJRd/B2GqkCBt+1MJSG6o5/s8+ytHMvDZXsJgUEWLk12UnLd7HYKac4BYU5i/Ron1Cw==" + }, + "@eslint/eslintrc": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/@eslint%2feslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "globals": { + "version": "13.20.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes%2fconfig-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes%2fmodule-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes%2fobject-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/@istanbuljs%2fload-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://mirrors.tencent.com/npm/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://mirrors.tencent.com/npm/@istanbuljs%2fschema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==" + }, + "@jest/console": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fconsole/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@jest/core": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fcore/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "requires": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@jest/environment": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fenvironment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "requires": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" + } + }, + "@jest/fake-timers": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ffake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "requires": { + "@jest/types": "^27.5.1", + "@sinonjs/fake-timers": "^8.0.1", + "@types/node": "*", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + } + }, + "@jest/globals": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fglobals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" + } + }, + "@jest/reporters": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2freporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@jest/schemas": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fschemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/source-map": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fsource-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "@jest/test-result": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftest-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "requires": { + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftest-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "requires": { + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" + } + }, + "@jest/transform": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftransform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@jest/types": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftypes/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fgen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fresolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fset-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fsource-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fgen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2fsourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell%2ftrace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@leichtgewicht/ip-codec": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/@leichtgewicht%2fip-codec/-/ip-codec-2.0.4.tgz", + "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" + }, + "@nicolo-ribaudo/eslint-scope-5-internals": { + "version": "5.1.1-v1", + "resolved": "https://mirrors.tencent.com/npm/@nicolo-ribaudo%2feslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", + "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", + "requires": { + "eslint-scope": "5.1.1" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + } + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib%2ffs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib%2ffs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/@nodelib%2ffs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@pmmmwh/react-refresh-webpack-plugin": { + "version": "0.5.10", + "resolved": "https://mirrors.tencent.com/npm/@pmmmwh%2freact-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz", + "integrity": "sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA==", + "requires": { + "ansi-html-community": "^0.0.8", + "common-path-prefix": "^3.0.0", + "core-js-pure": "^3.23.3", + "error-stack-parser": "^2.0.6", + "find-up": "^5.0.0", + "html-entities": "^2.1.0", + "loader-utils": "^2.0.4", + "schema-utils": "^3.0.0", + "source-map": "^0.7.3" + } + }, + "@reduxjs/toolkit": { + "version": "1.9.3", + "resolved": "https://mirrors.tencent.com/npm/@reduxjs%2ftoolkit/-/toolkit-1.9.3.tgz", + "integrity": "sha512-GU2TNBQVofL09VGmuSioNPQIu6Ml0YLf4EJhgj0AvBadRlCGzUWet8372LjvO4fqKZF2vH1xU0htAa7BrK9pZg==", + "requires": { + "immer": "^9.0.16", + "redux": "^4.2.0", + "redux-thunk": "^2.4.2", + "reselect": "^4.1.7" + } + }, + "@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://mirrors.tencent.com/npm/@rollup%2fplugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "11.2.1", + "resolved": "https://mirrors.tencent.com/npm/@rollup%2fplugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", + "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/plugin-replace": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/@rollup%2fplugin-replace/-/plugin-replace-2.4.2.tgz", + "integrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==", + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/@rollup%2fpluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://mirrors.tencent.com/npm/@types%2festree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" + } + } + }, + "@rushstack/eslint-patch": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/@rushstack%2feslint-patch/-/eslint-patch-1.2.0.tgz", + "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==" + }, + "@sinclair/typebox": { + "version": "0.24.51", + "resolved": "https://mirrors.tencent.com/npm/@sinclair%2ftypebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==" + }, + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://mirrors.tencent.com/npm/@sinonjs%2fcommons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/@sinonjs%2ffake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@surma/rollup-plugin-off-main-thread": { + "version": "2.2.3", + "resolved": "https://mirrors.tencent.com/npm/@surma%2frollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", + "integrity": "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==", + "requires": { + "ejs": "^3.1.6", + "json5": "^2.2.0", + "magic-string": "^0.25.0", + "string.prototype.matchall": "^4.0.6" + } + }, + "@svgr/babel-plugin-add-jsx-attribute": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz", + "integrity": "sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg==" + }, + "@svgr/babel-plugin-remove-jsx-attribute": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz", + "integrity": "sha512-yaS4o2PgUtwLFGTKbsiAy6D0o3ugcUhWK0Z45umJ66EPWunAz9fuFw2gJuje6wqQvQWOTJvIahUwndOXb7QCPg==" + }, + "@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz", + "integrity": "sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA==" + }, + "@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz", + "integrity": "sha512-PoiE6ZD2Eiy5mK+fjHqwGOS+IXX0wq/YDtNyIgOrc6ejFnxN4b13pRpiIPbtPwHEc+NT2KCjteAcq33/F1Y9KQ==" + }, + "@svgr/babel-plugin-svg-dynamic-title": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz", + "integrity": "sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg==" + }, + "@svgr/babel-plugin-svg-em-dimensions": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz", + "integrity": "sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw==" + }, + "@svgr/babel-plugin-transform-react-native-svg": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz", + "integrity": "sha512-3eYP/SaopZ41GHwXma7Rmxcv9uRslRDTY1estspeB1w1ueZWd/tPlMfEOoccYpEMZU3jD4OU7YitnXcF5hLW2Q==" + }, + "@svgr/babel-plugin-transform-svg-component": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz", + "integrity": "sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ==" + }, + "@svgr/babel-preset": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fbabel-preset/-/babel-preset-5.5.0.tgz", + "integrity": "sha512-4FiXBjvQ+z2j7yASeGPEi8VD/5rrGQk4Xrq3EdJmoZgz/tpqChpo5hgXDvmEauwtvOc52q8ghhZK4Oy7qph4ig==", + "requires": { + "@svgr/babel-plugin-add-jsx-attribute": "^5.4.0", + "@svgr/babel-plugin-remove-jsx-attribute": "^5.4.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "^5.0.1", + "@svgr/babel-plugin-replace-jsx-attribute-value": "^5.0.1", + "@svgr/babel-plugin-svg-dynamic-title": "^5.4.0", + "@svgr/babel-plugin-svg-em-dimensions": "^5.4.0", + "@svgr/babel-plugin-transform-react-native-svg": "^5.4.0", + "@svgr/babel-plugin-transform-svg-component": "^5.5.0" + } + }, + "@svgr/core": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fcore/-/core-5.5.0.tgz", + "integrity": "sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ==", + "requires": { + "@svgr/plugin-jsx": "^5.5.0", + "camelcase": "^6.2.0", + "cosmiconfig": "^7.0.0" + } + }, + "@svgr/hast-util-to-babel-ast": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fhast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz", + "integrity": "sha512-cAaR/CAiZRB8GP32N+1jocovUtvlj0+e65TB50/6Lcime+EA49m/8l+P2ko+XPJ4dw3xaPS3jOL4F2X4KWxoeQ==", + "requires": { + "@babel/types": "^7.12.6" + } + }, + "@svgr/plugin-jsx": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fplugin-jsx/-/plugin-jsx-5.5.0.tgz", + "integrity": "sha512-V/wVh33j12hGh05IDg8GpIUXbjAPnTdPTKuP4VNLggnwaHMPNQNae2pRnyTAILWCQdz5GyMqtO488g7CKM8CBA==", + "requires": { + "@babel/core": "^7.12.3", + "@svgr/babel-preset": "^5.5.0", + "@svgr/hast-util-to-babel-ast": "^5.5.0", + "svg-parser": "^2.0.2" + } + }, + "@svgr/plugin-svgo": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fplugin-svgo/-/plugin-svgo-5.5.0.tgz", + "integrity": "sha512-r5swKk46GuQl4RrVejVwpeeJaydoxkdwkM1mBKOgJLBUJPGaLci6ylg/IjhrRsREKDkr4kbMWdgOtbXEh0fyLQ==", + "requires": { + "cosmiconfig": "^7.0.0", + "deepmerge": "^4.2.2", + "svgo": "^1.2.2" + } + }, + "@svgr/webpack": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/@svgr%2fwebpack/-/webpack-5.5.0.tgz", + "integrity": "sha512-DOBOK255wfQxguUta2INKkzPj6AIS6iafZYiYmHn6W3pHlycSRRlvWKCfLDG10fXfLWqE3DJHgRUOyJYmARa7g==", + "requires": { + "@babel/core": "^7.12.3", + "@babel/plugin-transform-react-constant-elements": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-react": "^7.12.5", + "@svgr/core": "^5.5.0", + "@svgr/plugin-jsx": "^5.5.0", + "@svgr/plugin-svgo": "^5.5.0", + "loader-utils": "^2.0.0" + } + }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/@tootallnate%2fonce/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" + }, + "@trysound/sax": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/@trysound%2fsax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==" + }, + "@types/babel__core": { + "version": "7.20.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbabel__core/-/babel__core-7.20.0.tgz", + "integrity": "sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==", + "requires": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbabel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbabel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.18.3", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbabel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/body-parser": { + "version": "1.19.2", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbody-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/bonjour": { + "version": "3.5.10", + "resolved": "https://mirrors.tencent.com/npm/@types%2fbonjour/-/bonjour-3.5.10.tgz", + "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", + "requires": { + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.35", + "resolved": "https://mirrors.tencent.com/npm/@types%2fconnect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/connect-history-api-fallback": { + "version": "1.3.5", + "resolved": "https://mirrors.tencent.com/npm/@types%2fconnect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", + "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "@types/eslint": { + "version": "8.21.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2feslint/-/eslint-8.21.1.tgz", + "integrity": "sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==", + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://mirrors.tencent.com/npm/@types%2feslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2festree/-/estree-1.0.0.tgz", + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==" + }, + "@types/express": { + "version": "4.17.17", + "resolved": "https://mirrors.tencent.com/npm/@types%2fexpress/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.33", + "resolved": "https://mirrors.tencent.com/npm/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://mirrors.tencent.com/npm/@types%2fgraceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "requires": { + "@types/node": "*" + } + }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fhoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, + "@types/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fhtml-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==" + }, + "@types/http-proxy": { + "version": "1.17.10", + "resolved": "https://mirrors.tencent.com/npm/@types%2fhttp-proxy/-/http-proxy-1.17.10.tgz", + "integrity": "sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g==", + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/@types%2fistanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fistanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fistanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://mirrors.tencent.com/npm/@types%2fjson-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://mirrors.tencent.com/npm/@types%2fjson5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" + }, + "@types/mime": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fmime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" + }, + "@types/node": { + "version": "18.14.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fnode/-/node-18.14.1.tgz", + "integrity": "sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ==" + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fparse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "@types/prettier": { + "version": "2.7.2", + "resolved": "https://mirrors.tencent.com/npm/@types%2fprettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==" + }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://mirrors.tencent.com/npm/@types%2fprop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "@types/q": { + "version": "1.5.5", + "resolved": "https://mirrors.tencent.com/npm/@types%2fq/-/q-1.5.5.tgz", + "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://mirrors.tencent.com/npm/@types%2fqs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "@types/range-parser": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/@types%2frange-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, + "@types/react": { + "version": "18.0.34", + "resolved": "https://mirrors.tencent.com/npm/@types%2freact/-/react-18.0.34.tgz", + "integrity": "sha512-NO1UO8941541CJl1BeOXi8a9dNKFK09Gnru5ZJqkm4Q3/WoQJtHvmwt0VX0SB9YCEwe7TfSSxDuaNmx6H2BAIQ==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fresolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "requires": { + "@types/node": "*" + } + }, + "@types/retry": { + "version": "0.12.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fretry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + }, + "@types/scheduler": { + "version": "0.16.3", + "resolved": "https://mirrors.tencent.com/npm/@types%2fscheduler/-/scheduler-0.16.3.tgz", + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" + }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://mirrors.tencent.com/npm/@types%2fsemver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" + }, + "@types/serve-index": { + "version": "1.9.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fserve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", + "requires": { + "@types/express": "*" + } + }, + "@types/serve-static": { + "version": "1.15.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fserve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "requires": { + "@types/mime": "*", + "@types/node": "*" + } + }, + "@types/sockjs": { + "version": "0.3.33", + "resolved": "https://mirrors.tencent.com/npm/@types%2fsockjs/-/sockjs-0.3.33.tgz", + "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", + "requires": { + "@types/node": "*" + } + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/@types%2fstack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" + }, + "@types/trusted-types": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/@types%2ftrusted-types/-/trusted-types-2.0.3.tgz", + "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==" + }, + "@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://mirrors.tencent.com/npm/@types%2fuse-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, + "@types/ws": { + "version": "8.5.4", + "resolved": "https://mirrors.tencent.com/npm/@types%2fws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "requires": { + "@types/node": "*" + } + }, + "@types/yargs": { + "version": "16.0.5", + "resolved": "https://mirrors.tencent.com/npm/@types%2fyargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://mirrors.tencent.com/npm/@types%2fyargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2feslint-plugin/-/eslint-plugin-5.53.0.tgz", + "integrity": "sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==", + "requires": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/type-utils": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2fexperimental-utils/-/experimental-utils-5.53.0.tgz", + "integrity": "sha512-4SklZEwRn0jqkhtW+pPZpbKFXprwGneBndRM0TGzJu/LWdb9QV2hBgFIVU9AREo02BzqFvyG/ypd+xAW5YGhXw==", + "requires": { + "@typescript-eslint/utils": "5.53.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2fparser/-/parser-5.53.0.tgz", + "integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==", + "requires": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2fscope-manager/-/scope-manager-5.53.0.tgz", + "integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==", + "requires": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2ftype-utils/-/type-utils-5.53.0.tgz", + "integrity": "sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==", + "requires": { + "@typescript-eslint/typescript-estree": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2ftypes/-/types-5.53.0.tgz", + "integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2ftypescript-estree/-/typescript-estree-5.53.0.tgz", + "integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==", + "requires": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2futils/-/utils-5.53.0.tgz", + "integrity": "sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==", + "requires": { + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.53.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint%2fvisitor-keys/-/visitor-keys-5.53.0.tgz", + "integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==", + "requires": { + "@typescript-eslint/types": "5.53.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2ffloating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fhelper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fhelper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fhelper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fhelper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fhelper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fleb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2futf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fwasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fwasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fwasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fwasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@webassemblyjs%2fwast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/@xtuc%2fieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://mirrors.tencent.com/npm/@xtuc%2flong/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "abab": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" + }, + "accepts": { + "version": "1.3.8", + "resolved": "https://mirrors.tencent.com/npm/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "acorn": { + "version": "8.8.2", + "resolved": "https://mirrors.tencent.com/npm/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==" + }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://mirrors.tencent.com/npm/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + } + } + }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://mirrors.tencent.com/npm/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==" + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" + }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://mirrors.tencent.com/npm/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://mirrors.tencent.com/npm/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + } + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" + }, + "address": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==" + }, + "adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "requires": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + } + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://mirrors.tencent.com/npm/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "requires": { + "ajv": "^8.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://mirrors.tencent.com/npm/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + } + } + }, + "ansi-html-community": { + "version": "0.0.8", + "resolved": "https://mirrors.tencent.com/npm/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==" + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "5.0.2", + "resolved": "https://mirrors.tencent.com/npm/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "aria-query": { + "version": "5.1.3", + "resolved": "https://mirrors.tencent.com/npm/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "requires": { + "deep-equal": "^2.0.5" + } + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + }, + "array-includes": { + "version": "3.1.6", + "resolved": "https://mirrors.tencent.com/npm/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.reduce": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", + "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + } + }, + "array.prototype.tosorted": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", + "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://mirrors.tencent.com/npm/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=" + }, + "async": { + "version": "3.2.4", + "resolved": "https://mirrors.tencent.com/npm/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, + "autoprefixer": { + "version": "10.4.13", + "resolved": "https://mirrors.tencent.com/npm/autoprefixer/-/autoprefixer-10.4.13.tgz", + "integrity": "sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==", + "requires": { + "browserslist": "^4.21.4", + "caniuse-lite": "^1.0.30001426", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + } + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, + "axe-core": { + "version": "4.6.3", + "resolved": "https://mirrors.tencent.com/npm/axe-core/-/axe-core-4.6.3.tgz", + "integrity": "sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==" + }, + "axobject-query": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/axobject-query/-/axobject-query-3.1.1.tgz", + "integrity": "sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==", + "requires": { + "deep-equal": "^2.0.5" + } + }, + "babel-jest": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/babel-jest/-/babel-jest-27.5.1.tgz", + "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", + "requires": { + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "babel-loader": { + "version": "8.3.0", + "resolved": "https://mirrors.tencent.com/npm/babel-loader/-/babel-loader-8.3.0.tgz", + "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^2.0.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "schema-utils": { + "version": "2.7.1", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", + "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "requires": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + } + }, + "babel-plugin-named-asset-import": { + "version": "0.3.8", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz", + "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==" + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + } + }, + "babel-plugin-transform-react-remove-prop-types": { + "version": "0.4.24", + "resolved": "https://mirrors.tencent.com/npm/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz", + "integrity": "sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==" + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", + "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", + "requires": { + "babel-plugin-jest-hoist": "^27.5.1", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "babel-preset-react-app": { + "version": "10.0.1", + "resolved": "https://mirrors.tencent.com/npm/babel-preset-react-app/-/babel-preset-react-app-10.0.1.tgz", + "integrity": "sha512-b0D9IZ1WhhCWkrTXyFuIIgqGzSkRIH5D5AmB0bXbzYAB1OBAwHcUeyWW2LorutLWF5btNo/N7r/cIdmvvKJlYg==", + "requires": { + "@babel/core": "^7.16.0", + "@babel/plugin-proposal-class-properties": "^7.16.0", + "@babel/plugin-proposal-decorators": "^7.16.4", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0", + "@babel/plugin-proposal-numeric-separator": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.0", + "@babel/plugin-proposal-private-methods": "^7.16.0", + "@babel/plugin-transform-flow-strip-types": "^7.16.0", + "@babel/plugin-transform-react-display-name": "^7.16.0", + "@babel/plugin-transform-runtime": "^7.16.4", + "@babel/preset-env": "^7.16.4", + "@babel/preset-react": "^7.16.0", + "@babel/preset-typescript": "^7.16.0", + "@babel/runtime": "^7.16.3", + "babel-plugin-macros": "^3.1.0", + "babel-plugin-transform-react-remove-prop-types": "^0.4.24" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "batch": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, + "bfj": { + "version": "7.0.2", + "resolved": "https://mirrors.tencent.com/npm/bfj/-/bfj-7.0.2.tgz", + "integrity": "sha512-+e/UqUzwmzJamNF50tBV6tZPTORow7gQ96iFow+8b562OdMpEK0BcJEq2OSPEDmAbSMBQ7PKZ87ubFkgxpYWgw==", + "requires": { + "bluebird": "^3.5.5", + "check-types": "^11.1.1", + "hoopy": "^0.1.4", + "tryer": "^1.0.1" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://mirrors.tencent.com/npm/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://mirrors.tencent.com/npm/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://mirrors.tencent.com/npm/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "bonjour-service": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/bonjour-service/-/bonjour-service-1.1.0.tgz", + "integrity": "sha512-LVRinRB3k1/K0XzZ2p58COnWvkQknIY6sf0zF2rpErvcJXpMBttEPQSxK+HEXSS9VmpZlDoDnQWv8ftJT20B0Q==", + "requires": { + "array-flatten": "^2.1.2", + "dns-equal": "^1.0.0", + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" + }, + "browserslist": { + "version": "4.21.5", + "resolved": "https://mirrors.tencent.com/npm/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "requires": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "camel-case": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "requires": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "camelcase-css": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" + }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001458", + "resolved": "https://mirrors.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz", + "integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==" + }, + "case-sensitive-paths-webpack-plugin": { + "version": "2.4.0", + "resolved": "https://mirrors.tencent.com/npm/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz", + "integrity": "sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" + }, + "check-types": { + "version": "11.2.2", + "resolved": "https://mirrors.tencent.com/npm/check-types/-/check-types-11.2.2.tgz", + "integrity": "sha512-HBiYvXvn9Z70Z88XKjz3AEKd4HJhBXsa3j7xFnITAzoS8+q6eIGi8qDB8FKPBAjtuxjI/zFpwuiCb8oDtKOYrA==" + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://mirrors.tencent.com/npm/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://mirrors.tencent.com/npm/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==" + }, + "cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" + }, + "clean-css": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://mirrors.tencent.com/npm/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "coa": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + } + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colord": { + "version": "2.9.3", + "resolved": "https://mirrors.tencent.com/npm/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" + }, + "colorette": { + "version": "2.0.19", + "resolved": "https://mirrors.tencent.com/npm/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://mirrors.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "common-path-prefix": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==" + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://mirrors.tencent.com/npm/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://mirrors.tencent.com/npm/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://mirrors.tencent.com/npm/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://mirrors.tencent.com/npm/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==" + }, + "connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==" + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://mirrors.tencent.com/npm/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://mirrors.tencent.com/npm/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://mirrors.tencent.com/npm/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-js": { + "version": "3.28.0", + "resolved": "https://mirrors.tencent.com/npm/core-js/-/core-js-3.28.0.tgz", + "integrity": "sha512-GiZn9D4Z/rSYvTeg1ljAIsEqFm0LaN9gVtwDCrKL80zHtS31p9BAjmTxVqTQDMpwlMolJZOFntUG2uwyj7DAqw==" + }, + "core-js-compat": { + "version": "3.28.0", + "resolved": "https://mirrors.tencent.com/npm/core-js-compat/-/core-js-compat-3.28.0.tgz", + "integrity": "sha512-myzPgE7QodMg4nnd3K1TDoES/nADRStM8Gpz0D6nhkwbmwEnE0ZGJgoWsvQ722FR8D7xS0n0LV556RcEicjTyg==", + "requires": { + "browserslist": "^4.21.5" + } + }, + "core-js-pure": { + "version": "3.28.0", + "resolved": "https://mirrors.tencent.com/npm/core-js-pure/-/core-js-pure-3.28.0.tgz", + "integrity": "sha512-DSOVleA9/v3LNj/vFxAPfUHttKTzrB2RXhAPvR5TPXn4vrra3Z2ssytvRyt8eruJwAfwAiFADEbrjcRdcvPLQQ==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cosmiconfig": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://mirrors.tencent.com/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" + }, + "css-blank-pseudo": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/css-blank-pseudo/-/css-blank-pseudo-3.0.3.tgz", + "integrity": "sha512-VS90XWtsHGqoM0t4KpH053c4ehxZ2E6HtGI7x68YFV0pTo/QmkV/YFA+NnlvK8guxZVNWGQhVNJGC39Q8XF4OQ==", + "requires": { + "postcss-selector-parser": "^6.0.9" + } + }, + "css-declaration-sorter": { + "version": "6.3.1", + "resolved": "https://mirrors.tencent.com/npm/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", + "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==" + }, + "css-has-pseudo": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/css-has-pseudo/-/css-has-pseudo-3.0.4.tgz", + "integrity": "sha512-Vse0xpR1K9MNlp2j5w1pgWIJtm1a8qS0JwS9goFYcImjlHEmywP9VUF05aGBXzGpDJF86QXk4L0ypBmwPhGArw==", + "requires": { + "postcss-selector-parser": "^6.0.9" + } + }, + "css-loader": { + "version": "6.7.3", + "resolved": "https://mirrors.tencent.com/npm/css-loader/-/css-loader-6.7.3.tgz", + "integrity": "sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==", + "requires": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.19", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.8" + } + }, + "css-minimizer-webpack-plugin": { + "version": "3.4.1", + "resolved": "https://mirrors.tencent.com/npm/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz", + "integrity": "sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==", + "requires": { + "cssnano": "^5.0.6", + "jest-worker": "^27.0.2", + "postcss": "^8.3.5", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "css-prefers-color-scheme": { + "version": "6.0.3", + "resolved": "https://mirrors.tencent.com/npm/css-prefers-color-scheme/-/css-prefers-color-scheme-6.0.3.tgz", + "integrity": "sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==" + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://mirrors.tencent.com/npm/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "css-what": { + "version": "3.4.2", + "resolved": "https://mirrors.tencent.com/npm/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==" + }, + "cssdb": { + "version": "7.4.1", + "resolved": "https://mirrors.tencent.com/npm/cssdb/-/cssdb-7.4.1.tgz", + "integrity": "sha512-0Q8NOMpXJ3iTDDbUv9grcmQAfdDx4qz+fN/+Md2FGbevT+6+bJNQ2LjB2YIUlLbpBTM32idU1Sb+tb/uGt6/XQ==" + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" + }, + "cssnano": { + "version": "5.1.15", + "resolved": "https://mirrors.tencent.com/npm/cssnano/-/cssnano-5.1.15.tgz", + "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==", + "requires": { + "cssnano-preset-default": "^5.2.14", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + } + }, + "cssnano-preset-default": { + "version": "5.2.14", + "resolved": "https://mirrors.tencent.com/npm/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", + "requires": { + "css-declaration-sorter": "^6.3.1", + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.1", + "postcss-convert-values": "^5.1.3", + "postcss-discard-comments": "^5.1.2", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.1", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.7", + "postcss-merge-rules": "^5.1.4", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.1", + "postcss-minify-params": "^5.1.4", + "postcss-minify-selectors": "^5.2.1", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.1", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.1", + "postcss-ordered-values": "^5.1.3", + "postcss-reduce-initial": "^5.1.2", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.1" + } + }, + "cssnano-utils": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==" + }, + "csso": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "requires": { + "css-tree": "^1.1.2" + }, + "dependencies": { + "css-tree": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://mirrors.tencent.com/npm/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "cssom": { + "version": "0.4.4", + "resolved": "https://mirrors.tencent.com/npm/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==" + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "requires": { + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://mirrors.tencent.com/npm/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" + } + } + }, + "csstype": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" + }, + "customize-cra": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/customize-cra/-/customize-cra-1.0.0.tgz", + "integrity": "sha512-DbtaLuy59224U+xCiukkxSq8clq++MOtJ1Et7LED1fLszWe88EoblEYFBJ895sB1mC6B4uu3xPT/IjClELhMbA==", + "requires": { + "lodash.flow": "^3.5.0" + } + }, + "damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://mirrors.tencent.com/npm/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==" + }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "requires": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decimal.js": { + "version": "10.4.3", + "resolved": "https://mirrors.tencent.com/npm/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://mirrors.tencent.com/npm/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" + }, + "deep-equal": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/deep-equal/-/deep-equal-2.2.0.tgz", + "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "requires": { + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.2", + "get-intrinsic": "^1.1.3", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "deepmerge": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==" + }, + "default-gateway": { + "version": "6.0.3", + "resolved": "https://mirrors.tencent.com/npm/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "requires": { + "execa": "^5.0.0" + } + }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "defined": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==" + }, + "detect-node": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==" + }, + "detect-port-alt": { + "version": "1.1.6", + "resolved": "https://mirrors.tencent.com/npm/detect-port-alt/-/detect-port-alt-1.1.6.tgz", + "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", + "requires": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "detective": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/detective/-/detective-5.2.1.tgz", + "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", + "requires": { + "acorn-node": "^1.8.2", + "defined": "^1.0.0", + "minimist": "^1.2.6" + } + }, + "didyoumean": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" + }, + "diff-sequences": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==" + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "dlv": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "5.4.0", + "resolved": "https://mirrors.tencent.com/npm/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", + "requires": { + "@leichtgewicht/ip-codec": "^2.0.1" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-converter": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "requires": { + "utila": "~0.4" + } + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://mirrors.tencent.com/npm/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "domexception": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" + } + } + }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://mirrors.tencent.com/npm/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "requires": { + "domelementtype": "^2.2.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + } + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://mirrors.tencent.com/npm/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "dotenv": { + "version": "10.0.0", + "resolved": "https://mirrors.tencent.com/npm/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + }, + "dotenv-expand": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/dotenv-expand/-/dotenv-expand-5.1.0.tgz", + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "3.1.8", + "resolved": "https://mirrors.tencent.com/npm/ejs/-/ejs-3.1.8.tgz", + "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "requires": { + "jake": "^10.8.5" + } + }, + "electron-to-chromium": { + "version": "1.4.311", + "resolved": "https://mirrors.tencent.com/npm/electron-to-chromium/-/electron-to-chromium-1.4.311.tgz", + "integrity": "sha512-RoDlZufvrtr2Nx3Yx5MB8jX3aHIxm8nRWPJm3yVvyHmyKaRvn90RjzB6hNnt0AkhS3IInJdyRfQb4mWhPvUjVw==" + }, + "emittery": { + "version": "0.8.1", + "resolved": "https://mirrors.tencent.com/npm/emittery/-/emittery-0.8.1.tgz", + "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==" + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://mirrors.tencent.com/npm/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-stack-parser": { + "version": "2.1.4", + "resolved": "https://mirrors.tencent.com/npm/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", + "requires": { + "stackframe": "^1.3.4" + } + }, + "es-abstract": { + "version": "1.21.1", + "resolved": "https://mirrors.tencent.com/npm/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + }, + "es-get-iterator": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + } + }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://mirrors.tencent.com/npm/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "levn": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://mirrors.tencent.com/npm/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://mirrors.tencent.com/npm/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "8.34.0", + "resolved": "https://mirrors.tencent.com/npm/eslint/-/eslint-8.34.0.tgz", + "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", + "requires": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "globals": { + "version": "13.20.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "eslint-config-react-app": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz", + "integrity": "sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==", + "requires": { + "@babel/core": "^7.16.0", + "@babel/eslint-parser": "^7.16.3", + "@rushstack/eslint-patch": "^1.1.0", + "@typescript-eslint/eslint-plugin": "^5.5.0", + "@typescript-eslint/parser": "^5.5.0", + "babel-preset-react-app": "^10.0.1", + "confusing-browser-globals": "^1.0.11", + "eslint-plugin-flowtype": "^8.0.3", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jest": "^25.3.0", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.27.1", + "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-testing-library": "^5.0.1" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://mirrors.tencent.com/npm/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "requires": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://mirrors.tencent.com/npm/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-flowtype": { + "version": "8.0.3", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz", + "integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==", + "requires": { + "lodash": "^4.17.21", + "string-natural-compare": "^3.0.1" + } + }, + "eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "requires": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "^2.0.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "eslint-plugin-jest": { + "version": "25.7.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", + "integrity": "sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==", + "requires": { + "@typescript-eslint/experimental-utils": "^5.0.0" + } + }, + "eslint-plugin-jsx-a11y": { + "version": "6.7.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "requires": { + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "has": "^1.0.3", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "eslint-plugin-react": { + "version": "7.32.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", + "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "requires": { + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.4", + "semver": "^6.3.0", + "string.prototype.matchall": "^4.0.8" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "^2.0.2" + } + }, + "resolve": { + "version": "2.0.0-next.4", + "resolved": "https://mirrors.tencent.com/npm/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==" + }, + "eslint-plugin-testing-library": { + "version": "5.10.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.10.2.tgz", + "integrity": "sha512-f1DmDWcz5SDM+IpCkEX0lbFqrrTs8HRsEElzDEqN/EBI0hpRj8Cns5+IVANXswE8/LeybIJqPAOQIFu2j5Y5sw==", + "requires": { + "@typescript-eslint/utils": "^5.43.0" + } + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" + }, + "eslint-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w==", + "requires": { + "@types/eslint": "^7.29.0 || ^8.4.1", + "jest-worker": "^28.0.2", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "espree": { + "version": "9.4.1", + "resolved": "https://mirrors.tencent.com/npm/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.4.2", + "resolved": "https://mirrors.tencent.com/npm/esquery/-/esquery-1.4.2.tgz", + "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://mirrors.tencent.com/npm/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://mirrors.tencent.com/npm/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "events": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "execa": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" + }, + "expect": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/expect/-/expect-27.5.1.tgz", + "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", + "requires": { + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" + } + }, + "express": { + "version": "4.18.2", + "resolved": "https://mirrors.tencent.com/npm/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://mirrors.tencent.com/npm/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fastq": { + "version": "1.15.0", + "resolved": "https://mirrors.tencent.com/npm/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "requires": { + "reusify": "^1.0.4" + } + }, + "faye-websocket": { + "version": "0.11.4", + "resolved": "https://mirrors.tencent.com/npm/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "requires": { + "bser": "2.1.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "requires": { + "flat-cache": "^3.0.4" + } + }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://mirrors.tencent.com/npm/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + } + }, + "filelist": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "filesize": { + "version": "8.0.7", + "resolved": "https://mirrors.tencent.com/npm/filesize/-/filesize-8.0.7.tgz", + "integrity": "sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://mirrors.tencent.com/npm/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://mirrors.tencent.com/npm/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, + "fork-ts-checker-webpack-plugin": { + "version": "6.5.2", + "resolved": "https://mirrors.tencent.com/npm/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", + "integrity": "sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@types/json-schema": "^7.0.5", + "chalk": "^4.1.0", + "chokidar": "^3.4.2", + "cosmiconfig": "^6.0.0", + "deepmerge": "^4.2.2", + "fs-extra": "^9.0.0", + "glob": "^7.1.6", + "memfs": "^3.1.2", + "minimatch": "^3.0.4", + "schema-utils": "2.7.0", + "semver": "^7.3.2", + "tapable": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "schema-utils": { + "version": "2.7.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "requires": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" + } + } + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fraction.js": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://mirrors.tencent.com/npm/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs-monkey": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/fs-monkey/-/fs-monkey-1.0.3.tgz", + "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://mirrors.tencent.com/npm/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://mirrors.tencent.com/npm/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://mirrors.tencent.com/npm/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "requires": { + "define-properties": "^1.1.3" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://mirrors.tencent.com/npm/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://mirrors.tencent.com/npm/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "requires": { + "duplexer": "^0.1.2" + } + }, + "handle-thing": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" + }, + "harmony-reflect": { + "version": "1.6.2", + "resolved": "https://mirrors.tencent.com/npm/harmony-reflect/-/harmony-reflect-1.6.2.tgz", + "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://mirrors.tencent.com/npm/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, + "hoopy": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==" + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://mirrors.tencent.com/npm/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "requires": { + "whatwg-encoding": "^1.0.5" + } + }, + "html-entities": { + "version": "2.3.3", + "resolved": "https://mirrors.tencent.com/npm/html-entities/-/html-entities-2.3.3.tgz", + "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==" + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + }, + "html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", + "requires": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "dependencies": { + "commander": { + "version": "8.3.0", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" + } + } + }, + "html-webpack-plugin": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", + "integrity": "sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==", + "requires": { + "@types/html-minifier-terser": "^6.0.0", + "html-minifier-terser": "^6.0.2", + "lodash": "^4.17.21", + "pretty-error": "^4.0.0", + "tapable": "^2.0.0" + } + }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + }, + "dependencies": { + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://mirrors.tencent.com/npm/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://mirrors.tencent.com/npm/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "http-parser-js": { + "version": "0.5.8", + "resolved": "https://mirrors.tencent.com/npm/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://mirrors.tencent.com/npm/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "requires": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://mirrors.tencent.com/npm/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==" + }, + "idb": { + "version": "7.1.1", + "resolved": "https://mirrors.tencent.com/npm/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" + }, + "identity-obj-proxy": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", + "integrity": "sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ=", + "requires": { + "harmony-reflect": "^1.4.6" + } + }, + "ignore": { + "version": "5.2.4", + "resolved": "https://mirrors.tencent.com/npm/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" + }, + "immer": { + "version": "9.0.19", + "resolved": "https://mirrors.tencent.com/npm/immer/-/immer-9.0.19.tgz", + "integrity": "sha512-eY+Y0qcsB4TZKwgQzLaE/lqYMlKhv5J9dyd2RhhtGhNo2njPXDqU9XPfcNfa3MIDsdtZt5KlkIsirlo4dHsWdQ==" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "internal-slot": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "ipaddr.js": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-array-buffer": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://mirrors.tencent.com/npm/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://mirrors.tencent.com/npm/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-map": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==" + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://mirrors.tencent.com/npm/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + }, + "is-plain-obj": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==" + }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + }, + "is-root": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-root/-/is-root-2.1.0.tgz", + "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==" + }, + "is-set": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==" + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://mirrors.tencent.com/npm/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://mirrors.tencent.com/npm/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==" + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://mirrors.tencent.com/npm/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==" + }, + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://mirrors.tencent.com/npm/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jake": { + "version": "10.8.5", + "resolved": "https://mirrors.tencent.com/npm/jake/-/jake-10.8.5.tgz", + "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", + "requires": { + "@jest/core": "^27.5.1", + "import-local": "^3.0.2", + "jest-cli": "^27.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "jest-cli": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-cli/-/jest-cli-27.5.1.tgz", + "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", + "requires": { + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "prompts": "^2.0.1", + "yargs": "^16.2.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-changed-files": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-changed-files/-/jest-changed-files-27.5.1.tgz", + "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", + "requires": { + "@jest/types": "^27.5.1", + "execa": "^5.0.0", + "throat": "^6.0.1" + } + }, + "jest-circus": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-circus/-/jest-circus-27.5.1.tgz", + "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-config": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-config/-/jest-config-27.5.1.tgz", + "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", + "requires": { + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-diff": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-docblock": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-docblock/-/jest-docblock-27.5.1.tgz", + "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-each/-/jest-each-27.5.1.tgz", + "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", + "requires": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-environment-jsdom": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", + "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", + "jsdom": "^16.6.0" + } + }, + "jest-environment-node": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + } + }, + "jest-get-type": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==" + }, + "jest-haste-map": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "requires": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-jasmine2": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", + "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "throat": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-leak-detector": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", + "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", + "requires": { + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + } + }, + "jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-message-util": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-message-util/-/jest-message-util-27.5.1.tgz", + "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.5.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-mock": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-mock/-/jest-mock-27.5.1.tgz", + "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==" + }, + "jest-regex-util": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==" + }, + "jest-resolve": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", + "requires": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", + "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", + "requires": { + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" + } + }, + "jest-runner": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-runner/-/jest-runner-27.5.1.tgz", + "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", + "requires": { + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-runtime": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-runtime/-/jest-runtime-27.5.1.tgz", + "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "requires": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-serializer": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.9" + } + }, + "jest-snapshot": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-snapshot/-/jest-snapshot-27.5.1.tgz", + "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", + "requires": { + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^27.5.1", + "semver": "^7.3.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-util": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-validate": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "requires": { + "@jest/types": "^27.5.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "leven": "^3.1.0", + "pretty-format": "^27.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-watch-typeahead": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/jest-watch-typeahead/-/jest-watch-typeahead-1.1.0.tgz", + "integrity": "sha512-Va5nLSJTN7YFtC2jd+7wsoe1pNe5K4ShLux/E5iHEwlB9AxaxmggY7to9KUqKojhaJw3aXqt5WAb4jGPOolpEw==", + "requires": { + "ansi-escapes": "^4.3.1", + "chalk": "^4.0.0", + "jest-regex-util": "^28.0.0", + "jest-watcher": "^28.0.0", + "slash": "^4.0.0", + "string-length": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "@jest/console": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/@jest%2fconsole/-/console-28.1.3.tgz", + "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "slash": "^3.0.0" + }, + "dependencies": { + "slash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + } + } + }, + "@jest/test-result": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftest-result/-/test-result-28.1.3.tgz", + "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "requires": { + "@jest/console": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/@jest%2ftypes/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "requires": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.22", + "resolved": "https://mirrors.tencent.com/npm/@types%2fyargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "emittery": { + "version": "0.10.2", + "resolved": "https://mirrors.tencent.com/npm/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "jest-message-util": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "slash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + } + } + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://mirrors.tencent.com/npm/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==" + }, + "jest-util": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-watcher": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/jest-watcher/-/jest-watcher-28.1.3.tgz", + "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "requires": { + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.3", + "string-length": "^4.0.1" + }, + "dependencies": { + "string-length": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "pretty-format": { + "version": "28.1.3", + "resolved": "https://mirrors.tencent.com/npm/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "requires": { + "@jest/schemas": "^28.1.3", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "slash": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==" + }, + "string-length": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/string-length/-/string-length-5.0.1.tgz", + "integrity": "sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow==", + "requires": { + "char-regex": "^2.0.0", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "char-regex": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/char-regex/-/char-regex-2.0.1.tgz", + "integrity": "sha512-oSvEeo6ZUD7NepqAat3RqoucZ5SeqLJgOvVIwkafu6IP3V0pO38s/ypdVUmDDK6qIIHNlYHJAKX9E7R7HoKElw==" + } + } + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "requires": { + "ansi-regex": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-watcher": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-watcher/-/jest-watcher-27.5.1.tgz", + "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", + "requires": { + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.5.1", + "string-length": "^4.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-sdsl": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsdom": { + "version": "16.7.0", + "resolved": "https://mirrors.tencent.com/npm/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://mirrors.tencent.com/npm/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "json5": { + "version": "2.2.3", + "resolved": "https://mirrors.tencent.com/npm/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsonpointer": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==" + }, + "jsx-ast-utils": { + "version": "3.3.3", + "resolved": "https://mirrors.tencent.com/npm/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", + "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", + "requires": { + "array-includes": "^3.1.5", + "object.assign": "^4.1.3" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://mirrors.tencent.com/npm/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" + }, + "klona": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==" + }, + "language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://mirrors.tencent.com/npm/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==" + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" + }, + "levn": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lilconfig": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==" + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" + }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://mirrors.tencent.com/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://mirrors.tencent.com/npm/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" + }, + "lodash.flow": { + "version": "3.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.flow/-/lodash.flow-3.5.0.tgz", + "integrity": "sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o=" + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + }, + "magic-string": { + "version": "0.25.9", + "resolved": "https://mirrors.tencent.com/npm/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "requires": { + "sourcemap-codec": "^1.4.8" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://mirrors.tencent.com/npm/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "requires": { + "tmpl": "1.0.5" + } + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://mirrors.tencent.com/npm/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memfs": { + "version": "3.4.13", + "resolved": "https://mirrors.tencent.com/npm/memfs/-/memfs-3.4.13.tgz", + "integrity": "sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg==", + "requires": { + "fs-monkey": "^1.0.3" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://mirrors.tencent.com/npm/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://mirrors.tencent.com/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://mirrors.tencent.com/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mini-css-extract-plugin": { + "version": "2.7.2", + "resolved": "https://mirrors.tencent.com/npm/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", + "requires": { + "schema-utils": "^4.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + } + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://mirrors.tencent.com/npm/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "mobx": { + "version": "5.15.7", + "resolved": "https://mirrors.tencent.com/npm/mobx/-/mobx-5.15.7.tgz", + "integrity": "sha512-wyM3FghTkhmC+hQjyPGGFdpehrcX1KOXsDuERhfK2YbJemkUhEB+6wzEN639T21onxlfYBmriA1PFnvxTUhcKw==" + }, + "mobx-react": { + "version": "5.4.4", + "resolved": "https://mirrors.tencent.com/npm/mobx-react/-/mobx-react-5.4.4.tgz", + "integrity": "sha512-2mTzpyEjVB/RGk2i6KbcmP4HWcAUFox5ZRCrGvSyz49w20I4C4qql63grPpYrS9E9GKwgydBHQlA4y665LuRCQ==", + "requires": { + "hoist-non-react-statics": "^3.0.0", + "react-lifecycles-compat": "^3.0.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "multicast-dns": { + "version": "7.2.5", + "resolved": "https://mirrors.tencent.com/npm/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "requires": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + } + }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://mirrors.tencent.com/npm/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha1-F7CVgZiJef3a/gIB6TG6kzyWy7Q=" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://mirrors.tencent.com/npm/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "no-case": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "node-forge": { + "version": "1.3.1", + "resolved": "https://mirrors.tencent.com/npm/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" + }, + "node-releases": { + "version": "2.0.10", + "resolved": "https://mirrors.tencent.com/npm/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "requires": { + "boolbase": "~1.0.0" + } + }, + "nwsapi": { + "version": "2.2.2", + "resolved": "https://mirrors.tencent.com/npm/nwsapi/-/nwsapi-2.2.2.tgz", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-hash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://mirrors.tencent.com/npm/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://mirrors.tencent.com/npm/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.6", + "resolved": "https://mirrors.tencent.com/npm/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.fromentries": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.5", + "resolved": "https://mirrors.tencent.com/npm/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.5.tgz", + "integrity": "sha512-yDNzckpM6ntyQiGTik1fKV1DcVDRS+w8bvpWNCBanvH5LfRX9O8WTHqQzG4RZwRAM4I0oU7TV11Lj5v0g20ibw==", + "requires": { + "array.prototype.reduce": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.hasown": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/object.hasown/-/object.hasown-1.1.2.tgz", + "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "requires": { + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.values": { + "version": "1.1.6", + "resolved": "https://mirrors.tencent.com/npm/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://mirrors.tencent.com/npm/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "open": { + "version": "8.4.2", + "resolved": "https://mirrors.tencent.com/npm/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://mirrors.tencent.com/npm/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-retry": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "requires": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "param-case": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://mirrors.tencent.com/npm/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "pascal-case": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + } + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://mirrors.tencent.com/npm/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://mirrors.tencent.com/npm/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pirates": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, + "pkg-up": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "postcss": { + "version": "8.4.21", + "resolved": "https://mirrors.tencent.com/npm/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-attribute-case-insensitive": { + "version": "5.0.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.2.tgz", + "integrity": "sha512-XIidXV8fDr0kKt28vqki84fRK8VW8eTuIa4PChv2MqKuT6C9UjmSKzen6KaWhWEoYvwxFCa7n/tC1SZ3tyq4SQ==", + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-browser-comments": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-browser-comments/-/postcss-browser-comments-4.0.0.tgz", + "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==" + }, + "postcss-calc": { + "version": "8.2.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "requires": { + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-clamp": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-clamp/-/postcss-clamp-4.1.0.tgz", + "integrity": "sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-color-functional-notation": { + "version": "4.2.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-color-functional-notation/-/postcss-color-functional-notation-4.2.4.tgz", + "integrity": "sha512-2yrTAUZUab9s6CpxkxC4rVgFEVaR6/2Pipvi6qcgvnYiVqZcbDHEoBDhrXzyb7Efh2CCfHQNtcqWcIruDTIUeg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-color-hex-alpha": { + "version": "8.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-color-hex-alpha/-/postcss-color-hex-alpha-8.0.4.tgz", + "integrity": "sha512-nLo2DCRC9eE4w2JmuKgVA3fGL3d01kGq752pVALF68qpGLmx2Qrk91QTKkdUqqp45T1K1XV8IhQpcu1hoAQflQ==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-color-rebeccapurple": { + "version": "7.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-7.1.1.tgz", + "integrity": "sha512-pGxkuVEInwLHgkNxUc4sdg4g3py7zUeCQ9sMfwyHAT+Ezk8a4OaaVZ8lIY5+oNqA/BXXgLyXv0+5wHP68R79hg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-colormin": { + "version": "5.3.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", + "requires": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0", + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-convert-values": { + "version": "5.1.3", + "resolved": "https://mirrors.tencent.com/npm/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz", + "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==", + "requires": { + "browserslist": "^4.21.4", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-custom-media": { + "version": "8.0.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-custom-media/-/postcss-custom-media-8.0.2.tgz", + "integrity": "sha512-7yi25vDAoHAkbhAzX9dHx2yc6ntS4jQvejrNcC+csQJAXjj15e7VcWfMgLqBNAbOvqi5uIa9huOVwdHbf+sKqg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-custom-properties": { + "version": "12.1.11", + "resolved": "https://mirrors.tencent.com/npm/postcss-custom-properties/-/postcss-custom-properties-12.1.11.tgz", + "integrity": "sha512-0IDJYhgU8xDv1KY6+VgUwuQkVtmYzRwu+dMjnmdMafXYv86SWqfxkc7qdDvWS38vsjaEtv8e0vGOUQrAiMBLpQ==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-custom-selectors": { + "version": "6.0.3", + "resolved": "https://mirrors.tencent.com/npm/postcss-custom-selectors/-/postcss-custom-selectors-6.0.3.tgz", + "integrity": "sha512-fgVkmyiWDwmD3JbpCmB45SvvlCD6z9CG6Ie6Iere22W5aHea6oWa7EM2bpnv2Fj3I94L3VbtvX9KqwSi5aFzSg==", + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-dir-pseudo-class": { + "version": "6.0.5", + "resolved": "https://mirrors.tencent.com/npm/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-6.0.5.tgz", + "integrity": "sha512-eqn4m70P031PF7ZQIvSgy9RSJ5uI2171O/OO/zcRNYpJbvaeKFUlar1aJ7rmgiQtbm0FSPsRewjpdS0Oew7MPA==", + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-discard-comments": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", + "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==" + }, + "postcss-discard-duplicates": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==" + }, + "postcss-discard-empty": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", + "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==" + }, + "postcss-discard-overridden": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==" + }, + "postcss-double-position-gradients": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-double-position-gradients/-/postcss-double-position-gradients-3.1.2.tgz", + "integrity": "sha512-GX+FuE/uBR6eskOK+4vkXgT6pDkexLokPaz/AbJna9s5Kzp/yl488pKPjhy0obB475ovfT1Wv8ho7U/cHNaRgQ==", + "requires": { + "@csstools/postcss-progressive-custom-properties": "^1.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-env-function": { + "version": "4.0.6", + "resolved": "https://mirrors.tencent.com/npm/postcss-env-function/-/postcss-env-function-4.0.6.tgz", + "integrity": "sha512-kpA6FsLra+NqcFnL81TnsU+Z7orGtDTxcOhl6pwXeEq1yFPpRMkCDpHhrz8CFQDr/Wfm0jLiNQ1OsGGPjlqPwA==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-flexbugs-fixes": { + "version": "5.0.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-5.0.2.tgz", + "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==" + }, + "postcss-focus-visible": { + "version": "6.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-focus-visible/-/postcss-focus-visible-6.0.4.tgz", + "integrity": "sha512-QcKuUU/dgNsstIK6HELFRT5Y3lbrMLEOwG+A4s5cA+fx3A3y/JTq3X9LaOj3OC3ALH0XqyrgQIgey/MIZ8Wczw==", + "requires": { + "postcss-selector-parser": "^6.0.9" + } + }, + "postcss-focus-within": { + "version": "5.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-focus-within/-/postcss-focus-within-5.0.4.tgz", + "integrity": "sha512-vvjDN++C0mu8jz4af5d52CB184ogg/sSxAFS+oUJQq2SuCe7T5U2iIsVJtsCp2d6R4j0jr5+q3rPkBVZkXD9fQ==", + "requires": { + "postcss-selector-parser": "^6.0.9" + } + }, + "postcss-font-variant": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", + "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==" + }, + "postcss-gap-properties": { + "version": "3.0.5", + "resolved": "https://mirrors.tencent.com/npm/postcss-gap-properties/-/postcss-gap-properties-3.0.5.tgz", + "integrity": "sha512-IuE6gKSdoUNcvkGIqdtjtcMtZIFyXZhmFd5RUlg97iVEvp1BZKV5ngsAjCjrVy+14uhGBQl9tzmi1Qwq4kqVOg==" + }, + "postcss-image-set-function": { + "version": "4.0.7", + "resolved": "https://mirrors.tencent.com/npm/postcss-image-set-function/-/postcss-image-set-function-4.0.7.tgz", + "integrity": "sha512-9T2r9rsvYzm5ndsBE8WgtrMlIT7VbtTfE7b3BQnudUqnBcBo7L758oc+o+pdj/dUV0l5wjwSdjeOH2DZtfv8qw==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-import": { + "version": "14.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "requires": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + } + }, + "postcss-initial": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-initial/-/postcss-initial-4.0.1.tgz", + "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==" + }, + "postcss-js": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "requires": { + "camelcase-css": "^2.0.1" + } + }, + "postcss-lab-function": { + "version": "4.2.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-lab-function/-/postcss-lab-function-4.2.1.tgz", + "integrity": "sha512-xuXll4isR03CrQsmxyz92LJB2xX9n+pZJ5jE9JgcnmsCammLyKdlzrBin+25dy6wIjfhJpKBAN80gsTlCgRk2w==", + "requires": { + "@csstools/postcss-progressive-custom-properties": "^1.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-load-config": { + "version": "3.1.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "requires": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + } + }, + "postcss-loader": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-loader/-/postcss-loader-6.2.1.tgz", + "integrity": "sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==", + "requires": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.5", + "semver": "^7.3.5" + } + }, + "postcss-logical": { + "version": "5.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-logical/-/postcss-logical-5.0.4.tgz", + "integrity": "sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==" + }, + "postcss-media-minmax": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz", + "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==" + }, + "postcss-merge-longhand": { + "version": "5.1.7", + "resolved": "https://mirrors.tencent.com/npm/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", + "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==", + "requires": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.1" + } + }, + "postcss-merge-rules": { + "version": "5.1.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", + "requires": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" + } + }, + "postcss-minify-font-values": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-gradients": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz", + "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==", + "requires": { + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-params": { + "version": "5.1.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz", + "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==", + "requires": { + "browserslist": "^4.21.4", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-minify-selectors": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz", + "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==", + "requires": { + "postcss-selector-parser": "^6.0.5" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==" + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-nested": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-nesting": { + "version": "10.2.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-nesting/-/postcss-nesting-10.2.0.tgz", + "integrity": "sha512-EwMkYchxiDiKUhlJGzWsD9b2zvq/r2SSubcRrgP+jujMXFzqvANLt16lJANC+5uZ6hjI7lpRmI6O8JIl+8l1KA==", + "requires": { + "@csstools/selector-specificity": "^2.0.0", + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-normalize": { + "version": "10.0.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize/-/postcss-normalize-10.0.1.tgz", + "integrity": "sha512-+5w18/rDev5mqERcG3W5GZNMJa1eoYYNGo8gB7tEwaos0ajk3ZXAI4mHGcNT47NE+ZnZD1pEpUOFLvltIwmeJA==", + "requires": { + "@csstools/normalize.css": "*", + "postcss-browser-comments": "^4", + "sanitize.css": "*" + } + }, + "postcss-normalize-charset": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==" + }, + "postcss-normalize-display-values": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-positions": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-repeat-style": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-string": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-timing-functions": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-unicode": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz", + "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==", + "requires": { + "browserslist": "^4.21.4", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-url": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", + "requires": { + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-normalize-whitespace": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz", + "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-opacity-percentage": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/postcss-opacity-percentage/-/postcss-opacity-percentage-1.1.3.tgz", + "integrity": "sha512-An6Ba4pHBiDtyVpSLymUUERMo2cU7s+Obz6BTrS+gxkbnSBNKSuD0AVUc+CpBMrpVPKKfoVz0WQCX+Tnst0i4A==" + }, + "postcss-ordered-values": { + "version": "5.1.3", + "resolved": "https://mirrors.tencent.com/npm/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", + "requires": { + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-overflow-shorthand": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-overflow-shorthand/-/postcss-overflow-shorthand-3.0.4.tgz", + "integrity": "sha512-otYl/ylHK8Y9bcBnPLo3foYFLL6a6Ak+3EQBPOTR7luMYCOsiVTUk1iLvNf6tVPNGXcoL9Hoz37kpfriRIFb4A==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-page-break": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/postcss-page-break/-/postcss-page-break-3.0.4.tgz", + "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==" + }, + "postcss-place": { + "version": "7.0.5", + "resolved": "https://mirrors.tencent.com/npm/postcss-place/-/postcss-place-7.0.5.tgz", + "integrity": "sha512-wR8igaZROA6Z4pv0d+bvVrvGY4GVHihBCBQieXFY3kuSuMyOmEnnfFzHl/tQuqHZkfkIVBEbDvYcFfHmpSet9g==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-preset-env": { + "version": "7.8.3", + "resolved": "https://mirrors.tencent.com/npm/postcss-preset-env/-/postcss-preset-env-7.8.3.tgz", + "integrity": "sha512-T1LgRm5uEVFSEF83vHZJV2z19lHg4yJuZ6gXZZkqVsqv63nlr6zabMH3l4Pc01FQCyfWVrh2GaUeCVy9Po+Aag==", + "requires": { + "@csstools/postcss-cascade-layers": "^1.1.1", + "@csstools/postcss-color-function": "^1.1.1", + "@csstools/postcss-font-format-keywords": "^1.0.1", + "@csstools/postcss-hwb-function": "^1.0.2", + "@csstools/postcss-ic-unit": "^1.0.1", + "@csstools/postcss-is-pseudo-class": "^2.0.7", + "@csstools/postcss-nested-calc": "^1.0.0", + "@csstools/postcss-normalize-display-values": "^1.0.1", + "@csstools/postcss-oklab-function": "^1.1.1", + "@csstools/postcss-progressive-custom-properties": "^1.3.0", + "@csstools/postcss-stepped-value-functions": "^1.0.1", + "@csstools/postcss-text-decoration-shorthand": "^1.0.0", + "@csstools/postcss-trigonometric-functions": "^1.0.2", + "@csstools/postcss-unset-value": "^1.0.2", + "autoprefixer": "^10.4.13", + "browserslist": "^4.21.4", + "css-blank-pseudo": "^3.0.3", + "css-has-pseudo": "^3.0.4", + "css-prefers-color-scheme": "^6.0.3", + "cssdb": "^7.1.0", + "postcss-attribute-case-insensitive": "^5.0.2", + "postcss-clamp": "^4.1.0", + "postcss-color-functional-notation": "^4.2.4", + "postcss-color-hex-alpha": "^8.0.4", + "postcss-color-rebeccapurple": "^7.1.1", + "postcss-custom-media": "^8.0.2", + "postcss-custom-properties": "^12.1.10", + "postcss-custom-selectors": "^6.0.3", + "postcss-dir-pseudo-class": "^6.0.5", + "postcss-double-position-gradients": "^3.1.2", + "postcss-env-function": "^4.0.6", + "postcss-focus-visible": "^6.0.4", + "postcss-focus-within": "^5.0.4", + "postcss-font-variant": "^5.0.0", + "postcss-gap-properties": "^3.0.5", + "postcss-image-set-function": "^4.0.7", + "postcss-initial": "^4.0.1", + "postcss-lab-function": "^4.2.1", + "postcss-logical": "^5.0.4", + "postcss-media-minmax": "^5.0.0", + "postcss-nesting": "^10.2.0", + "postcss-opacity-percentage": "^1.1.2", + "postcss-overflow-shorthand": "^3.0.4", + "postcss-page-break": "^3.0.4", + "postcss-place": "^7.0.5", + "postcss-pseudo-class-any-link": "^7.1.6", + "postcss-replace-overflow-wrap": "^4.0.0", + "postcss-selector-not": "^6.0.1", + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-pseudo-class-any-link": { + "version": "7.1.6", + "resolved": "https://mirrors.tencent.com/npm/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-7.1.6.tgz", + "integrity": "sha512-9sCtZkO6f/5ML9WcTLcIyV1yz9D1rf0tWc+ulKcvV30s0iZKS/ONyETvoWsr6vnrmW+X+KmuK3gV/w5EWnT37w==", + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-reduce-initial": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", + "requires": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, + "postcss-replace-overflow-wrap": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz", + "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==" + }, + "postcss-selector-not": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-selector-not/-/postcss-selector-not-6.0.1.tgz", + "integrity": "sha512-1i9affjAe9xu/y9uqWH+tD4r6/hDaXJruk8xn2x1vzxC2U3J3LKO3zJW4CyxlNhA56pADJ/djpEwpH1RClI2rQ==", + "requires": { + "postcss-selector-parser": "^6.0.10" + } + }, + "postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://mirrors.tencent.com/npm/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-svgo": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", + "requires": { + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" + }, + "dependencies": { + "css-select": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://mirrors.tencent.com/npm/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://mirrors.tencent.com/npm/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "requires": { + "boolbase": "^1.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "svgo": { + "version": "2.8.0", + "resolved": "https://mirrors.tencent.com/npm/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + } + } + } + }, + "postcss-unique-selectors": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz", + "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==", + "requires": { + "postcss-selector-parser": "^6.0.5" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://mirrors.tencent.com/npm/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==" + }, + "pretty-error": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-error/-/pretty-error-4.0.0.tgz", + "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==", + "requires": { + "lodash": "^4.17.20", + "renderkid": "^3.0.0" + } + }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://mirrors.tencent.com/npm/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.3.0", + "resolved": "https://mirrors.tencent.com/npm/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "requires": { + "asap": "~2.0.6" + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://mirrors.tencent.com/npm/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://mirrors.tencent.com/npm/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://mirrors.tencent.com/npm/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + } + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://mirrors.tencent.com/npm/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "q": { + "version": "1.5.1", + "resolved": "https://mirrors.tencent.com/npm/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://mirrors.tencent.com/npm/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + }, + "raf": { + "version": "3.4.1", + "resolved": "https://mirrors.tencent.com/npm/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "requires": { + "performance-now": "^2.1.0" + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://mirrors.tencent.com/npm/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + } + } + }, + "react": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-app-polyfill": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/react-app-polyfill/-/react-app-polyfill-3.0.0.tgz", + "integrity": "sha512-sZ41cxiU5llIB003yxxQBYrARBqe0repqPTTYBTmMqTz9szeBbE37BehCE891NZsmdZqqP+xWKdT3eo3vOzN8w==", + "requires": { + "core-js": "^3.19.2", + "object-assign": "^4.1.1", + "promise": "^8.1.0", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.9", + "whatwg-fetch": "^3.6.2" + } + }, + "react-app-rewired": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/react-app-rewired/-/react-app-rewired-2.2.1.tgz", + "integrity": "sha512-uFQWTErXeLDrMzOJHKp0h8P1z0LV9HzPGsJ6adOtGlA/B9WfT6Shh4j2tLTTGlXOfiVx6w6iWpp7SOC5pvk+gA==", + "requires": { + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "react-dev-utils": { + "version": "12.0.1", + "resolved": "https://mirrors.tencent.com/npm/react-dev-utils/-/react-dev-utils-12.0.1.tgz", + "integrity": "sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==", + "requires": { + "@babel/code-frame": "^7.16.0", + "address": "^1.1.2", + "browserslist": "^4.18.1", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.3", + "detect-port-alt": "^1.1.6", + "escape-string-regexp": "^4.0.0", + "filesize": "^8.0.6", + "find-up": "^5.0.0", + "fork-ts-checker-webpack-plugin": "^6.5.0", + "global-modules": "^2.0.0", + "globby": "^11.0.4", + "gzip-size": "^6.0.0", + "immer": "^9.0.7", + "is-root": "^2.1.0", + "loader-utils": "^3.2.0", + "open": "^8.4.0", + "pkg-up": "^3.1.0", + "prompts": "^2.4.2", + "react-error-overlay": "^6.0.11", + "recursive-readdir": "^2.2.2", + "shell-quote": "^1.7.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "loader-utils": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "react-dom": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + } + }, + "react-error-overlay": { + "version": "6.0.11", + "resolved": "https://mirrors.tencent.com/npm/react-error-overlay/-/react-error-overlay-6.0.11.tgz", + "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-redux": { + "version": "8.0.5", + "resolved": "https://mirrors.tencent.com/npm/react-redux/-/react-redux-8.0.5.tgz", + "integrity": "sha512-Q2f6fCKxPFpkXt1qNRZdEDLlScsDWyrgSj0mliK59qU6W5gvBiKkdMEG2lJzhd1rCctf0hb6EtePPLZ2e0m1uw==", + "requires": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "dependencies": { + "react-is": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + } + } + }, + "react-refresh": { + "version": "0.11.0", + "resolved": "https://mirrors.tencent.com/npm/react-refresh/-/react-refresh-0.11.0.tgz", + "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" + }, + "react-scripts": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/react-scripts/-/react-scripts-5.0.1.tgz", + "integrity": "sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==", + "requires": { + "@babel/core": "^7.16.0", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", + "@svgr/webpack": "^5.5.0", + "babel-jest": "^27.4.2", + "babel-loader": "^8.2.3", + "babel-plugin-named-asset-import": "^0.3.8", + "babel-preset-react-app": "^10.0.1", + "bfj": "^7.0.2", + "browserslist": "^4.18.1", + "camelcase": "^6.2.1", + "case-sensitive-paths-webpack-plugin": "^2.4.0", + "css-loader": "^6.5.1", + "css-minimizer-webpack-plugin": "^3.2.0", + "dotenv": "^10.0.0", + "dotenv-expand": "^5.1.0", + "eslint": "^8.3.0", + "eslint-config-react-app": "^7.0.1", + "eslint-webpack-plugin": "^3.1.1", + "file-loader": "^6.2.0", + "fs-extra": "^10.0.0", + "fsevents": "^2.3.2", + "html-webpack-plugin": "^5.5.0", + "identity-obj-proxy": "^3.0.0", + "jest": "^27.4.3", + "jest-resolve": "^27.4.2", + "jest-watch-typeahead": "^1.0.0", + "mini-css-extract-plugin": "^2.4.5", + "postcss": "^8.4.4", + "postcss-flexbugs-fixes": "^5.0.2", + "postcss-loader": "^6.2.1", + "postcss-normalize": "^10.0.1", + "postcss-preset-env": "^7.0.1", + "prompts": "^2.4.2", + "react-app-polyfill": "^3.0.0", + "react-dev-utils": "^12.0.1", + "react-refresh": "^0.11.0", + "resolve": "^1.20.0", + "resolve-url-loader": "^4.0.0", + "sass-loader": "^12.3.0", + "semver": "^7.3.5", + "source-map-loader": "^3.0.0", + "style-loader": "^3.3.1", + "tailwindcss": "^3.0.2", + "terser-webpack-plugin": "^5.2.5", + "webpack": "^5.64.4", + "webpack-dev-server": "^4.6.0", + "webpack-manifest-plugin": "^4.0.2", + "workbox-webpack-plugin": "^6.4.1" + } + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "requires": { + "pify": "^2.3.0" + } + }, + "readable-stream": { + "version": "3.6.1", + "resolved": "https://mirrors.tencent.com/npm/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://mirrors.tencent.com/npm/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "recursive-readdir": { + "version": "2.2.3", + "resolved": "https://mirrors.tencent.com/npm/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "requires": { + "minimatch": "^3.0.5" + } + }, + "redux": { + "version": "4.2.1", + "resolved": "https://mirrors.tencent.com/npm/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "redux-thunk": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/redux-thunk/-/redux-thunk-2.4.2.tgz", + "integrity": "sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q==" + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://mirrors.tencent.com/npm/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" + }, + "regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://mirrors.tencent.com/npm/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + }, + "regenerator-transform": { + "version": "0.15.1", + "resolved": "https://mirrors.tencent.com/npm/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-parser": { + "version": "2.2.11", + "resolved": "https://mirrors.tencent.com/npm/regex-parser/-/regex-parser-2.2.11.tgz", + "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==" + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://mirrors.tencent.com/npm/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" + }, + "regexpu-core": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "requires": { + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + } + }, + "regjsparser": { + "version": "0.9.1", + "resolved": "https://mirrors.tencent.com/npm/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://mirrors.tencent.com/npm/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://mirrors.tencent.com/npm/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + }, + "renderkid": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/renderkid/-/renderkid-3.0.0.tgz", + "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==", + "requires": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "css-select": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://mirrors.tencent.com/npm/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "requires": { + "boolbase": "^1.0.0" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "reselect": { + "version": "4.1.7", + "resolved": "https://mirrors.tencent.com/npm/reselect/-/reselect-4.1.7.tgz", + "integrity": "sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==" + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://mirrors.tencent.com/npm/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "resolve-url-loader": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-url-loader/-/resolve-url-loader-4.0.0.tgz", + "integrity": "sha512-05VEMczVREcbtT7Bz+C+96eUO5HDNvdthIiMB34t7FcF8ehcu4wC0sSgPUubs3XW2Q3CNLJk/BJrCU9wVRymiA==", + "requires": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^7.0.35", + "source-map": "0.6.1" + }, + "dependencies": { + "picocolors": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==" + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://mirrors.tencent.com/npm/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "resolve.exports": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/resolve.exports/-/resolve.exports-1.1.1.tgz", + "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==" + }, + "retry": { + "version": "0.13.1", + "resolved": "https://mirrors.tencent.com/npm/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "2.79.1", + "resolved": "https://mirrors.tencent.com/npm/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "requires": { + "fsevents": "~2.3.2" + } + }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://mirrors.tencent.com/npm/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://mirrors.tencent.com/npm/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sanitize.css": { + "version": "13.0.0", + "resolved": "https://mirrors.tencent.com/npm/sanitize.css/-/sanitize.css-13.0.0.tgz", + "integrity": "sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA==" + }, + "sass-loader": { + "version": "12.6.0", + "resolved": "https://mirrors.tencent.com/npm/sass-loader/-/sass-loader-12.6.0.tgz", + "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", + "requires": { + "klona": "^2.0.4", + "neo-async": "^2.6.2" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "requires": { + "xmlchars": "^2.2.0" + } + }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://mirrors.tencent.com/npm/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + }, + "selfsigned": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/selfsigned/-/selfsigned-2.1.1.tgz", + "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", + "requires": { + "node-forge": "^1" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "send": { + "version": "0.18.0", + "resolved": "https://mirrors.tencent.com/npm/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://mirrors.tencent.com/npm/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://mirrors.tencent.com/npm/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://mirrors.tencent.com/npm/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://mirrors.tencent.com/npm/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "shell-quote": { + "version": "1.8.0", + "resolved": "https://mirrors.tencent.com/npm/shell-quote/-/shell-quote-1.8.0.tgz", + "integrity": "sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "sockjs": { + "version": "0.3.24", + "resolved": "https://mirrors.tencent.com/npm/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "requires": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, + "source-map": { + "version": "0.7.4", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==" + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, + "source-map-loader": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/source-map-loader/-/source-map-loader-3.0.2.tgz", + "integrity": "sha512-BokxPoLjyl3iOrgkWaakaxqnelAJSS+0V+De0kKIq6lyWrXuiPgYTGp6z3iHmqljKAaLXwZa+ctD8GccRJeVvg==", + "requires": { + "abab": "^2.0.5", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.1" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://mirrors.tencent.com/npm/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://mirrors.tencent.com/npm/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, + "spdy": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "stable": { + "version": "0.1.8", + "resolved": "https://mirrors.tencent.com/npm/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + }, + "stack-utils": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + } + } + }, + "stackframe": { + "version": "1.3.4", + "resolved": "https://mirrors.tencent.com/npm/stackframe/-/stackframe-1.3.4.tgz", + "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "requires": { + "internal-slot": "^1.0.4" + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-natural-compare": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/string-natural-compare/-/string-natural-compare-3.0.1.tgz", + "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + } + } + }, + "string.prototype.matchall": { + "version": "4.0.8", + "resolved": "https://mirrors.tencent.com/npm/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", + "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4" + } + }, + "string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-comments": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-comments/-/strip-comments-2.0.1.tgz", + "integrity": "sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==" + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "style-loader": { + "version": "3.3.1", + "resolved": "https://mirrors.tencent.com/npm/style-loader/-/style-loader-3.3.1.tgz", + "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==" + }, + "stylehacks": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/stylehacks/-/stylehacks-5.1.1.tgz", + "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==", + "requires": { + "browserslist": "^4.21.4", + "postcss-selector-parser": "^6.0.4" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "svg-parser": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + } + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://mirrors.tencent.com/npm/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, + "tailwindcss": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/tailwindcss/-/tailwindcss-3.2.7.tgz", + "integrity": "sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==", + "requires": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.1", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.12", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.0.9", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "6.0.0", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.1" + }, + "dependencies": { + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==" + }, + "tempy": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/tempy/-/tempy-0.6.0.tgz", + "integrity": "sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==", + "requires": { + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.16.0", + "unique-string": "^2.0.0" + }, + "dependencies": { + "type-fest": { + "version": "0.16.0", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==" + } + } + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "terser": { + "version": "5.16.5", + "resolved": "https://mirrors.tencent.com/npm/terser/-/terser-5.16.5.tgz", + "integrity": "sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==", + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, + "terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://mirrors.tencent.com/npm/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "requires": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "throat": { + "version": "6.0.2", + "resolved": "https://mirrors.tencent.com/npm/throat/-/throat-6.0.2.tgz", + "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==" + }, + "thunky": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "tough-cookie": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + } + } + }, + "tr46": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "requires": { + "punycode": "^2.1.1" + } + }, + "tryer": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==" + }, + "tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://mirrors.tencent.com/npm/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://mirrors.tencent.com/npm/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://mirrors.tencent.com/npm/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://mirrors.tencent.com/npm/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://mirrors.tencent.com/npm/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==" + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==" + }, + "unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==" + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=" + }, + "upath": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://mirrors.tencent.com/npm/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://mirrors.tencent.com/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://mirrors.tencent.com/npm/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "v8-to-istanbul": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://mirrors.tencent.com/npm/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "requires": { + "makeerror": "1.0.12" + } + }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://mirrors.tencent.com/npm/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://mirrors.tencent.com/npm/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + }, + "webpack": { + "version": "5.75.0", + "resolved": "https://mirrors.tencent.com/npm/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.51", + "resolved": "https://mirrors.tencent.com/npm/@types%2festree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + } + } + }, + "webpack-dev-middleware": { + "version": "5.3.3", + "resolved": "https://mirrors.tencent.com/npm/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", + "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "requires": { + "colorette": "^2.0.10", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + } + } + }, + "webpack-dev-server": { + "version": "4.11.1", + "resolved": "https://mirrors.tencent.com/npm/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", + "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "requires": { + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.1", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.1", + "ws": "^8.4.2" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + }, + "ws": { + "version": "8.12.1", + "resolved": "https://mirrors.tencent.com/npm/ws/-/ws-8.12.1.tgz", + "integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==" + } + } + }, + "webpack-manifest-plugin": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/webpack-manifest-plugin/-/webpack-manifest-plugin-4.1.1.tgz", + "integrity": "sha512-YXUAwxtfKIJIKkhg03MKuiFAD72PlrqCiwdwO4VEXdRO5V0ORCNwaOwAZawPZalCbmH9kBDmXnNeQOw+BIEiow==", + "requires": { + "tapable": "^2.0.0", + "webpack-sources": "^2.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "webpack-sources": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/webpack-sources/-/webpack-sources-2.3.1.tgz", + "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==", + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } + } + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://mirrors.tencent.com/npm/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==" + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://mirrors.tencent.com/npm/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://mirrors.tencent.com/npm/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://mirrors.tencent.com/npm/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "workbox-background-sync": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-background-sync/-/workbox-background-sync-6.5.4.tgz", + "integrity": "sha512-0r4INQZMyPky/lj4Ou98qxcThrETucOde+7mRGJl13MPJugQNKeZQOdIJe/1AchOP23cTqHcN/YVpD6r8E6I8g==", + "requires": { + "idb": "^7.0.1", + "workbox-core": "6.5.4" + } + }, + "workbox-broadcast-update": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-broadcast-update/-/workbox-broadcast-update-6.5.4.tgz", + "integrity": "sha512-I/lBERoH1u3zyBosnpPEtcAVe5lwykx9Yg1k6f8/BGEPGaMMgZrwVrqL1uA9QZ1NGGFoyE6t9i7lBjOlDhFEEw==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-build": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-build/-/workbox-build-6.5.4.tgz", + "integrity": "sha512-kgRevLXEYvUW9WS4XoziYqZ8Q9j/2ziJYEtTrjdz5/L/cTUa2XfyMP2i7c3p34lgqJ03+mTiz13SdFef2POwbA==", + "requires": { + "@apideck/better-ajv-errors": "^0.3.1", + "@babel/core": "^7.11.1", + "@babel/preset-env": "^7.11.0", + "@babel/runtime": "^7.11.2", + "@rollup/plugin-babel": "^5.2.0", + "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-replace": "^2.4.1", + "@surma/rollup-plugin-off-main-thread": "^2.2.3", + "ajv": "^8.6.0", + "common-tags": "^1.8.0", + "fast-json-stable-stringify": "^2.1.0", + "fs-extra": "^9.0.1", + "glob": "^7.1.6", + "lodash": "^4.17.20", + "pretty-bytes": "^5.3.0", + "rollup": "^2.43.1", + "rollup-plugin-terser": "^7.0.0", + "source-map": "^0.8.0-beta.0", + "stringify-object": "^3.3.0", + "strip-comments": "^2.0.1", + "tempy": "^0.6.0", + "upath": "^1.2.0", + "workbox-background-sync": "6.5.4", + "workbox-broadcast-update": "6.5.4", + "workbox-cacheable-response": "6.5.4", + "workbox-core": "6.5.4", + "workbox-expiration": "6.5.4", + "workbox-google-analytics": "6.5.4", + "workbox-navigation-preload": "6.5.4", + "workbox-precaching": "6.5.4", + "workbox-range-requests": "6.5.4", + "workbox-recipes": "6.5.4", + "workbox-routing": "6.5.4", + "workbox-strategies": "6.5.4", + "workbox-streams": "6.5.4", + "workbox-sw": "6.5.4", + "workbox-window": "6.5.4" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "requires": { + "whatwg-url": "^7.0.0" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "requires": { + "punycode": "^2.1.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + } + } + }, + "workbox-cacheable-response": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-cacheable-response/-/workbox-cacheable-response-6.5.4.tgz", + "integrity": "sha512-DCR9uD0Fqj8oB2TSWQEm1hbFs/85hXXoayVwFKLVuIuxwJaihBsLsp4y7J9bvZbqtPJ1KlCkmYVGQKrBU4KAug==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-core": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-core/-/workbox-core-6.5.4.tgz", + "integrity": "sha512-OXYb+m9wZm8GrORlV2vBbE5EC1FKu71GGp0H4rjmxmF4/HLbMCoTFws87M3dFwgpmg0v00K++PImpNQ6J5NQ6Q==" + }, + "workbox-expiration": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-expiration/-/workbox-expiration-6.5.4.tgz", + "integrity": "sha512-jUP5qPOpH1nXtjGGh1fRBa1wJL2QlIb5mGpct3NzepjGG2uFFBn4iiEBiI9GUmfAFR2ApuRhDydjcRmYXddiEQ==", + "requires": { + "idb": "^7.0.1", + "workbox-core": "6.5.4" + } + }, + "workbox-google-analytics": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-google-analytics/-/workbox-google-analytics-6.5.4.tgz", + "integrity": "sha512-8AU1WuaXsD49249Wq0B2zn4a/vvFfHkpcFfqAFHNHwln3jK9QUYmzdkKXGIZl9wyKNP+RRX30vcgcyWMcZ9VAg==", + "requires": { + "workbox-background-sync": "6.5.4", + "workbox-core": "6.5.4", + "workbox-routing": "6.5.4", + "workbox-strategies": "6.5.4" + } + }, + "workbox-navigation-preload": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-navigation-preload/-/workbox-navigation-preload-6.5.4.tgz", + "integrity": "sha512-IIwf80eO3cr8h6XSQJF+Hxj26rg2RPFVUmJLUlM0+A2GzB4HFbQyKkrgD5y2d84g2IbJzP4B4j5dPBRzamHrng==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-precaching": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-precaching/-/workbox-precaching-6.5.4.tgz", + "integrity": "sha512-hSMezMsW6btKnxHB4bFy2Qfwey/8SYdGWvVIKFaUm8vJ4E53JAY+U2JwLTRD8wbLWoP6OVUdFlXsTdKu9yoLTg==", + "requires": { + "workbox-core": "6.5.4", + "workbox-routing": "6.5.4", + "workbox-strategies": "6.5.4" + } + }, + "workbox-range-requests": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-range-requests/-/workbox-range-requests-6.5.4.tgz", + "integrity": "sha512-Je2qR1NXCFC8xVJ/Lux6saH6IrQGhMpDrPXWZWWS8n/RD+WZfKa6dSZwU+/QksfEadJEr/NfY+aP/CXFFK5JFg==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-recipes": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-recipes/-/workbox-recipes-6.5.4.tgz", + "integrity": "sha512-QZNO8Ez708NNwzLNEXTG4QYSKQ1ochzEtRLGaq+mr2PyoEIC1xFW7MrWxrONUxBFOByksds9Z4//lKAX8tHyUA==", + "requires": { + "workbox-cacheable-response": "6.5.4", + "workbox-core": "6.5.4", + "workbox-expiration": "6.5.4", + "workbox-precaching": "6.5.4", + "workbox-routing": "6.5.4", + "workbox-strategies": "6.5.4" + } + }, + "workbox-routing": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-routing/-/workbox-routing-6.5.4.tgz", + "integrity": "sha512-apQswLsbrrOsBUWtr9Lf80F+P1sHnQdYodRo32SjiByYi36IDyL2r7BH1lJtFX8fwNHDa1QOVY74WKLLS6o5Pg==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-strategies": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-strategies/-/workbox-strategies-6.5.4.tgz", + "integrity": "sha512-DEtsxhx0LIYWkJBTQolRxG4EI0setTJkqR4m7r4YpBdxtWJH1Mbg01Cj8ZjNOO8etqfA3IZaOPHUxCs8cBsKLw==", + "requires": { + "workbox-core": "6.5.4" + } + }, + "workbox-streams": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-streams/-/workbox-streams-6.5.4.tgz", + "integrity": "sha512-FXKVh87d2RFXkliAIheBojBELIPnWbQdyDvsH3t74Cwhg0fDheL1T8BqSM86hZvC0ZESLsznSYWw+Va+KVbUzg==", + "requires": { + "workbox-core": "6.5.4", + "workbox-routing": "6.5.4" + } + }, + "workbox-sw": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-sw/-/workbox-sw-6.5.4.tgz", + "integrity": "sha512-vo2RQo7DILVRoH5LjGqw3nphavEjK4Qk+FenXeUsknKn14eCNedHOXWbmnvP4ipKhlE35pvJ4yl4YYf6YsJArA==" + }, + "workbox-webpack-plugin": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-webpack-plugin/-/workbox-webpack-plugin-6.5.4.tgz", + "integrity": "sha512-LmWm/zoaahe0EGmMTrSLUi+BjyR3cdGEfU3fS6PN1zKFYbqAKuQ+Oy/27e4VSXsyIwAw8+QDfk1XHNGtZu9nQg==", + "requires": { + "fast-json-stable-stringify": "^2.1.0", + "pretty-bytes": "^5.4.1", + "upath": "^1.2.0", + "webpack-sources": "^1.4.3", + "workbox-build": "6.5.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://mirrors.tencent.com/npm/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } + } + }, + "workbox-window": { + "version": "6.5.4", + "resolved": "https://mirrors.tencent.com/npm/workbox-window/-/workbox-window-6.5.4.tgz", + "integrity": "sha512-HnLZJDwYBE+hpG25AQBO8RUWBJRaCsI9ksQJEp3aCOFCaG5kqaToAYXFRAHxzRluM2cQbGzdQF5rjKPWPA1fug==", + "requires": { + "@types/trusted-types": "^2.0.2", + "workbox-core": "6.5.4" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.5.9", + "resolved": "https://mirrors.tencent.com/npm/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://mirrors.tencent.com/npm/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://mirrors.tencent.com/npm/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://mirrors.tencent.com/npm/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://mirrors.tencent.com/npm/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://mirrors.tencent.com/npm/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package.json" new file mode 100644 index 000000000..1d261813f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/package.json" @@ -0,0 +1,44 @@ +{ + "name": "04_Learn_Log", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test", + "eject": "react-app-rewired eject" + }, + "dependencies": { + "@babel/core": "^7.21.8", + "@babel/plugin-proposal-decorators": "^7.21.0", + "@babel/preset-env": "^7.21.5", + "@reduxjs/toolkit": "^1.9.3", + "customize-cra": "^1.0.0", + "mobx": "^5.15.7", + "mobx-react": "^5.4.4", + "react": "^18.0.0", + "react-app-rewired": "^2.2.1", + "react-dom": "^18.0.0", + "react-redux": "^8.0.5", + "react-scripts": "^5.0.1", + "redux": "^4.2.1" + }, + "eslintConfig": { + "extends": [ + "react-app" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/public/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/public/index.html" new file mode 100644 index 000000000..a9225fb9e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/03-React/react18/test/public/index.html" @@ -0,0 +1,10 @@ + + + + + react + + +
                + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/05-lodash/lodash.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/05-lodash/lodash.js" index b39ddce69..cb139dd81 100644 --- "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/05-lodash/lodash.js" +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/05-lodash/lodash.js" @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.4'; + var VERSION = '4.17.11'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -143,7 +143,6 @@ /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** @@ -243,8 +242,8 @@ reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', - rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; @@ -277,7 +276,7 @@ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to assign default `context` object properties. */ var contextProps = [ @@ -437,6 +436,14 @@ /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); @@ -451,34 +458,6 @@ /*--------------------------------------------------------------------------*/ - /** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ - function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; - } - - /** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ - function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; - } - /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -2677,7 +2656,7 @@ if (!cloneableTags[tag]) { return object ? value : {}; } - result = initCloneByTag(value, tag, baseClone, isDeep); + result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. @@ -2688,6 +2667,22 @@ } stack.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); @@ -3615,7 +3610,7 @@ } else { var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { @@ -3642,8 +3637,8 @@ * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { @@ -3686,7 +3681,7 @@ if (isArguments(objValue)) { newValue = toPlainObject(objValue); } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } @@ -4551,20 +4546,6 @@ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } - /** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ - function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); - } - /** * Creates a clone of `regexp`. * @@ -4578,20 +4559,6 @@ return result; } - /** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ - function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); - } - /** * Creates a clone of the `symbol` object. * @@ -6186,7 +6153,7 @@ */ function initCloneArray(array) { var length = array.length, - result = array.constructor(length); + result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { @@ -6213,16 +6180,15 @@ * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ - function initCloneByTag(object, tag, cloneFunc, isDeep) { + function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: @@ -6241,7 +6207,7 @@ return cloneTypedArray(object, isDeep); case mapTag: - return cloneMap(object, isDeep, cloneFunc); + return new Ctor; case numberTag: case stringTag: @@ -6251,7 +6217,7 @@ return cloneRegExp(object); case setTag: - return cloneSet(object, isDeep, cloneFunc); + return new Ctor; case symbolTag: return cloneSymbol(object); @@ -6298,10 +6264,13 @@ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { + var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } /** @@ -6635,6 +6604,22 @@ return array; } + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key == '__proto__') { + return; + } + + return object[key]; + } + /** * Sets metadata for `func`. * @@ -6751,11 +6736,11 @@ */ var stringToPath = memoizeCapped(function(string) { var result = []; - if (reLeadingDot.test(string)) { + if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); @@ -10363,9 +10348,11 @@ function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, - result = wait - timeSinceLastCall; + timeWaiting = wait - timeSinceLastCall; - return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; } function shouldInvoke(time) { @@ -12797,9 +12784,35 @@ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ - var defaults = baseRest(function(args) { - args.push(undefined, customDefaultsAssignIn); - return apply(assignInWith, undefined, args); + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; }); /** @@ -13196,6 +13209,11 @@ * // => { '1': 'c', '2': 'b' } */ var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + result[value] = key; }, constant(identity)); @@ -13226,6 +13244,11 @@ * // => { 'group1': ['a', 'c'], 'group2': ['b'] } */ var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + if (hasOwnProperty.call(result, value)) { result[value].push(key); } else { diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.browserslistrc" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.browserslistrc" new file mode 100644 index 000000000..214388fe4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.browserslistrc" @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not dead diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.editorconfig" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.editorconfig" new file mode 100644 index 000000000..7053c49a0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.editorconfig" @@ -0,0 +1,5 @@ +[*.{js,jsx,ts,tsx,vue}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.eslintrc.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.eslintrc.js" new file mode 100644 index 000000000..2c6a7fa5a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.eslintrc.js" @@ -0,0 +1,17 @@ +module.exports = { + root: true, + env: { + node: true + }, + extends: [ + 'plugin:vue/essential', + '@vue/standard' + ], + parserOptions: { + parser: 'babel-eslint' + }, + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.gitignore" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.gitignore" new file mode 100644 index 000000000..11f5d7142 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/.gitignore" @@ -0,0 +1,22 @@ +.DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/README.md" new file mode 100644 index 000000000..188fcfd09 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/README.md" @@ -0,0 +1,24 @@ +# test + +## Project setup +``` +yarn install +``` + +### Compiles and hot-reloads for development +``` +yarn serve +``` + +### Compiles and minifies for production +``` +yarn build +``` + +### Lints and fixes files +``` +yarn lint +``` + +### Customize configuration +See [Configuration Reference](https://cli.vuejs.org/config/). diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/babel.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/babel.config.js" new file mode 100644 index 000000000..e9558405f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/babel.config.js" @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package-lock.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package-lock.json" new file mode 100644 index 000000000..8af00d0b0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package-lock.json" @@ -0,0 +1,12561 @@ +{ + "name": "test", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/compat-data": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.5.tgz", + "integrity": "sha512-mPVoWNzIpYJHbWje0if7Ck36bpbtTvIxOi9+6WSK9wjGEXearAqlwBoTQvVjsAY2VIwgcs8V940geY3okzRCEw==", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "invariant": "^2.2.4", + "semver": "^5.5.0" + } + }, + "@babel/core": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", + "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.5", + "@babel/types": "^7.10.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", + "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", + "dev": true, + "requires": { + "@babel/types": "^7.10.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz", + "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.10.4", + "browserslist": "^4.12.0", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", + "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.10.5", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz", + "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-regex": "^7.10.4", + "regexpu-core": "^4.7.0" + } + }, + "@babel/helper-define-map": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz", + "integrity": "sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==", + "dev": true, + "requires": { + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", + "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", + "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", + "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz", + "integrity": "sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", + "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", + "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", + "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz", + "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helpers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", + "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", + "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz", + "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.10.4", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz", + "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-decorators": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.10.5.tgz", + "integrity": "sha512-Sc5TAQSZuLzgY0664mMDn24Vw2P8g/VhyLyGPaWiHahhgLqeZvcGeyBZOrJW0oSKIK2mvQ22a1ENXBIQLhrEiQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.10.5", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-decorators": "^7.10.4" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz", + "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz", + "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz", + "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz", + "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz", + "integrity": "sha512-6vh4SqRuLLarjgeOf4EaROJAHjvu9Gl+/346PbDH9yWbJyfnJ/ah3jmYKYtswEyCoWZiidvVHjHshd4WgjB9BA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.10.4" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz", + "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.4.tgz", + "integrity": "sha512-ZIhQIEeavTgouyMSdZRap4VPPHqJJ3NEs2cuHs5p0erH+iz6khB0qfgU8g7UuJkG88+fBMy23ZiU+nuHvekJeQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz", + "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz", + "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz", + "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-decorators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.10.4.tgz", + "integrity": "sha512-2NaoC6fAk2VMdhY1eerkfHV+lVYC1u8b+jmRJISqANCJlTxYy19HGdIkkQtix2UtkcPuPu+IlDgrVseZnU03bw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz", + "integrity": "sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz", + "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz", + "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz", + "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.10.4" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz", + "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.5.tgz", + "integrity": "sha512-6Ycw3hjpQti0qssQcA6AMSFDHeNJ++R6dIMnpRqUjFeBBTmTDPa8zgF90OVfTvAo11mXZTlVUViY1g8ffrURLg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz", + "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-define-map": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz", + "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz", + "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz", + "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz", + "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz", + "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz", + "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz", + "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz", + "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz", + "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz", + "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz", + "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz", + "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz", + "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz", + "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.10.4" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz", + "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz", + "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz", + "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz", + "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz", + "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz", + "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.10.5.tgz", + "integrity": "sha512-tV4V/FjElJ9lQtyjr5xD2IFFbgY46r7EeVu5a8CpEKT5laheHKSlFeHjpkPppW3PqzGLAuv5k2qZX5LgVZIX5w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "resolve": "^1.8.1", + "semver": "^5.5.1" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz", + "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.4.tgz", + "integrity": "sha512-1e/51G/Ni+7uH5gktbWv+eCED9pP8ZpRhZB3jOaI3mmzfvJTWHkuyYTv0Z5PYtyM+Tr2Ccr9kUdQxn60fI5WuQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz", + "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-regex": "^7.10.4" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz", + "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz", + "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz", + "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz", + "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/preset-env": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.4.tgz", + "integrity": "sha512-tcmuQ6vupfMZPrLrc38d0sF2OjLT3/bZ0dry5HchNCQbrokoQi4reXqclvkkAT5b+gWc23meVWpve5P/7+w/zw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.10.4", + "@babel/helper-compilation-targets": "^7.10.4", + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-proposal-async-generator-functions": "^7.10.4", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-dynamic-import": "^7.10.4", + "@babel/plugin-proposal-json-strings": "^7.10.4", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", + "@babel/plugin-proposal-numeric-separator": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.10.4", + "@babel/plugin-proposal-optional-catch-binding": "^7.10.4", + "@babel/plugin-proposal-optional-chaining": "^7.10.4", + "@babel/plugin-proposal-private-methods": "^7.10.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.10.4", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.10.4", + "@babel/plugin-transform-arrow-functions": "^7.10.4", + "@babel/plugin-transform-async-to-generator": "^7.10.4", + "@babel/plugin-transform-block-scoped-functions": "^7.10.4", + "@babel/plugin-transform-block-scoping": "^7.10.4", + "@babel/plugin-transform-classes": "^7.10.4", + "@babel/plugin-transform-computed-properties": "^7.10.4", + "@babel/plugin-transform-destructuring": "^7.10.4", + "@babel/plugin-transform-dotall-regex": "^7.10.4", + "@babel/plugin-transform-duplicate-keys": "^7.10.4", + "@babel/plugin-transform-exponentiation-operator": "^7.10.4", + "@babel/plugin-transform-for-of": "^7.10.4", + "@babel/plugin-transform-function-name": "^7.10.4", + "@babel/plugin-transform-literals": "^7.10.4", + "@babel/plugin-transform-member-expression-literals": "^7.10.4", + "@babel/plugin-transform-modules-amd": "^7.10.4", + "@babel/plugin-transform-modules-commonjs": "^7.10.4", + "@babel/plugin-transform-modules-systemjs": "^7.10.4", + "@babel/plugin-transform-modules-umd": "^7.10.4", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4", + "@babel/plugin-transform-new-target": "^7.10.4", + "@babel/plugin-transform-object-super": "^7.10.4", + "@babel/plugin-transform-parameters": "^7.10.4", + "@babel/plugin-transform-property-literals": "^7.10.4", + "@babel/plugin-transform-regenerator": "^7.10.4", + "@babel/plugin-transform-reserved-words": "^7.10.4", + "@babel/plugin-transform-shorthand-properties": "^7.10.4", + "@babel/plugin-transform-spread": "^7.10.4", + "@babel/plugin-transform-sticky-regex": "^7.10.4", + "@babel/plugin-transform-template-literals": "^7.10.4", + "@babel/plugin-transform-typeof-symbol": "^7.10.4", + "@babel/plugin-transform-unicode-escapes": "^7.10.4", + "@babel/plugin-transform-unicode-regex": "^7.10.4", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.10.4", + "browserslist": "^4.12.0", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz", + "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", + "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/types": "^7.10.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@babel/types": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", + "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@hapi/address": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", + "dev": true + }, + "@hapi/bourne": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", + "dev": true + }, + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + }, + "@hapi/joi": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", + "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", + "dev": true, + "requires": { + "@hapi/address": "2.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/topo": "3.x.x" + } + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + } + }, + "@intervolga/optimize-cssnano-plugin": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz", + "integrity": "sha512-zN69TnSr0viRSU6cEDIcuPcP67QcpQ6uHACg58FiN9PDrU6SLyGW3MR4tiISbYxy1kDWAVPwD+XwQTWE5cigAA==", + "dev": true, + "requires": { + "cssnano": "^4.0.0", + "cssnano-preset-default": "^4.0.0", + "postcss": "^7.0.0" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "@soda/friendly-errors-webpack-plugin": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.1.tgz", + "integrity": "sha512-cWKrGaFX+rfbMrAxVv56DzhPNqOJPZuNIS2HGMELtgGzb+vsMzyig9mml5gZ/hr2BGtSLV+dP2LUEuAL8aG2mQ==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "error-stack-parser": "^2.0.0", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "@soda/get-current-script": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@soda/get-current-script/-/get-current-script-1.0.2.tgz", + "integrity": "sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==", + "dev": true + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", + "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", + "dev": true + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/node": { + "version": "14.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", + "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", + "dev": true + }, + "@vue/babel-helper-vue-jsx-merge-props": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz", + "integrity": "sha512-6tyf5Cqm4m6v7buITuwS+jHzPlIPxbFzEhXR5JGZpbrvOcp1hiQKckd305/3C7C36wFekNTQSxAtgeM0j0yoUw==", + "dev": true + }, + "@vue/babel-plugin-transform-vue-jsx": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.1.2.tgz", + "integrity": "sha512-YfdaoSMvD1nj7+DsrwfTvTnhDXI7bsuh+Y5qWwvQXlD24uLgnsoww3qbiZvWf/EoviZMrvqkqN4CBw0W3BWUTQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/plugin-syntax-jsx": "^7.2.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", + "html-tags": "^2.0.0", + "lodash.kebabcase": "^4.1.1", + "svg-tags": "^1.0.0" + } + }, + "@vue/babel-preset-app": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-4.4.6.tgz", + "integrity": "sha512-urIa6Qk3lKacLvscrzxMNyYlTqKFcPAUo5MohOjv1ISZ9PssHw693WTOrqSC0XksdMLtp/rnLvc6l5G8Muk0lw==", + "dev": true, + "requires": { + "@babel/core": "^7.9.6", + "@babel/helper-compilation-targets": "^7.9.6", + "@babel/helper-module-imports": "^7.8.3", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-proposal-decorators": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.9.6", + "@babel/preset-env": "^7.9.6", + "@babel/runtime": "^7.9.6", + "@vue/babel-preset-jsx": "^1.1.2", + "babel-plugin-dynamic-import-node": "^2.3.3", + "core-js": "^3.6.5", + "core-js-compat": "^3.6.5", + "semver": "^6.1.0" + }, + "dependencies": { + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@vue/babel-preset-jsx": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.1.2.tgz", + "integrity": "sha512-zDpVnFpeC9YXmvGIDSsKNdL7qCG2rA3gjywLYHPCKDT10erjxF4U+6ay9X6TW5fl4GsDlJp9bVfAVQAAVzxxvQ==", + "dev": true, + "requires": { + "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", + "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", + "@vue/babel-sugar-functional-vue": "^1.1.2", + "@vue/babel-sugar-inject-h": "^1.1.2", + "@vue/babel-sugar-v-model": "^1.1.2", + "@vue/babel-sugar-v-on": "^1.1.2" + } + }, + "@vue/babel-sugar-functional-vue": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.1.2.tgz", + "integrity": "sha512-YhmdJQSVEFF5ETJXzrMpj0nkCXEa39TvVxJTuVjzvP2rgKhdMmQzlJuMv/HpadhZaRVMCCF3AEjjJcK5q/cYzQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0" + } + }, + "@vue/babel-sugar-inject-h": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.1.2.tgz", + "integrity": "sha512-VRSENdTvD5htpnVp7i7DNuChR5rVMcORdXjvv5HVvpdKHzDZAYiLSD+GhnhxLm3/dMuk8pSzV+k28ECkiN5m8w==", + "dev": true, + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0" + } + }, + "@vue/babel-sugar-v-model": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.1.2.tgz", + "integrity": "sha512-vLXPvNq8vDtt0u9LqFdpGM9W9IWDmCmCyJXuozlq4F4UYVleXJ2Fa+3JsnTZNJcG+pLjjfnEGHci2339Kj5sGg==", + "dev": true, + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", + "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", + "camelcase": "^5.0.0", + "html-tags": "^2.0.0", + "svg-tags": "^1.0.0" + } + }, + "@vue/babel-sugar-v-on": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.1.2.tgz", + "integrity": "sha512-T8ZCwC8Jp2uRtcZ88YwZtZXe7eQrJcfRq0uTFy6ShbwYJyz5qWskRFoVsdTi9o0WEhmQXxhQUewodOSCUPVmsQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0", + "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", + "camelcase": "^5.0.0" + } + }, + "@vue/cli-overlay": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.4.6.tgz", + "integrity": "sha512-fzjg2gWQt+jw5fyLsD9HZNxGNQgZjLDI2s9bLWJwRucdfmncSi9neqA0TZyszGrgcJA4Qu4V5KgV0qwVSBYCaw==", + "dev": true + }, + "@vue/cli-plugin-babel": { + "version": "4.4.6", + "dev": true, + "requires": { + "@babel/core": "^7.9.6", + "@vue/babel-preset-app": "^4.4.6", + "@vue/cli-shared-utils": "^4.4.6", + "babel-loader": "^8.1.0", + "cache-loader": "^4.1.0", + "thread-loader": "^2.1.3", + "webpack": "^4.0.0" + } + }, + "@vue/cli-plugin-eslint": { + "version": "4.4.6", + "dev": true, + "requires": { + "@vue/cli-shared-utils": "^4.4.6", + "eslint-loader": "^2.2.1", + "globby": "^9.2.0", + "inquirer": "^7.1.0", + "webpack": "^4.0.0", + "yorkie": "^2.0.0" + } + }, + "@vue/cli-plugin-pwa": { + "version": "4.4.6", + "dev": true, + "requires": { + "@vue/cli-shared-utils": "^4.4.6", + "webpack": "^4.0.0", + "workbox-webpack-plugin": "^4.3.1" + } + }, + "@vue/cli-plugin-router": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.4.6.tgz", + "integrity": "sha512-TkLdn0ZYo3zgn78Rk8doPlR+4UkGjGW2R1eGEaZEkue/mw2VhUWtTk9cKLZaYrw0eY8Ro/j+OV6mD+scyrairg==", + "dev": true, + "requires": { + "@vue/cli-shared-utils": "^4.4.6" + } + }, + "@vue/cli-plugin-vuex": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.4.6.tgz", + "integrity": "sha512-Ho0YzUivn8BLPqFoFypntR8CMTEXYYHVr0GdnZW99XL+DbGw75f+tJfnrV9UFHDTfvZt7uewKiXDMlrzQ0l3Ug==", + "dev": true + }, + "@vue/cli-service": { + "version": "4.4.6", + "dev": true, + "requires": { + "@intervolga/optimize-cssnano-plugin": "^1.0.5", + "@soda/friendly-errors-webpack-plugin": "^1.7.1", + "@soda/get-current-script": "^1.0.0", + "@vue/cli-overlay": "^4.4.6", + "@vue/cli-plugin-router": "^4.4.6", + "@vue/cli-plugin-vuex": "^4.4.6", + "@vue/cli-shared-utils": "^4.4.6", + "@vue/component-compiler-utils": "^3.1.2", + "@vue/preload-webpack-plugin": "^1.1.0", + "@vue/web-component-wrapper": "^1.2.0", + "acorn": "^7.2.0", + "acorn-walk": "^7.1.1", + "address": "^1.1.2", + "autoprefixer": "^9.8.0", + "browserslist": "^4.12.0", + "cache-loader": "^4.1.0", + "case-sensitive-paths-webpack-plugin": "^2.3.0", + "cli-highlight": "^2.1.4", + "clipboardy": "^2.3.0", + "cliui": "^6.0.0", + "copy-webpack-plugin": "^5.1.1", + "css-loader": "^3.5.3", + "cssnano": "^4.1.10", + "debug": "^4.1.1", + "default-gateway": "^5.0.5", + "dotenv": "^8.2.0", + "dotenv-expand": "^5.1.0", + "file-loader": "^4.2.0", + "fs-extra": "^7.0.1", + "globby": "^9.2.0", + "hash-sum": "^2.0.0", + "html-webpack-plugin": "^3.2.0", + "launch-editor-middleware": "^2.2.1", + "lodash.defaultsdeep": "^4.6.1", + "lodash.mapvalues": "^4.6.0", + "lodash.transform": "^4.6.0", + "mini-css-extract-plugin": "^0.9.0", + "minimist": "^1.2.5", + "pnp-webpack-plugin": "^1.6.4", + "portfinder": "^1.0.26", + "postcss-loader": "^3.0.0", + "ssri": "^7.1.0", + "terser-webpack-plugin": "^2.3.6", + "thread-loader": "^2.1.3", + "url-loader": "^2.2.0", + "vue-loader": "^15.9.2", + "vue-style-loader": "^4.1.2", + "webpack": "^4.0.0", + "webpack-bundle-analyzer": "^3.8.0", + "webpack-chain": "^6.4.0", + "webpack-dev-server": "^3.11.0", + "webpack-merge": "^4.2.2" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@vue/cli-shared-utils": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.4.6.tgz", + "integrity": "sha512-ba+FZZCjiTSu2otnLjY4qXqASe7ZIQ/QBljk5oRPgqrR0p1NUkDPUcZhqa041aOaSW1yAfSfhOD7Q84nMnWhzQ==", + "dev": true, + "requires": { + "@hapi/joi": "^15.0.1", + "chalk": "^2.4.2", + "execa": "^1.0.0", + "launch-editor": "^2.2.1", + "lru-cache": "^5.1.1", + "node-ipc": "^9.1.1", + "open": "^6.3.0", + "ora": "^3.4.0", + "read-pkg": "^5.1.1", + "request": "^2.88.2", + "semver": "^6.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "@vue/component-compiler-utils": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.1.2.tgz", + "integrity": "sha512-QLq9z8m79mCinpaEeSURhnNCN6djxpHw0lpP/bodMlt5kALfONpryMthvnrQOlTcIKoF+VoPi+lPHUYeDFPXug==", + "dev": true, + "requires": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.14", + "postcss-selector-parser": "^6.0.2", + "prettier": "^1.18.2", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "dependencies": { + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", + "dev": true + } + } + }, + "@vue/eslint-config-standard": { + "version": "5.1.2", + "dev": true, + "requires": { + "eslint-config-standard": "^14.1.0", + "eslint-import-resolver-node": "^0.3.3", + "eslint-import-resolver-webpack": "^0.12.1" + } + }, + "@vue/preload-webpack-plugin": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.1.tgz", + "integrity": "sha512-8VCoJeeH8tCkzhkpfOkt+abALQkS11OIHhte5MBzYaKMTqK0A3ZAKEUVAffsOklhEv7t0yrQt696Opnu9oAx+w==", + "dev": true + }, + "@vue/web-component-wrapper": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.2.0.tgz", + "integrity": "sha512-Xn/+vdm9CjuC9p3Ae+lTClNutrVhsXpzxvoTXXtoys6kVRX9FkueSUAqSWAyZntmVLlR4DosBV4pH8y5Z/HbUw==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true + }, + "address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true + }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, + "ajv": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz", + "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==", + "dev": true + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "arch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.2.tgz", + "integrity": "sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "array-includes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-foreach": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "9.8.5", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.5.tgz", + "integrity": "sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg==", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001097", + "colorette": "^1.2.0", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", + "dev": true + }, + "babel-eslint": { + "version": "10.1.0", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + } + }, + "babel-extract-comments": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz", + "integrity": "sha512-qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ==", + "dev": true, + "requires": { + "babylon": "^6.18.0" + } + }, + "babel-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", + "dev": true, + "requires": { + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bfj": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.2.tgz", + "integrity": "sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "check-types": "^8.0.3", + "hoopy": "^0.1.4", + "tryer": "^1.0.1" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + } + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "browserify-sign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", + "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.2", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz", + "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001093", + "electron-to-chromium": "^1.3.488", + "escalade": "^3.0.1", + "node-releases": "^1.1.58" + } + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-json/-/buffer-json-2.0.0.tgz", + "integrity": "sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cache-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-4.1.0.tgz", + "integrity": "sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==", + "dev": true, + "requires": { + "buffer-json": "^2.0.0", + "find-cache-dir": "^3.0.0", + "loader-utils": "^1.2.3", + "mkdirp": "^0.5.1", + "neo-async": "^2.6.1", + "schema-utils": "^2.0.0" + }, + "dependencies": { + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001104", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001104.tgz", + "integrity": "sha512-pkpCg7dmI/a7WcqM2yfdOiT4Xx5tzyoHAXWsX5/HxZ3TemwDZs0QXdqbE0UPLPVy/7BeK7693YfzfRYfu1YVpg==", + "dev": true + }, + "case-sensitive-paths-webpack-plugin": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz", + "integrity": "sha512-/4YgnZS8y1UXXmC02xD5rRrBEu6T5ub+mQHLNRj0fzTRbgdBYhsNo2V5EqwgqrExjxsjtF/OpAKAMkKsxbD5XQ==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-types": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-8.0.3.tgz", + "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-highlight": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.4.tgz", + "integrity": "sha512-s7Zofobm20qriqDoU9sXptQx0t2R9PEgac92mENNm7xaEe1hn71IIMsXMK+6encA6WRCWWxIGQbipr3q998tlQ==", + "dev": true, + "requires": { + "chalk": "^3.0.0", + "highlight.js": "^9.6.0", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^5.1.1", + "yargs": "^15.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "cli-spinners": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.4.0.tgz", + "integrity": "sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==", + "dev": true + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "clipboardy": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz", + "integrity": "sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==", + "dev": true, + "requires": { + "arch": "^2.1.1", + "execa": "^1.0.0", + "is-wsl": "^2.1.1" + }, + "dependencies": { + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + } + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", + "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + }, + "dependencies": { + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "common-tags": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", + "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", + "dev": true + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "consolidate": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", + "dev": true, + "requires": { + "bluebird": "^3.1.1" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz", + "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==", + "dev": true, + "requires": { + "cacache": "^12.0.3", + "find-cache-dir": "^2.1.0", + "glob-parent": "^3.1.0", + "globby": "^7.1.1", + "is-glob": "^4.0.1", + "loader-utils": "^1.2.3", + "minimatch": "^3.0.4", + "normalize-path": "^3.0.0", + "p-limit": "^2.2.1", + "schema-utils": "^1.0.0", + "serialize-javascript": "^2.1.2", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } + } + }, + "core-js-compat": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", + "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "dev": true, + "requires": { + "browserslist": "^4.8.5", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "dependencies": { + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-declaration-sorter": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", + "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", + "dev": true, + "requires": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + } + }, + "css-loader": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.6.0.tgz", + "integrity": "sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.32", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.2.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^2.7.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", + "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "cssnano": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", + "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.7", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "cssnano-preset-default": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", + "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", + "dev": true, + "requires": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.2", + "postcss-unique-selectors": "^4.0.1" + } + }, + "cssnano-util-get-arguments": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", + "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", + "dev": true + }, + "cssnano-util-get-match": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", + "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", + "dev": true + }, + "cssnano-util-raw-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", + "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "cssnano-util-same-parent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", + "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", + "dev": true + }, + "csso": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", + "dev": true, + "requires": { + "css-tree": "1.0.0-alpha.39" + }, + "dependencies": { + "css-tree": { + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", + "dev": true, + "requires": { + "mdn-data": "2.0.6", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", + "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", + "dev": true + }, + "default-gateway": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-5.0.5.tgz", + "integrity": "sha512-z2RnruVmj8hVMmAnEJMTIJNijhKCDiGjbLP+BHJFOT7ld3Bo5qcIBpVYDniqhbMIIf+jZDlkP2MkPXiQy/DBLA==", + "dev": true, + "requires": { + "execa": "^3.3.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", + "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-node": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "requires": { + "utila": "~0.4" + } + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-prop": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + }, + "dependencies": { + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + } + } + }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true + }, + "dotenv-expand": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", + "dev": true + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "easy-stack": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.0.tgz", + "integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.501", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.501.tgz", + "integrity": "sha512-tyzuKaV2POw2mtqBBzQGNBojMZzH0MRu8bT8T/50x+hWeucyG/9pkgAATy+PcM2ySNM9+8eG2VllY9c6j4i+bg==", + "dev": true + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.2.0", + "tapable": "^0.1.8" + }, + "dependencies": { + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true + } + } + }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-stack-parser": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "dev": true, + "requires": { + "stackframe": "^1.1.1" + } + }, + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.8.0", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "eslint-config-standard": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", + "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + } + }, + "eslint-import-resolver-webpack": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.12.2.tgz", + "integrity": "sha512-7Jnm4YAoNNkvqPaZkKdIHsKGmv8/uNnYC5QsXkiSodvX4XEEfH2AKOna98FK52fCDXm3q4HzuX+7pRMKkJ64EQ==", + "dev": true, + "requires": { + "array-find": "^1.0.0", + "debug": "^2.6.9", + "enhanced-resolve": "^0.9.1", + "find-root": "^1.1.0", + "has": "^1.0.3", + "interpret": "^1.2.0", + "lodash": "^4.17.15", + "node-libs-browser": "^1.0.0 || ^2.0.0", + "resolve": "^1.13.1", + "semver": "^5.7.1" + } + }, + "eslint-loader": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-2.2.1.tgz", + "integrity": "sha512-RLgV9hoCVsMLvOxCuNjdqOrUqIj9oJg8hF44vzJaYqsAHuY9G2YAeN3joQ9nxP0p5Th9iFSIpKo+SD8KISxXRg==", + "dev": true, + "requires": { + "loader-fs-cache": "^1.0.0", + "loader-utils": "^1.0.2", + "object-assign": "^4.0.1", + "object-hash": "^1.1.4", + "rimraf": "^2.6.1" + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.22.0", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.3", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + } + }, + "eslint-plugin-node": { + "version": "11.1.0", + "dev": true, + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "dev": true + }, + "eslint-plugin-standard": { + "version": "4.0.1", + "dev": true + }, + "eslint-plugin-vue": { + "version": "6.2.2", + "dev": true, + "requires": { + "natural-compare": "^1.4.0", + "semver": "^5.6.0", + "vue-eslint-parser": "^7.0.0" + } + }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-pubsub": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz", + "integrity": "sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true + }, + "events": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", + "dev": true + }, + "eventsource": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", + "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", + "dev": true, + "requires": { + "original": "^1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.3.0.tgz", + "integrity": "sha512-aKrYPYjF1yG3oX0kWRrqrSMfgftm7oJW5M+m4owoldH5C51C0RkIwB++JbRvEW3IU6/ZG5n8UvEcdgwOt2UOWA==", + "dev": true, + "requires": { + "loader-utils": "^1.2.3", + "schema-utils": "^2.5.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "follow-redirects": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", + "integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "globule": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^4.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "hash-sum": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", + "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hex-color-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", + "dev": true + }, + "highlight.js": { + "version": "9.18.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", + "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "hsl-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", + "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", + "dev": true + }, + "hsla-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", + "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", + "dev": true + }, + "html-entities": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz", + "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==", + "dev": true + }, + "html-minifier": { + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", + "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.2.x", + "commander": "2.17.x", + "he": "1.2.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.4.x" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + } + } + }, + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", + "dev": true + }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + } + } + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "dev": true, + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "dev": true, + "requires": { + "postcss": "^7.0.14" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", + "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", + "dev": true, + "requires": { + "import-from": "^2.1.0" + } + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "import-from": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", + "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "in-publish": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "inquirer": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz", + "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.16", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "dev": true, + "requires": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + }, + "dependencies": { + "default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "ip-regex": "^2.1.0" + } + } + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-color-stop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", + "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "dev": true, + "requires": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-docker": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz", + "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + } + }, + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-svg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", + "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "javascript-stringify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.0.1.tgz", + "integrity": "sha512-yV+gqbd5vaOYjqlbk16EG89xB5udgjqQF3C5FAORDg4f/IS1Yc5ERCv5e/57yBcfJYw05V5JyIXabhwb75Xxow==", + "dev": true + }, + "jest-worker": { + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.5.0.tgz", + "integrity": "sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "js-base64": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.3.tgz", + "integrity": "sha512-fiUvdfCaAXoQTHdKMgTvg6IkecXDcVz6V5rlftUTclF9IKBjMizvSdQaCl/z/6TApDeby5NL+axYou3i0mu1Pg==", + "dev": true + }, + "js-message": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz", + "integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=", + "dev": true + }, + "js-queue": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.0.tgz", + "integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=", + "dev": true, + "requires": { + "easy-stack": "^1.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "launch-editor": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.2.1.tgz", + "integrity": "sha512-On+V7K2uZK6wK7x691ycSUbLD/FyKKelArkbaAMSSJU8JmqmhwN2+mnJDNINuJWSrh2L0kDk+ZQtbC/gOWUwLw==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "shell-quote": "^1.6.1" + } + }, + "launch-editor-middleware": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/launch-editor-middleware/-/launch-editor-middleware-2.2.1.tgz", + "integrity": "sha512-s0UO2/gEGiCgei3/2UN3SMuUj1phjQN8lcpnvgLSz26fAzNWPQ6Nf/kF5IFClnfU2ehp6LrmKdMU/beveO+2jg==", + "dev": true, + "requires": { + "launch-editor": "^2.2.1" + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "loader-fs-cache": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz", + "integrity": "sha512-ldcgZpjNJj71n+2Mf6yetz+c9bM4xpKtNds4LbqXzU/PTdeAX0g3ytnU1AJMEcTk2Lex4Smpe3Q/eCTsvUBxbA==", + "dev": true, + "requires": { + "find-cache-dir": "^0.1.1", + "mkdirp": "^0.5.1" + }, + "dependencies": { + "find-cache-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", + "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } + } + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.defaultsdeep": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz", + "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.transform": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz", + "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "loglevel": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz", + "integrity": "sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "mime": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==", + "dev": true + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mini-css-extract-plugin": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz", + "integrity": "sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "normalize-url": "1.9.1", + "schema-utils": "^1.0.0", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.3.tgz", + "integrity": "sha512-cFOknTvng5vqnwOpDsZTWhNll6Jf8o2x+/diplafmxpuIymAjzoOolZG0VvQf3V2HgqzJNhnuKHYp2BqDgz8IQ==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-forge": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "dev": true + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "node-ipc": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.1.tgz", + "integrity": "sha512-FAyICv0sIRJxVp3GW5fzgaf9jwwRQxAKDJlmNFUL5hOy+W4X/I5AypyHoq0DXXbo9o/gt79gj++4cMr4jVWE/w==", + "dev": true, + "requires": { + "event-pubsub": "4.3.0", + "js-message": "1.0.5", + "js-queue": "2.0.0" + } + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "node-releases": { + "version": "1.1.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz", + "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw==", + "dev": true + }, + "node-sass": { + "version": "4.14.1", + "dev": true, + "requires": { + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash": "^4.17.15", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.13.2", + "node-gyp": "^3.8.0", + "npmlog": "^4.0.0", + "request": "^2.88.0", + "sass-graph": "2.2.5", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, + "object-is": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", + "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "open": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "opener": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "dev": true + }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "ora": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-spinners": "^2.0.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^5.2.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, + "requires": { + "url-parse": "^1.4.3" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-asn1": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "parse5-htmlparser2-tree-adapter": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-5.1.1.tgz", + "integrity": "sha512-CF+TKjXqoqyDwHqBhFQ+3l5t83xYi6fVT1tQNg+Ye0JRLnTxWvIroCjEp1A0k4lneHNBGnICUf0cfYVYGEazqw==", + "dev": true, + "requires": { + "parse5": "^5.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + } + } + }, + "pnp-webpack-plugin": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", + "integrity": "sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==", + "dev": true, + "requires": { + "ts-pnp": "^1.1.6" + } + }, + "portfinder": { + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", + "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.1" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "7.0.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", + "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-calc": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz", + "integrity": "sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ==", + "dev": true, + "requires": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + } + }, + "postcss-colormin": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", + "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-convert-values": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", + "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-discard-comments": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", + "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-duplicates": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", + "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-empty": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", + "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-overridden": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", + "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-load-config": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz", + "integrity": "sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "import-cwd": "^2.0.0" + } + }, + "postcss-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", + "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^7.0.0", + "postcss-load-config": "^2.0.0", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "postcss-merge-longhand": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", + "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", + "dev": true, + "requires": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-merge-rules": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", + "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-minify-font-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", + "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-gradients": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", + "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-params": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", + "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-selectors": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", + "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "dev": true, + "requires": { + "postcss": "^7.0.5" + } + }, + "postcss-modules-local-by-default": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz", + "integrity": "sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==", + "dev": true, + "requires": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.16", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.0" + } + }, + "postcss-modules-scope": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", + "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", + "dev": true, + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + } + }, + "postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "dev": true, + "requires": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, + "postcss-normalize-charset": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", + "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-normalize-display-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", + "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-positions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", + "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-repeat-style": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", + "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-string": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", + "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", + "dev": true, + "requires": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-timing-functions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", + "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-unicode": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", + "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", + "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-whitespace": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", + "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-ordered-values": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", + "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-reduce-initial": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", + "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", + "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", + "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", + "dev": true, + "requires": { + "is-svg": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-unique-selectors": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", + "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true, + "optional": true + }, + "pretty-bytes": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz", + "integrity": "sha512-hjGrh+P926p4R4WbaB6OckyRtO0F0/lQBiT+0gnxjV+5kjPBrfVBFCsCLbMqVQeydvIoouYTCmmEURiH3R1Bdg==", + "dev": true + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", + "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, + "dependencies": { + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + } + } + }, + "regenerate": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", + "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "regexpu-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "register-service-worker": { + "version": "1.7.1" + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.3.tgz", + "integrity": "sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA==", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "^0.2", + "htmlparser2": "^3.3.0", + "strip-ansi": "^3.0.0", + "utila": "^0.4.0" + }, + "dependencies": { + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "dev": true + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, + "rgb-regex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", + "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", + "dev": true + }, + "rgba-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", + "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz", + "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass-graph": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^13.3.2" + } + }, + "sass-loader": { + "version": "8.0.2", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "loader-utils": "^1.2.3", + "neo-async": "^2.6.1", + "schema-utils": "^2.6.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + } + }, + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "dev": true, + "requires": { + "js-base64": "^2.1.8", + "source-map": "^0.4.2" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "dev": true, + "requires": { + "node-forge": "0.9.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", + "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sockjs": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", + "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.4.0", + "websocket-driver": "0.6.5" + } + }, + "sockjs-client": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", + "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "dev": true, + "requires": { + "debug": "^3.2.5", + "eventsource": "^1.0.7", + "faye-websocket": "~0.11.1", + "inherits": "^2.0.3", + "json3": "^3.3.2", + "url-parse": "^1.4.3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", + "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "minipass": "^3.1.1" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "stackframe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", + "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stdout-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-comments": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-1.0.2.tgz", + "integrity": "sha512-kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw==", + "dev": true, + "requires": { + "babel-extract-comments": "^1.0.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "stylehacks": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", + "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + } + } + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } + }, + "terser-webpack-plugin": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.7.tgz", + "integrity": "sha512-xzYyaHUNhzgaAdBsXxk2Yvo/x1NJdslUaussK3fdpBbvttm1iIwU+c26dj9UxJcwk2c5UWt5F55MUTIA8BE7Dg==", + "dev": true, + "requires": { + "cacache": "^13.0.1", + "find-cache-dir": "^3.3.1", + "jest-worker": "^25.4.0", + "p-limit": "^2.3.0", + "schema-utils": "^2.6.6", + "serialize-javascript": "^3.1.0", + "source-map": "^0.6.1", + "terser": "^4.6.12", + "webpack-sources": "^1.4.3" + }, + "dependencies": { + "cacache": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", + "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", + "dev": true, + "requires": { + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "p-map": "^3.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^2.7.1", + "ssri": "^7.0.0", + "unique-filename": "^1.1.1" + } + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, + "thread-loader": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.3.tgz", + "integrity": "sha512-wNrVKH2Lcf8ZrWxDF/khdlLlsTMczdcwPA9VEK4c2exlEPynYWxi9op3nPTo5lAnDIkE0rQEB3VBP+4Zncc9Hg==", + "dev": true, + "requires": { + "loader-runner": "^2.3.1", + "loader-utils": "^1.1.0", + "neo-async": "^2.6.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "true-case-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", + "dev": true, + "requires": { + "glob": "^7.1.2" + } + }, + "tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true + }, + "ts-pnp": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz", + "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==", + "dev": true + }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", + "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", + "dev": true, + "requires": { + "commander": "~2.19.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + } + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-loader": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-2.3.0.tgz", + "integrity": "sha512-goSdg8VY+7nPZKUEChZSEtW5gjbS66USIGCeSJ1OVOJ7Yfuh/36YxCwMi5HVEJh6mqUYOoy3NJ0vlOMrWsSHog==", + "dev": true, + "requires": { + "loader-utils": "^1.2.3", + "mime": "^2.4.4", + "schema-utils": "^2.5.0" + } + }, + "url-parse": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", + "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "vue": { + "version": "2.6.11" + }, + "vue-eslint-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz", + "integrity": "sha512-Kr21uPfthDc63nDl27AGQEhtt9VrZ9nkYk/NTftJ2ws9XiJwzJJCnCr3AITQ2jpRMA0XPGDECxYH8E027qMK9Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-scope": "^5.0.0", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.2.1", + "esquery": "^1.0.1", + "lodash": "^4.17.15" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "vue-hot-reload-api": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", + "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", + "dev": true + }, + "vue-loader": { + "version": "15.9.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.3.tgz", + "integrity": "sha512-Y67VnGGgVLH5Voostx8JBZgPQTlDQeOVBLOEsjc2cXbCYBKexSKEpOA56x0YZofoDOTszrLnIShyOX1p9uCEHA==", + "dev": true, + "requires": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + }, + "dependencies": { + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", + "dev": true + } + } + }, + "vue-router": { + "version": "3.3.4" + }, + "vue-style-loader": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", + "integrity": "sha512-0ip8ge6Gzz/Bk0iHovU9XAUQaFt/G2B61bnWa2tCcqqdgfHs1lF9xXorFbE55Gmy92okFT+8bfmySuUOu13vxQ==", + "dev": true, + "requires": { + "hash-sum": "^1.0.2", + "loader-utils": "^1.0.2" + }, + "dependencies": { + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", + "dev": true + } + } + }, + "vue-template-compiler": { + "version": "2.6.11", + "dev": true, + "requires": { + "de-indent": "^1.0.2", + "he": "^1.1.0" + } + }, + "vue-template-es2015-compiler": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", + "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", + "dev": true + }, + "vuex": { + "version": "3.5.1" + }, + "watchpack": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", + "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", + "dev": true, + "requires": { + "chokidar": "^3.4.0", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true, + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.1.tgz", + "integrity": "sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "optional": true + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "watchpack-chokidar2": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz", + "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webpack": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", + "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.6.1", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "dev": true + }, + "enhanced-resolve": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", + "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "terser-webpack-plugin": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz", + "integrity": "sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^3.1.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } + } + } + }, + "webpack-bundle-analyzer": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.8.0.tgz", + "integrity": "sha512-PODQhAYVEourCcOuU+NiYI7WdR8QyELZGgPvB1y2tjbUpbmcQOt5Q7jEK+ttd5se0KSBKD9SXHCEozS++Wllmw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1", + "bfj": "^6.1.1", + "chalk": "^2.4.1", + "commander": "^2.18.0", + "ejs": "^2.6.1", + "express": "^4.16.3", + "filesize": "^3.6.1", + "gzip-size": "^5.0.0", + "lodash": "^4.17.15", + "mkdirp": "^0.5.1", + "opener": "^1.5.1", + "ws": "^6.0.0" + } + }, + "webpack-chain": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-6.5.0.tgz", + "integrity": "sha512-K4EHiEg4WlP4w1rKXKpYWvX9cfGBERHCGP06ETSNV62XUIfOUg1DDRQpxyBsFYxZLKc4YUAI3iiCIvWoliheGA==", + "dev": true, + "requires": { + "deepmerge": "^1.5.2", + "javascript-stringify": "^2.0.1" + } + }, + "webpack-dev-middleware": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", + "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", + "dev": true, + "requires": { + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + } + }, + "webpack-dev-server": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", + "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.7", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "0.3.20", + "sockjs-client": "1.4.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", + "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, + "requires": { + "ansi-colors": "^3.0.0", + "uuid": "^3.3.2" + } + }, + "webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "dev": true, + "requires": { + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "workbox-background-sync": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-4.3.1.tgz", + "integrity": "sha512-1uFkvU8JXi7L7fCHVBEEnc3asPpiAL33kO495UMcD5+arew9IbKW2rV5lpzhoWcm/qhGB89YfO4PmB/0hQwPRg==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-broadcast-update": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-4.3.1.tgz", + "integrity": "sha512-MTSfgzIljpKLTBPROo4IpKjESD86pPFlZwlvVG32Kb70hW+aob4Jxpblud8EhNb1/L5m43DUM4q7C+W6eQMMbA==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-build": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-4.3.1.tgz", + "integrity": "sha512-UHdwrN3FrDvicM3AqJS/J07X0KXj67R8Cg0waq1MKEOqzo89ap6zh6LmaLnRAjpB+bDIz+7OlPye9iii9KBnxw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.4", + "@hapi/joi": "^15.0.0", + "common-tags": "^1.8.0", + "fs-extra": "^4.0.2", + "glob": "^7.1.3", + "lodash.template": "^4.4.0", + "pretty-bytes": "^5.1.0", + "stringify-object": "^3.3.0", + "strip-comments": "^1.0.2", + "workbox-background-sync": "^4.3.1", + "workbox-broadcast-update": "^4.3.1", + "workbox-cacheable-response": "^4.3.1", + "workbox-core": "^4.3.1", + "workbox-expiration": "^4.3.1", + "workbox-google-analytics": "^4.3.1", + "workbox-navigation-preload": "^4.3.1", + "workbox-precaching": "^4.3.1", + "workbox-range-requests": "^4.3.1", + "workbox-routing": "^4.3.1", + "workbox-strategies": "^4.3.1", + "workbox-streams": "^4.3.1", + "workbox-sw": "^4.3.1", + "workbox-window": "^4.3.1" + }, + "dependencies": { + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "workbox-cacheable-response": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-4.3.1.tgz", + "integrity": "sha512-Rp5qlzm6z8IOvnQNkCdO9qrDgDpoPNguovs0H8C+wswLuPgSzSp9p2afb5maUt9R1uTIwOXrVQMmPfPypv+npw==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-core": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-4.3.1.tgz", + "integrity": "sha512-I3C9jlLmMKPxAC1t0ExCq+QoAMd0vAAHULEgRZ7kieCdUd919n53WC0AfvokHNwqRhGn+tIIj7vcb5duCjs2Kg==", + "dev": true + }, + "workbox-expiration": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-4.3.1.tgz", + "integrity": "sha512-vsJLhgQsQouv9m0rpbXubT5jw0jMQdjpkum0uT+d9tTwhXcEZks7qLfQ9dGSaufTD2eimxbUOJfWLbNQpIDMPw==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-google-analytics": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-4.3.1.tgz", + "integrity": "sha512-xzCjAoKuOb55CBSwQrbyWBKqp35yg1vw9ohIlU2wTy06ZrYfJ8rKochb1MSGlnoBfXGWss3UPzxR5QL5guIFdg==", + "dev": true, + "requires": { + "workbox-background-sync": "^4.3.1", + "workbox-core": "^4.3.1", + "workbox-routing": "^4.3.1", + "workbox-strategies": "^4.3.1" + } + }, + "workbox-navigation-preload": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-4.3.1.tgz", + "integrity": "sha512-K076n3oFHYp16/C+F8CwrRqD25GitA6Rkd6+qAmLmMv1QHPI2jfDwYqrytOfKfYq42bYtW8Pr21ejZX7GvALOw==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-precaching": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-4.3.1.tgz", + "integrity": "sha512-piSg/2csPoIi/vPpp48t1q5JLYjMkmg5gsXBQkh/QYapCdVwwmKlU9mHdmy52KsDGIjVaqEUMFvEzn2LRaigqQ==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-range-requests": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-4.3.1.tgz", + "integrity": "sha512-S+HhL9+iTFypJZ/yQSl/x2Bf5pWnbXdd3j57xnb0V60FW1LVn9LRZkPtneODklzYuFZv7qK6riZ5BNyc0R0jZA==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-routing": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-4.3.1.tgz", + "integrity": "sha512-FkbtrODA4Imsi0p7TW9u9MXuQ5P4pVs1sWHK4dJMMChVROsbEltuE79fBoIk/BCztvOJ7yUpErMKa4z3uQLX+g==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-strategies": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-4.3.1.tgz", + "integrity": "sha512-F/+E57BmVG8dX6dCCopBlkDvvhg/zj6VDs0PigYwSN23L8hseSRwljrceU2WzTvk/+BSYICsWmRq5qHS2UYzhw==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-streams": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-4.3.1.tgz", + "integrity": "sha512-4Kisis1f/y0ihf4l3u/+ndMkJkIT4/6UOacU3A4BwZSAC9pQ9vSvJpIi/WFGQRH/uPXvuVjF5c2RfIPQFSS2uA==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "workbox-sw": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-4.3.1.tgz", + "integrity": "sha512-0jXdusCL2uC5gM3yYFT6QMBzKfBr2XTk0g5TPAV4y8IZDyVNDyj1a8uSXy3/XrvkVTmQvLN4O5k3JawGReXr9w==", + "dev": true + }, + "workbox-webpack-plugin": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-4.3.1.tgz", + "integrity": "sha512-gJ9jd8Mb8wHLbRz9ZvGN57IAmknOipD3W4XNE/Lk/4lqs5Htw4WOQgakQy/o/4CoXQlMCYldaqUg+EJ35l9MEQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.0.0", + "json-stable-stringify": "^1.0.1", + "workbox-build": "^4.3.1" + } + }, + "workbox-window": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-4.3.1.tgz", + "integrity": "sha512-C5gWKh6I58w3GeSc0wp2Ne+rqVw8qwcmZnQGpjiek8A2wpbxSJb1FdCoQVO+jDJs35bFgo/WETgl1fqgsxN0Hg==", + "dev": true, + "requires": { + "workbox-core": "^4.3.1" + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yorkie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yorkie/-/yorkie-2.0.0.tgz", + "integrity": "sha512-jcKpkthap6x63MB4TxwCyuIGkV0oYP/YRyuQU5UO0Yz/E/ZAu+653/uov+phdmO54n6BcvFRyyt0RRrWdN2mpw==", + "dev": true, + "requires": { + "execa": "^0.8.0", + "is-ci": "^1.0.10", + "normalize-path": "^1.0.0", + "strip-indent": "^2.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", + "dev": true + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package.json" new file mode 100644 index 000000000..aa99757f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/package.json" @@ -0,0 +1,37 @@ +{ + "name": "test", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "core-js": "^3.6.5", + "register-service-worker": "^1.7.1", + "vue": "^2.6.11", + "vue-router": "^3.2.0", + "vuex": "^3.4.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "~4.4.0", + "@vue/cli-plugin-eslint": "~4.4.0", + "@vue/cli-plugin-pwa": "~4.4.0", + "@vue/cli-plugin-router": "~4.4.0", + "@vue/cli-plugin-vuex": "~4.4.0", + "@vue/cli-service": "~4.4.0", + "@vue/eslint-config-standard": "^5.1.2", + "babel-eslint": "^10.1.0", + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "eslint": "^6.7.2", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-vue": "^6.2.2", + "node-sass": "^4.12.0", + "sass-loader": "^8.0.2", + "vue-template-compiler": "^2.6.11" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/favicon.ico" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/favicon.ico" new file mode 100644 index 000000000..df36fcfb7 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/favicon.ico" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-192x192.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-192x192.png" new file mode 100644 index 000000000..b02aa64d9 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-192x192.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-512x512.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-512x512.png" new file mode 100644 index 000000000..06088b011 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-512x512.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-192x192.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-192x192.png" new file mode 100644 index 000000000..791e9c8c2 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-192x192.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-512x512.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-512x512.png" new file mode 100644 index 000000000..5f2098ed2 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/android-chrome-maskable-512x512.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-120x120.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-120x120.png" new file mode 100644 index 000000000..1427cf627 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-120x120.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-152x152.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-152x152.png" new file mode 100644 index 000000000..f24d454a2 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-152x152.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-180x180.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-180x180.png" new file mode 100644 index 000000000..404e192a9 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-180x180.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-60x60.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-60x60.png" new file mode 100644 index 000000000..cf10a5602 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-60x60.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-76x76.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-76x76.png" new file mode 100644 index 000000000..c500769e3 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon-76x76.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon.png" new file mode 100644 index 000000000..03c0c5d5e Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/apple-touch-icon.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-16x16.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-16x16.png" new file mode 100644 index 000000000..42af00963 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-16x16.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-32x32.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-32x32.png" new file mode 100644 index 000000000..46ca04dee Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/favicon-32x32.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/msapplication-icon-144x144.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/msapplication-icon-144x144.png" new file mode 100644 index 000000000..7808237a1 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/msapplication-icon-144x144.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/mstile-150x150.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/mstile-150x150.png" new file mode 100644 index 000000000..3b37a43ae Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/mstile-150x150.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/safari-pinned-tab.svg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/safari-pinned-tab.svg" new file mode 100644 index 000000000..e44c0d5b0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/img/icons/safari-pinned-tab.svg" @@ -0,0 +1,3 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/index.html" new file mode 100644 index 000000000..412352865 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/index.html" @@ -0,0 +1,17 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/robots.txt" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/robots.txt" new file mode 100644 index 000000000..eb0536286 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/public/robots.txt" @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/App.vue" new file mode 100644 index 000000000..3e36832bc --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/App.vue" @@ -0,0 +1,80 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/assets/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/assets/logo.png" new file mode 100644 index 000000000..f3d2503fc Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/assets/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/components/HelloWorld.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/components/HelloWorld.vue" new file mode 100644 index 000000000..5673c5438 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/components/HelloWorld.vue" @@ -0,0 +1,61 @@ + + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp1.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp1.vue" new file mode 100644 index 000000000..0487b83fa --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp1.vue" @@ -0,0 +1,5 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp2.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp2.vue" new file mode 100644 index 000000000..4c84e36e0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp2.vue" @@ -0,0 +1,5 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp3.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp3.vue" new file mode 100644 index 000000000..18692c276 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/comps/comp3.vue" @@ -0,0 +1,5 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/main.js" new file mode 100644 index 000000000..d12df39b6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/main.js" @@ -0,0 +1,13 @@ +import Vue from 'vue' +import App from './App.vue' +import './registerServiceWorker' +import router from './router' +import store from './store' + +Vue.config.productionTip = false + +new Vue({ + router, + store, + render: h => h(App) +}).$mount('#app') diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/registerServiceWorker.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/registerServiceWorker.js" new file mode 100644 index 000000000..76cede074 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/registerServiceWorker.js" @@ -0,0 +1,32 @@ +/* eslint-disable no-console */ + +import { register } from 'register-service-worker' + +if (process.env.NODE_ENV === 'production') { + register(`${process.env.BASE_URL}service-worker.js`, { + ready () { + console.log( + 'App is being served from cache by a service worker.\n' + + 'For more details, visit https://goo.gl/AFskqB' + ) + }, + registered () { + console.log('Service worker has been registered.') + }, + cached () { + console.log('Content has been cached for offline use.') + }, + updatefound () { + console.log('New content is downloading.') + }, + updated () { + console.log('New content is available; please refresh.') + }, + offline () { + console.log('No internet connection found. App is running in offline mode.') + }, + error (error) { + console.error('Error during service worker registration:', error) + } + }) +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/router/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/router/index.js" new file mode 100644 index 000000000..e44cdcd85 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/router/index.js" @@ -0,0 +1,27 @@ +import Vue from 'vue' +import VueRouter from 'vue-router' +import Home from '../views/Home.vue' + +Vue.use(VueRouter) + +const routes = [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') + } +] + +const router = new VueRouter({ + routes +}) + +export default router diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/store/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/store/index.js" new file mode 100644 index 000000000..332b91692 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/store/index.js" @@ -0,0 +1,15 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: { + }, + mutations: { + }, + actions: { + }, + modules: { + } +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/About.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/About.vue" new file mode 100644 index 000000000..3fa28070d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/About.vue" @@ -0,0 +1,5 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/Home.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/Home.vue" new file mode 100644 index 000000000..8bd6c57f3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/src/views/Home.vue" @@ -0,0 +1,18 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/vue.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/vue.config.js" new file mode 100644 index 000000000..10e77ee20 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/vue.config.js" @@ -0,0 +1,32 @@ +/** + * created by csxiaoyao + * 2018.09.15 + */ +// vue.config.js +module.exports = { + configureWebpack: { + devtool: 'source-map', + resolve: { + extensions: ['.ts', '.tsx', '.js', '.json'] + }, + module: { + rules: [ + { + test: /\.tsx?$/, + loader: 'ts-loader', + exclude: /node_modules/, + options: { + appendTsSuffixTo: [/\.vue$/] + } + }, + { + test: /\.js$/, + loader: 'babel-loader', + options: { + plugins:['syntax-dynamic-import'] + } + } + ] + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/yarn.lock" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/yarn.lock" new file mode 100644 index 000000000..abc8a7997 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\345\274\202\346\255\245\345\212\240\350\275\275-webpack-require.context/yarn.lock" @@ -0,0 +1,9224 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha1-Fo2ho26Q2miujUnA8bSMfGJJITo= + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/compat-data@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/compat-data/download/@babel/compat-data-7.10.5.tgz#d38425e67ea96b1480a3f50404d1bf85676301a6" + integrity sha1-04Ql5n6paxSAo/UEBNG/hWdjAaY= + dependencies: + browserslist "^4.12.0" + invariant "^2.2.4" + semver "^5.5.0" + +"@babel/core@^7.9.6": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.10.5.tgz?cache=0&sync_timestamp=1594750827017&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.10.5.tgz#1f15e2cca8ad9a1d78a38ddba612f5e7cdbbd330" + integrity sha1-HxXizKitmh14o43bphL158270zA= + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.10.5" + "@babel/helper-module-transforms" "^7.10.5" + "@babel/helpers" "^7.10.4" + "@babel/parser" "^7.10.5" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.5" + "@babel/types" "^7.10.5" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.10.5": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.10.5.tgz?cache=0&sync_timestamp=1594750826431&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.10.5.tgz#1b903554bc8c583ee8d25f1e8969732e6b829a69" + integrity sha1-G5A1VLyMWD7o0l8eiWlzLmuCmmk= + dependencies: + "@babel/types" "^7.10.5" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" + integrity sha1-W/DUlaP3V6w72ki1vzs7ownHK6M= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-builder-binary-assignment-operator-visitor/download/@babel/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" + integrity sha1-uwt18xv5jL+f8UPBrleLhydK4aM= + dependencies: + "@babel/helper-explode-assignable-expression" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-compilation-targets@^7.10.4", "@babel/helper-compilation-targets@^7.9.6": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.10.4.tgz?cache=0&sync_timestamp=1593521085687&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-compilation-targets%2Fdownload%2F%40babel%2Fhelper-compilation-targets-7.10.4.tgz#804ae8e3f04376607cc791b9d47d540276332bd2" + integrity sha1-gEro4/BDdmB8x5G51H1UAnYzK9I= + dependencies: + "@babel/compat-data" "^7.10.4" + browserslist "^4.12.0" + invariant "^2.2.4" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.10.5": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/helper-create-class-features-plugin/download/@babel/helper-create-class-features-plugin-7.10.5.tgz?cache=0&sync_timestamp=1594750826871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-class-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" + integrity sha1-n2FEa6gOgkCwpchcb9rIRZ1vJZ0= + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.10.5" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + +"@babel/helper-create-regexp-features-plugin@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" + integrity sha1-/dYNiFJGWaC2lZwFeZJeQlcU87g= + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-regex" "^7.10.4" + regexpu-core "^4.7.0" + +"@babel/helper-define-map@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/helper-define-map/download/@babel/helper-define-map-7.10.5.tgz?cache=0&sync_timestamp=1594750826834&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-define-map%2Fdownload%2F%40babel%2Fhelper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" + integrity sha1-tTwQ23imQIABUmkrEzkxR6y5uzA= + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/types" "^7.10.5" + lodash "^4.17.19" + +"@babel/helper-explode-assignable-expression@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-explode-assignable-expression/download/@babel/helper-explode-assignable-expression-7.10.4.tgz?cache=0&sync_timestamp=1593522935315&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-explode-assignable-expression%2Fdownload%2F%40babel%2Fhelper-explode-assignable-expression-7.10.4.tgz#40a1cd917bff1288f699a94a75b37a1a2dbd8c7c" + integrity sha1-QKHNkXv/Eoj2malKdbN6Gi29jHw= + dependencies: + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-function-name@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.10.4.tgz?cache=0&sync_timestamp=1593522836308&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-function-name%2Fdownload%2F%40babel%2Fhelper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" + integrity sha1-0tOyDFmtjEcRL6fSqUvAnV74Lxo= + dependencies: + "@babel/helper-get-function-arity" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-get-function-arity@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" + integrity sha1-mMHL6g4jMvM/mkZhuM4VBbLBm6I= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-hoist-variables@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" + integrity sha1-1JsAHR1aaMpeZgTdoBpil/fJOB4= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-member-expression-to-functions@^7.10.4", "@babel/helper-member-expression-to-functions@^7.10.5": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.10.5.tgz?cache=0&sync_timestamp=1594750826503&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-member-expression-to-functions%2Fdownload%2F%40babel%2Fhelper-member-expression-to-functions-7.10.5.tgz#172f56e7a63e78112f3a04055f24365af702e7ee" + integrity sha1-Fy9W56Y+eBEvOgQFXyQ2WvcC5+4= + dependencies: + "@babel/types" "^7.10.5" + +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.8.3": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.10.4.tgz?cache=0&sync_timestamp=1593522826853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" + integrity sha1-TFxUvgS9MWcKc4J5fXW5+i5bViA= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.10.5": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.10.5.tgz?cache=0&sync_timestamp=1594750826539&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.10.5.tgz#120c271c0b3353673fcdfd8c053db3c544a260d6" + integrity sha1-EgwnHAszU2c/zf2MBT2zxUSiYNY= + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-replace-supers" "^7.10.4" + "@babel/helper-simple-access" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.5" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" + integrity sha1-UNyWQT1ZT5lad5BZBbBYk813lnM= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz?cache=0&sync_timestamp=1593521089859&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-plugin-utils%2Fdownload%2F%40babel%2Fhelper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + integrity sha1-L3WoMSadT2d95JmG3/WZJ1M883U= + +"@babel/helper-regex@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.10.5.tgz?cache=0&sync_timestamp=1594750677873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-regex%2Fdownload%2F%40babel%2Fhelper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" + integrity sha1-Mt+7eYmQc8QVVXBToZvQVarlCuA= + dependencies: + lodash "^4.17.19" + +"@babel/helper-remap-async-to-generator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-remap-async-to-generator/download/@babel/helper-remap-async-to-generator-7.10.4.tgz#fce8bea4e9690bbe923056ded21e54b4e8b68ed5" + integrity sha1-/Oi+pOlpC76SMFbe0h5UtOi2jtU= + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-wrap-function" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-replace-supers@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" + integrity sha1-1YXNk4jqBuYDHkzUS2cTy+rZ5s8= + dependencies: + "@babel/helper-member-expression-to-functions" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-simple-access@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" + integrity sha1-D1zNopRSd6KnotOoIeFTle3PNGE= + dependencies: + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-split-export-declaration@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.10.4.tgz?cache=0&sync_timestamp=1593522826673&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-split-export-declaration%2Fdownload%2F%40babel%2Fhelper-split-export-declaration-7.10.4.tgz#2c70576eaa3b5609b24cb99db2888cc3fc4251d1" + integrity sha1-LHBXbqo7VgmyTLmdsoiMw/xCUdE= + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI= + +"@babel/helper-wrap-function@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" + integrity sha1-im9wHqsP8592W1oc/vQJmQ5iS4c= + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helpers@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.10.4.tgz?cache=0&sync_timestamp=1593522841291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.10.4.tgz#2abeb0d721aff7c0a97376b9e1f6f65d7a475044" + integrity sha1-Kr6w1yGv98Cpc3a54fb2XXpHUEQ= + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.10.4.tgz?cache=0&sync_timestamp=1593521087106&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhighlight%2Fdownload%2F%40babel%2Fhighlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha1-fRvf1ldTU4+r5sOFls23bZrGAUM= + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.10.4", "@babel/parser@^7.10.5", "@babel/parser@^7.7.0": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.10.5.tgz?cache=0&sync_timestamp=1594750682592&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.10.5.tgz#e7c6bf5a7deff957cec9f04b551e2762909d826b" + integrity sha1-58a/Wn3v+VfOyfBLVR4nYpCdgms= + +"@babel/plugin-proposal-async-generator-functions@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-async-generator-functions/download/@babel/plugin-proposal-async-generator-functions-7.10.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-async-generator-functions%2Fdownload%2F%40babel%2Fplugin-proposal-async-generator-functions-7.10.5.tgz#3491cabf2f7c179ab820606cec27fed15e0e8558" + integrity sha1-NJHKvy98F5q4IGBs7Cf+0V4OhVg= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.10.4" + "@babel/plugin-syntax-async-generators" "^7.8.0" + +"@babel/plugin-proposal-class-properties@^7.10.4", "@babel/plugin-proposal-class-properties@^7.8.3": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-class-properties/download/@babel/plugin-proposal-class-properties-7.10.4.tgz?cache=0&sync_timestamp=1593522937004&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-class-properties%2Fdownload%2F%40babel%2Fplugin-proposal-class-properties-7.10.4.tgz#a33bf632da390a59c7a8c570045d1115cd778807" + integrity sha1-ozv2Mto5ClnHqMVwBF0RFc13iAc= + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-decorators@^7.8.3": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-decorators/download/@babel/plugin-proposal-decorators-7.10.5.tgz?cache=0&sync_timestamp=1594750827074&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-decorators%2Fdownload%2F%40babel%2Fplugin-proposal-decorators-7.10.5.tgz#42898bba478bc4b1ae242a703a953a7ad350ffb4" + integrity sha1-QomLukeLxLGuJCpwOpU6etNQ/7Q= + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.5" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-decorators" "^7.10.4" + +"@babel/plugin-proposal-dynamic-import@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-dynamic-import/download/@babel/plugin-proposal-dynamic-import-7.10.4.tgz?cache=0&sync_timestamp=1593521085849&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-dynamic-import%2Fdownload%2F%40babel%2Fplugin-proposal-dynamic-import-7.10.4.tgz#ba57a26cb98b37741e9d5bca1b8b0ddf8291f17e" + integrity sha1-uleibLmLN3QenVvKG4sN34KR8X4= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + +"@babel/plugin-proposal-json-strings@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.10.4.tgz?cache=0&sync_timestamp=1593521092651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-json-strings%2Fdownload%2F%40babel%2Fplugin-proposal-json-strings-7.10.4.tgz#593e59c63528160233bd321b1aebe0820c2341db" + integrity sha1-WT5ZxjUoFgIzvTIbGuvgggwjQds= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.0" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-nullish-coalescing-operator/download/@babel/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz?cache=0&sync_timestamp=1593522818985&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator%2Fdownload%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator-7.10.4.tgz#02a7e961fc32e6d5b2db0649e01bf80ddee7e04a" + integrity sha1-AqfpYfwy5tWy2wZJ4Bv4Dd7n4Eo= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + +"@babel/plugin-proposal-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-numeric-separator/download/@babel/plugin-proposal-numeric-separator-7.10.4.tgz#ce1590ff0a65ad12970a609d78855e9a4c1aef06" + integrity sha1-zhWQ/wplrRKXCmCdeIVemkwa7wY= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.10.4.tgz?cache=0&sync_timestamp=1593521217008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-proposal-object-rest-spread-7.10.4.tgz#50129ac216b9a6a55b3853fdd923e74bf553a4c0" + integrity sha1-UBKawha5pqVbOFP92SPnS/VTpMA= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.10.4" + +"@babel/plugin-proposal-optional-catch-binding@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-catch-binding/download/@babel/plugin-proposal-optional-catch-binding-7.10.4.tgz?cache=0&sync_timestamp=1593522975374&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-catch-binding%2Fdownload%2F%40babel%2Fplugin-proposal-optional-catch-binding-7.10.4.tgz#31c938309d24a78a49d68fdabffaa863758554dd" + integrity sha1-Mck4MJ0kp4pJ1o/av/qoY3WFVN0= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + +"@babel/plugin-proposal-optional-chaining@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-chaining/download/@babel/plugin-proposal-optional-chaining-7.10.4.tgz?cache=0&sync_timestamp=1593521131942&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-chaining%2Fdownload%2F%40babel%2Fplugin-proposal-optional-chaining-7.10.4.tgz#750f1255e930a1f82d8cdde45031f81a0d0adff7" + integrity sha1-dQ8SVekwofgtjN3kUDH4Gg0K3/c= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + +"@babel/plugin-proposal-private-methods@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-private-methods/download/@babel/plugin-proposal-private-methods-7.10.4.tgz?cache=0&sync_timestamp=1593522940799&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-private-methods%2Fdownload%2F%40babel%2Fplugin-proposal-private-methods-7.10.4.tgz#b160d972b8fdba5c7d111a145fc8c421fc2a6909" + integrity sha1-sWDZcrj9ulx9ERoUX8jEIfwqaQk= + dependencies: + "@babel/helper-create-class-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-unicode-property-regex@^7.10.4", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" + integrity sha1-RIPNpTBBzjQTt/4vAAImZd36p10= + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha1-qYP7Gusuw/btBCohD2QOkOeG/g0= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-class-properties/download/@babel/plugin-syntax-class-properties-7.10.4.tgz?cache=0&sync_timestamp=1593521086484&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-class-properties%2Fdownload%2F%40babel%2Fplugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c" + integrity sha1-ZkTmoLqlWmH54yMfbJ7rbuRsEkw= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-decorators@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-decorators/download/@babel/plugin-syntax-decorators-7.10.4.tgz?cache=0&sync_timestamp=1593522820650&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-decorators%2Fdownload%2F%40babel%2Fplugin-syntax-decorators-7.10.4.tgz#6853085b2c429f9d322d02f5a635018cdeb2360c" + integrity sha1-aFMIWyxCn50yLQL1pjUBjN6yNgw= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-dynamic-import@^7.8.0", "@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.2.0", "@babel/plugin-syntax-jsx@^7.8.3": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-jsx/download/@babel/plugin-syntax-jsx-7.10.4.tgz?cache=0&sync_timestamp=1593521121498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-jsx%2Fdownload%2F%40babel%2Fplugin-syntax-jsx-7.10.4.tgz#39abaae3cbf710c4373d8429484e6ba21340166c" + integrity sha1-Oauq48v3EMQ3PYQpSE5rohNAFmw= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-numeric-separator%2Fdownload%2F%40babel%2Fplugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.0": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.0": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha1-YRGiZbz7Ag6579D9/X0mQCue1sE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-top-level-await/download/@babel/plugin-syntax-top-level-await-7.10.4.tgz#4bbeb8917b54fcf768364e0a81f560e33a3ef57d" + integrity sha1-S764kXtU/PdoNk4KgfVg4zo+9X0= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-arrow-functions@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-arrow-functions/download/@babel/plugin-transform-arrow-functions-7.10.4.tgz?cache=0&sync_timestamp=1593522484198&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-arrow-functions%2Fdownload%2F%40babel%2Fplugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd" + integrity sha1-4ilg135pfHT0HFAdRNc9v4pqZM0= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-async-to-generator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-async-to-generator/download/@babel/plugin-transform-async-to-generator-7.10.4.tgz?cache=0&sync_timestamp=1593522851748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-async-to-generator%2Fdownload%2F%40babel%2Fplugin-transform-async-to-generator-7.10.4.tgz#41a5017e49eb6f3cda9392a51eef29405b245a37" + integrity sha1-QaUBfknrbzzak5KlHu8pQFskWjc= + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.10.4" + +"@babel/plugin-transform-block-scoped-functions@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoped-functions/download/@babel/plugin-transform-block-scoped-functions-7.10.4.tgz?cache=0&sync_timestamp=1593521982492&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoped-functions%2Fdownload%2F%40babel%2Fplugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8" + integrity sha1-GvpZV0T3XkOpGvc7DZmOz+Trwug= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-block-scoping@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoping/download/@babel/plugin-transform-block-scoping-7.10.5.tgz?cache=0&sync_timestamp=1594750687483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoping%2Fdownload%2F%40babel%2Fplugin-transform-block-scoping-7.10.5.tgz#b81b8aafefbfe68f0f65f7ef397b9ece68a6037d" + integrity sha1-uBuKr++/5o8PZffvOXuezmimA30= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-classes@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-classes/download/@babel/plugin-transform-classes-7.10.4.tgz?cache=0&sync_timestamp=1593522856487&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-classes%2Fdownload%2F%40babel%2Fplugin-transform-classes-7.10.4.tgz#405136af2b3e218bc4a1926228bc917ab1a0adc7" + integrity sha1-QFE2rys+IYvEoZJiKLyRerGgrcc= + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-define-map" "^7.10.4" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-computed-properties/download/@babel/plugin-transform-computed-properties-7.10.4.tgz#9ded83a816e82ded28d52d4b4ecbdd810cdfc0eb" + integrity sha1-ne2DqBboLe0o1S1LTsvdgQzfwOs= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-destructuring@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-destructuring/download/@babel/plugin-transform-destructuring-7.10.4.tgz?cache=0&sync_timestamp=1593522993738&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-destructuring%2Fdownload%2F%40babel%2Fplugin-transform-destructuring-7.10.4.tgz#70ddd2b3d1bea83d01509e9bb25ddb3a74fc85e5" + integrity sha1-cN3Ss9G+qD0BUJ6bsl3bOnT8heU= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-dotall-regex@^7.10.4", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" + integrity sha1-RpwgYhBcHragQOr0+sS0iAeDle4= + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-duplicate-keys@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-duplicate-keys/download/@babel/plugin-transform-duplicate-keys-7.10.4.tgz?cache=0&sync_timestamp=1593521255341&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-duplicate-keys%2Fdownload%2F%40babel%2Fplugin-transform-duplicate-keys-7.10.4.tgz#697e50c9fee14380fe843d1f306b295617431e47" + integrity sha1-aX5Qyf7hQ4D+hD0fMGspVhdDHkc= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-exponentiation-operator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-exponentiation-operator/download/@babel/plugin-transform-exponentiation-operator-7.10.4.tgz?cache=0&sync_timestamp=1593522848226&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-exponentiation-operator%2Fdownload%2F%40babel%2Fplugin-transform-exponentiation-operator-7.10.4.tgz#5ae338c57f8cf4001bdb35607ae66b92d665af2e" + integrity sha1-WuM4xX+M9AAb2zVgeuZrktZlry4= + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-for-of@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-for-of/download/@babel/plugin-transform-for-of-7.10.4.tgz?cache=0&sync_timestamp=1593522996190&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-for-of%2Fdownload%2F%40babel%2Fplugin-transform-for-of-7.10.4.tgz#c08892e8819d3a5db29031b115af511dbbfebae9" + integrity sha1-wIiS6IGdOl2ykDGxFa9RHbv+uuk= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-function-name@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-function-name/download/@babel/plugin-transform-function-name-7.10.4.tgz?cache=0&sync_timestamp=1593522872485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-function-name%2Fdownload%2F%40babel%2Fplugin-transform-function-name-7.10.4.tgz#6a467880e0fc9638514ba369111811ddbe2644b7" + integrity sha1-akZ4gOD8ljhRS6NpERgR3b4mRLc= + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-literals@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-literals/download/@babel/plugin-transform-literals-7.10.4.tgz?cache=0&sync_timestamp=1593522938841&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-literals%2Fdownload%2F%40babel%2Fplugin-transform-literals-7.10.4.tgz#9f42ba0841100a135f22712d0e391c462f571f3c" + integrity sha1-n0K6CEEQChNfInEtDjkcRi9XHzw= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-member-expression-literals@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-member-expression-literals/download/@babel/plugin-transform-member-expression-literals-7.10.4.tgz?cache=0&sync_timestamp=1593522821136&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-member-expression-literals%2Fdownload%2F%40babel%2Fplugin-transform-member-expression-literals-7.10.4.tgz#b1ec44fcf195afcb8db2c62cd8e551c881baf8b7" + integrity sha1-sexE/PGVr8uNssYs2OVRyIG6+Lc= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-modules-amd@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-modules-amd/download/@babel/plugin-transform-modules-amd-7.10.5.tgz?cache=0&sync_timestamp=1594750826922&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-amd%2Fdownload%2F%40babel%2Fplugin-transform-modules-amd-7.10.5.tgz#1b9cddaf05d9e88b3aad339cb3e445c4f020a9b1" + integrity sha1-G5zdrwXZ6Is6rTOcs+RFxPAgqbE= + dependencies: + "@babel/helper-module-transforms" "^7.10.5" + "@babel/helper-plugin-utils" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-modules-commonjs/download/@babel/plugin-transform-modules-commonjs-7.10.4.tgz?cache=0&sync_timestamp=1593522937305&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-commonjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-commonjs-7.10.4.tgz#66667c3eeda1ebf7896d41f1f16b17105a2fbca0" + integrity sha1-ZmZ8Pu2h6/eJbUHx8WsXEFovvKA= + dependencies: + "@babel/helper-module-transforms" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-simple-access" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-modules-systemjs/download/@babel/plugin-transform-modules-systemjs-7.10.5.tgz?cache=0&sync_timestamp=1594750826566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-systemjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-systemjs-7.10.5.tgz#6270099c854066681bae9e05f87e1b9cadbe8c85" + integrity sha1-YnAJnIVAZmgbrp4F+H4bnK2+jIU= + dependencies: + "@babel/helper-hoist-variables" "^7.10.4" + "@babel/helper-module-transforms" "^7.10.5" + "@babel/helper-plugin-utils" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-modules-umd/download/@babel/plugin-transform-modules-umd-7.10.4.tgz?cache=0&sync_timestamp=1593522846765&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-umd%2Fdownload%2F%40babel%2Fplugin-transform-modules-umd-7.10.4.tgz#9a8481fe81b824654b3a0b65da3df89f3d21839e" + integrity sha1-moSB/oG4JGVLOgtl2j34nz0hg54= + dependencies: + "@babel/helper-module-transforms" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-named-capturing-groups-regex/download/@babel/plugin-transform-named-capturing-groups-regex-7.10.4.tgz#78b4d978810b6f3bcf03f9e318f2fc0ed41aecb6" + integrity sha1-eLTZeIELbzvPA/njGPL8DtQa7LY= + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.4" + +"@babel/plugin-transform-new-target@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-new-target/download/@babel/plugin-transform-new-target-7.10.4.tgz?cache=0&sync_timestamp=1593522999550&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-new-target%2Fdownload%2F%40babel%2Fplugin-transform-new-target-7.10.4.tgz#9097d753cb7b024cb7381a3b2e52e9513a9c6888" + integrity sha1-kJfXU8t7Aky3OBo7LlLpUTqcaIg= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-object-super@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-object-super/download/@babel/plugin-transform-object-super-7.10.4.tgz?cache=0&sync_timestamp=1593522848107&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-object-super%2Fdownload%2F%40babel%2Fplugin-transform-object-super-7.10.4.tgz#d7146c4d139433e7a6526f888c667e314a093894" + integrity sha1-1xRsTROUM+emUm+IjGZ+MUoJOJQ= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.10.4" + +"@babel/plugin-transform-parameters@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.10.5.tgz?cache=0&sync_timestamp=1594750825750&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.10.5.tgz#59d339d58d0b1950435f4043e74e2510005e2c4a" + integrity sha1-WdM51Y0LGVBDX0BD504lEABeLEo= + dependencies: + "@babel/helper-get-function-arity" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-property-literals@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-property-literals/download/@babel/plugin-transform-property-literals-7.10.4.tgz?cache=0&sync_timestamp=1593522821423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-property-literals%2Fdownload%2F%40babel%2Fplugin-transform-property-literals-7.10.4.tgz#f6fe54b6590352298785b83edd815d214c42e3c0" + integrity sha1-9v5UtlkDUimHhbg+3YFdIUxC48A= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-regenerator@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-regenerator/download/@babel/plugin-transform-regenerator-7.10.4.tgz?cache=0&sync_timestamp=1593521089707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-regenerator%2Fdownload%2F%40babel%2Fplugin-transform-regenerator-7.10.4.tgz#2015e59d839074e76838de2159db421966fd8b63" + integrity sha1-IBXlnYOQdOdoON4hWdtCGWb9i2M= + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-reserved-words/download/@babel/plugin-transform-reserved-words-7.10.4.tgz?cache=0&sync_timestamp=1593522939590&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-reserved-words%2Fdownload%2F%40babel%2Fplugin-transform-reserved-words-7.10.4.tgz#8f2682bcdcef9ed327e1b0861585d7013f8a54dd" + integrity sha1-jyaCvNzvntMn4bCGFYXXAT+KVN0= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-runtime@^7.9.6": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.10.5.tgz?cache=0&sync_timestamp=1594749208169&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-runtime%2Fdownload%2F%40babel%2Fplugin-transform-runtime-7.10.5.tgz#3b39b7b24830e0c2d8ff7a4489fe5cf99fbace86" + integrity sha1-Ozm3skgw4MLY/3pEif5c+Z+6zoY= + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + resolve "^1.8.1" + semver "^5.5.1" + +"@babel/plugin-transform-shorthand-properties@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-shorthand-properties/download/@babel/plugin-transform-shorthand-properties-7.10.4.tgz#9fd25ec5cdd555bb7f473e5e6ee1c971eede4dd6" + integrity sha1-n9Jexc3VVbt/Rz5ebuHJce7eTdY= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-spread@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-spread/download/@babel/plugin-transform-spread-7.10.4.tgz#4e2c85ea0d6abaee1b24dcfbbae426fe8d674cff" + integrity sha1-TiyF6g1quu4bJNz7uuQm/o1nTP8= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-sticky-regex@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-sticky-regex/download/@babel/plugin-transform-sticky-regex-7.10.4.tgz#8f3889ee8657581130a29d9cc91d7c73b7c4a28d" + integrity sha1-jziJ7oZXWBEwop2cyR18c7fEoo0= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-regex" "^7.10.4" + +"@babel/plugin-transform-template-literals@^7.10.4": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-template-literals/download/@babel/plugin-transform-template-literals-7.10.5.tgz?cache=0&sync_timestamp=1594750825749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-template-literals%2Fdownload%2F%40babel%2Fplugin-transform-template-literals-7.10.5.tgz#78bc5d626a6642db3312d9d0f001f5e7639fde8c" + integrity sha1-eLxdYmpmQtszEtnQ8AH152Of3ow= + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-typeof-symbol@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-typeof-symbol/download/@babel/plugin-transform-typeof-symbol-7.10.4.tgz#9509f1a7eec31c4edbffe137c16cc33ff0bc5bfc" + integrity sha1-lQnxp+7DHE7b/+E3wWzDP/C8W/w= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-escapes@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-escapes/download/@babel/plugin-transform-unicode-escapes-7.10.4.tgz#feae523391c7651ddac115dae0a9d06857892007" + integrity sha1-/q5SM5HHZR3awRXa4KnQaFeJIAc= + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-regex@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-regex/download/@babel/plugin-transform-unicode-regex-7.10.4.tgz#e56d71f9282fac6db09c82742055576d5e6d80a8" + integrity sha1-5W1x+SgvrG2wnIJ0IFVXbV5tgKg= + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/preset-env@^7.9.6": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.10.4.tgz?cache=0&sync_timestamp=1593522855920&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.10.4.tgz#fbf57f9a803afd97f4f32e4f798bb62e4b2bef5f" + integrity sha1-+/V/moA6/Zf08y5PeYu2Lksr718= + dependencies: + "@babel/compat-data" "^7.10.4" + "@babel/helper-compilation-targets" "^7.10.4" + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-proposal-async-generator-functions" "^7.10.4" + "@babel/plugin-proposal-class-properties" "^7.10.4" + "@babel/plugin-proposal-dynamic-import" "^7.10.4" + "@babel/plugin-proposal-json-strings" "^7.10.4" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.4" + "@babel/plugin-proposal-numeric-separator" "^7.10.4" + "@babel/plugin-proposal-object-rest-spread" "^7.10.4" + "@babel/plugin-proposal-optional-catch-binding" "^7.10.4" + "@babel/plugin-proposal-optional-chaining" "^7.10.4" + "@babel/plugin-proposal-private-methods" "^7.10.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.10.4" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-class-properties" "^7.10.4" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.10.4" + "@babel/plugin-transform-arrow-functions" "^7.10.4" + "@babel/plugin-transform-async-to-generator" "^7.10.4" + "@babel/plugin-transform-block-scoped-functions" "^7.10.4" + "@babel/plugin-transform-block-scoping" "^7.10.4" + "@babel/plugin-transform-classes" "^7.10.4" + "@babel/plugin-transform-computed-properties" "^7.10.4" + "@babel/plugin-transform-destructuring" "^7.10.4" + "@babel/plugin-transform-dotall-regex" "^7.10.4" + "@babel/plugin-transform-duplicate-keys" "^7.10.4" + "@babel/plugin-transform-exponentiation-operator" "^7.10.4" + "@babel/plugin-transform-for-of" "^7.10.4" + "@babel/plugin-transform-function-name" "^7.10.4" + "@babel/plugin-transform-literals" "^7.10.4" + "@babel/plugin-transform-member-expression-literals" "^7.10.4" + "@babel/plugin-transform-modules-amd" "^7.10.4" + "@babel/plugin-transform-modules-commonjs" "^7.10.4" + "@babel/plugin-transform-modules-systemjs" "^7.10.4" + "@babel/plugin-transform-modules-umd" "^7.10.4" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.10.4" + "@babel/plugin-transform-new-target" "^7.10.4" + "@babel/plugin-transform-object-super" "^7.10.4" + "@babel/plugin-transform-parameters" "^7.10.4" + "@babel/plugin-transform-property-literals" "^7.10.4" + "@babel/plugin-transform-regenerator" "^7.10.4" + "@babel/plugin-transform-reserved-words" "^7.10.4" + "@babel/plugin-transform-shorthand-properties" "^7.10.4" + "@babel/plugin-transform-spread" "^7.10.4" + "@babel/plugin-transform-sticky-regex" "^7.10.4" + "@babel/plugin-transform-template-literals" "^7.10.4" + "@babel/plugin-transform-typeof-symbol" "^7.10.4" + "@babel/plugin-transform-unicode-escapes" "^7.10.4" + "@babel/plugin-transform-unicode-regex" "^7.10.4" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.10.4" + browserslist "^4.12.0" + core-js-compat "^3.6.2" + invariant "^2.2.2" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/preset-modules@^0.1.3": + version "0.1.3" + resolved "https://registry.npm.taobao.org/@babel/preset-modules/download/@babel/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" + integrity sha1-EyQrU7XvjIg8PPfd3VWzbOgPvHI= + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.3.4", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.6": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.10.5.tgz?cache=0&sync_timestamp=1594750825727&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.10.5.tgz#303d8bd440ecd5a491eae6117fd3367698674c5c" + integrity sha1-MD2L1EDs1aSR6uYRf9M2dphnTFw= + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.10.4": + version "7.10.4" + resolved "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.10.4.tgz?cache=0&sync_timestamp=1593522831608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" + integrity sha1-MlGZbEIA68cdGo/EBfupQPNrong= + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/traverse@^7.10.4", "@babel/traverse@^7.10.5", "@babel/traverse@^7.7.0": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.10.5.tgz?cache=0&sync_timestamp=1594750826800&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.10.5.tgz#77ce464f5b258be265af618d8fddf0536f20b564" + integrity sha1-d85GT1sli+Jlr2GNj93wU28gtWQ= + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.10.5" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/parser" "^7.10.5" + "@babel/types" "^7.10.5" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.4.4", "@babel/types@^7.7.0": + version "7.10.5" + resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.10.5.tgz?cache=0&sync_timestamp=1594750825865&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.10.5.tgz#d88ae7e2fde86bfbfe851d4d81afa70a997b5d15" + integrity sha1-2Irn4v3oa/v+hR1Nga+nCpl7XRU= + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@hapi/address@2.x.x": + version "2.1.4" + resolved "https://registry.npm.taobao.org/@hapi/address/download/@hapi/address-2.1.4.tgz?cache=0&sync_timestamp=1593993832157&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Faddress%2Fdownload%2F%40hapi%2Faddress-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" + integrity sha1-XWftQ/P9QaadS5/3tW58DR0KgeU= + +"@hapi/bourne@1.x.x": + version "1.3.2" + resolved "https://registry.npm.taobao.org/@hapi/bourne/download/@hapi/bourne-1.3.2.tgz?cache=0&sync_timestamp=1593915150444&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fbourne%2Fdownload%2F%40hapi%2Fbourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" + integrity sha1-CnCVreoGckPOMoPhtWuKj0U7JCo= + +"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0": + version "8.5.1" + resolved "https://registry.npm.taobao.org/@hapi/hoek/download/@hapi/hoek-8.5.1.tgz?cache=0&sync_timestamp=1593915910245&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fhoek%2Fdownload%2F%40hapi%2Fhoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" + integrity sha1-/elgZMpEbeyMVajC8TCVewcMbgY= + +"@hapi/joi@^15.0.0", "@hapi/joi@^15.0.1": + version "15.1.1" + resolved "https://registry.npm.taobao.org/@hapi/joi/download/@hapi/joi-15.1.1.tgz?cache=0&sync_timestamp=1595023381050&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fjoi%2Fdownload%2F%40hapi%2Fjoi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7" + integrity sha1-xnW4pxKW8Cgz+NbSQ7NMV7jOGdc= + dependencies: + "@hapi/address" "2.x.x" + "@hapi/bourne" "1.x.x" + "@hapi/hoek" "8.x.x" + "@hapi/topo" "3.x.x" + +"@hapi/topo@3.x.x": + version "3.1.6" + resolved "https://registry.npm.taobao.org/@hapi/topo/download/@hapi/topo-3.1.6.tgz?cache=0&sync_timestamp=1593916080558&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Ftopo%2Fdownload%2F%40hapi%2Ftopo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" + integrity sha1-aNk1+j6uf91asNf5U/MgXYsr/Ck= + dependencies: + "@hapi/hoek" "^8.3.0" + +"@intervolga/optimize-cssnano-plugin@^1.0.5": + version "1.0.6" + resolved "https://registry.npm.taobao.org/@intervolga/optimize-cssnano-plugin/download/@intervolga/optimize-cssnano-plugin-1.0.6.tgz#be7c7846128b88f6a9b1d1261a0ad06eb5c0fdf8" + integrity sha1-vnx4RhKLiPapsdEmGgrQbrXA/fg= + dependencies: + cssnano "^4.0.0" + cssnano-preset-default "^4.0.0" + postcss "^7.0.0" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4= + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs= + +"@soda/friendly-errors-webpack-plugin@^1.7.1": + version "1.7.1" + resolved "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz#706f64bcb4a8b9642b48ae3ace444c70334d615d" + integrity sha1-cG9kvLSouWQrSK46zkRMcDNNYV0= + dependencies: + chalk "^1.1.3" + error-stack-parser "^2.0.0" + string-width "^2.0.0" + +"@soda/get-current-script@^1.0.0": + version "1.0.2" + resolved "https://registry.npm.taobao.org/@soda/get-current-script/download/@soda/get-current-script-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Fget-current-script%2Fdownload%2F%40soda%2Fget-current-script-1.0.2.tgz#a53515db25d8038374381b73af20bb4f2e508d87" + integrity sha1-pTUV2yXYA4N0OBtzryC7Ty5QjYc= + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz?cache=0&sync_timestamp=1588199606687&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcolor-name%2Fdownload%2F%40types%2Fcolor-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA= + +"@types/glob@^7.1.1": + version "7.1.3" + resolved "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.3.tgz?cache=0&sync_timestamp=1594077883343&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fglob%2Fdownload%2F%40types%2Fglob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" + integrity sha1-5rqA82t9qtLGhazZJmOC5omFwYM= + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json-schema@^7.0.4": + version "7.0.5" + resolved "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.5.tgz?cache=0&sync_timestamp=1591720889158&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" + integrity sha1-3M5EMOZLRDuolF8CkPtWStW6xt0= + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npm.taobao.org/@types/json5/download/@types/json5-0.0.29.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson5%2Fdownload%2F%40types%2Fjson5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0= + +"@types/node@*": + version "14.0.23" + resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-14.0.23.tgz?cache=0&sync_timestamp=1594655926831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" + integrity sha1-Z2+giDRQ7Z2guyQVYhNjYpCJKAY= + +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.npm.taobao.org/@types/normalize-package-data/download/@types/normalize-package-data-2.4.0.tgz?cache=0&sync_timestamp=1588201184787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnormalize-package-data%2Fdownload%2F%40types%2Fnormalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4= + +"@types/q@^1.5.1": + version "1.5.4" + resolved "https://registry.npm.taobao.org/@types/q/download/@types/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" + integrity sha1-FZJUFOCtLNdlv+9YhC9+JqesyyQ= + +"@vue/babel-helper-vue-jsx-merge-props@^1.0.0": + version "1.0.0" + resolved "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0.tgz#048fe579958da408fb7a8b2a3ec050b50a661040" + integrity sha1-BI/leZWNpAj7eosqPsBQtQpmEEA= + +"@vue/babel-plugin-transform-vue-jsx@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.1.2.tgz#c0a3e6efc022e75e4247b448a8fc6b86f03e91c0" + integrity sha1-wKPm78Ai515CR7RIqPxrhvA+kcA= + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" + "@vue/babel-helper-vue-jsx-merge-props" "^1.0.0" + html-tags "^2.0.0" + lodash.kebabcase "^4.1.1" + svg-tags "^1.0.0" + +"@vue/babel-preset-app@^4.4.6": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/babel-preset-app/download/@vue/babel-preset-app-4.4.6.tgz?cache=0&sync_timestamp=1592976388832&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-preset-app%2Fdownload%2F%40vue%2Fbabel-preset-app-4.4.6.tgz#92aef916e83f1abe0a2ed1e9e2cef5b332f958c4" + integrity sha1-kq75Fug/Gr4KLtHp4s71szL5WMQ= + dependencies: + "@babel/core" "^7.9.6" + "@babel/helper-compilation-targets" "^7.9.6" + "@babel/helper-module-imports" "^7.8.3" + "@babel/plugin-proposal-class-properties" "^7.8.3" + "@babel/plugin-proposal-decorators" "^7.8.3" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + "@babel/plugin-transform-runtime" "^7.9.6" + "@babel/preset-env" "^7.9.6" + "@babel/runtime" "^7.9.6" + "@vue/babel-preset-jsx" "^1.1.2" + babel-plugin-dynamic-import-node "^2.3.3" + core-js "^3.6.5" + core-js-compat "^3.6.5" + semver "^6.1.0" + +"@vue/babel-preset-jsx@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.1.2.tgz#2e169eb4c204ea37ca66c2ea85a880bfc99d4f20" + integrity sha1-LhaetMIE6jfKZsLqhaiAv8mdTyA= + dependencies: + "@vue/babel-helper-vue-jsx-merge-props" "^1.0.0" + "@vue/babel-plugin-transform-vue-jsx" "^1.1.2" + "@vue/babel-sugar-functional-vue" "^1.1.2" + "@vue/babel-sugar-inject-h" "^1.1.2" + "@vue/babel-sugar-v-model" "^1.1.2" + "@vue/babel-sugar-v-on" "^1.1.2" + +"@vue/babel-sugar-functional-vue@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.1.2.tgz#f7e24fba09e6f1ee70104560a8808057555f1a9a" + integrity sha1-9+JPugnm8e5wEEVgqICAV1VfGpo= + dependencies: + "@babel/plugin-syntax-jsx" "^7.2.0" + +"@vue/babel-sugar-inject-h@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.1.2.tgz#8a5276b6d8e2ed16ffc8078aad94236274e6edf0" + integrity sha1-ilJ2ttji7Rb/yAeKrZQjYnTm7fA= + dependencies: + "@babel/plugin-syntax-jsx" "^7.2.0" + +"@vue/babel-sugar-v-model@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.1.2.tgz#1ff6fd1b800223fc9cb1e84dceb5e52d737a8192" + integrity sha1-H/b9G4ACI/ycsehNzrXlLXN6gZI= + dependencies: + "@babel/plugin-syntax-jsx" "^7.2.0" + "@vue/babel-helper-vue-jsx-merge-props" "^1.0.0" + "@vue/babel-plugin-transform-vue-jsx" "^1.1.2" + camelcase "^5.0.0" + html-tags "^2.0.0" + svg-tags "^1.0.0" + +"@vue/babel-sugar-v-on@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.1.2.tgz#b2ef99b8f2fab09fbead25aad70ef42e1cf5b13b" + integrity sha1-su+ZuPL6sJ++rSWq1w70Lhz1sTs= + dependencies: + "@babel/plugin-syntax-jsx" "^7.2.0" + "@vue/babel-plugin-transform-vue-jsx" "^1.1.2" + camelcase "^5.0.0" + +"@vue/cli-overlay@^4.4.6": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-overlay/download/@vue/cli-overlay-4.4.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-overlay%2Fdownload%2F%40vue%2Fcli-overlay-4.4.6.tgz#58f996066d8c0a0a45ad4b5c6f3f213f9945a9ba" + integrity sha1-WPmWBm2MCgpFrUtcbz8hP5lFqbo= + +"@vue/cli-plugin-babel@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-plugin-babel/download/@vue/cli-plugin-babel-4.4.6.tgz?cache=0&sync_timestamp=1592976338358&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-babel%2Fdownload%2F%40vue%2Fcli-plugin-babel-4.4.6.tgz#d5d750d4f74900c00836e19c164193650df26f3b" + integrity sha1-1ddQ1PdJAMAINuGcFkGTZQ3ybzs= + dependencies: + "@babel/core" "^7.9.6" + "@vue/babel-preset-app" "^4.4.6" + "@vue/cli-shared-utils" "^4.4.6" + babel-loader "^8.1.0" + cache-loader "^4.1.0" + thread-loader "^2.1.3" + webpack "^4.0.0" + +"@vue/cli-plugin-eslint@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-plugin-eslint/download/@vue/cli-plugin-eslint-4.4.6.tgz#442d62a70dd93e4a549ff9164d2d10f4e97a58f1" + integrity sha1-RC1ipw3ZPkpUn/kWTS0Q9Ol6WPE= + dependencies: + "@vue/cli-shared-utils" "^4.4.6" + eslint-loader "^2.2.1" + globby "^9.2.0" + inquirer "^7.1.0" + webpack "^4.0.0" + yorkie "^2.0.0" + +"@vue/cli-plugin-pwa@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-plugin-pwa/download/@vue/cli-plugin-pwa-4.4.6.tgz#f1b8e35822e28c3b6b196673d00a9127f7953937" + integrity sha1-8bjjWCLijDtrGWZz0AqRJ/eVOTc= + dependencies: + "@vue/cli-shared-utils" "^4.4.6" + webpack "^4.0.0" + workbox-webpack-plugin "^4.3.1" + +"@vue/cli-plugin-router@^4.4.6", "@vue/cli-plugin-router@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-plugin-router/download/@vue/cli-plugin-router-4.4.6.tgz?cache=0&sync_timestamp=1592976330485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-router%2Fdownload%2F%40vue%2Fcli-plugin-router-4.4.6.tgz#db5bb1c92afd2046376e4faa90270d6363d4b9b8" + integrity sha1-21uxySr9IEY3bk+qkCcNY2PUubg= + dependencies: + "@vue/cli-shared-utils" "^4.4.6" + +"@vue/cli-plugin-vuex@^4.4.6", "@vue/cli-plugin-vuex@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-plugin-vuex/download/@vue/cli-plugin-vuex-4.4.6.tgz?cache=0&sync_timestamp=1592976327785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-vuex%2Fdownload%2F%40vue%2Fcli-plugin-vuex-4.4.6.tgz#44b596f0d5236e0a2ce1aa4757bda5207c230be0" + integrity sha1-RLWW8NUjbgos4apHV72lIHwjC+A= + +"@vue/cli-service@~4.4.0": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-service/download/@vue/cli-service-4.4.6.tgz?cache=0&sync_timestamp=1592976332700&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-service%2Fdownload%2F%40vue%2Fcli-service-4.4.6.tgz#83ca058d081eb145bbc1ae2fe8069d2d9ddf7e18" + integrity sha1-g8oFjQgesUW7wa4v6AadLZ3ffhg= + dependencies: + "@intervolga/optimize-cssnano-plugin" "^1.0.5" + "@soda/friendly-errors-webpack-plugin" "^1.7.1" + "@soda/get-current-script" "^1.0.0" + "@vue/cli-overlay" "^4.4.6" + "@vue/cli-plugin-router" "^4.4.6" + "@vue/cli-plugin-vuex" "^4.4.6" + "@vue/cli-shared-utils" "^4.4.6" + "@vue/component-compiler-utils" "^3.1.2" + "@vue/preload-webpack-plugin" "^1.1.0" + "@vue/web-component-wrapper" "^1.2.0" + acorn "^7.2.0" + acorn-walk "^7.1.1" + address "^1.1.2" + autoprefixer "^9.8.0" + browserslist "^4.12.0" + cache-loader "^4.1.0" + case-sensitive-paths-webpack-plugin "^2.3.0" + cli-highlight "^2.1.4" + clipboardy "^2.3.0" + cliui "^6.0.0" + copy-webpack-plugin "^5.1.1" + css-loader "^3.5.3" + cssnano "^4.1.10" + debug "^4.1.1" + default-gateway "^5.0.5" + dotenv "^8.2.0" + dotenv-expand "^5.1.0" + file-loader "^4.2.0" + fs-extra "^7.0.1" + globby "^9.2.0" + hash-sum "^2.0.0" + html-webpack-plugin "^3.2.0" + launch-editor-middleware "^2.2.1" + lodash.defaultsdeep "^4.6.1" + lodash.mapvalues "^4.6.0" + lodash.transform "^4.6.0" + mini-css-extract-plugin "^0.9.0" + minimist "^1.2.5" + pnp-webpack-plugin "^1.6.4" + portfinder "^1.0.26" + postcss-loader "^3.0.0" + ssri "^7.1.0" + terser-webpack-plugin "^2.3.6" + thread-loader "^2.1.3" + url-loader "^2.2.0" + vue-loader "^15.9.2" + vue-style-loader "^4.1.2" + webpack "^4.0.0" + webpack-bundle-analyzer "^3.8.0" + webpack-chain "^6.4.0" + webpack-dev-server "^3.11.0" + webpack-merge "^4.2.2" + +"@vue/cli-shared-utils@^4.4.6": + version "4.4.6" + resolved "https://registry.npm.taobao.org/@vue/cli-shared-utils/download/@vue/cli-shared-utils-4.4.6.tgz?cache=0&sync_timestamp=1592976389673&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-shared-utils%2Fdownload%2F%40vue%2Fcli-shared-utils-4.4.6.tgz#0ec59880920736c6dd79079ac0b5ceac29fa55e1" + integrity sha1-DsWYgJIHNsbdeQeawLXOrCn6VeE= + dependencies: + "@hapi/joi" "^15.0.1" + chalk "^2.4.2" + execa "^1.0.0" + launch-editor "^2.2.1" + lru-cache "^5.1.1" + node-ipc "^9.1.1" + open "^6.3.0" + ora "^3.4.0" + read-pkg "^5.1.1" + request "^2.88.2" + semver "^6.1.0" + strip-ansi "^6.0.0" + +"@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.1.2": + version "3.1.2" + resolved "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.1.2.tgz#8213a5ff3202f9f2137fe55370f9e8b9656081c3" + integrity sha1-ghOl/zIC+fITf+VTcPnouWVggcM= + dependencies: + consolidate "^0.15.1" + hash-sum "^1.0.2" + lru-cache "^4.1.2" + merge-source-map "^1.1.0" + postcss "^7.0.14" + postcss-selector-parser "^6.0.2" + source-map "~0.6.1" + vue-template-es2015-compiler "^1.9.0" + optionalDependencies: + prettier "^1.18.2" + +"@vue/eslint-config-standard@^5.1.2": + version "5.1.2" + resolved "https://registry.npm.taobao.org/@vue/eslint-config-standard/download/@vue/eslint-config-standard-5.1.2.tgz?cache=0&sync_timestamp=1581740717239&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Feslint-config-standard%2Fdownload%2F%40vue%2Feslint-config-standard-5.1.2.tgz#c5d55af894a3ae23b65b1af4a425777ac0170b42" + integrity sha1-xdVa+JSjriO2Wxr0pCV3esAXC0I= + dependencies: + eslint-config-standard "^14.1.0" + eslint-import-resolver-node "^0.3.3" + eslint-import-resolver-webpack "^0.12.1" + +"@vue/preload-webpack-plugin@^1.1.0": + version "1.1.1" + resolved "https://registry.npm.taobao.org/@vue/preload-webpack-plugin/download/@vue/preload-webpack-plugin-1.1.1.tgz#18723530d304f443021da2292d6ec9502826104a" + integrity sha1-GHI1MNME9EMCHaIpLW7JUCgmEEo= + +"@vue/web-component-wrapper@^1.2.0": + version "1.2.0" + resolved "https://registry.npm.taobao.org/@vue/web-component-wrapper/download/@vue/web-component-wrapper-1.2.0.tgz#bb0e46f1585a7e289b4ee6067dcc5a6ae62f1dd1" + integrity sha1-uw5G8VhafiibTuYGfcxaauYvHdE= + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.9.0.tgz?cache=0&sync_timestamp=1580600103531&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fast%2Fdownload%2F%40webassemblyjs%2Fast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha1-vYUGBLQEJFmlpBzX0zjL7Wle2WQ= + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/floating-point-hex-parser/download/@webassemblyjs/floating-point-hex-parser-1.9.0.tgz?cache=0&sync_timestamp=1580600093212&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Ffloating-point-hex-parser%2Fdownload%2F%40webassemblyjs%2Ffloating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha1-PD07Jxvd/ITesA9xNEQ4MR1S/7Q= + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-api-error/download/@webassemblyjs/helper-api-error-1.9.0.tgz?cache=0&sync_timestamp=1580600095518&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-api-error%2Fdownload%2F%40webassemblyjs%2Fhelper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha1-ID9nbjM7lsnaLuqzzO8zxFkotqI= + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-buffer/download/@webassemblyjs/helper-buffer-1.9.0.tgz?cache=0&sync_timestamp=1580600094393&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-buffer%2Fdownload%2F%40webassemblyjs%2Fhelper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha1-oUQtJpxf6yP8vJ73WdrDVH8p3gA= + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-code-frame/download/@webassemblyjs/helper-code-frame-1.9.0.tgz?cache=0&sync_timestamp=1580600150532&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-code-frame%2Fdownload%2F%40webassemblyjs%2Fhelper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha1-ZH+Iks0gQ6gqwMjF51w28dkVnyc= + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-fsm/download/@webassemblyjs/helper-fsm-1.9.0.tgz?cache=0&sync_timestamp=1580600091792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-fsm%2Fdownload%2F%40webassemblyjs%2Fhelper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha1-wFJWtxJEIUZx9LCOwQitY7cO3bg= + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-module-context/download/@webassemblyjs/helper-module-context-1.9.0.tgz?cache=0&sync_timestamp=1580600151060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-module-context%2Fdownload%2F%40webassemblyjs%2Fhelper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha1-JdiIS3aDmHGgimxvgGw5ee9xLwc= + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-bytecode/download/@webassemblyjs/helper-wasm-bytecode-1.9.0.tgz?cache=0&sync_timestamp=1580600099056&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-wasm-bytecode%2Fdownload%2F%40webassemblyjs%2Fhelper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha1-T+2L6sm4wU+MWLcNEk1UndH+V5A= + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-section/download/@webassemblyjs/helper-wasm-section-1.9.0.tgz?cache=0&sync_timestamp=1580600150333&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-wasm-section%2Fdownload%2F%40webassemblyjs%2Fhelper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha1-WkE41aYpK6GLBMWuSXF+QWeWU0Y= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/ieee754/download/@webassemblyjs/ieee754-1.9.0.tgz?cache=0&sync_timestamp=1580600097902&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fieee754%2Fdownload%2F%40webassemblyjs%2Fieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha1-Fceg+6roP7JhQ7us9tbfFwKtOeQ= + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/leb128/download/@webassemblyjs/leb128-1.9.0.tgz?cache=0&sync_timestamp=1580600096686&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fleb128%2Fdownload%2F%40webassemblyjs%2Fleb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha1-8Zygt2ptxVYjoJz/p2noOPoeHJU= + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/utf8/download/@webassemblyjs/utf8-1.9.0.tgz?cache=0&sync_timestamp=1580600100063&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Futf8%2Fdownload%2F%40webassemblyjs%2Futf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha1-BNM7Y2945qaBMifoJAL3Y3tiKas= + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wasm-edit/download/@webassemblyjs/wasm-edit-1.9.0.tgz?cache=0&sync_timestamp=1580600102353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-edit%2Fdownload%2F%40webassemblyjs%2Fwasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha1-P+bXnT8PkiGDqoYALELdJWz+6c8= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wasm-gen/download/@webassemblyjs/wasm-gen-1.9.0.tgz?cache=0&sync_timestamp=1580600104620&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-gen%2Fdownload%2F%40webassemblyjs%2Fwasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha1-ULxw7Gje2OJ2OwGhQYv0NJGnpJw= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wasm-opt/download/@webassemblyjs/wasm-opt-1.9.0.tgz?cache=0&sync_timestamp=1580600101082&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-opt%2Fdownload%2F%40webassemblyjs%2Fwasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha1-IhEYHlsxMmRDzIES658LkChyGmE= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.9.0.tgz?cache=0&sync_timestamp=1580600149379&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-parser%2Fdownload%2F%40webassemblyjs%2Fwasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha1-nUjkSCbfSmWYKUqmyHRp1kL/9l4= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wast-parser/download/@webassemblyjs/wast-parser-1.9.0.tgz?cache=0&sync_timestamp=1580600149981&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwast-parser%2Fdownload%2F%40webassemblyjs%2Fwast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha1-MDERXXmsW9JhVWzsw/qQo+9FGRQ= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.npm.taobao.org/@webassemblyjs/wast-printer/download/@webassemblyjs/wast-printer-1.9.0.tgz?cache=0&sync_timestamp=1580600105652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwast-printer%2Fdownload%2F%40webassemblyjs%2Fwast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha1-STXVTIX+9jewDOn1I3dFHQDUeJk= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A= + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0= + +abbrev@1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg= + +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha1-UxvHJlF6OytB+FACHGzBXqq1B80= + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.2.0.tgz?cache=0&sync_timestamp=1582724149302&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha1-TGYGkXPW/daO2FI5/CViJhgrLr4= + +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-7.2.0.tgz?cache=0&sync_timestamp=1592373541161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-walk%2Fdownload%2Facorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w= + +acorn@^6.4.1: + version "6.4.1" + resolved "https://registry.npm.taobao.org/acorn/download/acorn-6.4.1.tgz?cache=0&sync_timestamp=1591869455923&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha1-Ux5Yuj9RudrLmmZGyk3r9bFMpHQ= + +acorn@^7.1.1, acorn@^7.2.0: + version "7.3.1" + resolved "https://registry.npm.taobao.org/acorn/download/acorn-7.3.1.tgz?cache=0&sync_timestamp=1591869455923&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" + integrity sha1-hQEHVNtTw/uvO56j4IOqXF0Uf/0= + +address@^1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/address/download/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha1-vxEWycdYxRt6kz0pa3LCIe2UKLY= + +aggregate-error@^3.0.0: + version "3.0.1" + resolved "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha1-2y/nJG5Tb0DZtUQqOeEX191qJOA= + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha1-81mGrOuRr63sQQL72FAUlQzvpk0= + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.5.1" + resolved "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.1.tgz#b83ca89c5d42d69031f424cad49aada0236c6957" + integrity sha1-uDyonF1C1pAx9CTK1JqtoCNsaVc= + +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.5.5: + version "6.12.3" + resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.12.3.tgz?cache=0&sync_timestamp=1593878551850&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706" + integrity sha1-GMWvOKER3etPJpe9eNaKvByr1wY= + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +alphanum-sort@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= + +ansi-colors@^3.0.0: + version "3.2.4" + resolved "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha1-46PaS/uubIapwoViXeEkojQCb78= + +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha1-pcR8xDGB8fOP/XB2g3cA05VSKmE= + dependencies: + type-fest "^0.11.0" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc= + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U= + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0= + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha1-kK51xCTQCNJiTFvynq0xd+v881k= + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha1-vLJLTzeTTZqnrBe0ra+J58du8us= + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha1-xV7PAhheJGklk5kxDBc84xIzsUI= + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.0.3, aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha1-aALmJk79GMeQobDVF/DyYnvyyUo= + +arch@^2.1.1: + version "2.1.2" + resolved "https://registry.npm.taobao.org/arch/download/arch-2.1.2.tgz?cache=0&sync_timestamp=1589130903544&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farch%2Fdownload%2Farch-2.1.2.tgz#0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf" + integrity sha1-DFK75zRLtPomDEQ9LLrZwA/y8L8= + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha1-SzXClE8GKov82mZBB2A1D+nd/CE= + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE= + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha1-NgSLv/TntH4TZkQxbJlmnqWukfE= + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/array-find-index/download/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +array-find@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/array-find/download/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8" + integrity sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-flatten@^2.1.0: + version "2.1.2" + resolved "https://registry.npm.taobao.org/array-flatten/download/array-flatten-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk= + +array-includes@^3.1.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/array-includes/download/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha1-zdZ+aFK9+cEhVGB4ZzIlXtJFk0g= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + +array-union@^1.0.1, array-union@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +array.prototype.flat@^1.2.3: + version "1.2.3" + resolved "https://registry.npm.taobao.org/array.prototype.flat/download/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha1-DegrQmsDGNv9uUAInjiwQ9N/bHs= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.npm.taobao.org/asn1.js/download/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA= + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha1-jSR136tVO7M+d7VOWeiAu4ziMTY= + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.npm.taobao.org/assert/download/assert-1.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fassert%2Fdownload%2Fassert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha1-VcEJqvbgrv2z3EtxJAxwv1dLGOs= + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/astral-regex/download/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k= + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8= + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.npm.taobao.org/async-foreach/download/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI= + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz?cache=0&sync_timestamp=1574271635932&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-limiter%2Fdownload%2Fasync-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha1-3TeelPDbgxCwgpH51kwyCXZmF/0= + +async@^2.6.2: + version "2.6.3" + resolved "https://registry.npm.taobao.org/async/download/async-2.6.3.tgz?cache=0&sync_timestamp=1582513244496&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync%2Fdownload%2Fasync-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha1-1yYl4jRKNlbjo61Pp0n6gymdgv8= + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k= + +autoprefixer@^9.8.0: + version "9.8.5" + resolved "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.8.5.tgz?cache=0&sync_timestamp=1594444610244&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.8.5.tgz#2c225de229ddafe1d1424c02791d0c3e10ccccaa" + integrity sha1-LCJd4indr+HRQkwCeR0MPhDMzKo= + dependencies: + browserslist "^4.12.0" + caniuse-lite "^1.0.30001097" + colorette "^1.2.0" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.32" + postcss-value-parser "^4.1.0" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.10.0" + resolved "https://registry.npm.taobao.org/aws4/download/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2" + integrity sha1-oXs6jqgRBg501H0wYSJACtRJeuI= + +babel-eslint@^10.1.0: + version "10.1.0" + resolved "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" + integrity sha1-aWjlaKkQt4+zd5zdi2rC9HmUMjI= + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" + eslint-visitor-keys "^1.0.0" + resolve "^1.12.0" + +babel-extract-comments@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/babel-extract-comments/download/babel-extract-comments-1.0.0.tgz#0a2aedf81417ed391b85e18b4614e693a0351a21" + integrity sha1-Cirt+BQX7TkbheGLRhTmk6A1GiE= + dependencies: + babylon "^6.18.0" + +babel-loader@^8.1.0: + version "8.1.0" + resolved "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz?cache=0&sync_timestamp=1584717315701&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" + integrity sha1-xhHVESvVIJq+i5+oTD5NolJ18cM= + dependencies: + find-cache-dir "^2.1.0" + loader-utils "^1.4.0" + mkdirp "^0.5.3" + pify "^4.0.1" + schema-utils "^2.6.5" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha1-hP2hnJduxcbe/vV/lCez3vZuF6M= + dependencies: + object.assign "^4.1.0" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + integrity sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo= + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.npm.taobao.org/babel-plugin-syntax-object-rest-spread/download/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= + +babel-plugin-transform-object-rest-spread@^6.26.0: + version "6.26.0" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-object-rest-spread/download/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.npm.taobao.org/babylon/download/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha1-ry87iPpvXB5MY00aD46sT1WzleM= + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.npm.taobao.org/base64-js/download/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha1-WOzoy3XdB+ce0IxzarxfrE2/jfE= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.npm.taobao.org/base/download/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha1-e95c7RRbbVUakNuH+DxVi060io8= + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bfj@^6.1.1: + version "6.1.2" + resolved "https://registry.npm.taobao.org/bfj/download/bfj-6.1.2.tgz?cache=0&sync_timestamp=1577112292100&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbfj%2Fdownload%2Fbfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" + integrity sha1-MlyGGoIryzWKQceKM7jm4ght3n8= + dependencies: + bluebird "^3.5.5" + check-types "^8.0.3" + hoopy "^0.1.4" + tryer "^1.0.1" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4= + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg= + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U= + +binary-extensions@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" + integrity sha1-MPpAyef+B9vIlWeM0ocCTeokHdk= + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha1-EDU8npRTNLwFEabZCzj7x8nFBN8= + dependencies: + file-uri-to-path "1.0.0" + +block-stream@*: + version "0.0.9" + resolved "https://registry.npm.taobao.org/block-stream/download/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= + dependencies: + inherits "~2.0.0" + +bluebird@^3.1.1, bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha1-nyKcFb4nJFT/qXOs4NvueaGww28= + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: + version "4.11.9" + resolved "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg= + +bn.js@^5.1.1: + version "5.1.2" + resolved "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.2.tgz#c9686902d3c9a27729f43ab10f9d79c2004da7b0" + integrity sha1-yWhpAtPJoncp9DqxD515wgBNp7A= + +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbody-parser%2Fdownload%2Fbody-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io= + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.npm.taobao.org/bonjour/download/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@^1.0.0, boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0= + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha1-WXn9PxTNUxVl5fot8av/8d+u5yk= + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha1-NFThpGLujVmeI23zNs2epPiv4Qc= + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.npm.taobao.org/brorand/download/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.npm.taobao.org/browserify-aes/download/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha1-Mmc0ZC9APavDADIJhTu3CtQo70g= + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/browserify-cipher/download/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha1-jWR0wbhwv9q807z8wZNKEOlPFfA= + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/browserify-des/download/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha1-OvTx9Zg5QDVy8cZiBDdfen9wPpw= + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/browserify-rsa/download/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/browserify-sign/download/browserify-sign-4.2.0.tgz#545d0b1b07e6b2c99211082bf1b12cce7a0b0e11" + integrity sha1-VF0LGwfmssmSEQgr8bEsznoLDhE= + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.npm.taobao.org/browserify-zlib/download/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha1-KGlFnZqjviRf6P4sofRuLn9U1z8= + dependencies: + pako "~1.0.5" + +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.8.5: + version "4.13.0" + resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.13.0.tgz?cache=0&sync_timestamp=1593912403643&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.13.0.tgz#42556cba011e1b0a2775b611cba6a8eca18e940d" + integrity sha1-QlVsugEeGwondbYRy6ao7KGOlA0= + dependencies: + caniuse-lite "^1.0.30001093" + electron-to-chromium "^1.3.488" + escalade "^3.0.1" + node-releases "^1.1.58" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8= + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.npm.taobao.org/buffer-indexof/download/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + integrity sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow= + +buffer-json@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/buffer-json/download/buffer-json-2.0.0.tgz#f73e13b1e42f196fe2fd67d001c7d7107edd7c23" + integrity sha1-9z4TseQvGW/i/WfQAcfXEH7dfCM= + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/buffer-xor/download/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.npm.taobao.org/buffer/download/buffer-4.9.2.tgz?cache=0&sync_timestamp=1588706716358&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbuffer%2Fdownload%2Fbuffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha1-Iw6tNEACmIZEhBqwJEr4xEu+Pvg= + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/builtin-status-codes/download/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY= + +cacache@^12.0.2, cacache@^12.0.3: + version "12.0.4" + resolved "https://registry.npm.taobao.org/cacache/download/cacache-12.0.4.tgz?cache=0&sync_timestamp=1594428108619&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha1-ZovL0QWutfHZL+JVcOyVJcj6pAw= + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cacache@^13.0.1: + version "13.0.1" + resolved "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594428108619&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" + integrity sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw= + dependencies: + chownr "^1.1.2" + figgy-pudding "^3.5.1" + fs-minipass "^2.0.0" + glob "^7.1.4" + graceful-fs "^4.2.2" + infer-owner "^1.0.4" + lru-cache "^5.1.1" + minipass "^3.0.0" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + p-map "^3.0.0" + promise-inflight "^1.0.1" + rimraf "^2.7.1" + ssri "^7.0.0" + unique-filename "^1.1.1" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha1-Cn9GQWgxyLZi7jb+TnxZ129marI= + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cache-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/cache-loader/download/cache-loader-4.1.0.tgz#9948cae353aec0a1fcb1eafda2300816ec85387e" + integrity sha1-mUjK41OuwKH8ser9ojAIFuyFOH4= + dependencies: + buffer-json "^2.0.0" + find-cache-dir "^3.0.0" + loader-utils "^1.2.3" + mkdirp "^0.5.1" + neo-async "^2.6.1" + schema-utils "^2.0.0" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/call-me-maybe/download/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/caller-path/download/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M= + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz?cache=0&sync_timestamp=1576721717499&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamel-case%2Fdownload%2Fcamel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/camelcase-keys/download/camelcase-keys-2.1.0.tgz?cache=0&sync_timestamp=1585886152866&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase-keys%2Fdownload%2Fcamelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA= + +caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/caniuse-api/download/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA= + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001097: + version "1.0.30001103" + resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001103.tgz?cache=0&sync_timestamp=1595136891997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001103.tgz#fe81536d075b97cd013d4988c9212418faa289a8" + integrity sha1-/oFTbQdbl80BPUmIySEkGPqiiag= + +case-sensitive-paths-webpack-plugin@^2.3.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/case-sensitive-paths-webpack-plugin/download/case-sensitive-paths-webpack-plugin-2.3.0.tgz?cache=0&sync_timestamp=1579126505655&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcase-sensitive-paths-webpack-plugin%2Fdownload%2Fcase-sensitive-paths-webpack-plugin-2.3.0.tgz#23ac613cc9a856e4f88ff8bb73bbb5e989825cf7" + integrity sha1-I6xhPMmoVuT4j/i7c7u16YmCXPc= + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ= + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/chalk/download/chalk-3.0.0.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ= + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha1-ThSHCmGNni7dl92DRf2dncMVZGo= + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.npm.taobao.org/chardet/download/chardet-0.7.0.tgz?cache=0&sync_timestamp=1594010660915&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchardet%2Fdownload%2Fchardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha1-kAlISfCTfy7twkJdDSip5fDLrZ4= + +check-types@^8.0.3: + version "8.0.3" + resolved "https://registry.npm.taobao.org/check-types/download/check-types-8.0.3.tgz?cache=0&sync_timestamp=1579455317097&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheck-types%2Fdownload%2Fcheck-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" + integrity sha1-M1bMoZyIlUTy16le1JzlCKDs9VI= + +chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1594864779401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc= + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.4.0: + version "3.4.1" + resolved "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.1.tgz?cache=0&sync_timestamp=1594864779401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.1.tgz#e905bdecf10eaa0a0b1db0c664481cc4cbc22ba1" + integrity sha1-6QW97PEOqgoLHbDGZEgcxMvCK6E= + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + +chownr@^1.1.1, chownr@^1.1.2: + version "1.1.4" + resolved "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs= + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha1-I0CQ7pfH1K0aLEvq4nUF3v/GCKQ= + dependencies: + tslib "^1.9.0" + +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.npm.taobao.org/ci-info/download/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc= + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.npm.taobao.org/cipher-base/download/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha1-+TNprouafOAv1B+q0MqDAzGQxGM= + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +clean-css@4.2.x: + version "4.2.3" + resolved "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclean-css%2Fdownload%2Fclean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" + integrity sha1-UHtd59l7SO5T2ErbAWD/YhY4D3g= + dependencies: + source-map "~0.6.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/clean-stack/download/clean-stack-2.2.0.tgz?cache=0&sync_timestamp=1592035183333&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclean-stack%2Fdownload%2Fclean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha1-7oRy27Ep5yezHooQpCfe6d/kAIs= + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha1-JkMFp65JDR0Dvwybp8kl0XU68wc= + dependencies: + restore-cursor "^3.1.0" + +cli-highlight@^2.1.4: + version "2.1.4" + resolved "https://registry.npm.taobao.org/cli-highlight/download/cli-highlight-2.1.4.tgz?cache=0&sync_timestamp=1573949240542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-highlight%2Fdownload%2Fcli-highlight-2.1.4.tgz#098cb642cf17f42adc1c1145e07f960ec4d7522b" + integrity sha1-CYy2Qs8X9CrcHBFF4H+WDsTXUis= + dependencies: + chalk "^3.0.0" + highlight.js "^9.6.0" + mz "^2.4.0" + parse5 "^5.1.1" + parse5-htmlparser2-tree-adapter "^5.1.1" + yargs "^15.0.0" + +cli-spinners@^2.0.0: + version "2.4.0" + resolved "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-2.4.0.tgz?cache=0&sync_timestamp=1595080364429&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" + integrity sha1-xiVtsha4eM+6RyDnGc7Hz3JoXX8= + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/cli-width/download/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha1-ovSEN6LKqaIkNueUvwceyeYc7fY= + +clipboardy@^2.3.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz#3c2903650c68e46a91b388985bc2774287dba290" + integrity sha1-PCkDZQxo5GqRs4iYW8J3QofbopA= + dependencies: + arch "^2.1.1" + execa "^1.0.0" + is-wsl "^2.1.1" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/cliui/download/cliui-5.0.0.tgz?cache=0&sync_timestamp=1573943106490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U= + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz?cache=0&sync_timestamp=1573943106490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE= + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/clone-deep/download/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha1-wZ/Zvbv4WUK0/ZechNz31fB8I4c= + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +coa@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM= + dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0, color-convert@^1.9.1: + version "1.9.3" + resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg= + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM= + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha1-wqCah6y95pVD3m9j+jmVyCbFNqI= + +color-string@^1.5.2: + version "1.5.3" + resolved "https://registry.npm.taobao.org/color-string/download/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" + integrity sha1-ybvF8BtYtUkvPWhXRZy2WQziBMw= + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^3.0.0: + version "3.1.2" + resolved "https://registry.npm.taobao.org/color/download/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" + integrity sha1-aBSOf4XUGtdknF+oyBBvCY0inhA= + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + +colorette@^1.2.0: + version "1.2.1" + resolved "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz?cache=0&sync_timestamp=1593955762018&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8= + dependencies: + delayed-stream "~1.0.0" + +commander@2.17.x: + version "2.17.1" + resolved "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168214577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha1-vXerfebelCBc6sxy8XFtKfIKd78= + +commander@^2.18.0, commander@^2.20.0: + version "2.20.3" + resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1595168214577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha1-/UhehMA+tIgcIHIrpIA16FMa6zM= + +commander@~2.19.0: + version "2.19.0" + resolved "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1595168214577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So= + +common-tags@^1.8.0: + version "1.8.0" + resolved "https://registry.npm.taobao.org/common-tags/download/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" + integrity sha1-jjFT5ULUo56bEFVENK+q+YlWqTc= + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A= + +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.npm.taobao.org/compressible/download/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha1-r1PMprBw1MPAdQ+9dyhqbXzEb7o= + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48= + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ= + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-history-api-fallback@^1.6.0: + version "1.6.0" + resolved "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w= + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsole-browserify%2Fdownload%2Fconsole-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha1-ZwY871fOts9Jk6KrOlWECujEkzY= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +consolidate@^0.15.1: + version "0.15.1" + resolved "https://registry.npm.taobao.org/consolidate/download/consolidate-0.15.1.tgz#21ab043235c71a07d45d9aad98593b0dba56bab7" + integrity sha1-IasEMjXHGgfUXZqtmFk7DbpWurc= + dependencies: + bluebird "^3.1.1" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/contains-path/download/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70= + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js= + +convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI= + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525873712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo= + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha1-kilzmMrjSTf8r9bsgTnBgFHwteA= + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +copy-webpack-plugin@^5.1.1: + version "5.1.1" + resolved "https://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-5.1.1.tgz#5481a03dea1123d88a988c6ff8b78247214f0b88" + integrity sha1-VIGgPeoRI9iKmIxv+LeCRyFPC4g= + dependencies: + cacache "^12.0.3" + find-cache-dir "^2.1.0" + glob-parent "^3.1.0" + globby "^7.1.1" + is-glob "^4.0.1" + loader-utils "^1.2.3" + minimatch "^3.0.4" + normalize-path "^3.0.0" + p-limit "^2.2.1" + schema-utils "^1.0.0" + serialize-javascript "^2.1.2" + webpack-log "^2.0.0" + +core-js-compat@^3.6.2, core-js-compat@^3.6.5: + version "3.6.5" + resolved "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" + integrity sha1-KlHZpOJd/W5pAlGqgfmePAVIHxw= + dependencies: + browserslist "^4.8.5" + semver "7.0.0" + +core-js@^2.4.0: + version "2.6.11" + resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw= + +core-js@^3.6.5: + version "3.6.5" + resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cosmiconfig@^5.0.0: + version "5.2.1" + resolved "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha1-BA9yaAnFked6F8CjYmykW08Wixo= + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8= + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/create-hash/download/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY= + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.npm.taobao.org/create-hmac/download/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8= + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-3.0.1.tgz?cache=0&sync_timestamp=1590420971248&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + integrity sha1-ElYDfsufDF9549bvE14wdwGEuYI= + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz?cache=0&sync_timestamp=1590420971248&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz?cache=0&sync_timestamp=1590420971248&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q= + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1590420971248&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha1-9zqFudXUHQRVUcF34ogtSshXKKY= + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha1-OWz58xN/A+S45TLFj2mCVOAPgOw= + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +css-color-names@0.0.4, css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + +css-declaration-sorter@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" + integrity sha1-wZiUD2OnbX42wecQGLABchBUyyI= + dependencies: + postcss "^7.0.1" + timsort "^0.3.0" + +css-loader@^3.5.3: + version "3.6.0" + resolved "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1592056820460&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645" + integrity sha1-Lkssfm4tJ/jI8o9hv/zS5ske9kU= + dependencies: + camelcase "^5.3.1" + cssesc "^3.0.0" + icss-utils "^4.1.1" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.32" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^3.0.2" + postcss-modules-scope "^2.2.0" + postcss-modules-values "^3.0.0" + postcss-value-parser "^4.1.0" + schema-utils "^2.7.0" + semver "^6.3.0" + +css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc= + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz?cache=0&sync_timestamp=1573342118933&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-select%2Fdownload%2Fcss-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-select@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/css-select/download/css-select-2.1.0.tgz?cache=0&sync_timestamp=1573342118933&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-select%2Fdownload%2Fcss-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8= + dependencies: + boolbase "^1.0.0" + css-what "^3.2.1" + domutils "^1.7.0" + nth-check "^1.0.2" + +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.37.tgz?cache=0&sync_timestamp=1575583998203&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha1-mL69YsTB2flg7DQM+fdSLjBwmiI= + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + +css-tree@1.0.0-alpha.39: + version "1.0.0-alpha.39" + resolved "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.39.tgz?cache=0&sync_timestamp=1575583998203&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.39.tgz#2bff3ffe1bb3f776cf7eefd91ee5cba77a149eeb" + integrity sha1-K/8//huz93bPfu/ZHuXLp3oUnus= + dependencies: + mdn-data "2.0.6" + source-map "^0.6.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz?cache=0&sync_timestamp=1590961405812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI= + +css-what@^3.2.1: + version "3.3.0" + resolved "https://registry.npm.taobao.org/css-what/download/css-what-3.3.0.tgz?cache=0&sync_timestamp=1590961405812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-3.3.0.tgz#10fec696a9ece2e591ac772d759aacabac38cd39" + integrity sha1-EP7Glqns4uWRrHctdZqsq6w4zTk= + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4= + +cssnano-preset-default@^4.0.0, cssnano-preset-default@^4.0.7: + version "4.0.7" + resolved "https://registry.npm.taobao.org/cssnano-preset-default/download/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" + integrity sha1-UexmLM/KD4izltzZZ5zbkxvhf3Y= + dependencies: + css-declaration-sorter "^4.0.1" + cssnano-util-raw-cache "^4.0.1" + postcss "^7.0.0" + postcss-calc "^7.0.1" + postcss-colormin "^4.0.3" + postcss-convert-values "^4.0.1" + postcss-discard-comments "^4.0.2" + postcss-discard-duplicates "^4.0.2" + postcss-discard-empty "^4.0.1" + postcss-discard-overridden "^4.0.1" + postcss-merge-longhand "^4.0.11" + postcss-merge-rules "^4.0.3" + postcss-minify-font-values "^4.0.2" + postcss-minify-gradients "^4.0.2" + postcss-minify-params "^4.0.2" + postcss-minify-selectors "^4.0.2" + postcss-normalize-charset "^4.0.1" + postcss-normalize-display-values "^4.0.2" + postcss-normalize-positions "^4.0.2" + postcss-normalize-repeat-style "^4.0.2" + postcss-normalize-string "^4.0.2" + postcss-normalize-timing-functions "^4.0.2" + postcss-normalize-unicode "^4.0.1" + postcss-normalize-url "^4.0.1" + postcss-normalize-whitespace "^4.0.2" + postcss-ordered-values "^4.1.2" + postcss-reduce-initial "^4.0.3" + postcss-reduce-transforms "^4.0.2" + postcss-svgo "^4.0.2" + postcss-unique-selectors "^4.0.1" + +cssnano-util-get-arguments@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" + integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= + +cssnano-util-get-match@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= + +cssnano-util-raw-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" + integrity sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI= + dependencies: + postcss "^7.0.0" + +cssnano-util-same-parent@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" + integrity sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M= + +cssnano@^4.0.0, cssnano@^4.1.10: + version "4.1.10" + resolved "https://registry.npm.taobao.org/cssnano/download/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" + integrity sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI= + dependencies: + cosmiconfig "^5.0.0" + cssnano-preset-default "^4.0.7" + is-resolvable "^1.0.0" + postcss "^7.0.0" + +csso@^4.0.2: + version "4.0.3" + resolved "https://registry.npm.taobao.org/csso/download/csso-4.0.3.tgz?cache=0&sync_timestamp=1585052130344&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcsso%2Fdownload%2Fcsso-4.0.3.tgz#0d9985dc852c7cc2b2cacfbbe1079014d1a8e903" + integrity sha1-DZmF3IUsfMKyys+74QeQFNGo6QM= + dependencies: + css-tree "1.0.0-alpha.39" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.npm.taobao.org/currently-unhandled/download/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0= + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= + dependencies: + ms "2.0.0" + +debug@^3.1.1, debug@^3.2.5: + version "3.2.6" + resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha1-6D0X3hbYp++3cX7b5fsQE17uYps= + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E= + dependencies: + ms "^2.1.1" + +decamelize@^1.1.2, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-equal@^1.0.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o= + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +deepmerge@^1.5.2: + version "1.5.2" + resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1572279556265&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" + integrity sha1-EEmdhohEza1P7ghC34x/bwyVp1M= + +default-gateway@^4.2.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz?cache=0&sync_timestamp=1590419169708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdefault-gateway%2Fdownload%2Fdefault-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" + integrity sha1-FnEEx1AMIRX23WmwpTa7jtcgVSs= + dependencies: + execa "^1.0.0" + ip-regex "^2.1.0" + +default-gateway@^5.0.5: + version "5.0.5" + resolved "https://registry.npm.taobao.org/default-gateway/download/default-gateway-5.0.5.tgz?cache=0&sync_timestamp=1590419169708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdefault-gateway%2Fdownload%2Fdefault-gateway-5.0.5.tgz#4fd6bd5d2855d39b34cc5a59505486e9aafc9b10" + integrity sha1-T9a9XShV05s0zFpZUFSG6ar8mxA= + dependencies: + execa "^3.3.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE= + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha1-1Flono1lS6d+AqgX+HENcCyxbp0= + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +del@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" + integrity sha1-no8RciLqRKMf86FWwEm5kFKp8LQ= + dependencies: + "@types/glob" "^7.1.1" + globby "^6.1.0" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/des.js/download/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha1-U4IULhvcU/hdhtU+X0qn3rkeCEM= + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-node@^2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" + integrity sha1-AU7o+PZpxcWAI9pkuBecCDooxGw= + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha1-QOjumPVaIUlgcUaSHGPhrl89KHU= + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^2.0.0, dir-glob@^2.2.2: + version "2.2.2" + resolved "https://registry.npm.taobao.org/dir-glob/download/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha1-+gnwaUFTyJGLGLoN6vrpR2n8UMQ= + dependencies: + path-type "^3.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/dns-equal/download/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/dns-packet/download/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + integrity sha1-EqpCaYEHW+UAuRDu3NC0fdfe2lo= + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/dns-txt/download/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= + dependencies: + buffer-indexof "^1.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.npm.taobao.org/doctrine/download/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha1-rd6+rXKmV023g2OdyHoSF3OXOWE= + dependencies: + esutils "^2.0.2" + +dom-converter@^0.2: + version "0.2.0" + resolved "https://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha1-ZyGp2u4uKTaClVtq/kFncWJ7t2g= + dependencies: + utila "~0.4" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.2.2.tgz?cache=0&sync_timestamp=1589067464639&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdom-serializer%2Fdownload%2Fdom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E= + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto= + +domelementtype@1, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8= + +domelementtype@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" + integrity sha1-H4vf6R9aeAYydOgDtL3O326U+U0= + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha1-iAUJfpM9ZehVRvcm1g9euItE+AM= + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1, domutils@^1.7.0: + version "1.7.0" + resolved "https://registry.npm.taobao.org/domutils/download/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo= + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^5.2.0: + version "5.2.0" + resolved "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.2.0.tgz?cache=0&sync_timestamp=1572620518450&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" + integrity sha1-w07MKVVtxF8fTCJpe29JBODMT8s= + dependencies: + is-obj "^2.0.0" + +dotenv-expand@^5.1.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" + integrity sha1-P7rwIL/XlIhAcuomsel5HUWmKfA= + +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.npm.taobao.org/dotenv/download/dotenv-8.2.0.tgz?cache=0&sync_timestamp=1571190782798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdotenv%2Fdownload%2Fdotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha1-l+YZJZradQ7qPk6j4mvO6lQksWo= + +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk= + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +easy-stack@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/easy-stack/download/easy-stack-1.0.0.tgz#12c91b3085a37f0baa336e9486eac4bf94e3e788" + integrity sha1-EskbMIWjfwuqM26UhurEv5Tj54g= + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +ejs@^2.6.1: + version "2.7.4" + resolved "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz?cache=0&sync_timestamp=1589699559399&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fejs%2Fdownload%2Fejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" + integrity sha1-SGYSh1c9zFPjZsehrlLDoSDuybo= + +electron-to-chromium@^1.3.488: + version "1.3.501" + resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.501.tgz?cache=0&sync_timestamp=1595146857332&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.501.tgz#faa17a2cb0105ee30d5e1ca87eae7d8e85dd3175" + integrity sha1-+qF6LLAQXuMNXhyofq59joXdMXU= + +elliptic@^6.0.0, elliptic@^6.5.2: + version "6.5.3" + resolved "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz?cache=0&sync_timestamp=1592492754083&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha1-y1nrLv2vc6C9eMzXAVpirW4Pk9Y= + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY= + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc= + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha1-VXBmIEatKeLpFucariYKvf9Pang= + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha1-WuZKX0UFe682JuwU2gyl5LJDHrA= + dependencies: + once "^1.4.0" + +enhanced-resolve@^0.9.1: + version "0.9.1" + resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-0.9.1.tgz?cache=0&sync_timestamp=1594970571823&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + integrity sha1-TW5omzcl+GCQknzMhs2fFjW4ni4= + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + +enhanced-resolve@^4.1.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.3.0.tgz?cache=0&sync_timestamp=1594970571823&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" + integrity sha1-O4BvO/r8HsfeaVUe+TzKRsFwQSY= + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1591227405887&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha1-vfpzUplmTfr9NFKe1PhSKidf6lY= + +entities@^2.0.0: + version "2.0.3" + resolved "https://registry.npm.taobao.org/entities/download/entities-2.0.3.tgz?cache=0&sync_timestamp=1591227405887&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" + integrity sha1-XEh+V0Krk8Fau12iJ1m4WQ7AO38= + +errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg= + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha1-tKxAZIEH/c3PriQvQovqihTU8b8= + dependencies: + is-arrayish "^0.2.1" + +error-stack-parser@^2.0.0: + version "2.0.6" + resolved "https://registry.npm.taobao.org/error-stack-parser/download/error-stack-parser-2.0.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ferror-stack-parser%2Fdownload%2Ferror-stack-parser-2.0.6.tgz#5a99a707bd7a4c58a797902d48d82803ede6aad8" + integrity sha1-WpmnB716TFinl5AtSNgoA+3mqtg= + dependencies: + stackframe "^1.1.1" + +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5: + version "1.17.6" + resolved "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.6.tgz?cache=0&sync_timestamp=1592109129612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" + integrity sha1-kUIHFweFeyysx7iey2cDFsPi1So= + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.0" + is-regex "^1.1.0" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo= + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escalade@^3.0.1: + version "3.0.2" + resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.0.2.tgz?cache=0&sync_timestamp=1594742923342&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" + integrity sha1-algNcO24eIDyK0yR0NVgeN9pYsQ= + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1587627107924&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +eslint-config-standard@^14.1.0: + version "14.1.1" + resolved "https://registry.npm.taobao.org/eslint-config-standard/download/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha1-gwqOROeu995nRkl5rQa0BgJsVuo= + +eslint-import-resolver-node@^0.3.3: + version "0.3.4" + resolved "https://registry.npm.taobao.org/eslint-import-resolver-node/download/eslint-import-resolver-node-0.3.4.tgz?cache=0&sync_timestamp=1592328808853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-import-resolver-node%2Fdownload%2Feslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha1-hf+oGULCUBLYIxCW3fZ5wDBCxxc= + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-import-resolver-webpack@^0.12.1: + version "0.12.2" + resolved "https://registry.npm.taobao.org/eslint-import-resolver-webpack/download/eslint-import-resolver-webpack-0.12.2.tgz#769e86cd0c752a1536c19855ebd90aa14ce384ee" + integrity sha1-dp6GzQx1KhU2wZhV69kKoUzjhO4= + dependencies: + array-find "^1.0.0" + debug "^2.6.9" + enhanced-resolve "^0.9.1" + find-root "^1.1.0" + has "^1.0.3" + interpret "^1.2.0" + lodash "^4.17.15" + node-libs-browser "^1.0.0 || ^2.0.0" + resolve "^1.13.1" + semver "^5.7.1" + +eslint-loader@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/eslint-loader/download/eslint-loader-2.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-loader%2Fdownload%2Feslint-loader-2.2.1.tgz#28b9c12da54057af0845e2a6112701a2f6bf8337" + integrity sha1-KLnBLaVAV68IReKmEScBova/gzc= + dependencies: + loader-fs-cache "^1.0.0" + loader-utils "^1.0.2" + object-assign "^4.0.1" + object-hash "^1.1.4" + rimraf "^2.6.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.npm.taobao.org/eslint-module-utils/download/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha1-V569CU9Wr3eX0ZyYZsnJSGYpv6Y= + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.npm.taobao.org/eslint-plugin-es/download/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha1-dafN/czdwFiZNK7rOEF18iHFeJM= + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.20.2: + version "2.22.0" + resolved "https://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.22.0.tgz?cache=0&sync_timestamp=1593237350014&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-import%2Fdownload%2Feslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e" + integrity sha1-kvdzb+H94+Led2I8g43Zkv9f+34= + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.3" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.npm.taobao.org/eslint-plugin-node/download/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha1-yVVEQW7kraJnQKMEdO78VALcZx0= + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.npm.taobao.org/eslint-plugin-promise/download/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha1-hF/YsiYK2PglZMEiL85ErXHZQYo= + +eslint-plugin-standard@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/eslint-plugin-standard/download/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" + integrity sha1-/wUZ9/+v8RT3bRvXw5lu7w9uILQ= + +eslint-plugin-vue@^6.2.2: + version "6.2.2" + resolved "https://registry.npm.taobao.org/eslint-plugin-vue/download/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe" + integrity sha1-J/7NmjokeJsPER7N1UCp5WGY4P4= + dependencies: + natural-compare "^1.4.0" + semver "^5.6.0" + vue-eslint-parser "^7.0.0" + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha1-ygODMxD2iJoyZHgaqC5j65z+eEg= + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^5.0.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" + integrity sha1-0Plx3+WcaeDK2mhLI9Sdv4JgDOU= + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.4.3.tgz?cache=0&sync_timestamp=1592222029130&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8= + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1592222029130&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc= + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1592583167448&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha1-MOvR73wv3/AcOk8VEESvJfqwUj4= + +eslint@^6.7.2: + version "6.8.0" + resolved "https://registry.npm.taobao.org/eslint/download/eslint-6.8.0.tgz?cache=0&sync_timestamp=1595098492891&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint%2Fdownload%2Feslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha1-YiYtZylzn5J1cjgkMC+yJ8jJP/s= + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.3" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^6.1.2, espree@^6.2.1: + version "6.2.1" + resolved "https://registry.npm.taobao.org/espree/download/espree-6.2.1.tgz?cache=0&sync_timestamp=1595033738897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fespree%2Fdownload%2Fespree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha1-d/xy4f10SiBSwg84pbV1gy6Cc0o= + dependencies: + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha1-E7BM2z5sXRnfkatph6hpVhmwqnE= + +esquery@^1.0.1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/esquery/download/esquery-1.3.1.tgz?cache=0&sync_timestamp=1587061209806&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesquery%2Fdownload%2Fesquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha1-t4tYKKqOIU4p+3TE1bdS4cAz2lc= + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8= + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0= + +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha1-N0MJ05/ZNa5QDnuS6Ka0xyDllkI= + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +event-pubsub@4.3.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz#f68d816bc29f1ec02c539dc58c8dd40ce72cb36e" + integrity sha1-9o2Ba8KfHsAsU53FjI3UDOcss24= + +eventemitter3@^4.0.0: + version "4.0.4" + resolved "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.4.tgz?cache=0&sync_timestamp=1589283105849&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha1-tUY6zmNaCD0Bi9x8kXtMXxCoU4Q= + +events@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/events/download/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" + integrity sha1-hCea8bNMt1qoi/X/KR9tC9mzGlk= + +eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.npm.taobao.org/eventsource/download/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha1-j7xyyT/NNAiAkLwKTmT0tc7m2NA= + dependencies: + original "^1.0.0" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/evp_bytestokey/download/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI= + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.npm.taobao.org/execa/download/execa-0.8.0.tgz?cache=0&sync_timestamp=1594145159577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1594145159577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg= + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^3.3.0: + version "3.4.0" + resolved "https://registry.npm.taobao.org/execa/download/execa-3.4.0.tgz?cache=0&sync_timestamp=1594145159577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" + integrity sha1-wI7UVQ72XYWPrCaf/IVyRG8364k= + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + p-finally "^2.0.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +express@^4.16.3, express@^4.17.1: + version "4.17.1" + resolved "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&sync_timestamp=1585184310145&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ= + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo= + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.npm.taobao.org/external-editor/download/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha1-ywP3QL764D6k0oPK7SdBqD8zVJU= + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM= + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599651635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU= + +fast-glob@^2.2.6: + version "2.2.7" + resolved "https://registry.npm.taobao.org/fast-glob/download/fast-glob-2.2.7.tgz?cache=0&sync_timestamp=1592290365180&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-glob%2Fdownload%2Ffast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha1-aVOFfDr6R1//ku5gFdUtpwpM050= + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM= + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha1-XA6aiWjokSwoZjn96XeosgnyUI4= + dependencies: + websocket-driver ">=0.5.1" + +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha1-tO7oFIq7Adzx0aw0Nn1Z4S+mHW4= + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.npm.taobao.org/figures/download/figures-3.2.0.tgz?cache=0&sync_timestamp=1581865437156&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffigures%2Fdownload%2Ffigures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha1-YlwYvSk8YE3EqN2y/r8MiDQXRq8= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w= + dependencies: + flat-cache "^2.0.1" + +file-loader@^4.2.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/file-loader/download/file-loader-4.3.0.tgz#780f040f729b3d18019f20605f723e844b8a58af" + integrity sha1-eA8ED3KbPRgBnyBgX3I+hEuKWK8= + dependencies: + loader-utils "^1.2.3" + schema-utils "^2.5.0" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90= + +filesize@^3.6.1: + version "3.6.1" + resolved "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha1-CQuz7gG2+AGoqL6Z0xcQs0Irsxc= + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha1-GRmmp8df44ssfHflGYU12prN2kA= + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0= + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc= + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-cache-dir@^3.0.0, find-cache-dir@^3.3.1: + version "3.3.1" + resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + integrity sha1-ibM/rUpGcNqpT4Vff74x1thP6IA= + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/find-root/download/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha1-q8/Iunb3CMQql7PWhbfpRQv7nOQ= + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/find-up/download/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha1-SRafHXmTQwZG2mHsxa41XCHJe3M= + dependencies: + locate-path "^3.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk= + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/flat-cache/download/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA= + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.npm.taobao.org/flatted/download/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha1-RXWyHivO50NKqb5mL0t7X5wrUTg= + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug= + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +follow-redirects@^1.0.0: + version "1.12.1" + resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.12.1.tgz?cache=0&sync_timestamp=1592518530318&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6" + integrity sha1-3lSmIFMRuT1gOY68Ac9wFWgjErY= + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz?cache=0&sync_timestamp=1573027040291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y= + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/from2/download/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha1-DYUhIuW8W+tFP7Ao6cDJvzY0DJQ= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha1-TxicRKoSO4lfcigE9V6iPq3DSOk= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz?cache=0&sync_timestamp=1579628301705&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-minipass%2Fdownload%2Ffs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs= + dependencies: + minipass "^3.0.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg= + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4= + +fstream@^1.0.0, fstream@^1.0.12: + version "1.0.12" + resolved "https://registry.npm.taobao.org/fstream/download/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" + integrity sha1-Touo7i1Ivk99DeUFRVVI6uWTIEU= + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0= + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^1.0.0: + version "1.1.3" + resolved "https://registry.npm.taobao.org/gaze/download/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + integrity sha1-xEFzPhO5J6yMD/C0w7Az8ogSkko= + dependencies: + globule "^1.0.0" + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgensync%2Fdownload%2Fgensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha1-WPQ2H/mH5f9uHnohCCeqNx6qwmk= + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha1-T5RBKoLbMvNuOwuXQfipf+sDH34= + +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.npm.taobao.org/get-own-enumerable-property-symbols/download/get-own-enumerable-property-symbols-3.0.2.tgz?cache=0&sync_timestamp=1575993668197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-own-enumerable-property-symbols%2Fdownload%2Fget-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha1-tf3nfyLL4185C04ImSLFC85u9mQ= + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/get-stdin/download/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha1-wbJVV189wh1Zv8ec09K0axw6VLU= + dependencies: + pump "^3.0.0" + +get-stream@^5.0.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/get-stream/download/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha1-ASA83JJZf5uQkGfD5lbMH008Tck= + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz?cache=0&sync_timestamp=1584836110944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0, glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz?cache=0&sync_timestamp=1584836110944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha1-tsHvQXxOVmPqSY8cRa+saRa7wik= + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/glob-to-regexp/download/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.1: + version "7.1.6" + resolved "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY= + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4= + +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.npm.taobao.org/globals/download/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg= + dependencies: + type-fest "^0.8.1" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.npm.taobao.org/globby/download/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA= + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +globby@^9.2.0: + version "9.2.0" + resolved "https://registry.npm.taobao.org/globby/download/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" + integrity sha1-/QKacGxwPSm90XD0tts6P3p8tj0= + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.2" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + +globule@^1.0.0: + version "1.3.2" + resolved "https://registry.npm.taobao.org/globule/download/globule-1.3.2.tgz?cache=0&sync_timestamp=1591641769816&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobule%2Fdownload%2Fglobule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4" + integrity sha1-2L3Z6eTu+PluJFmZpd7n612FKcQ= + dependencies: + glob "~7.1.1" + lodash "~4.17.10" + minimatch "~3.0.2" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.2: + version "4.2.4" + resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz?cache=0&sync_timestamp=1588086876757&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha1-Ila94U02MpWMRl68ltxGfKB6Kfs= + +gzip-size@^5.0.0: + version "5.1.1" + resolved "https://registry.npm.taobao.org/gzip-size/download/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha1-y5vuaS+HwGErIyhAqHOQTkwTUnQ= + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha1-hX95zjWVgMNA1DCBzGSJcNC7I04= + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha1-HvievT5JllV2de7ZiTEQ3DUPoIA= + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-ansi%2Fdownload%2Fhas-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s= + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz?cache=0&sync_timestamp=1573950719586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-symbols%2Fdownload%2Fhas-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.0, has@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y= + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/hash-base/download/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha1-VcOB2eBuHSmXqIO0o/3f5/DTrzM= + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash-sum@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04" + integrity sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ= + +hash-sum@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" + integrity sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo= + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.npm.taobao.org/hash.js/download/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I= + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.x, he@^1.1.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha1-hK5l+n6vsWX922FWauFLrwVmTw8= + +hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4= + +highlight.js@^9.6.0: + version "9.18.1" + resolved "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" + integrity sha1-7SGqAB/mJSuxCj121HVzxlOf4Tw= + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoopy@^0.1.4: + version "0.1.4" + resolved "https://registry.npm.taobao.org/hoopy/download/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" + integrity sha1-YJIH1mEQADOpqUAq096mdzgcGx0= + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.8.tgz?cache=0&sync_timestamp=1594428017031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha1-dTm9S8Hg4KiVgVouAmJCCxKFhIg= + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + +hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/hsla-regex/download/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + +html-comment-regex@^1.1.0: + version "1.1.2" + resolved "https://registry.npm.taobao.org/html-comment-regex/download/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" + integrity sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c= + +html-entities@^1.3.1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/html-entities/download/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" + integrity sha1-+5oaS1sUxdq6gtPjTGrk/nAaDkQ= + +html-minifier@^3.2.3: + version "3.5.21" + resolved "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw= + dependencies: + camel-case "3.0.x" + clean-css "4.2.x" + commander "2.17.x" + he "1.2.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-tags@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz#10b30a386085f43cede353cc8fa7cb0deeea668b" + integrity sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos= + +html-webpack-plugin@^3.2.0: + version "3.2.0" + resolved "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + integrity sha1-sBq71yOsqqeze2r0SS69oD2d03s= + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + +htmlparser2@^3.3.0: + version "3.10.1" + resolved "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha1-vWedw/WYl7ajS7EHSchVu1OpOS8= + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407676273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz?cache=0&sync_timestamp=1593407676273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.3.tgz?cache=0&sync_timestamp=1593407676273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha1-bGGeT5xgMIw4UZSYwU+7EKrOuwY= + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-parser-js@>=0.5.1: + version "0.5.2" + resolved "https://registry.npm.taobao.org/http-parser-js/download/http-parser-js-0.5.2.tgz?cache=0&sync_timestamp=1572714277347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-parser-js%2Fdownload%2Fhttp-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" + integrity sha1-2i4x0jezk6rnKs5DiC3X4nCo/3c= + +http-proxy-middleware@0.19.1: + version "0.19.1" + resolved "https://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" + integrity sha1-GDx9xKoUeRUDBkmMIQza+WCApDo= + dependencies: + http-proxy "^1.17.0" + is-glob "^4.0.0" + lodash "^4.17.11" + micromatch "^3.1.10" + +http-proxy@^1.17.0: + version "1.18.1" + resolved "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz?cache=0&sync_timestamp=1589778321455&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy%2Fdownload%2Fhttp-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk= + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz?cache=0&sync_timestamp=1585807874533&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-signature%2Fdownload%2Fhttp-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/human-signals/download/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha1-xbHNFPUK6uCatsWf5jujOV/k36M= + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= + dependencies: + safer-buffer ">= 2.1.2 < 3" + +icss-utils@^4.0.0, icss-utils@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc= + dependencies: + postcss "^7.0.14" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q= + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM= + +ignore@^4.0.3, ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw= + +ignore@^5.1.1: + version "5.1.8" + resolved "https://registry.npm.taobao.org/ignore/download/ignore-5.1.8.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha1-8VCotQo0KJsz4i9YiavU2AFvDlc= + +import-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" + integrity sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk= + dependencies: + import-from "^2.1.0" + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/import-fresh/download/import-fresh-2.0.0.tgz?cache=0&sync_timestamp=1573665028675&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.2.1.tgz?cache=0&sync_timestamp=1573665028675&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha1-Yz/2GFBueTr1rJG/SLcmd+FcvmY= + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-from@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/import-from/download/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" + integrity sha1-M1238qev/VOqpHHUuAId7ja387E= + dependencies: + resolve-from "^3.0.0" + +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha1-VQcL44pZk88Y72236WH1vuXFoJ0= + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +in-publish@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/in-publish/download/in-publish-2.0.1.tgz?cache=0&sync_timestamp=1584389407092&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fin-publish%2Fdownload%2Fin-publish-2.0.1.tgz#948b1a535c8030561cea522f73f78f4be357e00c" + integrity sha1-lIsaU1yAMFYc6lIvc/ePS+NX4Aw= + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/indent-string/download/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE= + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + +infer-owner@^1.0.3, infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha1-xM78qo5RBRwqQLos6KPScpWvlGc= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w= + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +inquirer@^7.0.0, inquirer@^7.1.0: + version "7.3.2" + resolved "https://registry.npm.taobao.org/inquirer/download/inquirer-7.3.2.tgz#25245d2e32dc9f33dbe26eeaada231daa66e9c7c" + integrity sha1-JSRdLjLcnzPb4m7qraIx2qZunHw= + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.16" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +internal-ip@^4.3.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" + integrity sha1-hFRSuq2dLKO2nGNaE3rLmg2tCQc= + dependencies: + default-gateway "^4.2.0" + ipaddr.js "^1.9.0" + +interpret@^1.2.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/interpret/download/interpret-1.4.0.tgz?cache=0&sync_timestamp=1591167206134&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finterpret%2Fdownload%2Finterpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4= + +invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY= + dependencies: + loose-envify "^1.0.0" + +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +ipaddr.js@1.9.1, ipaddr.js@^1.9.0: + version "1.9.1" + resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM= + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + +is-absolute-url@^3.0.3: + version "3.0.3" + resolved "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" + integrity sha1-lsaiK2ojkpsR6gr7GDbDatSl1pg= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY= + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/is-arguments/download/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha1-P6+WbHy6D/Q3+zH2JQCC/PBEjPM= + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha1-RXSirlb3qyBolvtDHq7tBm/fjwM= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk= + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz?cache=0&sync_timestamp=1588707106955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha1-76ouqdqg16suoTqXsritUf776L4= + +is-callable@^1.1.4, is-callable@^1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/is-callable/download/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" + integrity sha1-gzNlYLVKOONeOi33r9BFTWkUaLs= + +is-ci@^1.0.10: + version "1.2.1" + resolved "https://registry.npm.taobao.org/is-ci/download/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw= + dependencies: + ci-info "^1.5.0" + +is-color-stop@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc= + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.2.tgz?cache=0&sync_timestamp=1576729293199&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-date-object%2Fdownload%2Fis-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha1-vac28s2P0G0yhE53Q7+nSUw7/X4= + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco= + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw= + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-docker@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-docker/download/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b" + integrity sha1-LLDfDnXi0GT+GGTDfN6st7Lc8ls= + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ= + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-finite/download/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha1-kEE1x3+0LAZB1qobzbxNqo2ggvM= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0= + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw= + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss= + +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI= + +is-path-cwd@^2.0.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s= + +is-path-in-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha1-v+Lcomxp85cmWkAJljYCk1oFOss= + dependencies: + is-path-inside "^2.1.0" + +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/is-path-inside/download/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha1-fJgQWH1lmkDSe8201WFuqwWUlLI= + dependencies: + path-is-inside "^1.0.2" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz?cache=0&sync_timestamp=1593243670545&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-object%2Fdownload%2Fis-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc= + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.4, is-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-regex/download/is-regex-1.1.0.tgz#ece38e389e490df0dc21caea2bd596f987f767ff" + integrity sha1-7OOOOJ5JDfDcIcrqK9WW+Yf3Z/8= + dependencies: + has-symbols "^1.0.1" + +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/is-regexp/download/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg= + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-stream/download/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha1-venDJoDW+uBBKdasnZIc54FfeOM= + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.npm.taobao.org/is-string/download/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha1-QEk+0ZjvP/R3uMf5L2ROyCpc06Y= + +is-svg@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/is-svg/download/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" + integrity sha1-kyHb0pwhLlypnE+peUxxS8r6L3U= + dependencies: + html-comment-regex "^1.1.0" + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha1-OOEBS55jKb4N6dJKQU/XRB7GGTc= + dependencies: + has-symbols "^1.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.npm.taobao.org/is-utf8/download/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0= + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE= + dependencies: + is-docker "^2.0.0" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +javascript-stringify@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-2.0.1.tgz#6ef358035310e35d667c675ed63d3eb7c1aa19e5" + integrity sha1-bvNYA1MQ411mfGde1j0+t8GqGeU= + +jest-worker@^25.4.0: + version "25.5.0" + resolved "https://registry.npm.taobao.org/jest-worker/download/jest-worker-25.5.0.tgz?cache=0&sync_timestamp=1592925425543&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-worker%2Fdownload%2Fjest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha1-JhHQcbec6g9D7lej0RhZOsFUfbE= + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + +js-base64@^2.1.8: + version "2.6.3" + resolved "https://registry.npm.taobao.org/js-base64/download/js-base64-2.6.3.tgz?cache=0&sync_timestamp=1595031192756&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-base64%2Fdownload%2Fjs-base64-2.6.3.tgz#7afdb9b57aa7717e15d370b66e8f36a9cb835dc3" + integrity sha1-ev25tXqncX4V03C2bo82qcuDXcM= + +js-message@1.0.5: + version "1.0.5" + resolved "https://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz#2300d24b1af08e89dd095bc1a4c9c9cfcb892d15" + integrity sha1-IwDSSxrwjondCVvBpMnJz8uJLRU= + +js-queue@2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/js-queue/download/js-queue-2.0.0.tgz#362213cf860f468f0125fc6c96abc1742531f948" + integrity sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug= + dependencies: + easy-stack "^1.0.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha1-GSA/tZmR35jjoocFDUZHzerzJJk= + +js-yaml@^3.13.1: + version "3.14.0" + resolved "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.0.tgz?cache=0&sync_timestamp=1590172246873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha1-p6NBcPJqIbsWJCTYray0ETpp5II= + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha1-afaofZUTq4u4/mO9sJecRI5oRmA= + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/json-stable-stringify/download/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json3@^3.3.2: + version "3.3.3" + resolved "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + integrity sha1-f8EON1/FrkLEcFpcwKpvYr4wW4E= + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz?cache=0&sync_timestamp=1586045693798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz?cache=0&sync_timestamp=1586045693798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4= + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.1.3" + resolved "https://registry.npm.taobao.org/json5/download/json5-2.1.3.tgz?cache=0&sync_timestamp=1586045693798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" + integrity sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM= + dependencies: + minimist "^1.2.5" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.npm.taobao.org/jsonify/download/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +killable@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" + integrity sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI= + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha1-cpyR4thXt6QZofmqZWhcTDP1hF0= + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0= + +launch-editor-middleware@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/launch-editor-middleware/download/launch-editor-middleware-2.2.1.tgz#e14b07e6c7154b0a4b86a0fd345784e45804c157" + integrity sha1-4UsH5scVSwpLhqD9NFeE5FgEwVc= + dependencies: + launch-editor "^2.2.1" + +launch-editor@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/launch-editor/download/launch-editor-2.2.1.tgz#871b5a3ee39d6680fcc26d37930b6eeda89db0ca" + integrity sha1-hxtaPuOdZoD8wm03kwtu7aidsMo= + dependencies: + chalk "^2.3.0" + shell-quote "^1.6.1" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/leven/download/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha1-d4kd6DQGTMy6gq54QrtrFKE+1/I= + +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/levenary/download/levenary-1.1.1.tgz?cache=0&sync_timestamp=1580182863535&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flevenary%2Fdownload%2Flevenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha1-hCqe6Y0gdap/ru2+MmeekgX0b3c= + dependencies: + leven "^3.1.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/load-json-file/download/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-fs-cache@^1.0.0: + version "1.0.3" + resolved "https://registry.npm.taobao.org/loader-fs-cache/download/loader-fs-cache-1.0.3.tgz#f08657646d607078be2f0a032f8bd69dd6f277d9" + integrity sha1-8IZXZG1gcHi+LwoDL4vWndbyd9k= + dependencies: + find-cache-dir "^0.1.1" + mkdirp "^0.5.1" + +loader-runner@^2.3.1, loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz?cache=0&sync_timestamp=1593786187106&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-runner%2Fdownload%2Floader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c= + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha1-xXm140yzSxp07cbB+za/o3HVphM= + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4= + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha1-Gvujlq/WdqbUJQTQpno6frn2KqA= + dependencies: + p-locate "^4.1.0" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/lodash._reinterpolate/download/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.defaultsdeep@^4.6.1: + version "4.6.1" + resolved "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" + integrity sha1-US6b1yHSctlOPTpjZT+hdRZ0HKY= + +lodash.kebabcase@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY= + +lodash.mapvalues@^4.6.0: + version "4.6.0" + resolved "https://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + integrity sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw= + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.npm.taobao.org/lodash.template/download/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha1-+XYZXPPzR9DV9SSDVp/oAxzM6Ks= + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/lodash.templatesettings/download/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha1-5IExDwSdPPbUfpEq0JMTsVTw+zM= + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash.transform@^4.6.0: + version "4.6.0" + resolved "https://registry.npm.taobao.org/lodash.transform/download/lodash.transform-4.6.0.tgz#12306422f63324aed8483d3f38332b5f670547a0" + integrity sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A= + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + +lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.19, lodash@^4.17.3, lodash@~4.17.10: + version "4.17.19" + resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.19.tgz?cache=0&sync_timestamp=1594226827854&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha1-5I3e2+MLMyF4PFtDAfvTU7weSks= + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo= + dependencies: + chalk "^2.0.1" + +loglevel@^1.6.8: + version "1.6.8" + resolved "https://registry.npm.taobao.org/loglevel/download/loglevel-1.6.8.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floglevel%2Fdownload%2Floglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" + integrity sha1-iiX7ddCSIw7NRFcnDYC1TigBEXE= + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8= + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.npm.taobao.org/loud-rejection/download/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= + +lru-cache@^4.0.1, lru-cache@^4.1.2: + version "4.1.5" + resolved "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427573763&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80= + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427573763&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA= + dependencies: + yallist "^3.0.2" + +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU= + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8= + dependencies: + semver "^6.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/map-obj/download/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha1-tdB7jjIW4+J81yjXL3DR5qNCAF8= + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1593510482566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs= + +mdn-data@2.0.6: + version "2.0.6" + resolved "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.6.tgz?cache=0&sync_timestamp=1593510482566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.6.tgz#852dc60fcaa5daa2e8cf6c9189c440ed3e042978" + integrity sha1-hS3GD8ql2qLoz2yRicRA7T4EKXg= + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +memory-fs@^0.2.0: + version "0.2.0" + resolved "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.2.0.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" + integrity sha1-8rslNovBIeORwlIN6Slpyu4KApA= + +memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.5.0.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha1-MkwBKIuIZSlm0WHbd4OHIIRajjw= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.7.0: + version "3.7.0" + resolved "https://registry.npm.taobao.org/meow/download/meow-3.7.0.tgz?cache=0&sync_timestamp=1589206039620&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmeow%2Fdownload%2Fmeow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-source-map@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" + integrity sha1-L93n5gIJOfcJBqaPLXrmheTIxkY= + dependencies: + source-map "^0.6.1" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A= + +merge2@^1.2.3: + version "1.4.1" + resolved "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz?cache=0&sync_timestamp=1591169980723&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmerge2%2Fdownload%2Fmerge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4= + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha1-cIWbyVyYQJUvNZoGij/En57PrCM= + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/miller-rabin/download/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha1-8IA1HIZbDcViqEYpZtqlNUPHik0= + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I= + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz?cache=0&sync_timestamp=1587700357245&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8= + dependencies: + mime-db "1.44.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE= + +mime@^2.4.4: + version "2.4.6" + resolved "https://registry.npm.taobao.org/mime/download/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" + integrity sha1-5bQHyQ20QvK+tbFiNz0Htpr/pNE= + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI= + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs= + +mini-css-extract-plugin@^0.9.0: + version "0.9.0" + resolved "https://registry.npm.taobao.org/mini-css-extract-plugin/download/mini-css-extract-plugin-0.9.0.tgz?cache=0&sync_timestamp=1576856499989&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmini-css-extract-plugin%2Fdownload%2Fmini-css-extract-plugin-0.9.0.tgz#47f2cf07aa165ab35733b1fc97d4c46c0564339e" + integrity sha1-R/LPB6oWWrNXM7H8l9TEbAVkM54= + dependencies: + loader-utils "^1.1.0" + normalize-url "1.9.1" + schema-utils "^1.0.0" + webpack-sources "^1.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/minimalistic-assert/download/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc= + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM= + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI= + +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/minipass-collect/download/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc= + dependencies: + minipass "^3.0.0" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.npm.taobao.org/minipass-flush/download/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M= + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2: + version "1.2.3" + resolved "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.3.tgz#55f7839307d74859d6e8ada9c3ebe72cec216a34" + integrity sha1-VfeDkwfXSFnW6K2pw+vnLOwhajQ= + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0, minipass@^3.1.1: + version "3.1.3" + resolved "https://registry.npm.taobao.org/minipass/download/minipass-3.1.3.tgz?cache=0&sync_timestamp=1589332658869&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass%2Fdownload%2Fminipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha1-fUL/HzljVILhX5zbUxhN7r1YFf0= + dependencies: + yallist "^4.0.0" + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/mississippi/download/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha1-6goykfl+C16HdrNj1fChLZTGcCI= + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY= + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: + version "0.5.5" + resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8= + dependencies: + minimist "^1.2.5" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo= + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk= + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/multicast-dns-service-types/download/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.npm.taobao.org/multicast-dns/download/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + integrity sha1-oOx72QVcQoL3kMPIL04o2zsxsik= + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha1-FjDEKyJR/4HiooPelqVJfqkuXg0= + +mz@^2.4.0: + version "2.7.0" + resolved "https://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI= + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +nan@^2.12.1, nan@^2.13.2: + version "2.14.1" + resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.1.tgz?cache=0&sync_timestamp=1587497111086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha1-174036MQW5FJTDFHCJMV7/iHSwE= + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk= + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs= + +neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: + version "2.6.2" + resolved "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.2.tgz?cache=0&sync_timestamp=1594317361810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fneo-async%2Fdownload%2Fneo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha1-tKr7k+OustgXTKU88WOrfXMIMF8= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz?cache=0&sync_timestamp=1584699726257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnice-try%2Fdownload%2Fnice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y= + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw= + dependencies: + lower-case "^1.1.1" + +node-forge@0.9.0: + version "0.9.0" + resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" + integrity sha1-1iQFDtu0SHStyhK7mlLsY8t4JXk= + +node-gyp@^3.8.0: + version "3.8.0" + resolved "https://registry.npm.taobao.org/node-gyp/download/node-gyp-3.8.0.tgz?cache=0&sync_timestamp=1591154882624&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-gyp%2Fdownload%2Fnode-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" + integrity sha1-VAMEJhwzDoDQ1e3OJTpoyzlkIYw= + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "^2.87.0" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + +node-ipc@^9.1.1: + version "9.1.1" + resolved "https://registry.npm.taobao.org/node-ipc/download/node-ipc-9.1.1.tgz#4e245ed6938e65100e595ebc5dc34b16e8dd5d69" + integrity sha1-TiRe1pOOZRAOWV68XcNLFujdXWk= + dependencies: + event-pubsub "4.3.0" + js-message "1.0.5" + js-queue "2.0.0" + +"node-libs-browser@^1.0.0 || ^2.0.0", node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha1-tk9RPRgzhiX5A0bSew0jXmMfZCU= + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +node-releases@^1.1.58: + version "1.1.59" + resolved "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.59.tgz?cache=0&sync_timestamp=1594212217047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.59.tgz#4d648330641cec704bff10f8e4fe28e453ab8e8e" + integrity sha1-TWSDMGQc7HBL/xD45P4o5FOrjo4= + +node-sass@^4.12.0: + version "4.14.1" + resolved "https://registry.npm.taobao.org/node-sass/download/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5" + integrity sha1-mch+wu+3BH7WOPtMnbfzpC4iF7U= + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash "^4.17.15" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.13.2" + node-gyp "^3.8.0" + npmlog "^4.0.0" + request "^2.88.0" + sass-graph "2.2.5" + stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" + +"nopt@2 || 3": + version "3.0.6" + resolved "https://registry.npm.taobao.org/nopt/download/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg= + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/normalize-path/download/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + integrity sha1-MtDkcvkf80VwHBWoMRAY07CpA3k= + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU= + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + +normalize-url@1.9.1: + version "1.9.1" + resolved "https://registry.npm.taobao.org/normalize-url/download/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw= + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +normalize-url@^3.0.0: + version "3.3.0" + resolved "https://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha1-suHE3E98bVd0PfczpPWXjRhlBVk= + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-run-path%2Fdownload%2Fnpm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-run-path%2Fdownload%2Fnpm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha1-t+zR5e1T2o43pV4cImnguX7XSOo= + dependencies: + path-key "^3.0.0" + +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0: + version "4.1.2" + resolved "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha1-CKfyqL9zRgR3mp76StXMcXq7lUs= + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@^1.0.2, nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw= + dependencies: + boolbase "~1.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz?cache=0&sync_timestamp=1581061562193&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnumber-is-nan%2Fdownload%2Fnumber-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU= + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-hash@^1.1.4: + version "1.3.1" + resolved "https://registry.npm.taobao.org/object-hash/download/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha1-/eRSCYqVHLFF8Dm7fUVUSd3BJt8= + +object-inspect@^1.7.0: + version "1.8.0" + resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.8.0.tgz?cache=0&sync_timestamp=1592545089271&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" + integrity sha1-34B+Xs9TpgnMa/6T6sPMe+WzqdA= + +object-is@^1.0.1: + version "1.1.2" + resolved "https://registry.npm.taobao.org/object-is/download/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha1-xdLof/nhGfeLegiEQVGeLuwVc7Y= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha1-HEfyct8nfzsdrwYWd9nILiMixg4= + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/object.assign/download/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha1-lovxEA15Vrs8oIbwBvhGs7xACNo= + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha1-Npvx+VktiridcS3O1cuBx8U1Jkk= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +object.values@^1.1.0, object.values@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/object.values/download/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha1-aKmezeNWt+kpWjxeDOMdyMlT3l4= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4= + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8= + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/onetime/download/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha1-//DzyRYX/mK7UBiWNumayKbfe+U= + dependencies: + mimic-fn "^2.1.0" + +open@^6.3.0: + version "6.4.0" + resolved "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz?cache=0&sync_timestamp=1595208413967&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopen%2Fdownload%2Fopen-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk= + dependencies: + is-wsl "^1.1.0" + +opener@^1.5.1: + version "1.5.1" + resolved "https://registry.npm.taobao.org/opener/download/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" + integrity sha1-bS8Od/GgrwAyrKcWwsH7uOfoq+0= + +opn@^5.5.0: + version "5.5.0" + resolved "https://registry.npm.taobao.org/opn/download/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" + integrity sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w= + dependencies: + is-wsl "^1.1.0" + +optionator@^0.8.3: + version "0.8.3" + resolved "https://registry.npm.taobao.org/optionator/download/optionator-0.8.3.tgz?cache=0&sync_timestamp=1585966238288&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Foptionator%2Fdownload%2Foptionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha1-hPodA2/p08fiHZmIS2ARZ+yPtJU= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +ora@^3.4.0: + version "3.4.0" + resolved "https://registry.npm.taobao.org/ora/download/ora-3.4.0.tgz?cache=0&sync_timestamp=1594997563446&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" + integrity sha1-vwdSSRBZo+8+1MhQl1Md6f280xg= + dependencies: + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-spinners "^2.0.0" + log-symbols "^2.2.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + +original@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + integrity sha1-5EKmHP/hxf0gpl8yYcJmY7MD8l8= + dependencies: + url-parse "^1.4.3" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/os-browserify/download/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@0: + version "0.1.5" + resolved "https://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha1-hc36+uso6Gd/QW4odZK18/SepBA= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-finally@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/p-finally/download/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" + integrity sha1-vW/KqcVZoJa2gIBvTWV7Pw8kBWE= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/p-limit/download/p-limit-1.3.0.tgz?cache=0&sync_timestamp=1594559711554&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg= + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.3.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559711554&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE= + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ= + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha1-o0KLtwiLOmApL2aRkni3wpetTwc= + dependencies: + p-limit "^2.2.0" + +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha1-MQko/u+cnsxltosXaTAYpmXOoXU= + +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/p-map/download/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha1-1wTZr4orpoTiYA2aIVmD1BQal50= + dependencies: + aggregate-error "^3.0.0" + +p-retry@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz?cache=0&sync_timestamp=1572521210242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-retry%2Fdownload%2Fp-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" + integrity sha1-MWtMiJPiyNwc+okfQGxLQivr8yg= + dependencies: + retry "^0.12.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/p-try/download/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha1-yyhoVA4xPWHeWPr741zpAE1VQOY= + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.npm.taobao.org/pako/download/pako-1.0.11.tgz?cache=0&sync_timestamp=1580283988434&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpako%2Fdownload%2Fpako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha1-bJWZ00DVTf05RjgCUqNXBaa5kr8= + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/parallel-transform/download/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw= + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI= + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.5" + resolved "https://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha1-ADJxND2ljclMrOSU+u89IUfs6g4= + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/parse-json/download/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha1-c+URTJhtFD76NxLU6iTbmkJm9g8= + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + +parse5-htmlparser2-tree-adapter@^5.1.1: + version "5.1.1" + resolved "https://registry.npm.taobao.org/parse5-htmlparser2-tree-adapter/download/parse5-htmlparser2-tree-adapter-5.1.1.tgz#e8c743d4e92194d5293ecde2b08be31e67461cbc" + integrity sha1-6MdD1OkhlNUpPs3isIvjHmdGHLw= + dependencies: + parse5 "^5.1.1" + +parse5@^5.1.1: + version "5.1.1" + resolved "https://registry.npm.taobao.org/parse5/download/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha1-9o5OW6GFKsLK3AD0VV//bCq7YXg= + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ= + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.npm.taobao.org/path-browserify/download/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha1-5sTd1+06onxoogzE5Q4aTug7vEo= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha1-UTvb4tO5XXdi6METfvoZXGxhtbM= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz?cache=0&sync_timestamp=1574441404712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1574441404712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha1-1i27VnlAXXLEc37FhgDp3c8G0kw= + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz?cache=0&sync_timestamp=1574278831909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/path-type/download/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/path-type/download/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/path-type/download/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha1-zvMdyOCho7sNEFwM2Xzzv0f0428= + dependencies: + pify "^3.0.0" + +pbkdf2@^3.0.3: + version "3.1.1" + resolved "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz?cache=0&sync_timestamp=1591275785449&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpbkdf2%2Fdownload%2Fpbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha1-y4cksPramEWWhW0abrr9NYRlS5Q= + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha1-IfMz6ba46v8CRo9RRupAbTRfTa0= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + dependencies: + find-up "^1.0.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM= + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM= + dependencies: + find-up "^4.0.0" + +pnp-webpack-plugin@^1.6.4: + version "1.6.4" + resolved "https://registry.npm.taobao.org/pnp-webpack-plugin/download/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149" + integrity sha1-yXEaxNxIpoXauvyG+Lbdn434QUk= + dependencies: + ts-pnp "^1.1.6" + +portfinder@^1.0.26: + version "1.0.26" + resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" + integrity sha1-R1ZY1WyjC+1yrH8TeO01C9G2TnA= + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-calc@^7.0.1: + version "7.0.2" + resolved "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.2.tgz#504efcd008ca0273120568b0792b16cdcde8aac1" + integrity sha1-UE780AjKAnMSBWiweSsWzc3oqsE= + dependencies: + postcss "^7.0.27" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.2" + +postcss-colormin@^4.0.3: + version "4.0.3" + resolved "https://registry.npm.taobao.org/postcss-colormin/download/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" + integrity sha1-rgYLzpPteUrHEmTwgTLVUJVr04E= + dependencies: + browserslist "^4.0.0" + color "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-convert-values@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" + integrity sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-discard-comments@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" + integrity sha1-H7q9LCRr/2qq15l7KwkY9NevQDM= + dependencies: + postcss "^7.0.0" + +postcss-discard-duplicates@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" + integrity sha1-P+EzzTyCKC5VD8myORdqkge3hOs= + dependencies: + postcss "^7.0.0" + +postcss-discard-empty@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" + integrity sha1-yMlR6fc+2UKAGUWERKAq2Qu592U= + dependencies: + postcss "^7.0.0" + +postcss-discard-overridden@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" + integrity sha1-ZSrvipZybwKfXj4AFG7npOdV/1c= + dependencies: + postcss "^7.0.0" + +postcss-load-config@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" + integrity sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM= + dependencies: + cosmiconfig "^5.0.0" + import-cwd "^2.0.0" + +postcss-loader@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" + integrity sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0= + dependencies: + loader-utils "^1.1.0" + postcss "^7.0.0" + postcss-load-config "^2.0.0" + schema-utils "^1.0.0" + +postcss-merge-longhand@^4.0.11: + version "4.0.11" + resolved "https://registry.npm.taobao.org/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" + integrity sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ= + dependencies: + css-color-names "0.0.4" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + stylehacks "^4.0.0" + +postcss-merge-rules@^4.0.3: + version "4.0.3" + resolved "https://registry.npm.taobao.org/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" + integrity sha1-NivqT/Wh+Y5AdacTxsslrv75plA= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + cssnano-util-same-parent "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + vendors "^1.0.0" + +postcss-minify-font-values@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" + integrity sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-gradients@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" + integrity sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE= + dependencies: + cssnano-util-get-arguments "^4.0.0" + is-color-stop "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-params@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" + integrity sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ= + dependencies: + alphanum-sort "^1.0.0" + browserslist "^4.0.0" + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + uniqs "^2.0.0" + +postcss-minify-selectors@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" + integrity sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g= + dependencies: + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha1-gYcZoa4doyX5gyRGsBE27rSTzX4= + dependencies: + postcss "^7.0.5" + +postcss-modules-local-by-default@^3.0.2: + version "3.0.2" + resolved "https://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-3.0.2.tgz#e8a6561be914aaf3c052876377524ca90dbb7915" + integrity sha1-6KZWG+kUqvPAUodjd1JMqQ27eRU= + dependencies: + icss-utils "^4.1.1" + postcss "^7.0.16" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.0" + +postcss-modules-scope@^2.2.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha1-OFyuATzHdD9afXYC0Qc6iequYu4= + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" + integrity sha1-W1AA1uuuKbQlUwG0o6VFdEI+fxA= + dependencies: + icss-utils "^4.0.0" + postcss "^7.0.6" + +postcss-normalize-charset@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" + integrity sha1-izWt067oOhNrBHHg1ZvlilAoXdQ= + dependencies: + postcss "^7.0.0" + +postcss-normalize-display-values@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" + integrity sha1-Db4EpM6QY9RmftK+R2u4MMglk1o= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-positions@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" + integrity sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8= + dependencies: + cssnano-util-get-arguments "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-repeat-style@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" + integrity sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw= + dependencies: + cssnano-util-get-arguments "^4.0.0" + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-string@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" + integrity sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw= + dependencies: + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-timing-functions@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" + integrity sha1-jgCcoqOUnNr4rSPmtquZy159KNk= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-unicode@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" + integrity sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-url@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" + integrity sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE= + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-whitespace@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" + integrity sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-ordered-values@^4.1.2: + version "4.1.2" + resolved "https://registry.npm.taobao.org/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" + integrity sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4= + dependencies: + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-reduce-initial@^4.0.3: + version "4.0.3" + resolved "https://registry.npm.taobao.org/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" + integrity sha1-f9QuvqXpyBRgljniwuhK4nC6SN8= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + +postcss-reduce-transforms@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" + integrity sha1-F++kBerMbge+NBSlyi0QdGgdTik= + dependencies: + cssnano-util-get-match "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-selector-parser@^3.0.0: + version "3.1.2" + resolved "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" + integrity sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA= + dependencies: + dot-prop "^5.2.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: + version "6.0.2" + resolved "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + integrity sha1-k0z3mdAWyDQRhZ4J3Oyt4BKG7Fw= + dependencies: + cssesc "^3.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/postcss-svgo/download/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" + integrity sha1-F7mXvHEbMzurFDqu07jT1uPTglg= + dependencies: + is-svg "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + svgo "^1.0.0" + +postcss-unique-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" + integrity sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w= + dependencies: + alphanum-sort "^1.0.0" + postcss "^7.0.0" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.0: + version "3.3.1" + resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083303810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha1-n/giVH4okyE88cMO+lGsX9G6goE= + +postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz?cache=0&sync_timestamp=1588083303810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha1-RD9qIM7WSBor2k+oUypuVdeJoss= + +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.32" + resolved "https://registry.npm.taobao.org/postcss/download/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" + integrity sha1-QxDW7jRwU9o0M9sr5JKIPWLOxZ0= + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz?cache=0&sync_timestamp=1585868608597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprelude-ls%2Fdownload%2Fprelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prettier@^1.18.2: + version "1.19.1" + resolved "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha1-99f1/4qc2HKnvkyhQglZVqYHl8s= + +pretty-bytes@^5.1.0: + version "5.3.0" + resolved "https://registry.npm.taobao.org/pretty-bytes/download/pretty-bytes-5.3.0.tgz#f2849e27db79fb4d6cfe24764fc4134f165989f2" + integrity sha1-8oSeJ9t5+01s/iR2T8QTTxZZifI= + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM= + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha1-eCDZsWEgzFXKmud5JoCufbptf+I= + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha1-foz42PW48jnBvGi+tOt4Vn1XLvg= + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz?cache=0&sync_timestamp=1582556112011&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fproxy-addr%2Fdownload%2Fproxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8= + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ= + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.npm.taobao.org/public-encrypt/download/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha1-T8ydd6B+SLp1J+fL4N4z0HATMeA= + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk= + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ= + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.npm.taobao.org/pumpify/download/pumpify-1.5.1.tgz?cache=0&sync_timestamp=1569938200736&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpumpify%2Fdownload%2Fpumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4= + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.npm.taobao.org/punycode/download/punycode-1.3.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpunycode%2Fdownload%2Fpunycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpunycode%2Fdownload%2Fpunycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpunycode%2Fdownload%2Fpunycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew= + +q@^1.1.2: + version "1.5.1" + resolved "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw= + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha1-yzroBuh0BERYTvFUzo7pjUA/PjY= + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz?cache=0&sync_timestamp=1591853319485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s= + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +querystringify@^2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/querystringify/download/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + integrity sha1-YOWl/WSn+L+k0qsu1v30yFutFU4= + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo= + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.npm.taobao.org/randomfill/download/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha1-ySGW/IarQr6YPxvzF3giSTHWFFg= + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE= + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha1-oc5vucm8NWylLoklarWQWeE9AzI= + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/read-pkg/download/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +read-pkg@^5.1.1: + version "5.2.0" + resolved "https://registry.npm.taobao.org/read-pkg/download/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w= + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha1-M3u9o63AcGvT4CRCaihtS0sskZg= + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha1-DodiKjMlqjPokihcr4tOhGUppSU= + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.npm.taobao.org/readdirp/download/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha1-n9zN+ekVWAVEkiGsZF6DA6tbmto= + dependencies: + picomatch "^2.2.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/redent/download/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://registry.npm.taobao.org/regenerate-unicode-properties/download/regenerate-unicode-properties-8.2.0.tgz?cache=0&sync_timestamp=1583947186031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerate-unicode-properties%2Fdownload%2Fregenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + integrity sha1-5d5xEdZV57pgwFfb6f83yH5lzew= + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.1" + resolved "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f" + integrity sha1-ytkq2Oa1kXc0hfvgWkhcr09Ffm8= + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk= + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha1-2Hih0JS0MG0QuQlkhLM+vVXiZpc= + +regenerator-transform@^0.14.2: + version "0.14.5" + resolved "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.5.tgz?cache=0&sync_timestamp=1593557394730&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-transform%2Fdownload%2Fregenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" + integrity sha1-yY2hVGg2ccnE3LFuznNlF+G3/rQ= + dependencies: + "@babel/runtime" "^7.8.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw= + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp.prototype.flags@^1.2.0: + version "1.3.0" + resolved "https://registry.npm.taobao.org/regexp.prototype.flags/download/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha1-erqJs8E6ZFCdq888qNn7ub31y3U= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/regexpp/download/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha1-jRnTHPYySCtYkEn4KB+T28uk0H8= + +regexpp@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/regexpp/download/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI= + +regexpu-core@^4.7.0: + version "4.7.0" + resolved "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" + integrity sha1-/L9FjFBDGwu3tF1pZ7gZLZHz2Tg= + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + +register-service-worker@^1.7.1: + version "1.7.1" + resolved "https://registry.npm.taobao.org/register-service-worker/download/register-service-worker-1.7.1.tgz#6308347ac6c0af0f6c0b22ea5d59d25e836bc932" + integrity sha1-Ywg0esbArw9sCyLqXVnSXoNryTI= + +regjsgen@^0.5.1: + version "0.5.2" + resolved "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM= + +regjsparser@^0.6.4: + version "0.6.4" + resolved "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" + integrity sha1-p2n4aEMIQBpm6bUp0kNv9NBmYnI= + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +renderkid@^2.0.1: + version "2.0.3" + resolved "https://registry.npm.taobao.org/renderkid/download/renderkid-2.0.3.tgz#380179c2ff5ae1365c522bf2fcfcff01c5b74149" + integrity sha1-OAF5wv9a4TZcUivy/Pz/AcW3QUk= + dependencies: + css-select "^1.1.0" + dom-converter "^0.2" + htmlparser2 "^3.3.0" + strip-ansi "^3.0.0" + utila "^0.4.0" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4= + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/repeating/download/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +request@^2.87.0, request@^2.88.0, request@^2.88.2: + version "2.88.2" + resolved "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM= + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs= + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.8.1: + version "1.17.0" + resolved "https://registry.npm.taobao.org/resolve/download/resolve-1.17.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha1-sllBtUloIxzC0bt2p5y38sC/hEQ= + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha1-OfZ8VLOnpYzqUjbZXPADQjljH34= + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w= + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.npm.taobao.org/retry/download/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/rgb-regex/download/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + +rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + +rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: + version "2.7.1" + resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w= + dependencies: + glob "^7.1.3" + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha1-stEE/g2Psnz54KHNqCYt04M8bKs= + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.npm.taobao.org/ripemd160/download/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw= + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha1-hEDsz5nqPnC9QJ1JqriOEMGJpFU= + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rxjs@^6.6.0: + version "6.6.0" + resolved "https://registry.npm.taobao.org/rxjs/download/rxjs-6.6.0.tgz?cache=0&sync_timestamp=1593795160008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frxjs%2Fdownload%2Frxjs-6.6.0.tgz#af2901eedf02e3a83ffa7f886240ff9018bbec84" + integrity sha1-rykB7t8C46g/+n+IYkD/kBi77IQ= + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129103371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0= + +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz?cache=0&sync_timestamp=1589129103371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY= + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= + +sass-graph@2.2.5: + version "2.2.5" + resolved "https://registry.npm.taobao.org/sass-graph/download/sass-graph-2.2.5.tgz?cache=0&sync_timestamp=1588596720960&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsass-graph%2Fdownload%2Fsass-graph-2.2.5.tgz#a981c87446b8319d96dce0671e487879bd24c2e8" + integrity sha1-qYHIdEa4MZ2W3OBnHkh4eb0kwug= + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + scss-tokenizer "^0.2.3" + yargs "^13.3.2" + +sass-loader@^8.0.2: + version "8.0.2" + resolved "https://registry.npm.taobao.org/sass-loader/download/sass-loader-8.0.2.tgz?cache=0&sync_timestamp=1594134152417&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsass-loader%2Fdownload%2Fsass-loader-8.0.2.tgz#debecd8c3ce243c76454f2e8290482150380090d" + integrity sha1-3r7NjDziQ8dkVPLoKQSCFQOACQ0= + dependencies: + clone-deep "^4.0.1" + loader-utils "^1.2.3" + neo-async "^2.6.1" + schema-utils "^2.6.1" + semver "^6.3.0" + +sax@~1.2.4: + version "1.2.4" + resolved "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha1-KBYjTiN4vdxOU1T6tcqold9xANk= + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A= + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.6.6, schema-utils@^2.7.0: + version "2.7.0" + resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" + integrity sha1-FxUfdtjq5n+793lgwzxnatn078c= + dependencies: + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" + +scss-tokenizer@^0.2.3: + version "0.2.3" + resolved "https://registry.npm.taobao.org/scss-tokenizer/download/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" + integrity sha1-jrBtualyMzOCTT9VMGQRSYR85dE= + dependencies: + js-base64 "^2.1.8" + source-map "^0.4.2" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= + +selfsigned@^1.10.7: + version "1.10.7" + resolved "https://registry.npm.taobao.org/selfsigned/download/selfsigned-1.10.7.tgz?cache=0&sync_timestamp=1569952074772&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fselfsigned%2Fdownload%2Fselfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" + integrity sha1-2lgZ/QSdVXTyjoipvMbbxubzkGs= + dependencies: + node-forge "0.9.0" + +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.1: + version "5.7.1" + resolved "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha1-qVT5Ma66UI0we78Gnv8MAclhFvc= + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.npm.taobao.org/semver/download/semver-7.0.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha1-XzyjV2HkfgWyBsba/yz4FPAxa44= + +semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0= + +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.npm.taobao.org/semver/download/semver-5.3.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= + +send@0.17.1: + version "0.17.1" + resolved "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg= + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@^2.1.2: + version "2.1.2" + resolved "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-2.1.2.tgz?cache=0&sync_timestamp=1591623621018&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" + integrity sha1-7OxTsOAxe9yV73arcHS3OEeF+mE= + +serialize-javascript@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-3.1.0.tgz?cache=0&sync_timestamp=1591623621018&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-3.1.0.tgz#8bf3a9170712664ef2561b44b691eafe399214ea" + integrity sha1-i/OpFwcSZk7yVhtEtpHq/jmSFOo= + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk= + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha1-oY1AUw5vB95CKMfe/kInr4ytAFs= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM= + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.npm.taobao.org/sha.js/download/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.npm.taobao.org/shallow-clone/download/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha1-jymBrZJTH1UDWwH7IwdppA4C76M= + dependencies: + kind-of "^6.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo= + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI= + +shell-quote@^1.6.1: + version "1.7.2" + resolved "https://registry.npm.taobao.org/shell-quote/download/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw= + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q= + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY= + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha1-bBdfhv8UvbByRWPo88GwIaKGhTs= + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI= + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0= + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.npm.taobao.org/sockjs-client/download/sockjs-client-1.4.0.tgz?cache=0&sync_timestamp=1566505930428&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsockjs-client%2Fdownload%2Fsockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha1-yfJWjhnI/YFztJl+o0IOC7MGx9U= + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + +sockjs@0.3.20: + version "0.3.20" + resolved "https://registry.npm.taobao.org/sockjs/download/sockjs-0.3.20.tgz#b26a283ec562ef8b2687b44033a4eeceac75d855" + integrity sha1-smooPsVi74smh7RAM6Tuzqx12FU= + dependencies: + faye-websocket "^0.10.0" + uuid "^3.4.0" + websocket-driver "0.6.5" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ= + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz?cache=0&sync_timestamp=1584829475930&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-resolve%2Fdownload%2Fsource-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho= + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@~0.5.12: + version "0.5.19" + resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719289626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha1-qYti+G3K9PZzmWSMCFKRq56P7WE= + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.4.2: + version "0.4.4" + resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + integrity sha1-66T12pwNyZneaAMti092FzZSA2s= + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM= + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz?cache=0&sync_timestamp=1590162035755&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-correct%2Fdownload%2Fspdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha1-3s6BrJweZxPl99G28X1Gj6U9iak= + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz?cache=0&sync_timestamp=1587422410312&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-exceptions%2Fdownload%2Fspdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0= + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha1-z3D1BILu/cmOPOCmgz5KU87rpnk= + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha1-NpS1gEVnpFjTyARYQqY1hjL2JlQ= + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/spdy-transport/download/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha1-ANSGOmQArXXfkzYaFghgXl3NzzE= + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.npm.taobao.org/spdy/download/spdy-4.0.2.tgz?cache=0&sync_timestamp=1585970558936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdy%2Fdownload%2Fspdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha1-t09GYgOj7aRSwCSSuR+56EonZ3s= + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha1-fLCd2jqGWFcFxks5pkZgOGguj+I= + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha1-+2YcC+8ps520B2nuOfpwCT1vaHc= + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg= + dependencies: + figgy-pudding "^3.5.1" + +ssri@^7.0.0, ssri@^7.1.0: + version "7.1.0" + resolved "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-7.1.0.tgz#92c241bf6de82365b5c7fb4bd76e975522e1294d" + integrity sha1-ksJBv23oI2W1x/tL126XVSLhKU0= + dependencies: + figgy-pudding "^3.5.1" + minipass "^3.1.1" + +stable@^0.1.8: + version "0.1.8" + resolved "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88= + +stackframe@^1.1.1: + version "1.2.0" + resolved "https://registry.npm.taobao.org/stackframe/download/stackframe-1.2.0.tgz?cache=0&sync_timestamp=1590854072754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstackframe%2Fdownload%2Fstackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303" + integrity sha1-UkKUktY8YuuYmATBFVLj0i53kwM= + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1587327902535&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stdout-stream@^1.4.0: + version "1.4.1" + resolved "https://registry.npm.taobao.org/stdout-stream/download/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de" + integrity sha1-WsF0zdXNcmEEqgwLK9g4FdjVNd4= + dependencies: + readable-stream "^2.0.1" + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.npm.taobao.org/stream-browserify/download/stream-browserify-2.0.2.tgz?cache=0&sync_timestamp=1587041545531&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-browserify%2Fdownload%2Fstream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha1-h1IdOKRKp+6RzhzSpH3wy0ndZgs= + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.npm.taobao.org/stream-each/download/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha1-6+J6DDibBPvMIzZClS4Qcxr6m64= + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.npm.taobao.org/stream-http/download/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw= + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz?cache=0&sync_timestamp=1576147178936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-shift%2Fdownload%2Fstream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha1-1wiCgVWasneEJCebCHfaPDktWj0= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0: + version "2.1.1" + resolved "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4= + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha1-InZ74htirxCBV0MG9prFG2IgOWE= + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha1-lSGCxGzHssMT0VluYjmSvRY7crU= + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha1-hYEqa4R6wAInD1gIFGBkyZX7aRM= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimstart@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha1-FK9tnzSwU/fPyJty+PLuFLkDmlQ= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4= + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha1-nPFhG6YmhdcDCunkujQUnDrwP8g= + dependencies: + safe-buffer "~5.1.0" + +stringify-object@^3.3.0: + version "3.3.0" + resolved "https://registry.npm.taobao.org/stringify-object/download/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha1-cDBlrvyhkwDTzoivT1s5VtdVZik= + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4= + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI= + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/strip-bom/download/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-comments@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/strip-comments/download/strip-comments-1.0.2.tgz#82b9c45e7f05873bee53f37168af930aa368679d" + integrity sha1-grnEXn8FhzvuU/NxaK+TCqNoZ50= + dependencies: + babel-extract-comments "^1.0.0" + babel-plugin-transform-object-rest-spread "^6.26.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/strip-final-newline/download/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0= + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/strip-indent/download/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/strip-indent/download/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +strip-json-comments@^3.0.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1594567543744&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY= + +stylehacks@^4.0.0: + version "4.0.3" + resolved "https://registry.npm.taobao.org/stylehacks/download/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" + integrity sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha1-4uaaRKyHcveKHsCzW2id9lMO/I8= + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha1-B2Srxpxj1ayELdSGfo0CXogN+PM= + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E= + dependencies: + has-flag "^4.0.0" + +svg-tags@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" + integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= + +svgo@^1.0.0: + version "1.3.2" + resolved "https://registry.npm.taobao.org/svgo/download/svgo-1.3.2.tgz?cache=0&sync_timestamp=1572433264480&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsvgo%2Fdownload%2Fsvgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc= + dependencies: + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" + js-yaml "^3.13.1" + mkdirp "~0.5.1" + object.values "^1.1.0" + sax "~1.2.4" + stable "^0.1.8" + unquote "~1.1.1" + util.promisify "~1.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.npm.taobao.org/table/download/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha1-EpLRlQDOP4YFOwXw6Ofko7shB54= + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +tapable@^0.1.8: + version "0.1.10" + resolved "https://registry.npm.taobao.org/tapable/download/tapable-0.1.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" + integrity sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q= + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha1-ofzMBrWNth/XpF2i2kT186Pme6I= + +tar@^2.0.0: + version "2.2.2" + resolved "https://registry.npm.taobao.org/tar/download/tar-2.2.2.tgz?cache=0&sync_timestamp=1588021629368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar%2Fdownload%2Ftar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" + integrity sha1-DKiEhWLHKZuLRG/2pNYM27I+3EA= + dependencies: + block-stream "*" + fstream "^1.0.12" + inherits "2" + +terser-webpack-plugin@^1.4.3: + version "1.4.4" + resolved "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.4.tgz?cache=0&sync_timestamp=1594910725460&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.4.tgz#2c63544347324baafa9a56baaddf1634c8abfc2f" + integrity sha1-LGNUQ0cyS6r6mla6rd8WNMir/C8= + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^3.1.0" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser-webpack-plugin@^2.3.6: + version "2.3.7" + resolved "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.7.tgz?cache=0&sync_timestamp=1594910725460&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.7.tgz#4910ff5d1a872168cc7fa6cd3749e2b0d60a8a0b" + integrity sha1-SRD/XRqHIWjMf6bNN0nisNYKigs= + dependencies: + cacache "^13.0.1" + find-cache-dir "^3.3.1" + jest-worker "^25.4.0" + p-limit "^2.3.0" + schema-utils "^2.6.6" + serialize-javascript "^3.1.0" + source-map "^0.6.1" + terser "^4.6.12" + webpack-sources "^1.4.3" + +terser@^4.1.2, terser@^4.6.12: + version "4.8.0" + resolved "https://registry.npm.taobao.org/terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1593953630973&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc= + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.npm.taobao.org/thenify-all/download/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.npm.taobao.org/thenify/download/thenify-3.3.1.tgz?cache=0&sync_timestamp=1592413466879&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthenify%2Fdownload%2Fthenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8= + dependencies: + any-promise "^1.0.0" + +thread-loader@^2.1.3: + version "2.1.3" + resolved "https://registry.npm.taobao.org/thread-loader/download/thread-loader-2.1.3.tgz#cbd2c139fc2b2de6e9d28f62286ab770c1acbdda" + integrity sha1-y9LBOfwrLebp0o9iKGq3cMGsvdo= + dependencies: + loader-runner "^2.3.1" + loader-utils "^1.1.0" + neo-async "^2.6.0" + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz?cache=0&sync_timestamp=1593478643560&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrough2%2Fdownload%2Fthrough2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0= + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.npm.taobao.org/thunky/download/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha1-Wrr3FKlAXbBQRzK7zNLO3Z75U30= + +timers-browserify@^2.0.4: + version "2.0.11" + resolved "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha1-gAsfPu4nLlvFPuRloE0OgEwxIR8= + dependencies: + setimmediate "^1.0.4" + +timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz?cache=0&sync_timestamp=1588178571895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftmp%2Fdownload%2Ftmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha1-bTQzWIl2jSGyvNoKonfO07G/rfk= + dependencies: + os-tmpdir "~1.0.2" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz?cache=0&sync_timestamp=1580550296062&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ= + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4= + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM= + +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha1-zZ+yoKodWhK0c72fuW+j3P9lreI= + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/trim-newlines/download/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + +"true-case-path@^1.0.2": + version "1.0.3" + resolved "https://registry.npm.taobao.org/true-case-path/download/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d" + integrity sha1-+BO1qMhrQNpZYGcisUTjIleZ9H0= + dependencies: + glob "^7.1.2" + +tryer@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" + integrity sha1-8shUBoALmw90yfdGW4HqrSQSUvg= + +ts-pnp@^1.1.6: + version "1.2.0" + resolved "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz?cache=0&sync_timestamp=1585245753622&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fts-pnp%2Fdownload%2Fts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" + integrity sha1-pQCtCEsHmPHDBxrzkeZZEshrypI= + +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.npm.taobao.org/tsconfig-paths/download/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha1-CYVHpsREiAfo/Ljq4IEGTumjyQs= + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.9.0: + version "1.13.0" + resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha1-yIHhPMcBWJTtkUhi0nZDb6mkcEM= + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha1-l6vwhyMQ/tiKXEZrJWgVdhReM/E= + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha1-jSojcNPfiG61yQraHFv2GIrPg4s= + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha1-CeJJ696FHTseSNJ8EFREZn8XuD0= + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha1-TlUs0F3wlGfcvE73Od6J8s83wTE= + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +uglify-js@3.4.x: + version "3.4.10" + resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1592744803278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" + integrity sha1-mtlWPY6zrN+404WX0q8dgV9qdV8= + dependencies: + commander "~2.19.0" + source-map "~0.6.1" + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha1-JhmADEyCWADv3YNDr33Zkzy+KBg= + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha1-jtKjJWmWG86SJ9Cc0/+7j+1fAgw= + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.2.0.tgz?cache=0&sync_timestamp=1583948924460&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funicode-match-property-value-ecmascript%2Fdownload%2Funicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + integrity sha1-DZH2AO7rMJaqlisdb8iIduZOpTE= + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.1.0" + resolved "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" + integrity sha1-3Vepn2IHvt/0Yoq++5TFDblByPQ= + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/uniq/download/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA= + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha1-uqvOkQg/xk6UWw861hPiZPfNTmw= + dependencies: + imurmurhash "^0.1.4" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY= + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unquote@~1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz?cache=0&sync_timestamp=1567458131109&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupath%2Fdownload%2Fupath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ= + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz?cache=0&sync_timestamp=1575601671982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupper-case%2Fdownload%2Fupper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha1-lMVA4f93KVbiKZUHwBCupsiDjrA= + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz?cache=0&sync_timestamp=1585438689517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furix%2Fdownload%2Furix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-loader@^2.2.0: + version "2.3.0" + resolved "https://registry.npm.taobao.org/url-loader/download/url-loader-2.3.0.tgz#e0e2ef658f003efb8ca41b0f3ffbf76bab88658b" + integrity sha1-4OLvZY8APvuMpBsPP/v3a6uIZYs= + dependencies: + loader-utils "^1.2.3" + mime "^2.4.4" + schema-utils "^2.5.0" + +url-parse@^1.4.3: + version "1.4.7" + resolved "https://registry.npm.taobao.org/url-parse/download/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + integrity sha1-qKg1NejACjFuQDpdtKwbm4U64ng= + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.npm.taobao.org/url/download/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8= + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA= + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +util.promisify@~1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha1-a693dLgO6w91INi4HQeYKlmruu4= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz?cache=0&sync_timestamp=1588238435623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.npm.taobao.org/util/download/util-0.11.1.tgz?cache=0&sync_timestamp=1588238435623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE= + dependencies: + inherits "2.0.3" + +utila@^0.4.0, utila@~0.4: + version "0.4.0" + resolved "https://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2, uuid@^3.4.0: + version "3.4.0" + resolved "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1592944180280&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4= + +v8-compile-cache@^2.0.3: + version "2.1.1" + resolved "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.1.1.tgz?cache=0&sync_timestamp=1590871613090&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv8-compile-cache%2Fdownload%2Fv8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" + integrity sha1-VLw83UMxe8qR413K8wWxpyN950U= + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha1-/JH2uce6FchX9MssXe/uw51PQQo= + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +vendors@^1.0.0: + version "1.0.4" + resolved "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579858502549&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" + integrity sha1-4rgApT56Kbk1BsPPQRANFsTErY4= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha1-eGQcSIuObKkadfUR56OzKobl3aA= + +vue-eslint-parser@^7.0.0: + version "7.1.0" + resolved "https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-7.1.0.tgz?cache=0&sync_timestamp=1589539012061&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-eslint-parser%2Fdownload%2Fvue-eslint-parser-7.1.0.tgz#9cdbcc823e656b087507a1911732b867ac101e83" + integrity sha1-nNvMgj5lawh1B6GRFzK4Z6wQHoM= + dependencies: + debug "^4.1.1" + eslint-scope "^5.0.0" + eslint-visitor-keys "^1.1.0" + espree "^6.2.1" + esquery "^1.0.1" + lodash "^4.17.15" + +vue-hot-reload-api@^2.3.0: + version "2.3.4" + resolved "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2" + integrity sha1-UylVzB6yCKPZkLOp+acFdGV+CPI= + +vue-loader@^15.9.2: + version "15.9.3" + resolved "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.9.3.tgz?cache=0&sync_timestamp=1593355818681&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-15.9.3.tgz#0de35d9e555d3ed53969516cac5ce25531299dda" + integrity sha1-DeNdnlVdPtU5aVFsrFziVTEpndo= + dependencies: + "@vue/component-compiler-utils" "^3.1.0" + hash-sum "^1.0.2" + loader-utils "^1.1.0" + vue-hot-reload-api "^2.3.0" + vue-style-loader "^4.1.0" + +vue-router@^3.2.0: + version "3.3.4" + resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.3.4.tgz?cache=0&sync_timestamp=1594139127797&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.3.4.tgz#4e38abc34a11c41b6c3d8244449a2e363ba6250b" + integrity sha1-Tjirw0oRxBtsPYJERJouNjumJQs= + +vue-style-loader@^4.1.0, vue-style-loader@^4.1.2: + version "4.1.2" + resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8" + integrity sha1-3t80mAbyXOtOZPOtfApE+6c1/Pg= + dependencies: + hash-sum "^1.0.2" + loader-utils "^1.0.2" + +vue-template-compiler@^2.6.11: + version "2.6.11" + resolved "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080" + integrity sha1-wEcE749JixUxMAGJk+VjCdRpgIA= + dependencies: + de-indent "^1.0.2" + he "^1.1.0" + +vue-template-es2015-compiler@^1.9.0: + version "1.9.1" + resolved "https://registry.npm.taobao.org/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" + integrity sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU= + +vue@^2.6.11: + version "2.6.11" + resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5" + integrity sha1-dllNh31LEiNEBuhONSdcbVFBJcU= + +vuex@^3.4.0: + version "3.5.1" + resolved "https://registry.npm.taobao.org/vuex/download/vuex-3.5.1.tgz#f1b8dcea649bc25254cf4f4358081dbf5da18b3d" + integrity sha1-8bjc6mSbwlJUz09DWAgdv12hiz0= + +watchpack-chokidar2@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz#9948a1866cbbd6cb824dea13a7ed691f6c8ddff0" + integrity sha1-mUihhmy71suCTeoTp+1pH2yN3/A= + dependencies: + chokidar "^2.1.8" + +watchpack@^1.6.1: + version "1.7.2" + resolved "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" + integrity sha1-wC5NTUmRPD5+EiwzJTZa+dMx6ao= + dependencies: + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.0" + watchpack-chokidar2 "^2.0.0" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.npm.taobao.org/wbuf/download/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha1-wdjRSTFtPqhShIiVy2oL/oh7h98= + dependencies: + minimalistic-assert "^1.0.0" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/wcwidth/download/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +webpack-bundle-analyzer@^3.8.0: + version "3.8.0" + resolved "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.8.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.8.0.tgz#ce6b3f908daf069fd1f7266f692cbb3bded9ba16" + integrity sha1-zms/kI2vBp/R9yZvaSy7O97ZuhY= + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + bfj "^6.1.1" + chalk "^2.4.1" + commander "^2.18.0" + ejs "^2.6.1" + express "^4.16.3" + filesize "^3.6.1" + gzip-size "^5.0.0" + lodash "^4.17.15" + mkdirp "^0.5.1" + opener "^1.5.1" + ws "^6.0.0" + +webpack-chain@^6.4.0: + version "6.5.0" + resolved "https://registry.npm.taobao.org/webpack-chain/download/webpack-chain-6.5.0.tgz#0b4af2094a5058a9ccd34b8f7ab194de4c83365f" + integrity sha1-C0ryCUpQWKnM00uPerGU3kyDNl8= + dependencies: + deepmerge "^1.5.2" + javascript-stringify "^2.0.1" + +webpack-dev-middleware@^3.7.2: + version "3.7.2" + resolved "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&sync_timestamp=1594744507965&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" + integrity sha1-ABnD23FuP6XOy/ZPKriKdLqzMfM= + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@^3.11.0: + version "3.11.0" + resolved "https://registry.npm.taobao.org/webpack-dev-server/download/webpack-dev-server-3.11.0.tgz?cache=0&sync_timestamp=1588952721810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-server%2Fdownload%2Fwebpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" + integrity sha1-jxVKO84bz9HMYY705wMniFXn/4w= + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.3.1" + http-proxy-middleware "0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.3" + killable "^1.0.1" + loglevel "^1.6.8" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.26" + schema-utils "^1.0.0" + selfsigned "^1.10.7" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.20" + sockjs-client "1.4.0" + spdy "^4.0.2" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.2" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "^13.3.2" + +webpack-log@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/webpack-log/download/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" + integrity sha1-W3ko4GN1k/EZ0y9iJ8HgrDHhtH8= + dependencies: + ansi-colors "^3.0.0" + uuid "^3.3.2" + +webpack-merge@^4.2.2: + version "4.2.2" + resolved "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.2.tgz?cache=0&sync_timestamp=1594294957807&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-merge%2Fdownload%2Fwebpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha1-onxS6ng9E5iv0gh/VH17nS9DY00= + dependencies: + lodash "^4.17.15" + +webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: + version "1.4.3" + resolved "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1574264193174&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha1-7t2OwLko+/HL/plOItLYkPMwqTM= + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^4.0.0: + version "4.43.0" + resolved "https://registry.npm.taobao.org/webpack/download/webpack-4.43.0.tgz?cache=0&sync_timestamp=1594294588188&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack%2Fdownload%2Fwebpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha1-xIVHsR1WMiTFYdrRFyyKoLimeOY= + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.1" + webpack-sources "^1.4.1" + +websocket-driver@0.6.5: + version "0.6.5" + resolved "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz?cache=0&sync_timestamp=1591288882525&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-driver%2Fdownload%2Fwebsocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + integrity sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY= + dependencies: + websocket-extensions ">=0.1.1" + +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.7.4.tgz?cache=0&sync_timestamp=1591288882525&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-driver%2Fdownload%2Fwebsocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha1-ia1Slbv2S0gKvLox5JU6ynBvV2A= + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha1-f4RzvIOd/YdgituV1+sHUhFXikI= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@1, which@^1.2.9: + version "1.3.1" + resolved "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo= + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE= + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha1-rgdOa9wMFKQx6ATmJFScYzsABFc= + dependencies: + string-width "^1.0.2 || 2" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.npm.taobao.org/word-wrap/download/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha1-YQY29rH3A4kb00dxzLF/uTtHB5w= + +workbox-background-sync@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-background-sync/download/workbox-background-sync-4.3.1.tgz#26821b9bf16e9e37fd1d640289edddc08afd1950" + integrity sha1-JoIbm/Funjf9HWQCie3dwIr9GVA= + dependencies: + workbox-core "^4.3.1" + +workbox-broadcast-update@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-broadcast-update/download/workbox-broadcast-update-4.3.1.tgz#e2c0280b149e3a504983b757606ad041f332c35b" + integrity sha1-4sAoCxSeOlBJg7dXYGrQQfMyw1s= + dependencies: + workbox-core "^4.3.1" + +workbox-build@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-build/download/workbox-build-4.3.1.tgz#414f70fb4d6de47f6538608b80ec52412d233e64" + integrity sha1-QU9w+01t5H9lOGCLgOxSQS0jPmQ= + dependencies: + "@babel/runtime" "^7.3.4" + "@hapi/joi" "^15.0.0" + common-tags "^1.8.0" + fs-extra "^4.0.2" + glob "^7.1.3" + lodash.template "^4.4.0" + pretty-bytes "^5.1.0" + stringify-object "^3.3.0" + strip-comments "^1.0.2" + workbox-background-sync "^4.3.1" + workbox-broadcast-update "^4.3.1" + workbox-cacheable-response "^4.3.1" + workbox-core "^4.3.1" + workbox-expiration "^4.3.1" + workbox-google-analytics "^4.3.1" + workbox-navigation-preload "^4.3.1" + workbox-precaching "^4.3.1" + workbox-range-requests "^4.3.1" + workbox-routing "^4.3.1" + workbox-strategies "^4.3.1" + workbox-streams "^4.3.1" + workbox-sw "^4.3.1" + workbox-window "^4.3.1" + +workbox-cacheable-response@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-cacheable-response/download/workbox-cacheable-response-4.3.1.tgz#f53e079179c095a3f19e5313b284975c91428c91" + integrity sha1-9T4HkXnAlaPxnlMTsoSXXJFCjJE= + dependencies: + workbox-core "^4.3.1" + +workbox-core@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-core/download/workbox-core-4.3.1.tgz#005d2c6a06a171437afd6ca2904a5727ecd73be6" + integrity sha1-AF0sagahcUN6/WyikEpXJ+zXO+Y= + +workbox-expiration@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-expiration/download/workbox-expiration-4.3.1.tgz#d790433562029e56837f341d7f553c4a78ebe921" + integrity sha1-15BDNWICnlaDfzQdf1U8Snjr6SE= + dependencies: + workbox-core "^4.3.1" + +workbox-google-analytics@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-google-analytics/download/workbox-google-analytics-4.3.1.tgz#9eda0183b103890b5c256e6f4ea15a1f1548519a" + integrity sha1-ntoBg7EDiQtcJW5vTqFaHxVIUZo= + dependencies: + workbox-background-sync "^4.3.1" + workbox-core "^4.3.1" + workbox-routing "^4.3.1" + workbox-strategies "^4.3.1" + +workbox-navigation-preload@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-navigation-preload/download/workbox-navigation-preload-4.3.1.tgz#29c8e4db5843803b34cd96dc155f9ebd9afa453d" + integrity sha1-Kcjk21hDgDs0zZbcFV+evZr6RT0= + dependencies: + workbox-core "^4.3.1" + +workbox-precaching@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-precaching/download/workbox-precaching-4.3.1.tgz#9fc45ed122d94bbe1f0ea9584ff5940960771cba" + integrity sha1-n8Re0SLZS74fDqlYT/WUCWB3HLo= + dependencies: + workbox-core "^4.3.1" + +workbox-range-requests@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-range-requests/download/workbox-range-requests-4.3.1.tgz#f8a470188922145cbf0c09a9a2d5e35645244e74" + integrity sha1-+KRwGIkiFFy/DAmpotXjVkUkTnQ= + dependencies: + workbox-core "^4.3.1" + +workbox-routing@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-routing/download/workbox-routing-4.3.1.tgz#a675841af623e0bb0c67ce4ed8e724ac0bed0cda" + integrity sha1-pnWEGvYj4LsMZ85O2OckrAvtDNo= + dependencies: + workbox-core "^4.3.1" + +workbox-strategies@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-strategies/download/workbox-strategies-4.3.1.tgz#d2be03c4ef214c115e1ab29c9c759c9fe3e9e646" + integrity sha1-0r4DxO8hTBFeGrKcnHWcn+Pp5kY= + dependencies: + workbox-core "^4.3.1" + +workbox-streams@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-streams/download/workbox-streams-4.3.1.tgz#0b57da70e982572de09c8742dd0cb40a6b7c2cc3" + integrity sha1-C1facOmCVy3gnIdC3Qy0Cmt8LMM= + dependencies: + workbox-core "^4.3.1" + +workbox-sw@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-sw/download/workbox-sw-4.3.1.tgz#df69e395c479ef4d14499372bcd84c0f5e246164" + integrity sha1-32njlcR5700USZNyvNhMD14kYWQ= + +workbox-webpack-plugin@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-webpack-plugin/download/workbox-webpack-plugin-4.3.1.tgz#47ff5ea1cc074b6c40fb5a86108863a24120d4bd" + integrity sha1-R/9eocwHS2xA+1qGEIhjokEg1L0= + dependencies: + "@babel/runtime" "^7.0.0" + json-stable-stringify "^1.0.1" + workbox-build "^4.3.1" + +workbox-window@^4.3.1: + version "4.3.1" + resolved "https://registry.npm.taobao.org/workbox-window/download/workbox-window-4.3.1.tgz#ee6051bf10f06afa5483c9b8dfa0531994ede0f3" + integrity sha1-7mBRvxDwavpUg8m436BTGZTt4PM= + dependencies: + workbox-core "^4.3.1" + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.npm.taobao.org/worker-farm/download/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha1-JqlMU5G7ypJhUgAvabhKS/dy5ag= + dependencies: + errno "~0.1.7" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha1-H9H2cjXVttD+54EFYAG/tpTAOwk= + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha1-6Tk7oHEC5skaOyIUePAlfNKFblM= + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write@1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/write/download/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM= + dependencies: + mkdirp "^0.5.1" + +ws@^6.0.0, ws@^6.2.1: + version "6.2.1" + resolved "https://registry.npm.taobao.org/ws/download/ws-6.2.1.tgz?cache=0&sync_timestamp=1593925518385&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha1-RC/fCkftZPWbal2P8TD0dI7VJPs= + dependencies: + async-limiter "~1.0.0" + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q= + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha1-le+U+F7MgdAHwmThkKEg8KPIVms= + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha1-27fa+b/YusmrRev2ArjLrQ1dCP0= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI= + +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-13.1.2.tgz?cache=0&sync_timestamp=1595125205629&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha1-Ew8JcC667vJlDVTObj5XBvek+zg= + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-18.1.3.tgz?cache=0&sync_timestamp=1595125205629&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A= + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^13.3.2: + version "13.3.2" + resolved "https://registry.npm.taobao.org/yargs/download/yargs-13.3.2.tgz?cache=0&sync_timestamp=1594421065904&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha1-rX/+/sGqWVZayRX4Lcyzipwxot0= + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@^15.0.0: + version "15.4.1" + resolved "https://registry.npm.taobao.org/yargs/download/yargs-15.4.1.tgz?cache=0&sync_timestamp=1594421065904&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha1-DYehbeAa7p2L7Cv7909nhRcw9Pg= + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yorkie@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/yorkie/download/yorkie-2.0.0.tgz#92411912d435214e12c51c2ae1093e54b6bb83d9" + integrity sha1-kkEZEtQ1IU4SxRwq4Qk+VLa7g9k= + dependencies: + execa "^0.8.0" + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/package.json" new file mode 100644 index 000000000..7401e20db --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/package.json" @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "webpack" + }, + "author": "", + "license": "ISC", + "dependencies": { + "css-loader": "^4.3.0", + "mini-css-extract-plugin": "^0.11.2", + "node-sass": "^4.14.1", + "sass-loader": "^10.0.2", + "vue-loader": "^15.9.3", + "vue-loader-plugin": "^1.3.0", + "vue-style-loader": "^4.1.2", + "vue-template-compiler": "^2.6.12" + }, + "devDependencies": { + "webpack": "^4.44.1", + "webpack-cli": "^3.3.12" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/HelloWorld.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/HelloWorld.vue" new file mode 100644 index 000000000..ddb592c01 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/HelloWorld.vue" @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/style.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/style.css" new file mode 100644 index 000000000..b443be41b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/style.css" @@ -0,0 +1,3 @@ +.name { + color: #123456; +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/test.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/test.vue" new file mode 100644 index 000000000..0b183345f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/src/test.vue" @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/webpack.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/webpack.config.js" new file mode 100644 index 000000000..2ad2aee32 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/01-webpack/webpack.config.js" @@ -0,0 +1,62 @@ +const path = require('path'); +const VueLoaderPlugin = require('vue-loader/lib/plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin') + +module.exports = { + entry: './src/HelloWorld.vue', + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'helloWorld.js', + library: 'helloWorld' + }, + module: { + rules: [ + { + test: /\.vue$/, + loader: 'vue-loader' + }, + // 它会应用到普通的 `.js` 文件 + // 以及 `.vue` 文件中的 ` + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/assets/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/assets/logo.png" new file mode 100644 index 000000000..f3d2503fc Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/assets/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/components/HelloWorld.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/components/HelloWorld.vue" new file mode 100644 index 000000000..879051a29 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/components/HelloWorld.vue" @@ -0,0 +1,58 @@ + + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/main.js" new file mode 100644 index 000000000..63eb05f71 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/src/main.js" @@ -0,0 +1,8 @@ +import Vue from 'vue' +import App from './App.vue' + +Vue.config.productionTip = false + +new Vue({ + render: h => h(App), +}).$mount('#app') diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/vue.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/vue.config.js" new file mode 100644 index 000000000..34192ba10 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/02-vue-cli/vue.config.js" @@ -0,0 +1,7 @@ +module.exports = { + // configureWebpack: { + // output: { + // libraryExport: 'default' + // } + // } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/babel.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/babel.config.js" new file mode 100644 index 000000000..e9558405f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/babel.config.js" @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/package.json" new file mode 100644 index 000000000..2f05e8ea6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/package.json" @@ -0,0 +1,42 @@ +{ + "name": "test-vue", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "core-js": "^3.6.5", + "vue": "^2.6.11" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "~4.5.0", + "@vue/cli-plugin-eslint": "~4.5.0", + "@vue/cli-service": "~4.5.0", + "babel-eslint": "^10.1.0", + "eslint": "^6.7.2", + "eslint-plugin-vue": "^6.2.2", + "vue-template-compiler": "^2.6.11" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/essential", + "eslint:recommended" + ], + "parserOptions": { + "parser": "babel-eslint" + }, + "rules": {} + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead" + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.css" new file mode 100644 index 000000000..899979b23 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.css" @@ -0,0 +1 @@ +h3[data-v-b9167eee]{margin:40px 0 0}ul[data-v-b9167eee]{list-style-type:none;padding:0}li[data-v-b9167eee]{display:inline-block;margin:0 10px}a[data-v-b9167eee]{color:#42b983}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.umd.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.umd.js" new file mode 100644 index 000000000..04064670e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/public/comp/testComp.umd.js" @@ -0,0 +1,489 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["testComp"] = factory(); + else + root["testComp"] = factory(); +})((typeof self !== 'undefined' ? self : this), function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fb15"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "034f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("85ec"); +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), + +/***/ "4805": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_HelloWorld_vue_vue_type_style_index_0_id_b9167eee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8ce0"); +/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_HelloWorld_vue_vue_type_style_index_0_id_b9167eee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_HelloWorld_vue_vue_type_style_index_0_id_b9167eee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_HelloWorld_vue_vue_type_style_index_0_id_b9167eee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), + +/***/ "85ec": +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "8875": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller +// MIT license +// source: https://github.com/amiller-gh/currentScript-polyfill + +// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505 + +(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(typeof self !== 'undefined' ? self : this, function () { + function getCurrentScript () { + var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript') + // for chrome + if (!descriptor && 'currentScript' in document && document.currentScript) { + return document.currentScript + } + + // for other browsers with native support for currentScript + if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) { + return document.currentScript + } + + // IE 8-10 support script readyState + // IE 11+ & Firefox support stack trace + try { + throw new Error(); + } + catch (err) { + // Find the second match for the "at" string to get file src url from stack. + var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, + ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig, + stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack), + scriptLocation = (stackDetails && stackDetails[1]) || false, + line = (stackDetails && stackDetails[2]) || false, + currentLocation = document.location.href.replace(document.location.hash, ''), + pageSource, + inlineScriptSourceRegExp, + inlineScriptSource, + scripts = document.getElementsByTagName('script'); // Live NodeList collection + + if (scriptLocation === currentLocation) { + pageSource = document.documentElement.outerHTML; + inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]* + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/logo.png" new file mode 100644 index 000000000..f3d2503fc Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/utils.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/utils.js" new file mode 100644 index 000000000..04f97634e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/assets/utils.js" @@ -0,0 +1,135 @@ +/** + * [推荐使用 parallelLoadScripts/seriesLoadScripts] + * @name: loadScript + */ +function loadScript (url, key, charset) { + return new Promise((resolve, reject) => { + if (window[`load_js_${key}`]) { + console.log('reload js - ' + key) + resolve() + return + } + window[`load_js_${key}`] = true + let script = document.createElement('script') + script.type = 'text/javascript' + script.src = url + script.charset = charset || 'utf-8' + document.body.appendChild(script) + script.addEventListener('load', () => { + resolve() + console.log('load js success - ' + key) + }, false) + script.addEventListener('error', () => reject(script), false) + }) +} + +/** + * [推荐使用 parallelLoadScripts/seriesLoadScripts] + * @name: loadScripts + */ +function loadScripts (urls) { + return Promise.all(urls.map((item) => { + return loadScript(item.url, item.key, item.charset) + })) +} + +/** + * 串行加载指定的脚本 + * 串行加载[异步]逐个加载,每个加载完成后加载下一个 + * 全部加载完成后执行回调 + * @param {Array|String} scripts 指定要加载的脚本 + * @param {Function} callback 成功后回调的函数 + * @return {Array} 所有生成的脚本组件对象数组 + */ +function seriesLoadScripts (scripts, callback, charset) { + if (typeof (scripts) !== 'object') { + scripts = [scripts] + } + var HEAD = document.getElementsByTagName('head')[0] || document.documentElement + var s = [] + var last = scripts.length - 1 + // 递归 + var recursiveLoad = function (i) { + s[i] = document.createElement('script') + s[i].setAttribute('type', 'text/javascript') + // Attach handlers for all browsers + // 异步 + s[i].onload = s[i].onreadystatechange = function () { + if (!/*@cc_on!@*/0 || this.readyState === 'loaded' || this.readyState === 'complete') { // eslint-disable-line + this.onload = this.onreadystatechange = null + this.parentNode.removeChild(this) + if (i !== last) { + recursiveLoad(i + 1) + } else if (typeof (callback) === 'function') { + callback() + } + } + } + // 同步 + s[i].setAttribute('src', scripts[i]) + if (charset) { + s[i].setAttribute('charset', charset) + } + HEAD.appendChild(s[i]) + } + recursiveLoad(0) +} + +/** +* 并行加载指定的脚本 +* 并行加载[同步]同时加载,不管上个是否加载完成,直接加载全部 +* 全部加载完成后执行回调 +* @param {Array|String} scripts 指定要加载的脚本 +* @param {Function} callback 成功后回调的函数 +* @return {Array} 所有生成的脚本组件对象数组 +*/ +function parallelLoadScripts (scripts, callback) { + if (typeof (scripts) !== 'object') { + scripts = [scripts] + } + var HEAD = document.getElementsByTagName('head')[0] || document.documentElement + var s = [] + var loaded = 0 + for (var i = 0; i < scripts.length; i++) { + s[i] = document.createElement('script') + s[i].setAttribute('type', 'text/javascript') + // Attach handlers for all browsers + // 异步 + s[i].onload = s[i].onreadystatechange = function () { + if (!/*@cc_on!@*/0 || this.readyState === 'loaded' || this.readyState === 'complete') { // eslint-disable-line + loaded++ + this.onload = this.onreadystatechange = null + this.parentNode.removeChild(this) + if (loaded === scripts.length && typeof (callback) === 'function') callback() + } + } + // 同步 + s[i].setAttribute('src', scripts[i]) + HEAD.appendChild(s[i]) + } +} + +/** + * @name: loadCss + */ +function loadCss (url, key) { + if (window[`load_css_${key}`]) { + return + } + window[`load_css_${key}`] = true + let head = document.getElementsByTagName('head')[0] + let link = document.createElement('link') + link.type = 'text/css' + link.rel = 'stylesheet' + link.href = url + head.appendChild(link) + console.log('load css success - ' + key) +} + +export { + loadScript, + loadScripts, + seriesLoadScripts, + parallelLoadScripts, + loadCss +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/main.js" new file mode 100644 index 000000000..63eb05f71 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/03-test-import-lib/src/main.js" @@ -0,0 +1,8 @@ +import Vue from 'vue' +import App from './App.vue' + +Vue.config.productionTip = false + +new Vue({ + render: h => h(App), +}).$mount('#app') diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/README.md" new file mode 100755 index 000000000..bc3664f05 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/vue\347\273\204\344\273\266\346\236\204\345\273\272\344\270\272lib/README.md" @@ -0,0 +1,38 @@ +# vue组件构建为lib ( 非web component ) + +## 1. webpack 版本 + +见 `01-webpack`,参考 `vue-loader` 文档,[vue-loader]([https://vue-loader.vuejs.org/zh/guide/#%E6%89%8B%E5%8A%A8%E8%AE%BE%E7%BD%AE](https://vue-loader.vuejs.org/zh/guide/#手动设置)) + +``` +$ npm run build +``` + +构建的组件的使用 + +```html + +
                +``` + +动态载入 + +```javascript +loadScript('xxx').then(() => { + Vue.component(compName, window[compName].default); + this.compName = compName; +}) +``` + +## 02. vue-cli 版本 + +见 `02-vue-lib`,参考 `vue-cli` 文档,[vue-cli]([https://cli.vuejs.org/zh/guide/build-targets.html#%E5%BA%94%E7%94%A8](https://cli.vuejs.org/zh/guide/build-targets.html#应用)) + +```shell +# 将一个单独的入口构建为一个库 +$ vue-cli-service build --target lib --name myLib [entry] +``` + +## 03. vue-cli 版本构建的 lib 的使用 + +见 `03-test-import-lib` \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/components/demo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/components/demo.vue" new file mode 100644 index 000000000..de16c7a4e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/components/demo.vue" @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/config.js" new file mode 100644 index 000000000..8a215c9a1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/config.js" @@ -0,0 +1,93 @@ +module.exports = { + base: '/', // 用于部署时的子路径 + title: 'csxiaoyao.com', // 网站的标题 + description: 'luban document, created by victorsun', // 网站描述,HTML中表现为一个 标签 + head: [ // head 中额外标签 + // ['link', { rel: 'icon', href: '/logo.png' }] + ], + host: '0.0.0.0', // dev 服务器的主机 + port: 2048, // dev 服务器的端口 + dest: './dist', // 指定 vuepress build 的输出目录 + evergreen: false, // 忽略浏览器兼容性 + markdown: { + lineNumbers: true, // 代码块的左侧显示行号 + externalLinks: { target: '_blank', rel: 'noopener noreferrer' }, // 键和值对将被添加到指向外部链接的 标签,默认选项将在新窗口中打开外部链接 + anchor: { permalink: true, permalinkBefore: true, permalinkSymbol: '#' }, // 锚点配置 + toc: { includeLevel: [1, 2, 3] }, // [[toc]]目录 + config: md => { // 插件 + // md.set({ breaks: true }) + // md.use(require('markdown-it-xxx')) + } + }, + themeConfig: { + nav: [ // 导航栏 + { + text: '主页', + link: '/' + }, { + text: '菜单', + items: [{ + text: '普通菜单', + link: '/' + }, { + text: '分组菜单', + items: [{ + text: 'test1', + link: '/test1' + }, { + text: 'test2', + link: '/test2' + }] + }] + }, { + text: '访问主页', + link: 'http://www.csxiaoyao.com' + } + ], + // 侧边栏 + sidebar: [ + '/test1', + ['/test1', '链接到test1'], + { + title: '链接到test2', + collapsable: false, + children: [ + '/test1', + '/test2', + ] + } + ], + // 展开所有标题层级 + displayAllHeaders: false, + // 激活标题链接 + activeHeaderLinks: true, // false 可以提高性能 + // 搜索 + search: true, + searchMaxSuggestions: 10, + // 更新时间戳 git + lastUpdated: '最后更新时间', // string | boolean + // serviceWorker + serviceWorker: { + updatePopup: true, // 弹窗提示更新 Boolean | Object, 默认值是 undefined + // 如果设置为 true, 默认的文本配置将是: + updatePopup: { + message: "有内容更新", + buttonText: "更新" + } + }, + // 假定 GitHub,也可以是一个完整的 GitLab URL + repo: 'csxiaoyaojianxian/JavaScriptStudy', + // 自定义项目仓库链接文字,默认根据 `themeConfig.repo` 中的 URL 来自动匹配是 "GitHub"/"GitLab"/"Bitbucket" 中的哪个,如果不设置时是 "Source" + repoLabel: '访问仓库', + // 以下为可选的 "Edit this page" 链接选项,如果你的文档和项目位于不同仓库: + docsRepo: 'vuejs/vuepress', + // 如果你的文档不在仓库的根目录下: + docsDir: 'docs/xxx', + // 如果你的文档在某个特定的分支(默认是 'master' 分支): + docsBranch: 'master', + // 默认为 false,设置为 true 来启用 + editLinks: true, + // 自定义编辑链接的文本。默认是 "Edit this page" + editLinkText: '修改此页' + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/index.styl" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/index.styl" new file mode 100644 index 000000000..35814ea7d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/index.styl" @@ -0,0 +1,3 @@ +body { + background-color: #fbfbfb; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/palette.styl" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/palette.styl" new file mode 100644 index 000000000..c21c53a1f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/.vuepress/styles/palette.styl" @@ -0,0 +1,5 @@ +// 显示默认值 +$accentColor = #3498db +$textColor = #2c3e50 +$borderColor = #eaecef +$codeBgColor = #282c34 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/README.md" new file mode 100644 index 000000000..0f12719e7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/README.md" @@ -0,0 +1,16 @@ +--- +home: true +navbar: false +# heroImage: /hero.png +actionText: 起步 → +actionLink: /test1 +features: +- title: 简明优先 + details: 对以 markdown 为中心的项目结构,做最简化的配置,帮助你专注于创作。 +- title: Vue 驱动 + details: 享用 Vue + webpack 开发环境,在 markdown 中使用 Vue 组件,并通过 Vue 开发自定义主题。 +- title: 性能高效 + details: VuePress 将每个页面生成为预渲染的静态 HTML,每个页面加载之后,然后作为单页面应用程序(SPA)运行。 +footer: MIT Licensed | Copyright © 2018-present +--- + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test/test.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test/test.js" new file mode 100644 index 000000000..d2572b833 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test/test.js" @@ -0,0 +1,3 @@ +export default function () { + // .. +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test1.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test1.md" new file mode 100644 index 000000000..366cd46a4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test1.md" @@ -0,0 +1,17 @@ +--- +title: '测试页面1' +sidebarDepth: 2 +prev: false +next: ./test2 +--- + +# test1 +## 标题1 +段落1 + + +## 标题2 +段落2 +``` +代码块 +``` diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test2.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test2.md" new file mode 100644 index 000000000..976e3ee98 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/06-vue/\343\200\220vuepress-docs\343\200\221/test2.md" @@ -0,0 +1,38 @@ +--- +title: '测试页面2' +sidebarDepth: 2 +prev: ./test1 +next: false +--- + +[[toc]] + +# test2 +## test2~ +### test2~~ +emoji +:100: + +::: tip 注意: +This is a tip +::: + +::: warning +This is a warning +::: + +::: danger STOP +This is a dangerous warning +::: + +``` js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +<<< @/test/test.js{2} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.eslintrc.cjs" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.eslintrc.cjs" new file mode 100644 index 000000000..6617ed2a8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.eslintrc.cjs" @@ -0,0 +1,26 @@ +/* eslint-env node */ +require('@rushstack/eslint-patch/modern-module-resolution') + +module.exports = { + root: true, + 'extends': [ + 'plugin:vue/vue3-essential', + 'eslint:recommended', + '@vue/eslint-config-typescript', + '@vue/eslint-config-prettier/skip-formatting' + ], + overrides: [ + { + files: [ + 'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}', + 'cypress/support/**/*.{js,ts,jsx,tsx}' + ], + 'extends': [ + 'plugin:cypress/recommended' + ] + } + ], + parserOptions: { + ecmaVersion: 'latest' + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.gitignore" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.gitignore" new file mode 100644 index 000000000..8ee54e8d3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.gitignore" @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +*.tsbuildinfo diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.prettierrc.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.prettierrc.json" new file mode 100644 index 000000000..66e23359c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.prettierrc.json" @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "tabWidth": 2, + "singleQuote": true, + "printWidth": 100, + "trailingComma": "none" +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.vscode/extensions.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.vscode/extensions.json" new file mode 100644 index 000000000..009a53485 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/.vscode/extensions.json" @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "Vue.volar", + "Vue.vscode-typescript-vue-plugin", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode" + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/README.md" new file mode 100644 index 000000000..49b0a88e5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/README.md" @@ -0,0 +1,68 @@ +# vue-project + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). + +## Type Support for `.vue` Imports in TS + +TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. + +If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: + +1. Disable the built-in TypeScript Extension + 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette + 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` +2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Type-Check, Compile and Minify for Production + +```sh +npm run build +``` + +### Run Unit Tests with [Vitest](https://vitest.dev/) + +```sh +npm run test:unit +``` + +### Run End-to-End Tests with [Cypress](https://www.cypress.io/) + +```sh +npm run test:e2e:dev +``` + +This runs the end-to-end tests against the Vite development server. +It is much faster than the production build. + +But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments): + +```sh +npm run build +npm run test:e2e +``` + +### Lint with [ESLint](https://eslint.org/) + +```sh +npm run lint +``` diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress.config.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress.config.ts" new file mode 100644 index 000000000..0f66080fd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress.config.ts" @@ -0,0 +1,8 @@ +import { defineConfig } from 'cypress' + +export default defineConfig({ + e2e: { + specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}', + baseUrl: 'http://localhost:4173' + } +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/example.cy.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/example.cy.ts" new file mode 100644 index 000000000..7554c35d8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/example.cy.ts" @@ -0,0 +1,8 @@ +// https://on.cypress.io/api + +describe('My First Test', () => { + it('visits the app root url', () => { + cy.visit('/') + cy.contains('h1', 'You did it!') + }) +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/tsconfig.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/tsconfig.json" new file mode 100644 index 000000000..37748feb7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/e2e/tsconfig.json" @@ -0,0 +1,10 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": ["./**/*", "../support/**/*"], + "compilerOptions": { + "isolatedModules": false, + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress"] + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/fixtures/example.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/fixtures/example.json" new file mode 100644 index 000000000..02e425437 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/fixtures/example.json" @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/commands.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/commands.ts" new file mode 100644 index 000000000..9b7bb8e25 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/commands.ts" @@ -0,0 +1,39 @@ +/// +// *********************************************** +// This example commands.ts shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) +// +// declare global { +// namespace Cypress { +// interface Chainable { +// login(email: string, password: string): Chainable +// drag(subject: string, options?: Partial): Chainable +// dismiss(subject: string, options?: Partial): Chainable +// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable +// } +// } +// } + +export {} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/e2e.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/e2e.ts" new file mode 100644 index 000000000..d68db96df --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/cypress/support/e2e.ts" @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/env.d.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/env.d.ts" new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/env.d.ts" @@ -0,0 +1 @@ +/// diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/index.html" new file mode 100644 index 000000000..a88854489 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/index.html" @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package-lock.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package-lock.json" new file mode 100644 index 000000000..23d1ad48e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package-lock.json" @@ -0,0 +1,13672 @@ +{ + "name": "vue-project", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "vue-project", + "version": "0.0.0", + "dependencies": { + "pinia": "^2.1.7", + "vue": "^3.3.11", + "vue-router": "^4.2.5" + }, + "devDependencies": { + "@rushstack/eslint-patch": "^1.3.3", + "@tsconfig/node18": "^18.2.2", + "@types/jsdom": "^21.1.6", + "@types/node": "^18.19.3", + "@vitejs/plugin-vue": "^4.5.2", + "@vitejs/plugin-vue-jsx": "^3.1.0", + "@vue/eslint-config-prettier": "^8.0.0", + "@vue/eslint-config-typescript": "^12.0.0", + "@vue/test-utils": "^2.4.3", + "@vue/tsconfig": "^0.5.0", + "cypress": "^13.6.1", + "eslint": "^8.49.0", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-vue": "^9.17.0", + "jsdom": "^23.0.1", + "npm-run-all2": "^6.1.1", + "prettier": "^3.0.3", + "start-server-and-test": "^2.0.3", + "typescript": "~5.3.0", + "vite": "^5.0.10", + "vitest": "^1.0.4", + "vue-tsc": "^1.8.25" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://mirrors.tencent.com/npm/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.7", + "@babel/parser": "^7.23.6", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", + "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.23.0", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/helpers/-/helpers-7.23.7.tgz", + "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://mirrors.tencent.com/npm/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", + "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.23.6", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-typescript": "^7.23.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://mirrors.tencent.com/npm/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://mirrors.tencent.com/npm/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cypress/request": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://mirrors.tencent.com/npm/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.56.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://mirrors.tencent.com/npm/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://mirrors.tencent.com/npm/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://mirrors.tencent.com/npm/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@one-ini/wasm": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/@one-ini/wasm/-/wasm-0.1.1.tgz", + "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", + "dev": true + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://mirrors.tencent.com/npm/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/@pkgr/core/-/core-0.1.0.tgz", + "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.3.tgz", + "integrity": "sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.3.tgz", + "integrity": "sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.3.tgz", + "integrity": "sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.3.tgz", + "integrity": "sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.3.tgz", + "integrity": "sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.3.tgz", + "integrity": "sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.3.tgz", + "integrity": "sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.3.tgz", + "integrity": "sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.3.tgz", + "integrity": "sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.3.tgz", + "integrity": "sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.3.tgz", + "integrity": "sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.3.tgz", + "integrity": "sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.3.tgz", + "integrity": "sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rushstack/eslint-patch": { + "version": "1.6.1", + "resolved": "https://mirrors.tencent.com/npm/@rushstack/eslint-patch/-/eslint-patch-1.6.1.tgz", + "integrity": "sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==", + "dev": true + }, + "node_modules/@sideway/address": { + "version": "4.1.4", + "resolved": "https://mirrors.tencent.com/npm/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "dev": true + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://mirrors.tencent.com/npm/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@tsconfig/node18": { + "version": "18.2.2", + "resolved": "https://mirrors.tencent.com/npm/@tsconfig/node18/-/node18-18.2.2.tgz", + "integrity": "sha512-d6McJeGsuoRlwWZmVIeE8CUA27lu6jLjvv1JzqmpsytOYYbVi1tHZEnwCNVOXnj4pyLvneZlFlpXUK+X9wBWyw==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/jsdom": { + "version": "21.1.6", + "resolved": "https://mirrors.tencent.com/npm/@types/jsdom/-/jsdom-21.1.6.tgz", + "integrity": "sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://mirrors.tencent.com/npm/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.19.4", + "resolved": "https://mirrors.tencent.com/npm/@types/node/-/node-18.19.4.tgz", + "integrity": "sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://mirrors.tencent.com/npm/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.6", + "resolved": "https://mirrors.tencent.com/npm/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://mirrors.tencent.com/npm/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz", + "integrity": "sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/parser/-/parser-6.17.0.tgz", + "integrity": "sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", + "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz", + "integrity": "sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/types/-/types-6.17.0.tgz", + "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", + "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/utils/-/utils-6.17.0.tgz", + "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", + "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.17.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vitejs/plugin-vue": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", + "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0 || ^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vitejs/plugin-vue-jsx": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-3.1.0.tgz", + "integrity": "sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.3", + "@babel/plugin-transform-typescript": "^7.23.3", + "@vue/babel-plugin-jsx": "^1.1.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0 || ^5.0.0", + "vue": "^3.0.0" + } + }, + "node_modules/@vitest/expect": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/expect/-/expect-1.1.3.tgz", + "integrity": "sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.1.3", + "@vitest/utils": "1.1.3", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/runner/-/runner-1.1.3.tgz", + "integrity": "sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.1.3", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/snapshot/-/snapshot-1.1.3.tgz", + "integrity": "sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/spy/-/spy-1.1.3.tgz", + "integrity": "sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/utils/-/utils-1.1.3.tgz", + "integrity": "sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@volar/language-core": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/language-core/-/language-core-1.11.1.tgz", + "integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==", + "dev": true, + "dependencies": { + "@volar/source-map": "1.11.1" + } + }, + "node_modules/@volar/source-map": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/source-map/-/source-map-1.11.1.tgz", + "integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==", + "dev": true, + "dependencies": { + "muggle-string": "^0.3.1" + } + }, + "node_modules/@volar/typescript": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/typescript/-/typescript-1.11.1.tgz", + "integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==", + "dev": true, + "dependencies": { + "@volar/language-core": "1.11.1", + "path-browserify": "^1.0.1" + } + }, + "node_modules/@vue/babel-helper-vue-transform-on": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.1.5.tgz", + "integrity": "sha512-SgUymFpMoAyWeYWLAY+MkCK3QEROsiUnfaw5zxOVD/M64KQs8D/4oK6Q5omVA2hnvEOE0SCkH2TZxs/jnnUj7w==", + "dev": true + }, + "node_modules/@vue/babel-plugin-jsx": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.5.tgz", + "integrity": "sha512-nKs1/Bg9U1n3qSWnsHhCVQtAzI6aQXqua8j/bZrau8ywT1ilXQbK4FwEJGmU8fV7tcpuFvWmmN7TMmV1OBma1g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", + "@vue/babel-helper-vue-transform-on": "^1.1.5", + "camelcase": "^6.3.0", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-core/-/compiler-core-3.4.5.tgz", + "integrity": "sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==", + "dependencies": { + "@babel/parser": "^7.23.6", + "@vue/shared": "3.4.5", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-core/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vue/compiler-dom": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-dom/-/compiler-dom-3.4.5.tgz", + "integrity": "sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==", + "dependencies": { + "@vue/compiler-core": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-sfc/-/compiler-sfc-3.4.5.tgz", + "integrity": "sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==", + "dependencies": { + "@babel/parser": "^7.23.6", + "@vue/compiler-core": "3.4.5", + "@vue/compiler-dom": "3.4.5", + "@vue/compiler-ssr": "3.4.5", + "@vue/shared": "3.4.5", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.5", + "postcss": "^8.4.32", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-sfc/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-ssr/-/compiler-ssr-3.4.5.tgz", + "integrity": "sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==", + "dependencies": { + "@vue/compiler-dom": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.5.1", + "resolved": "https://mirrors.tencent.com/npm/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==" + }, + "node_modules/@vue/eslint-config-prettier": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/@vue/eslint-config-prettier/-/eslint-config-prettier-8.0.0.tgz", + "integrity": "sha512-55dPqtC4PM/yBjhAr+yEw6+7KzzdkBuLmnhBrDfp4I48+wy+Giqqj9yUr5T2uD/BkBROjjmqnLZmXRdOx/VtQg==", + "dev": true, + "dependencies": { + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-prettier": "^5.0.0" + }, + "peerDependencies": { + "eslint": ">= 8.0.0", + "prettier": ">= 3.0.0" + } + }, + "node_modules/@vue/eslint-config-typescript": { + "version": "12.0.0", + "resolved": "https://mirrors.tencent.com/npm/@vue/eslint-config-typescript/-/eslint-config-typescript-12.0.0.tgz", + "integrity": "sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", + "vue-eslint-parser": "^9.3.1" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0", + "eslint-plugin-vue": "^9.0.0", + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/language-core": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/@vue/language-core/-/language-core-1.8.27.tgz", + "integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==", + "dev": true, + "dependencies": { + "@volar/language-core": "~1.11.1", + "@volar/source-map": "~1.11.1", + "@vue/compiler-dom": "^3.3.0", + "@vue/shared": "^3.3.0", + "computeds": "^0.0.1", + "minimatch": "^9.0.3", + "muggle-string": "^0.3.1", + "path-browserify": "^1.0.1", + "vue-template-compiler": "^2.7.14" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/reactivity": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/reactivity/-/reactivity-3.4.5.tgz", + "integrity": "sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==", + "dependencies": { + "@vue/shared": "3.4.5" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/runtime-core/-/runtime-core-3.4.5.tgz", + "integrity": "sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==", + "dependencies": { + "@vue/reactivity": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/runtime-dom/-/runtime-dom-3.4.5.tgz", + "integrity": "sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==", + "dependencies": { + "@vue/runtime-core": "3.4.5", + "@vue/shared": "3.4.5", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/server-renderer/-/server-renderer-3.4.5.tgz", + "integrity": "sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==", + "dependencies": { + "@vue/compiler-ssr": "3.4.5", + "@vue/shared": "3.4.5" + }, + "peerDependencies": { + "vue": "3.4.5" + } + }, + "node_modules/@vue/shared": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/shared/-/shared-3.4.5.tgz", + "integrity": "sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==" + }, + "node_modules/@vue/test-utils": { + "version": "2.4.3", + "resolved": "https://mirrors.tencent.com/npm/@vue/test-utils/-/test-utils-2.4.3.tgz", + "integrity": "sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==", + "dev": true, + "dependencies": { + "js-beautify": "^1.14.9", + "vue-component-type-helpers": "^1.8.21" + }, + "peerDependencies": { + "@vue/server-renderer": "^3.0.1", + "vue": "^3.0.1" + }, + "peerDependenciesMeta": { + "@vue/server-renderer": { + "optional": true + } + } + }, + "node_modules/@vue/tsconfig": { + "version": "0.5.1", + "resolved": "https://mirrors.tencent.com/npm/@vue/tsconfig/-/tsconfig-0.5.1.tgz", + "integrity": "sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://mirrors.tencent.com/npm/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.1", + "resolved": "https://mirrors.tencent.com/npm/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://mirrors.tencent.com/npm/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://mirrors.tencent.com/npm/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://mirrors.tencent.com/npm/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://mirrors.tencent.com/npm/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://mirrors.tencent.com/npm/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://mirrors.tencent.com/npm/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true + }, + "node_modules/axios": { + "version": "1.6.5", + "resolved": "https://mirrors.tencent.com/npm/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/axios/node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://mirrors.tencent.com/npm/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://mirrors.tencent.com/npm/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.22.2", + "resolved": "https://mirrors.tencent.com/npm/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://mirrors.tencent.com/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://mirrors.tencent.com/npm/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cachedir": { + "version": "2.4.0", + "resolved": "https://mirrors.tencent.com/npm/cachedir/-/cachedir-2.4.0.tgz", + "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001574", + "resolved": "https://mirrors.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", + "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://mirrors.tencent.com/npm/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/chai": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/chai/-/chai-4.4.0.tgz", + "integrity": "sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://mirrors.tencent.com/npm/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://mirrors.tencent.com/npm/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://mirrors.tencent.com/npm/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://mirrors.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://mirrors.tencent.com/npm/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/computeds": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/computeds/-/computeds-0.0.1.tgz", + "integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://mirrors.tencent.com/npm/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://mirrors.tencent.com/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssstyle": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", + "dev": true, + "dependencies": { + "rrweb-cssom": "^0.6.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/cypress": { + "version": "13.6.2", + "resolved": "https://mirrors.tencent.com/npm/cypress/-/cypress-13.6.2.tgz", + "integrity": "sha512-TW3bGdPU4BrfvMQYv1z3oMqj71YI4AlgJgnrycicmPZAXtvywVFZW9DAToshO65D97rCWfG/kqMFsYB6Kp91gQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^3.0.0", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^18.17.5", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" + } + }, + "node_modules/cypress/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cypress/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cypress/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cypress/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cypress/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cypress/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cypress/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/cypress/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://mirrors.tencent.com/npm/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://mirrors.tencent.com/npm/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", + "dev": true + }, + "node_modules/de-indent": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://mirrors.tencent.com/npm/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://mirrors.tencent.com/npm/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/editorconfig": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/editorconfig/-/editorconfig-1.0.4.tgz", + "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", + "dev": true, + "dependencies": { + "@one-ini/wasm": "0.1.1", + "commander": "^10.0.0", + "minimatch": "9.0.1", + "semver": "^7.5.3" + }, + "bin": { + "editorconfig": "bin/editorconfig" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/editorconfig/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/editorconfig/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/editorconfig/node_modules/minimatch": { + "version": "9.0.1", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/editorconfig/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/editorconfig/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.623", + "resolved": "https://mirrors.tencent.com/npm/electron-to-chromium/-/electron-to-chromium-1.4.623.tgz", + "integrity": "sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://mirrors.tencent.com/npm/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://mirrors.tencent.com/npm/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/esbuild": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.56.0", + "resolved": "https://mirrors.tencent.com/npm/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-cypress": { + "version": "2.15.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", + "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", + "dev": true, + "dependencies": { + "globals": "^13.20.0" + }, + "peerDependencies": { + "eslint": ">= 3.2.1" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz", + "integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.6" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-vue": { + "version": "9.19.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz", + "integrity": "sha512-CPDqTOG2K4Ni2o4J5wixkLVNwgctKXFu6oBpVJlpNq7f38lh9I80pRTouZSJ2MAebPJlINU/KTFSXyQfBUlymA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "natural-compare": "^1.4.0", + "nth-check": "^2.1.1", + "postcss-selector-parser": "^6.0.13", + "semver": "^7.5.4", + "vue-eslint-parser": "^9.3.1", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-vue/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-vue/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-vue/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://mirrors.tencent.com/npm/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://mirrors.tencent.com/npm/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://mirrors.tencent.com/npm/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/eventemitter2": { + "version": "6.4.7", + "resolved": "https://mirrors.tencent.com/npm/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://mirrors.tencent.com/npm/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.16.0", + "resolved": "https://mirrors.tencent.com/npm/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://mirrors.tencent.com/npm/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.4", + "resolved": "https://mirrors.tencent.com/npm/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://mirrors.tencent.com/npm/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://mirrors.tencent.com/npm/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://mirrors.tencent.com/npm/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "dependencies": { + "async": "^3.2.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://mirrors.tencent.com/npm/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "10.3.10", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://mirrors.tencent.com/npm/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://mirrors.tencent.com/npm/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hosted-git-info": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://mirrors.tencent.com/npm/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://mirrors.tencent.com/npm/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://mirrors.tencent.com/npm/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://mirrors.tencent.com/npm/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://mirrors.tencent.com/npm/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joi": { + "version": "17.11.0", + "resolved": "https://mirrors.tencent.com/npm/joi/-/joi-17.11.0.tgz", + "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/js-beautify": { + "version": "1.14.11", + "resolved": "https://mirrors.tencent.com/npm/js-beautify/-/js-beautify-1.14.11.tgz", + "integrity": "sha512-rPogWqAfoYh1Ryqqh2agUpVfbxAhbjuN1SmU86dskQUKouRiggUTCO4+2ym9UPXllc2WAp0J+T5qxn7Um3lCdw==", + "dev": true, + "dependencies": { + "config-chain": "^1.1.13", + "editorconfig": "^1.0.3", + "glob": "^10.3.3", + "nopt": "^7.2.0" + }, + "bin": { + "css-beautify": "js/bin/css-beautify.js", + "html-beautify": "js/bin/html-beautify.js", + "js-beautify": "js/bin/js-beautify.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/jsdom": { + "version": "23.1.0", + "resolved": "https://mirrors.tencent.com/npm/jsdom/-/jsdom-23.1.0.tgz", + "integrity": "sha512-wRscu8dBFxi7O65Cvi0jFRDv0Qa7XEHPix8Qg/vlXHLAMQsRWV1EDeQHBermzXf4Dt7JtFgBLbva3iTcBZDXEQ==", + "dev": true, + "dependencies": { + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.7", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.3", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.16.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jsdom/node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://mirrors.tencent.com/npm/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://mirrors.tencent.com/npm/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://mirrors.tencent.com/npm/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://mirrors.tencent.com/npm/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", + "dev": true, + "engines": { + "node": "> 0.8" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/listr2": { + "version": "3.14.0", + "resolved": "https://mirrors.tencent.com/npm/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/listr2/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://mirrors.tencent.com/npm/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://mirrors.tencent.com/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-update/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://mirrors.tencent.com/npm/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://mirrors.tencent.com/npm/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://mirrors.tencent.com/npm/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://mirrors.tencent.com/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://mirrors.tencent.com/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://mirrors.tencent.com/npm/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mlly": { + "version": "1.4.2", + "resolved": "https://mirrors.tencent.com/npm/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "dev": true, + "dependencies": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/muggle-string": { + "version": "0.3.1", + "resolved": "https://mirrors.tencent.com/npm/muggle-string/-/muggle-string-0.3.1.tgz", + "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://mirrors.tencent.com/npm/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://mirrors.tencent.com/npm/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/nopt": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "dev": true, + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-package-data/-/normalize-package-data-6.0.0.tgz", + "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/npm-run-all2": { + "version": "6.1.1", + "resolved": "https://mirrors.tencent.com/npm/npm-run-all2/-/npm-run-all2-6.1.1.tgz", + "integrity": "sha512-lWLbkPZ5BSdXtN8lR+0rc8caKoPdymycpZksyDEC9MOBvfdwTXZ0uVhb7bMcGeXv2/BKtfQuo6Zn3zfc8rxNXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "cross-spawn": "^7.0.3", + "memorystream": "^0.3.1", + "minimatch": "^9.0.0", + "pidtree": "^0.6.0", + "read-pkg": "^8.0.0", + "shell-quote": "^1.7.3" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "npm-run-all2": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0", + "npm": ">= 8" + } + }, + "node_modules/npm-run-all2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://mirrors.tencent.com/npm/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://mirrors.tencent.com/npm/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://mirrors.tencent.com/npm/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs=", + "dev": true + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "7.1.1", + "resolved": "https://mirrors.tencent.com/npm/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.21.4", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^3.0.0", + "lines-and-columns": "^2.0.3", + "type-fest": "^3.8.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-json/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://mirrors.tencent.com/npm/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://mirrors.tencent.com/npm/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://mirrors.tencent.com/npm/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinia": { + "version": "2.1.7", + "resolved": "https://mirrors.tencent.com/npm/pinia/-/pinia-2.1.7.tgz", + "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==", + "dependencies": { + "@vue/devtools-api": "^6.5.0", + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.0", + "typescript": ">=4.4.4", + "vue": "^2.6.14 || ^3.3.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://mirrors.tencent.com/npm/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "node_modules/postcss": { + "version": "8.4.33", + "resolved": "https://mirrors.tencent.com/npm/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://mirrors.tencent.com/npm/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://mirrors.tencent.com/npm/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", + "dev": true + }, + "node_modules/ps-tree": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "dependencies": { + "event-stream": "=3.3.4" + }, + "bin": { + "ps-tree": "bin/ps-tree.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://mirrors.tencent.com/npm/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.10.4", + "resolved": "https://mirrors.tencent.com/npm/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/read-pkg/-/read-pkg-8.1.0.tgz", + "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.1", + "normalize-package-data": "^6.0.0", + "parse-json": "^7.0.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "4.9.0", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-4.9.0.tgz", + "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=", + "dev": true, + "dependencies": { + "throttleit": "^1.0.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/rollup": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/rollup/-/rollup-4.9.3.tgz", + "integrity": "sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.9.3", + "@rollup/rollup-android-arm64": "4.9.3", + "@rollup/rollup-darwin-arm64": "4.9.3", + "@rollup/rollup-darwin-x64": "4.9.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.3", + "@rollup/rollup-linux-arm64-gnu": "4.9.3", + "@rollup/rollup-linux-arm64-musl": "4.9.3", + "@rollup/rollup-linux-riscv64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-musl": "4.9.3", + "@rollup/rollup-win32-arm64-msvc": "4.9.3", + "@rollup/rollup-win32-ia32-msvc": "4.9.3", + "@rollup/rollup-win32-x64-msvc": "4.9.3", + "fsevents": "~2.3.2" + } + }, + "node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "dev": true + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://mirrors.tencent.com/npm/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://mirrors.tencent.com/npm/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://mirrors.tencent.com/npm/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://mirrors.tencent.com/npm/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://mirrors.tencent.com/npm/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha1-Gsig2Ug4SNFpXkGLbQMaPDzmjjs=", + "dev": true + }, + "node_modules/start-server-and-test": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/start-server-and-test/-/start-server-and-test-2.0.3.tgz", + "integrity": "sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==", + "dev": true, + "dependencies": { + "arg": "^5.0.2", + "bluebird": "3.7.2", + "check-more-types": "2.24.0", + "debug": "4.3.4", + "execa": "5.1.1", + "lazy-ass": "1.6.0", + "ps-tree": "1.2.0", + "wait-on": "7.2.0" + }, + "bin": { + "server-test": "src/bin/start.js", + "start-server-and-test": "src/bin/start.js", + "start-test": "src/bin/start.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/start-server-and-test/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/start-server-and-test/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/start-server-and-test/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://mirrors.tencent.com/npm/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://mirrors.tencent.com/npm/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dev": true, + "dependencies": { + "acorn": "^8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://mirrors.tencent.com/npm/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/synckit": { + "version": "0.8.8", + "resolved": "https://mirrors.tencent.com/npm/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/throttleit": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/throttleit/-/throttleit-1.0.1.tgz", + "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/tinybench": { + "version": "2.5.1", + "resolved": "https://mirrors.tencent.com/npm/tinybench/-/tinybench-2.5.1.tgz", + "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.8.1", + "resolved": "https://mirrors.tencent.com/npm/tinypool/-/tinypool-0.8.1.tgz", + "integrity": "sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/tinyspy/-/tinyspy-2.2.0.tgz", + "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://mirrors.tencent.com/npm/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://mirrors.tencent.com/npm/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://mirrors.tencent.com/npm/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "devOptional": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/ufo/-/ufo-1.3.2.tgz", + "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", + "dev": true + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://mirrors.tencent.com/npm/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://mirrors.tencent.com/npm/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://mirrors.tencent.com/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://mirrors.tencent.com/npm/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://mirrors.tencent.com/npm/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vite": { + "version": "5.0.11", + "resolved": "https://mirrors.tencent.com/npm/vite/-/vite-5.0.11.tgz", + "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.32", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/vite-node/-/vite-node-1.1.3.tgz", + "integrity": "sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/vitest/-/vitest-1.1.3.tgz", + "integrity": "sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.1.3", + "@vitest/runner": "1.1.3", + "@vitest/snapshot": "1.1.3", + "@vitest/spy": "1.1.3", + "@vitest/utils": "1.1.3", + "acorn-walk": "^8.3.1", + "cac": "^6.7.14", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^1.3.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.1", + "vite": "^5.0.0", + "vite-node": "1.1.3", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "^1.0.0", + "@vitest/ui": "^1.0.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/vitest/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/vitest/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/npm-run-path": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/vitest/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vue": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/vue/-/vue-3.4.5.tgz", + "integrity": "sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==", + "dependencies": { + "@vue/compiler-dom": "3.4.5", + "@vue/compiler-sfc": "3.4.5", + "@vue/runtime-dom": "3.4.5", + "@vue/server-renderer": "3.4.5", + "@vue/shared": "3.4.5" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-component-type-helpers": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/vue-component-type-helpers/-/vue-component-type-helpers-1.8.27.tgz", + "integrity": "sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==", + "dev": true + }, + "node_modules/vue-eslint-parser": { + "version": "9.3.2", + "resolved": "https://mirrors.tencent.com/npm/vue-eslint-parser/-/vue-eslint-parser-9.3.2.tgz", + "integrity": "sha512-q7tWyCVaV9f8iQyIA5Mkj/S6AoJ9KBN8IeUSf3XEmBrOtxOZnfTg5s4KClbZBCK3GtnT/+RyCLZyDHuZwTuBjg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^7.3.6" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, + "node_modules/vue-eslint-parser/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vue-eslint-parser/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vue-eslint-parser/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/vue-router": { + "version": "4.2.5", + "resolved": "https://mirrors.tencent.com/npm/vue-router/-/vue-router-4.2.5.tgz", + "integrity": "sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==", + "dependencies": { + "@vue/devtools-api": "^6.5.0" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/vue-template-compiler": { + "version": "2.7.16", + "resolved": "https://mirrors.tencent.com/npm/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", + "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", + "dev": true, + "dependencies": { + "de-indent": "^1.0.2", + "he": "^1.2.0" + } + }, + "node_modules/vue-tsc": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/vue-tsc/-/vue-tsc-1.8.27.tgz", + "integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==", + "dev": true, + "dependencies": { + "@volar/typescript": "~1.11.1", + "@vue/language-core": "1.8.27", + "semver": "^7.5.4" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/vue-tsc/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vue-tsc/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vue-tsc/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/w3c-xmlserializer/node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/wait-on": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/wait-on/-/wait-on-7.2.0.tgz", + "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==", + "dev": true, + "dependencies": { + "axios": "^1.6.1", + "joi": "^17.11.0", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "rxjs": "^7.8.1" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.0.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "dev": true, + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://mirrors.tencent.com/npm/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://mirrors.tencent.com/npm/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://mirrors.tencent.com/npm/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://mirrors.tencent.com/npm/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://mirrors.tencent.com/npm/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + } + }, + "@babel/compat-data": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "dev": true + }, + "@babel/core": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.7", + "@babel/parser": "^7.23.6", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + } + }, + "@babel/generator": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "dev": true, + "requires": { + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", + "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "requires": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.23.0", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "dev": true, + "requires": { + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.15" + } + }, + "@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true + }, + "@babel/helper-replace-supers": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" + } + }, + "@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.22.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://mirrors.tencent.com/npm/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/helpers/-/helpers-7.23.7.tgz", + "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", + "dev": true, + "requires": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6" + } + }, + "@babel/highlight": { + "version": "7.23.4", + "resolved": "https://mirrors.tencent.com/npm/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==" + }, + "@babel/plugin-syntax-jsx": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.23.3", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", + "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.23.6", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-typescript": "^7.23.3" + } + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://mirrors.tencent.com/npm/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/traverse": { + "version": "7.23.7", + "resolved": "https://mirrors.tencent.com/npm/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.23.6", + "resolved": "https://mirrors.tencent.com/npm/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://mirrors.tencent.com/npm/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true + }, + "@cypress/request": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + } + }, + "@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "dev": true, + "optional": true + }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://mirrors.tencent.com/npm/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "8.56.0", + "resolved": "https://mirrors.tencent.com/npm/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true + }, + "@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://mirrors.tencent.com/npm/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, + "@hapi/topo": { + "version": "5.1.0", + "resolved": "https://mirrors.tencent.com/npm/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true + }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://mirrors.tencent.com/npm/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://mirrors.tencent.com/npm/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://mirrors.tencent.com/npm/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@one-ini/wasm": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/@one-ini/wasm/-/wasm-0.1.1.tgz", + "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", + "dev": true + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://mirrors.tencent.com/npm/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, + "@pkgr/core": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/@pkgr/core/-/core-0.1.0.tgz", + "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==", + "dev": true + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.3.tgz", + "integrity": "sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.3.tgz", + "integrity": "sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.3.tgz", + "integrity": "sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.3.tgz", + "integrity": "sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.3.tgz", + "integrity": "sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.3.tgz", + "integrity": "sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.3.tgz", + "integrity": "sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.3.tgz", + "integrity": "sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.3.tgz", + "integrity": "sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.3.tgz", + "integrity": "sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.3.tgz", + "integrity": "sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.3.tgz", + "integrity": "sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.3.tgz", + "integrity": "sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==", + "dev": true, + "optional": true + }, + "@rushstack/eslint-patch": { + "version": "1.6.1", + "resolved": "https://mirrors.tencent.com/npm/@rushstack/eslint-patch/-/eslint-patch-1.6.1.tgz", + "integrity": "sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==", + "dev": true + }, + "@sideway/address": { + "version": "4.1.4", + "resolved": "https://mirrors.tencent.com/npm/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@sideway/formula": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "dev": true + }, + "@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://mirrors.tencent.com/npm/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "@tsconfig/node18": { + "version": "18.2.2", + "resolved": "https://mirrors.tencent.com/npm/@tsconfig/node18/-/node18-18.2.2.tgz", + "integrity": "sha512-d6McJeGsuoRlwWZmVIeE8CUA27lu6jLjvv1JzqmpsytOYYbVi1tHZEnwCNVOXnj4pyLvneZlFlpXUK+X9wBWyw==", + "dev": true + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "@types/jsdom": { + "version": "21.1.6", + "resolved": "https://mirrors.tencent.com/npm/@types/jsdom/-/jsdom-21.1.6.tgz", + "integrity": "sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://mirrors.tencent.com/npm/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "@types/node": { + "version": "18.19.4", + "resolved": "https://mirrors.tencent.com/npm/@types/node/-/node-18.19.4.tgz", + "integrity": "sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } + }, + "@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://mirrors.tencent.com/npm/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, + "@types/semver": { + "version": "7.5.6", + "resolved": "https://mirrors.tencent.com/npm/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true + }, + "@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "@types/sizzle": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true + }, + "@types/yauzl": { + "version": "2.10.3", + "resolved": "https://mirrors.tencent.com/npm/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz", + "integrity": "sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/parser": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/parser/-/parser-6.17.0.tgz", + "integrity": "sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", + "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz", + "integrity": "sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/types": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/types/-/types-6.17.0.tgz", + "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", + "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/utils/-/utils-6.17.0.tgz", + "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "semver": "^7.5.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "6.17.0", + "resolved": "https://mirrors.tencent.com/npm/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", + "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.17.0", + "eslint-visitor-keys": "^3.4.1" + } + }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "@vitejs/plugin-vue": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", + "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", + "dev": true, + "requires": {} + }, + "@vitejs/plugin-vue-jsx": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-3.1.0.tgz", + "integrity": "sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==", + "dev": true, + "requires": { + "@babel/core": "^7.23.3", + "@babel/plugin-transform-typescript": "^7.23.3", + "@vue/babel-plugin-jsx": "^1.1.5" + } + }, + "@vitest/expect": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/expect/-/expect-1.1.3.tgz", + "integrity": "sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==", + "dev": true, + "requires": { + "@vitest/spy": "1.1.3", + "@vitest/utils": "1.1.3", + "chai": "^4.3.10" + } + }, + "@vitest/runner": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/runner/-/runner-1.1.3.tgz", + "integrity": "sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==", + "dev": true, + "requires": { + "@vitest/utils": "1.1.3", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "dependencies": { + "p-limit": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "requires": { + "yocto-queue": "^1.0.0" + } + }, + "yocto-queue": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true + } + } + }, + "@vitest/snapshot": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/snapshot/-/snapshot-1.1.3.tgz", + "integrity": "sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==", + "dev": true, + "requires": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + } + }, + "@vitest/spy": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/spy/-/spy-1.1.3.tgz", + "integrity": "sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==", + "dev": true, + "requires": { + "tinyspy": "^2.2.0" + } + }, + "@vitest/utils": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/@vitest/utils/-/utils-1.1.3.tgz", + "integrity": "sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==", + "dev": true, + "requires": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + } + }, + "@volar/language-core": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/language-core/-/language-core-1.11.1.tgz", + "integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==", + "dev": true, + "requires": { + "@volar/source-map": "1.11.1" + } + }, + "@volar/source-map": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/source-map/-/source-map-1.11.1.tgz", + "integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==", + "dev": true, + "requires": { + "muggle-string": "^0.3.1" + } + }, + "@volar/typescript": { + "version": "1.11.1", + "resolved": "https://mirrors.tencent.com/npm/@volar/typescript/-/typescript-1.11.1.tgz", + "integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==", + "dev": true, + "requires": { + "@volar/language-core": "1.11.1", + "path-browserify": "^1.0.1" + } + }, + "@vue/babel-helper-vue-transform-on": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.1.5.tgz", + "integrity": "sha512-SgUymFpMoAyWeYWLAY+MkCK3QEROsiUnfaw5zxOVD/M64KQs8D/4oK6Q5omVA2hnvEOE0SCkH2TZxs/jnnUj7w==", + "dev": true + }, + "@vue/babel-plugin-jsx": { + "version": "1.1.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.5.tgz", + "integrity": "sha512-nKs1/Bg9U1n3qSWnsHhCVQtAzI6aQXqua8j/bZrau8ywT1ilXQbK4FwEJGmU8fV7tcpuFvWmmN7TMmV1OBma1g==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", + "@vue/babel-helper-vue-transform-on": "^1.1.5", + "camelcase": "^6.3.0", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" + } + }, + "@vue/compiler-core": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-core/-/compiler-core-3.4.5.tgz", + "integrity": "sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==", + "requires": { + "@babel/parser": "^7.23.6", + "@vue/shared": "3.4.5", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + }, + "dependencies": { + "estree-walker": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + } + } + }, + "@vue/compiler-dom": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-dom/-/compiler-dom-3.4.5.tgz", + "integrity": "sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==", + "requires": { + "@vue/compiler-core": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "@vue/compiler-sfc": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-sfc/-/compiler-sfc-3.4.5.tgz", + "integrity": "sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==", + "requires": { + "@babel/parser": "^7.23.6", + "@vue/compiler-core": "3.4.5", + "@vue/compiler-dom": "3.4.5", + "@vue/compiler-ssr": "3.4.5", + "@vue/shared": "3.4.5", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.5", + "postcss": "^8.4.32", + "source-map-js": "^1.0.2" + }, + "dependencies": { + "estree-walker": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + } + } + }, + "@vue/compiler-ssr": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/compiler-ssr/-/compiler-ssr-3.4.5.tgz", + "integrity": "sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==", + "requires": { + "@vue/compiler-dom": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "@vue/devtools-api": { + "version": "6.5.1", + "resolved": "https://mirrors.tencent.com/npm/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==" + }, + "@vue/eslint-config-prettier": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/@vue/eslint-config-prettier/-/eslint-config-prettier-8.0.0.tgz", + "integrity": "sha512-55dPqtC4PM/yBjhAr+yEw6+7KzzdkBuLmnhBrDfp4I48+wy+Giqqj9yUr5T2uD/BkBROjjmqnLZmXRdOx/VtQg==", + "dev": true, + "requires": { + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-prettier": "^5.0.0" + } + }, + "@vue/eslint-config-typescript": { + "version": "12.0.0", + "resolved": "https://mirrors.tencent.com/npm/@vue/eslint-config-typescript/-/eslint-config-typescript-12.0.0.tgz", + "integrity": "sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", + "vue-eslint-parser": "^9.3.1" + } + }, + "@vue/language-core": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/@vue/language-core/-/language-core-1.8.27.tgz", + "integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==", + "dev": true, + "requires": { + "@volar/language-core": "~1.11.1", + "@volar/source-map": "~1.11.1", + "@vue/compiler-dom": "^3.3.0", + "@vue/shared": "^3.3.0", + "computeds": "^0.0.1", + "minimatch": "^9.0.3", + "muggle-string": "^0.3.1", + "path-browserify": "^1.0.1", + "vue-template-compiler": "^2.7.14" + } + }, + "@vue/reactivity": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/reactivity/-/reactivity-3.4.5.tgz", + "integrity": "sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==", + "requires": { + "@vue/shared": "3.4.5" + } + }, + "@vue/runtime-core": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/runtime-core/-/runtime-core-3.4.5.tgz", + "integrity": "sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==", + "requires": { + "@vue/reactivity": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "@vue/runtime-dom": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/runtime-dom/-/runtime-dom-3.4.5.tgz", + "integrity": "sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==", + "requires": { + "@vue/runtime-core": "3.4.5", + "@vue/shared": "3.4.5", + "csstype": "^3.1.3" + } + }, + "@vue/server-renderer": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/server-renderer/-/server-renderer-3.4.5.tgz", + "integrity": "sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==", + "requires": { + "@vue/compiler-ssr": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "@vue/shared": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/@vue/shared/-/shared-3.4.5.tgz", + "integrity": "sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==" + }, + "@vue/test-utils": { + "version": "2.4.3", + "resolved": "https://mirrors.tencent.com/npm/@vue/test-utils/-/test-utils-2.4.3.tgz", + "integrity": "sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==", + "dev": true, + "requires": { + "js-beautify": "^1.14.9", + "vue-component-type-helpers": "^1.8.21" + } + }, + "@vue/tsconfig": { + "version": "0.5.1", + "resolved": "https://mirrors.tencent.com/npm/@vue/tsconfig/-/tsconfig-0.5.1.tgz", + "integrity": "sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==", + "dev": true + }, + "abbrev": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true + }, + "acorn": { + "version": "8.11.3", + "resolved": "https://mirrors.tencent.com/npm/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://mirrors.tencent.com/npm/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "acorn-walk": { + "version": "8.3.1", + "resolved": "https://mirrors.tencent.com/npm/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "dev": true + }, + "agent-base": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "requires": { + "debug": "^4.3.4" + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://mirrors.tencent.com/npm/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arch": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true + }, + "arg": { + "version": "5.0.2", + "resolved": "https://mirrors.tencent.com/npm/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://mirrors.tencent.com/npm/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "async": { + "version": "3.2.5", + "resolved": "https://mirrors.tencent.com/npm/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://mirrors.tencent.com/npm/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.12.0", + "resolved": "https://mirrors.tencent.com/npm/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true + }, + "axios": { + "version": "1.6.5", + "resolved": "https://mirrors.tencent.com/npm/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "dev": true, + "requires": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://mirrors.tencent.com/npm/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "blob-util": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://mirrors.tencent.com/npm/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.22.2", + "resolved": "https://mirrors.tencent.com/npm/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://mirrors.tencent.com/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://mirrors.tencent.com/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "cac": { + "version": "6.7.14", + "resolved": "https://mirrors.tencent.com/npm/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true + }, + "cachedir": { + "version": "2.4.0", + "resolved": "https://mirrors.tencent.com/npm/cachedir/-/cachedir-2.4.0.tgz", + "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", + "dev": true + }, + "call-bind": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://mirrors.tencent.com/npm/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001574", + "resolved": "https://mirrors.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", + "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://mirrors.tencent.com/npm/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chai": { + "version": "4.4.0", + "resolved": "https://mirrors.tencent.com/npm/chai/-/chai-4.4.0.tgz", + "integrity": "sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "check-error": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "requires": { + "get-func-name": "^2.0.2" + } + }, + "check-more-types": { + "version": "2.24.0", + "resolved": "https://mirrors.tencent.com/npm/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", + "dev": true + }, + "ci-info": { + "version": "3.9.0", + "resolved": "https://mirrors.tencent.com/npm/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-table3": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://mirrors.tencent.com/npm/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://mirrors.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://mirrors.tencent.com/npm/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "computeds": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/computeds/-/computeds-0.0.1.tgz", + "integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://mirrors.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://mirrors.tencent.com/npm/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + } + } + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://mirrors.tencent.com/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "cssstyle": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", + "dev": true, + "requires": { + "rrweb-cssom": "^0.6.0" + } + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "cypress": { + "version": "13.6.2", + "resolved": "https://mirrors.tencent.com/npm/cypress/-/cypress-13.6.2.tgz", + "integrity": "sha512-TW3bGdPU4BrfvMQYv1z3oMqj71YI4AlgJgnrycicmPZAXtvywVFZW9DAToshO65D97rCWfG/kqMFsYB6Kp91gQ==", + "dev": true, + "requires": { + "@cypress/request": "^3.0.0", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^18.17.5", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://mirrors.tencent.com/npm/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "requires": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + } + }, + "dayjs": { + "version": "1.11.10", + "resolved": "https://mirrors.tencent.com/npm/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", + "dev": true + }, + "de-indent": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decimal.js": { + "version": "10.4.3", + "resolved": "https://mirrors.tencent.com/npm/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, + "deep-eql": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "define-data-property": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://mirrors.tencent.com/npm/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editorconfig": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/editorconfig/-/editorconfig-1.0.4.tgz", + "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", + "dev": true, + "requires": { + "@one-ini/wasm": "0.1.1", + "commander": "^10.0.0", + "minimatch": "9.0.1", + "semver": "^7.5.3" + }, + "dependencies": { + "commander": { + "version": "10.0.1", + "resolved": "https://mirrors.tencent.com/npm/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minimatch": { + "version": "9.0.1", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "electron-to-chromium": { + "version": "1.4.623", + "resolved": "https://mirrors.tencent.com/npm/electron-to-chromium/-/electron-to-chromium-1.4.623.tgz", + "integrity": "sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://mirrors.tencent.com/npm/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enquirer": { + "version": "2.4.1", + "resolved": "https://mirrors.tencent.com/npm/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + } + }, + "entities": { + "version": "4.5.0", + "resolved": "https://mirrors.tencent.com/npm/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "esbuild": { + "version": "0.19.11", + "resolved": "https://mirrors.tencent.com/npm/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "8.56.0", + "resolved": "https://mirrors.tencent.com/npm/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://mirrors.tencent.com/npm/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "requires": {} + }, + "eslint-plugin-cypress": { + "version": "2.15.1", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", + "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", + "dev": true, + "requires": { + "globals": "^13.20.0" + }, + "dependencies": { + "globals": { + "version": "13.24.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz", + "integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.6" + } + }, + "eslint-plugin-vue": { + "version": "9.19.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz", + "integrity": "sha512-CPDqTOG2K4Ni2o4J5wixkLVNwgctKXFu6oBpVJlpNq7f38lh9I80pRTouZSJ2MAebPJlINU/KTFSXyQfBUlymA==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "natural-compare": "^1.4.0", + "nth-check": "^2.1.1", + "postcss-selector-parser": "^6.0.13", + "semver": "^7.5.4", + "vue-eslint-parser": "^9.3.1", + "xml-name-validator": "^4.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://mirrors.tencent.com/npm/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + }, + "espree": { + "version": "9.6.1", + "resolved": "https://mirrors.tencent.com/npm/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "requires": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, + "esquery": { + "version": "1.5.0", + "resolved": "https://mirrors.tencent.com/npm/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "estree-walker": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0" + } + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://mirrors.tencent.com/npm/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "dev": true, + "requires": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "eventemitter2": { + "version": "6.4.7", + "resolved": "https://mirrors.tencent.com/npm/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "execa": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "executable": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "requires": { + "pify": "^2.2.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://mirrors.tencent.com/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-diff": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "fast-glob": { + "version": "3.3.2", + "resolved": "https://mirrors.tencent.com/npm/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://mirrors.tencent.com/npm/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastq": { + "version": "1.16.0", + "resolved": "https://mirrors.tencent.com/npm/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://mirrors.tencent.com/npm/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "requires": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.9", + "resolved": "https://mirrors.tencent.com/npm/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "follow-redirects": { + "version": "1.15.4", + "resolved": "https://mirrors.tencent.com/npm/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "dev": true + }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://mirrors.tencent.com/npm/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://mirrors.tencent.com/npm/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://mirrors.tencent.com/npm/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://mirrors.tencent.com/npm/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://mirrors.tencent.com/npm/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "getos": { + "version": "3.2.1", + "resolved": "https://mirrors.tencent.com/npm/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "requires": { + "async": "^3.2.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://mirrors.tencent.com/npm/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "global-dirs": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://mirrors.tencent.com/npm/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://mirrors.tencent.com/npm/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://mirrors.tencent.com/npm/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.2" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "hasown": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "7.0.1", + "resolved": "https://mirrors.tencent.com/npm/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "dev": true, + "requires": { + "lru-cache": "^10.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true + } + } + }, + "html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "requires": { + "whatwg-encoding": "^3.1.1" + } + }, + "html-tags": { + "version": "3.3.1", + "resolved": "https://mirrors.tencent.com/npm/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true + }, + "http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "dev": true, + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + } + }, + "http-signature": { + "version": "1.3.6", + "resolved": "https://mirrors.tencent.com/npm/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + } + }, + "https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://mirrors.tencent.com/npm/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "4" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://mirrors.tencent.com/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "5.3.0", + "resolved": "https://mirrors.tencent.com/npm/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://mirrors.tencent.com/npm/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://mirrors.tencent.com/npm/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://mirrors.tencent.com/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-ci": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "requires": { + "ci-info": "^3.2.0" + } + }, + "is-core-module": { + "version": "2.13.1", + "resolved": "https://mirrors.tencent.com/npm/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://mirrors.tencent.com/npm/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://mirrors.tencent.com/npm/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jackspeak": { + "version": "2.3.6", + "resolved": "https://mirrors.tencent.com/npm/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "joi": { + "version": "17.11.0", + "resolved": "https://mirrors.tencent.com/npm/joi/-/joi-17.11.0.tgz", + "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "js-beautify": { + "version": "1.14.11", + "resolved": "https://mirrors.tencent.com/npm/js-beautify/-/js-beautify-1.14.11.tgz", + "integrity": "sha512-rPogWqAfoYh1Ryqqh2agUpVfbxAhbjuN1SmU86dskQUKouRiggUTCO4+2ym9UPXllc2WAp0J+T5qxn7Um3lCdw==", + "dev": true, + "requires": { + "config-chain": "^1.1.13", + "editorconfig": "^1.0.3", + "glob": "^10.3.3", + "nopt": "^7.2.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://mirrors.tencent.com/npm/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsdom": { + "version": "23.1.0", + "resolved": "https://mirrors.tencent.com/npm/jsdom/-/jsdom-23.1.0.tgz", + "integrity": "sha512-wRscu8dBFxi7O65Cvi0jFRDv0Qa7XEHPix8Qg/vlXHLAMQsRWV1EDeQHBermzXf4Dt7JtFgBLbva3iTcBZDXEQ==", + "dev": true, + "requires": { + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.7", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.3", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.16.0", + "xml-name-validator": "^5.0.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "xml-name-validator": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true + } + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://mirrors.tencent.com/npm/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://mirrors.tencent.com/npm/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://mirrors.tencent.com/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsprim": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "keyv": { + "version": "4.5.4", + "resolved": "https://mirrors.tencent.com/npm/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, + "lazy-ass": { + "version": "1.6.0", + "resolved": "https://mirrors.tencent.com/npm/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://mirrors.tencent.com/npm/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "2.0.4", + "resolved": "https://mirrors.tencent.com/npm/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "dev": true + }, + "listr2": { + "version": "3.14.0", + "resolved": "https://mirrors.tencent.com/npm/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "requires": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "local-pkg": { + "version": "0.5.0", + "resolved": "https://mirrors.tencent.com/npm/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "requires": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://mirrors.tencent.com/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://mirrors.tencent.com/npm/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://mirrors.tencent.com/npm/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "log-update": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "loupe": { + "version": "2.3.7", + "resolved": "https://mirrors.tencent.com/npm/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "requires": { + "get-func-name": "^2.0.1" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "magic-string": { + "version": "0.30.5", + "resolved": "https://mirrors.tencent.com/npm/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://mirrors.tencent.com/npm/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://mirrors.tencent.com/npm/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://mirrors.tencent.com/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://mirrors.tencent.com/npm/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://mirrors.tencent.com/npm/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://mirrors.tencent.com/npm/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true + }, + "mlly": { + "version": "1.4.2", + "resolved": "https://mirrors.tencent.com/npm/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "dev": true, + "requires": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "muggle-string": { + "version": "0.3.1", + "resolved": "https://mirrors.tencent.com/npm/muggle-string/-/muggle-string-0.3.1.tgz", + "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", + "dev": true + }, + "nanoid": { + "version": "3.3.7", + "resolved": "https://mirrors.tencent.com/npm/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-releases": { + "version": "2.0.14", + "resolved": "https://mirrors.tencent.com/npm/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "nopt": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "dev": true, + "requires": { + "abbrev": "^2.0.0" + } + }, + "normalize-package-data": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/normalize-package-data/-/normalize-package-data-6.0.0.tgz", + "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", + "dev": true, + "requires": { + "hosted-git-info": "^7.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "npm-run-all2": { + "version": "6.1.1", + "resolved": "https://mirrors.tencent.com/npm/npm-run-all2/-/npm-run-all2-6.1.1.tgz", + "integrity": "sha512-lWLbkPZ5BSdXtN8lR+0rc8caKoPdymycpZksyDEC9MOBvfdwTXZ0uVhb7bMcGeXv2/BKtfQuo6Zn3zfc8rxNXA==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "cross-spawn": "^7.0.3", + "memorystream": "^0.3.1", + "minimatch": "^9.0.0", + "pidtree": "^0.6.0", + "read-pkg": "^8.0.0", + "shell-quote": "^1.7.3" + }, + "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + } + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://mirrors.tencent.com/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://mirrors.tencent.com/npm/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "nwsapi": { + "version": "2.2.7", + "resolved": "https://mirrors.tencent.com/npm/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "dev": true + }, + "object-inspect": { + "version": "1.13.1", + "resolved": "https://mirrors.tencent.com/npm/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://mirrors.tencent.com/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.3", + "resolved": "https://mirrors.tencent.com/npm/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + } + }, + "ospath": { + "version": "1.2.2", + "resolved": "https://mirrors.tencent.com/npm/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs=", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "7.1.1", + "resolved": "https://mirrors.tencent.com/npm/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.21.4", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^3.0.0", + "lines-and-columns": "^2.0.3", + "type-fest": "^3.8.0" + }, + "dependencies": { + "type-fest": { + "version": "3.13.1", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true + } + } + }, + "parse5": { + "version": "7.1.2", + "resolved": "https://mirrors.tencent.com/npm/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "requires": { + "entities": "^4.4.0" + } + }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-scurry": { + "version": "1.10.1", + "resolved": "https://mirrors.tencent.com/npm/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "requires": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.1.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true + } + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pathe": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://mirrors.tencent.com/npm/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinia": { + "version": "2.1.7", + "resolved": "https://mirrors.tencent.com/npm/pinia/-/pinia-2.1.7.tgz", + "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==", + "requires": { + "@vue/devtools-api": "^6.5.0", + "vue-demi": ">=0.14.5" + }, + "dependencies": { + "vue-demi": { + "version": "0.14.6", + "resolved": "https://mirrors.tencent.com/npm/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "requires": {} + } + } + }, + "pkg-types": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "requires": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "postcss": { + "version": "8.4.33", + "resolved": "https://mirrors.tencent.com/npm/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://mirrors.tencent.com/npm/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://mirrors.tencent.com/npm/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://mirrors.tencent.com/npm/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://mirrors.tencent.com/npm/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://mirrors.tencent.com/npm/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", + "dev": true + }, + "ps-tree": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "requires": { + "event-stream": "=3.3.4" + } + }, + "psl": { + "version": "1.9.0", + "resolved": "https://mirrors.tencent.com/npm/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://mirrors.tencent.com/npm/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true + }, + "qs": { + "version": "6.10.4", + "resolved": "https://mirrors.tencent.com/npm/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://mirrors.tencent.com/npm/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://mirrors.tencent.com/npm/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "read-pkg": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/read-pkg/-/read-pkg-8.1.0.tgz", + "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.1", + "normalize-package-data": "^6.0.0", + "parse-json": "^7.0.0", + "type-fest": "^4.2.0" + }, + "dependencies": { + "type-fest": { + "version": "4.9.0", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-4.9.0.tgz", + "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==", + "dev": true + } + } + }, + "request-progress": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=", + "dev": true, + "requires": { + "throttleit": "^1.0.0" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://mirrors.tencent.com/npm/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "rollup": { + "version": "4.9.3", + "resolved": "https://mirrors.tencent.com/npm/rollup/-/rollup-4.9.3.tgz", + "integrity": "sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.9.3", + "@rollup/rollup-android-arm64": "4.9.3", + "@rollup/rollup-darwin-arm64": "4.9.3", + "@rollup/rollup-darwin-x64": "4.9.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.3", + "@rollup/rollup-linux-arm64-gnu": "4.9.3", + "@rollup/rollup-linux-arm64-musl": "4.9.3", + "@rollup/rollup-linux-riscv64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-gnu": "4.9.3", + "@rollup/rollup-linux-x64-musl": "4.9.3", + "@rollup/rollup-win32-arm64-msvc": "4.9.3", + "@rollup/rollup-win32-ia32-msvc": "4.9.3", + "@rollup/rollup-win32-x64-msvc": "4.9.3", + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + } + }, + "rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://mirrors.tencent.com/npm/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://mirrors.tencent.com/npm/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://mirrors.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "saxes": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "set-function-length": { + "version": "1.1.1", + "resolved": "https://mirrors.tencent.com/npm/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "requires": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://mirrors.tencent.com/npm/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://mirrors.tencent.com/npm/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "siginfo": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://mirrors.tencent.com/npm/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://mirrors.tencent.com/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://mirrors.tencent.com/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://mirrors.tencent.com/npm/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://mirrors.tencent.com/npm/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2" + } + }, + "sshpk": { + "version": "1.18.0", + "resolved": "https://mirrors.tencent.com/npm/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stackback": { + "version": "0.0.2", + "resolved": "https://mirrors.tencent.com/npm/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha1-Gsig2Ug4SNFpXkGLbQMaPDzmjjs=", + "dev": true + }, + "start-server-and-test": { + "version": "2.0.3", + "resolved": "https://mirrors.tencent.com/npm/start-server-and-test/-/start-server-and-test-2.0.3.tgz", + "integrity": "sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==", + "dev": true, + "requires": { + "arg": "^5.0.2", + "bluebird": "3.7.2", + "check-more-types": "2.24.0", + "debug": "4.3.4", + "execa": "5.1.1", + "lazy-ass": "1.6.0", + "ps-tree": "1.2.0", + "wait-on": "7.2.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + } + } + }, + "std-env": { + "version": "3.7.0", + "resolved": "https://mirrors.tencent.com/npm/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://mirrors.tencent.com/npm/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "strip-literal": { + "version": "1.3.0", + "resolved": "https://mirrors.tencent.com/npm/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dev": true, + "requires": { + "acorn": "^8.10.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://mirrors.tencent.com/npm/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://mirrors.tencent.com/npm/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "synckit": { + "version": "0.8.8", + "resolved": "https://mirrors.tencent.com/npm/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", + "dev": true, + "requires": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throttleit": { + "version": "1.0.1", + "resolved": "https://mirrors.tencent.com/npm/throttleit/-/throttleit-1.0.1.tgz", + "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://mirrors.tencent.com/npm/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tinybench": { + "version": "2.5.1", + "resolved": "https://mirrors.tencent.com/npm/tinybench/-/tinybench-2.5.1.tgz", + "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", + "dev": true + }, + "tinypool": { + "version": "0.8.1", + "resolved": "https://mirrors.tencent.com/npm/tinypool/-/tinypool-0.8.1.tgz", + "integrity": "sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==", + "dev": true + }, + "tinyspy": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/tinyspy/-/tinyspy-2.2.0.tgz", + "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "dev": true + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://mirrors.tencent.com/npm/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://mirrors.tencent.com/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://mirrors.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://mirrors.tencent.com/npm/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } + } + }, + "tr46": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "requires": { + "punycode": "^2.3.1" + } + }, + "ts-api-utils": { + "version": "1.0.3", + "resolved": "https://mirrors.tencent.com/npm/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "requires": {} + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://mirrors.tencent.com/npm/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://mirrors.tencent.com/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://mirrors.tencent.com/npm/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://mirrors.tencent.com/npm/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://mirrors.tencent.com/npm/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://mirrors.tencent.com/npm/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "typescript": { + "version": "5.3.3", + "resolved": "https://mirrors.tencent.com/npm/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "devOptional": true + }, + "ufo": { + "version": "1.3.2", + "resolved": "https://mirrors.tencent.com/npm/ufo/-/ufo-1.3.2.tgz", + "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", + "dev": true + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://mirrors.tencent.com/npm/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "universalify": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + }, + "untildify": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://mirrors.tencent.com/npm/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://mirrors.tencent.com/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://mirrors.tencent.com/npm/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://mirrors.tencent.com/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://mirrors.tencent.com/npm/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vite": { + "version": "5.0.11", + "resolved": "https://mirrors.tencent.com/npm/vite/-/vite-5.0.11.tgz", + "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", + "dev": true, + "requires": { + "esbuild": "^0.19.3", + "fsevents": "~2.3.3", + "postcss": "^8.4.32", + "rollup": "^4.2.0" + } + }, + "vite-node": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/vite-node/-/vite-node-1.1.3.tgz", + "integrity": "sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==", + "dev": true, + "requires": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + } + }, + "vitest": { + "version": "1.1.3", + "resolved": "https://mirrors.tencent.com/npm/vitest/-/vitest-1.1.3.tgz", + "integrity": "sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==", + "dev": true, + "requires": { + "@vitest/expect": "1.1.3", + "@vitest/runner": "1.1.3", + "@vitest/snapshot": "1.1.3", + "@vitest/spy": "1.1.3", + "@vitest/utils": "1.1.3", + "acorn-walk": "^8.3.1", + "cac": "^6.7.14", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^1.3.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.1", + "vite": "^5.0.0", + "vite-node": "1.1.3", + "why-is-node-running": "^2.2.2" + }, + "dependencies": { + "execa": { + "version": "8.0.1", + "resolved": "https://mirrors.tencent.com/npm/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + } + }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://mirrors.tencent.com/npm/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, + "human-signals": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.2.0", + "resolved": "https://mirrors.tencent.com/npm/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://mirrors.tencent.com/npm/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://mirrors.tencent.com/npm/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "vue": { + "version": "3.4.5", + "resolved": "https://mirrors.tencent.com/npm/vue/-/vue-3.4.5.tgz", + "integrity": "sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==", + "requires": { + "@vue/compiler-dom": "3.4.5", + "@vue/compiler-sfc": "3.4.5", + "@vue/runtime-dom": "3.4.5", + "@vue/server-renderer": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "vue-component-type-helpers": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/vue-component-type-helpers/-/vue-component-type-helpers-1.8.27.tgz", + "integrity": "sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==", + "dev": true + }, + "vue-eslint-parser": { + "version": "9.3.2", + "resolved": "https://mirrors.tencent.com/npm/vue-eslint-parser/-/vue-eslint-parser-9.3.2.tgz", + "integrity": "sha512-q7tWyCVaV9f8iQyIA5Mkj/S6AoJ9KBN8IeUSf3XEmBrOtxOZnfTg5s4KClbZBCK3GtnT/+RyCLZyDHuZwTuBjg==", + "dev": true, + "requires": { + "debug": "^4.3.4", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^7.3.6" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "vue-router": { + "version": "4.2.5", + "resolved": "https://mirrors.tencent.com/npm/vue-router/-/vue-router-4.2.5.tgz", + "integrity": "sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==", + "requires": { + "@vue/devtools-api": "^6.5.0" + } + }, + "vue-template-compiler": { + "version": "2.7.16", + "resolved": "https://mirrors.tencent.com/npm/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", + "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", + "dev": true, + "requires": { + "de-indent": "^1.0.2", + "he": "^1.2.0" + } + }, + "vue-tsc": { + "version": "1.8.27", + "resolved": "https://mirrors.tencent.com/npm/vue-tsc/-/vue-tsc-1.8.27.tgz", + "integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==", + "dev": true, + "requires": { + "@volar/typescript": "~1.11.1", + "@vue/language-core": "1.8.27", + "semver": "^7.5.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://mirrors.tencent.com/npm/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://mirrors.tencent.com/npm/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "requires": { + "xml-name-validator": "^5.0.0" + }, + "dependencies": { + "xml-name-validator": { + "version": "5.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true + } + } + }, + "wait-on": { + "version": "7.2.0", + "resolved": "https://mirrors.tencent.com/npm/wait-on/-/wait-on-7.2.0.tgz", + "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==", + "dev": true, + "requires": { + "axios": "^1.6.1", + "joi": "^17.11.0", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "rxjs": "^7.8.1" + } + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://mirrors.tencent.com/npm/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true + }, + "whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "requires": { + "iconv-lite": "0.6.3" + } + }, + "whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true + }, + "whatwg-url": { + "version": "14.0.0", + "resolved": "https://mirrors.tencent.com/npm/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "dev": true, + "requires": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://mirrors.tencent.com/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "why-is-node-running": { + "version": "2.2.2", + "resolved": "https://mirrors.tencent.com/npm/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "requires": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://mirrors.tencent.com/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "ws": { + "version": "8.16.0", + "resolved": "https://mirrors.tencent.com/npm/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, + "requires": {} + }, + "xml-name-validator": { + "version": "4.0.0", + "resolved": "https://mirrors.tencent.com/npm/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://mirrors.tencent.com/npm/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://mirrors.tencent.com/npm/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://mirrors.tencent.com/npm/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package.json" new file mode 100644 index 000000000..1000b2c4b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/package.json" @@ -0,0 +1,47 @@ +{ + "name": "vue-project", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "run-p type-check \"build-only {@}\" --", + "preview": "vite preview", + "test:unit": "vitest", + "test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'", + "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'", + "build-only": "vite build", + "type-check": "vue-tsc --build --force", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", + "format": "prettier --write src/" + }, + "dependencies": { + "pinia": "^2.1.7", + "vue": "^3.3.11", + "vue-router": "^4.2.5" + }, + "devDependencies": { + "@rushstack/eslint-patch": "^1.3.3", + "@tsconfig/node18": "^18.2.2", + "@types/jsdom": "^21.1.6", + "@types/node": "^18.19.3", + "@vitejs/plugin-vue": "^4.5.2", + "@vitejs/plugin-vue-jsx": "^3.1.0", + "@vue/eslint-config-prettier": "^8.0.0", + "@vue/eslint-config-typescript": "^12.0.0", + "@vue/test-utils": "^2.4.3", + "@vue/tsconfig": "^0.5.0", + "cypress": "^13.6.1", + "eslint": "^8.49.0", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-vue": "^9.17.0", + "jsdom": "^23.0.1", + "npm-run-all2": "^6.1.1", + "prettier": "^3.0.3", + "start-server-and-test": "^2.0.3", + "typescript": "~5.3.0", + "vite": "^5.0.10", + "vitest": "^1.0.4", + "vue-tsc": "^1.8.25" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/public/favicon.ico" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/public/favicon.ico" new file mode 100644 index 000000000..df36fcfb7 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/public/favicon.ico" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/App.vue" new file mode 100644 index 000000000..7905b0516 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/App.vue" @@ -0,0 +1,85 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/base.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/base.css" new file mode 100644 index 000000000..8816868a4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/base.css" @@ -0,0 +1,86 @@ +/* color palette from */ +:root { + --vt-c-white: #ffffff; + --vt-c-white-soft: #f8f8f8; + --vt-c-white-mute: #f2f2f2; + + --vt-c-black: #181818; + --vt-c-black-soft: #222222; + --vt-c-black-mute: #282828; + + --vt-c-indigo: #2c3e50; + + --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); + --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); + --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); + + --vt-c-text-light-1: var(--vt-c-indigo); + --vt-c-text-light-2: rgba(60, 60, 60, 0.66); + --vt-c-text-dark-1: var(--vt-c-white); + --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); +} + +/* semantic color variables for this project */ +:root { + --color-background: var(--vt-c-white); + --color-background-soft: var(--vt-c-white-soft); + --color-background-mute: var(--vt-c-white-mute); + + --color-border: var(--vt-c-divider-light-2); + --color-border-hover: var(--vt-c-divider-light-1); + + --color-heading: var(--vt-c-text-light-1); + --color-text: var(--vt-c-text-light-1); + + --section-gap: 160px; +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--vt-c-black); + --color-background-soft: var(--vt-c-black-soft); + --color-background-mute: var(--vt-c-black-mute); + + --color-border: var(--vt-c-divider-dark-2); + --color-border-hover: var(--vt-c-divider-dark-1); + + --color-heading: var(--vt-c-text-dark-1); + --color-text: var(--vt-c-text-dark-2); + } +} + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + font-weight: normal; +} + +body { + min-height: 100vh; + color: var(--color-text); + background: var(--color-background); + transition: + color 0.5s, + background-color 0.5s; + line-height: 1.6; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + Oxygen, + Ubuntu, + Cantarell, + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + font-size: 15px; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/logo.svg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/logo.svg" new file mode 100644 index 000000000..756566035 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/logo.svg" @@ -0,0 +1 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/main.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/main.css" new file mode 100644 index 000000000..36fb845b5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/assets/main.css" @@ -0,0 +1,35 @@ +@import './base.css'; + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + font-weight: normal; +} + +a, +.green { + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; + padding: 3px; +} + +@media (hover: hover) { + a:hover { + background-color: hsla(160, 100%, 37%, 0.2); + } +} + +@media (min-width: 1024px) { + body { + display: flex; + place-items: center; + } + + #app { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/HelloWorld.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/HelloWorld.vue" new file mode 100644 index 000000000..38d821ef8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/HelloWorld.vue" @@ -0,0 +1,41 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/TheWelcome.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/TheWelcome.vue" new file mode 100644 index 000000000..49d8f7354 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/TheWelcome.vue" @@ -0,0 +1,88 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/WelcomeItem.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/WelcomeItem.vue" new file mode 100644 index 000000000..6d7086aea --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/WelcomeItem.vue" @@ -0,0 +1,87 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/__tests__/HelloWorld.spec.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/__tests__/HelloWorld.spec.ts" new file mode 100644 index 000000000..253320200 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/__tests__/HelloWorld.spec.ts" @@ -0,0 +1,11 @@ +import { describe, it, expect } from 'vitest' + +import { mount } from '@vue/test-utils' +import HelloWorld from '../HelloWorld.vue' + +describe('HelloWorld', () => { + it('renders properly', () => { + const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } }) + expect(wrapper.text()).toContain('Hello Vitest') + }) +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconCommunity.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconCommunity.vue" new file mode 100644 index 000000000..2dc8b0552 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconCommunity.vue" @@ -0,0 +1,7 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconDocumentation.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconDocumentation.vue" new file mode 100644 index 000000000..6d4791cfb --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconDocumentation.vue" @@ -0,0 +1,7 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconEcosystem.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconEcosystem.vue" new file mode 100644 index 000000000..c3a4f078c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconEcosystem.vue" @@ -0,0 +1,7 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconSupport.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconSupport.vue" new file mode 100644 index 000000000..7452834d3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconSupport.vue" @@ -0,0 +1,7 @@ + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconTooling.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconTooling.vue" new file mode 100644 index 000000000..660598d7c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/components/icons/IconTooling.vue" @@ -0,0 +1,19 @@ + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/main.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/main.ts" new file mode 100644 index 000000000..5dcad83c3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/main.ts" @@ -0,0 +1,14 @@ +import './assets/main.css' + +import { createApp } from 'vue' +import { createPinia } from 'pinia' + +import App from './App.vue' +import router from './router' + +const app = createApp(App) + +app.use(createPinia()) +app.use(router) + +app.mount('#app') diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/router/index.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/router/index.ts" new file mode 100644 index 000000000..a49ae507f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/router/index.ts" @@ -0,0 +1,23 @@ +import { createRouter, createWebHistory } from 'vue-router' +import HomeView from '../views/HomeView.vue' + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/', + name: 'home', + component: HomeView + }, + { + path: '/about', + name: 'about', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/AboutView.vue') + } + ] +}) + +export default router diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/stores/counter.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/stores/counter.ts" new file mode 100644 index 000000000..b6757ba57 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/stores/counter.ts" @@ -0,0 +1,12 @@ +import { ref, computed } from 'vue' +import { defineStore } from 'pinia' + +export const useCounterStore = defineStore('counter', () => { + const count = ref(0) + const doubleCount = computed(() => count.value * 2) + function increment() { + count.value++ + } + + return { count, doubleCount, increment } +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/AboutView.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/AboutView.vue" new file mode 100644 index 000000000..756ad2a17 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/AboutView.vue" @@ -0,0 +1,15 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/HomeView.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/HomeView.vue" new file mode 100644 index 000000000..d5c0217e4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/src/views/HomeView.vue" @@ -0,0 +1,9 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.app.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.app.json" new file mode 100644 index 000000000..491e09395 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.app.json" @@ -0,0 +1,13 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], + "exclude": ["src/**/__tests__/*"], + "compilerOptions": { + "composite": true, + "noEmit": true, + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.json" new file mode 100644 index 000000000..5304731b8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.json" @@ -0,0 +1,17 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.node.json" + }, + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.vitest.json" + } + ], + "compilerOptions": { + "module": "NodeNext" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.node.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.node.json" new file mode 100644 index 000000000..46cf2e142 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.node.json" @@ -0,0 +1,17 @@ +{ + "extends": "@tsconfig/node18/tsconfig.json", + "include": [ + "vite.config.*", + "vitest.config.*", + "cypress.config.*", + "nightwatch.conf.*", + "playwright.config.*" + ], + "compilerOptions": { + "composite": true, + "noEmit": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "types": ["node"] + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.vitest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.vitest.json" new file mode 100644 index 000000000..d080d611e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/tsconfig.vitest.json" @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.app.json", + "exclude": [], + "compilerOptions": { + "composite": true, + "lib": [], + "types": ["node", "jsdom"] + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vite.config.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vite.config.ts" new file mode 100644 index 000000000..36c618756 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vite.config.ts" @@ -0,0 +1,18 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + vueJsx(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } +}) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vitest.config.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vitest.config.ts" new file mode 100644 index 000000000..10067d578 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/07-vue3/vue-project/vitest.config.ts" @@ -0,0 +1,14 @@ +import { fileURLToPath } from 'node:url' +import { mergeConfig, defineConfig, configDefaults } from 'vitest/config' +import viteConfig from './vite.config' + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + environment: 'jsdom', + exclude: [...configDefaults.exclude, 'e2e/*'], + root: fileURLToPath(new URL('./', import.meta.url)) + } + }) +) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/README.md" new file mode 100644 index 000000000..02430b920 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/README.md" @@ -0,0 +1,63 @@ + +# uni-app study + + +新建 common 目录并优先存放资源,因为 static 目录下的内容无论是否使用都会被打包 + + + +引入全局 css +在 App.vue 中 +``` + +``` + +## 1. + +配置微信开发者工具,注意设置安全配置,开放端口 + +eval5 +binding.js + + +css处理刘海屏底部安全区 + +```css +.float { + padding-bottom: env(safe-area-inset-bottom); +} +``` + + +vue样式穿透 +``` +:deep() { + .uni-icons { + color: #eee; + } +} +``` + + + +跳转切换底部tab,navigator 标签需要添加属性 open-type="reLaunch" + + + +css + +width: fit-content; + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/.gitignore" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/.gitignore" new file mode 100644 index 000000000..988442b2a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/.gitignore" @@ -0,0 +1,2 @@ +**/unpackage/ +**/node_modules/ \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/README2.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/README2.md" new file mode 100644 index 000000000..f7450bcd1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/README2.md" @@ -0,0 +1,322 @@ +# uniapp最新Vue3组合式API版本零基础入门到项目实战 + +![uniappv3](课程需要的资料/uniappv3.jpg) + +## 微信扫码体验“咸虾米壁纸”最终项目 + +![uniappv3](课程需要的资料/wx_code.jpg) + + + + + + + + + +## 课程目录+随堂笔记 + +### 一、开发环境及项目创建 + +##### 1.1.uniappVue版本知识点概述 + +##### 1.2.使用HBuilder编辑器创建vue3新项目 + +##### 1.3.配置外部浏览器及各种小程序模拟器 + +##### 1.4.创建页面及vue页面内基本组成部分 + +### 二、常用的内置组件 + +##### 2.1.view和text常用视图容器组件 + +##### 2.2.scroll-view可滚动视图区域组件 + +##### 2.3.swiper滑块视图容器的用法 + +##### 2.4.image媒体组件属性配合swiper轮播 + +##### 2.5.navigator路由与页面跳转 + +##### 2.6.常用的表单组件button和input + +### 三、vue3组合式API快速上手 + +##### 3.1.vue3的模板语法插值表达式用法 + +##### 3.2.使用ref定义响应式数据变量 + +##### 3.3.v-bind指令配合图片轮播案例 + +##### 3.4.class类和style内联样式的绑定 + +##### 3.5.原生事件监听及组件内置事件处理 + +##### 3.6.创建自定义模板快速创建uniapp的vue3页面结构 + +##### 3.7.v-if条件渲染及v-show的选择对比 + +##### 3.8.v-for列表渲染的用法 + +##### 3.9.【购物车案例】for循环为什么使用key + +##### 3.10.【小鸡案例】表单focus和blur事件用法 + +##### 3.11.v-model双向绑定的实现原理 + +##### 3.12.【热梗案例】知识点阶段性综合汇总 + +##### 3.13.computed计算属性用法及方法对比 + +##### 3.14.【计价案例】计算属性配合循环遍历统计总价 + +拓展阅读:[各种类型的for循环遍历](https://blog.csdn.net/qq_18798149/article/details/135089225) + +##### 3.15.watch和watchEffect监听的使用 + +拓展阅读:[vue3中computed计算属性和watch监听的异同点](https://blog.csdn.net/qq_18798149/article/details/135302780) + +### 四、深入vue组件及生命周期 + +##### 4.1.uniapp创建组件和vue官方文档的差异对比 + +##### 4.2.在组件中通过Props进行数据传递 + +##### 4.3.Prop校验与prop默认值用法及循环遍历数组对象 + +##### 4.4.插槽Slots及具名插槽实现组件高度定制化 + +##### 4.5.组件中emit的声明触发事件 + +##### 4.6.vue3组合式API中的组件的生命周期函数(钩子函数) + +拓展阅读:[uniappVue3版本中组件生命周期和页面生命周期的详细介绍](https://blog.csdn.net/qq_18798149/article/details/135405378) + +##### 4.7.使用defineExpose暴漏子组件的属性及方法 + +##### 4.8.页面生命周期onLoad和onReady在vue3组合式api中的使用 + +##### 4.9.onShow和onHide钩子的对比和执行顺序 + +##### 4.10.onUnload页面卸载和onPageScroll监听页面滚动 + +### 五、uniapp全局文件配置和API调用 + +##### 5.1.响应式单位rpx及搭配使用UI产品工具 + +##### 5.2.@import导入css样式及scss变量用法与static目录 + +##### 5.3.pages.json页面路由globalStyle的属性 + +##### 5.4.pages设置页面路径及窗口表现 + +##### 5.5.tabBar设置底部菜单选项及iconfont图标 + +##### 5.6.manifest.json配置和注册微信小程序appid + +##### 5.7.安装插件unplugin-auto-import自动导入vue和uniapp模块 + +使用说明:[开发uniapp使用Vue3组合式API版本,如何实现从vue模块中自动导入](https://blog.csdn.net/qq_18798149/article/details/134321097) + +##### 5.8.uni-api交互反馈showToast的用法 + +##### 5.9.showLoading加载和showModal模态框示例 + +##### 5.10.showActionSheet从底部向上弹出操作菜单 + +##### 5.11.动态设置页面导航条的样式 + +##### 5.12.setTabBar设置TabBar和下拉刷新API + +##### 5.13.页面和路由API-navigateTo及页面栈getCurrentPages + +##### 5.14.StorageSync数据缓存API + +##### 5.15.uni.request发送网络请求 + +免费测试api接口:https://jsonplaceholder.typicode.com/ + +随机猫咪API接口:https://api.thecatapi.com/v1/images/search?limit=1 + +咸虾米API接口:https://api.qingnian8.com/ + +NBA球员榜:https://tiyu.baidu.com/api/match/playerranking/match/NBA/tabId/60 + +##### 5.16.request各种不同类型的参数详解 + +### 六、阶段性综合小实例-萌宠集 + +##### 6.1.页面布局 + +##### 6.2.调用萌宠API接口渲染到页面中 + +##### 6.3.使用API接口通过传输头传递access-key + +##### 6.4.previewImage图片预览和lazy-load懒加载 + +##### 6.5.对回调结果严格处理then_catch_finally用法 + +##### 6.6.完成下拉刷新和触底加载更多 + +##### 6.7.底部安全区域css环境变量 + +`env(safe-area-inset-bottom)` + +##### 6.8.使用uni-ui扩展组件 + +##### 6.9.分段器组件实现点击切换萌宠类型 + +### 七、咸虾米壁纸项目实战 + +##### 7.1.咸虾米壁纸项目概述 + +##### 7.2.项目初始化公共目录和设计稿尺寸测量工具 + +##### 7.3.banner海报swiper轮播器 + +##### 7.4.使用swiper的纵向轮播做公告区域 + +##### 7.5.每日推荐滑动scroll-view布局 + +##### 7.6.组件具名插槽定义公共标题模块 + +##### 7.7.细节拉满磨砂背景定位布局做专题组件 + +##### 7.8.同一组件Props传递不同属性值展示不同效果 + +##### 7.9.设置项目底部tab页面切换标签 + +##### 7.10.个人中心页面布局 + +##### 7.11.ifdef条件编译实现多终端匹配和客服消息 + +##### 7.12.设置页面全局渐变线性渐变背景色 + +##### 7.13.定义scss颜色变量deep()修改子组件css样式 + +##### 7.14.创建分类列表完成各页面的跳转 + +##### 7.15.全屏页面absolute定位布局和fit-content内容宽度 + +##### 7.16.遮罩层状态转换及日期格式化 + +##### 7.17.uni-popup弹窗层制作弹出信息内容效果 + +##### 7.18.评分弹出框uni-rate组件的属性方法 + +##### 7.19.自定义头部导航栏布局 + +##### 7.20.获取系统信息getSystemInfo状态栏和胶囊按钮 + +##### 7.21.抽离公共方法用条件编译对抖音小程序适配 + +##### 7.22.完善页面布局实现各个页面的串联 + +### 八、封装网络请求对接各个页面的真实接口 + +##### 8.1.调用网络接口在首页展示真实数据并渲染 + +##### 8.2.使用Promise封装request网络请求 + +##### 8.3.对封装的request请求进行传参 + +##### 8.4.给专题组件通过defineProps声明变量传值渲染 + +##### 8.5.使用ChatGPT AI辅助工具写JS工具方法并完成分类页面渲染 + +##### 8.6.调试分类列表接口将数据渲染到页面中 + +##### 8.7.从onLoad获取参数作为接口的参数获取对应的数据 + +##### 8.8.触底加载更多阻止无效的网络请求 + +##### 8.9.骨架屏和触底加载load-more样式的展现 + +##### 8.10.分类列表存入Storage在预览页面读取缓存展示 + +##### 8.11.通过swiper的事件实现真正的壁纸预览及切换 + +##### 8.12.(选学但重要)巧妙解决首次加载额外的图片网络消耗 + +##### 8.13.展示每张壁纸的专属信息 + +##### 8.14.对接评分接口对壁纸进行滑动提交打分 + +##### 8.15.通过本地缓存修改已评分过的状态 + +##### 8.16.saveImageToPhotosAlbum保存壁纸到相册 + +实现源码:[开发微信小程序,将图片下载到相册的方法](https://blog.csdn.net/qq_18798149/article/details/135871140) + +##### 8.17.openSetting调用客户端授权信息及各种异常处理 + +##### 8.18.try{}catch处理同步请求下载记录异常处理 + +##### 8.19.onShareAppMessage分享好友和分享微信朋友圈 + +##### 8.20.对分享页面传参进行特殊处理 + +##### 8.21.处理popup底部弹窗空缺安全区域及其他页面优化 + +修改路径:uni_modules\uni-popup\components\uni-popup\uni-popup.vue + +在349行左右的位置,注释掉: + +```javascript +// paddingBottom: this.safeAreaInsets + 'px', +``` + +### 九、其他功能页面实现 + +##### 9.1.获取个人中心接口数据渲染到用户页面中 + +##### 9.2.共用分类列表页面实现我的下载和评分页面 + +##### 9.3.使用mp-html富文本插件渲染公告详情页面 + +##### 9.4.搜索页面布局及结合数据缓存展示搜索历史 + +##### 9.5.对接搜索接口预览搜索结果 + +##### 9.6.banner中navigator组件跳转到其他小程序及bug解决 + +### 十、多个常见平台的打包上线 + +##### 10.1.打包发行微信小程序的上线全流程 + +注册地址:https://mp.weixin.qq.com/ + +##### 10.2.打包抖音小程序条件编译抖音专属代码 + +开发平台地址:https://developer.open-douyin.com/ + +##### 10.3.打包H5并发布上线到unicloud的前端网页托管 + +拓展阅读:[uniCloud服务空间前端网页托管绑定自定义配置网站域名](https://blog.csdn.net/qq_18798149/article/details/129860824) + +##### 10.4.打包安卓APP并安装运行 + +##### 10.5.【完结撒花】项目总结和知识拓展 + +## 学习交流群 + +咸虾米QQ群:247369155 + +![uniappv3](课程需要的资料/qqGroup.png) + + + + + +## 项目预览图 + +![uniappv3](课程需要的资料/design/home.jpg) + +----------------------------------- + +![uniappv3](课程需要的资料/design/classify.jpg) + +--------------------------------------- + +![uniappv3](课程需要的资料/design/preview1.jpg) + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/App.vue" new file mode 100644 index 000000000..3a1d5a5fd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/css/style.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/css/style.css" new file mode 100644 index 000000000..24fa7dc6d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/css/style.css" @@ -0,0 +1,5 @@ +view{ + font-size: 40rpx; + box-sizing: border-box; + background: pink; +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/scss/aaa.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/scss/aaa.scss" new file mode 100644 index 000000000..e69de29bb diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/scss/self.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/scss/self.scss" new file mode 100644 index 000000000..9ab615cf9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/common/scss/self.scss" @@ -0,0 +1,4 @@ + +$custom-color-1:red; +$custom-color-2:green; +$custom-color-3:#35570f; \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/UserInfo/UserInfo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/UserInfo/UserInfo.vue" new file mode 100644 index 000000000..5d7ef5409 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/UserInfo/UserInfo.vue" @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/demo-child/demo-child.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/demo-child/demo-child.vue" new file mode 100644 index 000000000..acfdecb51 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/demo-child/demo-child.vue" @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/life-demo/life-demo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/life-demo/life-demo.vue" new file mode 100644 index 000000000..40fd28fe3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/life-demo/life-demo.vue" @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-child/xxm-child.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-child/xxm-child.vue" new file mode 100644 index 000000000..954711958 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-child/xxm-child.vue" @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-header/xxm-header.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-header/xxm-header.vue" new file mode 100644 index 000000000..4a5c32f0b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-header/xxm-header.vue" @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-layout/xxm-layout.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-layout/xxm-layout.vue" new file mode 100644 index 000000000..7ca584326 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/components/xxm-layout/xxm-layout.vue" @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/manifest.json" new file mode 100644 index 000000000..d4ae1672f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/manifest.json" @@ -0,0 +1,73 @@ +{ + "name" : "uniappDemo2", + "appid" : "__UNI__C0A8B81", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" + +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages.json" new file mode 100644 index 000000000..5aae7bbd7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages.json" @@ -0,0 +1,73 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app" + } + }, + { + "path" : "pages/demo1/demo1", + "style" : + { + "navigationBarTitleText" : "demo1", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo2/demo2", + "style" : + { + "navigationBarTitleText" : "demo2", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo3/demo3", + "style" : + { + "navigationBarTitleText" : "demo3", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo4/demo4", + "style" : + { + "navigationBarTitleText" : "demo4", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo5/demo5", + "style" : + { + "navigationBarTitleText" : "demo5", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo6/demo6", + "style" : + { + "navigationBarTitleText" : "demo6", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo7/demo7", + "style" : + { + "navigationBarTitleText" : "demo7", + "enablePullDownRefresh" : false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo1/demo1.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo1/demo1.vue" new file mode 100644 index 000000000..2f8780103 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo1/demo1.vue" @@ -0,0 +1,21 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo2/demo2.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo2/demo2.vue" new file mode 100644 index 000000000..8ac6b9b0a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo2/demo2.vue" @@ -0,0 +1,27 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo3/demo3.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo3/demo3.vue" new file mode 100644 index 000000000..999ac05e0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo3/demo3.vue" @@ -0,0 +1,29 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo4/demo4.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo4/demo4.vue" new file mode 100644 index 000000000..4bce0ad5b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo4/demo4.vue" @@ -0,0 +1,28 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo5/demo5.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo5/demo5.vue" new file mode 100644 index 000000000..788873c49 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo5/demo5.vue" @@ -0,0 +1,28 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo6/demo6.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo6/demo6.vue" new file mode 100644 index 000000000..3772153c1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo6/demo6.vue" @@ -0,0 +1,89 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo7/demo7.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo7/demo7.vue" new file mode 100644 index 000000000..bc772adad --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/demo7/demo7.vue" @@ -0,0 +1,29 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/index/index.vue" new file mode 100644 index 000000000..ae3b9c0c7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/pages/index/index.vue" @@ -0,0 +1,25 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/logo.png" new file mode 100644 index 000000000..b5771e209 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic1.jpg" new file mode 100644 index 000000000..a168ad5ed Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic2.jpg" new file mode 100644 index 000000000..5fced7878 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic3.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic3.jpg" new file mode 100644 index 000000000..d362c9d26 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/static/pic3.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.scss" new file mode 100644 index 000000000..49f5c47dd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo2/uni.scss" @@ -0,0 +1,79 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; + +@import "@/common/scss/self.scss"; + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/.hbuilderx/launch.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/.hbuilderx/launch.json" new file mode 100644 index 000000000..81f13f4f4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/.hbuilderx/launch.json" @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/App.vue" new file mode 100644 index 000000000..88776de14 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/manifest.json" new file mode 100644 index 000000000..ad6cd0f80 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/manifest.json" @@ -0,0 +1,76 @@ +{ + "name" : "uniappDemo3", + "appid" : "__UNI__E4FA250", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx511abe7a13783591", + "setting" : { + "urlCheck" : false, + "minified" : true + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3", + "h5" : { + "title" : "咸虾米壁纸" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package-lock.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package-lock.json" new file mode 100644 index 000000000..62592f1e8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package-lock.json" @@ -0,0 +1,945 @@ +{ + "name": "uniappDemo3", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "unplugin-auto-import": "^0.17.3" + } + }, + "node_modules/@antfu/utils": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.7.tgz", + "integrity": "sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mlly": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "dependencies": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scule": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.1.tgz", + "integrity": "sha512-sHtm/SsIK9BUBI3EFT/Gnp9VoKfY6QLvlkvAE6YK7454IF8FSgJEAnJpVdSC7K5/pjI5NfxhzBLW2JAfYA/shQ==" + }, + "node_modules/strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dependencies": { + "acorn": "^8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ufo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", + "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" + }, + "node_modules/unimport": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.7.1.tgz", + "integrity": "sha512-V9HpXYfsZye5bPPYUgs0Otn3ODS1mDUciaBlXljI4C2fTwfFpvFZRywmlOu943puN9sncxROMZhsZCjNXEpzEQ==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "acorn": "^8.11.2", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "mlly": "^1.4.2", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "scule": "^1.1.1", + "strip-literal": "^1.3.0", + "unplugin": "^1.5.1" + } + }, + "node_modules/unimport/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/unplugin": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.6.0.tgz", + "integrity": "sha512-BfJEpWBu3aE/AyHx8VaNE/WgouoQxgH9baAiH82JjX8cqVyi3uJQstqwD5J+SZxIK326SZIhsSZlALXVBCknTQ==", + "dependencies": { + "acorn": "^8.11.2", + "chokidar": "^3.5.3", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.6.1" + } + }, + "node_modules/unplugin-auto-import": { + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-0.17.3.tgz", + "integrity": "sha512-0cn0wr8X579TtdZKUAps0dDVrYzttx38ImdxZjmCeNlMDJX8UuSjO83vFqgS4ClNDIGWAute+xl9j5vRSX+vsw==", + "dependencies": { + "@antfu/utils": "^0.7.7", + "@rollup/pluginutils": "^5.1.0", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "minimatch": "^9.0.3", + "unimport": "^3.7.0", + "unplugin": "^1.6.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@nuxt/kit": "^3.2.2", + "@vueuse/core": "*" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + }, + "@vueuse/core": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.1.tgz", + "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==" + } + }, + "dependencies": { + "@antfu/utils": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.7.tgz", + "integrity": "sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg==" + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==" + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fastq": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + }, + "local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "requires": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + } + }, + "magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "mlly": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "requires": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "pathe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "requires": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "scule": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.1.tgz", + "integrity": "sha512-sHtm/SsIK9BUBI3EFT/Gnp9VoKfY6QLvlkvAE6YK7454IF8FSgJEAnJpVdSC7K5/pjI5NfxhzBLW2JAfYA/shQ==" + }, + "strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "requires": { + "acorn": "^8.10.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "ufo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", + "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" + }, + "unimport": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.7.1.tgz", + "integrity": "sha512-V9HpXYfsZye5bPPYUgs0Otn3ODS1mDUciaBlXljI4C2fTwfFpvFZRywmlOu943puN9sncxROMZhsZCjNXEpzEQ==", + "requires": { + "@rollup/pluginutils": "^5.1.0", + "acorn": "^8.11.2", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "mlly": "^1.4.2", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "scule": "^1.1.1", + "strip-literal": "^1.3.0", + "unplugin": "^1.5.1" + }, + "dependencies": { + "estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "requires": { + "@types/estree": "^1.0.0" + } + } + } + }, + "unplugin": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.6.0.tgz", + "integrity": "sha512-BfJEpWBu3aE/AyHx8VaNE/WgouoQxgH9baAiH82JjX8cqVyi3uJQstqwD5J+SZxIK326SZIhsSZlALXVBCknTQ==", + "requires": { + "acorn": "^8.11.2", + "chokidar": "^3.5.3", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.6.1" + } + }, + "unplugin-auto-import": { + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-0.17.3.tgz", + "integrity": "sha512-0cn0wr8X579TtdZKUAps0dDVrYzttx38ImdxZjmCeNlMDJX8UuSjO83vFqgS4ClNDIGWAute+xl9j5vRSX+vsw==", + "requires": { + "@antfu/utils": "^0.7.7", + "@rollup/pluginutils": "^5.1.0", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "minimatch": "^9.0.3", + "unimport": "^3.7.0", + "unplugin": "^1.6.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==" + }, + "webpack-virtual-modules": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.1.tgz", + "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==" + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package.json" new file mode 100644 index 000000000..3687c5252 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/package.json" @@ -0,0 +1,5 @@ +{ + "dependencies": { + "unplugin-auto-import": "^0.17.3" + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages.json" new file mode 100644 index 000000000..e6548609b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages.json" @@ -0,0 +1,108 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app", + "enablePullDownRefresh":true + } + }, + { + "path": "pages/user/user", + "style": { + "navigationBarTitleText": "个人中心" + } + }, + { + "path" : "pages/classify/classify", + "style" : + { + "navigationBarBackgroundColor": "#F2E6DE", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "分类", + "enablePullDownRefresh":true + } + }, + { + "path" : "pages/demo/demo", + "style" : + { + "navigationBarTitleText" : "demo", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo2/demo2", + "style" : + { + "navigationBarTitleText" : "demo2", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo3/demo3", + "style" : + { + "navigationBarTitleText" : "demo3", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo4/demo4", + "style" : + { + "navigationBarTitleText" : "request网络请求", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo5/demo5", + "style" : + { + "navigationBarTitleText" : "request参数", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/requestDemo/requestDemo", + "style" : + { + "navigationBarTitleText" : "request综合案例", + "enablePullDownRefresh" : true + } + } + + + ], + "globalStyle": { + "navigationBarBackgroundColor": "#2B9939", + "navigationBarTextStyle": "white", + "navigationBarTitleText": "咸虾米", + "backgroundColor": "#ccc", + "backgroundTextStyle": "light", + "onReachBottomDistance":50 + }, + "tabBar": { + "color": "#999", + "selectedColor": "#2B9939", + "list": [ + { + "pagePath": "pages/index/index", + "text": "首页", + "iconPath": "static/images/tabBar/home.png", + "selectedIconPath": "static/images/tabBar/home-h.png" + },{ + "pagePath": "pages/classify/classify", + "text": "分类", + "iconPath": "static/images/tabBar/classify.png", + "selectedIconPath": "static/images/tabBar/classify-h.png" + },{ + "pagePath": "pages/user/user", + "text": "我的", + "iconPath": "static/images/tabBar/user.png", + "selectedIconPath": "static/images/tabBar/user-h.png" + } + ] + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/classify/classify.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/classify/classify.vue" new file mode 100644 index 000000000..367c4e1fe --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/classify/classify.vue" @@ -0,0 +1,53 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo/demo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo/demo.vue" new file mode 100644 index 000000000..f21ffebea --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo/demo.vue" @@ -0,0 +1,30 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo2/demo2.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo2/demo2.vue" new file mode 100644 index 000000000..a902deba5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo2/demo2.vue" @@ -0,0 +1,20 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo3/demo3.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo3/demo3.vue" new file mode 100644 index 000000000..b25a9712b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo3/demo3.vue" @@ -0,0 +1,33 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo4/demo4.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo4/demo4.vue" new file mode 100644 index 000000000..8fdc2d27e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo4/demo4.vue" @@ -0,0 +1,64 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo5/demo5.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo5/demo5.vue" new file mode 100644 index 000000000..711f731d1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/demo5/demo5.vue" @@ -0,0 +1,41 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/index/index.vue" new file mode 100644 index 000000000..fd366f070 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/index/index.vue" @@ -0,0 +1,77 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/requestDemo/requestDemo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/requestDemo/requestDemo.vue" new file mode 100644 index 000000000..38ce6d083 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/requestDemo/requestDemo.vue" @@ -0,0 +1,183 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/user/user.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/user/user.vue" new file mode 100644 index 000000000..b22f3a72d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/pages/user/user.vue" @@ -0,0 +1,25 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify-h.png" new file mode 100644 index 000000000..2858107ef Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify.png" new file mode 100644 index 000000000..d32bc6c75 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/classify.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home-h.png" new file mode 100644 index 000000000..e86e1dd9c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home.png" new file mode 100644 index 000000000..591aa1a19 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/home.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user-h.png" new file mode 100644 index 000000000..fa8b717cf Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user.png" new file mode 100644 index 000000000..6d53fc02c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/tabBar/user.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/xxmLogo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/xxmLogo.png" new file mode 100644 index 000000000..d822b165e Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/static/images/xxmLogo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.scss" new file mode 100644 index 000000000..a05adb4a7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni.scss" @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/changelog.md" new file mode 100644 index 000000000..137553eed --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/changelog.md" @@ -0,0 +1,38 @@ +## 2.0.8(2023-12-14) +- 修复 项目未使用 ts 情况下,打包报错的bug +## 2.0.7(2023-12-14) +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug +## 2.0.6(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.5(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.4(2023-12-06) +- 优化 uni-app x 下示例项目图标排序 +## 2.0.3(2023-12-06) +- 修复 nvue下引入组件报错的bug +## 2.0.2(2023-12-05) +-优化 size 属性支持单位 +## 2.0.1(2023-12-05) +- 新增 uni-app x 支持定义图标 +## 1.3.5(2022-01-24) +- 优化 size 属性可以传入不带单位的字符串数值 +## 1.3.4(2022-01-24) +- 优化 size 支持其他单位 +## 1.3.3(2022-01-17) +- 修复 nvue 有些图标不显示的bug,兼容老版本图标 +## 1.3.2(2021-12-01) +- 优化 示例可复制图标名称 +## 1.3.1(2021-11-23) +- 优化 兼容旧组件 type 值 +## 1.3.0(2021-11-19) +- 新增 更多图标 +- 优化 自定义图标使用方式 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7(2021-11-08) +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" new file mode 100644 index 000000000..34037c9b6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" @@ -0,0 +1,91 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" new file mode 100644 index 000000000..b9a37e9e3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" @@ -0,0 +1,110 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.css" new file mode 100644 index 000000000..0a6b6fea1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.css" @@ -0,0 +1,664 @@ + +.uniui-cart-filled:before { + content: "\e6d0"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-arrowthinleft:before { + content: "\e6d2"; +} + +.uniui-arrowthinup:before { + content: "\e6d3"; +} + +.uniui-arrowthindown:before { + content: "\e6d4"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthinright:before { + content: "\e6d1"; +} + +.uniui-down:before { + content: "\e6b8"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowright:before { + content: "\e6d5"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-up:before { + content: "\e6b6"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowup:before { + content: "\e6d6"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" new file mode 100644 index 000000000..14696d038 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" new file mode 100644 index 000000000..98e93aa0d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" @@ -0,0 +1,664 @@ + +export type IconsData = { + id : string + name : string + font_family : string + css_prefix_text : string + description : string + glyphs : Array +} + +export type IconsDataItem = { + font_class : string + unicode : string +} + + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] as IconsDataItem[] + +// export const fontData = JSON.parse(fontDataJson) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" new file mode 100644 index 000000000..1cd11e159 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" @@ -0,0 +1,649 @@ + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] + +// export const fontData = JSON.parse(fontDataJson) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/package.json" new file mode 100644 index 000000000..665ece728 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "2.0.8", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y", + "app-uvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "钉钉": "y", + "快手": "y", + "飞书": "y", + "京东": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/readme.md" new file mode 100644 index 000000000..86234ba1c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-icons/readme.md" @@ -0,0 +1,8 @@ +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + +用于展示 icons 图标 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/changelog.md" new file mode 100644 index 000000000..8f03f1d57 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/changelog.md" @@ -0,0 +1,19 @@ +## 1.3.3(2022-01-20) +- 新增 showText属性 ,是否显示文本 +## 1.3.2(2022-01-19) +- 修复 nvue 平台下不显示文本的bug +## 1.3.1(2022-01-19) +- 修复 微信小程序平台样式选择器报警告的问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more) +## 1.2.1(2021-08-24) +- 新增 支持国际化 +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.8(2021-05-12) +- 新增 组件示例地址 +## 1.1.7(2021-03-30) +- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug +## 1.1.6(2021-02-05) +- 调整为uni_modules目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" new file mode 100644 index 000000000..a4f14a545 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "Pull up to show more", + "uni-load-more.contentrefresh": "loading...", + "uni-load-more.contentnomore": "No more data" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" new file mode 100644 index 000000000..f15d51050 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉显示更多", + "uni-load-more.contentrefresh": "正在加载...", + "uni-load-more.contentnomore": "没有更多数据了" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" new file mode 100644 index 000000000..a255c6ded --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉顯示更多", + "uni-load-more.contentrefresh": "正在加載...", + "uni-load-more.contentnomore": "沒有更多數據了" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" new file mode 100644 index 000000000..e5eff4d65 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" @@ -0,0 +1,399 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/package.json" new file mode 100644 index 000000000..2fa6f040a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/package.json" @@ -0,0 +1,86 @@ +{ + "id": "uni-load-more", + "displayName": "uni-load-more 加载更多", + "version": "1.3.3", + "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。", + "keywords": [ + "uni-ui", + "uniui", + "加载更多", + "load-more" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/readme.md" new file mode 100644 index 000000000..54dc1fad2 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-load-more/readme.md" @@ -0,0 +1,14 @@ + + +### LoadMore 加载更多 +> **组件名:uni-load-more** +> 代码块: `uLoadMore` + + +用于列表中,做滚动加载使用,展示 loading 的各种状态。 + + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/changelog.md" new file mode 100644 index 000000000..b863bb0f5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/changelog.md" @@ -0,0 +1,8 @@ +## 1.0.3(2022-01-21) +- 优化 组件示例 +## 1.0.2(2021-11-22) +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 +## 1.0.1(2021-11-22) +- 修复 vue3中scss语法兼容问题 +## 1.0.0(2021-11-18) +- init diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/index.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/index.scss" new file mode 100644 index 000000000..1744a5f98 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/index.scss" @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/package.json" new file mode 100644 index 000000000..7cc0ccb73 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/package.json" @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 辅助样式", + "version": "1.0.3", + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", + "keywords": [ + "uni-scss", + "uni-ui", + "辅助样式" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/readme.md" new file mode 100644 index 000000000..b7d1c25f3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/readme.md" @@ -0,0 +1,4 @@ +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/index.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/index.scss" new file mode 100644 index 000000000..ffac4fecd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/index.scss" @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_border.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_border.scss" new file mode 100644 index 000000000..12a11c322 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_border.scss" @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_color.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_color.scss" new file mode 100644 index 000000000..1ededd94d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_color.scss" @@ -0,0 +1,66 @@ + +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 主色 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 辅助色 + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 中性色 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 背景色 + bg-color: $uni-bg-color, + // 边框颜色 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 黑色 + black:$uni-black, + // 白色 + white:$uni-white, + // 透明 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_radius.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_radius.scss" new file mode 100644 index 000000000..9a0428bb8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_radius.scss" @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_space.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_space.scss" new file mode 100644 index 000000000..3c8952897 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_space.scss" @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_styles.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_styles.scss" new file mode 100644 index 000000000..689afec66 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_styles.scss" @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 暂时处理边框隐藏一边的问题 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_text.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_text.scss" new file mode 100644 index 000000000..a34d08f3f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_text.scss" @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_variables.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_variables.scss" new file mode 100644 index 000000000..557d3d7c9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/setting/_variables.scss" @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 间距基础倍数 +$uni-space-root: 2 !default; +// 边框半径默认值 +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 边框半径断点 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 当前版本暂时不支持 sm 属性 + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 字体家族 +$body-font-family: 'Roboto', sans-serif !default; +// 文本 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 主色 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a !default; // 主要文字 +$uni-base-color: #6a6a6a !default; // 常规文字 +$uni-secondary-color: #909399 !default; // 次要文字 +$uni-extra-color: #c7c7c7 !default; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 常规色 +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 背景色 +$uni-bg-color: #f7f7f7 !default; + +/* 水平间距 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/tools/functions.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/tools/functions.scss" new file mode 100644 index 000000000..ac6f63e53 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/styles/tools/functions.scss" @@ -0,0 +1,19 @@ +// 合并 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/theme.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/theme.scss" new file mode 100644 index 000000000..80ee62f7d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/theme.scss" @@ -0,0 +1,31 @@ +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; +// 主色 +$uni-primary: #2979ff; +// 辅助色 +$uni-success: #4cd964; +// 警告色 +$uni-warning: #f0ad4e; +// 错误色 +$uni-error: #dd524d; +// 描述色 +$uni-info: #909399; +// 中性色 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 背景色 +$uni-bg-color: #f5f5f5; +// 边框颜色 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/variables.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/variables.scss" new file mode 100644 index 000000000..1c062d42b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-scss/variables.scss" @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; + +// 主色 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a; // 主要文字 +$uni-base-color: #6a6a6a; // 常规文字 +$uni-secondary-color: #909399; // 次要文字 +$uni-extra-color: #c7c7c7; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 背景色 +$uni-bg-color: #f7f7f7; + +/* 水平间距 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/changelog.md" new file mode 100644 index 000000000..a44385d7c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/changelog.md" @@ -0,0 +1,9 @@ +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.5(2021-05-12) +- 新增 项目示例地址 +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" new file mode 100644 index 000000000..044a4951f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" @@ -0,0 +1,145 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/package.json" new file mode 100644 index 000000000..6cae41db2 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-segmented-control", + "displayName": "uni-segmented-control 分段器", + "version": "1.2.0", + "description": "分段器由至少 2 个分段控件组成,用作不同视图的显示", + "keywords": [ + "uni-ui", + "uniui", + "分段器", + "segement", + "顶部选择" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/readme.md" new file mode 100644 index 000000000..3527b03f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/uni_modules/uni-segmented-control/readme.md" @@ -0,0 +1,13 @@ + + +## SegmentedControl 分段器 +> **组件名:uni-segmented-control** +> 代码块: `uSegmentedControl` + + +用作不同视图的显示 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/vite.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/vite.config.js" new file mode 100644 index 000000000..6dfc42bbc --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappDemo3/vite.config.js" @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite' +import uni from '@dcloudio/vite-plugin-uni' +import AutoImport from 'unplugin-auto-import/vite' + +export default defineConfig({ + plugins: [ + uni(), + // 自动导入配置 + AutoImport({ + imports:[ + // 预设 + 'vue', + 'uni-app' + ] + }) + ] +}) + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/.hbuilderx/launch.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/.hbuilderx/launch.json" new file mode 100644 index 000000000..aafc1c9bf --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/.hbuilderx/launch.json" @@ -0,0 +1,20 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-toutiao" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/App.vue" new file mode 100644 index 000000000..8c2b73210 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/manifest.json" new file mode 100644 index 000000000..2b6220ca3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/manifest.json" @@ -0,0 +1,72 @@ +{ + "name" : "uniappV3Demo1", + "appid" : "__UNI__828099C", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages.json" new file mode 100644 index 000000000..f3cee7ab1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages.json" @@ -0,0 +1,110 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app" + } + },{ + "path": "pages/index/demodemo", + "style": { + "navigationBarTitleText": "测试页面" + } + }, + { + "path" : "pages/demo1/demo1", + "style" : + { + "navigationBarTitleText" : "demo页面", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo2/demo2", + "style" : + { + "navigationBarTitleText" : "这是demo2", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo3/demo3", + "style" : + { + "navigationBarTitleText" : "demo3页面", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo4/demo4", + "style" : + { + "navigationBarTitleText" : "demo4", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo5/demo5", + "style" : + { + "navigationBarTitleText" : "demo5", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo6/demo6", + "style" : + { + "navigationBarTitleText" : "demo6", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo7/demo7", + "style" : + { + "navigationBarTitleText" : "demo7", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo8/demo8", + "style" : + { + "navigationBarTitleText" : "demo8", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo9/demo9", + "style" : + { + "navigationBarTitleText" : "热梗指南", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo10/demo10", + "style" : + { + "navigationBarTitleText" : "demo10", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/demo11/demo11", + "style" : + { + "navigationBarTitleText" : "watch", + "enablePullDownRefresh" : false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo1/demo1.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo1/demo1.vue" new file mode 100644 index 000000000..efc366b51 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo1/demo1.vue" @@ -0,0 +1,59 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo10/demo10.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo10/demo10.vue" new file mode 100644 index 000000000..950d8a48f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo10/demo10.vue" @@ -0,0 +1,41 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo11/demo11.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo11/demo11.vue" new file mode 100644 index 000000000..923143fb6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo11/demo11.vue" @@ -0,0 +1,50 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo2/demo2.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo2/demo2.vue" new file mode 100644 index 000000000..2d41daf35 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo2/demo2.vue" @@ -0,0 +1,36 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo3/demo3.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo3/demo3.vue" new file mode 100644 index 000000000..4ca00403e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo3/demo3.vue" @@ -0,0 +1,54 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo4/demo4.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo4/demo4.vue" new file mode 100644 index 000000000..344428fbd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo4/demo4.vue" @@ -0,0 +1,30 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo5/demo5.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo5/demo5.vue" new file mode 100644 index 000000000..1c0942bff --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo5/demo5.vue" @@ -0,0 +1,47 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo6/demo6.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo6/demo6.vue" new file mode 100644 index 000000000..f85a4d898 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo6/demo6.vue" @@ -0,0 +1,22 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7-00.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7-00.vue" new file mode 100644 index 000000000..3a835c603 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7-00.vue" @@ -0,0 +1,36 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7.vue" new file mode 100644 index 000000000..405af19f4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo7/demo7.vue" @@ -0,0 +1,93 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo8/demo8.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo8/demo8.vue" new file mode 100644 index 000000000..b58f0914a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo8/demo8.vue" @@ -0,0 +1,50 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo9/demo9.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo9/demo9.vue" new file mode 100644 index 000000000..711a93403 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/demo9/demo9.vue" @@ -0,0 +1,112 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/demodemo.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/demodemo.vue" new file mode 100644 index 000000000..31059a821 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/demodemo.vue" @@ -0,0 +1,30 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/index.vue" new file mode 100644 index 000000000..e0b7cc37d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/pages/index/index.vue" @@ -0,0 +1,51 @@ + + + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/chicken.gif" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/chicken.gif" new file mode 100644 index 000000000..7d53a27aa Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/chicken.gif" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/logo.png" new file mode 100644 index 000000000..b5771e209 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic1.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic1.png" new file mode 100644 index 000000000..e470a3769 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic1.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic2.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic2.png" new file mode 100644 index 000000000..6ec61b9df Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic2.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic3.webp" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic3.webp" new file mode 100644 index 000000000..56ce03ac9 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic3.webp" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic4.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic4.jpg" new file mode 100644 index 000000000..002d2d58f Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/static/pic4.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.scss" new file mode 100644 index 000000000..a05adb4a7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniappV3Demo1/uni.scss" @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/.hbuilderx/launch.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/.hbuilderx/launch.json" new file mode 100644 index 000000000..81f13f4f4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/.hbuilderx/launch.json" @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/App.vue" new file mode 100644 index 000000000..8c2b73210 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/api/apis.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/api/apis.js" new file mode 100644 index 000000000..869a9eaef --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/api/apis.js" @@ -0,0 +1,8 @@ +import {request} from "@/utils/request.js" + +export function apiNbaData(){ + return request({ + url:"/api/match/playerranking/match/NBA/tabId/60" + }) +} + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/config.js" new file mode 100644 index 000000000..949419ca4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/config.js" @@ -0,0 +1,14 @@ +// 系统信息 +export const SYSTEM_INFO = uni.getSystemInfoSync() + + +// 主机地址 +export const HOST = 'https://tiyu.baidu.com'; + + +// api服务器 +export const API_HOST = SYSTEM_INFO.uniPlatform === 'web' ? '' : HOST; + + +// api服务代理路径 +export const API_PROXY = SYSTEM_INFO.uniPlatform === 'web' ? '/h5api' : '' \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/manifest.json" new file mode 100644 index 000000000..ea8570b92 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/manifest.json" @@ -0,0 +1,72 @@ +{ + "name" : "uniapp跨域", + "appid" : "__UNI__59FC8A8", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages.json" new file mode 100644 index 000000000..869105d7c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages.json" @@ -0,0 +1,17 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages/index/index.vue" new file mode 100644 index 000000000..7a3327795 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/pages/index/index.vue" @@ -0,0 +1,43 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/static/logo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/static/logo.png" new file mode 100644 index 000000000..b5771e209 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/static/logo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.scss" new file mode 100644 index 000000000..a05adb4a7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/uni.scss" @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/common.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/common.js" new file mode 100644 index 000000000..115b3c55d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/common.js" @@ -0,0 +1,9 @@ +import {API_HOST,API_PROXY} from "../config.js" + +/** + * 组装接口url + */ +export const packApiUrl = (url = '') => { + if (url.slice(0, 4) === 'http') return url + else return `${API_HOST}${API_PROXY}${url}` +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/request.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/request.js" new file mode 100644 index 000000000..fa2005d76 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/utils/request.js" @@ -0,0 +1,35 @@ +import {packApiUrl} from "./common.js" +export function request(config={}){ + let { + url, + data={}, + method="GET", + header={} + } = config + + url =packApiUrl(url); + + return new Promise((resolve,reject)=>{ + uni.request({ + url, + data, + method, + header, + success:res=>{ + if(res.data.status==0){ + resolve(res.data.data) + }else{ + uni.showToast({ + title:res.data.message, + icon:"none" + }) + reject(res.data.data) + } + + }, + fail:err=>{ + reject(err) + } + }) + }) +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/vite.config.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/vite.config.js" new file mode 100644 index 000000000..0c057cad6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/uniapp\350\267\250\345\237\237/vite.config.js" @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite'; +import uni from '@dcloudio/vite-plugin-uni'; + +export default defineConfig({ + plugins: [uni()], + server: { + host: "localhost", // 指定服务器应该监听哪个IP地址,默认:localhost + port: 8899, // 指定开发服务器端口,默认:5173 + proxy: { // 为开发服务器配置自定义代理规则 + // 带选项写法:http://localhost:5173/api/posts -> http://jsonplaceholder.typicode.com/posts + "/h5api": { + target: "https://tiyu.baidu.com", // 目标接口 + changeOrigin: true, // 是否换源 + rewrite: (path) => path.replace(/^\/h5api/, ""), + } + } + } +}); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/.hbuilderx/launch.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/.hbuilderx/launch.json" new file mode 100644 index 000000000..aafc1c9bf --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/.hbuilderx/launch.json" @@ -0,0 +1,20 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-toutiao" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/App.vue" new file mode 100644 index 000000000..806765aa3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner1.jpg" new file mode 100644 index 000000000..5f6470eee Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner2.jpg" new file mode 100644 index 000000000..218ba07b8 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner3.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner3.jpg" new file mode 100644 index 000000000..c444a9732 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/banner3.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify1.jpg" new file mode 100644 index 000000000..040047c8a Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify2.jpg" new file mode 100644 index 000000000..7de667b60 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/classify2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/more.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/more.jpg" new file mode 100644 index 000000000..8cc2ff330 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/more.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview1.jpg" new file mode 100644 index 000000000..0413ad885 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview2.jpg" new file mode 100644 index 000000000..335d86ad9 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview_small.webp" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview_small.webp" new file mode 100644 index 000000000..716f2cbe6 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/images/preview_small.webp" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/base-style.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/base-style.scss" new file mode 100644 index 000000000..c4d5643c6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/base-style.scss" @@ -0,0 +1,9 @@ +$brand-theme-color:#28B389; //品牌主体红色 + +$border-color:#e0e0e0; //边框颜色 +$border-color-light:#efefef; //边框亮色 + +$text-font-color-1:#000; //文字主色 +$text-font-color-2:#676767; //副标题颜色 +$text-font-color-3:#a7a7a7; //浅色 +$text-font-color-4:#e4e4e4; //更浅 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/common-style.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/common-style.scss" new file mode 100644 index 000000000..6960ad4e9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/common/style/common-style.scss" @@ -0,0 +1,10 @@ +view,swiper,swiper-item{ + box-sizing: border-box; +} + +.pageBg{ + background: + linear-gradient(to bottom,transparent,#fff 400rpx), + linear-gradient(to right,#beecd8 20%,#F4E2D8); + min-height: 80vh; +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/common-title/common-title.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/common-title/common-title.vue" new file mode 100644 index 000000000..f78a4c62b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/common-title/common-title.vue" @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/custom-nav-bar/custom-nav-bar.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/custom-nav-bar/custom-nav-bar.vue" new file mode 100644 index 000000000..e7adc38b9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/custom-nav-bar/custom-nav-bar.vue" @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/theme-item/theme-item.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/theme-item/theme-item.vue" new file mode 100644 index 000000000..0d3c17fe4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/components/theme-item/theme-item.vue" @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/manifest.json" new file mode 100644 index 000000000..466aeb0e8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/manifest.json" @@ -0,0 +1,72 @@ +{ + "name" : "wallpaper-kt", + "appid" : "__UNI__B8FCDB7", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx511abe7a13783591", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages.json" new file mode 100644 index 000000000..66fe6ee51 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages.json" @@ -0,0 +1,99 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" + } + }, + { + "path" : "pages/classify/classify", + "style" : + { + "navigationBarTitleText" : "分类", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/user/user", + "style" : + { + "navigationBarTitleText" : "我的", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/classlist/classlist", + "style" : + { + "navigationBarTitleText" : "分类列表", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/preview/preview", + "style" : + { + "navigationBarTitleText" : "预览", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/notice/notice", + "style" : + { + "navigationBarTitleText" : "公告", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/notice/detail", + "style" : + { + "navigationBarTitleText" : "公告详情", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/search/search", + "style" : + { + "navigationBarTitleText" : "搜索", + "enablePullDownRefresh" : false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "咸虾米壁纸", + "navigationBarBackgroundColor": "#fff", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#9799a5", + "selectedColor": "#28B389", + "list": [ + { + "text": "推荐", + "pagePath": "pages/index/index", + "iconPath": "static/images/tabBar/home.png", + "selectedIconPath": "static/images/tabBar/home-h.png" + },{ + "text": "分类", + "pagePath": "pages/classify/classify", + "iconPath": "static/images/tabBar/classify.png", + "selectedIconPath": "static/images/tabBar/classify-h.png" + },{ + "text": "我的", + "pagePath": "pages/user/user", + "iconPath": "static/images/tabBar/user.png", + "selectedIconPath": "static/images/tabBar/user-h.png" + } + ] + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classify/classify.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classify/classify.vue" new file mode 100644 index 000000000..6307f4c7d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classify/classify.vue" @@ -0,0 +1,23 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classlist/classlist.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classlist/classlist.vue" new file mode 100644 index 000000000..27c1da000 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/classlist/classlist.vue" @@ -0,0 +1,32 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/index/index.vue" new file mode 100644 index 000000000..b28694f59 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/index/index.vue" @@ -0,0 +1,209 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/detail.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/detail.vue" new file mode 100644 index 000000000..a02ff001b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/detail.vue" @@ -0,0 +1,67 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/notice.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/notice.vue" new file mode 100644 index 000000000..852490f13 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/notice/notice.vue" @@ -0,0 +1,13 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/preview/preview.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/preview/preview.vue" new file mode 100644 index 000000000..d1e7decc8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/preview/preview.vue" @@ -0,0 +1,358 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/search/search.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/search/search.vue" new file mode 100644 index 000000000..6bf3d7487 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/search/search.vue" @@ -0,0 +1,177 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/user/user.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/user/user.vue" new file mode 100644 index 000000000..220ba7234 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/pages/user/user.vue" @@ -0,0 +1,179 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify-h.png" new file mode 100644 index 000000000..2858107ef Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify.png" new file mode 100644 index 000000000..d32bc6c75 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/classify.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home-h.png" new file mode 100644 index 000000000..e86e1dd9c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home.png" new file mode 100644 index 000000000..591aa1a19 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/home.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user-h.png" new file mode 100644 index 000000000..fa8b717cf Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user.png" new file mode 100644 index 000000000..6d53fc02c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/tabBar/user.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/xxmLogo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/xxmLogo.png" new file mode 100644 index 000000000..d822b165e Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/static/images/xxmLogo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.scss" new file mode 100644 index 000000000..3f7a4ba0f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni.scss" @@ -0,0 +1,62 @@ +@import "@/common/style/base-style.scss"; + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/changelog.md" new file mode 100644 index 000000000..d551d7b88 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/changelog.md" @@ -0,0 +1,10 @@ +## 1.0.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-dateformat](https://uniapp.dcloud.io/component/uniui/uni-dateformat) +## 0.0.5(2021-07-08) +- 调整 默认时间不再是当前时间,而是显示'-'字符 +## 0.0.4(2021-05-12) +- 新增 组件示例地址 +## 0.0.3(2021-02-04) +- 调整为uni_modules目录规范 +- 修复 iOS 平台日期格式化出错的问题 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js" new file mode 100644 index 000000000..e00d5597e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js" @@ -0,0 +1,200 @@ +// yyyy-MM-dd hh:mm:ss.SSS 所有支持的类型 +function pad(str, length = 2) { + str += '' + while (str.length < length) { + str = '0' + str + } + return str.slice(-length) +} + +const parser = { + yyyy: (dateObj) => { + return pad(dateObj.year, 4) + }, + yy: (dateObj) => { + return pad(dateObj.year) + }, + MM: (dateObj) => { + return pad(dateObj.month) + }, + M: (dateObj) => { + return dateObj.month + }, + dd: (dateObj) => { + return pad(dateObj.day) + }, + d: (dateObj) => { + return dateObj.day + }, + hh: (dateObj) => { + return pad(dateObj.hour) + }, + h: (dateObj) => { + return dateObj.hour + }, + mm: (dateObj) => { + return pad(dateObj.minute) + }, + m: (dateObj) => { + return dateObj.minute + }, + ss: (dateObj) => { + return pad(dateObj.second) + }, + s: (dateObj) => { + return dateObj.second + }, + SSS: (dateObj) => { + return pad(dateObj.millisecond, 3) + }, + S: (dateObj) => { + return dateObj.millisecond + }, +} + +// 这都n年了iOS依然不认识2020-12-12,需要转换为2020/12/12 +function getDate(time) { + if (time instanceof Date) { + return time + } + switch (typeof time) { + case 'string': + { + // 2020-12-12T12:12:12.000Z、2020-12-12T12:12:12.000 + if (time.indexOf('T') > -1) { + return new Date(time) + } + return new Date(time.replace(/-/g, '/')) + } + default: + return new Date(time) + } +} + +export function formatDate(date, format = 'yyyy/MM/dd hh:mm:ss') { + if (!date && date !== 0) { + return '' + } + date = getDate(date) + const dateObj = { + year: date.getFullYear(), + month: date.getMonth() + 1, + day: date.getDate(), + hour: date.getHours(), + minute: date.getMinutes(), + second: date.getSeconds(), + millisecond: date.getMilliseconds() + } + const tokenRegExp = /yyyy|yy|MM|M|dd|d|hh|h|mm|m|ss|s|SSS|SS|S/ + let flag = true + let result = format + while (flag) { + flag = false + result = result.replace(tokenRegExp, function(matched) { + flag = true + return parser[matched](dateObj) + }) + } + return result +} + +export function friendlyDate(time, { + locale = 'zh', + threshold = [60000, 3600000], + format = 'yyyy/MM/dd hh:mm:ss' +}) { + if (time === '-') { + return time + } + if (!time && time !== 0) { + return '' + } + const localeText = { + zh: { + year: '年', + month: '月', + day: '天', + hour: '小时', + minute: '分钟', + second: '秒', + ago: '前', + later: '后', + justNow: '刚刚', + soon: '马上', + template: '{num}{unit}{suffix}' + }, + en: { + year: 'year', + month: 'month', + day: 'day', + hour: 'hour', + minute: 'minute', + second: 'second', + ago: 'ago', + later: 'later', + justNow: 'just now', + soon: 'soon', + template: '{num} {unit} {suffix}' + } + } + const text = localeText[locale] || localeText.zh + let date = getDate(time) + let ms = date.getTime() - Date.now() + let absMs = Math.abs(ms) + if (absMs < threshold[0]) { + return ms < 0 ? text.justNow : text.soon + } + if (absMs >= threshold[1]) { + return formatDate(date, format) + } + let num + let unit + let suffix = text.later + if (ms < 0) { + suffix = text.ago + ms = -ms + } + const seconds = Math.floor((ms) / 1000) + const minutes = Math.floor(seconds / 60) + const hours = Math.floor(minutes / 60) + const days = Math.floor(hours / 24) + const months = Math.floor(days / 30) + const years = Math.floor(months / 12) + switch (true) { + case years > 0: + num = years + unit = text.year + break + case months > 0: + num = months + unit = text.month + break + case days > 0: + num = days + unit = text.day + break + case hours > 0: + num = hours + unit = text.hour + break + case minutes > 0: + num = minutes + unit = text.minute + break + default: + num = seconds + unit = text.second + break + } + + if (locale === 'en') { + if (num === 1) { + num = 'a' + } else { + unit += 's' + } + } + + return text.template.replace(/{\s*num\s*}/g, num + '').replace(/{\s*unit\s*}/g, unit).replace(/{\s*suffix\s*}/g, + suffix) +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue" new file mode 100644 index 000000000..c5ed03078 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue" @@ -0,0 +1,88 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/package.json" new file mode 100644 index 000000000..786a670b0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-dateformat", + "displayName": "uni-dateformat 日期格式化", + "version": "1.0.0", + "description": "日期格式化组件,可以将日期格式化为1分钟前、刚刚等形式", + "keywords": [ + "uni-ui", + "uniui", + "日期格式化", + "时间格式化", + "格式化时间", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/readme.md" new file mode 100644 index 000000000..37ddb6ece --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-dateformat/readme.md" @@ -0,0 +1,11 @@ + + +### DateFormat 日期格式化 +> **组件名:uni-dateformat** +> 代码块: `uDateformat` + + +日期格式化组件。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-dateformat) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/changelog.md" new file mode 100644 index 000000000..620ab0277 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/changelog.md" @@ -0,0 +1,40 @@ +## 2.0.9(2024-01-12) +fix: 修复图标大小默认值错误的问题 +## 2.0.8(2023-12-14) +- 修复 项目未使用 ts 情况下,打包报错的bug +## 2.0.7(2023-12-14) +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug +## 2.0.6(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.5(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.4(2023-12-06) +- 优化 uni-app x 下示例项目图标排序 +## 2.0.3(2023-12-06) +- 修复 nvue下引入组件报错的bug +## 2.0.2(2023-12-05) +-优化 size 属性支持单位 +## 2.0.1(2023-12-05) +- 新增 uni-app x 支持定义图标 +## 1.3.5(2022-01-24) +- 优化 size 属性可以传入不带单位的字符串数值 +## 1.3.4(2022-01-24) +- 优化 size 支持其他单位 +## 1.3.3(2022-01-17) +- 修复 nvue 有些图标不显示的bug,兼容老版本图标 +## 1.3.2(2021-12-01) +- 优化 示例可复制图标名称 +## 1.3.1(2021-11-23) +- 优化 兼容旧组件 type 值 +## 1.3.0(2021-11-19) +- 新增 更多图标 +- 优化 自定义图标使用方式 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7(2021-11-08) +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" new file mode 100644 index 000000000..398678eea --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue" @@ -0,0 +1,91 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" new file mode 100644 index 000000000..7da53560f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" @@ -0,0 +1,110 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.css" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.css" new file mode 100644 index 000000000..0a6b6fea1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.css" @@ -0,0 +1,664 @@ + +.uniui-cart-filled:before { + content: "\e6d0"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-arrowthinleft:before { + content: "\e6d2"; +} + +.uniui-arrowthinup:before { + content: "\e6d3"; +} + +.uniui-arrowthindown:before { + content: "\e6d4"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthinright:before { + content: "\e6d1"; +} + +.uniui-down:before { + content: "\e6b8"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowright:before { + content: "\e6d5"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-up:before { + content: "\e6b6"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowup:before { + content: "\e6d6"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" new file mode 100644 index 000000000..14696d038 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" new file mode 100644 index 000000000..98e93aa0d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts" @@ -0,0 +1,664 @@ + +export type IconsData = { + id : string + name : string + font_family : string + css_prefix_text : string + description : string + glyphs : Array +} + +export type IconsDataItem = { + font_class : string + unicode : string +} + + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] as IconsDataItem[] + +// export const fontData = JSON.parse(fontDataJson) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" new file mode 100644 index 000000000..1cd11e159 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js" @@ -0,0 +1,649 @@ + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] + +// export const fontData = JSON.parse(fontDataJson) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/package.json" new file mode 100644 index 000000000..397be8394 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "2.0.9", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y", + "app-uvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "钉钉": "y", + "快手": "y", + "飞书": "y", + "京东": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/readme.md" new file mode 100644 index 000000000..86234ba1c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-icons/readme.md" @@ -0,0 +1,8 @@ +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + +用于展示 icons 图标 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/changelog.md" new file mode 100644 index 000000000..98d9d08cc --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/changelog.md" @@ -0,0 +1,70 @@ +## 1.8.4(2023-11-15) +- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close` +## 1.8.3(2023-04-17) +- 修复 uni-popup 重复打开时的 bug +## 1.8.2(2023-02-02) +- uni-popup-dialog 组件新增 inputType 属性 +## 1.8.1(2022-12-01) +- 修复 nvue 下 v-show 报错 +## 1.8.0(2022-11-29) +- 优化 主题样式 +## 1.7.9(2022-04-02) +- 修复 弹出层内部无法滚动的bug +## 1.7.8(2022-03-28) +- 修复 小程序中高度错误的bug +## 1.7.7(2022-03-17) +- 修复 快速调用open出现问题的Bug +## 1.7.6(2022-02-14) +- 修复 safeArea 属性不能设置为false的bug +## 1.7.5(2022-01-19) +- 修复 isMaskClick 失效的bug +## 1.7.4(2022-01-19) +- 新增 cancelText \ confirmText 属性 ,可自定义文本 +- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 +- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 1.7.3(2022-01-13) +- 修复 设置 safeArea 属性不生效的bug +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" new file mode 100644 index 000000000..6ef26a262 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" new file mode 100644 index 000000000..b5eee79a7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" @@ -0,0 +1,275 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" new file mode 100644 index 000000000..91370a829 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" @@ -0,0 +1,143 @@ + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" new file mode 100644 index 000000000..5be76247a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" @@ -0,0 +1,187 @@ + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/en.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/en.json" new file mode 100644 index 000000000..7f1bd06a0 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/en.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/index.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/index.js" new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/index.js" @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" new file mode 100644 index 000000000..5e3003cab --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "确定", + "uni-popup.placeholder": "请输入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" new file mode 100644 index 000000000..13e39eba1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "確定", + "uni-popup.placeholder": "請輸入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/keypress.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/keypress.js" new file mode 100644 index 000000000..62dda461b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/keypress.js" @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/popup.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/popup.js" new file mode 100644 index 000000000..c4e5781dd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/popup.js" @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 获取父元素实例 + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue" new file mode 100644 index 000000000..5eb8d5be6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue" @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" new file mode 100644 index 000000000..4fae089fb --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" @@ -0,0 +1,473 @@ + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/package.json" new file mode 100644 index 000000000..c3f3d1c9d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 弹出层", + "version": "1.8.4", + "description": " Popup 组件,提供常用的弹层", + "keywords": [ + "uni-ui", + "弹出层", + "弹窗", + "popup", + "弹框" + ], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-transition" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/readme.md" new file mode 100644 index 000000000..fdad4b3d7 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-popup/readme.md" @@ -0,0 +1,17 @@ + + +## Popup 弹出层 +> **组件名:uni-popup** +> 代码块: `uPopup` +> 关联组件:`uni-transition` + + +弹出层组件,在应用中弹出一个消息提示窗口、提示框等 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/changelog.md" new file mode 100644 index 000000000..8a98a6127 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/changelog.md" @@ -0,0 +1,25 @@ +## 1.3.1(2022-02-25) +- 修复 条件判断 `NaN` 错误的 bug +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-rate](https://uniapp.dcloud.io/component/uniui/uni-rate) +## 1.2.2(2021-09-10) +- 优化 默认值修改为 0 颗星 +## 1.2.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.2.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.2(2021-05-12) +- 新增 组件示例地址 +## 1.1.1(2021-04-21) +- 修复 布局变化后 uni-rate 星星计算不准确的 bug +- 优化 添加依赖 uni-icons, 导入 uni-rate 自动下载依赖 +## 1.1.0(2021-04-16) +- 修复 uni-rate 属性 margin 值为 string 组件失效的 bug + +## 1.0.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.8(2021-02-05) +- 调整为uni_modules目录规范 +- 支持 pc 端 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/components/uni-rate/uni-rate.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/components/uni-rate/uni-rate.vue" new file mode 100644 index 000000000..857f5f9c9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/components/uni-rate/uni-rate.vue" @@ -0,0 +1,361 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/package.json" new file mode 100644 index 000000000..64e8e3320 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-rate", + "displayName": "uni-rate 评分", + "version": "1.3.1", + "description": "Rate 评分组件,可自定义评分星星图标的大小、间隔、评分数。", + "keywords": [ + "uni-ui", + "uniui", + "评分" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/readme.md" new file mode 100644 index 000000000..eae7b5ced --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-rate/readme.md" @@ -0,0 +1,12 @@ + + +## Rate 评分 +> **组件名:uni-rate** +> 代码块: `uRate` +> 关联组件:`uni-icons` + + +评分组件,多用于购买商品后,对商品进行评价等场景 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-rate) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/changelog.md" new file mode 100644 index 000000000..b863bb0f5 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/changelog.md" @@ -0,0 +1,8 @@ +## 1.0.3(2022-01-21) +- 优化 组件示例 +## 1.0.2(2021-11-22) +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 +## 1.0.1(2021-11-22) +- 修复 vue3中scss语法兼容问题 +## 1.0.0(2021-11-18) +- init diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/index.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/index.scss" new file mode 100644 index 000000000..1744a5f98 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/index.scss" @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/package.json" new file mode 100644 index 000000000..7cc0ccb73 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/package.json" @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 辅助样式", + "version": "1.0.3", + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", + "keywords": [ + "uni-scss", + "uni-ui", + "辅助样式" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/readme.md" new file mode 100644 index 000000000..b7d1c25f3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/readme.md" @@ -0,0 +1,4 @@ +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/index.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/index.scss" new file mode 100644 index 000000000..ffac4fecd --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/index.scss" @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_border.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_border.scss" new file mode 100644 index 000000000..12a11c322 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_border.scss" @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_color.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_color.scss" new file mode 100644 index 000000000..1ededd94d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_color.scss" @@ -0,0 +1,66 @@ + +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 主色 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 辅助色 + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 中性色 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 背景色 + bg-color: $uni-bg-color, + // 边框颜色 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 黑色 + black:$uni-black, + // 白色 + white:$uni-white, + // 透明 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_radius.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_radius.scss" new file mode 100644 index 000000000..9a0428bb8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_radius.scss" @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_space.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_space.scss" new file mode 100644 index 000000000..3c8952897 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_space.scss" @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_styles.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_styles.scss" new file mode 100644 index 000000000..689afec66 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_styles.scss" @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 暂时处理边框隐藏一边的问题 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_text.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_text.scss" new file mode 100644 index 000000000..a34d08f3f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_text.scss" @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_variables.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_variables.scss" new file mode 100644 index 000000000..557d3d7c9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/setting/_variables.scss" @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 间距基础倍数 +$uni-space-root: 2 !default; +// 边框半径默认值 +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 边框半径断点 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 当前版本暂时不支持 sm 属性 + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 字体家族 +$body-font-family: 'Roboto', sans-serif !default; +// 文本 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 主色 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a !default; // 主要文字 +$uni-base-color: #6a6a6a !default; // 常规文字 +$uni-secondary-color: #909399 !default; // 次要文字 +$uni-extra-color: #c7c7c7 !default; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 常规色 +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 背景色 +$uni-bg-color: #f7f7f7 !default; + +/* 水平间距 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/tools/functions.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/tools/functions.scss" new file mode 100644 index 000000000..ac6f63e53 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/styles/tools/functions.scss" @@ -0,0 +1,19 @@ +// 合并 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/theme.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/theme.scss" new file mode 100644 index 000000000..80ee62f7d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/theme.scss" @@ -0,0 +1,31 @@ +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; +// 主色 +$uni-primary: #2979ff; +// 辅助色 +$uni-success: #4cd964; +// 警告色 +$uni-warning: #f0ad4e; +// 错误色 +$uni-error: #dd524d; +// 描述色 +$uni-info: #909399; +// 中性色 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 背景色 +$uni-bg-color: #f5f5f5; +// 边框颜色 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/variables.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/variables.scss" new file mode 100644 index 000000000..1c062d42b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-scss/variables.scss" @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; + +// 主色 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a; // 主要文字 +$uni-base-color: #6a6a6a; // 常规文字 +$uni-secondary-color: #909399; // 次要文字 +$uni-extra-color: #c7c7c7; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 背景色 +$uni-bg-color: #f7f7f7; + +/* 水平间距 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/changelog.md" new file mode 100644 index 000000000..c0c5839b1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/changelog.md" @@ -0,0 +1,21 @@ +## 2.1.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-tag](https://uniapp.dcloud.io/component/uniui/uni-tag) +## 2.0.0(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +- 移除 插槽 +- 移除 type 属性的 royal 选项 +## 1.1.1(2021-08-11) +- type 不是 default 时,size 为 small 字体大小显示不正确 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-06-18) +- 修复 uni-tag 在字节跳动小程序上 css 类名编译错误的 bug +## 1.0.6(2021-06-04) +- 修复 未定义 sass 变量 "$uni-color-royal" 的bug +## 1.0.5(2021-05-10) +- 修复 royal 类型无效的bug +- 修复 uni-tag 宽度不自适应的bug +- 新增 uni-tag 支持属性 custom-style 自定义样式 +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" new file mode 100644 index 000000000..418c95504 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" @@ -0,0 +1,252 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/package.json" new file mode 100644 index 000000000..187808863 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-tag", + "displayName": "uni-tag 标签", + "version": "2.1.0", + "description": "Tag 组件,用于展示1个或多个文字标签,可点击切换选中、不选中的状态。", + "keywords": [ + "uni-ui", + "uniui", + "", + "tag", + "标签" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/readme.md" new file mode 100644 index 000000000..6e78ff5e4 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-tag/readme.md" @@ -0,0 +1,13 @@ + + +## Tag 标签 +> **组件名:uni-tag** +> 代码块: `uTag` + + +用于展示1个或多个文字标签,可点击切换选中、不选中的状态 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-tag) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/changelog.md" new file mode 100644 index 000000000..70c1cd4bf --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/changelog.md" @@ -0,0 +1,22 @@ +## 1.3.2(2023-05-04) +- 修复 NVUE 平台报错的问题 +## 1.3.1(2021-11-23) +- 修复 init 方法初始化问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) +## 1.2.1(2021-09-27) +- 修复 init 方法不生效的 Bug +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.1(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的 Bug +## 1.1.0(2021-04-22) +- 新增 通过方法自定义动画 +- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 +- 优化 动画触发逻辑,使动画更流畅 +- 优化 支持单独的动画类型 +- 优化 文档示例 +## 1.0.2(2021-02-05) +- 调整为 uni_modules 目录规范 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/createAnimation.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/createAnimation.js" new file mode 100644 index 000000000..8f89b185c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/createAnimation.js" @@ -0,0 +1,131 @@ +// const defaultOption = { +// duration: 300, +// timingFunction: 'linear', +// delay: 0, +// transformOrigin: '50% 50% 0' +// } +// #ifdef APP-NVUE +const nvueAnimation = uni.requireNativePlugin('animation') +// #endif +class MPAnimation { + constructor(options, _this) { + this.options = options + // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 + this.animation = uni.createAnimation({ + ...options + }) + this.currentStepAnimates = {} + this.next = 0 + this.$ = _this + + } + + _nvuePushAnimates(type, args) { + let aniObj = this.currentStepAnimates[this.next] + let styles = {} + if (!aniObj) { + styles = { + styles: {}, + config: {} + } + } else { + styles = aniObj + } + if (animateTypes1.includes(type)) { + if (!styles.styles.transform) { + styles.styles.transform = '' + } + let unit = '' + if(type === 'rotate'){ + unit = 'deg' + } + styles.styles.transform += `${type}(${args+unit}) ` + } else { + styles.styles[type] = `${args}` + } + this.currentStepAnimates[this.next] = styles + } + _animateRun(styles = {}, config = {}) { + let ref = this.$.$refs['ani'].ref + if (!ref) return + return new Promise((resolve, reject) => { + nvueAnimation.transition(ref, { + styles, + ...config + }, res => { + resolve() + }) + }) + } + + _nvueNextAnimate(animates, step = 0, fn) { + let obj = animates[step] + if (obj) { + let { + styles, + config + } = obj + this._animateRun(styles, config).then(() => { + step += 1 + this._nvueNextAnimate(animates, step, fn) + }) + } else { + this.currentStepAnimates = {} + typeof fn === 'function' && fn() + this.isEnd = true + } + } + + step(config = {}) { + // #ifndef APP-NVUE + this.animation.step(config) + // #endif + // #ifdef APP-NVUE + this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) + this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin + this.next++ + // #endif + return this + } + + run(fn) { + // #ifndef APP-NVUE + this.$.animationData = this.animation.export() + this.$.timer = setTimeout(() => { + typeof fn === 'function' && fn() + }, this.$.durationTime) + // #endif + // #ifdef APP-NVUE + this.isEnd = false + let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref + if(!ref) return + this._nvueNextAnimate(this.currentStepAnimates, 0, fn) + this.next = 0 + // #endif + } +} + + +const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ' +] +const animateTypes2 = ['opacity', 'backgroundColor'] +const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] +animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function(...args) { + // #ifndef APP-NVUE + this.animation[type](...args) + // #endif + // #ifdef APP-NVUE + this._nvuePushAnimates(type, args) + // #endif + return this + } +}) + +export function createAnimation(option, _this) { + if(!_this) return + clearTimeout(_this.timer) + return new MPAnimation(option, _this) +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" new file mode 100644 index 000000000..bfbba933c --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" @@ -0,0 +1,286 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/package.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/package.json" new file mode 100644 index 000000000..ea995a2a1 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/package.json" @@ -0,0 +1,84 @@ +{ + "id": "uni-transition", + "displayName": "uni-transition 过渡动画", + "version": "1.3.2", + "description": "元素的简单过渡动画", + "keywords": [ + "uni-ui", + "uniui", + "动画", + "过渡", + "过渡动画" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/readme.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/readme.md" new file mode 100644 index 000000000..2f8a77e10 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/uni_modules/uni-transition/readme.md" @@ -0,0 +1,11 @@ + + +## Transition 过渡动画 +> **组件名:uni-transition** +> 代码块: `uTransition` + + +元素过渡动画 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/utils/system.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/utils/system.js" new file mode 100644 index 000000000..3a24eccca --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt - \345\270\203\345\261\200\347\257\207/utils/system.js" @@ -0,0 +1,25 @@ +const SYSTEM_INFO = uni.getSystemInfoSync(); + +export const getStatusBarHeight = ()=> SYSTEM_INFO.statusBarHeight || 15; + +export const getTitleBarHeight = ()=>{ + if(uni.getMenuButtonBoundingClientRect){ + let {top,height} = uni.getMenuButtonBoundingClientRect(); + return height + (top - getStatusBarHeight())*2 + }else{ + return 40; + } +} + +export const getNavBarHeight = ()=> getStatusBarHeight()+getTitleBarHeight(); + +export const getLeftIconLeft = ()=> { + // #ifdef MP-TOUTIAO + let {leftIcon:{left,width}} = tt.getCustomButtonBoundingClientRect(); + return left+ parseInt(width); + // #endif + + // #ifndef MP-TOUTIAO + return 0 + // #endif +} \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/.hbuilderx/launch.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/.hbuilderx/launch.json" new file mode 100644 index 000000000..19913378a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/.hbuilderx/launch.json" @@ -0,0 +1,30 @@ +{ + // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : + { + "launchtype" : "local" + }, + "default" : + { + "launchtype" : "local" + }, + "mp-toutiao" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + }, + { + "playground" : "custom", + "type" : "uni-app:app-android" + } + ] +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/App.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/App.vue" new file mode 100644 index 000000000..806765aa3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/App.vue" @@ -0,0 +1,17 @@ + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/androidPrivacy.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/androidPrivacy.json" new file mode 100644 index 000000000..a78485c82 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/androidPrivacy.json" @@ -0,0 +1,3 @@ +{ + "prompt" : "none" +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/api/apis.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/api/apis.js" new file mode 100644 index 000000000..24eba7d74 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/api/apis.js" @@ -0,0 +1,93 @@ +import {request} from "@/utils/request.js" + +export function apiGetBanner(){ + return request({ + url:"/homeBanner" + }) +} + +export function apiGetDayRandom(){ + return request({url:"/randomWall"}) +} + +export function apiGetNotice(data={}){ + return request({ + url:"/wallNewsList", + data + }) +} + + +export function apiGetClassify(data={}){ + return request({ + url:"/classify", + data + }) +} + + + +export function apiGetClassList(data={}){ + return request({ + url:"/wallList", + data + }) +} + + +export function apiGetSetupScore(data={}){ + return request({ + url:"/setupScore", + data + }) +} + + +export function apiWriteDownload(data={}){ + return request({ + url:"/downloadWall", + data + }) +} + + + +export function apiDetailWall(data={}){ + return request({ + url:"/detailWall", + data + }) +} + + +export function apiUserInfo(data={}){ + return request({ + url:"/userInfo", + data + }) +} + + +export function apiGetHistoryList(data={}){ + return request({ + url:"/userWallList", + data + }) +} + + + +export function apiNoticeDetail(data={}){ + return request({ + url:"/wallNewsDetail", + data + }) +} + + +export function apiSearchData(data={}){ + return request({ + url:"/searchWall", + data + }) +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner1.jpg" new file mode 100644 index 000000000..5f6470eee Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner2.jpg" new file mode 100644 index 000000000..218ba07b8 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner3.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner3.jpg" new file mode 100644 index 000000000..c444a9732 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/banner3.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify1.jpg" new file mode 100644 index 000000000..040047c8a Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify2.jpg" new file mode 100644 index 000000000..7de667b60 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/classify2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/more.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/more.jpg" new file mode 100644 index 000000000..8cc2ff330 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/more.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview1.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview1.jpg" new file mode 100644 index 000000000..0413ad885 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview1.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview2.jpg" new file mode 100644 index 000000000..335d86ad9 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview_small.webp" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview_small.webp" new file mode 100644 index 000000000..716f2cbe6 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/images/preview_small.webp" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/base-style.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/base-style.scss" new file mode 100644 index 000000000..c4d5643c6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/base-style.scss" @@ -0,0 +1,9 @@ +$brand-theme-color:#28B389; //品牌主体红色 + +$border-color:#e0e0e0; //边框颜色 +$border-color-light:#efefef; //边框亮色 + +$text-font-color-1:#000; //文字主色 +$text-font-color-2:#676767; //副标题颜色 +$text-font-color-3:#a7a7a7; //浅色 +$text-font-color-4:#e4e4e4; //更浅 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/common-style.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/common-style.scss" new file mode 100644 index 000000000..e182489e8 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/common/style/common-style.scss" @@ -0,0 +1,19 @@ +view,swiper,swiper-item{ + box-sizing: border-box; +} + +.pageBg{ + background: + linear-gradient(to bottom,transparent,#fff 400rpx), + linear-gradient(to right,#beecd8 20%,#F4E2D8); + min-height: 80vh; +} + +.loadingLayout{ + padding:30rpx 0; +} + +.safe-area-inset-bottom{ + height: env(safe-area-inset-bottom); +} + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/common-title/common-title.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/common-title/common-title.vue" new file mode 100644 index 000000000..f78a4c62b --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/common-title/common-title.vue" @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/custom-nav-bar/custom-nav-bar.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/custom-nav-bar/custom-nav-bar.vue" new file mode 100644 index 000000000..e7adc38b9 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/custom-nav-bar/custom-nav-bar.vue" @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/theme-item/theme-item.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/theme-item/theme-item.vue" new file mode 100644 index 000000000..a3ca102b2 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/components/theme-item/theme-item.vue" @@ -0,0 +1,96 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/index.html" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/index.html" new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/index.html" @@ -0,0 +1,20 @@ + + + + + + + + + + +
                + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/main.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/main.js" new file mode 100644 index 000000000..c1caf3606 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/main.js" @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/manifest.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/manifest.json" new file mode 100644 index 000000000..efe85cc08 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/manifest.json" @@ -0,0 +1,124 @@ +{ + "name" : "咸虾米壁纸", + "appid" : "__UNI__B8FCDB7", + "description" : "", + "versionName" : "1.0.1", + "versionCode" : 101, + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "arm64-v8a", "x86" ] + }, + /* ios打包配置 */ + "ios" : { + "dSYMs" : false + }, + /* SDK配置 */ + "sdkConfigs" : { + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + }, + "splashscreen" : { + "useOriginalMsgbox" : false + } + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx511abe7a13783591", + "setting" : { + "urlCheck" : false, + "minified" : true + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true, + "appid" : "tt3c564aeba36527e001", + "setting" : { + "minified" : true + } + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3", + "h5" : { + "title" : "咸虾米壁纸", + "router" : { + "base" : "/xxmwall/", + "mode" : "hash" + } + } +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages.json" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages.json" new file mode 100644 index 000000000..66fe6ee51 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages.json" @@ -0,0 +1,99 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" + } + }, + { + "path" : "pages/classify/classify", + "style" : + { + "navigationBarTitleText" : "分类", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/user/user", + "style" : + { + "navigationBarTitleText" : "我的", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/classlist/classlist", + "style" : + { + "navigationBarTitleText" : "分类列表", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/preview/preview", + "style" : + { + "navigationBarTitleText" : "预览", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/notice/notice", + "style" : + { + "navigationBarTitleText" : "公告", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/notice/detail", + "style" : + { + "navigationBarTitleText" : "公告详情", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/search/search", + "style" : + { + "navigationBarTitleText" : "搜索", + "enablePullDownRefresh" : false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "咸虾米壁纸", + "navigationBarBackgroundColor": "#fff", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#9799a5", + "selectedColor": "#28B389", + "list": [ + { + "text": "推荐", + "pagePath": "pages/index/index", + "iconPath": "static/images/tabBar/home.png", + "selectedIconPath": "static/images/tabBar/home-h.png" + },{ + "text": "分类", + "pagePath": "pages/classify/classify", + "iconPath": "static/images/tabBar/classify.png", + "selectedIconPath": "static/images/tabBar/classify-h.png" + },{ + "text": "我的", + "pagePath": "pages/user/user", + "iconPath": "static/images/tabBar/user.png", + "selectedIconPath": "static/images/tabBar/user-h.png" + } + ] + }, + "uniIdRouter": {} +} diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classify/classify.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classify/classify.vue" new file mode 100644 index 000000000..e9cba8f79 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classify/classify.vue" @@ -0,0 +1,59 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classlist/classlist.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classlist/classlist.vue" new file mode 100644 index 000000000..7148901af --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/classlist/classlist.vue" @@ -0,0 +1,115 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/index/index.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/index/index.vue" new file mode 100644 index 000000000..a2653cc07 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/index/index.vue" @@ -0,0 +1,287 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/detail.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/detail.vue" new file mode 100644 index 000000000..e4c92edc3 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/detail.vue" @@ -0,0 +1,87 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/notice.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/notice.vue" new file mode 100644 index 000000000..852490f13 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/notice/notice.vue" @@ -0,0 +1,13 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/preview/preview.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/preview/preview.vue" new file mode 100644 index 000000000..963c5c968 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/preview/preview.vue" @@ -0,0 +1,604 @@ + + + + + \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/search/search.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/search/search.vue" new file mode 100644 index 000000000..014008d1d --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/search/search.vue" @@ -0,0 +1,217 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/user/user.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/user/user.vue" new file mode 100644 index 000000000..a6f4b0523 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/pages/user/user.vue" @@ -0,0 +1,202 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/logo2.jpg" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/logo2.jpg" new file mode 100644 index 000000000..2746e8674 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/logo2.jpg" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify-h.png" new file mode 100644 index 000000000..2858107ef Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify.png" new file mode 100644 index 000000000..d32bc6c75 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/classify.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home-h.png" new file mode 100644 index 000000000..e86e1dd9c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home.png" new file mode 100644 index 000000000..591aa1a19 Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/home.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user-h.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user-h.png" new file mode 100644 index 000000000..fa8b717cf Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user-h.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user.png" new file mode 100644 index 000000000..6d53fc02c Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/tabBar/user.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/xxmLogo.png" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/xxmLogo.png" new file mode 100644 index 000000000..d822b165e Binary files /dev/null and "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/static/images/xxmLogo.png" differ diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.promisify.adaptor.js" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.promisify.adaptor.js" new file mode 100644 index 000000000..47fbce111 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.promisify.adaptor.js" @@ -0,0 +1,10 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); + }); + }, +}); \ No newline at end of file diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.scss" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.scss" new file mode 100644 index 000000000..3f7a4ba0f --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni.scss" @@ -0,0 +1,62 @@ +@import "@/common/style/base-style.scss"; + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/README.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/README.md" new file mode 100644 index 000000000..dcfcc2c6a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/README.md" @@ -0,0 +1,193 @@ +## 为减小组件包的大小,默认组件包中不包含编辑、latex 公式等扩展功能,需要使用扩展功能的请参考下方的 插件扩展 栏的说明 + +## 功能介绍 +- 全端支持(含 `v3、NVUE`) +- 支持丰富的标签(包括 `table`、`video`、`svg` 等) +- 支持丰富的事件效果(自动预览图片、链接处理等) +- 支持设置占位图(加载中、出错时、预览时) +- 支持锚点跳转、长按复制等丰富功能 +- 支持大部分 *html* 实体 +- 丰富的插件(关键词搜索、内容编辑、`latex` 公式等) +- 效率高、容错性强且轻量化 + +查看 [功能介绍](https://jin-yufeng.gitee.io/mp-html/#/overview/feature) 了解更多 + +## 使用方法 +- `uni_modules` 方式 + 1. 点击右上角的 `使用 HBuilder X 导入插件` 按钮直接导入项目或点击 `下载插件 ZIP` 按钮下载插件包并解压到项目的 `uni_modules/mp-html` 目录下 + 2. 在需要使用页面的 `(n)vue` 文件中添加 + ```html + + + ``` + ```javascript + export default { + data() { + return { + html: '
                Hello World!
                ' + } + } + } + ``` + 3. 需要更新版本时在 `HBuilder X` 中右键 `uni_modules/mp-html` 目录选择 `从插件市场更新` 即可 + +- 源码方式 + 1. 从 [github](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 或 [gitee](https://gitee.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 下载源码 + 插件市场的 **非 uni_modules 版本** 无法更新,不建议从插件市场获取 + 2. 在需要使用页面的 `(n)vue` 文件中添加 + ```html + + ``` + ```javascript + import mpHtml from '@/components/mp-html/mp-html' + export default { + // HBuilderX 2.5.5+ 可以通过 easycom 自动引入 + components: { + mpHtml + }, + data() { + return { + html: '
                Hello World!
                ' + } + } + } + ``` + +- npm 方式 + 1. 在项目根目录下执行 + ```bash + npm install mp-html + ``` + 2. 在需要使用页面的 `(n)vue` 文件中添加 + ```html + + ``` + ```javascript + import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html' + export default { + // 不可省略 + components: { + mpHtml + }, + data() { + return { + html: '
                Hello World!
                ' + } + } + } + ``` + 3. 需要更新版本时执行以下命令即可 + ```bash + npm update mp-html + ``` + + 使用 *cli* 方式运行的项目,通过 *npm* 方式引入时,需要在 *vue.config.js* 中配置 *transpileDependencies*,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687) + 如果在 **nvue** 中使用还要将 `dist/uni-app/static` 目录下的内容拷贝到项目的 `static` 目录下,否则无法运行 + +查看 [快速开始](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart) 了解更多 + +## 组件属性 + +| 属性 | 类型 | 默认值 | 说明 | +|:---:|:---:|:---:|---| +| container-style | String | | 容器的样式([2.1.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v210)) | +| content | String | | 用于渲染的 html 字符串 | +| copy-link | Boolean | true | 是否允许外部链接被点击时自动复制 | +| domain | String | | 主域名(用于链接拼接) | +| error-img | String | | 图片出错时的占位图链接 | +| lazy-load | Boolean | false | 是否开启图片懒加载 | +| loading-img | String | | 图片加载过程中的占位图链接 | +| pause-video | Boolean | true | 是否在播放一个视频时自动暂停其他视频 | +| preview-img | Boolean | true | 是否允许图片被点击时自动预览 | +| scroll-table | Boolean | false | 是否给每个表格添加一个滚动层使其能单独横向滚动 | +| selectable | Boolean | false | 是否开启文本长按复制 | +| set-title | Boolean | true | 是否将 title 标签的内容设置到页面标题 | +| show-img-menu | Boolean | true | 是否允许图片被长按时显示菜单 | +| tag-style | Object | | 设置标签的默认样式 | +| use-anchor | Boolean | false | 是否使用锚点链接 | + +查看 [属性](https://jin-yufeng.gitee.io/mp-html/#/basic/prop) 了解更多 + +## 组件事件 + +| 名称 | 触发时机 | +|:---:|---| +| load | dom 树加载完毕时 | +| ready | 图片加载完毕时 | +| error | 发生渲染错误时 | +| imgtap | 图片被点击时 | +| linktap | 链接被点击时 | +| play | 音视频播放时 | + +查看 [事件](https://jin-yufeng.gitee.io/mp-html/#/basic/event) 了解更多 + +## api +组件实例上提供了一些 `api` 方法可供调用 + +| 名称 | 作用 | +|:---:|---| +| in | 将锚点跳转的范围限定在一个 scroll-view 内 | +| navigateTo | 锚点跳转 | +| getText | 获取文本内容 | +| getRect | 获取富文本内容的位置和大小 | +| setContent | 设置富文本内容 | +| imgList | 获取所有图片的数组 | +| pauseMedia | 暂停播放音视频([2.2.2+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v222)) | +| setPlaybackRate | 设置音视频播放速率([2.4.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v240)) | + +查看 [api](https://jin-yufeng.gitee.io/mp-html/#/advanced/api) 了解更多 + +## 插件扩展 +除基本功能外,本组件还提供了丰富的扩展,可按照需要选用 + +| 名称 | 作用 | +|:---:|---| +| audio | 音乐播放器 | +| editable | 富文本 **编辑**([示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip)) | +| emoji | 解析 emoji | +| highlight | 代码块高亮显示 | +| markdown | 渲染 markdown | +| search | 关键词搜索 | +| style | 匹配 style 标签中的样式 | +| txv-video | 使用腾讯视频 | +| img-cache | 图片缓存 by [@PentaTea](https://github.com/PentaTea) | +| latex | 渲染 latex 公式 by [@Zeng-J](https://github.com/Zeng-J) | + +从插件市场导入的包中 **不含有** 扩展插件,使用插件需通过微信小程序 `富文本插件` 获取或参考以下方法进行打包: +1. 获取完整组件包 + ```bash + npm install mp-html + ``` +2. 编辑 `tools/config.js` 中的 `plugins` 项,选择需要的插件 +3. 生成新的组件包 + 在 `node_modules/mp-html` 目录下执行 + ```bash + npm install + npm run build:uni-app + ``` +4. 拷贝 `dist/uni-app` 中的内容到项目根目录 + +查看 [插件](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin) 了解更多 + +## 关于 nvue +`nvue` 使用原生渲染,不支持部分 `css` 样式,为实现和 `html` 相同的效果,组件内部通过 `web-view` 进行渲染,性能上差于原生,根据 `weex` 官方建议,`web` 标签仅应用在非常规的降级场景。因此,如果通过原生的方式(如 `richtext`)能够满足需要,则不建议使用本组件,如果有较多的富文本内容,则可以直接使用 `vue` 页面 +由于渲染方式与其他端不同,有以下限制: +1. 不支持 `lazy-load` 属性 +2. 视频不支持全屏播放 +3. 如果在 `flex-direction: row` 的容器中使用,需要给组件设置宽度或设置 `flex: 1` 占满剩余宽度 + +纯 `nvue` 模式下,[此问题](https://ask.dcloud.net.cn/question/119678) 修复前,不支持通过 `uni_modules` 引入,需要本地引入(将 [dist/uni-app](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 中的内容拷贝到项目根目录下) + +## 立即体验 +![富文本插件](https://mp-html.oss-cn-hangzhou.aliyuncs.com/qrcode.jpg) + +## 问题反馈 +遇到问题时,请先查阅 [常见问题](https://jin-yufeng.gitee.io/mp-html/#/question/faq) 和 [issue](https://github.com/jin-yufeng/mp-html/issues) 中是否已有相同的问题 +可通过 [issue](https://github.com/jin-yufeng/mp-html/issues/new/choose) 、插件问答或发送邮件到 [mp_html@126.com](mailto:mp_html@126.com) 提问,不建议在评论区提问(不方便回复) +提问请严格按照 [issue 模板](https://github.com/jin-yufeng/mp-html/issues/new/choose) ,描述清楚使用环境、`html` 内容或可复现的 `demo` 项目以及复现方式,对于 **描述不清**、**无法复现** 或重复的问题将不予回复 + +欢迎加入 `QQ` 交流群: +群1(已满):`699734691` +群2:`778239129` + +查看 [问题反馈](https://jin-yufeng.gitee.io/mp-html/#/question/feedback) 了解更多 diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/changelog.md" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/changelog.md" new file mode 100644 index 000000000..537357c8e --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/changelog.md" @@ -0,0 +1,138 @@ +## v2.4.3(2024-01-21) +1. `A` 增加 [card](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#card) 插件 [详细](https://github.com/jin-yufeng/mp-html/pull/533) by [@whoooami](https://github.com/whoooami) +2. `F` 修复了 `svg` 中包含 `foreignobject` 可能不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/523) +3. `F` 修复了合并单元格的表格部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/561) +4. `F` 修复了 `img` 标签设置 `object-fit` 无效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/567) +5. `F` 修复了 `latex` 插件公式会换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/540) +6. `F` 修复了 `editable` 和 `audio` 插件共用时点击 `audio` 无法编辑的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/529) by [@whoooami](https://github.com/whoooami) +7. `F` 修复了微信小程序部分情况下图片会报错 `replace of undefined` 的问题 +8. `F` 修复了快手小程序图片不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/571) +## v2.4.2(2023-05-14) +1. `A` `editable` 插件支持修改文字颜色 [详细](https://github.com/jin-yufeng/mp-html/issues/254) +2. `F` 修复了 `svg` 中有 `style` 不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/505) +3. `F` 修复了使用旧版编译器可能报错 `Bad attr nodes` 的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/472) +4. `F` 修复了 `app` 端可能出现无法读取 `lazyLoad` 的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/513) +5. `F` 修复了 `editable` 插件在点击换图时未拼接 `domain` 的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/497) by [@TwoKe945](https://github.com/TwoKe945) +6. `F` 修复了 `latex` 插件部分情况下不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/515) +7. `F` 修复了 `editable` 插件点击音视频时其他标签框不消失的问题 +## v2.4.1(2022-12-25) +1. `F` 修复了没有图片时 `ready` 事件可能不触发的问题 +2. `F` 修复了加载过程中可能出现 `Root label not found` 错误的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/470) +3. `F` 修复了 `audio` 插件退出页面可能会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/457) +4. `F` 修复了 `vue3` 运行到 `app` 在 `HBuilder X 3.6.10` 以上报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/480) +5. `F` 修复了 `nvue` 端链接中包含 `%22` 时可能无法显示的问题 +6. `F` 修复了 `vue3` 使用 `highlight` 插件可能报错的问题 +## v2.4.0(2022-08-27) +1. `A` 增加了 [setPlaybackRate](https://jin-yufeng.gitee.io/mp-html/#/advanced/api#setPlaybackRate) 的 `api`,可以设置音视频的播放速率 [详细](https://github.com/jin-yufeng/mp-html/issues/452) +2. `A` 示例小程序代码开源 [详细](https://github.com/jin-yufeng/mp-html-demo) +3. `U` 优化 `ready` 事件触发时机,未设置懒加载的情况下基本可以准确触发 [详细](https://github.com/jin-yufeng/mp-html/issues/195) +4. `U` `highlight` 插件在编辑状态下不进行高亮处理,便于编辑 +5. `F` 修复了 `flex` 布局下图片大小可能不正确的问题 +6. `F` 修复了 `selectable` 属性没有设置 `force` 也可能出现渲染异常的问题 +7. `F` 修复了表格中的图片大小可能不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/448) +8. `F` 修复了含有合并单元格的表格可能无法设置竖直对齐的问题 +9. `F` 修复了 `editable` 插件在 `scroll-view` 中使用时工具条位置可能不正确的问题 +10. `F` 修复了 `vue3` 使用 [search](advanced/plugin#search) 插件可能导致错误换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/449) +## v2.3.2(2022-08-13) +1. `A` 增加 [latex](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#latex) 插件,可以渲染数学公式 [详细](https://github.com/jin-yufeng/mp-html/pull/447) by [@Zeng-J](https://github.com/Zeng-J) +2. `U` 优化根节点下有很多标签的长内容渲染速度 +3. `U` `highlight` 插件适配 `lang-xxx` 格式 +4. `F` 修复了 `table` 标签设置 `border` 属性后可能无法修改边框样式的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/439) by [@zouxingjie](https://github.com/zouxingjie) +5. `F` 修复了 `editable` 插件输入连续空格无效的问题 +6. `F` 修复了 `vue3` 图片设置 `inline` 会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/438) +7. `F` 修复了 `vue3` 使用 `table` 可能报错的问题 +## v2.3.1(2022-05-20) +1. `U` `app` 端支持使用本地图片 +2. `U` 优化了微信小程序 `selectable` 属性在 `ios` 端的处理 [详细](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#selectable) +3. `F` 修复了 `editable` 插件不在顶部时 `tooltip` 位置可能错误的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/430) +4. `F` 修复了 `vue3` 运行到微信小程序可能报错丢失内容的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/414) +5. `F` 修复了 `vue3` 部分标签可能被错误换行的问题 +6. `F` 修复了 `editable` 插件 `app` 端插入视频无法预览的问题 +## v2.3.0(2022-04-01) +1. `A` 增加了 `play` 事件,音视频播放时触发,可用于与页面其他音视频进行互斥播放 [详细](basic/event#play) +2. `U` `show-img-menu` 属性支持控制预览时是否长按弹出菜单 +3. `U` 优化 `wxs` 处理,提高渲染性能 [详细](https://developers.weixin.qq.com/community/develop/article/doc/0006cc2b204740f601bd43fa25a413) +4. `U` `video` 标签支持 `object-fit` 属性 +5. `U` 增加支持一些常用实体编码 [详细](https://github.com/jin-yufeng/mp-html/issues/418) +6. `F` 修复了图片仅设置高度可能不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/410) +7. `F` 修复了 `video` 标签高度设置为 `auto` 不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/411) +8. `F` 修复了使用 `grid` 布局时可能样式错误的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/413) +9. `F` 修复了含有合并单元格的表格部分情况下显示异常的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/417) +10. `F` 修复了 `editable` 插件连续插入内容时顺序不正确的问题 +11. `F` 修复了 `uni-app` 包 `vue3` 使用 `audio` 插件报错的问题 +12. `F` 修复了 `uni-app` 包 `highlight` 插件使用自定义的 `prism.min.js` 报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/416) +## v2.2.2(2022-02-26) +1. `A` 增加了 [pauseMedia](https://jin-yufeng.gitee.io/mp-html/#/advanced/api#pauseMedia) 的 `api`,可用于暂停播放音视频 [详细](https://github.com/jin-yufeng/mp-html/issues/317) +2. `U` 优化了长内容的加载速度 +3. `U` 适配 `vue3` [#389](https://github.com/jin-yufeng/mp-html/issues/389)、[#398](https://github.com/jin-yufeng/mp-html/pull/398) by [@zhouhuafei](https://github.com/zhouhuafei)、[#400](https://github.com/jin-yufeng/mp-html/issues/400) +4. `F` 修复了小程序端图片高度设置为百分比时可能不显示的问题 +5. `F` 修复了 `highlight` 插件部分情况下可能显示不完整的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/403) +## v2.2.1(2021-12-24) +1. `A` `editable` 插件增加上下移动标签功能 +2. `U` `editable` 插件支持在文本中间光标处插入内容 +3. `F` 修复了 `nvue` 端设置 `margin` 后可能导致高度不正确的问题 +4. `F` 修复了 `highlight` 插件使用压缩版的 `prism.css` 可能导致背景失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/367) +5. `F` 修复了编辑状态下使用 `emoji` 插件内容为空时可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/371) +6. `F` 修复了使用 `editable` 插件后将 `selectable` 属性设置为 `force` 不生效的问题 +## v2.2.0(2021-10-12) +1. `A` 增加 `customElements` 配置项,便于添加自定义功能性标签 [详细](https://github.com/jin-yufeng/mp-html/issues/350) +2. `A` `editable` 插件增加切换音视频自动播放状态的功能 [详细](https://github.com/jin-yufeng/mp-html/pull/341) by [@leeseett](https://github.com/leeseett) +3. `A` `editable` 插件删除媒体标签时触发 `remove` 事件,便于删除已上传的文件 +4. `U` `editable` 插件 `insertImg` 方法支持同时插入多张图片 [详细](https://github.com/jin-yufeng/mp-html/issues/342) +5. `U` `editable` 插入图片和音视频时支持拼接 `domian` 主域名 +6. `F` 修复了内部链接参数中包含 `://` 时被认为是外部链接的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/356) +7. `F` 修复了部分 `svg` 标签名或属性名大小写不正确时不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/351) +8. `F` 修复了 `nvue` 页面运行到非 `app` 平台时可能样式错误的问题 +## v2.1.5(2021-08-13) +1. `A` 增加支持标签的 `dir` 属性 +2. `F` 修复了 `ruby` 标签文字与拼音没有居中对齐的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/325) +3. `F` 修复了音视频标签内有 `a` 标签时可能无法播放的问题 +4. `F` 修复了 `externStyle` 中的 `class` 名包含下划线或数字时可能失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326) +5. `F` 修复了 `h5` 端引入 `externStyle` 可能不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326) +## v2.1.4(2021-07-14) +1. `F` 修复了 `rt` 标签无法设置样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/318) +2. `F` 修复了表格中有单元格同时合并行和列时可能显示不正确的问题 +3. `F` 修复了 `app` 端无法关闭图片长按菜单的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/322) +4. `F` 修复了 `editable` 插件只能添加图片链接不能修改的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/312) by [@leeseett](https://github.com/leeseett) +## v2.1.3(2021-06-12) +1. `A` `editable` 插件增加 `insertTable` 方法 +2. `U` `editable` 插件支持编辑表格中的空白单元格 [详细](https://github.com/jin-yufeng/mp-html/issues/310) +3. `F` 修复了 `externStyle` 中使用伪类可能失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/298) +4. `F` 修复了多个组件同时使用时 `tag-style` 属性时可能互相影响的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/305) by [@woodguoyu](https://github.com/woodguoyu) +5. `F` 修复了包含 `linearGradient` 的 `svg` 可能无法显示的问题 +6. `F` 修复了编译到头条小程序时可能报错的问题 +7. `F` 修复了 `nvue` 端不触发 `click` 事件的问题 +8. `F` 修复了 `editable` 插件尾部插入时无法撤销的问题 +9. `F` 修复了 `editable` 插件的 `insertHtml` 方法只能在末尾插入的问题 +10. `F` 修复了 `editable` 插件插入音频不显示的问题 +## v2.1.2(2021-04-24) +1. `A` 增加了 [img-cache](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#img-cache) 插件,可以在 `app` 端缓存图片 [详细](https://github.com/jin-yufeng/mp-html/issues/292) by [@PentaTea](https://github.com/PentaTea) +2. `U` 支持通过 `container-style` 属性设置 `white-space` 来保留连续空格和换行符 [详细](https://jin-yufeng.gitee.io/mp-html/#/question/faq#space) +3. `U` 代码风格符合 [standard](https://standardjs.com) 标准 +4. `U` `editable` 插件编辑状态下支持预览视频 [详细](https://github.com/jin-yufeng/mp-html/issues/286) +5. `F` 修复了 `svg` 标签内嵌 `svg` 时无法显示的问题 +6. `F` 修复了编译到支付宝和头条小程序时部分区域不可复制的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/291) +## v2.1.1(2021-04-09) +1. 修复了对 `p` 标签设置 `tag-style` 可能不生效的问题 +2. 修复了 `svg` 标签中的文本无法显示的问题 +3. 修复了使用 `editable` 插件编辑表格时可能报错的问题 +4. 修复了使用 `highlight` 插件运行到头条小程序时可能没有样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/280) +5. 修复了使用 `editable` 插件 `editable` 属性为 `false` 时会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/284) +6. 修复了 `style` 插件连续子选择器失效的问题 +7. 修复了 `editable` 插件无法修改图片和字体大小的问题 +## v2.1.0.2(2021-03-21) +修复了 `nvue` 端使用可能报错的问题 +## v2.1.0(2021-03-20) +1. `A` 增加了 [container-style](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#container-style) 属性 [详细](https://gitee.com/jin-yufeng/mp-html/pulls/1) +2. `A` 增加支持 `strike` 标签 +3. `A` `editable` 插件增加 `placeholder` 属性 [详细](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#editable) +4. `A` `editable` 插件增加 `insertHtml` 方法 [详细](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#editable) +5. `U` 外部样式支持标签名选择器 [详细](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart#setting) +6. `F` 修复了 `nvue` 端部分情况下可能不显示的问题 +## v2.0.5(2021-03-12) +1. `U` [linktap](https://jin-yufeng.gitee.io/mp-html/#/basic/event#linktap) 事件增加返回内部文本内容 `innerText` [详细](https://github.com/jin-yufeng/mp-html/issues/271) +2. `U` [selectable](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#selectable) 属性设置为 `force` 时能够在微信 `iOS` 端生效(文本块会变成 `inline-block`) [详细](https://github.com/jin-yufeng/mp-html/issues/267) +3. `F` 修复了部分情况下竖向无法滚动的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/182) +4. `F` 修复了多次修改富文本数据时部分内容可能不显示的问题 +5. `F` 修复了 [腾讯视频](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#txv-video) 插件可能无法播放的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/265) +6. `F` 修复了 [highlight](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#highlight) 插件没有设置高亮语言时没有应用默认样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/276) by [@fuzui](https://github.com/fuzui) diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/mp-html.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/mp-html.vue" new file mode 100644 index 000000000..ec701157a --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/mp-html.vue" @@ -0,0 +1,498 @@ + + + + + diff --git "a/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/node/node.vue" "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/node/node.vue" new file mode 100644 index 000000000..c5ef09476 --- /dev/null +++ "b/12-\345\211\215\347\253\257\346\241\206\346\236\266/08-uni-app/univue3/\347\224\250\346\211\200\351\200\211\351\241\271\347\233\256\346\226\260\345\273\272\347\232\204\346\226\207\344\273\266\345\244\271/wallpaper-kt/uni_modules/mp-html/components/mp-html/node/node.vue" @@ -0,0 +1,579 @@ +