diff --git a/gh-pages/docs.json b/gh-pages/docs.json deleted file mode 100644 index e8f10baf..00000000 --- a/gh-pages/docs.json +++ /dev/null @@ -1,584 +0,0 @@ -{ - "docs": [ - { - "title": "Action 行为按钮", - "body": "action 行为按钮,是触发页面行为的主要方法之一## 基本用法我们这里简单实现一个点击按钮弹框的交互。## 通用属性表所有`actiontype`都支持的通用配置项| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ---------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- || type | `string` | `action` | 指定为 page 渲染器。 || actiontype | `string` | - | 【必填】这是 action 最核心的配置,来指定该 action 的作用类型,支持:`ajax`、`link`、`url`、`drawer`、`dialog`、`confirm`、`cancel`、`prev`、`next`、`copy`、`close`。 || label | `string` | - | 按钮文本。可用 `${xxx}` 取值。 || level | `string` | `default` | 按钮样式,支持:`link`、`primary`、`secondary`、`info`、`success`、`warning`、`danger`、`light`、`dark`、`default`。 || size | `string` | - | 按钮大小,支持:`xs`、`sm`、`md`、`lg`。 || icon | `string` | - | 设置图标,例如`fa fa-plus`。 || iconclassname | `string` | - | 给图标上添加类名。 || active | `boolean` | - | 按钮是否高亮。 || activelevel | `string` | - | 按钮高亮时的样式,配置支持同`level`。 || activeclassname | `string` | `is-active` | 给按钮高亮添加类名。 || block | `boolean` | - | 用`display:\"block\"`来显示按钮。 || confirmtext | | - | 当设置后,操作在开始前会询问用户。可用 `${xxx}` 取值。 || reload | `string` | - | 指定此次操作完后,需要刷新的目标组件名字(组件的`name`值,自己配置的),多个请用 `,` 号隔开。 || tooltip | `string` | - | 鼠标停留时弹出该段文字,也可以配置对象类型:字段为`title`和`content`。可用 `${xxx}` 取值。 || disabledtip | `string` | - | 被禁用后鼠标停留时弹出该段文字,也可以配置对象类型:字段为`title`和`content`。可用 `${xxx}` 取值。 || tooltipplacement | `string` | `top` | 如果配置了`tooltip`或者`disabledtip`,指定提示信息位置,可配置`top`、`bottom`、`left`、`right`。 || close | `boolean` | - | 当`action`配置在`dialog`或`drawer`的`actions`中时,配置为`true`指定此次操作完后关闭当前`dialog`或`drawer`。 || required | `array` | - | 配置字符串数组,指定在`form`中进行操作之前,需要指定的字段名的表单项通过验证 |", - "path": "/docs/components/action" - }, - { - "title": "Alert 提示", - "body": "用来做文字特殊提示,分为四类:提示类、成功类、警告类和危险类。## 基本使用## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------------------------------- | --------- | -------------------------------------------------------- || type | `string` | `\"alert\"` | 指定为 alert 渲染器 || classname | `string` | | 外层 dom 的类名 || level | `string` | `info` | 级别,可以是:`info`、`success`、`warning` 或者 `danger` || body | | | 显示内容 || showclosebutton | `boolean` | false | 是否显示关闭按钮 |", - "path": "/docs/components/alert" - }, - { - "title": "Audio 音频", - "body": "## 基本使用## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | --------- | ------------------------------------------------ | --------------------------------------- || type | `string` | `\"audio\"` | 指定为 audio 渲染器 || classname | `string` | | 外层 dom 的类名 || inline | `boolean` | true | 是否是内联模式 || src | `string` | | 音频地址 || loop | `boolean` | false | 是否循环播放 || autoplay | `boolean` | false | 是否自动播放 || rates | `array` | `[]` | 可配置音频播放倍速如:`[1.0, 1.5, 2.0]` || controls | `array` | `['rates', 'play', 'time', 'process', 'volume']` | 内部模块定制化 |", - "path": "/docs/components/audio" - }, - { - "title": "ButtonGroup 按钮组", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | ------------------------- | ---------------- | -------------------------- || type | `string` | `\"button-group\"` | 指定为 button-group 渲染器 || classname | `string` | | 外层 dom 的类名 || buttons | array<> | | 行为按钮组 || vertical | `string` | | 是否使用垂直模式 |", - "path": "/docs/components/button-group" - }, - { - "title": "Button 按钮", - "body": "## 基本用法button` 实际上是 `action` 的别名,更多用法见", - "path": "/docs/components/button" - }, - { - "title": "Card 卡片", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------------- | ---------------------------- | ----------------------------------- | -------------------------------------- || type | `string` | `\"card\"` | 指定为 card 渲染器 || classname | `string` | `\"panel-default\"` | 外层 dom 的类名 || header | `object` | | card 头部内容设置 || header.classname | `string` | | 头部类名 || header.title | | | 标题 || header.subtitle | | | 副标题 || header.desc | | | 描述 || header.avatar | | | 图片 || header.avatartext | | | 如果不配置图片,则会在图片处显示该文本 || header.highlight | `boolean` | | 是否显示激活样式 || header.avatarclassname | `string` | `\"pull-left thumb avatar b-3x m-r\"` | 图片类名 || body | `array` | | 内容容器,主要用来放置非表单项组件 || bodyclassname | `string` | `\"padder m-t-sm m-b-sm\"` | 内容区域类名 || actions | array<> | | 配置按钮集合 |", - "path": "/docs/components/card" - }, - { - "title": "Cards 卡片组", - "body": "卡片展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像`service`这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过`source`属性,获取数据链中的数据,完成数据展示。## 基本用法这里我们使用手动初始数据域的方式,即配置`data`属性,进行数据域的初始化。或者你也可以使用 crud 的 ## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | ------------------------------------ | ------------------- | ------------------------------ || type | `string` | | `\"cards\"` 指定为卡片组。 || title | | | 标题 || source | | `${items}` | 数据源, 获取当前数据域中的变量 || placeholder | | ‘暂无数据’ | 当没数据的时候的文字提示 || classname | `string` | | 外层 css 类名 || headerclassname | `string` | `amis-grid-header` | 顶部外层 css 类名 || footerclassname | `string` | `amis-grid-footer` | 底部外层 css 类名 || itemclassname | `string` | `col-sm-4 col-md-3` | 卡片 css 类名 || card | | | 配置卡片信息 |", - "path": "/docs/components/cards" - }, - { - "title": "Carousel 轮播图", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------------------- | --------- | -------------------- | ------------------------------------------------------- || type | `string` | `\"carousel\"` | 指定为 carousel 渲染器 || classname | `string` | `\"panel-default\"` | 外层 dom 的类名 || options | `array` | `[]` | 轮播面板数据 || options.image | `string` | | 图片链接 || options.imageclassname | `string` | | 图片类名 || options.title | `string` | | 图片标题 || options.titleclassname | `string` | | 图片标题类名 || options.description | `string` | | 图片描述 || options.descriptionclassname | `string` | | 图片描述类名 || options.html | `string` | | html 自定义,同一致 || itemschema | `object` | | 自定义`schema`来展示数据 || auto | `boolean` | `true` | 是否自动轮播 || interval | `string` | `5s` | 切换动画间隔 || duration | `string` | `0.5s` | 切换动画时长 || width | `string` | `auto` | 宽度 || height | `string` | `200px` | 高度 || controls | `array` | `['dots', 'arrows']` | 显示左右箭头、底部圆点索引 || controlstheme | `string` | `light` | 左右箭头、底部圆点索引颜色,默认`light`,另有`dark`模式 || animation | `string` | fade | 切换动画效果,默认`fade`,另有`slide`模式 |- `type` 请设置成 `carousel`- `classname` 外层 dom 的类名- `options` 轮播面板数据,默认`[]`,支持以下模式 - 图片 - `image` 图片链接 - `imageclassname` 图片类名 - `title` 图片标题 - `titleclassname` 图片标题类名 - `description` 图片描述 - `descriptionclassname` 图片描述类名 - `html` html 自定义,同一致- `itemschema` 自定义`schema`来展示数据- `auto` 是否自动轮播,默认`true`- `interval` 切换动画间隔,默认`5s`- `duration` 切换动画时长,默认`0.5s`- `width` 宽度,默认`auto`- `height` 高度,默认`200px`- `controls` 显示左右箭头、底部圆点索引,默认`['dots', 'arrows']`- `controlstheme` 左右箭头、底部圆点索引颜色,默认`light`,另有`dark`模式- `animation` 切换动画效果,默认`fade`,另有`slide`模式", - "path": "/docs/components/carousel" - }, - { - "title": "Chart 图表", - "body": "图表渲染器,采用 echarts 渲染,配置格式跟 echarts 相同,## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------ | ------------------------------------ | --------- | ------------------------------------------------------------------ || type | `string` | `\"chart\"` | 指定为 chart 渲染器 || classname | `string` | | 外层 dom 的类名 || body | | | 内容容器 || api | | | 配置项接口地址 || source | | | 通过数据映射获取数据链中变量值作为配置 || initfetch | `boolean` | | 组件初始化时,是否请求接口 || interval | `number` | | 刷新时间(最低 3000) || config | `object` 或 `string` | | 设置 eschars 的配置项,当为`string`的时候可以设置 function 等配置项 || style | `object` | | 设置根元素的 style || width | `string` | | 设置根元素的宽度 || height | `string` | | 设置根元素的高度 || replacechartoption | `boolean` | `false` | 每次更新是完全覆盖配置项还是追加? |", - "path": "/docs/components/chart" - }, - { - "title": "Collapse 折叠器", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------------------------- | -------------------------------------- | ---------------------- || type | `string` | `\"collapse\"` | 指定为 collapse 渲染器 || title | | | 标题 || body | | | 内容 || classname | `string` | `bg-white wrapper` | css 类名 || headingclassname | `string` | `font-thin b-b b-light text-lg p-b-xs` | 标题 css 类名 || bodyclassname | `string` | | 内容 css 类名。 || collapsed | `boolean` | `false` | 默认是否要收起。 |", - "path": "/docs/components/collapse" - }, - { - "title": "Color 颜色", - "body": "用于展示颜色## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------- | ------ | -------------------------------------------------------------------------------------- || type | `string` | | 如果在 table、card 和 list 中,为`\"color\"`;在 form 中用作静态展示,为`\"static-color\"` || classname | `string` | | 外层 css 类名 || value | `string` | | 显示的颜色值 || name | `string` | | 在其他组件中,时,用作变量映射 || defaultcolor | `string` | `#ccc` | 默认颜色值 || showvalue | `boolean` | `true` | 是否显示右边的颜色值 |", - "path": "/docs/components/color" - }, - { - "title": "组件介绍", - "body": "从这个章节开始,我们将会介绍 amis 中内置的所有组件的使用方法", - "path": "/docs/components/component" - }, - { - "title": "Container 容器", - "body": "container 是一种容器组件,它可以渲染其他 amis 组件## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------- | --------------------------------- | --------- | ------------------- || type | `string` | `\"alert\"` | 指定为 alert 渲染器 || classname | `string` | | 外层 dom 的类名 || bodyclassname | `string` | | 容器内容区的类名 || body | | | 容器内容 |", - "path": "/docs/components/container" - }, - { - "title": "CRUD 增删改查", - "body": "crud,即增删改查组件,主要用来展现数据列表,并支持各类【增】【删】【改】【查】等操作。## 基本用法最基本的用法是配置 **数据源接口(api)** 以及 **展示列(columns)**上例使用了数据映射中的`filter`过滤器,在前端实现了`engine`列的搜索功能。> **注意:**如果你的数据量较大,请务必使用服务端分页的方案,过多的前端数据展示,会显著影响前端页面的性能## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------------------------- | ------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------- || type | `string` | | `type` 指定为 crud 渲染器 || mode | `string` | `\"table\"` | `\"table\" 、 \"cards\" 或者 \"list\"` || title | `string` | `\"\"` | 可设置成空,当设置成空时,没有标题栏 || classname | `string` | | 表格外层 dom 的类名 || api | | | crud 用来获取列表数据的 api。 || loaddataonce | `boolean` | | 是否一次性加载所有数据(前端分页) || loaddataoncefetchonfilter | `boolean` | `true` | 在开启 loaddataonce 时,filter 时是否去重新请求 api || source | `string` | | 数据映射接口返回某字段的值,不设置会默认把接口返回的`items`或者`rows`填充进`mode`区域 || filter | | | 设置过滤器,当该表单提交后,会把数据带给当前 `mode` 刷新列表。 || filtertogglable | `boolean` | `false` | 是否可显隐过滤器 || filterdefaultvisible | `boolean` | `true` | 设置过滤器默认是否可见。 || initfetch | `boolean` | `true` | 是否初始化的时候拉取数据, 只针对有 filter 的情况, 没有 filter 初始都会拉取数据 || interval | `number` | `3000` | 刷新时间(最低 3000) || silentpolling | `boolean` | `false` | 配置刷新时是否隐藏加载动画 || stopautorefreshwhen | `string` | `\"\"` | 通过来配置停止刷新的条件 || stopautorefreshwhenmodalisopen | `boolean` | `false` | 当有弹框时关闭自动刷新,关闭弹框又恢复 || synclocation | `boolean` | `true` | 是否将过滤条件的参数同步到地址栏 || draggable | `boolean` | `false` | 是否可通过拖拽排序 || itemdraggableon | `boolean` | | 用来配置是否可拖拽排序 || | | 保存排序的 api。 || | | 快速编辑后用来批量保存的 api。 || | | 快速编辑配置成及时保存时使用的 api。 || bulkactions | array<> | | 批量操作列表,配置后,表格可进行选中操作。 || defaultchecked | `boolean` | `false` | 当可批量操作时,默认是否全部勾选。 || messages | `object` | | 覆盖消息提示,如果不指定,将采用 api 返回的 message || messages.fetchfailed | `string` | | 获取失败时提示 || messages.saveorderfailed | `string` | | 保存顺序失败提示 || messages.saveordersuccess | `string` | | 保存顺序成功提示 || messages.quicksavefailed | `string` | | 快速保存失败提示 || messages.quicksavesuccess | `string` | | 快速保存成功提示 || primaryfield | `string` | `\"id\"` | 设置 id 字段名。 || defaultparams | `object` | | 设置默认 filter 默认参数,会在查询的时候一起发给后端 || pagefield | `string` | `\"page\"` | 设置分页页码字段名。 || perpagefield | `string` | `\"perpage\"` | 设置分页一页显示的多少条数据的字段名。注意:最好与 defaultparams 一起使用,请看下面例子。 || perpageavailable | `array` | `[5, 10, 20, 50, 100]` | 设置一页显示多少条数据下拉框可选条数。 || orderfield | `string` | | 设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。 || hidequicksavebtn | `boolean` | `false` | 隐藏顶部快速保存提示 || autojumptotoponpagerchange | `boolean` | `false` | 当切分页的时候,是否自动跳顶部。 || syncresponse2query | `boolean` | `true` | 将返回数据同步到过滤器上。 || keepitemselectiononpagechange | `boolean` | `true` | 保留条目选择,默认分页、搜素后,用户选择条目会被清空,开启此选项后会保留用户选择,可以实现跨页面批量操作。 || labeltpl | `string` | | 单条描述模板,`keepitemselectiononpagechange`设置为`true`后会把所有已选择条目列出来,此选项可以用来定制条目展示文案。 || headertoolbar | array | `['bulkactions', 'pagination']` | 顶部工具栏配置 || footertoolbar | array | `['statistics', 'pagination']` | 底部工具栏配置 |", - "path": "/docs/components/crud" - }, - { - "title": "Date 日期时间", - "body": "用于展示日期## 基本使用## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------- | ------------ | ------------------------------------------------------------------------------------ || type | `string` | | 如果在 table、card 和 list 中,为`\"date\"`;在 form 中用作静态展示,为`\"static-date\"` || classname | `string` | | 外层 css 类名 || value | `string` | | 显示的颜色值 || name | `string` | | 在其他组件中,时,用作变量映射 || placeholder | `string` | `-` | 占位内容 || format | `string` | `yyyy-mm-dd` | 展示格式 || valueformat | `string` | `x` | 数据格式,默认为时间戳 || fromnow | `boolean` | `false` | fromnow || updatefrequency | `boolean` | `false` | updatefrequency |", - "path": "/docs/components/date" - }, - { - "title": "Dialog 对话框", - "body": "dialog 弹框 主要由 触发,主要展示一个对话框以供用户操作。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------------------------------- | ------------------ | ---------------------------------------------------------------------------------------- || type | `string` | | `\"dialog\"` 指定为 dialog 渲染器 || title | | | 弹出层标题 || body | | | 往 dialog 内容区加内容 || size | `string` | | 指定 dialog 大小,支持: `xs`、`sm`、`md`、`lg` || bodyclassname | `string` | `modal-body` | dialog body 区域的样式类名 || closeonesc | `boolean` | `false` | 是否支持按 `esc` 关闭 dialog || showclosebutton | `boolean` | `true` | 是否显示右上角的关闭按钮 || showerrormsg | `boolean` | `true` | 是否在弹框左下角显示报错信息 || disabled | `boolean` | `false` | 如果设置此属性,则该 dialog 只读没有提交操作。 || actions | array<> | 【确认】和【取消】 | 如果想不显示底部按钮,可以配置:`[]` || data | `object` | | 支持,如果不设定将默认将触发按钮的上下文中继承数据。 |", - "path": "/docs/components/dialog" - }, - { - "title": "Divider 分割线", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | -------- | ---------- | ----------------------------------- || type | `string` | | `\"dialog\"` 指定为 dialog 渲染器 || classname | `string` | | 外层 dom 的类名 || linestyle | `string` | `\"dashed\"` | 分割线的样式,支持`dashed`和`solid` |", - "path": "/docs/components/divider" - }, - { - "title": "Drawer 抽屉", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || -------------- | --------------------------------- | ------------------ | ----------------------------------------------------------------------------------------- || type | `string` | | `\"drawer\"` 指定为 drawer 渲染器 || title | | | 弹出层标题 || body | | | 往 drawer 内容区加内容 || size | `string` | | 指定 drawer 大小,支持: `xs`、`sm`、`md`、`lg` || bodyclassname | `string` | `modal-body` | drawer body 区域的样式类名 || closeonesc | `boolean` | `false` | 是否支持按 `esc` 关闭 drawer || closeonoutside | `boolean` | `false` | 点击内容区外是否关闭 drawer || overlay | `boolean` | `true` | 是否显示蒙层 || resizable | `boolean` | `false` | 是否可通过拖拽改变 drawer 大小 || actions | array<> | 【确认】和【取消】 | 可以不设置,默认只有两个按钮。 || data | `object` | | 支持 ,如果不设定将默认将触发按钮的上下文中继承数据。 |", - "path": "/docs/components/drawer" - }, - { - "title": "DropDownButton", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------------- | ----------------- | ----------------------------------------- || type | `string` | `dropdown-button` | 类型 || label | `string` | | 按钮文本 || classname | `string` | | 外层 css 类名 || block | `boolean` | | 块状样式 || size | `string` | | 尺寸,支持`'xs'`、`'sm'`、`'md'` 、`'lg'` || align | `string` | | 位置,可选`'left'`或`'right'` || buttons | `array` | | 配置下拉按钮 || careticon | `string` | | careticon || icononly | `boolean` | | 只显示icon || defaultisopened | `boolean` | | 默认是否打开 || closeonoutside | `boolean` | | 点击外侧区域是否收起 |", - "path": "/docs/components/dropdown-button" - }, - { - "title": "Each 循环渲染器", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------ | -------- | -------- | ----------------------------------------------------------- || type | `string` | `\"each\"` | 指定为 each 组件 || value | `array` | `[]` | 用于循环的值 || name | `string` | | 获取数据域中变量,支持 || items | `object` | | 使用`value`中的数据,循环输出渲染器。 |", - "path": "/docs/components/each" - }, - { - "title": "Array 数组输入框", - "body": " 的一个 flat 用法。## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------- | --------------------------------- | --------- | ------------------------------------------------------------------------ || type | `string` | `\"array\"` | 指明为`array`组件 || items | `string`或 | | 配置单项表单类型 || addable | `boolean` | | 是否可新增。 || removable | `boolean` | | 是否可删除 || draggable | `boolean` | `false` | 是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段 || draggabletip | `string` | | 可拖拽的提示文字,默认为:`\"可通过拖动每行中的【交换】按钮进行顺序调整\"` || addbuttontext | `string` | `\"新增\"` | 新增按钮文字 || minlength | `number` | | 限制最小长度 || maxlength | `number` | | 限制最大长度 |", - "path": "/docs/components/form/array" - }, - { - "title": "Button-Group 按钮集合", - "body": "## 基本用法可以用作按钮组,进行按钮的合并展示。更多属性查看 。## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || multiple | `boolean` | `false` | || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || autofill | `object` | | |", - "path": "/docs/components/form/button-group" - }, - { - "title": "Button-Toolbar 按钮工具栏", - "body": "默认按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以使用 `button-toolbar` 组件## 基本使用## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------- | --------------------------- | ------------------ | ------------------------- || type | `string` | `\"button-toolbar\"` | 指定为 buttontoolbar 组件 || buttons | array<> | | 按钮组 |", - "path": "/docs/components/form/button-toolbar" - }, - { - "title": "Button 按钮", - "body": "`form`中除了支持 以外,还支持一些特定的按钮。## 基本用法## 属性表见 ", - "path": "/docs/components/form/button" - }, - { - "title": "Chain-Select 链式下拉框", - "body": "## 基本用法无限级别下拉,只支持单选,且必须和 `source` 搭配,通过 api 拉取数据,只要 api 有返回结果,就能一直无限级别下拉下去。> `source`接口中配置的参数`waitseconds=1`和`maxlevel=4`是测试接口所需参数,实际使用自己接口时不需要添加这两个参数## 暴露参数为了帮助后端接口获取当前选择器状态,chained-select 会默认给 source 接口的数据域中,添加若干个参数:- `value`: 选中的表单项值;- `level`: 当前拉取数据时的层级,- `parentid`: 上一级选项的值,数据格式基于配置的`joinvalues`和`extractvalue`属性- `parent`: 上一级选项的完整的数据格式## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || autocomplete | `string`或 || delimiter | `string` | `,` | || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | |", - "path": "/docs/components/form/chain-select" - }, - { - "title": "Checkbox 勾选框", - "body": "## 基本用法勾选上例中的勾选框,观察数据域变化,会发现勾选后值为`1`,而取消勾选后为`0`## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 ## 二级标题 || ---------- | -------- | --------- | ----------------------------------------------------------- || option | `string` | | 选项说明 || truevalue | `any` | `true` | 标识真值 || falsevalue | `any` | `\"false\"` | 标识假值 |", - "path": "/docs/components/form/checkbox" - }, - { - "title": "Checkboxes 复选框", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || delimeter | `string` | `false` | || labelfield | `string` | `\"label\"` | || valuefield | `string` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || columnscount | `number` | `1` | 选项按几列显示,默认为一列 || checkall | `boolean` | `false` | 是否支持全选 || defaultcheckall | `boolean` | `false` | 默认是否全选 || creatable | `boolean` | `false` | || createbtnlabel | `string` | `\"新增选项\"` | || addcontrols | array< || addapi | || editable | `boolean` | `false` | || editcontrols | array< || editapi | || removable | `boolean` | `false` | || deleteapi | |", - "path": "/docs/components/form/checkboxes" - }, - { - "title": "City 城市选择器", - "body": "城市选择器,可用于让用户输入城市。## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------- | --------- | ------ | --------------------------------------------------------------------------------------------------------------------- || allowcity | `boolean` | `true` | 允许选择城市 || allowdistrict | `boolean` | `true` | 允许选择区域 || extractvalue | `boolean` | `true` | 默认 `true` 是否抽取值,如果设置成 `false` 值格式会变成对象,包含 `code`、`province`、`city` 和 `district` 文字信息。 |", - "path": "/docs/components/form/city" - }, - { - "title": "Color 颜色选择器", - "body": "## 基本用法## 选择器预设颜色值颜色选择器底部预设有会写可选的颜色值,默认为:`['#d0021b', '#f5a623', '#f8e71c', '#8b572a', '#7ed321', '#417505', '#bd10e0', '#9013fe', '#4a90e2', '#50e3c2', '#b8e986', '#000000', '#4a4a4a', '#9b9b9b', '#ffffff']`你可以配置`presetcolors`数组进行自定义。## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- || format | `string` | `hex` | 请选择 `hex`、`hls`、`rgb`或者`rgba`。 || presetcolors | `array` | | 选择器底部的默认颜色,数组内为空则不显示默认颜色 || allowcustomcolor | `boolean` | `true` | 为`false`时只能选择颜色,使用 `presetcolors` 设定颜色选择范围 || clearable | `boolean` | `\"label\"` | 是否显示清除按钮 || resetvalue | `string` | `\"\"` | 清除后,表单项值调整成该值 |", - "path": "/docs/components/form/color" - }, - { - "title": "Combo 组合", - "body": "组合模式,支持自由组合多个表单项。当设置成单选时数据格式为对象,当设置成多选时数据格式为数组,数组成员是对象(flat 模式可以直接是某个表单单项的数值)。## 基本使用配置`controls`属性,组合多个表单项## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------------------- | --------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- || formclassname | `string` | | 单组表单项的类名 || controls | array<> | | 组合展示的表单项 || controls[x].columnclassname | `string` | | 列的类名,可以用它配置列宽度。默认平均分配。 || controls[x].unique | `boolean` | | 设置当前列值是否唯一,即不允许重复选择。 || multiple | `boolean` | `false` | 是否多选 || multiline | `boolean` | `false` | 默认是横着展示一排,设置以后竖着展示 || minlength | `number` | | 最少添加的条数 || maxlength | `number` | | 最多添加的条数 || flat | `boolean` | `false` | 是否将结果扁平化(去掉 name),只有当 controls 的 length 为 1 且 multiple 为 true 的时候才有效。 || joinvalues | `boolean` | `true` | 默认为 `true` 当扁平化开启的时候,是否用分隔符的形式发送给后端,否则采用 array 的方式。 || delimeter | `string` | `false` | 当扁平化开启并且 joinvalues 为 true 时,用什么分隔符。 || addable | `boolean` | `false` | 是否可新增 || removable | `boolean` | `false` | 是否可删除 || deleteapi | | | 如果配置了,则删除前会发送一个 api,请求成功才完成删除 || deleteconfirmtext | `string` | `\"确认要删除?\"` | 当配置 `deleteapi` 才生效!删除时用来做用户确认 || draggable | `boolean` | `false` | 是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段 || draggabletip | `string` | `\"可通过拖动每行中的【交换】按钮进行顺序调整\"` | 可拖拽的提示文字 || addbuttontext | `string` | `\"新增\"` | 新增按钮文字 || scaffold | `object` | `{}` | 单组表单项初始值 || canaccesssuperdata | `boolean` | `false` | 指定是否可以自动获取上层的数据并映射到表单项上 || conditions | `object` | | 数组的形式包含所有条件的渲染类型,单个数组内的`test` 为判断条件,数组内的`controls`为符合该条件后渲染的`schema` || typeswitchable | `boolean` | `false` | 是否可切换条件,配合`conditions`使用 || noborder | `boolean` | `false` | 单组表单项是否显示边框 || strictmode | `boolean` | `true` | 默认为严格模式,设置为 false 时,当其他表单项更新是,里面的表单项也可以及时获取,否则不会。 || syncfields | `array` | `true` | 配置同步字段。只有 strictmode 为 false 时有效。如果 combo 层级比较深,底层的获取外层的数据可能不同步。但是给 combo 配置这个属性就能同步下来。输入格式:`[\"os\"]` |", - "path": "/docs/components/form/combo" - }, - { - "title": "Date-Range 日期范围", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------- | ------------------ | ---------------------------------------------------------------------------- || format | `string` | `x` | || inputformat | `string` | `yyyy-dd-mm` | || placeholder | `string` | `\"请选择日期范围\"` | 占位文本 || shortcuts | `string` | | || mindate | `string` | | 限制最小日期,用法同 || maxdate | `string` | | 限制最大日期,用法同 || utc | `boolean` | `false` | || clearable | `boolean` | `true` | 是否可清除 |", - "path": "/docs/components/form/date-range" - }, - { - "title": "Date 日期", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------- | -------------- | ----------------------------------------------------------------------------------- || value | `string` | | || format | `string` | `x` | 日期选择器值格式,更多格式类型请参考 || inputformat | `string` | `yyyy-dd-mm` | 日期选择器显示格式,即时间戳格式,更多格式类型请参考 || closeonselect | `boolean` | `false` | 点选日期后,是否马上关闭选择框 || placeholder | `string` | `\"请选择日期\"` | 占位文本 || shortcuts | `string` | | 日期快捷键 || mindate | `string` | | 限制最小日期 || maxdate | `string` | | 限制最大日期 || utc | `boolean` | `false` | 保存utc值 || clearable | `boolean` | `true` | 是否可清除 || timeconstrainst | `object` | `true` | 请参考: |", - "path": "/docs/components/form/date" - }, - { - "title": "Datetime-Range 日期时间范围", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ----------- | --------- | ------------------ | ------------------------------------------------------------------------------------ || format | `string` | `x` | || inputformat | `string` | `yyyy-dd-mm` | || placeholder | `string` | `\"请选择日期范围\"` | 占位文本 || shortcuts | `string` | | || mindate | `string` | | 限制最小日期时间,用法同 || maxdate | `string` | | 限制最大日期时间,用法同 || utc | `boolean` | `false` | || clearable | `boolean` | `true` | 是否可清除 |", - "path": "/docs/components/form/datetime-range" - }, - { - "title": "Datetime 日期时间", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------- | ---------------------- | --------------------------------------------------------------------------------------- || value | `string` | | || format | `string` | `x` | 日期时间选择器值格式,更多格式类型请参考 || inputformat | `string` | `yyyy-mm-dd hh:mm:ss` | 日期时间选择器显示格式,即时间戳格式,更多格式类型请参考 || placeholder | `string` | `\"请选择日期以及时间\"` | 占位文本 || shortcuts | `string` | | 日期时间快捷键 || mindate | `string` | | 限制最小日期时间 || maxdate | `string` | | 限制最大日期时间 || utc | `boolean` | `false` | 保存 utc 值 || clearable | `boolean` | `true` | 是否可清除 || timeconstrainst | `object` | `true` | 请参考: |", - "path": "/docs/components/form/datetime" - }, - { - "title": "DiffEditor 对比编辑器", - "body": "## 基本使用## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------- | ------------- | ------------ | ------------------------------------------------------------------------------------------- || language | `string` | `javascript` | 编辑器高亮的语言,可选 || diffvalue | | | 左侧值 |", - "path": "/docs/components/form/diff-editor" - }, - { - "title": "Editor 编辑器", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || -------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ || language | `string` | `javascript` | 编辑器高亮的语言 || size | `string` | `md` | 编辑器高度,取值可以是 `md`、`lg`、`xl`、`xxl` || options | `object` | | monaco 编辑器的其它配置,比如是否显示行号等,请参考。 |", - "path": "/docs/components/form/editor" - }, - { - "title": "FieldSet 表单项集合", - "body": "fieldset 是用于分组展示表单项的一种容器型组件。## 基本用法可以通过配置标题`title`和表单项数组`controls`,实现多个表单项分组展示## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ------------------------------------ | ------- | ------------------------------------------ || classname | `string` | | css 类名 || headingclassname | `string` | | 标题 css 类名 || bodyclassname | `string` | | 内容区域 css 类名 || title | | | 标题 || controls | array<> | | 表单项集合 || mode | `string` | | 展示默认,同 中的模式 || collapsable | `boolean` | `false` | 配置是否可折叠 || collapsed | `booelan` | | 展示默认,同 中的模式 |", - "path": "/docs/components/form/fieldset" - }, - { - "title": "File 文件上传", - "body": "## 基本用法用来负责文件上传,文件上传成功后会返回文件地址,这个文件地址会作为这个表单项的值,整个表单提交的时候,其实提交的是文件地址,文件上传已经在这个控件中完成了。上例中,选择任意文件,然后观察数据域变化;点击提交,amis 自动会调整接口数据格式为`formdata`## 分块上传如果文件过大,则可能需要使用分块上传## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ || reciever | | | 上传文件接口 || accept | `string` | `text/plain` | 默认只支持纯文本,要支持其他类型,请配置此属性为文件后缀`.xxx` || asbase64 | `boolean` | `false` | 将文件以`base64`的形式,赋值给当前组件 || asblob | `boolean` | `false` | 将文件以二进制的形式,赋值给当前组件 || maxsize | `string` | | 默认没有限制,当设置后,文件大小大于此值将不允许上传。单位为`kb` || maxlength | `number` | | 默认没有限制,当设置后,一次只允许上传指定数量文件。 || multiple | `boolean` | `false` | 是否多选。 || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || delimeter | `string` | `,` | || autoupload | `boolean` | `true` | 否选择完就自动开始上传 || hideuploadbutton | `boolean` | `false` | 隐藏上传按钮 || statetextmap | object | `{ init: '', pending: '等待上传', uploading: '上传中', error: '上传出错', uploaded: '已上传', ready: '' }` | 上传状态文案 || filefield | `string` | `file` | 如果你不想自己存储,则可以忽略此属性。 || downloadurl | `boolean`或`string` | `\"\"` | 默认显示文件路径的时候会支持直接下载,可以支持加前缀如:`http://xx.dom/filename=` ,如果不希望这样,可以把当前配置项设置为 `false`。 || usechunk | `boolean`或`\"auto\"` | `\"auto\"` | amis 所在服务器,限制了文件上传大小不得超出 10m,所以 amis 在用户选择大文件的时候,自动会改成分块上传模式。 || chunksize | `number` | `5 * 1024 * 1024` | 分块大小 || startchunkapi | | | startchunkapi || chunkapi | | | chunkapi || finishchunkapi | | | finishchunkapi |", - "path": "/docs/components/form/file" - }, - { - "title": "FormItem 普通表单项", - "body": "**表单项** 是组成一个表单的基本单位,它具有的一些特性会帮助我们更好地实现表单操作。> 所有派生自`formitem`的组件,都具有`formitem`的特性。## 基本用法最基本的表单项配置像这样:## 属性表| 属性名 | 类型 | 默认值 | 说明 || -------------- | ------------------------------------------ | ------ | ---------------------------------------------------------- || type | `string` | | 指定表单项类型 || classname | `string` | | 表单最外层类名 || inputclassname | `string` | | 表单控制器类名 || labelclassname | `string` | | label 的类名 || name | `string` | | 字段名,指定该表单项提交时的 key || label | 或 `false` | | 表单项标签 || labelremark | | | 表单项标签描述 || description | | | 表单项描述 || placeholder | `string` | | 表单项描述 || inline | `boolean` | | 是否为 内联 模式 || submitonchange | `boolean` | | 是否该表单项值发生变化时就提交当前表单。 || disabled | `boolean` | | 当前表单项是否是禁用状态 || disabledon | | | 当前表单项是否禁用的条件 || visible | | | 当前表单项是否禁用的条件 || visibleon | | | 当前表单项是否禁用的条件 || required | `boolean` | | 是否为必填。 || requiredon | 来配置当前表单项是否为必填。 || validations | | | 表单项值格式验证,支持设置多个,多个规则用英文逗号隔开。 |", - "path": "/docs/components/form/formitem" - }, - { - "title": "Formula 公式", - "body": "可以设置公式,将公式结果设置到指定表单项上。> 该表单项是隐藏的## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | ----------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- || name | `string` | | 需要应用的表单项`name`值,公式结果将作用到此处指定的变量中去。 || formula | | | 应用的公式 || condition | | | 公式作用条件 || initset | `boolean` | `true` | 初始化时是否设置 || autoset | `boolean` | `true` | 观察公式结果,如果计算结果有变化,则自动应用到变量上 || id | `boolean` | `true` | 定义个名字,当某个按钮的目标指定为此值后,会触发一次公式应用。这个机制可以在 `autoset` 为 false 时用来手动触发 |", - "path": "/docs/components/form/formula" - }, - { - "title": "Grid 网格", - "body": "支持 form 内部再用 grid 布局进行渲染组件。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || -------------------------- | --------------------------------- | -------- | -------------------------------------------------------------- || type | `string` | `\"grid\"` | 指定为 grid 渲染器 || classname | `string` | | 外层 dom 的类名 || columns | `array` | | 列集合 || columns | | 成员可以是其他渲染器 || columns> | | 如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合 || columns[x].columnclassname | `int` | | 配置列的 `classname` || columns[x].xs | `int` | | 宽度占比: 1 - 12 || columns[x].xshidden | `boolean` | | 是否隐藏 || columns[x].xsoffset | `int` | | 偏移量 1 - 12 || columns[x].xspull | `int` | | 靠左的距离占比:1 - 12 || columns[x].xspush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].sm | `int` | | 宽度占比: 1 - 12 || columns[x].smhidden | `boolean` | | 是否隐藏 || columns[x].smoffset | `int` | | 偏移量 1 - 12 || columns[x].smpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].smpush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].md | `int` | | 宽度占比: 1 - 12 || columns[x].mdhidden | `boolean` | | 是否隐藏 || columns[x].mdoffset | `int` | | 偏移量 1 - 12 || columns[x].mdpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].mdpush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].lg | `int` | | 宽度占比: 1 - 12 || columns[x].lghidden | `boolean` | | 是否隐藏 || columns[x].lgoffset | `int` | | 偏移量 1 - 12 || columns[x].lgpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].lgpush | `int` | | 靠右的距离占比: 1 - 12 |更多使用说明,请参看 ", - "path": "/docs/components/form/grid" - }, - { - "title": "Group 表单项组", - "body": "表单项,默认都是一行显示一个,group 组件用于在一行展示多个表单项## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | --------------------------- | -------------- | -------------------------------------------------------------------------- || classname | `string` | | css 类名 || label | `string` | | group 的标签 || controls | array<> | | 表单项集合 || mode | `string` | | 展示默认,同 中的模式 || gap | `string` | | 表单项之间的间距,可选:`xs`、`sm`、`normal` || direction | `string` | `\"horizontal\"` | 可以配置水平展示还是垂直展示。对应的配置项分别是:`vertical`、`horizontal` |", - "path": "/docs/components/form/group" - }, - { - "title": "HBox", - "body": "表单内部也可以使用 hbox 布局,实现左右排列。更推荐 ## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------- | ------------------------ | ------ | ---------------------------------------- || columns | array<> | | 列内容。每个 column 为一个独立的渲染器。 |### column 属性除了 支持属性以外,还支持以下几种属性| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------------------------- | ------ | ---------------------------------------------------------------------------- || columnclassname | `string` | | 配置列的 css 类名 || controls | array<> | | 表单项数组,如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合。 |", - "path": "/docs/components/form/hbox" - }, - { - "title": "Hidden 隐藏字段", - "body": "## 基本用法默认表单提交,在没有 的情况下,只会发送 `controls` 里面的这些成员,对于隐藏的字段同时又希望提交表单的时候带过去,可以使用 `hidden` 组件", - "path": "/docs/components/form/hidden" - }, - { - "title": "Image 图片", - "body": "图片格式输入,默认 amis 会直接存储在 fex 的 hiphoto 里面,提交到 form 是直接的图片 url。## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------- || reciever | | | 上传文件接口 || accept | `string` | `text/plain` | 默认只支持`image/jpeg, image/jpg, image/png, image/gif`,要支持其他类型,请配置此属性为图片后缀`.xxx` || maxsize | `string` | | 默认没有限制,当设置后,文件大小大于此值将不允许上传。单位为`kb` || maxlength | `number` | | 默认没有限制,当设置后,一次只允许上传指定数量文件。 || multiple | `boolean` | `false` | 是否多选。 || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || delimeter | `string` | `,` | || autoupload | `boolean` | `true` | 否选择完就自动开始上传 || hideuploadbutton | `boolean` | `false` | 隐藏上传按钮 || filefield | `string` | `file` | 如果你不想自己存储,则可以忽略此属性。 || crop | `boolean`或`{\"aspectratio\":\"\"}` | | 用来设置是否支持裁剪。 || crop.aspectratio | `number` | | 裁剪比例。浮点型,默认 `1` 即 `1:1`,如果要设置 `16:9` 请设置 `1.7777777777777777` 即 `16 / 9`。。 || limit | limit | | 限制图片大小,超出不让上传。 |### limit 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- || width | `number` | | 限制图片宽度。 || height | `number` | | 限制图片高度。 || minwidth | `number` | | 限制图片最小宽度。 || minheight | `number` | | 限制图片最小高度。 || maxwidth | `number` | | 限制图片最大宽度。 || maxheight | `number` | | 限制图片最大高度。 || aspectratio | `number` | | 限制图片宽高比,格式为浮点型数字,默认 `1` 即 `1:1`,如果要设置 `16:9` 请设置 `1.7777777777777777` 即 `16 / 9`。 如果不想限制比率,请设置空字符串。 |", - "path": "/docs/components/form/image" - }, - { - "title": "Form 表单", - "body": "表单是 amis 中核心组件之一,主要作用是提交或者展示表单数据。## 基本用法最基本的用法是配置 和 提交接口`api`。如下我们配置姓名和邮箱表单项,并可以填写数据并提交给接口`/api/mock2/form/saveform`。第一个表单在提交时,会将它的表单数据域数据发送给`detailform`表单,触发`detailform`的初始化接口联动,重新请求接口更新数据域,并更新关键字表单项。上面示例组合使用了 ## 持久化保存表单项数据表单默认在重置之后(切换页面、弹框中表单关闭表单),会自动清空掉表单中的所有数据,如果你想持久化保留当前表单项的数据而不清空它,那么配置`persistdata:true`如果想提交成功后,清空该缓存,则配置`\"clearpersistdataaftersubmit\": true`## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------------------- | --------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ || type | `string` | | `\"form\"` 指定为 form 渲染器 || name | `string` | | 设置一个名字后,方便其他组件与其通信 || mode | `string` | `normal` | 表单展示方式,可以是:`normal`、`horizontal` 或者 `inline` || horizontal | `object` | `{\"left\":\"col-sm-2\", \"right\":\"col-sm-10\", \"offset\":\"col-sm-offset-2\"}` | 当 mode 为 `horizontal` 时有用,用来控制 label || title | `string` | `\"表单\"` | form 的标题 || submittext | `string` | `\"提交\"` | 默认的提交按钮名称,如果设置成空,则可以把默认按钮去掉。 || classname | `string` | | 外层 dom 的类名 || controls | array<> | | form 表单项集合 || actions | array<> | | form 提交按钮,成员为 action || messages | `object` | | 消息提示覆写,默认消息读取的是 api 返回的消息,但是在此可以覆写它。 || messages.fetchsuccess | `string` | | 获取成功时提示 || messages.fetchfailed | `string` | | 获取失败时提示 || messages.savesuccess | `string` | | 保存成功时提示 || messages.savefailed | `string` | | 保存失败时提示 || wrapwithpanel | `boolean` | `true` | 是否让 form 用 panel 包起来,设置为 false 后,actions 将无效。 || panelclassname | `boolean` | `true` | 是否让 form 用 panel 包起来,设置为 false 后,actions 将无效。 || api | | | form 用来保存数据的 api。 || initapi | | | form 用来获取初始数据的 api。 || interval | `number` | `3000` | 刷新时间(最低 3000) || silentpolling | `boolean` | `false` | 配置刷新时是否显示加载动画 || stopautorefreshwhen | `string` | `\"\"` | 通过 来配置停止刷新的条件 || initasyncapi | | | form 用来获取初始数据的 api,与 initapi 不同的是,会一直轮训请求该接口,直到返回 finished 属性为 true 才 结束。 || initfetch | `boolean` | `true` | 设置了 initapi 或者 initasyncapi 后,默认会开始就发请求,设置为 false 后就不会起始就请求接口 || initfetchon | `string` | | 用表达式来配置 || initfinishedfield | `string` | `finished` | 设置了 initasyncapi 后,默认会从返回数据的 data.finished 来判断是否完成,也可以设置成其他的 xxx,就会从 data.xxx 中获取 || initcheckinterval | `number` | `3000` | 设置了 initasyncapi 以后,默认拉取的时间间隔 || asyncapi | | | 设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 `finished` 属性为 `true` 才 结束。 || checkinterval | `number` | 3000 | 轮训请求的时间间隔,默认为 3 秒。设置 `asyncapi` 才有效 || finishedfield | `string` | `\"finished\"` | 如果决定结束的字段名不是 `finished` 请设置此属性,比如 `is_success` || submitonchange | `boolean` | `false` | 表单修改即提交 || submitoninit | `boolean` | `false` | 初始就提交一次 || resetaftersubmit | `boolean` | `false` | 提交后是否重置表单 || primaryfield | `string` | `\"id\"` | 设置主键 id, 当设置后,检测表单是否完成时(asyncapi),只会携带此数据。 || target | `string` | | 默认表单提交自己会通过发送 api 保存数据,但是也可以设定另外一个 form 的 name 值,或者另外一个 `crud` 模型的 name 值。 如果 target 目标是一个 `form` ,则目标 `form` 会重新触发 `initapi`,api 可以拿到当前 form 数据。如果目标是一个 `crud` 模型,则目标模型会重新触发搜索,参数为当前 form 数据。当目标是 `window` 时,会把当前表单的数据附带到页面地址上。 || redirect | `string` | | 设置此属性后,form 保存成功后,自动跳转到指定页面。支持相对地址,和绝对地址(相对于组内的)。 || reload | `string` | | 操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 `window` 则让当前页面整体刷新。 || autofocus | `boolean` | `false` | 是否自动聚焦。 || canaccesssuperdata | `boolean` | `true` | 指定是否可以自动获取上层的数据并映射到表单项上 || persistdata | `boolean` | `true` | 指定表单是否开启本地缓存 || clearpersistdataaftersubmit | `boolean` | `true` | 指定表单提交成功后是否清除本地缓存 || trimvalues | `boolean` | `false` | trim 当前表单项的每一个值 |", - "path": "/docs/components/form/index" - }, - { - "title": "Input-Group 输入框组合", - "body": "**输入框组合选择器** 可用于输入框与其他组件进行组合。## 基本用法## 校验input-group 配置校验方法较为特殊,需要配置下面步骤:1. input-group 上配置任意`name`值2. input-group 的 controls 内配置的表单项上配置校验规则## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | --------------------------- | ------ | ---------- || classname | `string` | | css 类名 || controls | array<> | | 表单项集合 |", - "path": "/docs/components/form/input-group" - }, - { - "title": "List 列表", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || multiple | `boolean` | `false` | || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || autofill | `object` | | |", - "path": "/docs/components/form/list" - }, - { - "title": "Matrix 矩阵", - "body": "矩阵类型的输入框。## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ---------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- || columns | `array` | | 列信息,数组中 `label` 字段是必须给出的 || rows | `array` | | 行信息, 数组中 `label` 字段是必须给出的 || rowlabel | `string` | | 行标题说明 || source | | | api 地址,如果选项组不固定,可以通过配置 `source` 动态拉取。 || multiple | `boolean` | `true` | 是否多选 || singleselectmode | `string` | `\"column\"` | 设置单选模式,`multiple`为`false`时有效,可设置为`cell`, `row`, `column` 分别为全部选项中只能单选某个单元格、每行只能单选某个单元格,每列只能单选某个单元格 |", - "path": "/docs/components/form/matrix" - }, - { - "title": "NestedSelect 级联选择器", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------------------------- | -------------------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || delimeter | `boolean` | `false` | || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || autofill | `object` | | || cascade | `boolean` | `false` | 设置 `true`时,当选中父节点时不自动选择子节点。 || withchildren | `boolean` | `false` | 设置 `true`时,选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。 || searchprompttext | `string` | `\"输入内容进行检索\"` | 搜索框占位文本 |", - "path": "/docs/components/form/nestedselect" - }, - { - "title": "Number 数字输入框", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------- | ------------------------------- | ------ | -------------------- || min | | | 最小值 || max | | | 最大值 || step | `number` | | 步长 || precision | `number` | | 精度,即小数点后几位 |", - "path": "/docs/components/form/number" - }, - { - "title": "Options 选择器表单项", - "body": "**选择器表单项** 是指那些(例如下拉选择框)具有选择器特性的表单项它派生自 ,拥有表单项所有的特性。## 选项组格式选择器表单项可以通过配置一组选项(`options`),可以供给用户选择,如下:上例中我们配置了`\"autofill\": {\"option\": \"${label}\"}`,表示将选中项中的`label`的值,自动填充到当前表单项中`name`为`option`的文本框中。支持该配置项的有:buttongroup、list、nestedselect、picker、radios、select。## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | ----------------------------------------------------------------- | --------- | ---------------------------------------------------------------------- || options | `array`或`array` | | 选项组,供用户选择 || source | | | 选项组源,可通过数据映射获取当前数据域变量、或者配置 api 对象 || multiple | `boolean` | `false` | 是否支持多选 || labelfield | `boolean` | `\"label\"` | 标识选项中哪个字段是`label`值 || valuefield | `boolean` | `\"value\"` | 标识选项中哪个字段是`value`值 || joinvalues | `boolean` | `true` | 是否拼接`value`值 || extractvalue | `boolean` | `false` | 是否将`value`值抽取出来组成新的数组,只有在`joinvalues`是`false`是生效 |", - "path": "/docs/components/form/options" - }, - { - "title": "Panel 面板", - "body": "还是为了布局,可以把一部分 合并到一个 panel 里面单独展示。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | ------------------------------------ | ------ | ------------------------------------------------------------------- || title | `string` | | panel 标题 || body | | | 内容区 || bodyclassname | `string` | | body 的 classname || footer | | | 底部区 || footerclassname | `string` | | footer 的 classname || controls | array<表单项> | | `controls` 跟 `body` 二选一,如果设置了 controls 优先显示表单集合。 |- `title` panel 标题- `body` 可以是其他渲染模型。- `bodyclassname` body 的 classname.- `footer` 可以是其他渲染模型。- `footerclassname` footer 的 classname.- `controls` 跟 `body` 二选一,如果设置了 controls 优先显示表单集合。", - "path": "/docs/components/form/panel" - }, - { - "title": "Picker 列表选择器", - "body": "列表选取。可以静态数据,或者通过接口拉取动态数据。## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || multiple | `boolean` | | 是否为多选。 || delimeter | `boolean` | `false` | || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || autofill | `object` | | || modalmode | `string` | `\"dialog\"` | 设置 `dialog` 或者 `drawer`,用来配置弹出方式。 || pickerschema | `string` | `{mode: 'list', listitem: {title: '${label}'}}` | 即用 list 类型的渲染,来展示列表信息。更多配置参考 || embed | `boolean` | `false` | 是否使用内嵌模式 |", - "path": "/docs/components/form/picker" - }, - { - "title": "Radios 单选框", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || labelfield | `boolean` | `\"label\"` | || valuefield | `boolean` | `\"value\"` | || columnscount | `number` | `1` | 选项按几列显示,默认为一列 || autofill | `object` | | |", - "path": "/docs/components/form/Radios" - }, - { - "title": "Range 滑块", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------- || classname | `string` | | css 类名 || min | `number` | | 最小值 || max | `number` | | 最大值 || step | `number` | | 步长 || multiple | `boolean` | `false` | 支持选择范围 || joinvaluse | `boolean` | `true` | 默认为 `true`,选择的 `value` 会通过 `delimiter` 连接起来,否则直接将以`{min: 1, max: 100}`的形式提交,开启`multiple`时有效 || delimiter | `string` | `,` | 分隔符 || unit | `string` | | 单位 || clearable | `boolean` | | 是否可清除 || showinput | `string` | | 是否显示输入框 |", - "path": "/docs/components/form/range" - }, - { - "title": "Rating 评分", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || -------- | --------- | ------- | ------------------ || half | `boolean` | `false` | 是否使用半星选择 || count | `number` | `5` | 共有多少星可供选择 || readonly | `boolean` | `false` | 只读 |", - "path": "/docs/components/form/rating" - }, - { - "title": "Repeat 重复频率选择器", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ----------------------------- | ------------------------------------------------------------------------ || options | `string` | `hourly,daily,weekly,monthly` | 可用配置 `secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly` || placeholder | `string` | `不重复` | 当不指定值时的说明。 |", - "path": "/docs/components/form/repeat" - }, - { - "title": "Rich-Text 富文本编辑器", - "body": "## 基本用法## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ || saveasubb | `boolean` | | 是否保存为 ubb 格式 || reciever | | | 默认的图片保存 api || size | `string` | | 框的大小,可设置为 `md` 或者 `lg` || options | `object` | | object 类型,给富文本的配置信息。请参考 https://www.froala.com/wysiwyg-editor/docs/options || buttons | `array` | `[ 'paragraphformat', 'quote', 'color', ' | ', 'bold', 'italic', 'underline', 'strikethrough', ' | ', 'formatol', 'formatul', 'align', ' | ', 'insertlink', 'insertimage', 'inserttable', ' | ', 'undo', 'redo', 'html' ]` | 精度,即小数点后几位 |", - "path": "/docs/components/form/rich-text" - }, - { - "title": "Select 选择器", - "body": "## 基本用法更多设置项请参考 ## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | ----------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | || autocomplete | || delimeter | `string` | `false` | || labelfield | `string` | `\"label\"` | || valuefield | `string` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || checkall | `boolean` | `false` | 是否支持全选 || checkalllabel | `string` | `全选` | 全选的文字 || defaultcheckall | `boolean` | `false` | 默认是否全选 || creatable | `boolean` | `false` | || multiple | `boolean` | `false` | || searchable | `boolean` | `false` | || createbtnlabel | `string` | `\"新增选项\"` | || addcontrols | array< || addapi | || editable | `boolean` | `false` | || editcontrols | array< || editapi | || removable | `boolean` | `false` | || deleteapi | || autofill | `object` | | |", - "path": "/docs/components/form/select" - }, - { - "title": "Service 功能容器", - "body": "## 基本用法schemaapi` 同样支持 ", - "path": "/docs/components/form/service" - }, - { - "title": "Static 静态展示", - "body": "用来在表单中,展示静态数据## 基本用法想要调整展示组件的配置,请查阅相应组件的文档。", - "path": "/docs/components/form/static" - }, - { - "title": "SubForm 子表单", - "body": "## 基本用法## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------------- | --------------------- | --------------------------- | ------------------------------------------------------ || multiple | `boolean` | `false` | 是否为多选模式 || labelfield | `string` | | 当值中存在这个字段,则按钮名称将使用此字段的值来展示。 || btnlabel | `string` | `\"设置\"` | 按钮默认名称 || minlength | `number` | `0` | 限制最小长度。 || maxlength | `number` | `0` | 限制最大长度。 || addbuttonclassname | `string` | `btn-success btn-sm` | 新增按钮 css 类名 || editbuttonclassname | `string` | `btn-info btn-addon btn-sm` | 修改按钮 css 类名 || form | |", - "path": "/docs/components/form/subform" - }, - { - "title": "Switch 开关", - "body": "## 基本用法调整开关,观察数据域变化,会发现打开后值为`1`,而关闭后为`0`## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------- | -------- | --------- | -------- || option | `string` | | 选项说明 || truevalue | `any` | `true` | 标识真值 || falsevalue | `any` | `\"false\"` | 标识假值 |", - "path": "/docs/components/form/switch" - }, - { - "title": "Table 表格", - "body": "## 基本用法可以用来展示数组类型的数据。配置`columns` 数组,来定义列信息。## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------------------- | ----------------------- | ---------------- | ---------------------------------------- || type | `string` | `\"table\"` | 指定为 table 渲染器 || addable | `boolean` | `false` | 是否可增加一行 || editable | `boolean` | `false` | 是否可编辑 || removable | `boolean` | `false` | 是否可删除 || showaddbtn | `boolean` | `true` | 是否显示添加按钮 || addapi | | - | 新增时提交的 api || updateapi | | - | 修改时提交的 api || deleteapi | | - | 删除时提交的 api || addbtnlabel | `string` | | 增加按钮名称 || addbtnicon | `string` | `\"fa fa-plus\"` | 增加按钮图标 || updatebtnlabel | `string` | `\"\"` | 更新按钮名称 || updatebtnicon | `string` | `\"fa fa-pencil\"` | 更新按钮图标 || deletebtnlabel | `string` | `\"\"` | 删除按钮名称 || deletebtnicon | `string` | `\"fa fa-minus\"` | 删除按钮图标 || confirmbtnlabel | `string` | `\"\"` | 确认编辑按钮名称 || confirmbtnicon | `string` | `\"fa fa-check\"` | 确认编辑按钮图标 || cancelbtnlabel | `string` | `\"\"` | 取消编辑按钮名称 || cancelbtnicon | `string` | `\"fa fa-times\"` | 取消编辑按钮图标 || columns | `array` | [] | 列信息 || columns[x].quickedit | `boolean` 或者 `object` | - | 配合 editable 为 true 一起使用 || columns[x].quickeditonupdate | `boolean` 或者 `object` | - | 可以用来区分新建模式和更新模式的编辑配置 |", - "path": "/docs/components/form/table" - }, - { - "title": "TabsTransfer 组合穿梭器", - "body": "在的基础上扩充了左边的展示形式,支持 tabs 的形式展示。对应的 options 的顶级数据,顶层 options 的成员支持 selectmode 配置这个 tab 下面的选项怎么展示。title 可以配置 tab 的标题。## 属性表更多配置请参考。", - "path": "/docs/components/form/tabs-transfer" - }, - { - "title": "Tabs 选项卡", - "body": "有多组输入框时,也可以通过选项卡来分组。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------- | ------------------------------------ | ------ | ------------------- || tabs | `array` | | tabs 内容 || toolbar | | | tabs 中的工具栏 || toolbarclassname | `string` | | tabs 中工具栏的类名 || tabs[x].title | `string` | | tab 标题 || tabs | | 内容容器 || tabs> | | 表单项集合。 |", - "path": "/docs/components/form/tabs" - }, - { - "title": "Tag 标签选择器", - "body": "## 基本使用## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | -------------------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || optionstip | `array`或`array` | `\"最近您使用的标签\"` | 选项提示 || source | `string`或 || delimeter | `string` | `false` | || labelfield | `string` | `\"label\"` | || valuefield | `string` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || clearable | `boolean` | `false` | 在有值的时候是否显示一个删除图标在右侧。 || resetvalue | `string` | `\"\"` | 删除后设置此配置项给定的值。 |", - "path": "/docs/components/form/tag" - }, - { - "title": "Text 输入框", - "body": "## 基本使用选择器模式下,支持部分选择器组件支持的配置项,具体请查看下面的属性表## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------------------------------- | --------- | ------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || autocomplete | `string`或 || multiple | `boolean` | | || delimeter | `string` | `,` | || labelfield | `string` | `\"label\"` | || valuefield | `string` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || addon | `addon` | | 输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。 || addon.type | `string` | | 请选择 `text` 、`button` 或者 `submit`。 || addon.label | `string` | | 文字说明 || addon.xxx | `string` | | 其他参数请参考按钮文档 || trimcontents | `boolean` | | 是否去除首尾空白文本。 || clearable | `boolean` | | 是否可清除 || resetvalue | `string` | `\"\"` | 清除后设置此配置项给定的值。 |", - "path": "/docs/components/form/text" - }, - { - "title": "Textarea 多行文本输入框", - "body": "## 基本使用## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------ | --------- | ------ | ---------------------- || minrows | `number` | | 最小行数 || maxrows | `number` | | 最大行数 || trimcontents | `boolean` | | 是否去除首尾空白文本。 |", - "path": "/docs/components/form/textarea" - }, - { - "title": "Time 时间", - "body": "## 基本用法上例中配置了`\"value\": \"+1hours\"`,默认就会选中一小时后。支持的相对值关键字有:- `now`: 当前时间- `hour`或`hours`: 时- `minute`或`minutes`: 分- `second`或`seconds`: 秒## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || --------------- | --------- | -------------- | ----------------------------------------------------------------------------------- || value | `string` | | || format | `string` | `x` | 时间选择器值格式,更多格式类型请参考 || inputformat | `string` | `hh:mm` | 时间选择器显示格式,即时间戳格式,更多格式类型请参考 || placeholder | `string` | `\"请选择时间\"` | 占位文本 || clearable | `boolean` | `true` | 是否可清除 || timeconstrainst | `object` | `true` | 请参考: |", - "path": "/docs/components/form/time" - }, - { - "title": "Transfer 穿梭器", - "body": "## 基本用法适用于需选择的数据/信息源较多时,用户可直观的知道自己所选择的数据/信息的场景,一般左侧框为数据/信息源,右侧为已选数据/信息,被选中信息同时存在于 2 个框内。## 属性表除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || delimeter | `string` | `false` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || searchable | `boolean` | `false` | 当设置为 `true` 时表示可以通过输入部分内容检索出选项。 || searchapi | | | 如果想通过接口检索,可以设置个 api。 || statistics | `boolean` | `true` | 是否显示统计数据 || selecttitle | `string` | `\"请选择\"` | 左侧的标题文字 || resulttitle | `string` | `\"当前选择\"` | 右侧结果的标题文字 || sortable | `boolean` | `false` | 结果可以进行拖拽排序 || selectmode | `string` | `list` | 可选:`list`、`table`、`tree`、`chained`、`associated`。分别为:列表形式、表格形式、树形选择形式、级联选择形式,关联选择形式(与级联选择的区别在于,级联是无限极,而关联只有一级,关联左边可以是个 tree)。 || searchresultmode | `string` | | 如果不设置将采用 `selectmode` 的值,可以单独配置,参考 `selectmode`,决定搜索结果的展示形式。 || columns | `array` | | 当展示形式为 `table` 可以用来配置展示哪些列,跟 table 中的 columns 配置相似,只是只有展示功能。 || leftoptions | `array` | | 当展示形式为 `associated` 时用来配置左边的选项集。 || leftmode | `string` | | 当展示形式为 `associated` 时用来配置左边的选择形式,支持 `list` 或者 `tree`。默认为 `list`。 || rightmode | `string` | | 当展示形式为 `associated` 时用来配置右边的选择形式,可选:`list`、`table`、`tree`、`chained`。 |", - "path": "/docs/components/form/transfer" - }, - { - "title": "Tree 树形选择框", - "body": "## 基本使用配置的`options`中,可以通过`children`字段进行嵌套展示,实现树形选择器## 属性表当做选择器表单项使用时,除了支持 中的配置以外,还支持下面一些配置| 属性名 | 类型 | 默认值 | 说明 || ------------- | ------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------- || options | `array`或`array` | | || source | `string`或 || autocomplete | || multiple | `boolean` | `false` | 是否多选 || delimeter | `string` | `false` | || labelfield | `string` | `\"label\"` | || valuefield | `string` | `\"value\"` | || joinvalues | `boolean` | `true` | || extractvalue | `boolean` | `false` | || creatable | `boolean` | `false` | || addcontrols | array< || addapi | || editable | `boolean` | `false` | || editcontrols | array< || editapi | || removable | `boolean` | `false` | || deleteapi | || hideroot | `boolean` | `true` | 如果想要显示个顶级节点,请设置为 `false` || rootlabel | `boolean` | `\"顶级\"` | 当 `hideroot` 不为 `false` 时有用,用来设置顶级节点的文字。 || showicon | `boolean` | `true` | 是否显示图标 || showradio | `boolean` | `false` | 是否显示单选按钮,`multiple` 为 `false` 是有效。 || initiallyopen | `boolean` | `true` | 设置是否默认展开所有层级。 || unfoldedlevel | `number` | `0` | 设置默认展开的级数,只有`initiallyopen`不是`true`时生效。 || cascade | `boolean` | `false` | 当选中父节点时不自动选择子节点。 || withchildren | `boolean` | `false` | 选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。 || onlychildren | `boolean` | `false` | 多选时,选中父节点时,是否只将其子节点加入到值中。 || rootcreatable | `boolean` | `false` | 是否可以创建顶级节点 || rootcreatetip | `string` | `\"添加一级节点\"` | 创建顶级节点的悬浮提示 || minlength | `number` | | 最少选中的节点数 || maxlength | `number` | | 最多选中的节点数 |", - "path": "/docs/components/form/tree" - }, - { - "title": "TreeSelect 树形选择器", - "body": "## 基本使用更多用法,见 ", - "path": "/docs/components/form/treeselect" - }, - { - "title": "Grid 网格布局", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------- | --------------------------------- | -------- | ----------------------- || type | `string` | `\"grid\"` | 指定为 grid 渲染器 || classname | `string` | | 外层 dom 的类名 || columns | `array` | | 列集合 || columns | | 成员可以是其他渲染器 || columns[x].xs | `int` | | 宽度占比: 1 - 12 || columns[x].xshidden | `boolean` | | 是否隐藏 || columns[x].xsoffset | `int` | | 偏移量 1 - 12 || columns[x].xspull | `int` | | 靠左的距离占比:1 - 12 || columns[x].xspush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].sm | `int` | | 宽度占比: 1 - 12 || columns[x].smhidden | `boolean` | | 是否隐藏 || columns[x].smoffset | `int` | | 偏移量 1 - 12 || columns[x].smpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].smpush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].md | `int` | | 宽度占比: 1 - 12 || columns[x].mdhidden | `boolean` | | 是否隐藏 || columns[x].mdoffset | `int` | | 偏移量 1 - 12 || columns[x].mdpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].mdpush | `int` | | 靠右的距离占比: 1 - 12 || columns[x].lg | `int` | | 宽度占比: 1 - 12 || columns[x].lghidden | `boolean` | | 是否隐藏 || columns[x].lgoffset | `int` | | 偏移量 1 - 12 || columns[x].lgpull | `int` | | 靠左的距离占比:1 - 12 || columns[x].lgpush | `int` | | 靠右的距离占比: 1 - 12 |更多使用说明,请参看 ", - "path": "/docs/components/grid" - }, - { - "title": "HBox 布局", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || -------------------------- | --------------------------------- | -------------- | -------------------- || type | `string` | `\"hbox\"` | 指定为 hbox 渲染器 || classname | `string` | | 外层 dom 的类名 || columns | `array` | | 列集合 || columns | | 成员可以是其他渲染器 || columns[x].columnclassname | `string` | `\"wrapper-xs\"` | 列上类名 |", - "path": "/docs/components/hbox" - }, - { - "title": "Html", - "body": "## 基本用法渲染一段 html> 当需要获取数据域中变量时,使用 。", - "path": "/docs/components/html" - }, - { - "title": "Icon 图标", - "body": "## 基本使用| 属性名 | 类型 | 默认值 | 说明 || --------- | -------- | ------ | ------------------------------ || type | `string` | `icon` | 指定组件类型 || classname | `string` | | 外层 css 类名 || icon | `string` | | icon 名,只支持 fontawesome v4 |", - "path": "/docs/components/icon" - }, - { - "title": "iFrame", - "body": "## 基本使用内嵌外部站点,可用 iframe 来实现。## 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ---------- | -------------------- || type | `string` | `\"iframe\"` | 指定为 iframe 渲染器 || classname | `string` | | iframe 的类名 || frameborder | `array` | | frameborder || style | `object` | | 样式 || src | `string` | | iframe地址 |", - "path": "/docs/components/iframe" - }, - { - "title": "Image 图片", - "body": "## 基本使用| 属性名 | 类型 | 默认值 | 说明 || -------------- | --------- | --------- | -------------------------------------------------------------------------------------- || type | `string` | | 如果在 table、card 和 list 中,为`\"color\"`;在 form 中用作静态展示,为`\"static-color\"` || classname | `string` | | 外层 css 类名 || imageclassname | `string` | | 图片 css 类名 || title | `string` | | 标题 || imagecaption | `string` | | 描述 || placeholder | `string` | | 占位文本 || defaultimage | `string` | | 默认显示的图片地址 || src | `string` | | 缩略图地址 || originalsrc | `string` | | 原图地址 || enlargeable | `boolean` | | 支持放大预览 || enlargetitle | `string` | | 放大预览的标题 || enlargecaption | `string` | | 放大预览的描述 || thumbmode | `string` | `contain` | 预览图模式,可选:`'w-full'`, `'h-full'`, `'contain'`, `'cover'` || thumbratio | `string` | `1:1` | 预览图比例,可选:`'1:1'`, `'4:3'`, `'16:9'` |", - "path": "/docs/components/image" - }, - { - "title": "Images 图片集", - "body": "图片集展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像`service`、`form`或`crud`这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过`source`属性,获取数据链中的数据,完成数据展示。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------ | ------------------------------------------ | --------- | ---------------------------------------------------------------------------------------- || type | `string` | `images` | 如果在 table、card 和 list 中,为`\"images\"`;在 form 中用作静态展示,为`\"static-images\"` || classname | `string` | | 外层 css 类名 || defaultimage | `string` | | 默认展示图片 || value | `string`或`array`或`array` | | 图片数组 || source | `string` | | 数据源 || delimiter | `string` | `,` | 分隔符,当value为字符串时,用该值进行分隔拆分 || src | `string` | | 预览图地址,支持数据映射获取对象中图片变量 || originalsrc | `string` | | 原图地址,支持数据映射获取对象中图片变量 || enlargeable | `boolean` | | 支持放大预览 || thumbmode | `string` | `contain` | 预览图模式,可选:`'w-full'`, `'h-full'`, `'contain'`, `'cover'` || thumbratio | `string` | `1:1` | 预览图比例,可选:`'1:1'`, `'4:3'`, `'16:9'` |", - "path": "/docs/components/images" - }, - { - "title": "Json", - "body": "json 展示组件## 基本用法如上,`levelexpand`配置为`0`,则默认不展开。## 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ---------- | ------------------------------------------------------------------------------------ || type | `string` | | 如果在 table、card 和 list 中,为`\"json\"`;在 form 中用作静态展示,为`\"static-json\"` || classname | `string` | | 外层 css 类名 || placeholder | `string` | `-` | 占位文本 || levelexpand | `number` | `1` | 默认展开的层级 || jsontheme | `string` | `twilight` | 主题,可选`twilight`和`eighties` |", - "path": "/docs/components/json" - }, - { - "title": "Link 链接", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------- | --------- | ------ | ------------------------------------------------------------------------------------ || type | `string` | | 如果在 table、card 和 list 中,为`\"link\"`;在 form 中用作静态展示,为`\"static-link\"` || body | `string` | | 标签内文本 || href | `string` | | 链接地址 || blank | `boolean` | | 是否在新标签页打开 || htmltarget | `string` | | a标签的target |", - "path": "/docs/components/link" - }, - { - "title": "List 列表", - "body": "列表展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像`service`这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过`source`属性,获取数据链中的数据,完成数据展示。## 基本用法或者你也可以使用 crud 的 ## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------------ | ---------------------------- | --------------------- | -------------------------------------------------------------------- || type | `string` | | `\"list\"` 指定为列表展示。 || title | `string` | | 标题 || source | `string` | `${items}` | 数据源, 获取当前数据域变量,支持 || placeholder | `string` | ‘暂无数据’ | 当没数据的时候的文字提示 || classname | `string` | | 外层 css 类名 || headerclassname | `string` | `amis-list-header` | 顶部外层 css 类名 || footerclassname | `string` | `amis-list-footer` | 底部外层 css 类名 || listitem | `array` | | 配置单条信息 || listitem.title | | | 标题 || listitem.titleclassname | `string` | `h5` | 标题 css 类名 || listitem.subtitle | | | 副标题 || listitem.avatar | | | 图片地址 || listitem.avatarclassname | `string` | `thumb-sm avatar m-r` | 图片 css 类名 || listitem.desc | | | 描述 || listitem.body | `array` | | 内容容器,主要用来放置非表单项组件 || listitem.actions | array<> | | 按钮区域 |", - "path": "/docs/components/list" - }, - { - "title": "Mapping 映射", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ------ | -------------------------------------------------------------------------------------- || type | `string` | | 如果在 table、card 和 list 中,为`\"color\"`;在 form 中用作静态展示,为`\"static-color\"` || classname | `string` | | 外层 css 类名 || placeholder | `string` | | 占位文本 || map | `object` | | 映射配置 |", - "path": "/docs/components/mapping" - }, - { - "title": "Nav 导航", - "body": "用于展示链接导航## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------------- | -------------------------------- | ------- | -------------------------------------- || type | `string` | `\"nav\"` | 指定为 nav 渲染器 || classname | `string` | | 外层 dom 的类名 || stacked | `boolean` | `true` | 设置成 false 可以以 tabs 的形式展示 || links | `array` | | 链接集合 || links[x].label | `string` | | 名称 || links | | 链接地址 || links[x].icon | `string` | | 图标 || links[x].active | `boolean` | | 是否高亮 || links | | 是否高亮的条件,留空将自动分析链接地址 |", - "path": "/docs/components/nav" - }, - { - "title": "Page 页面", - "body": "page 组件是 amis 页面 json 配置中,**唯一的** 顶级容器组件,是整个页面配置的入口组件。## 基本用法我们这里在内容区中简单渲染一段文字。## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------- | --------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------- || type | `string` | `\"page\"` | 指定为 page 组件 || title | | | 页面标题 || subtitle | | | 页面副标题 || remark | | | 标题附近会出现一个提示图标,鼠标放上去会提示该内容。 || aside | | | 往页面的边栏区域加内容 || toolbar | | | 往页面的右上角加内容,需要注意的是,当有 title 时,该区域在右上角,没有时该区域在顶部 || body | | | 往页面的内容区域加内容 || classname | `string` | | 外层 dom 类名 || toolbarclassname | `string` | `v-middle wrapper text-right bg-light b-b` | toolbar dom 类名 || bodyclassname | `string` | `wrapper` | body dom 类名 || asideclassname | `string` | `w page-aside-region bg-auto` | aside dom 类名 || headerclassname | `string` | `bg-light b-b wrapper` | header 区域 dom 类名 || initapi | | | page 用来获取初始数据的 api。返回的数据可以整个 page 级别使用。 || initfetch | `boolean` | `true` | 是否起始拉取 initapi || initfetchon | | | 是否起始拉取 initapi, 通过表达式配置 || interval | `number` | `3000` | 刷新时间(最低 3000) || silentpolling | `boolean` | `false` | 配置刷新时是否显示加载动画 || stopautorefreshwhen | | `\"\"` | 通过表达式来配置停止刷新的条件 |", - "path": "/docs/components/page" - }, - { - "title": "Panel 面板", - "body": "可以把相关信息以面板的形式展示到一块。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------------------------- | -------------------------------------- | ------------------- || type | `string` | `\"panel\"` | 指定为 panel 渲染器 || classname | `string` | `\"panel-default\"` | 外层 dom 的类名 || headerclassname | `string` | `\"panel-heading\"` | header 区域的类名 || footerclassname | `string` | `\"panel-footer bg-light lter wrapper\"` | footer 区域的类名 || actionsclassname | `string` | `\"panel-footer\"` | actions 区域的类名 || bodyclassname | `string` | `\"panel-body\"` | body 区域的类名 || title | | | 标题 || header | | | 头部容器 || body | | | 内容容器 || footer | | | 底部容器 || affixfooter | `boolean` | | 是否固定底部容器 || actions | array<> | | 按钮区域 |", - "path": "/docs/components/panel" - }, - { - "title": "Progress 进度条", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || -------------------- | --------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- || type | `string` | | 如果在 table、card 和 list 中,为`\"color\"`;在 form 中用作静态展示,为`\"static-color\"` || classname | `string` | | 外层 css 类名 || progressclassname | `string` | `progress-xs progress-striped active m-b-none` | 进度调 css 类名 || progressbarclassname | `string` | | 完成进度条 css 类名 || value | `string` | | 进度值 || placeholder | `string` | `-` | 占位文本 || showlabel | `boolean` | `true` | 是否展示进度文本 || map | `array` | `['bg-danger', 'bg-warning', 'bg-info', 'bg-success', 'bg-success']` | 进度颜色映射 |", - "path": "/docs/components/progress" - }, - { - "title": "QRCode 二维码", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------- | ---------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- || type | `string` | `\"qr-code\"` | 指定为 qrcode 渲染器 || classname | `string` | | 外层 dom 的类名 || qrcodeclassname | `string` | | 二维码 svg 的类名 || codesize | `number` | `128` | 二维码的宽高大小 || backgroundcolor | `string` | `\"#fff\"` | 二维码背景色 || foregroundcolor | `string` | `\"#000\"` | 二维码前景色 || level | `string` | `\"l\"` | 二维码复杂级别,有('l' 'm' 'q' 'h')四种 || value | |", - "path": "/docs/components/qrcode" - }, - { - "title": "Remark 标记", - "body": "用于展示颜色## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | -------- | ----------------------- | ------------- || type | `string` | | `remark` || classname | `string` | | 外层 css 类名 || content | `string` | | 提示文本 || placement | `string` | | 弹出位置 || trigger | `string` | `['hover', 'focus']` | 触发条件 || icon | `string` | `fa fa-question-circle` | 图标 |", - "path": "/docs/components/remark" - }, - { - "title": "Service 功能型容器", - "body": "amis 中部分组件,作为展示组件,自身没有**使用接口初始化数据域的能力**,例如:功能,在当前的 **数据链** 中获取数据,并进行数据展示。而`service`组件就是专门为该类组件而生,它的功能是::**配置初始化接口,进行数据域的初始化,然后在`service`内容器中配置子组件,这些子组件通过数据链的方法,获取`service`所拉取到的数据**## 基本使用最基本的使用,是配置初始化接口`api`,将接口返回的数据添加到自身的数据域中,以供子组件通过进行获取使用。上例可看到,变更**数据模板**的值,会触发 service 重新请求,并更新当前数据域中的数据更多相关见## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------------- | --------------------------------- | -------------- | ----------------------------------------------------------------------------- || type | `string` | `\"service\"` | 指定为 service 渲染器 || classname | `string` | | 外层 dom 的类名 || body | | | 内容容器 || api | | | 初始化数据域接口地址 || initfetch | `boolean` | | 是否默认拉取 || schemaapi | | | 用来获取远程 schema 接口地址 || initfetchschema | `boolean` | | 是否默认拉取 schema || messages | `object` | | 消息提示覆写,默认消息读取的是接口返回的 toast 提示文字,但是在此可以覆写它。 || messages.fetchsuccess | `string` | | 接口请求成功时的 toast 提示文字 || messages.fetchfailed | `string` | `\"初始化失败\"` | 接口请求失败时 toast 提示文字 || interval | `number` | | 轮训时间间隔(最低 3000) || silentpolling | `boolean` | `false` | 配置轮训时是否显示加载动画 || stopautorefreshwhen | | | 配置停止轮训的条件 |", - "path": "/docs/components/service" - }, - { - "title": "Spinner 加载中", - "body": "## 基本使用", - "path": "/docs/components/spinner" - }, - { - "title": "Status 状态", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ----------- | -------- | ------ | ------------------------------- || type | `string` | | `\"status\"` 指定为 status 渲染器 || classname | `string` | | 外层 dom 的类名 || placeholder | `string` | `-` | 占位文本 |", - "path": "/docs/components/status" - }, - { - "title": "Switch 开关", - "body": "## 基本用法| 属性名 | 类型 | 默认值 | 说明 || --------- | -------- | ------ | ------------------------------- || type | `string` | | `\"switch\"` 指定为 dialog 渲染器 || classname | `string` | | 外层 dom 的类名 || truevalue | any | | 真值,当值为该值时,开关开启 || option | `string` | | 右侧选项文本 |", - "path": "/docs/components/switch" - }, - { - "title": "Table 表格", - "body": "表格展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像`service`这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过`source`属性,获取数据链中的数据,完成数据展示。## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || ---------------- | --------------------------------------------- | ------------------------- | ----------------------------------------------------------------- || type | `string` | | `\"type\"` 指定为 table 渲染器 || title | `string` | | 标题 || source | `string` | `${items}` | 数据源, 绑定当前环境变量 || affixheader | `boolean` | `true` | 是否固定表头 || columnstogglable | `auto` 或者 `boolean` | `auto` | 展示列显示开关, 自动即:列数量大于或等于 5 个时自动开启 || placeholder | string | `暂无数据` | 当没数据的时候的文字提示 || classname | `string` | `panel-default` | 外层 css 类名 || tableclassname | `string` | `table-db table-striped` | 表格 css 类名 || headerclassname | `string` | `action.md-table-header` | 顶部外层 css 类名 || footerclassname | `string` | `action.md-table-footer` | 底部外层 css 类名 || toolbarclassname | `string` | `action.md-table-toolbar` | 工具栏 css 类名 || columns | array<> | | 用来设置列信息 || combinenum | `number` | | 自动合并单元格 || itemactions | array<> | | 悬浮行操作按钮组 || itemcheckableon | || itemdraggableon | || checkonitemclick | `boolean` | `false` | 点击数据行是否可以勾选当前行 |", - "path": "/docs/components/table" - }, - { - "title": "Tabs 选项卡", - "body": "## 基本用法## unmountonexit如果你想在切换 tab 时,自动销毁掉隐藏的 tab,请配置`\"unmountonexit\": true`## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------------------- | --------------------------------- | ----------------------------------- | -------------------------------------------------------- || type | `string` | `\"tabs\"` | 指定为 tabs 渲染器 || classname | `string` | | 外层 dom 的类名 || tabsclassname | `string` | | tabs dom 的类名 || tabs | `array` | | tabs 内容 || toolbar | | | tabs 中的工具栏 || toolbarclassname | `string` | | tabs 中工具栏的类名 || tabs[x].title | `string` | | tab 标题 || tabs[x].icon | `icon` | | tab 的图标 || tabs | | 内容区 || tabs[x].hash | `string` | | 设置以后将跟 url 的 hash 对应 || tabs[x].reload | `boolean` | | 设置以后内容每次都会重新渲染,对于 crud 的重新拉取很有用 || tabs[x].unmountonexit | `boolean` | | 每次退出都会销毁当前 tab 栏内容 || tabs[x].classname | `string` | `\"bg-white b-l b-r b-b wrapper-md\"` | tab 区域样式 |", - "path": "/docs/components/tabs" - }, - { - "title": "Tasks 任务操作集合", - "body": "任务操作集合,类似于 orp 上线。## 基本用法", - "path": "/docs/components/tasks" - }, - { - "title": "Tpl 模板", - "body": "输出 的常用组件## 基本用法更多模板相关配置请看## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | ---------------------------- | ------- | --------------- || type | `string` | `\"tpl\"` | 指定为 tpl 组件 || classname | `string` | | 外层 dom 的类名 || tpl | | | 配置模板 |", - "path": "/docs/components/tpl" - }, - { - "title": "Video 视频", - "body": "## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | --------- | --------- | -------------------------------------------------------- || type | `string` | `\"video\"` | 指定为 video 渲染器 || classname | `string` | | 外层 dom 的类名 || src | `string` | | 视频地址 || islive | `boolean` | false | 是否为直播,视频为直播时需要添加上,支持`flv`和`hls`格式 || poster | `string` | | 视频封面地址 || muted | `boolean` | | 是否静音 || autoplay | `boolean` | | 是否自动播放 || rates | `array` | | 倍数,格式为`[1.0, 1.5, 2.0]` |", - "path": "/docs/components/video" - }, - { - "title": "Wizard 向导", - "body": "表单向导,能够配置多个步骤引导用户一步一步完成表单提交。## 基本使用## 属性表| 属性名 | 类型 | 默认值 | 说明 || ------------------- | -------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- || type | `string` | `\"wizard\"` | 指定为 `wizard` 组件 || mode | `string` | `\"horizontal\"` | 展示模式,选择:`horizontal` 或者 `vertical` || api | | | 最后一步保存的接口。 || initapi | | | 初始化数据接口 || initfetch | | | 初始是否拉取数据。 || initfetchon | | | 初始是否拉取数据,通过表达式来配置 || actionprevlabel | `string` | `上一步` | 上一步按钮文本 || actionnextlabel | `string` | `下一步` | 下一步按钮文本 || actionnextsavelabel | `string` | `保存并下一步` | 保存并下一步按钮文本 || actionfinishlabel | `string` | `完成` | 完成按钮文本 || classname | `string` | | 外层 css 类名 || actionclassname | `string` | `btn-sm btn-default` | 按钮 css 类名 || reload | `string` | | 操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 `window` 则让当前页面整体刷新。 || redirect | | `3000` | 操作完后跳转。 || target | `string` | `false` | 可以把数据提交给别的组件而不是自己保存。请填写目标组件设置的 name 值,如果填写为 `window` 则把数据同步到地址栏上,同时依赖这些数据的组件会自动重新刷新。 || steps | array<> | | 数组,配置步骤信息 |### step| 属性名 | 类型 | 默认值 | 说明 || ----------------- | ---------------------------------- | ------ | --------------------------------------------------------------------------------------------- || title | `string` | | 步骤标题 || mode | `string` | | 展示默认,跟 中的模式一样,选择: `normal`、`horizontal`或者`inline`。 || horizontal | `object` | | 当为水平模式时,用来控制左右占比 || horizontal.label | `number` | | 左边 label 的宽度占比 || horizontal.right | `number` | | 右边控制器的宽度占比。 || horizontal.offset | `number` | | 当没有设置 label 时,右边控制器的偏移量 || api | | | 当前步骤保存接口,可以不配置。 || initapi | | | 当前步骤数据初始化接口。 || initfetch | `boolean` | | 当前步骤数据初始化接口是否初始拉取。 || initfetchon | | | 当前步骤数据初始化接口是否初始拉取,用表达式来决定。 || controls | array<。 |", - "path": "/docs/components/wizard" - }, - { - "title": "Wrapper 包裹容器", - "body": "简单的一个包裹容器组件## 基本用法## 属性表| 属性名 | 类型 | 默认值 | 说明 || --------- | --------------------------------- | ----------- | ---------------------------- || type | `string` | `\"wrapper\"` | 指定为 wrapper 渲染器 || classname | `string` | | 外层 dom 的类名 || size | `string` | | 支持: `xs`、`sm`、`md`和`lg` || body | | | 内容容器 |", - "path": "/docs/components/wrapper" - }, - { - "title": "行为", - "body": "页面的交互操作,例如:**提交表单、显示一个弹框、跳转页面、复制一段文字到粘贴板**等等操作,都可以视作页面的一种**行为**。在 amis 中,大部分 **行为** 是跟 **行为按钮组件** 进行绑定的,也就是说,当你想要配置一个行为,大部分情况下你应该遵循下面的步骤:1. 添加一个 **行为按钮组件**;2. 配置当前 **行为类型(actiontype)**;3. 根据当前行为类型,配置你想要的 **属性**。## 如何配置行为?### 通过行为按钮这次我们配置`actiontype`为`dialog`,意味着点击该按钮会弹出一个模态框,并配置`dialog`内容,来显示字符串`hello world!`> `dialog`是容器,也就意味着可以在`body`属性中配置其他组件完整的行为列表可以查看 组件### 组件所支持的行为一些特殊组件,例如 chart 组件 中的图表点击行为,可以直接配置`clickaction`,来配置行为对象。", - "path": "/docs/concepts/action" - }, - { - "title": "数据映射", - "body": "数据映射支持用户通过`${xxx}`或`$xxx`获取当前数据链中某个变量的值,实现灵活的数据配置功能,主要用于模板字符串、 自定义 `api` 请求数据体格式等场景。## 模板字符串上例子中`${value|split|first}`,会经历下面几个步骤:1. 会先执行`split`过滤器,将字符串`a,b,c`,拆分成数组`[\"a\", \"b\", \"c\"]`;2. 然后将该数据传给下一个过滤器`first`,执行该过滤器,获取数组第一个元素,为`\"a\"`3. 输出`\"a\"`", - "path": "/docs/concepts/data-mapping" - }, - { - "title": "数据域与数据链", - "body": "## 基本的数据展示我们再看之前的 hello world 示例:这时 amis 将会把`data`数据与当前`form`组件的数据域进行**merge**,`form`组件中的`static-tpl`组件会根据更新后的数据域,显示`id`为`1`。> 具有类似特征的组件还有`formula`等", - "path": "/docs/concepts/datascope-and-datachain" - }, - { - "title": "表达式", - "body": "一般来说,属性名类似于`xxxon`的配置项,都可以使用表达式进行配置,表达式具有如下的语法:其中:`data.show === 1` 就是表达式。## 表达式语法> 表达式语法实际上是 javascript 代码,更多 javascript 知识查看 。在 amis 的实现过程中,当正则匹配到某个组件存在`xxxon`语法的属性名时,会尝试进行下面步骤(以上面配置为例):1. 提取`visibleon`配置项配置的 javascript 语句`data.show === 1`,并以当前组件的数据域为这段代码的数据作用域,执行这段 js 代码;2. 之后将执行结果赋值给`visible`并添加到组件属性中3. 执行渲染。当前示例中:`visible`代表着是否显示当前组件;组件不同的配置项会有不同的效果,请大家在组件文档中多留意。> 表达式的执行结果预期应该是`boolean`类型值,如果不是,amis 会根据 javascript 的规则将结果视作`boolean`类型进行判断", - "path": "/docs/concepts/expression" - }, - { - "title": "联动", - "body": "上一节我们介绍了表达式的概念,而表达式应用最多的场景,是实现页面的联动效果。## 基本联动元素的联动是页面开发中很常见的功能之一,类似于:- 某个条件下显示或隐藏某个组件- 某个条件下请求接口- 某个条件下轮训接口停止轮训- 等等...> 联动配置项一般都是 ### 组件配置联动控制组件的显隐,表单项的禁用状态等,看下面这个例子:上例中点击按钮会刷新`target1`和`target2`组件。事实上,**组件间联动也可以实现上述任意的 (显隐联动、接口联动等其他联动)。**", - "path": "/docs/concepts/linkage" - }, - { - "title": "配置与组件", - "body": "## 最简单的 amis 配置一个最简单的 amis 配置看起来是这样的:我们通过数组的形式,在内容区配置`tpl`和`form`组件。没错,`body` 属性支持数组结构,这也就意味着你可以 **通过组件树的形式** 渲染出足够复杂的页面。具有`body`这类属性的组件一般称为**容器型组件**,就如名字所形容的,这类组件可以作为容器,在他们的子节点配置若干其他类型的组件,amis 中还有很多类似的组件,例如`form`、`service`等,后续我们会逐一进行介绍。> **注意:**>> `page`是一个特殊的容器组件,它是 amis 页面配置中 **必须也是唯一的顶级节点**", - "path": "/docs/concepts/schema" - }, - { - "title": "样式", - "body": "amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,也可以用在自定义组件开发中,掌握这些 class, 几乎可以不用写样式。## 基本使用例如,下面这个例子,我们内容区渲染了两个按钮,但是可以看到,两个按钮紧贴在一起,并不是很美观,于是我们想添加一定的间隔", - "path": "/docs/concepts/style" - }, - { - "title": "模板", - "body": "为了可以更加灵活渲染文本、数据结构,amis 借鉴其他模板引擎,实现了一套模板渲染功能。## 模板字符串### 普通文本配置一段普通文本并输出", - "path": "/docs/concepts/template" - }, - { - "title": "介绍", - "body": "## 什么是 amisamis 是一个低代码前端框架,它使用 json 配置来生成页面,可以节省页面开发工作量,极大提升开发前端页面的效率。## 为什么要做 amis?🤔在经历了十几年的发展后,前端开发变得越来越复杂,门槛也越来越高,要使用当下流行的 ui 组件库,你必须懂 npm、webpack、react/vue,必须熟悉 es 6 语法,最好还了解状态管理(比如 redux),如果没接触过函数式编程,一开始入门就很困难,而它还有巨大的 ,相关的库有 2347 个。然而前端技术的发展不会停滞,等学完这些后可能会发现大家都用 hooks 了、某个打包工具取代 webpack 了。。。而有时候你只是为了做个普通的增删改查界面,用于系统管理,类似下面这种:这个界面虽然用 bootstrap 也能快速搭起来,但要想体验好就需要加很多细节功能,比如:- 数据动态加载- 编辑单行数据- 批量删除和修改- 查询某列- 按某列排序- 隐藏某列- 开启整页内容拖拽排序- 表格有分页(页数还会同步到地址栏,刷新页面试试)- 如果往下拖动还有首行冻结来方便查看表头等 全部实现这些需要大量的代码。然而上面也看到了,在 amis 里只需要 150 行 json 配置(嘿,其中 40 多行只有一个括号),你不需要了解 react/vue、webpack,甚至不需要了解 javascript,即便没学过 amis 也能猜到大部分配置的作用,只需要简单配置就能完成所有页面开发这正是建立 amis 的初衷,我们认为:**对于大部分常用页面,应该使用最简单的方法来实现**,而不是越来越复杂。## 用 json 写页面有什么好处 ❓为了实现用最简单方式来生成大部分页面,amis 的解决方案是基于 json 来配置,它的独特好处是:- **不需要懂前端**:在百度内部,大部分 amis 用户之前从来没写过前端页面,也不会 `javascript`,就能做出专业且复杂的后台界面,这是所有其他前端 ui 库都无法做到的;- **不受前端技术更新的影响**:百度内部最老的 amis 页面是 4 年多前创建的,至今还在使用,而当年的 `angular/vue/react` 版本现在都废弃了,当年流行的 `gulp` 也被 `webpack` 取代了,如果这些页面不是用 amis,现在的维护成本会很高,同时还能享受 amis 升级带来的界面改进;- 可以 **完全** 使用 来制作页面:一般前端可视化编辑器只能用来做静态原型,而 amis 可视化编辑器做出的页面是可以直接上线的。> json 是一种轻量级的数据交换格式,简洁和清晰的层次结构使得它成为理想的数据交换语言。它易于人阅读和编写,同时也易于机器解析和生成,能够有效地提升网络传输效率。>> 更多关于 json 的知识,可以阅读## amis 的其它亮点 ✨- **提供完整的界面解决方案**:其它 ui 框架必须使用 javascript 来组装业务逻辑,而 amis 只需 json 配置就能完成完整功能开发,包括数据获取、表单提交及验证等功能;- **内置 100+ 种 ui 组件**:包括其它 ui 框架都会不提供的富文本编辑器、代码编辑器等,能满足各种页面组件展现的需求,而且对于特殊的展现形式还可以通过 来扩充;- **容器支持无限级嵌套**:可以通过组合来满足各种布局需求;- **经历了长时间的实战考验**:amis 在百度内部得到了广泛使用,在 4 年多的时间里创建了 **3w** 多页面,从内容审核到机器管理,从数据分析到模型训练,amis 满足了各种各样的页面需求。## amis 不适合做什么?😶使用 json 有优点但也有明显缺点,在以下场合并不适合 amis:- 大量定制 ui,尤其是面向普通客户(toc)的产品页面 - json 配置使得 amis 更适合做有大量常见 ui 组件的页面,但对于面向普通客户的页面,往往追求个性化的视觉效果,这种情况下用 amis 就不合适,实际上绝大部分前端 ui 组件库也都不适合,只能定制开发。- 有极为复杂的交互,或者对交互有很特殊的要求 - 有些复杂的前端功能,比如可视化编辑器,其中有大量定制的拖拽操作,这种需要依赖原生 dom 实现的功能无法使用 amis。 - 但对于某些交互固定的领域,比如图连线,amis 后续会有专门的组件来实现。## 阅读建议 👆- 如果你是第一次接触 amis 的新同学,那么请 **务必认真阅读完概念部分**,它会让你对 amis 有个整体的认识- 如果你已经掌握 amis 基本概念,且有一定的开发经验,需要参考 amis 组件相关文档的同学,那么请移步 ## 让我们马上开始吧!点击页面底部的下一篇,继续后续部分的阅读。", - "path": "/docs/index" - }, - { - "title": "自定义", - "body": "如果默认的组件不能满足需求,可以通过自定义组件来进行扩展,在 amis 中有两种方法:1. 临时扩展,适合无需复用的组件。2. 注册自定义类型,适合需要在很多地方复用的组件。> 注意,自定义组件只支持 npm 方式,不支持 sdk## 临时扩展amis 的 json 配置最终会转成 react 组件来执行,所以如果只是想在某个配置中加入定制功能,可以直接在这个 json 配置里写 react 代码,比如下面这个例子:把自己注册进去了,其他组件就能引用到了。同时,如果你想找别的组件,也同样是通过 scoped 这个 context,如: `scoped.getcomponentbyname(\"xxxname\")` 这样就能拿到目标组件的实例了(前提是目标组件已经配置了 name 为 `xxxname`)。#### 其他功能方法自定义的渲染器 props 会下发一个非常有用的 env 对象。这个 env 有以下功能方法。- `env.fetcher` 可以用来做 ajax 请求如: `this.props.env.fetcher('xxxapi', this.props.data).then((result) => console.log(result))`- `env.confirm` 确认框,返回一个 promise 等待用户确认如: `this.props.env.confirm('你确定要这么做?').then((confirmed) => console.log(confirmed))`- `env.alert` 用 modal 实现的弹框,个人觉得更美观。- `env.notify` toast 某个消息 如: `this.props.env.notify(\"error\", \"出错了\")`- `env.jumpto` 页面跳转。", - "path": "/docs/start/custom" - }, - { - "title": "快速开始", - "body": "amis 有两种使用方法:- - npm 适合用在 react 项目中,可以完整使用 amis 的所有功能,方便扩展。sdk 适合对前端或 react 不了解的开发者,它不依赖 npm 及 webpack,直接引入代码就能使用,但需要注意这种方式难以支持 ,只能使用 amis 内置的组件。## npm### 安装可以通过 `amisscoped.getcomponentbyname('page1.form1').getvalues()` 来获取到所有表单的值,需要注意 page 和 form 都需要有 name 属性。", - "path": "/docs/start/getting-started" - }, - { - "title": "API", - "body": "api 类型用于配置请求接口的格式,涉及请求方式、请求地址、请求数据体等等相关配置## 简单配置如果你只需要配置简单的 ajax 接口,可以使用简单字符串格式,如下:### replacedata返回的数据是否替换掉当前的数据,默认为 `false`(即追加),设置为`true`就是完全替换当前数据。### 属性表| 字段名 | 说明 | 类型 | 备注 || -------------- | ------------ | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || method | 请求方式 | 字符串 | 支持:get、post、put、delete || url | 请求地址 | | - || data | 请求数据 | 对象或字符串 | 支持数据映射 || datatype | 数据体格式 | 字符串 | 默认为 `json` 可以配置成 `form` 或者 `form-data`。当 `data` 中包含文件时,自动会采用 `form-data(multipart/form-data)` 格式。当配置为 `form` 时为 `application/x-www-form-urlencoded` 格式。 || qsoptions | -- | 对象或字符串 | 当 datatype 为 form 或者 form-data 的时候有用。具体参数请参考这里,默认设置为: `{ arrayformat: 'indices', encodevaluesonly: true }` || headers | 请求头 | 对象 | - || sendon | 请求条件 | | - || cache | 接口缓存时间 | 整型数字 | - || requestadaptor | 发送适配器 | 字符串 | ,支持字符串串格式,或者直接就是函数如: || adaptor | 接收适配器 | 字符串 | 如果接口返回不符合要求,可以通过配置一个适配器来处理成 amis 需要的。同样支持 function 或者 字符串函数体格式 || replacedata | 替换当前数据 | 布尔 | 返回的数据是否替换掉当前的数据,默认为 `false`,即:`追加`,设置成 `true` 就是完全替换。 |", - "path": "/docs/types/api" - }, - { - "title": "Definitions", - "body": "`definitions`建立当前页面公共的配置项,在其他组件中可以通过`$ref`来引用当前配置项中的内容。注意 definitions 只能在顶级节点中定义,定义在其他位置,将引用不到。", - "path": "/docs/types/definitions" - }, - { - "title": "SchemaNode", - "body": "schemanode 是指每一个 amis 配置节点的类型,支持`模板`、`schema(配置)`以及`schemaarray(配置数组)`三种类型## 模板非常容易看出来,我们给`body`属性,配置了数组结构的`schema`,从而实现在`body`下,渲染两个`tpl`,来输入两段文字的效果", - "path": "/docs/types/schemanode" - } - ] -} diff --git a/gh-pages/docs/components/action.html b/gh-pages/docs/components/action.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/action.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/action_b8f4820.js b/gh-pages/docs/components/action_b8f4820.js deleted file mode 100644 index b1473447..00000000 --- a/gh-pages/docs/components/action_b8f4820.js +++ /dev/null @@ -1,155 +0,0 @@ -amis.define('docs/components/action.md', function(require, exports, module, define) { - - module.exports = { - "title": "Action 行为按钮", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Action 行为按钮", - "icon": null, - "order": 26, - "html": "

Action 行为按钮,是触发页面行为的主要方法之一

\n

基本用法

我们这里简单实现一个点击按钮弹框的交互。

\n
\n

样式

尺寸

配置size,显示不同尺寸

\n
\n

主题

可以配置level或者primary,显示不同样式。

\n
\n

图标

可以配置icon配置项,实现按钮显示图标

\n
\n

如果label配置为空字符串,可以只显示icon

\n
\n

操作前确认

可以通过配置confirmText,实现在任意操作前,弹出提示框确认是否进行该操作。

\n
\n

ajax 请求

通过配置"actionType":"ajax"api,可以实现 ajax 请求。

\n
\n

请求成功后,跳转至某个页面

配置相对路径,实现单页跳转
\n
配置完整路径,直接跳转指定路径
\n

请求成功后,显示反馈弹框

\n

更多内容查看Dialog 文档

\n

自定义 toast 文字

可以通过配置messages,自定义接口返回toast信息

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
apiApi-请求地址,参考 api 格式说明。
redirect模板字符串-指定当前请求结束后跳转的路径,可用 ${xxx} 取值。
feedbackDialogObject-如果 ajax 类型的,当 ajax 返回正常后,还能接着弹出一个 dialog 做其他交互。返回的数据可用于这个 dialog 中。格式可参考Dialog
messagesobject-success:ajax 操作成功后提示,可以不指定,不指定时以 api 返回为准。failed:ajax 操作失败提示。
\n

跳转链接

单页跳转

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringlink单页跳转
linkstringlink用来指定跳转地址,跟 url 不同的是,这是单页跳转方式,不会渲染浏览器,请指定 amis 平台内的页面。可用 ${xxx} 取值。
\n

直接跳转

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringurl页面跳转
urlstring-按钮点击后,会打开指定页面。可用 ${xxx} 取值。
blankbooleanfalse如果为 true 将在新 tab 页面打开。
\n

注意:由于 amis 平台内 http 地址会被替换成 proxy 地址,所以在 amis 平台内使用请加上 raw: 作为前缀。 比如:raw:http://www.baidu.com

\n

弹框

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdialog点击后显示一个弹出框
dialogstringDialogObject-指定弹框内容,格式可参考Dialog
nextConditionboolean-可以用来设置下一条数据的条件,默认为 true
\n

抽屉

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdrawer点击后显示一个侧边栏
drawerstringDrawerObject-指定弹框内容,格式可参考Drawer
\n

复制文本

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringcopy复制一段内容到粘贴板
content模板-指定复制的内容。可用 ${xxx} 取值。
\n

刷新其他组件

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringreload刷新目标组件
targetstring-需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
\n

组件特有的行为类型

表单中表格添加一行

该 actionType 为FormItem-Table专用行为

\n

重置表单

在 form 中,配置"type": "reset"的按钮,可以实现重置表单数据的功能

\n
\n

通用属性表

所有actionType都支持的通用配置项

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringaction指定为 Page 渲染器。
actionTypestring-【必填】这是 action 最核心的配置,来指定该 action 的作用类型,支持:ajaxlinkurldrawerdialogconfirmcancelprevnextcopyclose
labelstring-按钮文本。可用 ${xxx} 取值。
levelstringdefault按钮样式,支持:linkprimarysecondaryinfosuccesswarningdangerlightdarkdefault
sizestring-按钮大小,支持:xssmmdlg
iconstring-设置图标,例如fa fa-plus
iconClassNamestring-给图标上添加类名。
activeboolean-按钮是否高亮。
activeLevelstring-按钮高亮时的样式,配置支持同level
activeClassNamestringis-active给按钮高亮添加类名。
blockboolean-display:"block"来显示按钮。
confirmText模板-当设置后,操作在开始前会询问用户。可用 ${xxx} 取值。
reloadstring-指定此次操作完后,需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
tooltipstring-鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
disabledTipstring-被禁用后鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
tooltipPlacementstringtop如果配置了tooltip或者disabledTip,指定提示信息位置,可配置topbottomleftright
closeboolean-action配置在dialogdraweractions中时,配置为true指定此次操作完后关闭当前dialogdrawer
requiredArray<string>-配置字符串数组,指定在form中进行操作之前,需要指定的字段名的表单项通过验证
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "样式", - "fragment": "%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E6%A0%B7%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "尺寸", - "fragment": "%E5%B0%BA%E5%AF%B8", - "fullPath": "#%E5%B0%BA%E5%AF%B8", - "level": 3 - }, - { - "label": "主题", - "fragment": "%E4%B8%BB%E9%A2%98", - "fullPath": "#%E4%B8%BB%E9%A2%98", - "level": 3 - }, - { - "label": "图标", - "fragment": "%E5%9B%BE%E6%A0%87", - "fullPath": "#%E5%9B%BE%E6%A0%87", - "level": 3 - } - ] - }, - { - "label": "操作前确认", - "fragment": "%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", - "fullPath": "#%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", - "level": 2 - }, - { - "label": "ajax 请求", - "fragment": "ajax-%E8%AF%B7%E6%B1%82", - "fullPath": "#ajax-%E8%AF%B7%E6%B1%82", - "level": 2, - "children": [ - { - "label": "请求成功后,跳转至某个页面", - "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", - "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", - "level": 3 - }, - { - "label": "请求成功后,显示反馈弹框", - "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "level": 3 - }, - { - "label": "自定义 toast 文字", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", - "level": 3 - } - ] - }, - { - "label": "跳转链接", - "fragment": "%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", - "fullPath": "#%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", - "level": 2, - "children": [ - { - "label": "单页跳转", - "fragment": "%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", - "fullPath": "#%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", - "level": 3 - }, - { - "label": "直接跳转", - "fragment": "%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", - "fullPath": "#%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", - "level": 3 - } - ] - }, - { - "label": "弹框", - "fragment": "%E5%BC%B9%E6%A1%86", - "fullPath": "#%E5%BC%B9%E6%A1%86", - "level": 2 - }, - { - "label": "抽屉", - "fragment": "%E6%8A%BD%E5%B1%89", - "fullPath": "#%E6%8A%BD%E5%B1%89", - "level": 2 - }, - { - "label": "复制文本", - "fragment": "%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", - "fullPath": "#%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", - "level": 2 - }, - { - "label": "刷新其他组件", - "fragment": "%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "level": 2 - }, - { - "label": "组件特有的行为类型", - "fragment": "%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", - "level": 2, - "children": [ - { - "label": "表单中表格添加一行", - "fragment": "%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", - "fullPath": "#%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", - "level": 3 - }, - { - "label": "重置表单", - "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 3 - } - ] - }, - { - "label": "通用属性表", - "fragment": "%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/alert.html b/gh-pages/docs/components/alert.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/alert.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/alert_01e045b.js b/gh-pages/docs/components/alert_01e045b.js deleted file mode 100644 index 105c45c2..00000000 --- a/gh-pages/docs/components/alert_01e045b.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/alert.md', function(require, exports, module, define) { - - module.exports = { - "title": "Alert 提示", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Alert 提示", - "icon": null, - "order": 27, - "html": "

用来做文字特殊提示,分为四类:提示类、成功类、警告类和危险类。

\n

基本使用

\n

显示关闭按钮

配置"showCloseButton": true实现显示关闭按钮。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"alert"指定为 alert 渲染器
classNamestring外层 Dom 的类名
levelstringinfo级别,可以是:infosuccesswarning 或者 danger
bodySchemaNode显示内容
showCloseButtonbooleanfalse是否显示关闭按钮
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "显示关闭按钮", - "fragment": "%E6%98%BE%E7%A4%BA%E5%85%B3%E9%97%AD%E6%8C%89%E9%92%AE", - "fullPath": "#%E6%98%BE%E7%A4%BA%E5%85%B3%E9%97%AD%E6%8C%89%E9%92%AE", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/audio.html b/gh-pages/docs/components/audio.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/audio.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/audio_1f5c5a9.js b/gh-pages/docs/components/audio_1f5c5a9.js deleted file mode 100644 index 94da7d71..00000000 --- a/gh-pages/docs/components/audio_1f5c5a9.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/audio.md', function(require, exports, module, define) { - - module.exports = { - "title": "Audio 音频", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Audio 音频", - "icon": null, - "order": 28, - "html": "

基本使用

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"audio"指定为 audio 渲染器
classNamestring外层 Dom 的类名
inlinebooleantrue是否是内联模式
srcstring音频地址
loopbooleanfalse是否循环播放
autoPlaybooleanfalse是否自动播放
ratesarray[]可配置音频播放倍速如:[1.0, 1.5, 2.0]
controlsarray['rates', 'play', 'time', 'process', 'volume']内部模块定制化
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/button-group.html b/gh-pages/docs/components/button-group.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/button-group.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/button-group_29b8d93.js b/gh-pages/docs/components/button-group_29b8d93.js deleted file mode 100644 index 3fc296d7..00000000 --- a/gh-pages/docs/components/button-group_29b8d93.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/button-group.md', function(require, exports, module, define) { - - module.exports = { - "title": "ButtonGroup 按钮组", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "ButtonGroup", - "icon": null, - "order": 30, - "html": "

基本用法

\n

垂直模式

配置"vertical": true,实现垂直模式

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"button-group"指定为 button-group 渲染器
classNamestring外层 Dom 的类名
buttonsArray<Action>行为按钮组
verticalstring是否使用垂直模式
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "垂直模式", - "fragment": "%E5%9E%82%E7%9B%B4%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%9E%82%E7%9B%B4%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/button.html b/gh-pages/docs/components/button.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/button.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/button_b10165a.js b/gh-pages/docs/components/button_b10165a.js deleted file mode 100644 index 7c327885..00000000 --- a/gh-pages/docs/components/button_b10165a.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/button.md', function(require, exports, module, define) { - - module.exports = { - "title": "Button 按钮", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Button 按钮", - "icon": null, - "order": 29, - "html": "

基本用法

\n

button 实际上是 action 的别名,更多用法见action

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/card.html b/gh-pages/docs/components/card.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/card.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/card_5089ddc.js b/gh-pages/docs/components/card_5089ddc.js deleted file mode 100644 index a130ad01..00000000 --- a/gh-pages/docs/components/card_5089ddc.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/card.md', function(require, exports, module, define) { - - module.exports = { - "title": "Card 卡片", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Card 卡片", - "icon": null, - "order": 31, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"card"指定为 Card 渲染器
classNamestring"panel-default"外层 Dom 的类名
headerObjectCard 头部内容设置
header.classNamestring头部类名
header.title模板标题
header.subTitle模板副标题
header.desc模板描述
header.avatar模板图片
header.avatarText模板如果不配置图片,则会在图片处显示该文本
header.highlightboolean是否显示激活样式
header.avatarClassNamestring"pull-left thumb avatar b-3x m-r"图片类名
bodyArray内容容器,主要用来放置非表单项组件
bodyClassNamestring"padder m-t-sm m-b-sm"内容区域类名
actionsArray<Action>配置按钮集合
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/cards.html b/gh-pages/docs/components/cards.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/cards.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/cards_25ddea3.js b/gh-pages/docs/components/cards_25ddea3.js deleted file mode 100644 index 56a7dea5..00000000 --- a/gh-pages/docs/components/cards_25ddea3.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/cards.md', function(require, exports, module, define) { - - module.exports = { - "title": "Cards 卡片组", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Cards 卡片组", - "icon": null, - "order": 32, - "html": "

卡片展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像Service这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过source属性,获取数据链中的数据,完成数据展示。

\n

基本用法

这里我们使用手动初始数据域的方式,即配置data属性,进行数据域的初始化。

\n
\n

或者你也可以使用 CRUD 的 card 模式

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"cards" 指定为卡片组。
title模板标题
source数据映射${items}数据源, 获取当前数据域中的变量
placeholder模板‘暂无数据’当没数据的时候的文字提示
classNamestring外层 CSS 类名
headerClassNamestringamis-grid-header顶部外层 CSS 类名
footerClassNamestringamis-grid-footer底部外层 CSS 类名
itemClassNamestringcol-sm-4 col-md-3卡片 CSS 类名
cardCard配置卡片信息
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/carousel.html b/gh-pages/docs/components/carousel.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/carousel.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/carousel_306f7cd.js b/gh-pages/docs/components/carousel_306f7cd.js deleted file mode 100644 index d22973b9..00000000 --- a/gh-pages/docs/components/carousel_306f7cd.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/carousel.md', function(require, exports, module, define) { - - module.exports = { - "title": "Carousel 轮播图", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Carousel 幻灯片", - "icon": null, - "order": 33, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"carousel"指定为 Carousel 渲染器
classNamestring"panel-default"外层 Dom 的类名
optionsarray[]轮播面板数据
options.imagestring图片链接
options.imageClassNamestring图片类名
options.titlestring图片标题
options.titleClassNamestring图片标题类名
options.descriptionstring图片描述
options.descriptionClassNamestring图片描述类名
options.htmlstringHTML 自定义,同Tpl一致
itemSchemaobject自定义schema来展示数据
autobooleantrue是否自动轮播
intervalstring5s切换动画间隔
durationstring0.5s切换动画时长
widthstringauto宽度
heightstring200px高度
controlsarray['dots', 'arrows']显示左右箭头、底部圆点索引
controlsThemestringlight左右箭头、底部圆点索引颜色,默认light,另有dark模式
animationstringfade切换动画效果,默认fade,另有slide模式
\n
    \n
  • type 请设置成 carousel
  • \n
  • className 外层 Dom 的类名
  • \n
  • options 轮播面板数据,默认[],支持以下模式
      \n
    • 图片
        \n
      • image 图片链接
      • \n
      • imageClassName 图片类名
      • \n
      • title 图片标题
      • \n
      • titleClassName 图片标题类名
      • \n
      • description 图片描述
      • \n
      • descriptionClassName 图片描述类名
      • \n
      \n
    • \n
    • html HTML 自定义,同Tpl一致
    • \n
    \n
  • \n
  • itemSchema 自定义schema来展示数据
  • \n
  • auto 是否自动轮播,默认true
  • \n
  • interval 切换动画间隔,默认5s
  • \n
  • duration 切换动画时长,默认0.5s
  • \n
  • width 宽度,默认auto
  • \n
  • height 高度,默认200px
  • \n
  • controls 显示左右箭头、底部圆点索引,默认['dots', 'arrows']
  • \n
  • controlsTheme 左右箭头、底部圆点索引颜色,默认light,另有dark模式
  • \n
  • animation 切换动画效果,默认fade,另有slide模式
  • \n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/chart.html b/gh-pages/docs/components/chart.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/chart.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/chart_e049b84.js b/gh-pages/docs/components/chart_e049b84.js deleted file mode 100644 index 2ae8df4f..00000000 --- a/gh-pages/docs/components/chart_e049b84.js +++ /dev/null @@ -1,57 +0,0 @@ -amis.define('docs/components/chart.md', function(require, exports, module, define) { - - module.exports = { - "title": "Chart 图表", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Chart 图标", - "icon": null, - "order": 34, - "html": "

图表渲染器,采用 echarts 渲染,配置格式跟 echarts 相同,echarts 配置文档

\n

基本用法

\n

配置静态配置项

通过配置"config": {},可以配置echarts配置

\n
\n

配置图表点击行为

可以通过配置"clickAction": {},来指定图表节点的点击行为,支持 amis 的行为

\n
\n

点击下面坐标中的节点查看效果!

\n
\n
\n

远程拉取动态配置项

配置api,来远程拉取图标配置

\n
\n

通过组件间联动,更新图表

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"chart"指定为 chart 渲染器
classNamestring外层 Dom 的类名
bodySchemaNode内容容器
apiapi配置项接口地址
source数据映射通过数据映射获取数据链中变量值作为配置
initFetchboolean组件初始化时,是否请求接口
intervalnumber刷新时间(最低 3000)
configobjectstring设置 eschars 的配置项,当为string的时候可以设置 function 等配置项
styleobject设置根元素的 style
widthstring设置根元素的宽度
heightstring设置根元素的高度
replaceChartOptionbooleanfalse每次更新是完全覆盖配置项还是追加?
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置静态配置项", - "fragment": "%E9%85%8D%E7%BD%AE%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE%E9%A1%B9", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE%E9%A1%B9", - "level": 2 - }, - { - "label": "配置图表点击行为", - "fragment": "%E9%85%8D%E7%BD%AE%E5%9B%BE%E8%A1%A8%E7%82%B9%E5%87%BB%E8%A1%8C%E4%B8%BA", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%9B%BE%E8%A1%A8%E7%82%B9%E5%87%BB%E8%A1%8C%E4%B8%BA", - "level": 2 - }, - { - "label": "远程拉取动态配置项", - "fragment": "%E8%BF%9C%E7%A8%8B%E6%8B%89%E5%8F%96%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE%E9%A1%B9", - "fullPath": "#%E8%BF%9C%E7%A8%8B%E6%8B%89%E5%8F%96%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE%E9%A1%B9", - "level": 2 - }, - { - "label": "通过组件间联动,更新图表", - "fragment": "%E9%80%9A%E8%BF%87%E7%BB%84%E4%BB%B6%E9%97%B4%E8%81%94%E5%8A%A8-%E6%9B%B4%E6%96%B0%E5%9B%BE%E8%A1%A8", - "fullPath": "#%E9%80%9A%E8%BF%87%E7%BB%84%E4%BB%B6%E9%97%B4%E8%81%94%E5%8A%A8-%E6%9B%B4%E6%96%B0%E5%9B%BE%E8%A1%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/collapse.html b/gh-pages/docs/components/collapse.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/collapse.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/collapse_cc8d533.js b/gh-pages/docs/components/collapse_cc8d533.js deleted file mode 100644 index cb98434c..00000000 --- a/gh-pages/docs/components/collapse_cc8d533.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/collapse.md', function(require, exports, module, define) { - - module.exports = { - "title": "Collapse 折叠器", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Collapse 折叠器", - "icon": null, - "order": 36, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"collapse"指定为 Collapse 渲染器
titleSchemaNode标题
bodySchemaNode内容
classNamestringbg-white wrapperCSS 类名
headingClassNamestringfont-thin b-b b-light text-lg p-b-xs标题 CSS 类名
bodyClassNamestring内容 CSS 类名。
collapsedbooleanfalse默认是否要收起。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/color.html b/gh-pages/docs/components/color.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/color.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/color_4f5b643.js b/gh-pages/docs/components/color_4f5b643.js deleted file mode 100644 index bcd3a5ed..00000000 --- a/gh-pages/docs/components/color_4f5b643.js +++ /dev/null @@ -1,53 +0,0 @@ -amis.define('docs/components/color.md', function(require, exports, module, define) { - - module.exports = { - "title": "Color 颜色", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Color", - "icon": null, - "order": 37, - "html": "

用于展示颜色

\n

基本用法

\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"color";在 Form 中用作静态展示,为"static-color"
classNamestring外层 CSS 类名
valuestring显示的颜色值
namestring在其他组件中,时,用作变量映射
defaultColorstring#ccc默认颜色值
showValuebooleantrue是否显示右边的颜色值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/component.html b/gh-pages/docs/components/component.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/component.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/component_0427056.js b/gh-pages/docs/components/component_0427056.js deleted file mode 100644 index 08bca5e4..00000000 --- a/gh-pages/docs/components/component_0427056.js +++ /dev/null @@ -1,20 +0,0 @@ -amis.define('docs/components/component.md', function(require, exports, module, define) { - - module.exports = { - "title": "组件介绍", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "组件介绍", - "icon": null, - "order": 21, - "html": "

从这个章节开始,我们将会介绍 amis 中内置的所有组件的使用方法

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/container.html b/gh-pages/docs/components/container.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/container.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/container_32c292f.js b/gh-pages/docs/components/container_32c292f.js deleted file mode 100644 index 10e7d487..00000000 --- a/gh-pages/docs/components/container_32c292f.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/container.md', function(require, exports, module, define) { - - module.exports = { - "title": "Container 容器", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Container 容器", - "icon": null, - "order": 38, - "html": "

Container 是一种容器组件,它可以渲染其他 amis 组件

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"alert"指定为 alert 渲染器
classNamestring外层 Dom 的类名
bodyClassNamestring容器内容区的类名
bodySchemaNode容器内容
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/crud.html b/gh-pages/docs/components/crud.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/crud.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/crud_feceb01.js b/gh-pages/docs/components/crud_feceb01.js deleted file mode 100644 index 91d07cc7..00000000 --- a/gh-pages/docs/components/crud_feceb01.js +++ /dev/null @@ -1,229 +0,0 @@ -amis.define('docs/components/crud.md', function(require, exports, module, define) { - - module.exports = { - "title": "CRUD 增删改查", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "CRUD 增删改查", - "icon": null, - "order": 25, - "html": "

CRUD,即增删改查组件,主要用来展现数据列表,并支持各类【增】【删】【改】【查】等操作。

\n

基本用法

最基本的用法是配置 数据源接口(api) 以及 展示列(columns)

\n
\n

数据源接口数据结构要求

    \n
  • itemsrows:用于返回数据源数据,格式是数组
  • \n
  • total: 用于返回数据库中一共有多少条数据,用于生成分页
  • \n
\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"items\": [\n      {\n        // 每一行的数据\n        \"id\": 1,\n        \"xxx\": \"xxxx\"\n      }\n    ],\n\n    \"total\": 200 // 注意!!!这里不是当前请求返回的 items 的长度,而是数据库中一共有多少条数据,用于生成分页组件\n    // 如果你不想要分页,把这个不返回就可以了。\n  }\n}\n
\n

如果无法知道数据总数,只能知道是否有下一页,请返回如下格式,AMIS 会简单生成一个简单版本的分页控件。

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"items\": [\n      {\n        // 每个成员的数据。\n        \"id\": 1,\n        \"xxx\": \"xxxx\"\n      }\n    ],\n\n    \"hasNext\": true // 是否有下一页。\n  }\n}\n
\n

如果不需要分页,或者配置了 loadDataOnce 则可以忽略掉 totalhasNext 参数。

\n

功能

既然这个渲染器叫增删改查,那接下来分开介绍这几个功能吧。

\n

其实这个渲染器并不没有包含新增功能,新增功能其实还是依靠其他位置放个弹框表单完成,弹框完事了会自动让页面里面的 CRUD 刷新如:

\n
\n

当然如果你不想要自动刷新,那么给按钮配置 reload: "none" 就行了。

\n

删除功能主要有三种实现:单条操作批量操作或者直接添加一个操作栏,在里面放个类型为 ajax 类型的按钮即可。在这个按钮里面能获得对应的行数据,而且完成后也会自动刷新这个 CRUD 列表。

\n
\n

改和删其实是差不多的,唯一的区别在于,配置不同的 api,按钮类型改成弹框。

\n
\n

弹框里面可用数据自动就是点击的那一行的行数据,如果列表没有返回,可以在 form 里面再配置个 initApi 初始化数据,如果行数据里面有倒是不需要再拉取了。表单项的 name 跟数据 key 对应上便自动回显了。默认发送给表单的保存接口只会包含配置了的表单项,如果不够,请在 api 上配置数据映射,或者直接添加 hidden 类型的表单项(即隐藏域 input[type=hidden])。

\n

查,就不单独介绍了,这个文档绝大部分都是关于查的。

\n

展示模式

CRUD 支持下面 3 种展示模式,默认为 Table 表格模式。

\n

Table 表格模式

Table 模式支持 Table 中的所有功能。

\n
\n

List 列表模式

List 模式支持 List 中的所有功能。

\n
\n

Cards 卡片模式

Cards 模式支持 Cards 中的所有功能。

\n
\n

查询条件表单

大部分表格展示有对数据进行检索的需求,CRUD 自身支持通过配置filter,实现查询条件过滤表单

\n

filter 配置实际上同 Form 组件,因此支持绝大部分form的功能。

\n
\n

请注意:在默认没有自定义配置 api 数据映射时,提交查询条件表单,会自动将表单中的表单项值,发送给crud所配置的接口,然后通过后端接口,实现对数据的过滤操作,前端默认是不会进行任何的数据过滤操作

\n

如果想前端实现过滤功能,请看前端一次性加载部分。

\n

配置默认请求参数

可以配置defaultParams,来指定拉取接口时的默认参数:

\n
\n

例如上例中,配置{ perPage: 50 },指定分页的默认每页数据条数为 50 条。

\n

数据源接口轮训

可以配置interval来实现数据接口轮训功能,默认最低为3000毫秒,

\n
\n

配置stopAutoRefreshWhen表达式,来实现满足条件,停止轮训

\n

列配置

除了支持 Table 中的列配置 以外,crud 还支持下面这些配置,帮助更好的操作数据

\n

排序检索

可以在列上配置"sortable": true,该列表头右侧会渲染一个可点击的排序图标,可以切换正序倒序

\n
\n

amis 只负责生成排序组件,并将排序参数传递给接口,而不会在前端对数据进行排序处理。参数格式如下:

\n
{\n  \"orderBy\": \"engine\", // 这里为所配置列的 name\n  \"orderDir\": \"asc\" // asc 为升序,desc 为降序\n}\n
\n

你可以通过数据映射,在api中获取这些参数。

\n

快速搜索

可以在列上配置"sortable": true,该列表头右侧会渲染一个可点击的搜索图标,点击可以输入关键字进行该列的搜索:

\n
\n

amis 只负责生成搜索组件,并将搜索参数传递给接口,而不会在前端对数据进行搜索处理。参数格式如下:

\n
{\n  \"engine\": \"xxx\" // 这里的key是列的 name,value是输入的关键字\n}\n
\n

你可以通过数据映射,在api中获取这些参数。

\n

快速过滤

可以在列上配置filterable属性,该列表头右侧会渲染一个可点击的过滤图标,点击显示下拉框,选中进行过滤:

\n
\n

amis 只负责生成下拉选择器组件,并将搜索参数传递给接口,而不会在前端对数据进行搜索处理。参数格式如下:

\n
{\n  \"grade\": \"xxx\" // 这里的key是列的 name,value是选中项的value值\n}\n
\n

你可以通过数据映射,在api中获取这些参数。

\n

快速编辑

可以通过给列配置:"quickEdit":truequickSaveApi 可以实现表格内快速编辑并批量保存的功能。

\n

如下Rendering engine列的每一行中,会生成可编辑图标,点击后会显示弹框,用于编辑该列的值,

\n
\n

指定编辑表单项类型

quickEdit也可以配置对象形式,可以指定编辑表单项的类型,例如"type": "select"

\n
\n

内联模式

配置quickEditmodeinline。可以直接将编辑表单项渲染至表格内,可以直接操作编辑。

\n
\n

即时保存

如果想编辑完表单项之后,不想点击顶部确认按钮来进行保存,而是即时保存当前标记的数据,则需要配置quickEdit"saveImmediately": true,然后配置接口quickSaveItemApi。可以直接将编辑表单项渲染至表格内,可以直接操作编辑。

\n
\n

你也可以在saveImmediately中配置 api,实现即时保存

\n
\n

顶部和底部工具栏

crud 组件支持通过配置headerToolbarfooterToolbar属性,实现在表格顶部和底部渲染组件,

\n
\n

上例中我们在顶部渲染了一段模板,通过${count}取到数据域中,CRUD 返回的count变量值;然后我们在底部渲染了一个按钮。

\n

从上面一些例子中你可能已经发现,当我们不配置该属性时,crud 默认会在顶部和底部渲染一些组件,实际上,headerToolbarfooterToolbar默认会有下面这些配置:

\n
{\n  \"headerToolbar\": [\"bulkActions\", \"pagination\"],\n  \"footerToolbar\": [\"statistics\", \"pagination\"]\n}\n
\n
    \n
  • 在顶部工具栏中:渲染批量操作按钮(如果在 crud 中,配置了 bulkActions 的话)和 分页组件
  • \n
  • 在底部工具栏中:渲染数据统计组件 和 分页组件
  • \n
\n
\n

如果你不希望在顶部或者底部渲染默认组件,你可以设置headerToolbarfooterToolbar为空数组[]

\n
\n

除了可以配置SchemaNode 类型以外,headerToolbarfooterToolbar还支持一些针对列表场景而内置的一些常用组件,下面分别介绍:

\n

分页

headerToolbar或者footerToolbar数组中添加pagination字符串,并且在数据源接口中返回了数据总数count,即可以渲染分页组件;添加switch-per-page字符串,可以渲染切换每页条数组件

\n
\n

crud默认不会处理数据分页,只是会把分页参数传给后端,由后端实现分页,并返回需要展示的数据 和 总数据数total变量:

\n

默认传给后端的分页参数格式为:

\n
{\n  \"page\": 1,\n  \"perPage\": 10\n}\n
\n

你可以通过配置pageFieldperPageField来修改传给后端的分页数据格式,如:

\n
{\n  \"pageField\": \"pageNo\",\n  \"perPageField\": \"pageSize\"\n}\n
\n

这样传给后端的参数格式将为:

\n
{\n  \"pageNo\": 1,\n  \"pageSize\": 10\n}\n
\n

你可以通过数据映射,在api中获取这些参数。

\n
{\n    \"type\": \"crud\",\n    \"api\": {\n        \"method\": \"get\",\n        \"url\": \"xxxxxx\",\n        \"data\": {\n            \"pageNo\": \"${page}\",\n            \"pageSize\": \"${perPage}\",\n            ... // 一些其他参数\n        }\n    }\n}\n
\n

分页有两种模式:

\n
1. 知道数据总数

如果后端可以知道数据总数时,接口返回格式如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"items\": [\n      {\n        // 每一行的数据。\n        \"id\": 1,\n        \"xxx\": \"xxxx\"\n      }\n    ],\n\n    \"total\": 200 // 注意这里不是当前请求返回的 items 的长度,而是数据库一共有多少条数据,用于生成分页,\n  }\n}\n
\n

该模式下,会自动计算总页码数,渲染出有页码的分页组件

\n
2. 不知道数据总数

如果后端无法知道数据总数,那么可以返回hasNext字段,来标识是否有下一页。

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"items\": [\n      {\n        // 每个成员的数据。\n        \"id\": 1,\n        \"xxx\": \"xxxx\"\n      }\n    ],\n\n    \"hasNext\": true // 标识是否有下一页。\n  }\n}\n
\n

这样 amis 会在配置分页组件的地方,渲染出一个简单的页面跳转控件。

\n

批量操作

headerToolbar或者footerToolbar数组中添加bulkActions字符串,并且在 crud 上配置bulkActions行为按钮数组,可以实现选中表格项并批量操作的功能。

\n
\n

批量操作会默认将下面数据添加到数据域中以供按钮行为使用

\n
    \n
  • items Array<object> 选中的行数据。
  • \n
  • rows items 的别名,推荐用 items。
  • \n
  • unselectedItems Array<object> 没选中的行数据也可获取。
  • \n
  • ids Array<number|string> 前提是行数据中有 id 字段,或者有指定的 primaryField 字段。
  • \n
  • 第一行所有行数据 还有第一行的所有行数据也会包含进去。
  • \n
\n

你可以通过数据映射,在api中获取这些参数。

\n

数据统计

headerToolbar或者footerToolbar数组中添加statistics字符串,可以实现简单的数据统计功能

\n
\n

加载更多

headerToolbar或者footerToolbar数组中添加load-more字符串,可以实现点击加载更多功能。

\n
\n

显隐显示查询条件表单

headerToolbar或者footerToolbar数组中添加filter-toggler字符串,并且在 crud 中配置"filterTogglable": true后,可以渲染一个可以切换显示查询表单的功能按钮

\n
\n

拖拽排序

通过配置"draggable": true和保存排序接口saveOrderApi,可以实现拖拽排序功能,

\n
\n

同样的,前端是不会处理排序结果,需要后端调用接口saveOrderApi来保存新的顺序

\n

发送方式默认为POST,会包含以下信息。

\n
    \n
  • ids 字符串如: 2,3,1,4,5,6 用 id 来记录新的顺序。 前提是你的列表接口返回了 id 字段。另外如果你的 primaryField 不是 id,则需要配置如: primaryField: "order_id"。注意:无论你配置成什么 primayField,这个字段名始终是 ids。
  • \n
  • rows Array<Item> 数组格式,新的顺序,数组里面包含所有原始信息。
  • \n
  • insertAfter 或者 insertBefore 这是 amis 生成的 diff 信息,对象格式,key 为目标成员的 primaryField 值,即 id,value 为数组,数组中存放成员 primaryField 值。如:

    \n
    {\n  \"insertAfter\": {\n    \"2\": [\"1\", \"3\"],\n    \"6\": [\"4\", \"5\"]\n  }\n}\n
    \n

    表示:成员 1 和成员 3 插入到了成员 2 的后面。成员 4 和 成员 5 插入到了 成员 6 的后面。

    \n
  • \n
\n

你可以通过数据映射,在api中获取这些参数。

\n

如下:

\n
{\n  \"saveOrderApi\": {\n    \"url\": \"/api/xxxx\",\n    \"data\": {\n      \"ids\": \"${ids}\"\n    }\n  }\n}\n
\n

这样就只会发送 ids 了。

\n

单条操作

当操作对象是单条数据时这类操作叫单条操作,比如:编辑、删除、通过、拒绝等等。CRUD 的 table 模式可以在 column 通过放置按钮来完成(其他模式参考 table 模式)。比如编辑就是添加个按钮行为是弹框类型的按钮或者添加一个页面跳转类型的按钮把当前行数据的 id 放在 query 中传过去、删除操作就是配置一个按钮行为是 AJAX 类型的按钮,将数据通过 api 发送给后端完成。

\n

CRUD 中不限制有多少个单条操作、添加一个操作对应的添加一个按钮就行了。CRUD 在处理按钮行为的时候会把当前行的完整数据传递过去,如果你的按钮行为是弹出时,还会包含一下信息:

\n
    \n
  • hasNext boolean 当按钮行为是弹框时,还会携带这个数据可以用来判断当前页中是否有下一条数据。
  • \n
  • hasPrev boolean 当按钮行为是弹框时,还会携带这个数据可以判断用来当前页中是否有上一条数据。
  • \n
  • index number 当按钮行为是弹框时,还会携带这个数据可以用来获取当前行数据在这一页中的位置。
  • \n
  • prevIndex number
  • \n
  • nextIndex number
  • \n
\n

你可以通过数据映射,在api中获取这些参数。

\n

如果你的按钮类型是 ajax,你也可以限定只发送部分数据比如。

\n
{\n  \"type\": \"button\",\n  \"label\": \"删除\",\n  \"actionType\": \"ajax\",\n  \"api\": \"delete:/api/xxxx/$id\",\n  \"confirmText\": \"确定要删除?\"\n}\n
\n

上面这个例子就会发送 id 字段了,如果想要全部发送过去同时还想添加点别的字段就这样:

\n
{\n  \"type\": \"button\",\n  \"label\": \"删除\",\n  \"actionType\": \"ajax\",\n  \"api\": {\n    \"method\": \"post\",\n    \"url\": \"/api/xxxx/$id\",\n    \"data\": {\n      \"&\": \"$$\",\n      \"op\": \"delete\"\n    }\n  },\n  \"confirmText\": \"确定要删除?\"\n}\n
\n

过滤条件参数同步地址栏

默认 CRUD 会将过滤条件参数同步至浏览器地址栏中,

\n

不过,如果你了解 数据链 的话,在开启同步地址栏时,地址栏中的参数数据会合并到顶层的数据链中,可能会造成一些预期中的问题,例如:会自动给某些同名的表单项设置默认值等。可以手动设置syncLocation: false来关闭此特性

\n

前端一次性加载

如果你的数据并不是很大,而且后端不方便做分页和条件过滤操作,那么通过配置loadDataOnce实现前端一次性加载并支持分页和条件过滤操作

\n
\n

配置一次性加载后,基本的分页、快速排序操作将会在前端进行完成。如果想实现前端检索,需要用到数据映射功能:

\n
\n

上例使用了数据映射中的filter过滤器,在前端实现了engine列的搜索功能。

\n
\n

注意:如果你的数据量较大,请务必使用服务端分页的方案,过多的前端数据展示,会显著影响前端页面的性能

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringtype 指定为 CRUD 渲染器
modestring"table""table" 、 "cards" 或者 "list"
titlestring""可设置成空,当设置成空时,没有标题栏
classNamestring表格外层 Dom 的类名
apiAPICRUD 用来获取列表数据的 api。
loadDataOnceboolean是否一次性加载所有数据(前端分页)
loadDataOnceFetchOnFilterbooleantrue在开启 loadDataOnce 时,filter 时是否去重新请求 api
sourcestring数据映射接口返回某字段的值,不设置会默认把接口返回的items或者rows填充进mode区域
filterForm设置过滤器,当该表单提交后,会把数据带给当前 mode 刷新列表。
filterTogglablebooleanfalse是否可显隐过滤器
filterDefaultVisiblebooleantrue设置过滤器默认是否可见。
initFetchbooleantrue是否初始化的时候拉取数据, 只针对有 filter 的情况, 没有 filter 初始都会拉取数据
intervalnumber3000刷新时间(最低 3000)
silentPollingbooleanfalse配置刷新时是否隐藏加载动画
stopAutoRefreshWhenstring""通过表达式来配置停止刷新的条件
stopAutoRefreshWhenModalIsOpenbooleanfalse当有弹框时关闭自动刷新,关闭弹框又恢复
syncLocationbooleantrue是否将过滤条件的参数同步到地址栏
draggablebooleanfalse是否可通过拖拽排序
itemDraggableOnboolean表达式来配置是否可拖拽排序
saveOrderApiAPI保存排序的 api。
quickSaveApiAPI快速编辑后用来批量保存的 API。
quickSaveItemApiAPI快速编辑配置成及时保存时使用的 API。
bulkActionsArray<Action>批量操作列表,配置后,表格可进行选中操作。
defaultCheckedbooleanfalse当可批量操作时,默认是否全部勾选。
messagesObject覆盖消息提示,如果不指定,将采用 api 返回的 message
messages.fetchFailedstring获取失败时提示
messages.saveOrderFailedstring保存顺序失败提示
messages.saveOrderSuccessstring保存顺序成功提示
messages.quickSaveFailedstring快速保存失败提示
messages.quickSaveSuccessstring快速保存成功提示
primaryFieldstring"id"设置 ID 字段名。
defaultParamsObject设置默认 filter 默认参数,会在查询的时候一起发给后端
pageFieldstring"page"设置分页页码字段名。
perPageFieldstring"perPage"设置分页一页显示的多少条数据的字段名。注意:最好与 defaultParams 一起使用,请看下面例子。
perPageAvailableArray<number>[5, 10, 20, 50, 100]设置一页显示多少条数据下拉框可选条数。
orderFieldstring设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。
hideQuickSaveBtnbooleanfalse隐藏顶部快速保存提示
autoJumpToTopOnPagerChangebooleanfalse当切分页的时候,是否自动跳顶部。
syncResponse2Querybooleantrue将返回数据同步到过滤器上。
keepItemSelectionOnPageChangebooleantrue保留条目选择,默认分页、搜素后,用户选择条目会被清空,开启此选项后会保留用户选择,可以实现跨页面批量操作。
labelTplstring单条描述模板,keepItemSelectionOnPageChange设置为true后会把所有已选择条目列出来,此选项可以用来定制条目展示文案。
headerToolbarArray['bulkActions', 'pagination']顶部工具栏配置
footerToolbarArray['statistics', 'pagination']底部工具栏配置
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "数据源接口数据结构要求", - "fragment": "%E6%95%B0%E6%8D%AE%E6%BA%90%E6%8E%A5%E5%8F%A3%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%A6%81%E6%B1%82", - "fullPath": "#%E6%95%B0%E6%8D%AE%E6%BA%90%E6%8E%A5%E5%8F%A3%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%A6%81%E6%B1%82", - "level": 2 - }, - { - "label": "功能", - "fragment": "%E5%8A%9F%E8%83%BD", - "fullPath": "#%E5%8A%9F%E8%83%BD", - "level": 2, - "children": [ - { - "label": "增", - "fragment": "%E5%A2%9E", - "fullPath": "#%E5%A2%9E", - "level": 3 - }, - { - "label": "删", - "fragment": "%E5%88%A0", - "fullPath": "#%E5%88%A0", - "level": 3 - }, - { - "label": "改", - "fragment": "%E6%94%B9", - "fullPath": "#%E6%94%B9", - "level": 3 - }, - { - "label": "查", - "fragment": "%E6%9F%A5", - "fullPath": "#%E6%9F%A5", - "level": 3 - } - ] - }, - { - "label": "展示模式", - "fragment": "%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "Table 表格模式", - "fragment": "table-%E8%A1%A8%E6%A0%BC%E6%A8%A1%E5%BC%8F", - "fullPath": "#table-%E8%A1%A8%E6%A0%BC%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "List 列表模式", - "fragment": "list-%E5%88%97%E8%A1%A8%E6%A8%A1%E5%BC%8F", - "fullPath": "#list-%E5%88%97%E8%A1%A8%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "Cards 卡片模式", - "fragment": "cards-%E5%8D%A1%E7%89%87%E6%A8%A1%E5%BC%8F", - "fullPath": "#cards-%E5%8D%A1%E7%89%87%E6%A8%A1%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "查询条件表单", - "fragment": "%E6%9F%A5%E8%AF%A2%E6%9D%A1%E4%BB%B6%E8%A1%A8%E5%8D%95", - "fullPath": "#%E6%9F%A5%E8%AF%A2%E6%9D%A1%E4%BB%B6%E8%A1%A8%E5%8D%95", - "level": 2 - }, - { - "label": "配置默认请求参数", - "fragment": "%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0", - "level": 2 - }, - { - "label": "数据源接口轮训", - "fragment": "%E6%95%B0%E6%8D%AE%E6%BA%90%E6%8E%A5%E5%8F%A3%E8%BD%AE%E8%AE%AD", - "fullPath": "#%E6%95%B0%E6%8D%AE%E6%BA%90%E6%8E%A5%E5%8F%A3%E8%BD%AE%E8%AE%AD", - "level": 2 - }, - { - "label": "列配置", - "fragment": "%E5%88%97%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%88%97%E9%85%8D%E7%BD%AE", - "level": 2, - "children": [ - { - "label": "排序检索", - "fragment": "%E6%8E%92%E5%BA%8F%E6%A3%80%E7%B4%A2", - "fullPath": "#%E6%8E%92%E5%BA%8F%E6%A3%80%E7%B4%A2", - "level": 3 - }, - { - "label": "快速搜索", - "fragment": "%E5%BF%AB%E9%80%9F%E6%90%9C%E7%B4%A2", - "fullPath": "#%E5%BF%AB%E9%80%9F%E6%90%9C%E7%B4%A2", - "level": 3 - }, - { - "label": "快速过滤", - "fragment": "%E5%BF%AB%E9%80%9F%E8%BF%87%E6%BB%A4", - "fullPath": "#%E5%BF%AB%E9%80%9F%E8%BF%87%E6%BB%A4", - "level": 3 - }, - { - "label": "快速编辑", - "fragment": "%E5%BF%AB%E9%80%9F%E7%BC%96%E8%BE%91", - "fullPath": "#%E5%BF%AB%E9%80%9F%E7%BC%96%E8%BE%91", - "level": 3, - "children": [ - { - "label": "指定编辑表单项类型", - "fragment": "%E6%8C%87%E5%AE%9A%E7%BC%96%E8%BE%91%E8%A1%A8%E5%8D%95%E9%A1%B9%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E6%8C%87%E5%AE%9A%E7%BC%96%E8%BE%91%E8%A1%A8%E5%8D%95%E9%A1%B9%E7%B1%BB%E5%9E%8B", - "level": 4 - }, - { - "label": "内联模式", - "fragment": "%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "level": 4 - }, - { - "label": "即时保存", - "fragment": "%E5%8D%B3%E6%97%B6%E4%BF%9D%E5%AD%98", - "fullPath": "#%E5%8D%B3%E6%97%B6%E4%BF%9D%E5%AD%98", - "level": 4 - } - ] - } - ] - }, - { - "label": "顶部和底部工具栏", - "fragment": "%E9%A1%B6%E9%83%A8%E5%92%8C%E5%BA%95%E9%83%A8%E5%B7%A5%E5%85%B7%E6%A0%8F", - "fullPath": "#%E9%A1%B6%E9%83%A8%E5%92%8C%E5%BA%95%E9%83%A8%E5%B7%A5%E5%85%B7%E6%A0%8F", - "level": 2, - "children": [ - { - "label": "分页", - "fragment": "%E5%88%86%E9%A1%B5", - "fullPath": "#%E5%88%86%E9%A1%B5", - "level": 3 - }, - { - "label": "批量操作", - "fragment": "%E6%89%B9%E9%87%8F%E6%93%8D%E4%BD%9C", - "fullPath": "#%E6%89%B9%E9%87%8F%E6%93%8D%E4%BD%9C", - "level": 3 - }, - { - "label": "数据统计", - "fragment": "%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1", - "fullPath": "#%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1", - "level": 3 - }, - { - "label": "加载更多", - "fragment": "%E5%8A%A0%E8%BD%BD%E6%9B%B4%E5%A4%9A", - "fullPath": "#%E5%8A%A0%E8%BD%BD%E6%9B%B4%E5%A4%9A", - "level": 3 - }, - { - "label": "显隐显示查询条件表单", - "fragment": "%E6%98%BE%E9%9A%90%E6%98%BE%E7%A4%BA%E6%9F%A5%E8%AF%A2%E6%9D%A1%E4%BB%B6%E8%A1%A8%E5%8D%95", - "fullPath": "#%E6%98%BE%E9%9A%90%E6%98%BE%E7%A4%BA%E6%9F%A5%E8%AF%A2%E6%9D%A1%E4%BB%B6%E8%A1%A8%E5%8D%95", - "level": 3 - } - ] - }, - { - "label": "拖拽排序", - "fragment": "%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F", - "fullPath": "#%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F", - "level": 2 - }, - { - "label": "单条操作", - "fragment": "%E5%8D%95%E6%9D%A1%E6%93%8D%E4%BD%9C", - "fullPath": "#%E5%8D%95%E6%9D%A1%E6%93%8D%E4%BD%9C", - "level": 2 - }, - { - "label": "过滤条件参数同步地址栏", - "fragment": "%E8%BF%87%E6%BB%A4%E6%9D%A1%E4%BB%B6%E5%8F%82%E6%95%B0%E5%90%8C%E6%AD%A5%E5%9C%B0%E5%9D%80%E6%A0%8F", - "fullPath": "#%E8%BF%87%E6%BB%A4%E6%9D%A1%E4%BB%B6%E5%8F%82%E6%95%B0%E5%90%8C%E6%AD%A5%E5%9C%B0%E5%9D%80%E6%A0%8F", - "level": 2 - }, - { - "label": "前端一次性加载", - "fragment": "%E5%89%8D%E7%AB%AF%E4%B8%80%E6%AC%A1%E6%80%A7%E5%8A%A0%E8%BD%BD", - "fullPath": "#%E5%89%8D%E7%AB%AF%E4%B8%80%E6%AC%A1%E6%80%A7%E5%8A%A0%E8%BD%BD", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/date.html b/gh-pages/docs/components/date.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/date.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/date_4d93d99.js b/gh-pages/docs/components/date_4d93d99.js deleted file mode 100644 index 73795f33..00000000 --- a/gh-pages/docs/components/date_4d93d99.js +++ /dev/null @@ -1,65 +0,0 @@ -amis.define('docs/components/date.md', function(require, exports, module, define) { - - module.exports = { - "title": "Date 日期时间", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Date", - "icon": null, - "order": 39, - "html": "

用于展示日期

\n

基本使用

\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n

配置展示格式

例如你想将某一个时间值,以 xxxx年xx月xx日 xx时xx分xx秒 这样的格式输出,那么查找 moment 文档可知配置格式应为 YYYY年MM月DD日 HH时mm分ss秒,即:

\n
\n

配置数据格式

如果你的数据值默认不是X格式(即时间戳格式),那么需要配置valueformat参数用于解析当前时间值

\n

例如下面value值为:"2020/4/14 19:59:50",查阅 moment 文档可知,需要配置数据格式为 "YYYY/MM/DD HH:mm:ss",然后我们配置输出格式format,输出指定格式日期:

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"date";在 Form 中用作静态展示,为"static-date"
classNamestring外层 CSS 类名
valuestring显示的颜色值
namestring在其他组件中,时,用作变量映射
placeholderstring-占位内容
formatstringYYYY-MM-DD展示格式
valueFormatstringX数据格式,默认为时间戳
fromNowbooleanfalsefromNow
updateFrequencybooleanfalseupdateFrequency
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - }, - { - "label": "配置展示格式", - "fragment": "%E9%85%8D%E7%BD%AE%E5%B1%95%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%B1%95%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "配置数据格式", - "fragment": "%E9%85%8D%E7%BD%AE%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/dialog.html b/gh-pages/docs/components/dialog.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/dialog.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/dialog_470fe73.js b/gh-pages/docs/components/dialog_470fe73.js deleted file mode 100644 index 8e43971d..00000000 --- a/gh-pages/docs/components/dialog_470fe73.js +++ /dev/null @@ -1,111 +0,0 @@ -amis.define('docs/components/dialog.md', function(require, exports, module, define) { - - module.exports = { - "title": "Dialog 对话框", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Dialog 对话框", - "icon": null, - "order": 41, - "html": "

Dialog 弹框 主要由 Action 触发,主要展示一个对话框以供用户操作。

\n

基本用法

\n

配置尺寸

\n

多级弹框

\n

弹框中配置表单

基本使用

\n

提交表单 或 ajax 请求

弹框中通过配置formajax行为按钮,可以实现form提交和ajax请求操作。

\n
\n

提交表单 或 ajax 请求 后不关闭弹框

默认情况下,当弹框中配置了 form 并进行了提交表单操作(confirm)或进行了ajax请求,请求成功后,会自动关闭当前弹框,你可以通过手动设置"close": true 来禁止该默认特性。

\n
\n

feedback 反馈弹框

feedback 反馈弹框是指,在 ajax 请求后,可以显示一个弹框,进行反馈操作

\n

基本使用

\n

弹框中配置 feedback

关闭 feedback 弹框时,同时关闭上层弹框

当你在弹框中配置了 feedback,操作之后,你希望关闭当前 feedback 弹框同时,关闭上层的弹框,具体有两种方式

\n
1. 不请求接口,直接关闭

feedbackactions中配置 "actionType": "close" 的按钮

\n
\n
2. 请求接口,请求成功后,关闭所有弹框

需要在 feedback 的 body 中添加 Form 组件,并配置"actionType": "confirm"

\n
\n
\n

注意上面的例子:如果你的触发feedback的按钮actionTypeajax时,为需要额外在按钮上配置"close": true

\n
\n

关闭 feedback 弹框时,不同时关闭上层弹框

改场景只适用于不请求接口关闭弹框的场景,需要在 feedback 层添加"skipRestOnCancel": true

\n
\n

根据条件显示 feedback

可以根据条件弹出,例如下面这个例子,只有当接口返回的时间戳可以整除 2 时才显示弹框。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"dialog" 指定为 Dialog 渲染器
titleSchemaNode弹出层标题
bodySchemaNode往 Dialog 内容区加内容
sizestring指定 dialog 大小,支持: xssmmdlg
bodyClassNamestringmodal-bodyDialog body 区域的样式类名
closeOnEscbooleanfalse是否支持按 Esc 关闭 Dialog
showCloseButtonbooleantrue是否显示右上角的关闭按钮
showErrorMsgbooleantrue是否在弹框左下角显示报错信息
disabledbooleanfalse如果设置此属性,则该 Dialog 只读没有提交操作。
actionsArray<Action>【确认】和【取消】如果想不显示底部按钮,可以配置:[]
dataobject支持数据映射,如果不设定将默认将触发按钮的上下文中继承数据。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置尺寸", - "fragment": "%E9%85%8D%E7%BD%AE%E5%B0%BA%E5%AF%B8", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%B0%BA%E5%AF%B8", - "level": 2 - }, - { - "label": "多级弹框", - "fragment": "%E5%A4%9A%E7%BA%A7%E5%BC%B9%E6%A1%86", - "fullPath": "#%E5%A4%9A%E7%BA%A7%E5%BC%B9%E6%A1%86", - "level": 2 - }, - { - "label": "弹框中配置表单", - "fragment": "%E5%BC%B9%E6%A1%86%E4%B8%AD%E9%85%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E5%BC%B9%E6%A1%86%E4%B8%AD%E9%85%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 2, - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 3 - }, - { - "label": "提交表单 或 ajax 请求", - "fragment": "%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95-%E6%88%96-ajax-%E8%AF%B7%E6%B1%82", - "fullPath": "#%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95-%E6%88%96-ajax-%E8%AF%B7%E6%B1%82", - "level": 3 - }, - { - "label": "提交表单 或 ajax 请求 后不关闭弹框", - "fragment": "%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95-%E6%88%96-ajax-%E8%AF%B7%E6%B1%82-%E5%90%8E%E4%B8%8D%E5%85%B3%E9%97%AD%E5%BC%B9%E6%A1%86", - "fullPath": "#%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95-%E6%88%96-ajax-%E8%AF%B7%E6%B1%82-%E5%90%8E%E4%B8%8D%E5%85%B3%E9%97%AD%E5%BC%B9%E6%A1%86", - "level": 3 - } - ] - }, - { - "label": "feedback 反馈弹框", - "fragment": "feedback-%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "fullPath": "#feedback-%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "level": 2, - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 3 - }, - { - "label": "弹框中配置 feedback", - "fragment": "%E5%BC%B9%E6%A1%86%E4%B8%AD%E9%85%8D%E7%BD%AE-feedback", - "fullPath": "#%E5%BC%B9%E6%A1%86%E4%B8%AD%E9%85%8D%E7%BD%AE-feedback", - "level": 3, - "children": [ - { - "label": "关闭 feedback 弹框时,同时关闭上层弹框", - "fragment": "%E5%85%B3%E9%97%AD-feedback-%E5%BC%B9%E6%A1%86%E6%97%B6-%E5%90%8C%E6%97%B6%E5%85%B3%E9%97%AD%E4%B8%8A%E5%B1%82%E5%BC%B9%E6%A1%86", - "fullPath": "#%E5%85%B3%E9%97%AD-feedback-%E5%BC%B9%E6%A1%86%E6%97%B6-%E5%90%8C%E6%97%B6%E5%85%B3%E9%97%AD%E4%B8%8A%E5%B1%82%E5%BC%B9%E6%A1%86", - "level": 4 - }, - { - "label": "关闭 feedback 弹框时,不同时关闭上层弹框", - "fragment": "%E5%85%B3%E9%97%AD-feedback-%E5%BC%B9%E6%A1%86%E6%97%B6-%E4%B8%8D%E5%90%8C%E6%97%B6%E5%85%B3%E9%97%AD%E4%B8%8A%E5%B1%82%E5%BC%B9%E6%A1%86", - "fullPath": "#%E5%85%B3%E9%97%AD-feedback-%E5%BC%B9%E6%A1%86%E6%97%B6-%E4%B8%8D%E5%90%8C%E6%97%B6%E5%85%B3%E9%97%AD%E4%B8%8A%E5%B1%82%E5%BC%B9%E6%A1%86", - "level": 4 - } - ] - }, - { - "label": "根据条件显示 feedback", - "fragment": "%E6%A0%B9%E6%8D%AE%E6%9D%A1%E4%BB%B6%E6%98%BE%E7%A4%BA-feedback", - "fullPath": "#%E6%A0%B9%E6%8D%AE%E6%9D%A1%E4%BB%B6%E6%98%BE%E7%A4%BA-feedback", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/divider.html b/gh-pages/docs/components/divider.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/divider.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/divider_efe5635.js b/gh-pages/docs/components/divider_efe5635.js deleted file mode 100644 index 489e87af..00000000 --- a/gh-pages/docs/components/divider_efe5635.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/divider.md', function(require, exports, module, define) { - - module.exports = { - "title": "Divider 分割线", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Divider 分割线", - "icon": null, - "order": 42, - "html": "

基本用法

\n

不同样式

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"dialog" 指定为 Dialog 渲染器
classNamestring外层 Dom 的类名
lineStylestring"dashed"分割线的样式,支持dashedsolid
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "不同样式", - "fragment": "%E4%B8%8D%E5%90%8C%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E4%B8%8D%E5%90%8C%E6%A0%B7%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/drawer.html b/gh-pages/docs/components/drawer.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/drawer.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/drawer_3ee7135.js b/gh-pages/docs/components/drawer_3ee7135.js deleted file mode 100644 index 7c53f14a..00000000 --- a/gh-pages/docs/components/drawer_3ee7135.js +++ /dev/null @@ -1,77 +0,0 @@ -amis.define('docs/components/drawer.md', function(require, exports, module, define) { - - module.exports = { - "title": "Drawer 抽屉", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Drawer 抽屉", - "icon": null, - "order": 43, - "html": "

基本用法

\n

抽屉尺寸

\n

指定弹出方向

\n

可拖拽抽屉大小

配置"resizable": true,可以拖拽调整drawer大小

\n
\n

不显示蒙层

\n

点击抽屉外自动关闭

配置"closeOnOutside":true

\n

显示蒙层

\n

不显示蒙层

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"drawer" 指定为 Drawer 渲染器
titleSchemaNode弹出层标题
bodySchemaNode往 Drawer 内容区加内容
sizestring指定 Drawer 大小,支持: xssmmdlg
bodyClassNamestringmodal-bodyDrawer body 区域的样式类名
closeOnEscbooleanfalse是否支持按 Esc 关闭 Drawer
closeOnOutsidebooleanfalse点击内容区外是否关闭 Drawer
overlaybooleantrue是否显示蒙层
resizablebooleanfalse是否可通过拖拽改变 Drawer 大小
actionsArray<Action>【确认】和【取消】可以不设置,默认只有两个按钮。
dataobject支持 数据映射,如果不设定将默认将触发按钮的上下文中继承数据。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "抽屉尺寸", - "fragment": "%E6%8A%BD%E5%B1%89%E5%B0%BA%E5%AF%B8", - "fullPath": "#%E6%8A%BD%E5%B1%89%E5%B0%BA%E5%AF%B8", - "level": 2 - }, - { - "label": "指定弹出方向", - "fragment": "%E6%8C%87%E5%AE%9A%E5%BC%B9%E5%87%BA%E6%96%B9%E5%90%91", - "fullPath": "#%E6%8C%87%E5%AE%9A%E5%BC%B9%E5%87%BA%E6%96%B9%E5%90%91", - "level": 2 - }, - { - "label": "可拖拽抽屉大小", - "fragment": "%E5%8F%AF%E6%8B%96%E6%8B%BD%E6%8A%BD%E5%B1%89%E5%A4%A7%E5%B0%8F", - "fullPath": "#%E5%8F%AF%E6%8B%96%E6%8B%BD%E6%8A%BD%E5%B1%89%E5%A4%A7%E5%B0%8F", - "level": 2 - }, - { - "label": "不显示蒙层", - "fragment": "%E4%B8%8D%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "fullPath": "#%E4%B8%8D%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "level": 2 - }, - { - "label": "点击抽屉外自动关闭", - "fragment": "%E7%82%B9%E5%87%BB%E6%8A%BD%E5%B1%89%E5%A4%96%E8%87%AA%E5%8A%A8%E5%85%B3%E9%97%AD", - "fullPath": "#%E7%82%B9%E5%87%BB%E6%8A%BD%E5%B1%89%E5%A4%96%E8%87%AA%E5%8A%A8%E5%85%B3%E9%97%AD", - "level": 2, - "children": [ - { - "label": "显示蒙层", - "fragment": "%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "fullPath": "#%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "level": 3 - }, - { - "label": "不显示蒙层", - "fragment": "%E4%B8%8D%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "fullPath": "#%E4%B8%8D%E6%98%BE%E7%A4%BA%E8%92%99%E5%B1%82", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/dropdown-button.html b/gh-pages/docs/components/dropdown-button.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/dropdown-button.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/dropdown-button_9d8957d.js b/gh-pages/docs/components/dropdown-button_9d8957d.js deleted file mode 100644 index 655af2d2..00000000 --- a/gh-pages/docs/components/dropdown-button_9d8957d.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/dropdown-button.md', function(require, exports, module, define) { - - module.exports = { - "title": "DropDownButton", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "DropDownButton", - "icon": null, - "order": 44, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringdropdown-button类型
labelstring按钮文本
classNamestring外层 CSS 类名
blockboolean块状样式
sizestring尺寸,支持'xs''sm''md''lg'
alignstring位置,可选'left''right'
buttonsArray<action>配置下拉按钮
caretIconstringcaretIcon
iconOnlyboolean只显示icon
defaultIsOpenedboolean默认是否打开
closeOnOutsideboolean点击外侧区域是否收起
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/each.html b/gh-pages/docs/components/each.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/each.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/each_dbf646e.js b/gh-pages/docs/components/each_dbf646e.js deleted file mode 100644 index 05c5daa0..00000000 --- a/gh-pages/docs/components/each_dbf646e.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/each.md', function(require, exports, module, define) { - - module.exports = { - "title": "Each 循环渲染器", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Each 循环渲染器", - "icon": null, - "order": 45, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"each"指定为 Each 组件
valuearray[]用于循环的值
namestring获取数据域中变量,支持 数据映射
itemsobject使用value中的数据,循环输出渲染器。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/array.html b/gh-pages/docs/components/form/array.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/array.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/array_281ba79.js b/gh-pages/docs/components/form/array_281ba79.js deleted file mode 100644 index cb36595e..00000000 --- a/gh-pages/docs/components/form/array_281ba79.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/array.md', function(require, exports, module, define) { - - module.exports = { - "title": "Array 数组输入框", - "description": null, - "type": 0, - "group": null, - "menuName": "Array 数组输入框", - "icon": null, - "order": 3, - "html": "

普通表单项,其实就是 Combo 的一个 flat 用法。

\n

基本用法

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"array"指明为array组件
itemsstringAPI配置单项表单类型
addableboolean是否可新增。
removableboolean是否可删除
draggablebooleanfalse是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段
draggableTipstring可拖拽的提示文字,默认为:"可通过拖动每行中的【交换】按钮进行顺序调整"
addButtonTextstring"新增"新增按钮文字
minLengthnumber限制最小长度
maxLengthnumber限制最大长度
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/button-group.html b/gh-pages/docs/components/form/button-group.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/button-group.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/button-group_302a6cd.js b/gh-pages/docs/components/form/button-group_302a6cd.js deleted file mode 100644 index bf9909ad..00000000 --- a/gh-pages/docs/components/form/button-group_302a6cd.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/button-group.md', function(require, exports, module, define) { - - module.exports = { - "title": "Button-Group 按钮集合", - "description": null, - "type": 0, - "group": null, - "menuName": "Button-Group", - "icon": null, - "order": 6, - "html": "

基本用法

可以用作按钮组,进行按钮的合并展示。

\n
\n

作为选择器表单项

当不配置 buttons 属性时,button-group还可以作为 选择类表单项 使用。

\n
\n

更多属性查看 选择类表单项文档

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
multiplebooleanfalse多选
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
autoFillobject自动填充
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "作为选择器表单项", - "fragment": "%E4%BD%9C%E4%B8%BA%E9%80%89%E6%8B%A9%E5%99%A8%E8%A1%A8%E5%8D%95%E9%A1%B9", - "fullPath": "#%E4%BD%9C%E4%B8%BA%E9%80%89%E6%8B%A9%E5%99%A8%E8%A1%A8%E5%8D%95%E9%A1%B9", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/button-toolbar.html b/gh-pages/docs/components/form/button-toolbar.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/button-toolbar.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/button-toolbar_ecc5c9a.js b/gh-pages/docs/components/form/button-toolbar_ecc5c9a.js deleted file mode 100644 index e250667a..00000000 --- a/gh-pages/docs/components/form/button-toolbar_ecc5c9a.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/button-toolbar.md', function(require, exports, module, define) { - - module.exports = { - "title": "Button-Toolbar 按钮工具栏", - "description": null, - "type": 0, - "group": null, - "menuName": "Button-Toolbar", - "icon": null, - "order": 5, - "html": "

默认按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以使用 button-toolbar 组件

\n

基本使用

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"button-toolbar"指定为 ButtonToolbar 组件
buttonsArray<行为按钮>按钮组
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/button.html b/gh-pages/docs/components/form/button.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/button.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/button_59dbe73.js b/gh-pages/docs/components/form/button_59dbe73.js deleted file mode 100644 index 83747bc0..00000000 --- a/gh-pages/docs/components/form/button_59dbe73.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/form/button.md', function(require, exports, module, define) { - - module.exports = { - "title": "Button 按钮", - "description": null, - "type": 0, - "group": null, - "menuName": "Button", - "icon": null, - "order": 4, - "html": "

form中除了支持 行为按钮以外,还支持一些特定的按钮。

\n

基本用法

\n

提交表单

请配置"actionType": "submit""type": "submit"按钮,可以触发表单提交行为,

\n
\n

重置表单

请配置"actionType": "reset""type": "reset"按钮,可以触发表单提交行为。

\n
\n

属性表

Action 行为按钮

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "提交表单", - "fragment": "%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95", - "fullPath": "#%E6%8F%90%E4%BA%A4%E8%A1%A8%E5%8D%95", - "level": 2 - }, - { - "label": "重置表单", - "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/chain-select.html b/gh-pages/docs/components/form/chain-select.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/chain-select.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/chain-select_5730717.js b/gh-pages/docs/components/form/chain-select_5730717.js deleted file mode 100644 index b2267ccc..00000000 --- a/gh-pages/docs/components/form/chain-select_5730717.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/chain-select.md', function(require, exports, module, define) { - - module.exports = { - "title": "Chain-Select 链式下拉框", - "description": null, - "type": 0, - "group": null, - "menuName": "Chain-Select", - "icon": null, - "order": 7, - "html": "

基本用法

无限级别下拉,只支持单选,且必须和 source 搭配,通过 API 拉取数据,只要 API 有返回结果,就能一直无限级别下拉下去。

\n
\n
\n

source接口中配置的参数waitSeconds=1maxLevel=4是测试接口所需参数,实际使用自己接口时不需要添加这两个参数

\n
\n

暴露参数

为了帮助后端接口获取当前选择器状态,chained-select 会默认给 source 接口的数据域中,添加若干个参数:

\n
    \n
  • value: 选中的表单项值;
  • \n
  • level: 当前拉取数据时的层级,
  • \n
  • parentId: 上一级选项的值,数据格式基于配置的joinValuesextractValue属性
  • \n
  • parent: 上一级选项的完整的数据格式
  • \n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
autoCompletestringAPI自动选中
delimiterstring,拼接符
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "暴露参数", - "fragment": "%E6%9A%B4%E9%9C%B2%E5%8F%82%E6%95%B0", - "fullPath": "#%E6%9A%B4%E9%9C%B2%E5%8F%82%E6%95%B0", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/checkbox.html b/gh-pages/docs/components/form/checkbox.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/checkbox.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/checkbox_0f3c4a4.js b/gh-pages/docs/components/form/checkbox_0f3c4a4.js deleted file mode 100644 index 7f0ff5dd..00000000 --- a/gh-pages/docs/components/form/checkbox_0f3c4a4.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/checkbox.md', function(require, exports, module, define) { - - module.exports = { - "title": "Checkbox 勾选框", - "description": null, - "type": 0, - "group": null, - "menuName": "Checkbox", - "icon": null, - "order": 8, - "html": "

基本用法

\n

配置真假值

默认情况:

\n
    \n
  • 勾选框勾选时,表单项值为:true
  • \n
  • 勾选框取消勾选时,表单项值为:false
  • \n
\n
\n

如果你想调整这个值,可以配置trueValuefalseValue

\n
\n

勾选上例中的勾选框,观察数据域变化,会发现勾选后值为1,而取消勾选后为0

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明 ## 二级标题
optionstring选项说明
trueValueanytrue标识真值
falseValueany"false"标识假值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置真假值", - "fragment": "%E9%85%8D%E7%BD%AE%E7%9C%9F%E5%81%87%E5%80%BC", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%9C%9F%E5%81%87%E5%80%BC", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/checkboxes.html b/gh-pages/docs/components/form/checkboxes.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/checkboxes.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/checkboxes_b3f66f0.js b/gh-pages/docs/components/form/checkboxes_b3f66f0.js deleted file mode 100644 index cb41bee2..00000000 --- a/gh-pages/docs/components/form/checkboxes_b3f66f0.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/checkboxes.md', function(require, exports, module, define) { - - module.exports = { - "title": "Checkboxes 复选框", - "description": null, - "type": 0, - "group": null, - "menuName": "Checkboxes", - "icon": null, - "order": 9, - "html": "

基本用法

\n

展示多行

可以配置columnsCount属性调整展示列的个数

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
delimeterstringfalse拼接符
labelFieldstring"label"选项标签字段
valueFieldstring"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
columnsCountnumber1选项按几列显示,默认为一列
checkAllbooleanfalse是否支持全选
defaultCheckAllbooleanfalse默认是否全选
creatablebooleanfalse新增选项
createBtnLabelstring"新增选项"新增选项
addControlsArray<表单项>自定义新增表单项
addApiAPI配置新增选项接口
editablebooleanfalse编辑选项
editControlsArray<表单项>自定义编辑表单项
editApiAPI配置编辑选项接口
removablebooleanfalse删除选项
deleteApiAPI配置删除选项接口
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "展示多行", - "fragment": "%E5%B1%95%E7%A4%BA%E5%A4%9A%E8%A1%8C", - "fullPath": "#%E5%B1%95%E7%A4%BA%E5%A4%9A%E8%A1%8C", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/city.html b/gh-pages/docs/components/form/city.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/city.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/city_b2ae470.js b/gh-pages/docs/components/form/city_b2ae470.js deleted file mode 100644 index 9a114898..00000000 --- a/gh-pages/docs/components/form/city_b2ae470.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/form/city.md', function(require, exports, module, define) { - - module.exports = { - "title": "City 城市选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "City", - "icon": null, - "order": 10, - "html": "

城市选择器,可用于让用户输入城市。

\n

基本用法

\n

观察数据域中表单项的值,存储的是位置邮编。

\n

配置选择级别

可以通过设置 allowDistrictallowCity 设置用户选择级别,例如只选择省份:

\n
\n

获取更多选项信息

表单项值默认格式是编码(即 code),如果你想要详细点的信息,可以把 extractValue 设置成 false

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
allowCitybooleantrue允许选择城市
allowDistrictbooleantrue允许选择区域
extractValuebooleantrue默认 true 是否抽取值,如果设置成 false 值格式会变成对象,包含 codeprovincecitydistrict 文字信息。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置选择级别", - "fragment": "%E9%85%8D%E7%BD%AE%E9%80%89%E6%8B%A9%E7%BA%A7%E5%88%AB", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%80%89%E6%8B%A9%E7%BA%A7%E5%88%AB", - "level": 2 - }, - { - "label": "获取更多选项信息", - "fragment": "%E8%8E%B7%E5%8F%96%E6%9B%B4%E5%A4%9A%E9%80%89%E9%A1%B9%E4%BF%A1%E6%81%AF", - "fullPath": "#%E8%8E%B7%E5%8F%96%E6%9B%B4%E5%A4%9A%E9%80%89%E9%A1%B9%E4%BF%A1%E6%81%AF", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/color.html b/gh-pages/docs/components/form/color.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/color.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/color_2e3cfe6.js b/gh-pages/docs/components/form/color_2e3cfe6.js deleted file mode 100644 index 50c1eeea..00000000 --- a/gh-pages/docs/components/form/color_2e3cfe6.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/color.md', function(require, exports, module, define) { - - module.exports = { - "title": "Color 颜色选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "Color", - "icon": null, - "order": 11, - "html": "

基本用法

\n

选择器预设颜色值

颜色选择器底部预设有会写可选的颜色值,默认为:['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF']

\n

你可以配置presetColors数组进行自定义。

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
formatstringhex请选择 hexhlsrgb或者rgba
presetColorsArray<string>见选择器预设颜色值选择器底部的默认颜色,数组内为空则不显示默认颜色
allowCustomColorbooleantruefalse时只能选择颜色,使用 presetColors 设定颜色选择范围
clearableboolean"label"是否显示清除按钮
resetValuestring""清除后,表单项值调整成该值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "选择器预设颜色值", - "fragment": "%E9%80%89%E6%8B%A9%E5%99%A8%E9%A2%84%E8%AE%BE%E9%A2%9C%E8%89%B2%E5%80%BC", - "fullPath": "#%E9%80%89%E6%8B%A9%E5%99%A8%E9%A2%84%E8%AE%BE%E9%A2%9C%E8%89%B2%E5%80%BC", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/combo.html b/gh-pages/docs/components/form/combo.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/combo.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/combo_d115739.js b/gh-pages/docs/components/form/combo_d115739.js deleted file mode 100644 index 9c565a7e..00000000 --- a/gh-pages/docs/components/form/combo_d115739.js +++ /dev/null @@ -1,107 +0,0 @@ -amis.define('docs/components/form/combo.md', function(require, exports, module, define) { - - module.exports = { - "title": "Combo 组合", - "description": null, - "type": 0, - "group": null, - "menuName": "Combo", - "icon": null, - "order": 12, - "html": "

组合模式,支持自由组合多个表单项。当设置成单选时数据格式为对象,当设置成多选时数据格式为数组,数组成员是对象(flat 模式可以直接是某个表单单项的数值)。

\n

基本使用

配置controls属性,组合多个表单项

\n
\n

多行展示模式

默认,combo 内表单项是横着展示一排,如果想换行展示,可以配置"multiLine": true

\n
\n

多选模式

默认,combo 为单选模式,可以配置"multiple": true实现多选模式

\n
\n

限制个数

多选模式下,可以配置minLengthmaxLength配置该 Combo 可添加的条数

\n
\n

值格式

观察下例中表单数据域值的变化,可以发现:

\n
    \n
  • 单选模式时,数据格式为对象
  • \n
  • 多选模式时,数据格式为数组,数组成员是对象
  • \n
\n
\n

打平值

默认多选模式下,数据格式是对象数组的形式,当你配置的组合中只有一个表单项时,可以配置"flat": true,将值进行打平处理。

\n
\n

查看上例表单数据域,可以看到打平后数据格式如下:

\n
{\n  \"combo2\": [\"aaa\", \"bbb\"]\n}\n
\n

唯一验证

可以在配置的controls项上,配置"unique": true,指定当前表单项不可重复

\n
\n

上例中,textselect都配置了"unique": true,新增多条 combo,在任意两个text输入框的值相同时,提交时都会报错"当前值不唯一",而select选择框也不可选择重复的选项

\n

拖拽排序

多选模式下,可以配置"draggable": true实现拖拽调整排序

\n
\n

条件分支

默认 Combo 渲染的成员是固定表单项的,成员的类型时一致,如果不一致怎么办?这里可以设置条件分支来给不同的成员设置不同的表单项。

\n

如下面的栗子,定义了两种类型:文本和数字,用户新增的时候可以选择是新增文本还是数字。区分是文字和数字的方式是根据成员数据中的 type 字段来决定。

\n
\n
    \n
  • conditions Array<Condition> 数组,每个成员是一种类型
  • \n
  • conditions[x].label 类型名称
  • \n
  • conditions[x].test 表达式,目标成员数据是否属于这个类型?
  • \n
  • conditions[x].scaffold 初始数据,当新增的时候直接使用此数据。
  • \n
  • conditions[x].controls 该类型的表单设置。
  • \n
  • typeSwitchable 类型是否允许切换,如果设置成 true 会多一个类型切换的按钮。
  • \n
\n

Tabs 模式

默认成员是一个一个排列的,如果数据比较多有点让人眼花缭乱。所以 Combo 支持了 tabs 的排列方式。

\n
\n
    \n
  • tabsMode boolean 用来开启此模式
  • \n
  • tabsStyle string 样式,可选:linecard 或者 radio.
  • \n
  • tabsLabelTpl 用来生成标题的模板,默认为:成员 ${index|plus}
  • \n
\n

注意:这是新引入的功能,目前还不支持拖拽组合使用。且此模式只有多选时才能生效。

\n

获取父级数据

默认情况下,Combo 内表达项无法获取父级数据域的数据,如下,我们添加 Combo 表单项时,尽管 Combo 内的文本框的name与父级数据域中的super_text变量同名,但是没有自动映射值。

\n
\n

可以配置"canAccessSuperData": true开启此特性,如下,配置了该配置项后,添加 Combo 的text表单项会自动映射父级数据域的同名变量

\n
\n

同步更新内部表单项

配置canAccessSuperData可以获取父级数据域值,但是为了效率,在父级数据域变化的时候,默认 combo 内部是不会进行同步的

\n

如下,添加一组 combo,然后可以看到默认会映射父级变量值123,但是当你在更改父级数据域super_text文本框值后,combo 内部文本框并没有同步更新

\n
\n

如果想实现内部同步更新,需要如下配置:

\n
    \n
  • 配置"strictMode": false
  • \n
  • 配置syncFields字符串数组,数组项是需要同步的变量名
  • \n
\n

以上面为例,我们在 combo 上配置"strictMode": false"syncFields": ["super_text"],即可实现同步

\n
\n

设置序号

默认 Combo 数据域中,每一项会有一个隐藏变量index,可以利用 Tpl 组件,显示当前项序号

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
formClassNamestring单组表单项的类名
controlsArray<表单项>组合展示的表单项
controls[x].columnClassNamestring列的类名,可以用它配置列宽度。默认平均分配。
controls[x].uniqueboolean设置当前列值是否唯一,即不允许重复选择。
multiplebooleanfalse是否多选
multiLinebooleanfalse默认是横着展示一排,设置以后竖着展示
minLengthnumber最少添加的条数
maxLengthnumber最多添加的条数
flatbooleanfalse是否将结果扁平化(去掉 name),只有当 controls 的 length 为 1 且 multiple 为 true 的时候才有效。
joinValuesbooleantrue默认为 true 当扁平化开启的时候,是否用分隔符的形式发送给后端,否则采用 array 的方式。
delimeterstringfalse当扁平化开启并且 joinValues 为 true 时,用什么分隔符。
addablebooleanfalse是否可新增
removablebooleanfalse是否可删除
deleteApiAPI如果配置了,则删除前会发送一个 api,请求成功才完成删除
deleteConfirmTextstring"确认要删除?"当配置 deleteApi 才生效!删除时用来做用户确认
draggablebooleanfalse是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段
draggableTipstring"可通过拖动每行中的【交换】按钮进行顺序调整"可拖拽的提示文字
addButtonTextstring"新增"新增按钮文字
scaffoldobject{}单组表单项初始值
canAccessSuperDatabooleanfalse指定是否可以自动获取上层的数据并映射到表单项上
conditionsobject数组的形式包含所有条件的渲染类型,单个数组内的test 为判断条件,数组内的controls为符合该条件后渲染的schema
typeSwitchablebooleanfalse是否可切换条件,配合conditions使用
noBorderbooleanfalse单组表单项是否显示边框
strictModebooleantrue默认为严格模式,设置为 false 时,当其他表单项更新是,里面的表单项也可以及时获取,否则不会。
syncFieldsArray<string>true配置同步字段。只有 strictMode 为 false 时有效。如果 combo 层级比较深,底层的获取外层的数据可能不同步。但是给 combo 配置这个属性就能同步下来。输入格式:["os"]
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "多行展示模式", - "fragment": "%E5%A4%9A%E8%A1%8C%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%A4%9A%E8%A1%8C%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "多选模式", - "fragment": "%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "限制个数", - "fragment": "%E9%99%90%E5%88%B6%E4%B8%AA%E6%95%B0", - "fullPath": "#%E9%99%90%E5%88%B6%E4%B8%AA%E6%95%B0", - "level": 2 - }, - { - "label": "值格式", - "fragment": "%E5%80%BC%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E5%80%BC%E6%A0%BC%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "打平值", - "fragment": "%E6%89%93%E5%B9%B3%E5%80%BC", - "fullPath": "#%E6%89%93%E5%B9%B3%E5%80%BC", - "level": 3 - } - ] - }, - { - "label": "唯一验证", - "fragment": "%E5%94%AF%E4%B8%80%E9%AA%8C%E8%AF%81", - "fullPath": "#%E5%94%AF%E4%B8%80%E9%AA%8C%E8%AF%81", - "level": 2 - }, - { - "label": "拖拽排序", - "fragment": "%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F", - "fullPath": "#%E6%8B%96%E6%8B%BD%E6%8E%92%E5%BA%8F", - "level": 2 - }, - { - "label": "条件分支", - "fragment": "%E6%9D%A1%E4%BB%B6%E5%88%86%E6%94%AF", - "fullPath": "#%E6%9D%A1%E4%BB%B6%E5%88%86%E6%94%AF", - "level": 2 - }, - { - "label": "Tabs 模式", - "fragment": "tabs-%E6%A8%A1%E5%BC%8F", - "fullPath": "#tabs-%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "获取父级数据", - "fragment": "%E8%8E%B7%E5%8F%96%E7%88%B6%E7%BA%A7%E6%95%B0%E6%8D%AE", - "fullPath": "#%E8%8E%B7%E5%8F%96%E7%88%B6%E7%BA%A7%E6%95%B0%E6%8D%AE", - "level": 2 - }, - { - "label": "同步更新内部表单项", - "fragment": "%E5%90%8C%E6%AD%A5%E6%9B%B4%E6%96%B0%E5%86%85%E9%83%A8%E8%A1%A8%E5%8D%95%E9%A1%B9", - "fullPath": "#%E5%90%8C%E6%AD%A5%E6%9B%B4%E6%96%B0%E5%86%85%E9%83%A8%E8%A1%A8%E5%8D%95%E9%A1%B9", - "level": 2 - }, - { - "label": "设置序号", - "fragment": "%E8%AE%BE%E7%BD%AE%E5%BA%8F%E5%8F%B7", - "fullPath": "#%E8%AE%BE%E7%BD%AE%E5%BA%8F%E5%8F%B7", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/date-range.html b/gh-pages/docs/components/form/date-range.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/date-range.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/date-range_cf725ad.js b/gh-pages/docs/components/form/date-range_cf725ad.js deleted file mode 100644 index 083b7590..00000000 --- a/gh-pages/docs/components/form/date-range_cf725ad.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/date-range.md', function(require, exports, module, define) { - - module.exports = { - "title": "Date-Range 日期范围", - "description": null, - "type": 0, - "group": null, - "menuName": "Date-Range", - "icon": null, - "order": 15, - "html": "

基本用法

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
formatstringX日期选择器值格式
inputFormatstringYYYY-DD-MM日期选择器显示格式
placeholderstring"请选择日期范围"占位文本
shortcutsstring日期快捷键
minDatestring限制最小日期,用法同 限制范围
maxDatestring限制最大日期,用法同 限制范围
utcbooleanfalse保存UTC值
clearablebooleantrue是否可清除
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/date.html b/gh-pages/docs/components/form/date.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/date.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/date_2b84501.js b/gh-pages/docs/components/form/date_2b84501.js deleted file mode 100644 index 417732aa..00000000 --- a/gh-pages/docs/components/form/date_2b84501.js +++ /dev/null @@ -1,103 +0,0 @@ -amis.define('docs/components/form/date.md', function(require, exports, module, define) { - - module.exports = { - "title": "Date 日期", - "description": null, - "type": 0, - "group": null, - "menuName": "Date", - "icon": null, - "order": 13, - "html": "

基本用法

\n

显示格式

选中任意日期,可以看到默认显示日期的格式是像2020-04-14这样的格式,如果你想要自定义显示格式,那么可以配置inputFormat

\n

例如你想显示2020年04月14日这样的格式,查找 moment 文档可知配置格式应为 YYYY年MM月DD日,即:

\n
\n

选中任意日期,观察显示格式

\n

值格式

选中任意日期,可以看到默认表单项的值格式是像1591862818这样的时间戳格式。

\n
\n

如果你想要其他格式的日期值,,那么可以配置format参数用于调整表单项的值格式。

\n

例如你调整值为2020-04-14这样的格式,查找 moment 文档可知配置格式应为 YYYY-MM-DD,即:

\n
\n

选中任意日期,观察数据域中表单项值的变化

\n

默认值

可以设置value属性,设置日期选择器的默认值

\n

基本配置

配置符合当前 值格式 的默认值。

\n
\n

相对值

value 还支持类似像"+1days"这样的相对值,更加便捷的配置默认值

\n
\n

上例中配置了"value": "+1days",默认就会选中明天。

\n

支持的相对值关键字有:

\n
    \n
  • today: 当前日期
  • \n
  • daydays: 天
  • \n
  • weekweeks: 日
  • \n
  • monthmonths: 月
  • \n
  • yearyears: 年
  • \n
\n

限制范围

可以通过配置maxDateminDate显示可选范围

\n

固定时间值

[[7]]

\n

支持相对值

范围限制也支持设置 相对值

\n
\n

支持模板

也支持通过模板,设置自定义值。

\n

来一个常见例子,配置两个选择开始时间结束时间的时间选择器,需要满足:开始时间不能小于结束时间结束时间也不能大于开始时间,。

\n
\n

快捷键

你也可以配置shortcuts属性支持快捷选择日期

\n
\n

上例中我们配置了"shortcuts": ["yesterday" ,"today", "tomorrow"],选择器顶部有将会显示快捷键昨天今天明天

\n

支持的快捷键有

\n
    \n
  • today: 今天
  • \n
  • yesterday: 昨天
  • \n
  • thisweek: 本周一
  • \n
  • thismonth: 本月初
  • \n
  • prevmonth: 上个月初
  • \n
  • prevquarter: 上个季节初
  • \n
  • thisquarter: 本季度初
  • \n
  • tomorrow: 明天
  • \n
  • endofthisweek: 本周日
  • \n
  • endofthismonth:本月底
  • \n
  • {n}daysago : n天前,例如:1daysago,下面用法相同
  • \n
  • {n}dayslater: n天后
  • \n
  • {n}weeksago: n周前
  • \n
  • {n}weekslater: n周后
  • \n
  • {n}monthsago: n月前
  • \n
  • {n}monthslater: n月后
  • \n
  • {n}quartersago: n季度前
  • \n
  • {n}quarterslater: n季度后
  • \n
\n

UTC

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
valuestring默认值
formatstringX日期选择器值格式,更多格式类型请参考 moment
inputFormatstringYYYY-DD-MM日期选择器显示格式,即时间戳格式,更多格式类型请参考 moment
closeOnSelectbooleanfalse点选日期后,是否马上关闭选择框
placeholderstring"请选择日期"占位文本
shortcutsstring日期快捷键
minDatestring限制最小日期
maxDatestring限制最大日期
utcbooleanfalse保存utc值
clearablebooleantrue是否可清除
timeConstrainstobjecttrue请参考: react-datetime
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "显示格式", - "fragment": "%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "值格式", - "fragment": "%E5%80%BC%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E5%80%BC%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "默认值", - "fragment": "%E9%BB%98%E8%AE%A4%E5%80%BC", - "fullPath": "#%E9%BB%98%E8%AE%A4%E5%80%BC", - "level": 2, - "children": [ - { - "label": "基本配置", - "fragment": "%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "相对值", - "fragment": "%E7%9B%B8%E5%AF%B9%E5%80%BC", - "fullPath": "#%E7%9B%B8%E5%AF%B9%E5%80%BC", - "level": 3 - } - ] - }, - { - "label": "限制范围", - "fragment": "%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4", - "fullPath": "#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4", - "level": 2, - "children": [ - { - "label": "固定时间值", - "fragment": "%E5%9B%BA%E5%AE%9A%E6%97%B6%E9%97%B4%E5%80%BC", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E6%97%B6%E9%97%B4%E5%80%BC", - "level": 3 - }, - { - "label": "支持相对值", - "fragment": "%E6%94%AF%E6%8C%81%E7%9B%B8%E5%AF%B9%E5%80%BC", - "fullPath": "#%E6%94%AF%E6%8C%81%E7%9B%B8%E5%AF%B9%E5%80%BC", - "level": 3 - }, - { - "label": "支持模板", - "fragment": "%E6%94%AF%E6%8C%81%E6%A8%A1%E6%9D%BF", - "fullPath": "#%E6%94%AF%E6%8C%81%E6%A8%A1%E6%9D%BF", - "level": 3 - } - ] - }, - { - "label": "快捷键", - "fragment": "%E5%BF%AB%E6%8D%B7%E9%94%AE", - "fullPath": "#%E5%BF%AB%E6%8D%B7%E9%94%AE", - "level": 2 - }, - { - "label": "UTC", - "fragment": "utc", - "fullPath": "#utc", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/datetime-range.html b/gh-pages/docs/components/form/datetime-range.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/datetime-range.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/datetime-range_1aa262b.js b/gh-pages/docs/components/form/datetime-range_1aa262b.js deleted file mode 100644 index 4a9db9ea..00000000 --- a/gh-pages/docs/components/form/datetime-range_1aa262b.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/datetime-range.md', function(require, exports, module, define) { - - module.exports = { - "title": "Datetime-Range 日期时间范围", - "description": null, - "type": 0, - "group": null, - "menuName": "Datetime-Range", - "icon": null, - "order": 16, - "html": "

基本用法

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
formatstringX日期时间选择器值格式
inputFormatstringYYYY-DD-MM日期时间选择器显示格式
placeholderstring"请选择日期范围"占位文本
shortcutsstring日期时间快捷键
minDatestring限制最小日期时间,用法同 限制范围
maxDatestring限制最大日期时间,用法同 限制范围
utcbooleanfalse保存UTC值
clearablebooleantrue是否可清除
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/datetime.html b/gh-pages/docs/components/form/datetime.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/datetime.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/datetime_bb0daae.js b/gh-pages/docs/components/form/datetime_bb0daae.js deleted file mode 100644 index 093c5408..00000000 --- a/gh-pages/docs/components/form/datetime_bb0daae.js +++ /dev/null @@ -1,103 +0,0 @@ -amis.define('docs/components/form/datetime.md', function(require, exports, module, define) { - - module.exports = { - "title": "Datetime 日期时间", - "description": null, - "type": 0, - "group": null, - "menuName": "Datetime", - "icon": null, - "order": 14, - "html": "

基本用法

\n

显示格式

选中任意日期时间,可以看到默认显示日期的格式是像2020-04-14 12:20:10这样的格式,如果你想要自定义显示格式,那么可以配置inputFormat

\n

例如你想显示2020年04月14日 12时20分10秒这样的格式,查找 moment 文档可知配置格式应为 YYYY年MM月DD日 HH时mm分ss秒,即:

\n
\n

选中任意日期时间,观察显示格式

\n

值格式

选中任意日期时间,可以看到默认表单项的值格式是像1591862818这样的时间戳格式。

\n
\n

如果你想要其他格式的日期值,,那么可以配置format参数用于调整表单项的值格式。

\n

例如你调整值为2020-04-14 12:20:10这样的格式,查找 moment 文档可知配置格式应为 YYYY-MM-DD HH:mm:ss,即:

\n
\n

选中任意日期时间,观察数据域中表单项值的变化

\n

默认值

可以设置value属性,设置日期选择器的默认值

\n

基本配置

配置符合当前 值格式 的默认值。

\n
\n

相对值

value 还支持类似像"+1hours"这样的相对值,更加便捷的配置默认值

\n
\n

上例中配置了"value": "+1hours",默认就会选中一小时后的时间。

\n

支持的相对值关键字除了 Date 中的以外,还支持:

\n
    \n
  • now: 当前时间
  • \n
  • minuteminutesminmins: 分钟
  • \n
  • hourhours: 小时
  • \n
\n

限制范围

可以通过配置maxDateminDate显示可选范围

\n

固定时间值

\n

支持相对值

范围限制也支持设置 相对值

\n
\n

支持模板

也支持通过模板,设置自定义值。

\n

来一个常见例子,配置两个选择开始时间结束时间的时间选择器,需要满足:开始时间不能小于结束时间结束时间也不能大于开始时间,。

\n
\n

快捷键

你也可以配置shortcuts属性支持快捷选择日期

\n
\n

上例中我们配置了"shortcuts": ["yesterday" ,"today", "tomorrow"],选择器顶部有将会显示快捷键昨天今天明天

\n

除了支持 的快捷键有

\n

支持的快捷键除了 Date 中的以外,还支持:

\n
    \n
  • now: 现在
  • \n
  • {n}hoursago : n 小时前,例如:1daysago,下面用法相同
  • \n
  • {n}hourslater : n 小时前,例如:1daysago,下面用法相同
  • \n
\n

UTC

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
valuestring默认值
formatstringX日期时间选择器值格式,更多格式类型请参考 moment
inputFormatstringYYYY-MM-DD HH:mm:ss日期时间选择器显示格式,即时间戳格式,更多格式类型请参考 moment
placeholderstring"请选择日期以及时间"占位文本
shortcutsstring日期时间快捷键
minDatestring限制最小日期时间
maxDatestring限制最大日期时间
utcbooleanfalse保存 utc 值
clearablebooleantrue是否可清除
timeConstrainstobjecttrue请参考: react-datetime
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "显示格式", - "fragment": "%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "值格式", - "fragment": "%E5%80%BC%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E5%80%BC%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "默认值", - "fragment": "%E9%BB%98%E8%AE%A4%E5%80%BC", - "fullPath": "#%E9%BB%98%E8%AE%A4%E5%80%BC", - "level": 2, - "children": [ - { - "label": "基本配置", - "fragment": "%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "相对值", - "fragment": "%E7%9B%B8%E5%AF%B9%E5%80%BC", - "fullPath": "#%E7%9B%B8%E5%AF%B9%E5%80%BC", - "level": 3 - } - ] - }, - { - "label": "限制范围", - "fragment": "%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4", - "fullPath": "#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4", - "level": 2, - "children": [ - { - "label": "固定时间值", - "fragment": "%E5%9B%BA%E5%AE%9A%E6%97%B6%E9%97%B4%E5%80%BC", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E6%97%B6%E9%97%B4%E5%80%BC", - "level": 3 - }, - { - "label": "支持相对值", - "fragment": "%E6%94%AF%E6%8C%81%E7%9B%B8%E5%AF%B9%E5%80%BC", - "fullPath": "#%E6%94%AF%E6%8C%81%E7%9B%B8%E5%AF%B9%E5%80%BC", - "level": 3 - }, - { - "label": "支持模板", - "fragment": "%E6%94%AF%E6%8C%81%E6%A8%A1%E6%9D%BF", - "fullPath": "#%E6%94%AF%E6%8C%81%E6%A8%A1%E6%9D%BF", - "level": 3 - } - ] - }, - { - "label": "快捷键", - "fragment": "%E5%BF%AB%E6%8D%B7%E9%94%AE", - "fullPath": "#%E5%BF%AB%E6%8D%B7%E9%94%AE", - "level": 2 - }, - { - "label": "UTC", - "fragment": "utc", - "fullPath": "#utc", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/diff-editor.html b/gh-pages/docs/components/form/diff-editor.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/diff-editor.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/diff-editor_2cdb917.js b/gh-pages/docs/components/form/diff-editor_2cdb917.js deleted file mode 100644 index 681317d9..00000000 --- a/gh-pages/docs/components/form/diff-editor_2cdb917.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/form/diff-editor.md', function(require, exports, module, define) { - - module.exports = { - "title": "DiffEditor 对比编辑器", - "description": null, - "type": 0, - "group": null, - "menuName": "DiffEditor 对比编辑器", - "icon": null, - "order": 17, - "html": "

基本使用

\n

禁用编辑器

左侧编辑器始终不可编辑,右侧编辑器可以通过设置disableddisabledOn,控制是否禁用

\n
\n

diff 数据域中的两个变量

如下例,左侧编辑器中的值,通过"diffValue": "${value1}"获取,右侧编辑器的值,通过设置"name": "value2",自动映射数据域中value2的值

\n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
languagestringjavascript编辑器高亮的语言,可选 支持的语言
diffValueTpl左侧值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "禁用编辑器", - "fragment": "%E7%A6%81%E7%94%A8%E7%BC%96%E8%BE%91%E5%99%A8", - "fullPath": "#%E7%A6%81%E7%94%A8%E7%BC%96%E8%BE%91%E5%99%A8", - "level": 2 - }, - { - "label": "diff 数据域中的两个变量", - "fragment": "diff-%E6%95%B0%E6%8D%AE%E5%9F%9F%E4%B8%AD%E7%9A%84%E4%B8%A4%E4%B8%AA%E5%8F%98%E9%87%8F", - "fullPath": "#diff-%E6%95%B0%E6%8D%AE%E5%9F%9F%E4%B8%AD%E7%9A%84%E4%B8%A4%E4%B8%AA%E5%8F%98%E9%87%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/editor.html b/gh-pages/docs/components/form/editor.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/editor.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/editor_0342b1c.js b/gh-pages/docs/components/form/editor_0342b1c.js deleted file mode 100644 index 8359ed5d..00000000 --- a/gh-pages/docs/components/form/editor_0342b1c.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/editor.md', function(require, exports, module, define) { - - module.exports = { - "title": "Editor 编辑器", - "description": null, - "type": 0, - "group": null, - "menuName": "Editor", - "icon": null, - "order": 19, - "html": "

基本用法

\n

支持的语言

可以设置language配置高亮的语言,支持的语言有:

\n

batccoffeescriptcppcsharpcssdockerfilefsharpgohandlebarshtmlinijavajavascriptjsonlessluamarkdownmsdaxobjective-cphpplaintextpostiatspowershellpugpythonrrazorrubysbscsssolsqlswifttypescriptvbxmlyaml

\n
\n

当然你也可以使用xxx-editor这种形式,例如"type": "json-editor"

\n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
languagestringjavascript编辑器高亮的语言
sizestringmd编辑器高度,取值可以是 mdlgxlxxl
optionsobjectmonaco 编辑器的其它配置,比如是否显示行号等,请参考这里
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "支持的语言", - "fragment": "%E6%94%AF%E6%8C%81%E7%9A%84%E8%AF%AD%E8%A8%80", - "fullPath": "#%E6%94%AF%E6%8C%81%E7%9A%84%E8%AF%AD%E8%A8%80", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/fieldset.html b/gh-pages/docs/components/form/fieldset.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/fieldset.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/fieldset_a7c8a60.js b/gh-pages/docs/components/form/fieldset_a7c8a60.js deleted file mode 100644 index 29814a9f..00000000 --- a/gh-pages/docs/components/form/fieldset_a7c8a60.js +++ /dev/null @@ -1,53 +0,0 @@ -amis.define('docs/components/form/fieldset.md', function(require, exports, module, define) { - - module.exports = { - "title": "FieldSet 表单项集合", - "description": null, - "type": 0, - "group": null, - "menuName": "FieldSet", - "icon": null, - "order": 20, - "html": "

FieldSet 是用于分组展示表单项的一种容器型组件。

\n

基本用法

可以通过配置标题title和表单项数组controls,实现多个表单项分组展示

\n
\n

展示模式

可以通过设置mode调整展示模式,用法同 Form 展示模式

\n

下面group我们配置了"mode": "horizontal",观察显示情况

\n
\n

可折叠

配置"collapsable": true可以实现点击标题折叠显隐表单项。

\n
\n

默认是否折叠

默认是展开的,如果想默认折叠,那么配置"collapsed": false默认折叠。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
classNamestringCSS 类名
headingClassNamestring标题 CSS 类名
bodyClassNamestring内容区域 CSS 类名
titleSchemaNode标题
controlsArray<表单项>表单项集合
modestring展示默认,同 Form 中的模式
collapsablebooleanfalse配置是否可折叠
collapsedbooelan展示默认,同 Form 中的模式
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "展示模式", - "fragment": "%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "可折叠", - "fragment": "%E5%8F%AF%E6%8A%98%E5%8F%A0", - "fullPath": "#%E5%8F%AF%E6%8A%98%E5%8F%A0", - "level": 2, - "children": [ - { - "label": "默认是否折叠", - "fragment": "%E9%BB%98%E8%AE%A4%E6%98%AF%E5%90%A6%E6%8A%98%E5%8F%A0", - "fullPath": "#%E9%BB%98%E8%AE%A4%E6%98%AF%E5%90%A6%E6%8A%98%E5%8F%A0", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/file.html b/gh-pages/docs/components/form/file.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/file.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/file_d0f0212.js b/gh-pages/docs/components/form/file_d0f0212.js deleted file mode 100644 index c917f08a..00000000 --- a/gh-pages/docs/components/form/file_d0f0212.js +++ /dev/null @@ -1,51 +0,0 @@ -amis.define('docs/components/form/file.md', function(require, exports, module, define) { - - module.exports = { - "title": "File 文件上传", - "description": null, - "type": 0, - "group": null, - "menuName": "File", - "icon": null, - "order": 21, - "html": "

基本用法

用来负责文件上传,文件上传成功后会返回文件地址,这个文件地址会作为这个表单项的值,整个表单提交的时候,其实提交的是文件地址,文件上传已经在这个控件中完成了。

\n
\n

限制文件类型

可以配置accept来限制可选择的文件类型,格式是文件后缀名.xxx

\n
\n

想要限制多个类型,则用逗号分隔,例如:.csv,.md

\n

手动上传

如果不希望 File 组件上传,可以配置 asBlob 或者 asBase64,采用这种方式后,组件不再自己上传了,而是直接把文件数据作为表单项的值,文件内容会在 Form 表单提交的接口里面一起带上。

\n
\n

上例中,选择任意文件,然后观察数据域变化;点击提交,amis 自动会调整接口数据格式为FormData

\n

分块上传

如果文件过大,则可能需要使用分块上传

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
recieverAPI上传文件接口
acceptstringtext/plain默认只支持纯文本,要支持其他类型,请配置此属性为文件后缀.xxx
asBase64booleanfalse将文件以base64的形式,赋值给当前组件
asBlobbooleanfalse将文件以二进制的形式,赋值给当前组件
maxSizestring默认没有限制,当设置后,文件大小大于此值将不允许上传。单位为KB
maxLengthnumber默认没有限制,当设置后,一次只允许上传指定数量文件。
multiplebooleanfalse是否多选。
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
delimeterstring,拼接符
autoUploadbooleantrue否选择完就自动开始上传
hideUploadButtonbooleanfalse隐藏上传按钮
stateTextMapobject{ init: '', pending: '等待上传', uploading: '上传中', error: '上传出错', uploaded: '已上传', ready: '' }上传状态文案
fileFieldstringfile如果你不想自己存储,则可以忽略此属性。
downloadUrlbooleanstring""默认显示文件路径的时候会支持直接下载,可以支持加前缀如:http://xx.dom/filename= ,如果不希望这样,可以把当前配置项设置为 false
useChunkboolean"auto""auto"amis 所在服务器,限制了文件上传大小不得超出 10M,所以 amis 在用户选择大文件的时候,自动会改成分块上传模式。
chunkSizenumber5 * 1024 * 1024分块大小
startChunkApiAPIstartChunkApi
chunkApiAPIchunkApi
finishChunkApiAPIfinishChunkApi
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "限制文件类型", - "fragment": "%E9%99%90%E5%88%B6%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E9%99%90%E5%88%B6%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B", - "level": 2 - }, - { - "label": "手动上传", - "fragment": "%E6%89%8B%E5%8A%A8%E4%B8%8A%E4%BC%A0", - "fullPath": "#%E6%89%8B%E5%8A%A8%E4%B8%8A%E4%BC%A0", - "level": 2 - }, - { - "label": "分块上传", - "fragment": "%E5%88%86%E5%9D%97%E4%B8%8A%E4%BC%A0", - "fullPath": "#%E5%88%86%E5%9D%97%E4%B8%8A%E4%BC%A0", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/formitem.html b/gh-pages/docs/components/form/formitem.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/formitem.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/formitem_a7775b1.js b/gh-pages/docs/components/form/formitem_a7775b1.js deleted file mode 100644 index 7733c238..00000000 --- a/gh-pages/docs/components/form/formitem_a7775b1.js +++ /dev/null @@ -1,147 +0,0 @@ -amis.define('docs/components/form/formitem.md', function(require, exports, module, define) { - - module.exports = { - "title": "FormItem 普通表单项", - "description": null, - "type": 0, - "group": null, - "menuName": "Formula 普通表单项", - "icon": null, - "order": 1, - "html": "

表单项 是组成一个表单的基本单位,它具有的一些特性会帮助我们更好地实现表单操作。

\n
\n

所有派生自FormItem的组件,都具有FormItem的特性。

\n
\n

基本用法

最基本的表单项配置像这样:

\n
\n
    \n
  • name: 必填属性,标识表单数据域中,当前表单项值的key
  • \n
  • type: 必填属性,标识表单项类型
  • \n
  • label: 标识表单项的标签
  • \n
\n
\n

所有表单项都只可以配置在form组件中,即formcontrols属性中。

\n
\n

表单项展示

内联模式

通过配置"inline": true,标识当前表单项使用内联模式。

\n
\n

表单项尺寸

可以配置size,来调整表单项的尺寸,支持'xs' | 'sm' | 'md' | 'lg' | 'full',如下:

\n
\n
\n

不同组件的size效果可能会有所不同,具体请参考对应的组件文档。

\n
\n

表单项标签

设置label属性来配置表单项标签。

\n

当表单为水平布局时,左边即便是不设置label为了保持对齐也会留空,如果想要去掉空白,请设置成false

\n
\n

表单项标签提示

配置labelRemark可以实现标签描述提示

\n
\n

配置禁用

静态配置

通过配置"disabled": true来禁用表单项

\n
\n
通过条件配置是否禁用

你也通过表达式配置disabledOn,来实现在某个条件下禁用当前表单项.

\n
\n

配置显隐

静态配置

通过配置"hidden": true或者"visible": false来禁用表单项

\n
\n

上例中的text2被隐藏了。

\n
通过条件配置显隐

你也通过表达式配置hiddenOn,来实现在某个条件下禁用当前表单项.

\n
\n
\n

visiblehiddenvisibleOnhiddenOn除了判断逻辑相反以外,没有任何区别

\n
\n

表单项值

表单项值,即表单项通过用户交互发生变化后,更新表单数据域中同name变量值.

\n
\n

如上例,更改姓名表单项值,可以改变表单数据域中name变量的值。

\n

也支持链式配置 name属性,例如:aaa.bbb

\n
\n

观察上例,这样更改表单项值,会改变数据域中person.name的值

\n
{\n  \"person\": {\n    \"name\": \"xxx\"\n  }\n}\n
\n

配置默认值

通过配置value属性,可以设置表单项的默认值。

\n
\n

value不支持数据映射,也就是说不可以直接配置类似于这样的语法:${xxx},如果想要映射当前数据域中的某个变量,那么设置该表单项name为该变量名就行,如下:

\n
\n

上例中我们表单数据域中有变量"text": "hello world!",然后我们设置表达项"name": "text",这样就可以自动映射值了。

\n

表单项必填

静态配置

通过配置"required": true来标识该表单项为必填。

\n
\n

满足条件校验必填

你也通过表达式配置requiredOn,来实现在某个条件下使当前表单项必填。

\n
\n

格式校验

可以配置validations属性,指定校验当前表单项值的格式

\n

可以通过对象形式配置

\n
\n

同样也可以配置多个格式校验

\n
\n

字符串形式(不推荐)

也可以配置字符串形式来指定,如下例,输入不合法的值,点击提交会报错并显示报错信息

\n
\n

也可以指定多个格式校验,中间用逗号分隔。

\n
\n

如果需要配置参数,例如显示最大值或最小值,则在格式标识符后:和参数

\n

自定义校验信息

amis 会有默认的报错信息,如果你想自定义校验信息,配置validationErrors属性

\n
\n

如果需要获取当前格式校验配置的参数,可以使用$1

\n
\n

表单项值发生变化即校验

默认校验是当进行行为操作时,对表单项进行校验,如果你想每次表单项的值发生变化的时候就校验,请配置"validateOnChange": false

\n

支持的格式校验

    \n
  • isEmptyString 必须是空白字符。注意! 该格式校验是值,校验空白字符,而不是当前表单项是否为空,想校验是否为空,请配置 必填校验
      \n
    • isEmail 必须是 Email。
    • \n
    • isUrl 必须是 Url。
    • \n
    • isNumeric 必须是 数值。
    • \n
    • isAlpha 必须是 字母。
    • \n
    • isAlphanumeric 必须是 字母或者数字。
    • \n
    • isInt 必须是 整形。
    • \n
    • isFloat 必须是 浮点形。
    • \n
    • isLength:length 是否长度正好等于设定值。
    • \n
    • minLength:length 最小长度。
    • \n
    • maxLength:length 最大长度。
    • \n
    • maximum:number 最大值。
    • \n
    • minimum:number 最小值。
    • \n
    • equals:xxx 当前值必须完全等于 xxx。
    • \n
    • equalsField:xxx 当前值必须与 xxx 变量值一致。
    • \n
    • isJson 是否是合法的 Json 字符串。
    • \n
    • notEmptyString 要求输入内容不是空白。
    • \n
    • isUrlPath 是 url 路径。
    • \n
    • matchRegexp:/foo/ 必须命中某个正则。
    • \n
    • matchRegexp1:/foo/ 必须命中某个正则。
    • \n
    • matchRegexp2:/foo/ 必须命中某个正则。
    • \n
    • matchRegexp3:/foo/ 必须命中某个正则。
    • \n
    • matchRegexp4:/foo/ 必须命中某个正则。
    • \n
    \n
  • \n
\n

服务端校验

也可以通过接口返回错误信息,实现服务端校验

\n
\n

点击提交,api 接口返回中,需要在 errors 变量中,返回某个表单项的报错信息,key值为该表单项的name值。

\n

如上,接口返回的格式如下,提交后,test2表达项会显示报错信息

\n
{\n  \"status\": 422, // 返回非0状态码\n  \"msg\": \"\",\n  \"errors\": {\n    \"test2\": \"服务器端说,这个有错误。\"\n  },\n  \"data\": null\n}\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring指定表单项类型
classNamestring表单最外层类名
inputClassNamestring表单控制器类名
labelClassNamestringlabel 的类名
namestring字段名,指定该表单项提交时的 key
label模板false表单项标签
labelRemarkRemark表单项标签描述
description模板表单项描述
placeholderstring表单项描述
inlineboolean是否为 内联 模式
submitOnChangeboolean是否该表单项值发生变化时就提交当前表单。
disabledboolean当前表单项是否是禁用状态
disabledOn表达式当前表单项是否禁用的条件
visible表达式当前表单项是否禁用的条件
visibleOn表达式当前表单项是否禁用的条件
requiredboolean是否为必填。
requiredOn表达式表达式来配置当前表单项是否为必填。
validations表达式表单项值格式验证,支持设置多个,多个规则用英文逗号隔开。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "表单项展示", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%B1%95%E7%A4%BA", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%B1%95%E7%A4%BA", - "level": 2, - "children": [ - { - "label": "内联模式", - "fragment": "%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "表单项尺寸", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%B0%BA%E5%AF%B8", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%B0%BA%E5%AF%B8", - "level": 3 - }, - { - "label": "表单项标签", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%A0%87%E7%AD%BE", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%A0%87%E7%AD%BE", - "level": 3 - }, - { - "label": "表单项标签提示", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%A0%87%E7%AD%BE%E6%8F%90%E7%A4%BA", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%A0%87%E7%AD%BE%E6%8F%90%E7%A4%BA", - "level": 3 - }, - { - "label": "配置禁用", - "fragment": "%E9%85%8D%E7%BD%AE%E7%A6%81%E7%94%A8", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%A6%81%E7%94%A8", - "level": 3 - }, - { - "label": "配置显隐", - "fragment": "%E9%85%8D%E7%BD%AE%E6%98%BE%E9%9A%90", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%98%BE%E9%9A%90", - "level": 3 - } - ] - }, - { - "label": "表单项值", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%80%BC", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%80%BC", - "level": 2 - }, - { - "label": "配置默认值", - "fragment": "%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E5%80%BC", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E5%80%BC", - "level": 2 - }, - { - "label": "表单项必填", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%BF%85%E5%A1%AB", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%BF%85%E5%A1%AB", - "level": 2, - "children": [ - { - "label": "静态配置", - "fragment": "%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE", - "fullPath": "#%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "满足条件校验必填", - "fragment": "%E6%BB%A1%E8%B6%B3%E6%9D%A1%E4%BB%B6%E6%A0%A1%E9%AA%8C%E5%BF%85%E5%A1%AB", - "fullPath": "#%E6%BB%A1%E8%B6%B3%E6%9D%A1%E4%BB%B6%E6%A0%A1%E9%AA%8C%E5%BF%85%E5%A1%AB", - "level": 3 - } - ] - }, - { - "label": "格式校验", - "fragment": "%E6%A0%BC%E5%BC%8F%E6%A0%A1%E9%AA%8C", - "fullPath": "#%E6%A0%BC%E5%BC%8F%E6%A0%A1%E9%AA%8C", - "level": 2, - "children": [ - { - "label": "字符串形式(不推荐)", - "fragment": "%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%BD%A2%E5%BC%8F-%E4%B8%8D%E6%8E%A8%E8%8D%90-", - "fullPath": "#%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%BD%A2%E5%BC%8F-%E4%B8%8D%E6%8E%A8%E8%8D%90-", - "level": 3 - }, - { - "label": "自定义校验信息", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A0%A1%E9%AA%8C%E4%BF%A1%E6%81%AF", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A0%A1%E9%AA%8C%E4%BF%A1%E6%81%AF", - "level": 3 - }, - { - "label": "表单项值发生变化即校验", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%80%BC%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96%E5%8D%B3%E6%A0%A1%E9%AA%8C", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E5%80%BC%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96%E5%8D%B3%E6%A0%A1%E9%AA%8C", - "level": 3 - }, - { - "label": "支持的格式校验", - "fragment": "%E6%94%AF%E6%8C%81%E7%9A%84%E6%A0%BC%E5%BC%8F%E6%A0%A1%E9%AA%8C", - "fullPath": "#%E6%94%AF%E6%8C%81%E7%9A%84%E6%A0%BC%E5%BC%8F%E6%A0%A1%E9%AA%8C", - "level": 3 - } - ] - }, - { - "label": "服务端校验", - "fragment": "%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%A0%A1%E9%AA%8C", - "fullPath": "#%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%A0%A1%E9%AA%8C", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/formula.html b/gh-pages/docs/components/form/formula.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/formula.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/formula_92cc019.js b/gh-pages/docs/components/form/formula_92cc019.js deleted file mode 100644 index 197ec6f9..00000000 --- a/gh-pages/docs/components/form/formula_92cc019.js +++ /dev/null @@ -1,51 +0,0 @@ -amis.define('docs/components/form/formula.md', function(require, exports, module, define) { - - module.exports = { - "title": "Formula 公式", - "description": null, - "type": 0, - "group": null, - "menuName": "Formula", - "icon": null, - "order": 22, - "html": "

可以设置公式,将公式结果设置到指定表单项上。

\n
\n

该表单项是隐藏的

\n
\n

基本用法

\n

自动应用

\n

手动应用

配置"autoSet": false,然后按钮上配置target,配置值为formulaid值,就可以实现手动触发公式应用

\n
\n
\n

为什么设置id而不是设置name?

\n

因为name值已经用来设置目标变量名了,这个表单项肯定已经存在了,所以不是唯一了,不能够被按钮指定。

\n
\n

条件应用

可以配置condition用来指定作用条件,有两种写法:

\n
    \n
  • 用 tpl 语法,把关联的字段写上如: ${xxx} ${yyy} 意思是当 xxx 和 yyy 的取值结果变化了就再应用一次公式结果。
  • \n
  • 自己写判断如: data.xxx == "a" && data.xxx !== data.__prev.xxx 当 xxx 变化了,且新的值是字符 "a" 时应用,可以写更加复杂的判断。
  • \n
\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
namestring需要应用的表单项name值,公式结果将作用到此处指定的变量中去。
formula表达式应用的公式
condition表达式公式作用条件
initSetbooleantrue初始化时是否设置
autoSetbooleantrue观察公式结果,如果计算结果有变化,则自动应用到变量上
idbooleantrue定义个名字,当某个按钮的目标指定为此值后,会触发一次公式应用。这个机制可以在 autoSet 为 false 时用来手动触发
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "自动应用", - "fragment": "%E8%87%AA%E5%8A%A8%E5%BA%94%E7%94%A8", - "fullPath": "#%E8%87%AA%E5%8A%A8%E5%BA%94%E7%94%A8", - "level": 2 - }, - { - "label": "手动应用", - "fragment": "%E6%89%8B%E5%8A%A8%E5%BA%94%E7%94%A8", - "fullPath": "#%E6%89%8B%E5%8A%A8%E5%BA%94%E7%94%A8", - "level": 2 - }, - { - "label": "条件应用", - "fragment": "%E6%9D%A1%E4%BB%B6%E5%BA%94%E7%94%A8", - "fullPath": "#%E6%9D%A1%E4%BB%B6%E5%BA%94%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/grid.html b/gh-pages/docs/components/form/grid.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/grid.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/grid_9ac0207.js b/gh-pages/docs/components/form/grid_9ac0207.js deleted file mode 100644 index bd36324c..00000000 --- a/gh-pages/docs/components/form/grid_9ac0207.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/grid.md', function(require, exports, module, define) { - - module.exports = { - "title": "Grid 网格", - "description": null, - "type": 0, - "group": null, - "menuName": "Grid", - "icon": null, - "order": 23, - "html": "

支持 Form 内部再用 grid 布局进行渲染组件。

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"grid"指定为 Grid 渲染器
classNamestring外层 Dom 的类名
columnsArray列集合
columns[x]SchemaNode成员可以是其他渲染器
columns[x].controlsArray<表单项>如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合
columns[x].columnClassNameint配置列的 className
columns[x].xsint宽度占比: 1 - 12
columns[x].xsHiddenboolean是否隐藏
columns[x].xsOffsetint偏移量 1 - 12
columns[x].xsPullint靠左的距离占比:1 - 12
columns[x].xsPushint靠右的距离占比: 1 - 12
columns[x].smint宽度占比: 1 - 12
columns[x].smHiddenboolean是否隐藏
columns[x].smOffsetint偏移量 1 - 12
columns[x].smPullint靠左的距离占比:1 - 12
columns[x].smPushint靠右的距离占比: 1 - 12
columns[x].mdint宽度占比: 1 - 12
columns[x].mdHiddenboolean是否隐藏
columns[x].mdOffsetint偏移量 1 - 12
columns[x].mdPullint靠左的距离占比:1 - 12
columns[x].mdPushint靠右的距离占比: 1 - 12
columns[x].lgint宽度占比: 1 - 12
columns[x].lgHiddenboolean是否隐藏
columns[x].lgOffsetint偏移量 1 - 12
columns[x].lgPullint靠左的距离占比:1 - 12
columns[x].lgPushint靠右的距离占比: 1 - 12
\n

更多使用说明,请参看 Grid Props

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/group.html b/gh-pages/docs/components/form/group.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/group.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/group_fe326d1.js b/gh-pages/docs/components/form/group_fe326d1.js deleted file mode 100644 index c5caf18b..00000000 --- a/gh-pages/docs/components/form/group_fe326d1.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/group.md', function(require, exports, module, define) { - - module.exports = { - "title": "Group 表单项组", - "description": null, - "type": 0, - "group": null, - "menuName": "Group", - "icon": null, - "order": 24, - "html": "

表单项,默认都是一行显示一个,Group 组件用于在一行展示多个表单项

\n

基本用法

\n

展示

可以给group组件设置mode调整展示模式,用法同 Form 展示

\n

下面group我们配置了"mode": "horizontal",观察显示情况

\n
\n

当表单在水平模式下时,如果group内表单项设置"label": false,会导致布局错乱,如下

\n
\n

这时可以给group配置label属性,保持和其他表单项布局统一

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
classNamestringCSS 类名
labelstringgroup 的标签
controlsArray<表单项>表单项集合
modestring展示默认,同 Form 中的模式
gapstring表单项之间的间距,可选:xssmnormal
directionstring"horizontal"可以配置水平展示还是垂直展示。对应的配置项分别是:verticalhorizontal
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "展示", - "fragment": "%E5%B1%95%E7%A4%BA", - "fullPath": "#%E5%B1%95%E7%A4%BA", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/hbox.html b/gh-pages/docs/components/form/hbox.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/hbox.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/hbox_70c4e2a.js b/gh-pages/docs/components/form/hbox_70c4e2a.js deleted file mode 100644 index 1fe25847..00000000 --- a/gh-pages/docs/components/form/hbox_70c4e2a.js +++ /dev/null @@ -1,41 +0,0 @@ -amis.define('docs/components/form/hbox.md', function(require, exports, module, define) { - - module.exports = { - "title": "HBox", - "description": null, - "type": 0, - "group": null, - "menuName": "HBox", - "icon": null, - "order": 25, - "html": "

表单内部也可以使用 HBox 布局,实现左右排列。更推荐 Group

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
columnsArray<Column>列内容。每个 column 为一个独立的渲染器。
\n

Column 属性

除了 SchemaNode 支持属性以外,还支持以下几种属性

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
columnClassNamestring配置列的 CSS 类名
controlsArray<表单项>表单项数组,如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2, - "children": [ - { - "label": "Column 属性", - "fragment": "column-%E5%B1%9E%E6%80%A7", - "fullPath": "#column-%E5%B1%9E%E6%80%A7", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/hidden.html b/gh-pages/docs/components/form/hidden.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/hidden.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/hidden_66404f8.js b/gh-pages/docs/components/form/hidden_66404f8.js deleted file mode 100644 index 8041305a..00000000 --- a/gh-pages/docs/components/form/hidden_66404f8.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/form/hidden.md', function(require, exports, module, define) { - - module.exports = { - "title": "Hidden 隐藏字段", - "description": null, - "type": 0, - "group": null, - "menuName": "Hidden 隐藏字段", - "icon": null, - "order": 26, - "html": "

基本用法

默认表单提交,在没有 自定义 API 请求数据 的情况下,只会发送 controls 里面的这些成员,对于隐藏的字段同时又希望提交表单的时候带过去,可以使用 hidden 组件

\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/image.html b/gh-pages/docs/components/form/image.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/image.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/image_c6fe3b6.js b/gh-pages/docs/components/form/image_c6fe3b6.js deleted file mode 100644 index 957461d2..00000000 --- a/gh-pages/docs/components/form/image_c6fe3b6.js +++ /dev/null @@ -1,53 +0,0 @@ -amis.define('docs/components/form/image.md', function(require, exports, module, define) { - - module.exports = { - "title": "Image 图片", - "description": null, - "type": 0, - "group": null, - "menuName": "Image", - "icon": null, - "order": 27, - "html": "

图片格式输入,默认 amis 会直接存储在 FEX 的 hiphoto 里面,提交到 form 是直接的图片 url。

\n

基本用法

\n

限制文件类型

可以配置accept来限制可选择的文件类型,格式是文件后缀名.xxx

\n
\n

想要限制多个类型,则用逗号分隔,例如:.jpg,.png

\n

支持裁剪

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
recieverAPI上传文件接口
acceptstringtext/plain默认只支持image/jpeg, image/jpg, image/png, image/gif,要支持其他类型,请配置此属性为图片后缀.xxx
maxSizestring默认没有限制,当设置后,文件大小大于此值将不允许上传。单位为KB
maxLengthnumber默认没有限制,当设置后,一次只允许上传指定数量文件。
multiplebooleanfalse是否多选。
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
delimeterstring,拼接符
autoUploadbooleantrue否选择完就自动开始上传
hideUploadButtonbooleanfalse隐藏上传按钮
fileFieldstringfile如果你不想自己存储,则可以忽略此属性。
cropboolean{"aspectRatio":""}用来设置是否支持裁剪。
crop.aspectRationumber裁剪比例。浮点型,默认 11:1,如果要设置 16:9 请设置 1.777777777777777716 / 9。。
limitLimit限制图片大小,超出不让上传。
\n

Limit 属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
widthnumber限制图片宽度。
heightnumber限制图片高度。
minWidthnumber限制图片最小宽度。
minHeightnumber限制图片最小高度。
maxWidthnumber限制图片最大宽度。
maxHeightnumber限制图片最大高度。
aspectRationumber限制图片宽高比,格式为浮点型数字,默认 11:1,如果要设置 16:9 请设置 1.777777777777777716 / 9。 如果不想限制比率,请设置空字符串。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "限制文件类型", - "fragment": "%E9%99%90%E5%88%B6%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E9%99%90%E5%88%B6%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B", - "level": 2 - }, - { - "label": "支持裁剪", - "fragment": "%E6%94%AF%E6%8C%81%E8%A3%81%E5%89%AA", - "fullPath": "#%E6%94%AF%E6%8C%81%E8%A3%81%E5%89%AA", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2, - "children": [ - { - "label": "Limit 属性表", - "fragment": "limit-%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#limit-%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/index.html b/gh-pages/docs/components/form/index.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/index_6a74e10.js b/gh-pages/docs/components/form/index_6a74e10.js deleted file mode 100644 index 200097c1..00000000 --- a/gh-pages/docs/components/form/index_6a74e10.js +++ /dev/null @@ -1,193 +0,0 @@ -amis.define('docs/components/form/index.md', function(require, exports, module, define) { - - module.exports = { - "title": "Form 表单", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Form 表单", - "icon": null, - "order": 24, - "html": "

表单是 amis 中核心组件之一,主要作用是提交或者展示表单数据。

\n

基本用法

最基本的用法是配置 表单项 和 提交接口api

\n

如下我们配置姓名和邮箱表单项,并可以填写数据并提交给接口/api/mock2/form/saveForm

\n
\n

表单展示

默认模式

默认展示模式为文字表单项分行显示

\n
\n

水平模式

水平模式,左右摆放,左右比率分配。

\n
\n

可以配置horizontal属性,调整偏移量,格式如下:

\n
"horizontal": {\n    "left": 2,\n    "right": 10,\n    "offset": 2\n}\n
\n

内联模式

使用内联模式展现表单项

\n
\n

实现一行展示多个表单项

使用 group 实现一行显示多个表单项

\n
\n

底部按钮栏

隐藏默认提交按钮

Form 默认会在底部渲染一个提交按钮,用于执行表单的提交行为。你可以通过两种方式去掉这个默认的提交按钮:

\n
    \n
  1. 配置:"submitText": ""
  2. \n
  3. 配置:"actions": []
  4. \n
\n
\n

配置若干自定义按钮

同样,你可以通过 actions 属性,配置任意你想要的行为按钮。

\n
\n

请记住,如果想触发表单提交行为,请配置"actionType": "submit""type": "submit"按钮

\n

去掉表单边框

通过配置"wrapWithPanel": false,可以去掉默认表单边框(包括标题,按钮栏以及边距样式等)。

\n
\n

注意!配置该属性后,titleactions属性将失效并无法渲染,请在表单内自行配置。

\n

固定底部栏

如果表单项较多导致表单过长,而不方便操作底部的按钮栏,可以配置"affixFooter": true属性,将底部按钮栏固定在浏览器底部

\n

表单项数据初始化

表单可以通过配置initApi,实现表单初始化时请求接口,用于展示数据或初始化表单项。

\n
\n

轮训初始化请求

Form 支持轮训初始化接口,步骤如下:

\n
    \n
  1. 配置initApi
  2. \n
  3. 配置 interval:单位为ms,最低值3000,低于该值按3000处理
  4. \n
\n
\n

如果希望在满足某个条件的情况下停止轮训,配置stopAutoRefreshWhen表达式。

\n
\n

静态初始化数据域

我们也可以手动设置 form 的数据域来初始化多个表单项值

\n
\n

数据格式一致性问题

当表单来初始化表单项值时,需要保持数据格式的一致性。

\n

如果表单初始化的值与表单项配置的数据格式不符合,而且用户没有再次操作该表单项,而直接提交表单,那么会将当前默认值原封不动的提交给后端,也许会导致不一致性的问题,我们看一个例子:

\n
\n

上例中, select 我们配置了"multiple": true,预期中,我们希望选中 AC 项时,表单项的数据格式为:"a,c",但是我们表单数据域中,select默认值为"value": ["a", "c"],并不符合我们当前表单项的数据格式配置,这样会导致两个问题:

\n
    \n
  1. 有可能不会默认选中 AC 选项;
  2. \n
  3. 当不操作该表单项,直接提交时,预期是:"a,c",但提交给后端的数据为:["a", "c"],导致了不一致性的问题。
  4. \n
\n
\n

通过 initApi 配置默认值同理,不再赘述

\n
\n

因此一定确保默认值与选择器表单项数据格式配置相匹配。

\n

表单提交

配置api属性,当表单执行提交行为时,会默认将当前表单数据域中的数据使用post方式发送给所配置api

\n
\n

点击提交按钮,会看到发送表单请求,请求数据体为:

\n
{\n  \"name\": \"xxx\",\n  \"email\": \"xxx@xx.com\"\n}\n
\n

当你需要配置特定的请求方式,请求体,header时,使用对象类型 api 配置,并使用 数据映射 进行数据配置。下面示例我们更改了请求方法为PUT,并在原提交数据的基础上添加一个字段"_from"。更多用法查看 API 文档数据映射文档

\n
\n

触发表单提交行为有下面几种方式:

\n
    \n
  1. 默认的提交按钮
  2. \n
  3. 为行为按钮配置"actionType": "submit"
  4. \n
  5. 配置"type": "submit"的按钮
  6. \n
\n

轮训提交请求

通过设置asyncApi,当表单提交发送保存接口后,还会继续轮训请求该接口,默认间隔为3秒,直到返回 finished 属性为 true 才 结束。

\n
\n

如果决定结束轮训的标识字段名不是 finished,请设置finishedField属性,比如:"finishedField": "is_success"

\n

重置表单

配置"type": "reset"或者"actionType": "reset"的按钮,可以实现点击重置表单项值。

\n
\n
\n

请注意:这里的重置是将表单数据域重置到初始状态而不是清空,如果你配置了初始化接口,那么重置操作是会将表单项重置至初始化表单项值

\n
\n

表单数据域调试

配置debug:true可以查看当前表单的数据域数据详情,方便数据映射、表达式等功能调试,如下,你可以修改表单项查看数据域变化

\n
\n
\n

该配置不会展示完整的数据链,只会展示当前表单的数据域

\n
\n

禁用数据链

默认表单是可以获取到完整数据链中的数据的,但是该默认行为不适用于所有场景,例如:

\n

在 CRUD 的列表项中配置弹框,弹框中有一个表单,则该表单项中所有的同name表单项都会根据上层crud的行数据进行初始化,如果你是实现编辑的功能那并没有是什么问题,但是如果你是新建功能,那么这将不符合你的预期,你可以手动设置"canAccessSuperData": false来关闭该行为

\n

提交后行为

表单提交成功后,可以执行一些行为。

\n

重置表单

如果想提交表单成功后,重置当前表单至初始状态,可以配置"resetAfterSubmit": true

\n
\n

编辑表单项,点击提交,成功后会发现表单项的值会重置到初始状态,即空

\n
\n

注意,如果表单项有默认值,则会将该表单项的值重置至该默认值。

\n
\n

跳转页面

配置redirect属性,可以指定表单提交成功后要跳转至的页面

\n
\n

刷新目标组件

配置reload属性为其他组件name值,可以在表单提交成功之后,刷新指定组件。

\n
\n

上例中form提交成功后,会触发namemy_serviceService组件重新请求初始化接口

\n

上面示例是一种组件间联动

\n

将数据域发送给目标组件

配置target属性为目标组件name值,可以在触发提交行为后,将当前表单的数据域发送给目标组件。

\n
\n

第一个表单在提交时,会将它的表单数据域数据发送给detailForm表单,触发detailForm的初始化接口联动,重新请求接口更新数据域,并更新关键字表单项。

\n

上面示例组合使用了 组件间联动接口联动

\n

持久化保存表单项数据

表单默认在重置之后(切换页面、弹框中表单关闭表单),会自动清空掉表单中的所有数据,如果你想持久化保留当前表单项的数据而不清空它,那么配置persistData:true

\n

如果想提交成功后,清空该缓存,则配置"clearPersistDataAfterSubmit": true

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"form" 指定为 Form 渲染器
namestring设置一个名字后,方便其他组件与其通信
modestringnormal表单展示方式,可以是:normalhorizontal 或者 inline
horizontalObject{"left":"col-sm-2", "right":"col-sm-10", "offset":"col-sm-offset-2"}当 mode 为 horizontal 时有用,用来控制 label
titlestring"表单"Form 的标题
submitTextString"提交"默认的提交按钮名称,如果设置成空,则可以把默认按钮去掉。
classNamestring外层 Dom 的类名
controlsArray<表单项>Form 表单项集合
actionsArray<表单项>Form 提交按钮,成员为 Action
messagesObject消息提示覆写,默认消息读取的是 API 返回的消息,但是在此可以覆写它。
messages.fetchSuccessstring获取成功时提示
messages.fetchFailedstring获取失败时提示
messages.saveSuccessstring保存成功时提示
messages.saveFailedstring保存失败时提示
wrapWithPanelbooleantrue是否让 Form 用 panel 包起来,设置为 false 后,actions 将无效。
panelClassNamebooleantrue是否让 Form 用 panel 包起来,设置为 false 后,actions 将无效。
apiAPIForm 用来保存数据的 api。
initApiAPIForm 用来获取初始数据的 api。
intervalnumber3000刷新时间(最低 3000)
silentPollingbooleanfalse配置刷新时是否显示加载动画
stopAutoRefreshWhenstring""通过表达式 来配置停止刷新的条件
initAsyncApiAPIForm 用来获取初始数据的 api,与 initApi 不同的是,会一直轮训请求该接口,直到返回 finished 属性为 true 才 结束。
initFetchbooleantrue设置了 initApi 或者 initAsyncApi 后,默认会开始就发请求,设置为 false 后就不会起始就请求接口
initFetchOnstring用表达式来配置
initFinishedFieldstringfinished设置了 initAsyncApi 后,默认会从返回数据的 data.finished 来判断是否完成,也可以设置成其他的 xxx,就会从 data.xxx 中获取
initCheckIntervalnumber3000设置了 initAsyncApi 以后,默认拉取的时间间隔
asyncApiAPI设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束。
checkIntervalnumber3000轮训请求的时间间隔,默认为 3 秒。设置 asyncApi 才有效
finishedFieldstring"finished"如果决定结束的字段名不是 finished 请设置此属性,比如 is_success
submitOnChangebooleanfalse表单修改即提交
submitOnInitbooleanfalse初始就提交一次
resetAfterSubmitbooleanfalse提交后是否重置表单
primaryFieldstring"id"设置主键 id, 当设置后,检测表单是否完成时(asyncApi),只会携带此数据。
targetstring默认表单提交自己会通过发送 api 保存数据,但是也可以设定另外一个 form 的 name 值,或者另外一个 CRUD 模型的 name 值。 如果 target 目标是一个 Form ,则目标 Form 会重新触发 initApi,api 可以拿到当前 form 数据。如果目标是一个 CRUD 模型,则目标模型会重新触发搜索,参数为当前 Form 数据。当目标是 window 时,会把当前表单的数据附带到页面地址上。
redirectstring设置此属性后,Form 保存成功后,自动跳转到指定页面。支持相对地址,和绝对地址(相对于组内的)。
reloadstring操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 window 则让当前页面整体刷新。
autoFocusbooleanfalse是否自动聚焦。
canAccessSuperDatabooleantrue指定是否可以自动获取上层的数据并映射到表单项上
persistDatabooleantrue指定表单是否开启本地缓存
clearPersistDataAfterSubmitbooleantrue指定表单提交成功后是否清除本地缓存
trimValuesbooleanfalsetrim 当前表单项的每一个值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "表单展示", - "fragment": "%E8%A1%A8%E5%8D%95%E5%B1%95%E7%A4%BA", - "fullPath": "#%E8%A1%A8%E5%8D%95%E5%B1%95%E7%A4%BA", - "level": 2, - "children": [ - { - "label": "默认模式", - "fragment": "%E9%BB%98%E8%AE%A4%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E9%BB%98%E8%AE%A4%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "水平模式", - "fragment": "%E6%B0%B4%E5%B9%B3%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E6%B0%B4%E5%B9%B3%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "内联模式", - "fragment": "%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%86%85%E8%81%94%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "实现一行展示多个表单项", - "fragment": "%E5%AE%9E%E7%8E%B0%E4%B8%80%E8%A1%8C%E5%B1%95%E7%A4%BA%E5%A4%9A%E4%B8%AA%E8%A1%A8%E5%8D%95%E9%A1%B9", - "fullPath": "#%E5%AE%9E%E7%8E%B0%E4%B8%80%E8%A1%8C%E5%B1%95%E7%A4%BA%E5%A4%9A%E4%B8%AA%E8%A1%A8%E5%8D%95%E9%A1%B9", - "level": 3 - }, - { - "label": "底部按钮栏", - "fragment": "%E5%BA%95%E9%83%A8%E6%8C%89%E9%92%AE%E6%A0%8F", - "fullPath": "#%E5%BA%95%E9%83%A8%E6%8C%89%E9%92%AE%E6%A0%8F", - "level": 3, - "children": [ - { - "label": "隐藏默认提交按钮", - "fragment": "%E9%9A%90%E8%97%8F%E9%BB%98%E8%AE%A4%E6%8F%90%E4%BA%A4%E6%8C%89%E9%92%AE", - "fullPath": "#%E9%9A%90%E8%97%8F%E9%BB%98%E8%AE%A4%E6%8F%90%E4%BA%A4%E6%8C%89%E9%92%AE", - "level": 4 - }, - { - "label": "配置若干自定义按钮", - "fragment": "%E9%85%8D%E7%BD%AE%E8%8B%A5%E5%B9%B2%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8C%89%E9%92%AE", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%8B%A5%E5%B9%B2%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8C%89%E9%92%AE", - "level": 4 - } - ] - }, - { - "label": "去掉表单边框", - "fragment": "%E5%8E%BB%E6%8E%89%E8%A1%A8%E5%8D%95%E8%BE%B9%E6%A1%86", - "fullPath": "#%E5%8E%BB%E6%8E%89%E8%A1%A8%E5%8D%95%E8%BE%B9%E6%A1%86", - "level": 3 - }, - { - "label": "固定底部栏", - "fragment": "%E5%9B%BA%E5%AE%9A%E5%BA%95%E9%83%A8%E6%A0%8F", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E5%BA%95%E9%83%A8%E6%A0%8F", - "level": 3 - } - ] - }, - { - "label": "表单项数据初始化", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%95%B0%E6%8D%AE%E5%88%9D%E5%A7%8B%E5%8C%96", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%95%B0%E6%8D%AE%E5%88%9D%E5%A7%8B%E5%8C%96", - "level": 2, - "children": [ - { - "label": "轮训初始化请求", - "fragment": "%E8%BD%AE%E8%AE%AD%E5%88%9D%E5%A7%8B%E5%8C%96%E8%AF%B7%E6%B1%82", - "fullPath": "#%E8%BD%AE%E8%AE%AD%E5%88%9D%E5%A7%8B%E5%8C%96%E8%AF%B7%E6%B1%82", - "level": 3 - }, - { - "label": "静态初始化数据域", - "fragment": "%E9%9D%99%E6%80%81%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E6%8D%AE%E5%9F%9F", - "fullPath": "#%E9%9D%99%E6%80%81%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E6%8D%AE%E5%9F%9F", - "level": 3 - }, - { - "label": "数据格式一致性问题", - "fragment": "%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F%E4%B8%80%E8%87%B4%E6%80%A7%E9%97%AE%E9%A2%98", - "fullPath": "#%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F%E4%B8%80%E8%87%B4%E6%80%A7%E9%97%AE%E9%A2%98", - "level": 3 - } - ] - }, - { - "label": "表单提交", - "fragment": "%E8%A1%A8%E5%8D%95%E6%8F%90%E4%BA%A4", - "fullPath": "#%E8%A1%A8%E5%8D%95%E6%8F%90%E4%BA%A4", - "level": 2, - "children": [ - { - "label": "轮训提交请求", - "fragment": "%E8%BD%AE%E8%AE%AD%E6%8F%90%E4%BA%A4%E8%AF%B7%E6%B1%82", - "fullPath": "#%E8%BD%AE%E8%AE%AD%E6%8F%90%E4%BA%A4%E8%AF%B7%E6%B1%82", - "level": 3 - } - ] - }, - { - "label": "重置表单", - "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 2 - }, - { - "label": "表单数据域调试", - "fragment": "%E8%A1%A8%E5%8D%95%E6%95%B0%E6%8D%AE%E5%9F%9F%E8%B0%83%E8%AF%95", - "fullPath": "#%E8%A1%A8%E5%8D%95%E6%95%B0%E6%8D%AE%E5%9F%9F%E8%B0%83%E8%AF%95", - "level": 2 - }, - { - "label": "禁用数据链", - "fragment": "%E7%A6%81%E7%94%A8%E6%95%B0%E6%8D%AE%E9%93%BE", - "fullPath": "#%E7%A6%81%E7%94%A8%E6%95%B0%E6%8D%AE%E9%93%BE", - "level": 2 - }, - { - "label": "提交后行为", - "fragment": "%E6%8F%90%E4%BA%A4%E5%90%8E%E8%A1%8C%E4%B8%BA", - "fullPath": "#%E6%8F%90%E4%BA%A4%E5%90%8E%E8%A1%8C%E4%B8%BA", - "level": 2, - "children": [ - { - "label": "重置表单", - "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 3 - }, - { - "label": "跳转页面", - "fragment": "%E8%B7%B3%E8%BD%AC%E9%A1%B5%E9%9D%A2", - "fullPath": "#%E8%B7%B3%E8%BD%AC%E9%A1%B5%E9%9D%A2", - "level": 3 - }, - { - "label": "刷新目标组件", - "fragment": "%E5%88%B7%E6%96%B0%E7%9B%AE%E6%A0%87%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%88%B7%E6%96%B0%E7%9B%AE%E6%A0%87%E7%BB%84%E4%BB%B6", - "level": 3 - }, - { - "label": "将数据域发送给目标组件", - "fragment": "%E5%B0%86%E6%95%B0%E6%8D%AE%E5%9F%9F%E5%8F%91%E9%80%81%E7%BB%99%E7%9B%AE%E6%A0%87%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%B0%86%E6%95%B0%E6%8D%AE%E5%9F%9F%E5%8F%91%E9%80%81%E7%BB%99%E7%9B%AE%E6%A0%87%E7%BB%84%E4%BB%B6", - "level": 3 - } - ] - }, - { - "label": "持久化保存表单项数据", - "fragment": "%E6%8C%81%E4%B9%85%E5%8C%96%E4%BF%9D%E5%AD%98%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%95%B0%E6%8D%AE", - "fullPath": "#%E6%8C%81%E4%B9%85%E5%8C%96%E4%BF%9D%E5%AD%98%E8%A1%A8%E5%8D%95%E9%A1%B9%E6%95%B0%E6%8D%AE", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/input-group.html b/gh-pages/docs/components/form/input-group.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/input-group.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/input-group_0207619.js b/gh-pages/docs/components/form/input-group_0207619.js deleted file mode 100644 index fe762724..00000000 --- a/gh-pages/docs/components/form/input-group_0207619.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/input-group.md', function(require, exports, module, define) { - - module.exports = { - "title": "Input-Group 输入框组合", - "description": null, - "type": 0, - "group": null, - "menuName": "Input-Group", - "icon": null, - "order": 28, - "html": "

输入框组合选择器 可用于输入框与其他组件进行组合。

\n

基本用法

\n

校验

input-group 配置校验方法较为特殊,需要配置下面步骤:

\n
    \n
  1. input-group 上配置任意name
  2. \n
  3. input-group 的 controls 内配置的表单项上配置校验规则
  4. \n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
classNamestringCSS 类名
controlsArray<表单项>表单项集合
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "校验", - "fragment": "%E6%A0%A1%E9%AA%8C", - "fullPath": "#%E6%A0%A1%E9%AA%8C", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/list.html b/gh-pages/docs/components/form/list.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/list.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/list_8445f10.js b/gh-pages/docs/components/form/list_8445f10.js deleted file mode 100644 index 42fa3c5c..00000000 --- a/gh-pages/docs/components/form/list_8445f10.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/list.md', function(require, exports, module, define) { - - module.exports = { - "title": "List 列表", - "description": null, - "type": 0, - "group": null, - "menuName": "List", - "icon": null, - "order": 29, - "html": "

基本用法

\n

选项带图片

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
multiplebooleanfalse多选
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
autoFillobject自动填充
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "选项带图片", - "fragment": "%E9%80%89%E9%A1%B9%E5%B8%A6%E5%9B%BE%E7%89%87", - "fullPath": "#%E9%80%89%E9%A1%B9%E5%B8%A6%E5%9B%BE%E7%89%87", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/matrix.html b/gh-pages/docs/components/form/matrix.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/matrix.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/matrix_b19da5c.js b/gh-pages/docs/components/form/matrix_b19da5c.js deleted file mode 100644 index 7cbab356..00000000 --- a/gh-pages/docs/components/form/matrix_b19da5c.js +++ /dev/null @@ -1,65 +0,0 @@ -amis.define('docs/components/form/matrix.md', function(require, exports, module, define) { - - module.exports = { - "title": "Matrix 矩阵", - "description": null, - "type": 0, - "group": null, - "menuName": "Matrix", - "icon": null, - "order": 30, - "html": "

矩阵类型的输入框。

\n

基本用法

\n

单选模式

配置"multiple": false可以设置单选,配置singleSelectMode可以设置单选模式

\n
\n

动态选项

可以配置 source 渲染动态选项

\n
\n

以上面为例,source 接口返回格式如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"ok\",\n  \"data\": {\n    \"columns\": [\n      {\n        \"label\": \"Col A\",\n        \"col\": \"a\"\n      },\n      {\n        \"label\": \"Col B\",\n        \"col\": \"b\"\n      },\n      {\n        \"label\": \"Col C\",\n        \"col\": \"c\"\n      },\n      {\n        \"label\": \"Col D\",\n        \"col\": \"d\"\n      },\n      {\n        \"label\": \"Col E\",\n        \"col\": \"e\"\n      }\n    ],\n    \"rows\": [\n      {\n        \"label\": \"Row 1\",\n        \"rol\": 1\n      },\n      {\n        \"label\": \"Row 2\",\n        \"rol\": 2\n      },\n      {\n        \"label\": \"Row 3\",\n        \"rol\": 3\n      },\n      {\n        \"label\": \"Row 4\",\n        \"rol\": 4\n      },\n      {\n        \"label\": \"Row 5\",\n        \"rol\": 5\n      },\n      {\n        \"label\": \"Row 6\",\n        \"rol\": 6\n      }\n    ]\n  }\n}\n
\n

column 模式

默认为 column 模式,即每列只能单选某个单元格

\n
\n

cell 模式

cell 模式,指全部选项中只能单选某个单元格

\n
\n

row 模式

row 模式,每行只能单选某个单元格

\n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
columnsArray<column>列信息,数组中 label 字段是必须给出的
rowsArray<row>行信息, 数组中 label 字段是必须给出的
rowLabelstring行标题说明
sourceAPIApi 地址,如果选项组不固定,可以通过配置 source 动态拉取。
multiplebooleantrue是否多选
singleSelectModestring"column"设置单选模式,multiplefalse时有效,可设置为cell, row, column 分别为全部选项中只能单选某个单元格、每行只能单选某个单元格,每列只能单选某个单元格
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "单选模式", - "fragment": "%E5%8D%95%E9%80%89%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%8D%95%E9%80%89%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "动态选项", - "fragment": "%E5%8A%A8%E6%80%81%E9%80%89%E9%A1%B9", - "fullPath": "#%E5%8A%A8%E6%80%81%E9%80%89%E9%A1%B9", - "level": 2, - "children": [ - { - "label": "column 模式", - "fragment": "column-%E6%A8%A1%E5%BC%8F", - "fullPath": "#column-%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "cell 模式", - "fragment": "cell-%E6%A8%A1%E5%BC%8F", - "fullPath": "#cell-%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "row 模式", - "fragment": "row-%E6%A8%A1%E5%BC%8F", - "fullPath": "#row-%E6%A8%A1%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/nestedselect.html b/gh-pages/docs/components/form/nestedselect.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/nestedselect.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/nestedselect_5cb111c.js b/gh-pages/docs/components/form/nestedselect_5cb111c.js deleted file mode 100644 index 7bbfecc5..00000000 --- a/gh-pages/docs/components/form/nestedselect_5cb111c.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/form/nestedselect.md', function(require, exports, module, define) { - - module.exports = { - "title": "NestedSelect 级联选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "NestedSelect 级联选择器", - "icon": null, - "order": 31, - "html": "

基本用法

\n

选中父节点是否自动选中子节点

默认选中父节点会自动选中子节点,可以设置"cascade": true,不自动选中子节点

\n
\n

选中父节点,值是否包含子节点

默认选中父节点,是不会带上子节点的值,想要自动带上子节点的值,那么配置"withChildren": true

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
delimeterbooleanfalse拼接符
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
autoFillobject自动填充
cascadebooleanfalse设置 true时,当选中父节点时不自动选择子节点。
withChildrenbooleanfalse设置 true时,选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。
searchPromptTextstring"输入内容进行检索"搜索框占位文本
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "选中父节点是否自动选中子节点", - "fragment": "%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E5%AD%90%E8%8A%82%E7%82%B9", - "fullPath": "#%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E5%AD%90%E8%8A%82%E7%82%B9", - "level": 2 - }, - { - "label": "选中父节点,值是否包含子节点", - "fragment": "%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9-%E5%80%BC%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%AB%E5%AD%90%E8%8A%82%E7%82%B9", - "fullPath": "#%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9-%E5%80%BC%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%AB%E5%AD%90%E8%8A%82%E7%82%B9", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/number.html b/gh-pages/docs/components/form/number.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/number.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/number_25ae740.js b/gh-pages/docs/components/form/number_25ae740.js deleted file mode 100644 index 79ed9fec..00000000 --- a/gh-pages/docs/components/form/number_25ae740.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/number.md', function(require, exports, module, define) { - - module.exports = { - "title": "Number 数字输入框", - "description": null, - "type": 0, - "group": null, - "menuName": "Number", - "icon": null, - "order": 32, - "html": "

基本用法

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
min模板最小值
max模板最大值
stepnumber步长
precisionnumber精度,即小数点后几位
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/options.html b/gh-pages/docs/components/form/options.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/options.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/options_d036671.js b/gh-pages/docs/components/form/options_d036671.js deleted file mode 100644 index 8a70dfa2..00000000 --- a/gh-pages/docs/components/form/options_d036671.js +++ /dev/null @@ -1,247 +0,0 @@ -amis.define('docs/components/form/options.md', function(require, exports, module, define) { - - module.exports = { - "title": "Options 选择器表单项", - "description": null, - "type": 0, - "group": null, - "menuName": "Options 选择器表单项", - "icon": null, - "order": 2, - "html": "

选择器表单项 是指那些(例如下拉选择框)具有选择器特性的表单项

\n

它派生自 表单项,拥有表单项所有的特性。

\n

选项组格式

选择器表单项可以通过配置一组选项(options),可以供给用户选择,如下:

\n
\n

options属性配置的对象数组就是select选择器组件的选项组。

\n

标准格式

{\n    \"options\": [\n        {\n            \"label\": \"xxx1\",\n            \"value\": \"value1\",\n            \"chlidren\": []\n            ... // 其他变量值\n        },\n        {\n            \"label\": \"xxx2\",\n            \"value\": \"value2\",\n            \"chlidren\": []\n            ... // 其他变量值\n        }\n    ]\n}\n
\n

标准的选项格式为对象数组,数组中的每个对象需要两个必备字段:

\n
    \n
  • label:标识当前选项的显示文本,帮助用户选择
  • \n
  • value:标识当前选项的值,用作数据保存和映射
  • \n
  • chlidren:嵌套子选项,只有在 Tree 或 Nested-Select 等支持嵌套功能的组件中才有用
  • \n
\n

查看下面例子,修改选项你会发现数据域会发发生变化,改数据域中该表单项的值为选中选项的value值。

\n
\n

简单格式

也可以配置简单的字符串或数字数组,此时默认labelvalue保持一致

\n
\n

静态选项组 options

可以使用静态方式,配置一组选项组:

\n
\n

动态选项组 source

通过数据域中变量配置

你也可以配置source属性,利用 数据映射,获取当前数据链中的变量

\n
\n

上例中,我们给 select 组件,配置"source": "${items}",获取了当前数据域中的items变量作为选项组。

\n

远程拉取

除了可以通过数据映射获取当前数据域中的变量以外,source还支持配置接口,格式为 API,用于动态返回选项组。

\n
\n

远程拉取接口时,返回的数据结构除了需要满足 amis 接口要求的基本数据结构 以外,必须用"options"作为选项组的key值,如下

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    // 必须用 options 作为选项组的 key 值\n    \"options\": [\n      {\n        \"label\": \"A\",\n        \"value\": \"a\"\n      },\n      {\n        \"label\": \"B\",\n        \"value\": \"b\"\n      },\n      {\n        \"label\": \"C\",\n        \"value\": \"c\"\n      }\n    ]\n  }\n}\n
\n

默认值/自动选中 value

我们知道表单项可以通过配置value属性来设置默认值

\n

而选择器表单项如果设置value属性,为某一个选项中的value值,那么该选择器将自动选中该选项。

\n

静态配置

静态配置同表单项默认值配置方式,直接在组件上配置value属性。

\n
\n

上例我们设置默认值为b,则会自动匹配到选项B并选中。

\n

动态配置

有时候我们想默认选中一个选项,但是options又是远程拉取的,无法确定默认值是啥,这时候,需要在source接口中返回value,来动态设置默认值接口返回数据结构如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"value\": \"b\", // 这样就会自动选中b选项\n    \"options\": [\n      {\n        \"label\": \"A\",\n        \"value\": \"a\"\n      },\n      {\n        \"label\": \"B\",\n        \"value\": \"b\"\n      },\n      {\n        \"label\": \"C\",\n        \"value\": \"c\"\n      }\n    ]\n  }\n}\n
\n

数据格式一致性问题

当使用 sourcevalue 配置默认值的时候,需要保持数据格式的一致性。

\n

如果使用 sourcevalue 配置的默认值与当前表单项配置的数据格式不符合,而且用户没有再次操作该表单项,而直接提交表单,那么会将当前默认值原封不动的提交给后端,可能会导致不一致性的问题,我们看一个例子:

\n
\n

上例中, select 我们配置了"multiple": true,预期中,我们希望选中 AC 项时,表单项的数据格式为:"a,c",但是我们设置了"value": ["a", "c"],并不符合我们当前表单项的数据格式配置,这样会导致两个问题:

\n
    \n
  1. 有可能不会默认选中 AC 选项;
  2. \n
  3. 当不操作该表单项,直接提交时,预期是:"a,c",但提交给后端的数据为:["a", "c"],导致了不一致性的问题。
  4. \n
\n
\n

通过 source 配置默认值同理,不再赘述

\n
\n

因此一定确保默认值与选择器表单项数据格式配置相匹配。

\n

多选 multiple

大部分选择器组件默认是单选的,可以配置"multiple": true支持多选。

\n
\n

检索 searchable

可以配置 "searchable": true 显示前端过滤,适合用于有大量内容的列表。

\n
\n

拼接符 delimiter

多选模式下,默认表单项值为选中的选项的value值,用默认拼接符,拼接,如下

\n
\n

默认的拼接符是逗号,,但是当你的某个选项中的value值内包含,这个字符,这样会造成一些预期中的问题

\n

你可以设置delimiter属性,自定义拼接符,保证不与你选项中的value值冲突

\n
\n

上例我们value中有逗号,与默认拼接符冲突,这时设置"delimiter": "|",可以看到选择多个选项时,每个选项的value属性会用|拼接起来,作为表单项的值

\n

拼接值 joinValues

当选择器表单项选中某一选项后,当前表单项的值格式默认:

\n
    \n
  • 单选:选中选项的value
  • \n
  • 多选:选中所有选项的value,用拼接符进行拼接,默认拼接符为,
  • \n
\n

选中下面两个选择器,观察数据域值变化。

\n
\n

但是你可以通过配置"joinValues": false,来获取完整的选项对象

\n

单选模式

单选模式下,配置"joinValues": false,该表单项值为选中选项的完整对象值,选中下例中的任意选项,观察数据域变化。

\n
\n

多选模式

多选模式下,配置"joinValues": false,该表单项值为所有选中项的对象数组

\n
\n

自动选中问题

当你通过joinValues调整选择器表单项的数据结构后,设置默认值时,格式也要和设置的数据结构保持一致

\n

例如下面这个例子,当你给select设置了"joinValues": false时,选中 B 选项,则该表单项值为{"label":"B","value":"b"},如果你想要默认选中某一项,则也需要设置value为完整的对象:{"label":"B","value":"b"}

\n
\n

提取多选值 extractValue

"joinValues": false时,默认会将选中的所有选项组成的对象数组,作为表单项的值,如果你想只抽取选项中的 value 值,拼成新的数组,那么可以配置"extractValue": true

\n
\n

选中所有选型,你会看到表单项的值为:["a", "b", "c"]

\n

自动选中问题

当你通过joinValuesextractValue调整选择器表单项的数据结构后,设置默认值时,格式也要和设置的数据结构保持一致

\n

例如下面这个例子,当你给select设置了"joinValues": false"extractValue": true时,选中 A、B 选项,则该表单项值为["a", "b"],如果你想要默认选中某一项,则也需要设置value为同样格式:["a", "b"]

\n
\n

自动补全 autoComplete

\n

可以在autoComplete配置中,用数据映射,获取变量term,为当前输入的关键字。

\n

支持该配置项的组件有:Text、Select、Chained-Select、TreeSelect。

\n

选项标签字段 labelField

默认渲染选项组,会获取每一项中的label变量作为展示文本,如果你的选中项中没有label字段,可能会有显示问题

\n

例如下例中,options 中只有textvalue字段而没有 value 字段,这时点开下拉框,你会发现选项无法正常显示。

\n
\n

这种情况下如果你想自定义该字段,则可以设置labelField

\n
\n
\n

不推荐使用该方式,建议格式化好选项组数据结构

\n
\n

选项值字段 valueField

默认渲染选项组,会获取每一项中的value变量作为表单项值,如果你的选中项中没有value字段,将会无法选中

\n

例如下例中,options 中只有labelval字段而没有value字段,这时点开下拉框,你会发现选项无法正常选中。

\n
\n

这种情况下如果你想自定义该字段,则可以设置valueField

\n
\n
\n

不推荐使用该方式,建议格式化好选项组数据结构

\n
\n

新增选项

部分选择器组件支持在前端进行新增选项的操作。

\n

支持该功能的组件有:CheckBoxes、Select、Tree

\n

前端新增 creatable

,可以配置"creatable": true,支持在前端临时新增选项。

\n
\n

点开下拉框,会看到选项列表底部有新增选项按钮,点击后会显示一个包含简单表单的弹框,点击提交可以新增选项,不同组件交互会有不同。

\n

新增选项表单弹框的默认配置如下:

\n
{\n  \"type\": \"dialog\",\n  \"title\": \"新增选项\",\n  \"body\": {\n    \"type\": \"form\",\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"name\": \"label\",\n        \"label\": false,\n        \"placeholder\": \"请输入名称\"\n      }\n    ]\n  }\n}\n
\n
    \n
  • 你可以配置createBtnLabel来自定义这个弹框的标题;
  • \n
  • 你也可以配置optionLabel,来替换"选项"这个字符,如我们配置"optionLabel": "员工",标题会显示:新增员工
  • \n
  • 默认表单项的name属性为labelField所配置的值,默认为label
  • \n
\n

自定义新增表单项 addControls

默认只有一个文本框,也就是意味着,默认添加选项后,该选项labelvalue是一样的,如果你想自定义该表单中的表单项,你可以通过配置addControls属性

\n
\n

上例中你可以选项标题输入D,选项值输入d。实现自定义添加选项格式

\n

不过在没配置保存接口时,addControls中务必需要有labelFieldvalueField所配置的name表单项才可以正确保存

\n
\n

addControls属性格式为表单项数组,更多细节参考 FormItem 表单项

\n
\n

配置新增接口 addApi

默认新增只会暂时把新增的值保存在前端,如果你想前端新增选项后,同时把该选项保存到后端,则可以配置保存接口addApi

\n
\n
\n

配置addApi实际上将该配置值设置给该表单的api属性。

\n

如果同时配置了sourceaddApi,添加选项成功后会重新获取请求source接口

\n
\n

编辑选项

部分选择器组件支持在前端编辑选项

\n

支持该功能的组件有:CheckBoxes、Select、Tree、Table-formitem

\n

前端编辑 editable

配置"editable": true,支持在前端编辑选项。

\n
\n

点开下拉框,会看到每个选项右侧有一个编辑图标,点击后会显示一个编辑选项的弹框,修改后点击提交可以编辑选项标签。不同组件交互会有不同

\n

编辑选项弹框的默认配置如下:

\n
{\n  \"type\": \"dialog\",\n  \"title\": \"新增选项\",\n  \"body\": {\n    \"type\": \"form\",\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"name\": \"label\",\n        \"label\": false,\n        \"placeholder\": \"请输入名称\"\n      }\n    ]\n  }\n}\n
\n
    \n
  • 你也可以配置optionLabel,来替换"选项"这个字符,如我们配置"optionLabel": "员工",标题会显示:新增员工
  • \n
  • 默认表单项的name属性为labelField所配置的值,默认为label
  • \n
\n

自定义编辑表单项 editControls

默认只能修改当前选项的label属性,如果你想要修改其他属性,可以配置editControls,自定义编辑表单项

\n
\n

修改后重新选中该表单项,观察数据域中数据变化。

\n

配置编辑接口 editApi

默认编辑只会作用在前端,如果你想前端编辑选项后,同时把该选项保存到后端,则可以配置保存接口editApi

\n
\n
\n

配置editApi实际上将该配置值设置给编辑表单的api属性。

\n

如果同时配置了sourceeditApi,添加选项成功后会重新获取请求source接口

\n
\n

删除选项

部分选择器组件,支持在前端进行编辑选项操作

\n

支持该功能的组件有:CheckBoxes、Select、Tree、Table-formitem

\n

配置删除接口 deleteApi

删除选项不支持在前端级别删除,我们认为是没有意义的,必须要配置deleteApi使用接口进行删除

\n

配置"removable": truedeleteApi,支持在前端删除选项。

\n
\n

点开下拉框,鼠标悬浮在选项上,可以看到右侧会有删除图标,点击可请求删除接口进行删除

\n

自动填充 autoFill

一些选择器组件,支持配置autoFill,将当前已选中的选项的某个字段的值,自动填充到表单中某个表单项中,只在单选时有效,支持数据映射

\n
\n

上例中我们配置了"autoFill": {"option": "${label}"},表示将选中项中的label的值,自动填充到当前表单项中nameoption的文本框中。

\n

支持该配置项的有:ButtonGroup、List、NestedSelect、Picker、Radios、Select。

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组,供用户选择
sourceAPI数据映射选项组源,可通过数据映射获取当前数据域变量、或者配置 API 对象
multiplebooleanfalse是否支持多选
labelFieldboolean"label"标识选项中哪个字段是label
valueFieldboolean"value"标识选项中哪个字段是value
joinValuesbooleantrue是否拼接value
extractValuebooleanfalse是否将value值抽取出来组成新的数组,只有在joinValuesfalse是生效
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "选项组格式", - "fragment": "%E9%80%89%E9%A1%B9%E7%BB%84%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E9%80%89%E9%A1%B9%E7%BB%84%E6%A0%BC%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "标准格式", - "fragment": "%E6%A0%87%E5%87%86%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E6%A0%87%E5%87%86%E6%A0%BC%E5%BC%8F", - "level": 3 - }, - { - "label": "简单格式", - "fragment": "%E7%AE%80%E5%8D%95%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E7%AE%80%E5%8D%95%E6%A0%BC%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "静态选项组 options", - "fragment": "%E9%9D%99%E6%80%81%E9%80%89%E9%A1%B9%E7%BB%84-options", - "fullPath": "#%E9%9D%99%E6%80%81%E9%80%89%E9%A1%B9%E7%BB%84-options", - "level": 2 - }, - { - "label": "动态选项组 source", - "fragment": "%E5%8A%A8%E6%80%81%E9%80%89%E9%A1%B9%E7%BB%84-source", - "fullPath": "#%E5%8A%A8%E6%80%81%E9%80%89%E9%A1%B9%E7%BB%84-source", - "level": 2, - "children": [ - { - "label": "通过数据域中变量配置", - "fragment": "%E9%80%9A%E8%BF%87%E6%95%B0%E6%8D%AE%E5%9F%9F%E4%B8%AD%E5%8F%98%E9%87%8F%E9%85%8D%E7%BD%AE", - "fullPath": "#%E9%80%9A%E8%BF%87%E6%95%B0%E6%8D%AE%E5%9F%9F%E4%B8%AD%E5%8F%98%E9%87%8F%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "远程拉取", - "fragment": "%E8%BF%9C%E7%A8%8B%E6%8B%89%E5%8F%96", - "fullPath": "#%E8%BF%9C%E7%A8%8B%E6%8B%89%E5%8F%96", - "level": 3 - } - ] - }, - { - "label": "默认值/自动选中 value", - "fragment": "%E9%BB%98%E8%AE%A4%E5%80%BC-%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD-value", - "fullPath": "#%E9%BB%98%E8%AE%A4%E5%80%BC-%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD-value", - "level": 2, - "children": [ - { - "label": "静态配置", - "fragment": "%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE", - "fullPath": "#%E9%9D%99%E6%80%81%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "动态配置", - "fragment": "%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "数据格式一致性问题", - "fragment": "%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F%E4%B8%80%E8%87%B4%E6%80%A7%E9%97%AE%E9%A2%98", - "fullPath": "#%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F%E4%B8%80%E8%87%B4%E6%80%A7%E9%97%AE%E9%A2%98", - "level": 3 - } - ] - }, - { - "label": "多选 multiple", - "fragment": "%E5%A4%9A%E9%80%89-multiple", - "fullPath": "#%E5%A4%9A%E9%80%89-multiple", - "level": 2 - }, - { - "label": "检索 searchable", - "fragment": "%E6%A3%80%E7%B4%A2-searchable", - "fullPath": "#%E6%A3%80%E7%B4%A2-searchable", - "level": 2 - }, - { - "label": "拼接符 delimiter", - "fragment": "%E6%8B%BC%E6%8E%A5%E7%AC%A6-delimiter", - "fullPath": "#%E6%8B%BC%E6%8E%A5%E7%AC%A6-delimiter", - "level": 2 - }, - { - "label": "拼接值 joinValues", - "fragment": "%E6%8B%BC%E6%8E%A5%E5%80%BC-joinvalues", - "fullPath": "#%E6%8B%BC%E6%8E%A5%E5%80%BC-joinvalues", - "level": 2, - "children": [ - { - "label": "单选模式", - "fragment": "%E5%8D%95%E9%80%89%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%8D%95%E9%80%89%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "多选模式", - "fragment": "%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "自动选中问题", - "fragment": "%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E9%97%AE%E9%A2%98", - "fullPath": "#%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E9%97%AE%E9%A2%98", - "level": 3 - } - ] - }, - { - "label": "提取多选值 extractValue", - "fragment": "%E6%8F%90%E5%8F%96%E5%A4%9A%E9%80%89%E5%80%BC-extractvalue", - "fullPath": "#%E6%8F%90%E5%8F%96%E5%A4%9A%E9%80%89%E5%80%BC-extractvalue", - "level": 2, - "children": [ - { - "label": "自动选中问题", - "fragment": "%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E9%97%AE%E9%A2%98", - "fullPath": "#%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E9%97%AE%E9%A2%98", - "level": 3 - } - ] - }, - { - "label": "自动补全 autoComplete", - "fragment": "%E8%87%AA%E5%8A%A8%E8%A1%A5%E5%85%A8-autocomplete", - "fullPath": "#%E8%87%AA%E5%8A%A8%E8%A1%A5%E5%85%A8-autocomplete", - "level": 2 - }, - { - "label": "选项标签字段 labelField", - "fragment": "%E9%80%89%E9%A1%B9%E6%A0%87%E7%AD%BE%E5%AD%97%E6%AE%B5-labelfield", - "fullPath": "#%E9%80%89%E9%A1%B9%E6%A0%87%E7%AD%BE%E5%AD%97%E6%AE%B5-labelfield", - "level": 2 - }, - { - "label": "选项值字段 valueField", - "fragment": "%E9%80%89%E9%A1%B9%E5%80%BC%E5%AD%97%E6%AE%B5-valuefield", - "fullPath": "#%E9%80%89%E9%A1%B9%E5%80%BC%E5%AD%97%E6%AE%B5-valuefield", - "level": 2 - }, - { - "label": "新增选项", - "fragment": "%E6%96%B0%E5%A2%9E%E9%80%89%E9%A1%B9", - "fullPath": "#%E6%96%B0%E5%A2%9E%E9%80%89%E9%A1%B9", - "level": 2, - "children": [ - { - "label": "前端新增 creatable", - "fragment": "%E5%89%8D%E7%AB%AF%E6%96%B0%E5%A2%9E-creatable", - "fullPath": "#%E5%89%8D%E7%AB%AF%E6%96%B0%E5%A2%9E-creatable", - "level": 3 - }, - { - "label": "自定义新增表单项 addControls", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%B0%E5%A2%9E%E8%A1%A8%E5%8D%95%E9%A1%B9-addcontrols", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%B0%E5%A2%9E%E8%A1%A8%E5%8D%95%E9%A1%B9-addcontrols", - "level": 3 - }, - { - "label": "配置新增接口 addApi", - "fragment": "%E9%85%8D%E7%BD%AE%E6%96%B0%E5%A2%9E%E6%8E%A5%E5%8F%A3-addapi", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%96%B0%E5%A2%9E%E6%8E%A5%E5%8F%A3-addapi", - "level": 3 - } - ] - }, - { - "label": "编辑选项", - "fragment": "%E7%BC%96%E8%BE%91%E9%80%89%E9%A1%B9", - "fullPath": "#%E7%BC%96%E8%BE%91%E9%80%89%E9%A1%B9", - "level": 2, - "children": [ - { - "label": "前端编辑 editable", - "fragment": "%E5%89%8D%E7%AB%AF%E7%BC%96%E8%BE%91-editable", - "fullPath": "#%E5%89%8D%E7%AB%AF%E7%BC%96%E8%BE%91-editable", - "level": 3 - }, - { - "label": "自定义编辑表单项 editControls", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BC%96%E8%BE%91%E8%A1%A8%E5%8D%95%E9%A1%B9-editcontrols", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BC%96%E8%BE%91%E8%A1%A8%E5%8D%95%E9%A1%B9-editcontrols", - "level": 3 - }, - { - "label": "配置编辑接口 editApi", - "fragment": "%E9%85%8D%E7%BD%AE%E7%BC%96%E8%BE%91%E6%8E%A5%E5%8F%A3-editapi", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%BC%96%E8%BE%91%E6%8E%A5%E5%8F%A3-editapi", - "level": 3 - } - ] - }, - { - "label": "删除选项", - "fragment": "%E5%88%A0%E9%99%A4%E9%80%89%E9%A1%B9", - "fullPath": "#%E5%88%A0%E9%99%A4%E9%80%89%E9%A1%B9", - "level": 2, - "children": [ - { - "label": "配置删除接口 deleteApi", - "fragment": "%E9%85%8D%E7%BD%AE%E5%88%A0%E9%99%A4%E6%8E%A5%E5%8F%A3-deleteapi", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%88%A0%E9%99%A4%E6%8E%A5%E5%8F%A3-deleteapi", - "level": 3 - } - ] - }, - { - "label": "自动填充 autoFill", - "fragment": "%E8%87%AA%E5%8A%A8%E5%A1%AB%E5%85%85-autofill", - "fullPath": "#%E8%87%AA%E5%8A%A8%E5%A1%AB%E5%85%85-autofill", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/panel.html b/gh-pages/docs/components/form/panel.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/panel.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/panel_a25fc7f.js b/gh-pages/docs/components/form/panel_a25fc7f.js deleted file mode 100644 index d3f20966..00000000 --- a/gh-pages/docs/components/form/panel_a25fc7f.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/panel.md', function(require, exports, module, define) { - - module.exports = { - "title": "Panel 面板", - "description": null, - "type": 0, - "group": null, - "menuName": "Panel", - "icon": null, - "order": 34, - "html": "

还是为了布局,可以把一部分 FormItem 合并到一个 panel 里面单独展示。

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
titlestringpanel 标题
bodySchemaNode内容区
bodyClassNamestringbody 的 className
footerSchemaNode底部区
footerClassNamestringfooter 的 className
controlsArray<表单项>controlsbody 二选一,如果设置了 controls 优先显示表单集合。
\n
    \n
  • title panel 标题
  • \n
  • body SchemaNode 可以是其他渲染模型。
  • \n
  • bodyClassName body 的 className.
  • \n
  • footer SchemaNode 可以是其他渲染模型。
  • \n
  • footerClassName footer 的 className.
  • \n
  • controlsbody 二选一,如果设置了 controls 优先显示表单集合。
  • \n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/picker.html b/gh-pages/docs/components/form/picker.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/picker.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/picker_5475b7b.js b/gh-pages/docs/components/form/picker_5475b7b.js deleted file mode 100644 index 5df03ce8..00000000 --- a/gh-pages/docs/components/form/picker_5475b7b.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/form/picker.md', function(require, exports, module, define) { - - module.exports = { - "title": "Picker 列表选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "Picker", - "icon": null, - "order": 35, - "html": "

列表选取。可以静态数据,或者通过接口拉取动态数据。

\n

基本用法

\n

配置 pickerSchema

可以配置 pickerSchema,实现弹框 crud 选择模式,更多 crud 配置可查看 crud 文档

\n
\n

内嵌模式

可以配置"embed": true,实现内嵌 picker

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
multipleboolean是否为多选。
delimeterbooleanfalse拼接符
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
autoFillobject自动填充
modalModestring"dialog"设置 dialog 或者 drawer,用来配置弹出方式。
pickerSchemastring{mode: 'list', listItem: {title: '${label}'}}即用 List 类型的渲染,来展示列表信息。更多配置参考 CRUD
embedbooleanfalse是否使用内嵌模式
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置 pickerSchema", - "fragment": "%E9%85%8D%E7%BD%AE-pickerschema", - "fullPath": "#%E9%85%8D%E7%BD%AE-pickerschema", - "level": 2 - }, - { - "label": "内嵌模式", - "fragment": "%E5%86%85%E5%B5%8C%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%86%85%E5%B5%8C%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/radios.html b/gh-pages/docs/components/form/radios.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/radios.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/radios_150cedb.js b/gh-pages/docs/components/form/radios_150cedb.js deleted file mode 100644 index f1fa98c2..00000000 --- a/gh-pages/docs/components/form/radios_150cedb.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/radios.md', function(require, exports, module, define) { - - module.exports = { - "title": "Radios 单选框", - "description": null, - "type": 0, - "group": null, - "menuName": "Radios 单选框", - "icon": null, - "order": 36, - "html": "

基本用法

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
labelFieldboolean"label"选项标签字段
valueFieldboolean"value"选项值字段
columnsCountnumber1选项按几列显示,默认为一列
autoFillobject自动填充
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/range.html b/gh-pages/docs/components/form/range.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/range.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/range_03f7f4d.js b/gh-pages/docs/components/form/range_03f7f4d.js deleted file mode 100644 index c2aead77..00000000 --- a/gh-pages/docs/components/form/range_03f7f4d.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/range.md', function(require, exports, module, define) { - - module.exports = { - "title": "Range 滑块", - "description": null, - "type": 0, - "group": null, - "menuName": "Range 范围", - "icon": null, - "order": 38, - "html": "

基本用法

\n

选择范围

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
classNamestringcss 类名
minnumber最小值
maxnumber最大值
stepnumber步长
multiplebooleanfalse支持选择范围
joinValusebooleantrue默认为 true,选择的 value 会通过 delimiter 连接起来,否则直接将以{min: 1, max: 100}的形式提交,开启multiple时有效
delimiterstring,分隔符
unitstring单位
clearableboolean是否可清除
showInputstring是否显示输入框
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "选择范围", - "fragment": "%E9%80%89%E6%8B%A9%E8%8C%83%E5%9B%B4", - "fullPath": "#%E9%80%89%E6%8B%A9%E8%8C%83%E5%9B%B4", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/rating.html b/gh-pages/docs/components/form/rating.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/rating.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/rating_d8a03f7.js b/gh-pages/docs/components/form/rating_d8a03f7.js deleted file mode 100644 index 743c4880..00000000 --- a/gh-pages/docs/components/form/rating_d8a03f7.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/rating.md', function(require, exports, module, define) { - - module.exports = { - "title": "Rating 评分", - "description": null, - "type": 0, - "group": null, - "menuName": "Rating 评分", - "icon": null, - "order": 37, - "html": "

基本用法

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
halfbooleanfalse是否使用半星选择
countnumber5共有多少星可供选择
readOnlybooleanfalse只读
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/repeat.html b/gh-pages/docs/components/form/repeat.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/repeat.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/repeat_0dd0d65.js b/gh-pages/docs/components/form/repeat_0dd0d65.js deleted file mode 100644 index 49109e18..00000000 --- a/gh-pages/docs/components/form/repeat_0dd0d65.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/repeat.md', function(require, exports, module, define) { - - module.exports = { - "title": "Repeat 重复频率选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "Repeat 重复频率", - "icon": null, - "order": 39, - "html": "

基本用法

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsstringhourly,daily,weekly,monthly可用配置 secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly
placeholderstring不重复当不指定值时的说明。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/rich-text.html b/gh-pages/docs/components/form/rich-text.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/rich-text.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/rich-text_834e56f.js b/gh-pages/docs/components/form/rich-text_834e56f.js deleted file mode 100644 index eecb3a79..00000000 --- a/gh-pages/docs/components/form/rich-text_834e56f.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/rich-text.md', function(require, exports, module, define) { - - module.exports = { - "title": "Rich-Text 富文本编辑器", - "description": null, - "type": 0, - "group": null, - "menuName": "Rich-Text", - "icon": null, - "order": 47, - "html": "

基本用法

\n

配置 buttons

[\n  'paragraphFormat',\n  'quote',\n  'color',\n  '|',\n  'bold',\n  'italic',\n  'underline',\n  'strikeThrough',\n  '|',\n  'formatOL',\n  'formatUL',\n  'align',\n  '|',\n  'insertLink',\n  'insertImage',\n  'insertTable',\n  '|',\n  'undo',\n  'redo',\n  'html'\n];\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
saveAsUbbboolean是否保存为 ubb 格式
recieverAPI默认的图片保存 API
sizestring框的大小,可设置为 md 或者 lg
optionsobjectObject 类型,给富文本的配置信息。请参考 https://www.froala.com/wysiwyg-editor/docs/options
buttonsArray<string>`[ 'paragraphFormat', 'quote', 'color', '', 'bold', 'italic', 'underline', 'strikeThrough', '', 'formatOL', 'formatUL', 'align', '', 'insertLink', 'insertImage', 'insertTable', '', 'undo', 'redo', 'html' ]`精度,即小数点后几位
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置 buttons", - "fragment": "%E9%85%8D%E7%BD%AE-buttons", - "fullPath": "#%E9%85%8D%E7%BD%AE-buttons", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/select.html b/gh-pages/docs/components/form/select.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/select.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/select_6b64a9c.js b/gh-pages/docs/components/form/select_6b64a9c.js deleted file mode 100644 index 06b07722..00000000 --- a/gh-pages/docs/components/form/select_6b64a9c.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/select.md', function(require, exports, module, define) { - - module.exports = { - "title": "Select 选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "Select 选择器", - "icon": null, - "order": 48, - "html": "

基本用法

\n

更多设置项请参考 Options

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourceAPI数据映射动态选项组
autoCompleteAPI自动提示补全
delimeterstringfalse拼接符
labelFieldstring"label"选项标签字段
valueFieldstring"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
checkAllbooleanfalse是否支持全选
checkAllLabelstring全选全选的文字
defaultCheckAllbooleanfalse默认是否全选
creatablebooleanfalse新增选项
multiplebooleanfalse多选
searchablebooleanfalse检索
createBtnLabelstring"新增选项"新增选项
addControlsArray<表单项>自定义新增表单项
addApiAPI配置新增选项接口
editablebooleanfalse编辑选项
editControlsArray<表单项>自定义编辑表单项
editApiAPI配置编辑选项接口
removablebooleanfalse删除选项
deleteApiAPI配置删除选项接口
autoFillobject自动填充
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/service.html b/gh-pages/docs/components/form/service.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/service.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/service_272f05f.js b/gh-pages/docs/components/form/service_272f05f.js deleted file mode 100644 index 6dafe384..00000000 --- a/gh-pages/docs/components/form/service_272f05f.js +++ /dev/null @@ -1,59 +0,0 @@ -amis.define('docs/components/form/service.md', function(require, exports, module, define) { - - module.exports = { - "title": "Service 功能容器", - "description": null, - "type": 0, - "group": null, - "menuName": "Service", - "icon": null, - "order": 49, - "html": "

基本用法

\n

上例中我们在text表单项外,嵌套一层 service,用于初始化该表单项

\n
\n

一般初始化表单项是使用 form 的initApi配置,当你需要多个接口来初始化一个表单中的表单项时,可以考虑使用 service

\n
\n

作为 FormItem 的不同点

除了支持非表单项时的Service的功能以外。作为 FormItem 使用时最大的不同在于作为容器渲染器,他的孩子是优先用表单项还是非表单项。

\n

比如放置一个 {type: 'text'},是渲染一个文本输入框、还是一个文本展示?

\n

两种应该都存在可能,所以作为表单项的 Service, 有两种用法,当把孩子节点放在 controls 里面时输出表单项,如果放在 body 底下时输出非表单项。

\n

放在 body 属性下,输出纯展示类组件

\n

放在 controls 属性下,输出表单项

\n

接口联动

Service 中的apischemaApi都支持接口联动

\n

下面例子中,数据模板下拉框的值变化后,会触发 service 重新拉取 api 接口,从而更新数据源,变化表单项的值,更多用法查看 接口联动

\n
\n

动态渲染表单项

默认 Service 可以通过配置schemaApi 动态渲染页面内容,但是如果想渲染表单项,请返回下面这种格式:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"name\": \"text\",\n        \"label\": \"文本输入\"\n      }\n    ]\n  }\n}\n
\n

例如下例:

\n
\n

schemaApi 同样支持

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "作为 FormItem 的不同点", - "fragment": "%E4%BD%9C%E4%B8%BA-formitem-%E7%9A%84%E4%B8%8D%E5%90%8C%E7%82%B9", - "fullPath": "#%E4%BD%9C%E4%B8%BA-formitem-%E7%9A%84%E4%B8%8D%E5%90%8C%E7%82%B9", - "level": 2, - "children": [ - { - "label": "放在 body 属性下,输出纯展示类组件", - "fragment": "%E6%94%BE%E5%9C%A8-body-%E5%B1%9E%E6%80%A7%E4%B8%8B-%E8%BE%93%E5%87%BA%E7%BA%AF%E5%B1%95%E7%A4%BA%E7%B1%BB%E7%BB%84%E4%BB%B6", - "fullPath": "#%E6%94%BE%E5%9C%A8-body-%E5%B1%9E%E6%80%A7%E4%B8%8B-%E8%BE%93%E5%87%BA%E7%BA%AF%E5%B1%95%E7%A4%BA%E7%B1%BB%E7%BB%84%E4%BB%B6", - "level": 3 - }, - { - "label": "放在 controls 属性下,输出表单项", - "fragment": "%E6%94%BE%E5%9C%A8-controls-%E5%B1%9E%E6%80%A7%E4%B8%8B-%E8%BE%93%E5%87%BA%E8%A1%A8%E5%8D%95%E9%A1%B9", - "fullPath": "#%E6%94%BE%E5%9C%A8-controls-%E5%B1%9E%E6%80%A7%E4%B8%8B-%E8%BE%93%E5%87%BA%E8%A1%A8%E5%8D%95%E9%A1%B9", - "level": 3 - } - ] - }, - { - "label": "接口联动", - "fragment": "%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "fullPath": "#%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "level": 2 - }, - { - "label": "动态渲染表单项", - "fragment": "%E5%8A%A8%E6%80%81%E6%B8%B2%E6%9F%93%E8%A1%A8%E5%8D%95%E9%A1%B9", - "fullPath": "#%E5%8A%A8%E6%80%81%E6%B8%B2%E6%9F%93%E8%A1%A8%E5%8D%95%E9%A1%B9", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/static.html b/gh-pages/docs/components/form/static.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/static.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/static_99a4237.js b/gh-pages/docs/components/form/static_99a4237.js deleted file mode 100644 index 321b5f81..00000000 --- a/gh-pages/docs/components/form/static_99a4237.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/static.md', function(require, exports, module, define) { - - module.exports = { - "title": "Static 静态展示", - "description": null, - "type": 0, - "group": null, - "menuName": "Static 静态展示", - "icon": null, - "order": 52, - "html": "

用来在表单中,展示静态数据

\n

基本用法

\n

数据域变量映射

除了显式配置value属性,来展示数据以外,支持通过配置name属性,来自动映射数据域中的相关变量

\n
\n

展示其他组件

支持通过配置typestatic-xxx的形式,展示其他 表单项 组件,例如:

\n
\n

理论上可以支持所有非表达项的所有组件,并且支持对应的配置项,下面是一些示例:

\n
\n

想要调整展示组件的配置,请查阅相应组件的文档。

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "数据域变量映射", - "fragment": "%E6%95%B0%E6%8D%AE%E5%9F%9F%E5%8F%98%E9%87%8F%E6%98%A0%E5%B0%84", - "fullPath": "#%E6%95%B0%E6%8D%AE%E5%9F%9F%E5%8F%98%E9%87%8F%E6%98%A0%E5%B0%84", - "level": 2 - }, - { - "label": "展示其他组件", - "fragment": "%E5%B1%95%E7%A4%BA%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%B1%95%E7%A4%BA%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/subform.html b/gh-pages/docs/components/form/subform.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/subform.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/subform_0d92a4d.js b/gh-pages/docs/components/form/subform_0d92a4d.js deleted file mode 100644 index a32111a9..00000000 --- a/gh-pages/docs/components/form/subform_0d92a4d.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/subform.md', function(require, exports, module, define) { - - module.exports = { - "title": "SubForm 子表单", - "description": null, - "type": 0, - "group": null, - "menuName": "SubForm 子表单", - "icon": null, - "order": 50, - "html": "

基本用法

\n

多选模式

可以配置"multiple": true,实现多选模式

\n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
multiplebooleanfalse是否为多选模式
labelFieldstring当值中存在这个字段,则按钮名称将使用此字段的值来展示。
btnLabelstring"设置"按钮默认名称
minLengthnumber0限制最小长度。
maxLengthnumber0限制最大长度。
addButtonClassNamestringbtn-success btn-sm新增按钮 CSS 类名
editButtonClassNamestringbtn-info btn-addon btn-sm修改按钮 CSS 类名
formForm子表单配置,同 Form
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "多选模式", - "fragment": "%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/switch.html b/gh-pages/docs/components/form/switch.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/switch.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/switch_d67faa6.js b/gh-pages/docs/components/form/switch_d67faa6.js deleted file mode 100644 index 45d7909f..00000000 --- a/gh-pages/docs/components/form/switch_d67faa6.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/form/switch.md', function(require, exports, module, define) { - - module.exports = { - "title": "Switch 开关", - "description": null, - "type": 0, - "group": null, - "menuName": "Switch", - "icon": null, - "order": 51, - "html": "

基本用法

\n

配置真假值

默认情况:

\n
    \n
  • 开关打开时,表单项值为:true
  • \n
  • 开关关闭时,表单项值为:false
  • \n
\n
\n

如果你想调整这个值,可以配置trueValuefalseValue

\n
\n

调整开关,观察数据域变化,会发现打开后值为1,而关闭后为0

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionstring选项说明
trueValueanytrue标识真值
falseValueany"false"标识假值
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置真假值", - "fragment": "%E9%85%8D%E7%BD%AE%E7%9C%9F%E5%81%87%E5%80%BC", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%9C%9F%E5%81%87%E5%80%BC", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/table.html b/gh-pages/docs/components/form/table.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/table.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/table_2c7bb09.js b/gh-pages/docs/components/form/table_2c7bb09.js deleted file mode 100644 index a8ed9059..00000000 --- a/gh-pages/docs/components/form/table_2c7bb09.js +++ /dev/null @@ -1,65 +0,0 @@ -amis.define('docs/components/form/table.md', function(require, exports, module, define) { - - module.exports = { - "title": "Table 表格", - "description": null, - "type": 0, - "group": null, - "menuName": "Table 表格", - "icon": null, - "order": 54, - "html": "

基本用法

可以用来展示数组类型的数据。配置columns 数组,来定义列信息。

\n
\n

我们为表单数据域设置了table变量,配置table表单项可以展示该数据

\n

可新增行

可以配置addableeditable指定可以新增且编辑行数据

\n
\n

按钮触发新增行

按钮上配置"actionType": "add"target指定表格name,可以实现点击按钮添加一行的效果。

\n
\n

当表格上配置了addApi时,会请求该 api,并将返回数据添加到目标表格。

\n

编辑行配置

还可以在列上配置quickEdit实现编辑配置,更多配置参考 快速编辑

\n
\n

可拖拽

配置"draggable": true,实现可拖拽调整顺序

\n
\n

非确认模式

配置"needConfirm": false,不需要确认,那么就是一直就是处于编辑形态。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"table"指定为 Table 渲染器
addablebooleanfalse是否可增加一行
editablebooleanfalse是否可编辑
removablebooleanfalse是否可删除
showAddBtnbooleantrue是否显示添加按钮
addApiAPI-新增时提交的 API
updateApiAPI-修改时提交的 API
deleteApiAPI-删除时提交的 API
addBtnLabelstring增加按钮名称
addBtnIconstring"fa fa-plus"增加按钮图标
updateBtnLabelstring""更新按钮名称
updateBtnIconstring"fa fa-pencil"更新按钮图标
deleteBtnLabelstring""删除按钮名称
deleteBtnIconstring"fa fa-minus"删除按钮图标
confirmBtnLabelstring""确认编辑按钮名称
confirmBtnIconstring"fa fa-check"确认编辑按钮图标
cancelBtnLabelstring""取消编辑按钮名称
cancelBtnIconstring"fa fa-times"取消编辑按钮图标
columnsarray[]列信息
columns[x].quickEditboolean 或者 object-配合 editable 为 true 一起使用
columns[x].quickEditOnUpdateboolean 或者 object-可以用来区分新建模式和更新模式的编辑配置
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "可新增行", - "fragment": "%E5%8F%AF%E6%96%B0%E5%A2%9E%E8%A1%8C", - "fullPath": "#%E5%8F%AF%E6%96%B0%E5%A2%9E%E8%A1%8C", - "level": 2, - "children": [ - { - "label": "按钮触发新增行", - "fragment": "%E6%8C%89%E9%92%AE%E8%A7%A6%E5%8F%91%E6%96%B0%E5%A2%9E%E8%A1%8C", - "fullPath": "#%E6%8C%89%E9%92%AE%E8%A7%A6%E5%8F%91%E6%96%B0%E5%A2%9E%E8%A1%8C", - "level": 3 - }, - { - "label": "编辑行配置", - "fragment": "%E7%BC%96%E8%BE%91%E8%A1%8C%E9%85%8D%E7%BD%AE", - "fullPath": "#%E7%BC%96%E8%BE%91%E8%A1%8C%E9%85%8D%E7%BD%AE", - "level": 3 - } - ] - }, - { - "label": "可拖拽", - "fragment": "%E5%8F%AF%E6%8B%96%E6%8B%BD", - "fullPath": "#%E5%8F%AF%E6%8B%96%E6%8B%BD", - "level": 2 - }, - { - "label": "非确认模式", - "fragment": "%E9%9D%9E%E7%A1%AE%E8%AE%A4%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E9%9D%9E%E7%A1%AE%E8%AE%A4%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/tabs-transfer.html b/gh-pages/docs/components/form/tabs-transfer.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/tabs-transfer.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/tabs-transfer_869da79.js b/gh-pages/docs/components/form/tabs-transfer_869da79.js deleted file mode 100644 index a013b79d..00000000 --- a/gh-pages/docs/components/form/tabs-transfer_869da79.js +++ /dev/null @@ -1,26 +0,0 @@ -amis.define('docs/components/form/tabs-transfer.md', function(require, exports, module, define) { - - module.exports = { - "title": "TabsTransfer 组合穿梭器", - "description": null, - "type": 0, - "group": null, - "menuName": "TabsTransfer 组合穿梭器", - "icon": null, - "html": "

穿梭器(Transfer)的基础上扩充了左边的展示形式,支持 Tabs 的形式展示。对应的 options 的顶级数据,顶层 options 的成员支持 selectMode 配置这个 tab 下面的选项怎么展示。title 可以配置 tab 的标题。

\n
\n

属性表

更多配置请参考穿梭器(Transfer)

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/tabs.html b/gh-pages/docs/components/form/tabs.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/tabs.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/tabs_58991e8.js b/gh-pages/docs/components/form/tabs_58991e8.js deleted file mode 100644 index bc300b7d..00000000 --- a/gh-pages/docs/components/form/tabs_58991e8.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/tabs.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tabs 选项卡", - "description": null, - "type": 0, - "group": null, - "menuName": "Tabs 选项卡", - "icon": null, - "order": 53, - "html": "

有多组输入框时,也可以通过选项卡来分组。

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
tabsArraytabs 内容
toolbarSchemaNodetabs 中的工具栏
toolbarClassNamestringtabs 中工具栏的类名
tabs[x].titlestringTab 标题
tabs[x].bodySchemaNode内容容器
tabs[x].controlsArray<表单项>表单项集合。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/tag.html b/gh-pages/docs/components/form/tag.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/tag.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/tag_66c7895.js b/gh-pages/docs/components/form/tag_66c7895.js deleted file mode 100644 index c02b908f..00000000 --- a/gh-pages/docs/components/form/tag_66c7895.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/tag.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tag 标签选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "Tag 标签选择器", - "icon": null, - "order": 55, - "html": "

基本使用

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
optionsTipArray<object>Array<string>"最近您使用的标签"选项提示
sourcestringAPI动态选项组
delimeterstringfalse拼接符
labelFieldstring"label"选项标签字段
valueFieldstring"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
clearablebooleanfalse在有值的时候是否显示一个删除图标在右侧。
resetValuestring""删除后设置此配置项给定的值。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/text.html b/gh-pages/docs/components/form/text.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/text.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/text_8c0b817.js b/gh-pages/docs/components/form/text_8c0b817.js deleted file mode 100644 index 55daf15b..00000000 --- a/gh-pages/docs/components/form/text_8c0b817.js +++ /dev/null @@ -1,51 +0,0 @@ -amis.define('docs/components/form/text.md', function(require, exports, module, define) { - - module.exports = { - "title": "Text 输入框", - "description": null, - "type": 0, - "group": null, - "menuName": "Text 输入框", - "icon": null, - "order": 56, - "html": "

基本使用

\n

不同类型

配置type可以支持不同格式的文本输入框

\n
\n

附加组件

可以配置addOn,附带附加组件

\n
\n

选择器模式

配置options即可支持选择器模式。

\n
\n

选择器模式下,支持部分选择器组件支持的配置项,具体请查看下面的属性表

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
autoCompletestringAPI自动补全
multipleboolean是否多选
delimeterstring,拼接符
labelFieldstring"label"选项标签字段
valueFieldstring"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
addOnaddOn输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。
addOn.typestring请选择 textbutton 或者 submit
addOn.labelstring文字说明
addOn.xxxstring其他参数请参考按钮文档
trimContentsboolean是否去除首尾空白文本。
clearableboolean是否可清除
resetValuestring""清除后设置此配置项给定的值。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "不同类型", - "fragment": "%E4%B8%8D%E5%90%8C%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E4%B8%8D%E5%90%8C%E7%B1%BB%E5%9E%8B", - "level": 2 - }, - { - "label": "附加组件", - "fragment": "%E9%99%84%E5%8A%A0%E7%BB%84%E4%BB%B6", - "fullPath": "#%E9%99%84%E5%8A%A0%E7%BB%84%E4%BB%B6", - "level": 2 - }, - { - "label": "选择器模式", - "fragment": "%E9%80%89%E6%8B%A9%E5%99%A8%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E9%80%89%E6%8B%A9%E5%99%A8%E6%A8%A1%E5%BC%8F", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/textarea.html b/gh-pages/docs/components/form/textarea.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/textarea.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/textarea_1e5d429.js b/gh-pages/docs/components/form/textarea_1e5d429.js deleted file mode 100644 index 17f604f4..00000000 --- a/gh-pages/docs/components/form/textarea_1e5d429.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/form/textarea.md', function(require, exports, module, define) { - - module.exports = { - "title": "Textarea 多行文本输入框", - "description": null, - "type": 0, - "group": null, - "menuName": "Textarea 多行文本输入框", - "icon": null, - "order": 57, - "html": "

基本使用

\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
minRowsnumber最小行数
maxRowsnumber最大行数
trimContentsboolean是否去除首尾空白文本。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/time.html b/gh-pages/docs/components/form/time.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/time.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/time_ddec400.js b/gh-pages/docs/components/form/time_ddec400.js deleted file mode 100644 index 3ae1790f..00000000 --- a/gh-pages/docs/components/form/time_ddec400.js +++ /dev/null @@ -1,65 +0,0 @@ -amis.define('docs/components/form/time.md', function(require, exports, module, define) { - - module.exports = { - "title": "Time 时间", - "description": null, - "type": 0, - "group": null, - "menuName": "Time 时间", - "icon": null, - "order": 58, - "html": "

基本用法

\n

显示格式

选中任意时间,可以看到默认显示时间的格式是像01:01这样的格式,如果你想要自定义显示格式,那么可以配置inputFormat

\n

例如你想显示01时01分这样的格式,查找 moment 文档可知配置格式应为 HH时mm分,即:

\n
\n

调整时间,观察显示格式

\n

值格式

选中任意时间,可以看到默认表单项的值格式是像1591862818这样的时间戳格式。

\n
\n

如果你想要其他格式的日期值,,那么可以配置format参数用于调整表单项的值格式。

\n

例如你调整值为01:11这样的格式,查找 moment 文档可知配置格式应为 HH:mm,即:

\n
\n

调整时间,观察数据域中表单项值的变化

\n

默认值

可以设置value属性,设置日期选择器的默认值

\n

基本配置

配置符合当前 值格式 的默认值。

\n
\n

相对值

value 还支持类似像"+1hours"这样的相对值,更加便捷的配置默认值

\n
\n

上例中配置了"value": "+1hours",默认就会选中一小时后。

\n

支持的相对值关键字有:

\n
    \n
  • now: 当前时间
  • \n
  • hourhours: 时
  • \n
  • minuteminutes: 分
  • \n
  • secondseconds: 秒
  • \n
\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
valuestring默认值
formatstringX时间选择器值格式,更多格式类型请参考 moment
inputFormatstringHH:mm时间选择器显示格式,即时间戳格式,更多格式类型请参考 moment
placeholderstring"请选择时间"占位文本
clearablebooleantrue是否可清除
timeConstrainstobjecttrue请参考: react-datetime
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "显示格式", - "fragment": "%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "值格式", - "fragment": "%E5%80%BC%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E5%80%BC%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "默认值", - "fragment": "%E9%BB%98%E8%AE%A4%E5%80%BC", - "fullPath": "#%E9%BB%98%E8%AE%A4%E5%80%BC", - "level": 2, - "children": [ - { - "label": "基本配置", - "fragment": "%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE", - "level": 3 - }, - { - "label": "相对值", - "fragment": "%E7%9B%B8%E5%AF%B9%E5%80%BC", - "fullPath": "#%E7%9B%B8%E5%AF%B9%E5%80%BC", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/transfer.html b/gh-pages/docs/components/form/transfer.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/transfer.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/transfer_c09c07e.js b/gh-pages/docs/components/form/transfer_c09c07e.js deleted file mode 100644 index 92ae31cf..00000000 --- a/gh-pages/docs/components/form/transfer_c09c07e.js +++ /dev/null @@ -1,88 +0,0 @@ -amis.define('docs/components/form/transfer.md', function(require, exports, module, define) { - - module.exports = { - "title": "Transfer 穿梭器", - "description": null, - "type": 0, - "group": null, - "menuName": "Transfer 穿梭器", - "icon": null, - "html": "

基本用法

\n

展示模式

分组

\n

表格模式

\n

树形模式

\n

级联选择

\n

支持搜索

\n

延时加载

\n

关联选择模式

\n

searchApi

发送

\n

默认 GET,携带 term 变量,值为搜索框输入的文字,可从上下文中取数据设置进去。

\n

响应

\n

格式要求如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"options\": [\n      {\n        \"label\": \"描述\",\n        \"value\": \"值\" // ,\n        // \"children\": [] // 可以嵌套\n      },\n\n      {\n        \"label\": \"描述2\",\n        \"value\": \"值2\"\n      }\n    ],\n\n    \"value\": \"值\" // 默认值,可以获取列表的同时设置默认值。\n  }\n}\n
\n

适用于需选择的数据/信息源较多时,用户可直观的知道自己所选择的数据/信息的场景,一般左侧框为数据/信息源,右侧为已选数据/信息,被选中信息同时存在于 2 个框内。

\n

属性表

除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
delimeterstringfalse拼接符
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
searchablebooleanfalse当设置为 true 时表示可以通过输入部分内容检索出选项。
searchApiAPI如果想通过接口检索,可以设置个 api。
statisticsbooleantrue是否显示统计数据
selectTitlestring"请选择"左侧的标题文字
resultTitlestring"当前选择"右侧结果的标题文字
sortablebooleanfalse结果可以进行拖拽排序
selectModestringlist可选:listtabletreechainedassociated。分别为:列表形式、表格形式、树形选择形式、级联选择形式,关联选择形式(与级联选择的区别在于,级联是无限极,而关联只有一级,关联左边可以是个 tree)。
searchResultModestring如果不设置将采用 selectMode 的值,可以单独配置,参考 selectMode,决定搜索结果的展示形式。
columnsArray<Object>当展示形式为 table 可以用来配置展示哪些列,跟 table 中的 columns 配置相似,只是只有展示功能。
leftOptionsArray<Object>当展示形式为 associated 时用来配置左边的选项集。
leftModestring当展示形式为 associated 时用来配置左边的选择形式,支持 list 或者 tree。默认为 list
rightModestring当展示形式为 associated 时用来配置右边的选择形式,可选:listtabletreechained
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "展示模式", - "fragment": "%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "分组", - "fragment": "%E5%88%86%E7%BB%84", - "fullPath": "#%E5%88%86%E7%BB%84", - "level": 3 - }, - { - "label": "表格模式", - "fragment": "%E8%A1%A8%E6%A0%BC%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E8%A1%A8%E6%A0%BC%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "树形模式", - "fragment": "%E6%A0%91%E5%BD%A2%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E6%A0%91%E5%BD%A2%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "级联选择", - "fragment": "%E7%BA%A7%E8%81%94%E9%80%89%E6%8B%A9", - "fullPath": "#%E7%BA%A7%E8%81%94%E9%80%89%E6%8B%A9", - "level": 3 - }, - { - "label": "支持搜索", - "fragment": "%E6%94%AF%E6%8C%81%E6%90%9C%E7%B4%A2", - "fullPath": "#%E6%94%AF%E6%8C%81%E6%90%9C%E7%B4%A2", - "level": 3 - }, - { - "label": "延时加载", - "fragment": "%E5%BB%B6%E6%97%B6%E5%8A%A0%E8%BD%BD", - "fullPath": "#%E5%BB%B6%E6%97%B6%E5%8A%A0%E8%BD%BD", - "level": 3 - }, - { - "label": "关联选择模式", - "fragment": "%E5%85%B3%E8%81%94%E9%80%89%E6%8B%A9%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%85%B3%E8%81%94%E9%80%89%E6%8B%A9%E6%A8%A1%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "searchApi", - "fragment": "searchapi", - "fullPath": "#searchapi", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/tree.html b/gh-pages/docs/components/form/tree.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/tree.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/tree_471c535.js b/gh-pages/docs/components/form/tree_471c535.js deleted file mode 100644 index 4b6be912..00000000 --- a/gh-pages/docs/components/form/tree_471c535.js +++ /dev/null @@ -1,57 +0,0 @@ -amis.define('docs/components/form/tree.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tree 树形选择框", - "description": null, - "type": 0, - "group": null, - "menuName": "Tree 树形选择框", - "icon": null, - "order": 59, - "html": "

基本使用

配置的options中,可以通过children字段进行嵌套展示,实现树形选择器

\n
\n

选择器样式

配置"type": "tree-select"可以实现选择器样式

\n
\n

选中父节点是否自动选中子节点

默认选中父节点会自动选中子节点,可以设置"cascade": true,不自动选中子节点

\n
\n

选中父节点,值是否包含子节点

默认选中父节点,是不会带上子节点的值,想要自动带上子节点的值,那么配置"withChildren": true

\n
\n

也可以设置onlyChildren,实现只包含子节点的值

\n
\n

默认展开

默认是展开所有子节点的,如果不想默认展开,则配置"initiallyOpen": false

\n
\n

如果层级较多,也可以配置unfoldedLevel指定展开的层级数。

\n

下例中设置"unfoldedLevel": 1,默认展开第 1 层

\n
\n

属性表

当做选择器表单项使用时,除了支持 普通表单项属性表 中的配置以外,还支持下面一些配置

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
optionsArray<object>Array<string>选项组
sourcestringAPI动态选项组
autoCompleteAPI自动提示补全
multiplebooleanfalse是否多选
delimeterstringfalse拼接符
labelFieldstring"label"选项标签字段
valueFieldstring"value"选项值字段
joinValuesbooleantrue拼接值
extractValuebooleanfalse提取值
creatablebooleanfalse新增选项
addControlsArray<表单项>自定义新增表单项
addApiAPI配置新增选项接口
editablebooleanfalse编辑选项
editControlsArray<表单项>自定义编辑表单项
editApiAPI配置编辑选项接口
removablebooleanfalse删除选项
deleteApiAPI配置删除选项接口
hideRootbooleantrue如果想要显示个顶级节点,请设置为 false
rootLabelboolean"顶级"hideRoot 不为 false 时有用,用来设置顶级节点的文字。
showIconbooleantrue是否显示图标
showRadiobooleanfalse是否显示单选按钮,multiplefalse 是有效。
initiallyOpenbooleantrue设置是否默认展开所有层级。
unfoldedLevelnumber0设置默认展开的级数,只有initiallyOpen不是true时生效。
cascadebooleanfalse当选中父节点时不自动选择子节点。
withChildrenbooleanfalse选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。
onlyChildrenbooleanfalse多选时,选中父节点时,是否只将其子节点加入到值中。
rootCreatablebooleanfalse是否可以创建顶级节点
rootCreateTipstring"添加一级节点"创建顶级节点的悬浮提示
minLengthnumber最少选中的节点数
maxLengthnumber最多选中的节点数
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "选择器样式", - "fragment": "%E9%80%89%E6%8B%A9%E5%99%A8%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E9%80%89%E6%8B%A9%E5%99%A8%E6%A0%B7%E5%BC%8F", - "level": 2 - }, - { - "label": "选中父节点是否自动选中子节点", - "fragment": "%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E5%AD%90%E8%8A%82%E7%82%B9", - "fullPath": "#%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%E9%80%89%E4%B8%AD%E5%AD%90%E8%8A%82%E7%82%B9", - "level": 2 - }, - { - "label": "选中父节点,值是否包含子节点", - "fragment": "%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9-%E5%80%BC%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%AB%E5%AD%90%E8%8A%82%E7%82%B9", - "fullPath": "#%E9%80%89%E4%B8%AD%E7%88%B6%E8%8A%82%E7%82%B9-%E5%80%BC%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%AB%E5%AD%90%E8%8A%82%E7%82%B9", - "level": 2 - }, - { - "label": "默认展开", - "fragment": "%E9%BB%98%E8%AE%A4%E5%B1%95%E5%BC%80", - "fullPath": "#%E9%BB%98%E8%AE%A4%E5%B1%95%E5%BC%80", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/form/treeselect.html b/gh-pages/docs/components/form/treeselect.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/form/treeselect.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/form/treeselect_45dddc3.js b/gh-pages/docs/components/form/treeselect_45dddc3.js deleted file mode 100644 index 2c6ae4ca..00000000 --- a/gh-pages/docs/components/form/treeselect_45dddc3.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/form/treeselect.md', function(require, exports, module, define) { - - module.exports = { - "title": "TreeSelect 树形选择器", - "description": null, - "type": 0, - "group": null, - "menuName": "TreeSelect 树形选择器", - "icon": null, - "order": 60, - "html": "

基本使用

\n

更多用法,见 Tree

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/grid.html b/gh-pages/docs/components/grid.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/grid.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/grid_ea077bf.js b/gh-pages/docs/components/grid_ea077bf.js deleted file mode 100644 index 9a59e744..00000000 --- a/gh-pages/docs/components/grid_ea077bf.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/grid.md', function(require, exports, module, define) { - - module.exports = { - "title": "Grid 网格布局", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Grid 格线组件", - "icon": null, - "order": 46, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"grid"指定为 Grid 渲染器
classNamestring外层 Dom 的类名
columnsArray列集合
columns[x]SchemaNode成员可以是其他渲染器
columns[x].xsint宽度占比: 1 - 12
columns[x].xsHiddenboolean是否隐藏
columns[x].xsOffsetint偏移量 1 - 12
columns[x].xsPullint靠左的距离占比:1 - 12
columns[x].xsPushint靠右的距离占比: 1 - 12
columns[x].smint宽度占比: 1 - 12
columns[x].smHiddenboolean是否隐藏
columns[x].smOffsetint偏移量 1 - 12
columns[x].smPullint靠左的距离占比:1 - 12
columns[x].smPushint靠右的距离占比: 1 - 12
columns[x].mdint宽度占比: 1 - 12
columns[x].mdHiddenboolean是否隐藏
columns[x].mdOffsetint偏移量 1 - 12
columns[x].mdPullint靠左的距离占比:1 - 12
columns[x].mdPushint靠右的距离占比: 1 - 12
columns[x].lgint宽度占比: 1 - 12
columns[x].lgHiddenboolean是否隐藏
columns[x].lgOffsetint偏移量 1 - 12
columns[x].lgPullint靠左的距离占比:1 - 12
columns[x].lgPushint靠右的距离占比: 1 - 12
\n

更多使用说明,请参看 Grid Props

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/hbox.html b/gh-pages/docs/components/hbox.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/hbox.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/hbox_03de3cd.js b/gh-pages/docs/components/hbox_03de3cd.js deleted file mode 100644 index f2e53e22..00000000 --- a/gh-pages/docs/components/hbox_03de3cd.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/hbox.md', function(require, exports, module, define) { - - module.exports = { - "title": "HBox 布局", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "HBox", - "icon": null, - "order": 48, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"hbox"指定为 HBox 渲染器
classNamestring外层 Dom 的类名
columnsArray列集合
columns[x]SchemaNode成员可以是其他渲染器
columns[x].columnClassNamestring"wrapper-xs"列上类名
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/html.html b/gh-pages/docs/components/html.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/html.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/html_503cc79.js b/gh-pages/docs/components/html_503cc79.js deleted file mode 100644 index 24ddde77..00000000 --- a/gh-pages/docs/components/html_503cc79.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/html.md', function(require, exports, module, define) { - - module.exports = { - "title": "Html", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Html", - "icon": null, - "order": 49, - "html": "

基本用法

渲染一段 HTML

\n
\n
\n

当需要获取数据域中变量时,使用 Tpl

\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/icon.html b/gh-pages/docs/components/icon.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/icon.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/icon_7e31078.js b/gh-pages/docs/components/icon_7e31078.js deleted file mode 100644 index 47280ff6..00000000 --- a/gh-pages/docs/components/icon_7e31078.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/icon.md', function(require, exports, module, define) { - - module.exports = { - "title": "Icon 图标", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Icon", - "icon": null, - "order": 50, - "html": "

基本使用

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringicon指定组件类型
classNamestring外层 CSS 类名
iconstringicon 名,只支持 fontawesome v4
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/iframe.html b/gh-pages/docs/components/iframe.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/iframe.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/iframe_9c5dffc.js b/gh-pages/docs/components/iframe_9c5dffc.js deleted file mode 100644 index 6b2734c8..00000000 --- a/gh-pages/docs/components/iframe_9c5dffc.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/iframe.md', function(require, exports, module, define) { - - module.exports = { - "title": "iFrame", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "iFrame", - "icon": null, - "order": 51, - "html": "

基本使用

内嵌外部站点,可用 iframe 来实现。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"iframe"指定为 iFrame 渲染器
classNamestringiFrame 的类名
frameBorderArrayframeBorder
styleobject样式
srcstringiframe地址
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/image.html b/gh-pages/docs/components/image.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/image.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/image_88e9d67.js b/gh-pages/docs/components/image_88e9d67.js deleted file mode 100644 index 96612aa5..00000000 --- a/gh-pages/docs/components/image_88e9d67.js +++ /dev/null @@ -1,79 +0,0 @@ -amis.define('docs/components/image.md', function(require, exports, module, define) { - - module.exports = { - "title": "Image 图片", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Image 图片", - "icon": null, - "order": 52, - "html": "

基本使用

\n

也可以配置value属性

\n
\n

配置标题和说明

\n

配置缩略图

显示模式

\n

显示比例

\n

放大功能

配置"enlargeAble": true,鼠标移动到图片上会显示可点击图标,点击可放大展示

\n
\n

可以配置originalSrc,来指定原图资源地址,作为放大预览的图片地址

\n
\n

enlargeTitleenlargeCaption可以配置放大预览中的标题和描述

\n
\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"color";在 Form 中用作静态展示,为"static-color"
classNamestring外层 CSS 类名
imageClassNamestring图片 CSS 类名
titlestring标题
imageCaptionstring描述
placeholderstring占位文本
defaultImagestring默认显示的图片地址
srcstring缩略图地址
originalSrcstring原图地址
enlargeAbleboolean支持放大预览
enlargeTitlestring放大预览的标题
enlargeCaptionstring放大预览的描述
thumbModestringcontain预览图模式,可选:'w-full', 'h-full', 'contain', 'cover'
thumbRatiostring1:1预览图比例,可选:'1:1', '4:3', '16:9'
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "配置标题和说明", - "fragment": "%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98%E5%92%8C%E8%AF%B4%E6%98%8E", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98%E5%92%8C%E8%AF%B4%E6%98%8E", - "level": 2 - }, - { - "label": "配置缩略图", - "fragment": "%E9%85%8D%E7%BD%AE%E7%BC%A9%E7%95%A5%E5%9B%BE", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%BC%A9%E7%95%A5%E5%9B%BE", - "level": 2, - "children": [ - { - "label": "显示模式", - "fragment": "%E6%98%BE%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E6%98%BE%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "显示比例", - "fragment": "%E6%98%BE%E7%A4%BA%E6%AF%94%E4%BE%8B", - "fullPath": "#%E6%98%BE%E7%A4%BA%E6%AF%94%E4%BE%8B", - "level": 3 - } - ] - }, - { - "label": "放大功能", - "fragment": "%E6%94%BE%E5%A4%A7%E5%8A%9F%E8%83%BD", - "fullPath": "#%E6%94%BE%E5%A4%A7%E5%8A%9F%E8%83%BD", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/images.html b/gh-pages/docs/components/images.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/images.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/images_4ebab74.js b/gh-pages/docs/components/images_4ebab74.js deleted file mode 100644 index 60d6be08..00000000 --- a/gh-pages/docs/components/images_4ebab74.js +++ /dev/null @@ -1,85 +0,0 @@ -amis.define('docs/components/images.md', function(require, exports, module, define) { - - module.exports = { - "title": "Images 图片集", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Images 图片集合", - "icon": null, - "order": 53, - "html": "

图片集展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像ServiceFormCRUD这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过source属性,获取数据链中的数据,完成数据展示。

\n

基本用法

\n

也可以直接指定value字段:

\n
\n

图片集值是对象数组

除了支持纯文本数组以外,也支持对象数组,

\n

配置预览图地址

需要设置对象中预览图地址的key值为image

\n
\n

如果key值不是image,也可以在 images组件 上,通过配置src,使用数据映射,来获取图片地址

\n
\n

配置原图地址

需要设置对象中原图地址的key值为src

\n
\n

如果原图数据的key值不是src,也可以在 images组件 上,通过配置originalSrc,使用数据映射,来获取原图片地址

\n
\n

配置标题和说明

设置对象中标题的key值为title,说明的keydescriptioncaption

\n
\n

配置放大预览

images组件 上,配置enlargeAble,支持放大预览

\n
\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringimages如果在 Table、Card 和 List 中,为"images";在 Form 中用作静态展示,为"static-images"
classNamestring外层 CSS 类名
defaultImagestring默认展示图片
valuestringArray<string>Array<object>图片数组
sourcestring数据源
delimiterstring,分隔符,当value为字符串时,用该值进行分隔拆分
srcstring预览图地址,支持数据映射获取对象中图片变量
originalSrcstring原图地址,支持数据映射获取对象中图片变量
enlargeAbleboolean支持放大预览
thumbModestringcontain预览图模式,可选:'w-full', 'h-full', 'contain', 'cover'
thumbRatiostring1:1预览图比例,可选:'1:1', '4:3', '16:9'
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "图片集值是对象数组", - "fragment": "%E5%9B%BE%E7%89%87%E9%9B%86%E5%80%BC%E6%98%AF%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84", - "fullPath": "#%E5%9B%BE%E7%89%87%E9%9B%86%E5%80%BC%E6%98%AF%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84", - "level": 2, - "children": [ - { - "label": "配置预览图地址", - "fragment": "%E9%85%8D%E7%BD%AE%E9%A2%84%E8%A7%88%E5%9B%BE%E5%9C%B0%E5%9D%80", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%A2%84%E8%A7%88%E5%9B%BE%E5%9C%B0%E5%9D%80", - "level": 3 - }, - { - "label": "配置原图地址", - "fragment": "%E9%85%8D%E7%BD%AE%E5%8E%9F%E5%9B%BE%E5%9C%B0%E5%9D%80", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%8E%9F%E5%9B%BE%E5%9C%B0%E5%9D%80", - "level": 3 - }, - { - "label": "配置标题和说明", - "fragment": "%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98%E5%92%8C%E8%AF%B4%E6%98%8E", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98%E5%92%8C%E8%AF%B4%E6%98%8E", - "level": 3 - } - ] - }, - { - "label": "配置放大预览", - "fragment": "%E9%85%8D%E7%BD%AE%E6%94%BE%E5%A4%A7%E9%A2%84%E8%A7%88", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%94%BE%E5%A4%A7%E9%A2%84%E8%A7%88", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/json.html b/gh-pages/docs/components/json.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/json.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/json_66a54da.js b/gh-pages/docs/components/json_66a54da.js deleted file mode 100644 index 1764c75c..00000000 --- a/gh-pages/docs/components/json_66a54da.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/json.md', function(require, exports, module, define) { - - module.exports = { - "title": "Json", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Json", - "icon": null, - "order": 54, - "html": "

JSON 展示组件

\n

基本用法

\n

主题

可配置jsonTheme,指定显示主题,可选twilighteighties,默认为twilight

\n
\n

配置默认展开层级

\n

如上,levelExpand配置为0,则默认不展开。

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"json";在 Form 中用作静态展示,为"static-json"
classNamestring外层 CSS 类名
placeholderstring-占位文本
levelExpandnumber1默认展开的层级
jsonThemestringtwilight主题,可选twilighteighties
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "主题", - "fragment": "%E4%B8%BB%E9%A2%98", - "fullPath": "#%E4%B8%BB%E9%A2%98", - "level": 2 - }, - { - "label": "配置默认展开层级", - "fragment": "%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E5%B1%95%E5%BC%80%E5%B1%82%E7%BA%A7", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E5%B1%95%E5%BC%80%E5%B1%82%E7%BA%A7", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/link.html b/gh-pages/docs/components/link.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/link.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/link_cda4d11.js b/gh-pages/docs/components/link_cda4d11.js deleted file mode 100644 index c979e961..00000000 --- a/gh-pages/docs/components/link_cda4d11.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/link.md', function(require, exports, module, define) { - - module.exports = { - "title": "Link 链接", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Link", - "icon": null, - "order": 55, - "html": "

基本用法

\n

新标签页打开

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"link";在 Form 中用作静态展示,为"static-link"
bodystring标签内文本
hrefstring链接地址
blankboolean是否在新标签页打开
htmlTargetstringa标签的target
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "新标签页打开", - "fragment": "%E6%96%B0%E6%A0%87%E7%AD%BE%E9%A1%B5%E6%89%93%E5%BC%80", - "fullPath": "#%E6%96%B0%E6%A0%87%E7%AD%BE%E9%A1%B5%E6%89%93%E5%BC%80", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/list.html b/gh-pages/docs/components/list.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/list.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/list_2d73202.js b/gh-pages/docs/components/list_2d73202.js deleted file mode 100644 index e8876f78..00000000 --- a/gh-pages/docs/components/list_2d73202.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/list.md', function(require, exports, module, define) { - - module.exports = { - "title": "List 列表", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "List", - "icon": null, - "order": 56, - "html": "

列表展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像Service这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过source属性,获取数据链中的数据,完成数据展示。

\n

基本用法

\n

或者你也可以使用 CRUD 的 list 模式

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"list" 指定为列表展示。
titlestring标题
sourcestring${items}数据源, 获取当前数据域变量,支持数据映射
placeholderstring‘暂无数据’当没数据的时候的文字提示
classNamestring外层 CSS 类名
headerClassNamestringamis-list-header顶部外层 CSS 类名
footerClassNamestringamis-list-footer底部外层 CSS 类名
listItemArray配置单条信息
listItem.title模板标题
listItem.titleClassNamestringh5标题 CSS 类名
listItem.subTitle模板副标题
listItem.avatar模板图片地址
listItem.avatarClassNamestringthumb-sm avatar m-r图片 CSS 类名
listItem.desc模板描述
listItem.bodyArray内容容器,主要用来放置非表单项组件
listItem.actionsArray<Action>按钮区域
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/mapping.html b/gh-pages/docs/components/mapping.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/mapping.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/mapping_a299efb.js b/gh-pages/docs/components/mapping_a299efb.js deleted file mode 100644 index 3c5d5739..00000000 --- a/gh-pages/docs/components/mapping_a299efb.js +++ /dev/null @@ -1,59 +0,0 @@ -amis.define('docs/components/mapping.md', function(require, exports, module, define) { - - module.exports = { - "title": "Mapping 映射", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Mapping 映射", - "icon": null, - "order": 57, - "html": "

基本用法

\n

渲染 HTML

\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"color";在 Form 中用作静态展示,为"static-color"
classNamestring外层 CSS 类名
placeholderstring占位文本
mapobject映射配置
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "渲染 HTML", - "fragment": "%E6%B8%B2%E6%9F%93-html", - "fullPath": "#%E6%B8%B2%E6%9F%93-html", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/nav.html b/gh-pages/docs/components/nav.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/nav.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/nav_81426ec.js b/gh-pages/docs/components/nav_81426ec.js deleted file mode 100644 index d7d1382b..00000000 --- a/gh-pages/docs/components/nav_81426ec.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/nav.md', function(require, exports, module, define) { - - module.exports = { - "title": "Nav 导航", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Nav", - "icon": null, - "order": 58, - "html": "

用于展示链接导航

\n

基本用法

\n

横向摆放

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"nav"指定为 Nav 渲染器
classNamestring外层 Dom 的类名
stackedbooleantrue设置成 false 可以以 tabs 的形式展示
linksArray链接集合
links[x].labelstring名称
links[x].to模板链接地址
links[x].iconstring图标
links[x].activeboolean是否高亮
links[x].activeOn表达式是否高亮的条件,留空将自动分析链接地址
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "横向摆放", - "fragment": "%E6%A8%AA%E5%90%91%E6%91%86%E6%94%BE", - "fullPath": "#%E6%A8%AA%E5%90%91%E6%91%86%E6%94%BE", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/page.html b/gh-pages/docs/components/page.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/page.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/page_caa5013.js b/gh-pages/docs/components/page_caa5013.js deleted file mode 100644 index a423ebea..00000000 --- a/gh-pages/docs/components/page_caa5013.js +++ /dev/null @@ -1,57 +0,0 @@ -amis.define('docs/components/page.md', function(require, exports, module, define) { - - module.exports = { - "title": "Page 页面", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Page 页面", - "icon": null, - "order": 23, - "html": "

Page 组件是 amis 页面 JSON 配置中,唯一的 顶级容器组件,是整个页面配置的入口组件。

\n

基本用法

我们这里在内容区中简单渲染一段文字。

\n
\n

渲染组件

内容区同样可以渲染各种组件,这里我们渲染一个表单。

\n
\n

在其他区域渲染组件

Page 默认将页面分为几个区域,分别是内容区(body侧边栏(aside工具栏(toolbar)部分,你可以在这些区域配置你想要的组件和内容。

\n
\n
\n

不同区域都是Page的子节点,也就是说都可以使用Page下数据作用域。

\n
\n

页面初始化请求

通过配置initApi,可以在初始化页面时请求所配置的接口。

\n
\n

具体 API 规范查看 API 文档

\n

轮训初始化接口

想要在页面渲染后,轮训请求初始化接口,步骤如下:

\n
    \n
  1. 配置 initApi;
  2. \n
  3. 配置 interval:单位为 ms,最低值 3000,低于该值按 3000 处理。
  4. \n
\n
\n

如果希望在满足某个条件的情况下停止轮训,配置stopAutoRefreshWhen表达式。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"page"指定为 Page 组件
titleSchemaNode页面标题
subTitleSchemaNode页面副标题
remarkRemark标题附近会出现一个提示图标,鼠标放上去会提示该内容。
asideSchemaNode往页面的边栏区域加内容
toolbarSchemaNode往页面的右上角加内容,需要注意的是,当有 title 时,该区域在右上角,没有时该区域在顶部
bodySchemaNode往页面的内容区域加内容
classNamestring外层 dom 类名
toolbarClassNamestringv-middle wrapper text-right bg-light b-bToolbar dom 类名
bodyClassNamestringwrapperBody dom 类名
asideClassNamestringw page-aside-region bg-autoAside dom 类名
headerClassNamestringbg-light b-b wrapperHeader 区域 dom 类名
initApiAPIPage 用来获取初始数据的 api。返回的数据可以整个 page 级别使用。
initFetchbooleantrue是否起始拉取 initApi
initFetchOn表达式是否起始拉取 initApi, 通过表达式配置
intervalnumber3000刷新时间(最低 3000)
silentPollingbooleanfalse配置刷新时是否显示加载动画
stopAutoRefreshWhen表达式""通过表达式来配置停止刷新的条件
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "渲染组件", - "fragment": "%E6%B8%B2%E6%9F%93%E7%BB%84%E4%BB%B6", - "fullPath": "#%E6%B8%B2%E6%9F%93%E7%BB%84%E4%BB%B6", - "level": 2 - }, - { - "label": "在其他区域渲染组件", - "fragment": "%E5%9C%A8%E5%85%B6%E4%BB%96%E5%8C%BA%E5%9F%9F%E6%B8%B2%E6%9F%93%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%9C%A8%E5%85%B6%E4%BB%96%E5%8C%BA%E5%9F%9F%E6%B8%B2%E6%9F%93%E7%BB%84%E4%BB%B6", - "level": 2 - }, - { - "label": "页面初始化请求", - "fragment": "%E9%A1%B5%E9%9D%A2%E5%88%9D%E5%A7%8B%E5%8C%96%E8%AF%B7%E6%B1%82", - "fullPath": "#%E9%A1%B5%E9%9D%A2%E5%88%9D%E5%A7%8B%E5%8C%96%E8%AF%B7%E6%B1%82", - "level": 2 - }, - { - "label": "轮训初始化接口", - "fragment": "%E8%BD%AE%E8%AE%AD%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "fullPath": "#%E8%BD%AE%E8%AE%AD%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/panel.html b/gh-pages/docs/components/panel.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/panel.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/panel_707cc10.js b/gh-pages/docs/components/panel_707cc10.js deleted file mode 100644 index 1afaa3bf..00000000 --- a/gh-pages/docs/components/panel_707cc10.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/panel.md', function(require, exports, module, define) { - - module.exports = { - "title": "Panel 面板", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Panel", - "icon": null, - "order": 59, - "html": "

可以把相关信息以面板的形式展示到一块。

\n

基本用法

\n

底部配置按钮

可以通过配置actions数组,实现渲染底部按钮栏

\n
\n

固定底部

有时 panel 内,内容过多,导致底部操作按钮不是很方便,可以配置"affixFooter": true,将底部部分贴在浏览器底部展示。

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"panel"指定为 Panel 渲染器
classNamestring"panel-default"外层 Dom 的类名
headerClassNamestring"panel-heading"header 区域的类名
footerClassNamestring"panel-footer bg-light lter wrapper"footer 区域的类名
actionsClassNamestring"panel-footer"actions 区域的类名
bodyClassNamestring"panel-body"body 区域的类名
titleSchemaNode标题
headerSchemaNode头部容器
bodySchemaNode内容容器
footerSchemaNode底部容器
affixFooterboolean是否固定底部容器
actionsArray<Action>按钮区域
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "底部配置按钮", - "fragment": "%E5%BA%95%E9%83%A8%E9%85%8D%E7%BD%AE%E6%8C%89%E9%92%AE", - "fullPath": "#%E5%BA%95%E9%83%A8%E9%85%8D%E7%BD%AE%E6%8C%89%E9%92%AE", - "level": 2 - }, - { - "label": "固定底部", - "fragment": "%E5%9B%BA%E5%AE%9A%E5%BA%95%E9%83%A8", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E5%BA%95%E9%83%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/progress.html b/gh-pages/docs/components/progress.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/progress.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/progress_28f96a5.js b/gh-pages/docs/components/progress_28f96a5.js deleted file mode 100644 index 1af67473..00000000 --- a/gh-pages/docs/components/progress_28f96a5.js +++ /dev/null @@ -1,59 +0,0 @@ -amis.define('docs/components/progress.md', function(require, exports, module, define) { - - module.exports = { - "title": "Progress 进度条", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Progress 进度条", - "icon": null, - "order": 60, - "html": "

基本用法

\n

颜色映射

可以配置map,指定颜色映射,例如,默认的map配置为:['bg-danger', 'bg-warning', 'bg-info', 'bg-success', 'bg-success']

\n

它意味着将进度条分成了5份,前20%将会添加bg-danger css 类名到进度条上,20%~40%,将会添加bg-warning,以此类推,你可以自定义map来配置想要的进度效果

\n
\n

用作 Field 时

当用在 Table 的列配置 Column、List 的内容、Card 卡片的内容和表单的Static-XXX 中时,可以设置name属性,映射同名变量

\n

Table 中的列类型

\n

List 的内容、Card 卡片的内容配置同上

\n

Form 中静态展示

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring如果在 Table、Card 和 List 中,为"color";在 Form 中用作静态展示,为"static-color"
classNamestring外层 CSS 类名
progressClassNamestringprogress-xs progress-striped active m-b-none进度调 CSS 类名
progressBarClassNamestring完成进度条 CSS 类名
valuestring进度值
placeholderstring-占位文本
showLabelbooleantrue是否展示进度文本
mapArray<string>['bg-danger', 'bg-warning', 'bg-info', 'bg-success', 'bg-success']进度颜色映射
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "颜色映射", - "fragment": "%E9%A2%9C%E8%89%B2%E6%98%A0%E5%B0%84", - "fullPath": "#%E9%A2%9C%E8%89%B2%E6%98%A0%E5%B0%84", - "level": 2 - }, - { - "label": "用作 Field 时", - "fragment": "%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "fullPath": "#%E7%94%A8%E4%BD%9C-field-%E6%97%B6", - "level": 2, - "children": [ - { - "label": "Table 中的列类型", - "fragment": "table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#table-%E4%B8%AD%E7%9A%84%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "Form 中静态展示", - "fragment": "form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "fullPath": "#form-%E4%B8%AD%E9%9D%99%E6%80%81%E5%B1%95%E7%A4%BA", - "level": 3 - } - ] - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/qrcode.html b/gh-pages/docs/components/qrcode.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/qrcode.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/qrcode_22fc31a.js b/gh-pages/docs/components/qrcode_22fc31a.js deleted file mode 100644 index 13fe5f70..00000000 --- a/gh-pages/docs/components/qrcode_22fc31a.js +++ /dev/null @@ -1,51 +0,0 @@ -amis.define('docs/components/qrcode.md', function(require, exports, module, define) { - - module.exports = { - "title": "QRCode 二维码", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "QRCode 二维码", - "icon": null, - "order": 61, - "html": "

基本用法

\n
\n

根据 QR 码国际标准,二进制模式最多可存储2953字节的内容(1 中文汉字=2 字节)

\n
\n

配置背景色

\n

配置前景色

\n

不同复杂度

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"qr-code"指定为 QRCode 渲染器
classNamestring外层 Dom 的类名
qrcodeClassNamestring二维码 SVG 的类名
codeSizenumber128二维码的宽高大小
backgroundColorstring"#fff"二维码背景色
foregroundColorstring"#000"二维码前景色
levelstring"L"二维码复杂级别,有('L' 'M' 'Q' 'H')四种
value模板"https://www.baidu.com"扫描二维码后显示的文本,如果要显示某个页面请输入完整 url("http://...""https://..."开头),支持使用 模板
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "配置背景色", - "fragment": "%E9%85%8D%E7%BD%AE%E8%83%8C%E6%99%AF%E8%89%B2", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%83%8C%E6%99%AF%E8%89%B2", - "level": 2 - }, - { - "label": "配置前景色", - "fragment": "%E9%85%8D%E7%BD%AE%E5%89%8D%E6%99%AF%E8%89%B2", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%89%8D%E6%99%AF%E8%89%B2", - "level": 2 - }, - { - "label": "不同复杂度", - "fragment": "%E4%B8%8D%E5%90%8C%E5%A4%8D%E6%9D%82%E5%BA%A6", - "fullPath": "#%E4%B8%8D%E5%90%8C%E5%A4%8D%E6%9D%82%E5%BA%A6", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/remark.html b/gh-pages/docs/components/remark.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/remark.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/remark_4b0dc53.js b/gh-pages/docs/components/remark_4b0dc53.js deleted file mode 100644 index 5a7c7733..00000000 --- a/gh-pages/docs/components/remark_4b0dc53.js +++ /dev/null @@ -1,45 +0,0 @@ -amis.define('docs/components/remark.md', function(require, exports, module, define) { - - module.exports = { - "title": "Remark 标记", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Remark", - "icon": null, - "order": 62, - "html": "

用于展示颜色

\n

基本用法

\n

可配置标题

\n

弹出位置

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringremark
classNamestring外层 CSS 类名
contentstring提示文本
placementstring弹出位置
triggerstring['hover', 'focus']触发条件
iconstringfa fa-question-circle图标
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "可配置标题", - "fragment": "%E5%8F%AF%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98", - "fullPath": "#%E5%8F%AF%E9%85%8D%E7%BD%AE%E6%A0%87%E9%A2%98", - "level": 2 - }, - { - "label": "弹出位置", - "fragment": "%E5%BC%B9%E5%87%BA%E4%BD%8D%E7%BD%AE", - "fullPath": "#%E5%BC%B9%E5%87%BA%E4%BD%8D%E7%BD%AE", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/service.html b/gh-pages/docs/components/service.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/service.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/service_0d0dc92.js b/gh-pages/docs/components/service_0d0dc92.js deleted file mode 100644 index 39a741dd..00000000 --- a/gh-pages/docs/components/service_0d0dc92.js +++ /dev/null @@ -1,51 +0,0 @@ -amis.define('docs/components/service.md', function(require, exports, module, define) { - - module.exports = { - "title": "Service 功能型容器", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Service", - "icon": null, - "order": 63, - "html": "

amis 中部分组件,作为展示组件,自身没有使用接口初始化数据域的能力,例如:TableCardsList等,他们需要使用某些配置项,例如source,通过数据映射功能,在当前的 数据链 中获取数据,并进行数据展示。

\n

Service组件就是专门为该类组件而生,它的功能是::配置初始化接口,进行数据域的初始化,然后在Service内容器中配置子组件,这些子组件通过数据链的方法,获取Service所拉取到的数据

\n

基本使用

最基本的使用,是配置初始化接口api,将接口返回的数据添加到自身的数据域中,以供子组件通过数据链进行获取使用。

\n
\n

你可以通过查看网络面板看到,service接口返回的数据结构为:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"title\": \"Test Page Component\",\n    \"date\": \"2017-10-13\"\n  }\n}\n
\n

service的子组件中,就可以使用${title}${date}展示数据

\n

展示列表

另外一种使用较为频繁的场景是:serivce + table 进行列表渲染

\n
\n

上例中 service 接口返回数据结构如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"ok\",\n  \"data\": {\n    \"count\": 57,\n    \"rows\": [\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"Internet Explorer 4.0\",\n        \"platform\": \"Win 95+\",\n        \"version\": \"4\",\n        \"grade\": \"X\",\n        \"id\": 1\n      },\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"Internet Explorer 5.0\",\n        \"platform\": \"Win 95+\",\n        \"version\": \"5\",\n        \"grade\": \"C\",\n        \"id\": 2\n      },\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"Internet Explorer 5.5\",\n        \"platform\": \"Win 95+\",\n        \"version\": \"5.5\",\n        \"grade\": \"A\",\n        \"id\": 3\n      },\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"Internet Explorer 6\",\n        \"platform\": \"Win 98+\",\n        \"version\": \"6\",\n        \"grade\": \"A\",\n        \"id\": 4\n      },\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"Internet Explorer 7\",\n        \"platform\": \"Win XP SP2+\",\n        \"version\": \"7\",\n        \"grade\": \"A\",\n        \"id\": 5\n      },\n      {\n        \"engine\": \"Trident\",\n        \"browser\": \"AOL browser (AOL desktop)\",\n        \"platform\": \"Win XP\",\n        \"version\": \"6\",\n        \"grade\": \"A\",\n        \"id\": 6\n      },\n      {\n        \"engine\": \"Gecko\",\n        \"browser\": \"Firefox 1.0\",\n        \"platform\": \"Win 98+ / OSX.2+\",\n        \"version\": \"1.7\",\n        \"grade\": \"A\",\n        \"id\": 7\n      },\n      {\n        \"engine\": \"Gecko\",\n        \"browser\": \"Firefox 1.5\",\n        \"platform\": \"Win 98+ / OSX.2+\",\n        \"version\": \"1.8\",\n        \"grade\": \"A\",\n        \"id\": 8\n      },\n      {\n        \"engine\": \"Gecko\",\n        \"browser\": \"Firefox 2.0\",\n        \"platform\": \"Win 98+ / OSX.2+\",\n        \"version\": \"1.8\",\n        \"grade\": \"A\",\n        \"id\": 9\n      },\n      {\n        \"engine\": \"Gecko\",\n        \"browser\": \"Firefox 3.0\",\n        \"platform\": \"Win 2k+ / OSX.3+\",\n        \"version\": \"1.9\",\n        \"grade\": \"A\",\n        \"id\": 10\n      }\n    ]\n  }\n}\n
\n

table中配置source属性为${rows}就可以获取到rows变量的数据,并用于展示。

\n

动态渲染页面

Service 还有个重要的功能就是支持配置 schemaApi,通过它可以实现动态渲染页面内容。

\n
\n

同样观察schemaApi接口返回的数据结构:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"type\": \"tabs\",\n    \"tabs\": [\n      {\n        \"title\": \"TabA\",\n        \"body\": \"卡片A内容\"\n      },\n      {\n        \"title\": \"TabB\",\n        \"body\": \"卡片B内容\"\n      }\n    ]\n  }\n}\n
\n

它将data返回的对象作为 amis 页面配置,进行了解析渲染,实现动态渲染页面的功能。

\n

接口联动

apischemaApi都支持接口联动

\n
\n

上例可看到,变更数据模板的值,会触发 service 重新请求,并更新当前数据域中的数据

\n

更多相关见接口联动

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"service"指定为 service 渲染器
classNamestring外层 Dom 的类名
bodySchemaNode内容容器
apiapi初始化数据域接口地址
initFetchboolean是否默认拉取
schemaApiapi用来获取远程 Schema 接口地址
initFetchSchemaboolean是否默认拉取 Schema
messagesObject消息提示覆写,默认消息读取的是接口返回的 toast 提示文字,但是在此可以覆写它。
messages.fetchSuccessstring接口请求成功时的 toast 提示文字
messages.fetchFailedstring"初始化失败"接口请求失败时 toast 提示文字
intervalnumber轮训时间间隔(最低 3000)
silentPollingbooleanfalse配置轮训时是否显示加载动画
stopAutoRefreshWhen表达式配置停止轮训的条件
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "展示列表", - "fragment": "%E5%B1%95%E7%A4%BA%E5%88%97%E8%A1%A8", - "fullPath": "#%E5%B1%95%E7%A4%BA%E5%88%97%E8%A1%A8", - "level": 2 - }, - { - "label": "动态渲染页面", - "fragment": "%E5%8A%A8%E6%80%81%E6%B8%B2%E6%9F%93%E9%A1%B5%E9%9D%A2", - "fullPath": "#%E5%8A%A8%E6%80%81%E6%B8%B2%E6%9F%93%E9%A1%B5%E9%9D%A2", - "level": 2 - }, - { - "label": "接口联动", - "fragment": "%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "fullPath": "#%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/spinner.html b/gh-pages/docs/components/spinner.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/spinner.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/spinner_9b73f11.js b/gh-pages/docs/components/spinner_9b73f11.js deleted file mode 100644 index 91d07321..00000000 --- a/gh-pages/docs/components/spinner_9b73f11.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/spinner.md', function(require, exports, module, define) { - - module.exports = { - "title": "Spinner 加载中", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Spinner", - "icon": null, - "order": 64, - "html": "

基本使用

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/status.html b/gh-pages/docs/components/status.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/status.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/status_f2af3fb.js b/gh-pages/docs/components/status_f2af3fb.js deleted file mode 100644 index e1e71d43..00000000 --- a/gh-pages/docs/components/status_f2af3fb.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/status.md', function(require, exports, module, define) { - - module.exports = { - "title": "Status 状态", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Status", - "icon": null, - "order": 65, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"status" 指定为 Status 渲染器
classNamestring外层 Dom 的类名
placeholderstring-占位文本
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/switch.html b/gh-pages/docs/components/switch.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/switch.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/switch_5b27078.js b/gh-pages/docs/components/switch_5b27078.js deleted file mode 100644 index 1c4476b0..00000000 --- a/gh-pages/docs/components/switch_5b27078.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/components/switch.md', function(require, exports, module, define) { - - module.exports = { - "title": "Switch 开关", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Switch", - "icon": null, - "order": 66, - "html": "

基本用法

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"switch" 指定为 Dialog 渲染器
classNamestring外层 Dom 的类名
trueValueany真值,当值为该值时,开关开启
optionstring右侧选项文本
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/table.html b/gh-pages/docs/components/table.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/table.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/table_8a27ff2.js b/gh-pages/docs/components/table_8a27ff2.js deleted file mode 100644 index d9d5ec74..00000000 --- a/gh-pages/docs/components/table_8a27ff2.js +++ /dev/null @@ -1,121 +0,0 @@ -amis.define('docs/components/table.md', function(require, exports, module, define) { - - module.exports = { - "title": "Table 表格", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Table 表格", - "icon": null, - "order": 67, - "html": "

表格展示,不支持配置初始化接口初始化数据域,所以需要搭配类似像Service这样的,具有配置接口初始化数据域功能的组件,或者手动进行数据域初始化,然后通过source属性,获取数据链中的数据,完成数据展示。

\n

基本用法

\n

列配置

columns内,除了简单的配置labelname展示数据以外,还支持一些额外的配置项,可以帮助更好的展示数据。

\n

列类型

除了简单展示数据源所返回的数据以外,list的列支持除表单项以外所有组件类型,例如:

\n
\n

列宽

可以给列配置width属性,控制列宽,共有两种方式:

\n

固定像素

可以配置数字,用于设置列宽像素,例如下面例子我们给Rendering engine列宽设置为100px

\n
\n

百分比

也可以百分比来指定列宽,例如下面例子我们给Rendering engine列宽设置为50%

\n
\n

默认是否显示

默认 columnsTogglable 配置为 auto,当列超过 5 列后,就会在工具栏多渲染出来一个列展示与否的开关。你可以设置成 true 或者 false 来强制开或者关。在列配置中可以通过配置 toggledfalse 默认不展示这列,比如下面这个栗子中 ID 这一栏。

\n
\n

可复制

可以在列上配置"copyable": true,会在该列的内容区里,渲染一个复制内容的图标,点击可复制该显示内容

\n
\n

你也可以配置对象形式,可以自定义显示内容

\n
\n

弹出框

可以给列上配置popover属性,会在该列的内容区里,渲染一个图标,点击会显示弹出框,用于展示内容

\n
\n

表头样式

可以配置"isHead": true,来让当前列以表头的样式展示。应用场景是:

\n
    \n
  1. 所有列label配置空字符串,不显示表头
  2. \n
  3. 配置combineNum,合并单元格,实现左侧表头的形式
  4. \n
  5. 列上配置"isHead": true,调整样式
  6. \n
\n
\n

还可以配置"offset",实现弹出框位置调整自定义

\n
\n

嵌套

当行数据中存在 children 属性时,可以自动嵌套显示下去。

\n
\n

底部展示 (Footable)

列太多时,内容没办法全部显示完,可以让部分信息在底部显示,可以让用户展开查看详情。配置很简单,只需要开启 footable 属性,同时将想在底部展示的列加个 breakpoint 属性为 * 即可。

\n
\n

默认都不会展开,如果你想默认展开第一个就把 footable 配置成这样。

\n
{\n  \"footable\": {\n    \"expand\": \"first\"\n  }\n}\n
\n

当配置成 all 时表示全部展开。

\n

合并单元格

只需要配置 combineNum 属性即可,他表示从左到右多少列内启动自动合并单元格,只要多行的同一个属性值是一样的,就会自动合并。

\n
\n

超级表头

超级表头意思是,表头还可以再一次进行分组。额外添加个 groupName 属性即可。

\n
\n

固定列

列太多可以让重要的几列固定,可以配置固定在左侧还是右侧,只需要给需要固定的列上配置 fixed 属性,配置 left 或者 right

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"type" 指定为 table 渲染器
titlestring标题
sourcestring${items}数据源, 绑定当前环境变量
affixHeaderbooleantrue是否固定表头
columnsTogglableauto 或者 booleanauto展示列显示开关, 自动即:列数量大于或等于 5 个时自动开启
placeholderstring暂无数据当没数据的时候的文字提示
classNamestringpanel-default外层 CSS 类名
tableClassNamestringtable-db table-striped表格 CSS 类名
headerClassNamestringAction.md-table-header顶部外层 CSS 类名
footerClassNamestringAction.md-table-footer底部外层 CSS 类名
toolbarClassNamestringAction.md-table-toolbar工具栏 CSS 类名
columnsArray<Column>用来设置列信息
combineNumnumber自动合并单元格
itemActionsArray<Action>悬浮行操作按钮组
itemCheckableOn表达式配置当前行是否可勾选的条件,要用 表达式
itemDraggableOn表达式配置当前行是否可拖拽的条件,要用 表达式
checkOnItemClickbooleanfalse点击数据行是否可以勾选当前行
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "列配置", - "fragment": "%E5%88%97%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%88%97%E9%85%8D%E7%BD%AE", - "level": 2, - "children": [ - { - "label": "列类型", - "fragment": "%E5%88%97%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E5%88%97%E7%B1%BB%E5%9E%8B", - "level": 3 - }, - { - "label": "列宽", - "fragment": "%E5%88%97%E5%AE%BD", - "fullPath": "#%E5%88%97%E5%AE%BD", - "level": 3, - "children": [ - { - "label": "固定像素", - "fragment": "%E5%9B%BA%E5%AE%9A%E5%83%8F%E7%B4%A0", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E5%83%8F%E7%B4%A0", - "level": 4 - }, - { - "label": "百分比", - "fragment": "%E7%99%BE%E5%88%86%E6%AF%94", - "fullPath": "#%E7%99%BE%E5%88%86%E6%AF%94", - "level": 4 - } - ] - }, - { - "label": "默认是否显示", - "fragment": "%E9%BB%98%E8%AE%A4%E6%98%AF%E5%90%A6%E6%98%BE%E7%A4%BA", - "fullPath": "#%E9%BB%98%E8%AE%A4%E6%98%AF%E5%90%A6%E6%98%BE%E7%A4%BA", - "level": 3 - }, - { - "label": "可复制", - "fragment": "%E5%8F%AF%E5%A4%8D%E5%88%B6", - "fullPath": "#%E5%8F%AF%E5%A4%8D%E5%88%B6", - "level": 3 - }, - { - "label": "弹出框", - "fragment": "%E5%BC%B9%E5%87%BA%E6%A1%86", - "fullPath": "#%E5%BC%B9%E5%87%BA%E6%A1%86", - "level": 3 - }, - { - "label": "表头样式", - "fragment": "%E8%A1%A8%E5%A4%B4%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E8%A1%A8%E5%A4%B4%E6%A0%B7%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "嵌套", - "fragment": "%E5%B5%8C%E5%A5%97", - "fullPath": "#%E5%B5%8C%E5%A5%97", - "level": 2 - }, - { - "label": "底部展示 (Footable)", - "fragment": "%E5%BA%95%E9%83%A8%E5%B1%95%E7%A4%BA-footable-", - "fullPath": "#%E5%BA%95%E9%83%A8%E5%B1%95%E7%A4%BA-footable-", - "level": 2 - }, - { - "label": "合并单元格", - "fragment": "%E5%90%88%E5%B9%B6%E5%8D%95%E5%85%83%E6%A0%BC", - "fullPath": "#%E5%90%88%E5%B9%B6%E5%8D%95%E5%85%83%E6%A0%BC", - "level": 2 - }, - { - "label": "超级表头", - "fragment": "%E8%B6%85%E7%BA%A7%E8%A1%A8%E5%A4%B4", - "fullPath": "#%E8%B6%85%E7%BA%A7%E8%A1%A8%E5%A4%B4", - "level": 2 - }, - { - "label": "固定列", - "fragment": "%E5%9B%BA%E5%AE%9A%E5%88%97", - "fullPath": "#%E5%9B%BA%E5%AE%9A%E5%88%97", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/tabs.html b/gh-pages/docs/components/tabs.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/tabs.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/tabs_7fe91d3.js b/gh-pages/docs/components/tabs_7fe91d3.js deleted file mode 100644 index 85fd701d..00000000 --- a/gh-pages/docs/components/tabs_7fe91d3.js +++ /dev/null @@ -1,97 +0,0 @@ -amis.define('docs/components/tabs.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tabs 选项卡", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Tabs", - "icon": null, - "order": 68, - "html": "

基本用法

\n

展示模式

线型

\n

卡片模式

\n

选择器型

\n

配置顶部工具栏

配置toolbar实现顶部工具栏。

\n
\n

配置 hash

可以在单个tab下,配置hash属性,支持地址栏#xxx

\n
\n

默认显示某个选项卡

主要配置activeKey属性来实现该效果,共有下面两种方法:

\n

配置 hash 值

\n

配置索引值

单个tab上不要配置hash属性,配置需要展示的tab索引值,0代表第一个。

\n
\n

unmountOnExit

如果你想在切换 tab 时,自动销毁掉隐藏的 tab,请配置"unmountOnExit": true

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"tabs"指定为 Tabs 渲染器
classNamestring外层 Dom 的类名
tabsClassNamestringTabs Dom 的类名
tabsArraytabs 内容
toolbarSchemaNodetabs 中的工具栏
toolbarClassNamestringtabs 中工具栏的类名
tabs[x].titlestringTab 标题
tabs[x].iconiconTab 的图标
tabs[x].tabSchemaNode内容区
tabs[x].hashstring设置以后将跟 url 的 hash 对应
tabs[x].reloadboolean设置以后内容每次都会重新渲染,对于 crud 的重新拉取很有用
tabs[x].unmountOnExitboolean每次退出都会销毁当前 tab 栏内容
tabs[x].classNamestring"bg-white b-l b-r b-b wrapper-md"Tab 区域样式
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "展示模式", - "fragment": "%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%B1%95%E7%A4%BA%E6%A8%A1%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "线型", - "fragment": "%E7%BA%BF%E5%9E%8B", - "fullPath": "#%E7%BA%BF%E5%9E%8B", - "level": 3 - }, - { - "label": "卡片模式", - "fragment": "%E5%8D%A1%E7%89%87%E6%A8%A1%E5%BC%8F", - "fullPath": "#%E5%8D%A1%E7%89%87%E6%A8%A1%E5%BC%8F", - "level": 3 - }, - { - "label": "选择器型", - "fragment": "%E9%80%89%E6%8B%A9%E5%99%A8%E5%9E%8B", - "fullPath": "#%E9%80%89%E6%8B%A9%E5%99%A8%E5%9E%8B", - "level": 3 - } - ] - }, - { - "label": "配置顶部工具栏", - "fragment": "%E9%85%8D%E7%BD%AE%E9%A1%B6%E9%83%A8%E5%B7%A5%E5%85%B7%E6%A0%8F", - "fullPath": "#%E9%85%8D%E7%BD%AE%E9%A1%B6%E9%83%A8%E5%B7%A5%E5%85%B7%E6%A0%8F", - "level": 2 - }, - { - "label": "配置 hash", - "fragment": "%E9%85%8D%E7%BD%AE-hash", - "fullPath": "#%E9%85%8D%E7%BD%AE-hash", - "level": 2 - }, - { - "label": "默认显示某个选项卡", - "fragment": "%E9%BB%98%E8%AE%A4%E6%98%BE%E7%A4%BA%E6%9F%90%E4%B8%AA%E9%80%89%E9%A1%B9%E5%8D%A1", - "fullPath": "#%E9%BB%98%E8%AE%A4%E6%98%BE%E7%A4%BA%E6%9F%90%E4%B8%AA%E9%80%89%E9%A1%B9%E5%8D%A1", - "level": 2, - "children": [ - { - "label": "配置 hash 值", - "fragment": "%E9%85%8D%E7%BD%AE-hash-%E5%80%BC", - "fullPath": "#%E9%85%8D%E7%BD%AE-hash-%E5%80%BC", - "level": 4 - }, - { - "label": "配置索引值", - "fragment": "%E9%85%8D%E7%BD%AE%E7%B4%A2%E5%BC%95%E5%80%BC", - "fullPath": "#%E9%85%8D%E7%BD%AE%E7%B4%A2%E5%BC%95%E5%80%BC", - "level": 4 - } - ] - }, - { - "label": "unmountOnExit", - "fragment": "unmountonexit", - "fullPath": "#unmountonexit", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/tasks.html b/gh-pages/docs/components/tasks.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/tasks.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/tasks_52f543f.js b/gh-pages/docs/components/tasks_52f543f.js deleted file mode 100644 index 7a05a9ed..00000000 --- a/gh-pages/docs/components/tasks_52f543f.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/tasks.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tasks 任务操作集合", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Tasks", - "icon": null, - "order": 69, - "html": "

任务操作集合,类似于 orp 上线。

\n

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"tasks"指定为 Tasks 渲染器
classNamestring外层 Dom 的类名
tableClassNamestringtable Dom 的类名
itemsArray任务列表
items[x].labelstring任务名称
items[x].keystring任务键值,请唯一区分
items[x].remarkstring当前任务状态,支持 html
items[x].statusstring任务状态: 0: 初始状态,不可操作。1: 就绪,可操作状态。2: 进行中,还没有结束。3:有错误,不可重试。4: 已正常结束。5:有错误,且可以重试。
checkApiAPI返回任务列表,返回的数据请参考 items。
submitApiAPI提交任务使用的 API
reSubmitApiAPI如果任务失败,且可以重试,提交的时候会使用此 API
intervalnumber3000当有任务进行中,会每隔一段时间再次检测,而时间间隔就是通过此项配置,默认 3s。
taskNameLabelstring任务名称任务名称列说明
operationLabelstring操作操作列说明
statusLabelstring状态状态列说明
remarkLabelstring备注备注列说明
btnTextstring上线操作按钮文字
retryBtnTextstring重试重试操作按钮文字
btnClassNamestringbtn-sm btn-default配置容器按钮 className
retryBtnClassNamestringbtn-sm btn-danger配置容器重试按钮 className
statusLabelMaparray["label-warning", "label-info", "label-success", "label-danger", "label-default", "label-danger"]状态显示对应的类名配置
statusTextMaparray["未开始", "就绪", "进行中", "出错", "已完成", "出错"]状态显示对应的文字显示配置
\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/tpl.html b/gh-pages/docs/components/tpl.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/tpl.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/tpl_9288c7b.js b/gh-pages/docs/components/tpl_9288c7b.js deleted file mode 100644 index 3b34af9f..00000000 --- a/gh-pages/docs/components/tpl_9288c7b.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/tpl.md', function(require, exports, module, define) { - - module.exports = { - "title": "Tpl 模板", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Tpl", - "icon": null, - "order": 70, - "html": "

输出 模板 的常用组件

\n

基本用法

\n

更多模板相关配置请看模板文档

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"tpl"指定为 Tpl 组件
classNamestring外层 Dom 的类名
tpl模板配置模板
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/video.html b/gh-pages/docs/components/video.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/video.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/video_35ba53a.js b/gh-pages/docs/components/video_35ba53a.js deleted file mode 100644 index 4e5cf2bc..00000000 --- a/gh-pages/docs/components/video_35ba53a.js +++ /dev/null @@ -1,33 +0,0 @@ -amis.define('docs/components/video.md', function(require, exports, module, define) { - - module.exports = { - "title": "Video 视频", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Video", - "icon": null, - "order": 71, - "html": "

基本用法

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"video"指定为 video 渲染器
classNamestring外层 Dom 的类名
srcstring视频地址
isLivebooleanfalse是否为直播,视频为直播时需要添加上,支持flvhls格式
posterstring视频封面地址
mutedboolean是否静音
autoPlayboolean是否自动播放
ratesarray倍数,格式为[1.0, 1.5, 2.0]
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/wizard.html b/gh-pages/docs/components/wizard.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/wizard.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/wizard_29a668b.js b/gh-pages/docs/components/wizard_29a668b.js deleted file mode 100644 index 1561fbad..00000000 --- a/gh-pages/docs/components/wizard_29a668b.js +++ /dev/null @@ -1,41 +0,0 @@ -amis.define('docs/components/wizard.md', function(require, exports, module, define) { - - module.exports = { - "title": "Wizard 向导", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Wizard 向导", - "icon": null, - "order": 73, - "html": "

表单向导,能够配置多个步骤引导用户一步一步完成表单提交。

\n

基本使用

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"wizard"指定为 Wizard 组件
modestring"horizontal"展示模式,选择:horizontal 或者 vertical
apiAPI最后一步保存的接口。
initApiAPI初始化数据接口
initFetchAPI初始是否拉取数据。
initFetchOn表达式初始是否拉取数据,通过表达式来配置
actionPrevLabelstring上一步上一步按钮文本
actionNextLabelstring下一步下一步按钮文本
actionNextSaveLabelstring保存并下一步保存并下一步按钮文本
actionFinishLabelstring完成完成按钮文本
classNamestring外层 CSS 类名
actionClassNamestringbtn-sm btn-default按钮 CSS 类名
reloadstring操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 window 则让当前页面整体刷新。
redirect模板3000操作完后跳转。
targetstringfalse可以把数据提交给别的组件而不是自己保存。请填写目标组件设置的 name 值,如果填写为 window 则把数据同步到地址栏上,同时依赖这些数据的组件会自动重新刷新。
stepsArray<step>数组,配置步骤信息
\n

step

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
titlestring步骤标题
modestring展示默认,跟 Form 中的模式一样,选择: normalhorizontal或者inline
horizontalObject当为水平模式时,用来控制左右占比
horizontal.labelnumber左边 label 的宽度占比
horizontal.rightnumber右边控制器的宽度占比。
horizontal.offsetnumber当没有设置 label 时,右边控制器的偏移量
apiAPI当前步骤保存接口,可以不配置。
initApiAPI当前步骤数据初始化接口。
initFetchboolean当前步骤数据初始化接口是否初始拉取。
initFetchOn表达式当前步骤数据初始化接口是否初始拉取,用表达式来决定。
controlsArray<FormItem>当前步骤的表单项集合,请参考 FormItem
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2, - "children": [ - { - "label": "step", - "fragment": "step", - "fullPath": "#step", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/wrapper.html b/gh-pages/docs/components/wrapper.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/components/wrapper.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/components/wrapper_d26aaaf.js b/gh-pages/docs/components/wrapper_d26aaaf.js deleted file mode 100644 index d047c2c4..00000000 --- a/gh-pages/docs/components/wrapper_d26aaaf.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/components/wrapper.md', function(require, exports, module, define) { - - module.exports = { - "title": "Wrapper 包裹容器", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Wrapper", - "icon": null, - "order": 72, - "html": "

简单的一个包裹容器组件

\n

基本用法

\n

不同内边距

通过配置size属性,可以调整内边距

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestring"wrapper"指定为 Wrapper 渲染器
classNamestring外层 Dom 的类名
sizestring支持: xssmmdlg
bodySchemaNode内容容器
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "不同内边距", - "fragment": "%E4%B8%8D%E5%90%8C%E5%86%85%E8%BE%B9%E8%B7%9D", - "fullPath": "#%E4%B8%8D%E5%90%8C%E5%86%85%E8%BE%B9%E8%B7%9D", - "level": 2 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/action.html b/gh-pages/docs/concepts/action.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/action.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/action_1571cc0.js b/gh-pages/docs/concepts/action_1571cc0.js deleted file mode 100644 index b053006c..00000000 --- a/gh-pages/docs/concepts/action_1571cc0.js +++ /dev/null @@ -1,41 +0,0 @@ -amis.define('docs/concepts/action.md', function(require, exports, module, define) { - - module.exports = { - "title": "行为", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "行为", - "icon": null, - "order": 12, - "html": "

页面的交互操作,例如:提交表单、显示一个弹框、跳转页面、复制一段文字到粘贴板等等操作,都可以视作页面的一种行为

\n

在 amis 中,大部分 行为 是跟 行为按钮组件 进行绑定的,也就是说,当你想要配置一个行为,大部分情况下你应该遵循下面的步骤:

\n
    \n
  1. 添加一个 行为按钮组件
  2. \n
  3. 配置当前 行为类型(actionType)
  4. \n
  5. 根据当前行为类型,配置你想要的 属性
  6. \n
\n

如何配置行为?

通过行为按钮

\n
    \n
  1. page内容区中,添加一个action行为按钮组件
  2. \n
  3. 配置当前行为类型是 ajax(即发送一个 ajax 请求)
  4. \n
  5. 配置请求 api,值为 API 类型
  6. \n
\n

现在点击该按钮,你会发现浏览器发出了这个ajax请求。

\n

很简单是吧?我们再来一个例子:

\n
\n

这次我们配置actionTypedialog,意味着点击该按钮会弹出一个模态框,并配置dialog内容,来显示字符串Hello World!

\n
\n

dialog是容器,也就意味着可以在body属性中配置其他组件

\n
\n

完整的行为列表可以查看 action组件

\n

组件所支持的行为

一些特殊组件,例如 Chart 组件 中的图表点击行为,可以直接配置clickAction,来配置行为对象。

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "如何配置行为?", - "fragment": "%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE%E8%A1%8C%E4%B8%BA-", - "fullPath": "#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE%E8%A1%8C%E4%B8%BA-", - "level": 2, - "children": [ - { - "label": "通过行为按钮", - "fragment": "%E9%80%9A%E8%BF%87%E8%A1%8C%E4%B8%BA%E6%8C%89%E9%92%AE", - "fullPath": "#%E9%80%9A%E8%BF%87%E8%A1%8C%E4%B8%BA%E6%8C%89%E9%92%AE", - "level": 3 - }, - { - "label": "组件所支持的行为", - "fragment": "%E7%BB%84%E4%BB%B6%E6%89%80%E6%94%AF%E6%8C%81%E7%9A%84%E8%A1%8C%E4%B8%BA", - "fullPath": "#%E7%BB%84%E4%BB%B6%E6%89%80%E6%94%AF%E6%8C%81%E7%9A%84%E8%A1%8C%E4%B8%BA", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/data-mapping.html b/gh-pages/docs/concepts/data-mapping.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/data-mapping.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/data-mapping_7b3f134.js b/gh-pages/docs/concepts/data-mapping_7b3f134.js deleted file mode 100644 index 8cbd7036..00000000 --- a/gh-pages/docs/concepts/data-mapping_7b3f134.js +++ /dev/null @@ -1,265 +0,0 @@ -amis.define('docs/concepts/data-mapping.md', function(require, exports, module, define) { - - module.exports = { - "title": "数据映射", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "数据映射", - "icon": null, - "order": 12, - "html": "

数据映射支持用户通过${xxx}$xxx获取当前数据链中某个变量的值,实现灵活的数据配置功能,主要用于模板字符串、 自定义 api 请求数据体格式等场景。

\n

模板字符串

\n

tip: 默认 amis 在解析模板字符串时,遇到$字符会尝试去解析该变量并替换改模板变量,如果你想输出纯文本"${xxx}""$xxx",那么需要在$前加转义字符"\\\\",即"\\\\${xxx}"

\n
\n

支持链式取值

可以使用.进行链式取值

\n
\n

自定义 api 请求体数据格式

在表单提交接口时,amis 默认的请求体数据格式可能不符合你的预期,不用担心,你可以使用数据映射定制想要的数据格式:

\n

查看下面这种场景:

\n
\n

当输入姓名:rick 和邮箱:`rick@gmail.com后,form` 获取当前的数据域,提交后端接口的数据格式应该是这样的:

\n
{\n  \"name\": \"rick\",\n  \"email\": \"rick@gmail.com\"\n}\n
\n

遗憾的是,你的后端接口只支持的如下的输入数据结构,且无法修改:

\n
{\n  \"userName\": \"xxx\",\n  \"userEmail\": \"xxx@xxx.com\"\n}\n
\n

这时,除了直接更改你的 姓名表单项 和 邮箱表单项 的name属性为相应的字段以外,你可以配置apidata属性,使用数据映射轻松实现数据格式的自定义:

\n
\n

你可以查看网络面板,发送给后端接口的数据体应该已经成功修改为:

\n
{\n  \"userName\": \"rick\",\n  \"userEmail\": \"rick@gmail.com\"\n}\n
\n

复杂配置

展开所配置的数据

可以使用"&",作为数据映射 key,展开所配置的变量,例如:

\n

下面例子中,我们想在提交的时候,除了提交 nameemail 变量以外,还想添加 c 下面的所有变量 e,f,g,但是按照之前所讲的, api 应该这么配置:

\n
\n

点击提交查看网络面板数据,你会发现数据是符合预期的:

\n
{\n  \"name\": \"rick\",\n  \"email\": \"rick@gmail.comn\",\n  \"e\": \"3\",\n  \"f\": \"4\",\n  \"g\": \"5\"\n}\n
\n

但是当变量字段过多的时候,你需要一一映射配置,也许有点麻烦,所以可以使用"&"标识符,来展开所配置变量:

\n
\n

上例中我们 api.data 配置如下:

\n
\"data\": {\n  \"name\": \"${name}\",\n  \"email\": \"${email}\",\n  \"&\": \"${c}\"\n}\n
\n

"&"标识符会将所配置的c变量的value值,展开并拼接在data中。查看网络面板可以看到数据如下:

\n
{\n  \"name\": \"rick\",\n  \"email\": \"rick@gmail.comn\",\n  \"e\": \"3\",\n  \"f\": \"4\",\n  \"g\": \"5\"\n}\n
\n

数组提取值

\n

上例中的apidata配置格式如下:

\n
\"data\": {\n    \"items\": {\n      \"$table\": {\n        \"a\": \"${a}\",\n        \"c\": \"${c}\"\n      }\n    }\n}\n
\n

这个配置的意思是,只提取table数组中的a变量和c变量,组成新的数组,赋值给items变量

\n

点击提交,查看浏览器网络面板可以发现,表单的提交数据结构如下:

\n
{\n  \"items\": [\n    {\n      \"a\": \"a1\",\n      \"c\": \"c1\"\n    },\n    {\n      \"a\": \"a2\",\n      \"c\": \"c2\"\n    },\n    {\n      \"a\": \"a3\",\n      \"c\": \"c3\"\n    }\n  ]\n}\n
\n

过滤器

过滤器是对数据映射的一种增强,它的作用是对获取数据做一些处理,基本用法如下:

\n
${xxx [ |filter1 |filter2...] }\n

下面我们会逐一介绍每一个过滤器的用法。

\n
\n

过滤器可以 串联使用

\n
\n

html

用于显示 html 文本。

\n
基本用法
${xxx | html}\n
\n

raw

不同场景下,在使用数据映射时,amis 可能默认会使用html过滤器对数据进行转义显示,这时如果想要输出原始文本,请配置raw过滤器。

\n
基本用法

使用raw可以直接输出原始文本

\n
${xxx | raw}\n
\n
\n

注意!!!

\n

raw过滤器虽然支持显示原始文本,也就意味着可以输出 HTML 片段,但是动态渲染 HTML 是非常危险的,容易导致 XSS 攻击。

\n

因此在 使用raw过滤器的时候,请确保变量的内容可信,且永远不要渲染用户填写的内容。

\n
\n

json

用于将数据转换为json格式字符串

\n
基本用法
${xxx | json[:tabSize]}\n
\n
指定缩进数
${xxx|json:4} // 指定缩进为4个空格\n

toJson

json相反,用于将json格式的字符串,转换为javascript对象

\n
${xxx | toJson}\n
\n

Javascript的直接输出会显示[object Object],你可以使用 json 过滤器 来格式化显示json文本。

\n

date

日期格式化过滤器,用于把特定时间值按指定格式输出。

\n
基本用法
${xxx | date[:format][:inputFormat]}\n
    \n
  • format:需要展示的格式,默认为'LLL',即本地化时间格式
  • \n
  • inputFormat:指定该变量值的格式,默认为'X',即时间戳
  • \n
\n

具体参数的配置需要参考 moment

\n
\n
配置输出格式

例如你想将某一个时间值,以 2020-04-14 这样的格式输出,那么查找 moment 文档可知配置格式应为 YYYY-MM-DD,即:

\n
\n
配置数据格式

如果你的数据值默认不是X格式(即时间戳格式),那么需要配置inputformat参数用于解析当前时间值,例如:

\n
\n
\n

注意: 在过滤器参数中使用:字符,需要在前面加\\\\转义字符

\n
\n

number

自动给数字加千分位。

\n
基本用法
${xxx | number}\n
\n

trim

把变量值前后多余的空格去掉。

\n
基本用法
${xxx | trim}\n

percent

基本用法
${xxx | percent[:decimals]}\n
    \n
  • decimals:指定小数点后n位数,默认为0
  • \n
\n
\n
指定小数点后位数
\n

round

四舍五入取整

\n
${xxx | round[:decimals]}\n
    \n
  • decimals:指定小数点后n位小数,默认为2
  • \n
\n
\n
指定小数点后位数
\n

truncate

当超出若干个字符时,后面的部分直接显示某串字符

\n
基本用法
${xxx | truncate[:length][:mask]}\n
    \n
  • length:指定多长的字符后省略,默认为200
  • \n
  • mask:省略时显示的字符,默认为"..."
  • \n
\n
\n

url_encode

效果同 encodeURIComponent() - JavaScript | MDN

\n
基本用法
${xxx | url_encode}\n

url_decode

效果同 decodeURIComponent() - JavaScript | MDN

\n
基本用法
${xxx | url_decode}\n

default

当变量值为空时,显示其他值代替。

\n
基本用法
${xxx | default[:defaultValue]}\n
    \n
  • defaultValue:显示的默认值
  • \n
\n
\n

split

可以将字符传通过分隔符分离成数组

\n
基本用法
${xxx | split[:delimiter]}\n
    \n
  • delimiter:分隔值,默认为,
  • \n
\n
\n

join

当变量值是数组时,可以把内容连接起来。

\n
基本用法
${xxx | join[:glue]}\n
    \n
  • glue:连接符,默认为空字符
  • \n
\n
\n
配置连接符
\n

first

获取数组中的第一个值

\n
基本用法
${xxx | first}\n
\n

last

获取数组中的最后一个值

\n
基本用法
${xxx | last}\n
\n

nth

获取数组中的第n个值

\n
基本用法
${xxx | nth[:nth]}\n
    \n
  • nth:指定获取第几个值
  • \n
\n
\n

注意: nth 配置0为获取第一个元素。

\n

pick

获取对象或数组中符合条件的筛选值

\n
基本用法
${xxx | pick[:path]}\n
    \n
  • path: 指定筛选的模板,默认为&,即返回原数据
  • \n
\n
在对象中获取某个 key 值
\n
遍历对象数组获取指定值
\n
遍历数组对象,并自定义 key
\n

duration

秒值格式化成时间格式

\n
基本用法
${xxx | duration}\n
\n

asArray

将数据包成数组

\n
基本用法
${xxx | asArray}\n
\n

lowerCase

将字符串转小写

\n
基本用法
${xxx | lowerCase}\n
\n

upperCase

将字符串转大写

\n
基本用法
${xxx | upperCase}\n
\n

base64Encode

base64 加密

\n
基本用法
${xxx | base64Encode}\n
\n

base64Decode

base64 解密

\n
基本用法
${xxx | base64Decode}\n
\n

isTrue

真值条件过滤器

\n
基本用法
${xxx | isTrue[:trueValue][:falseValue]\n
    \n
  • trueValue: 如果变量为 ,即返回该值;
  • \n
  • falseValue: 如果变量为 ,则返回该值。
  • \n
\n
\n

配置trueValuefalseValue时,如果想要返回当前数据域中某个变量的值,那么参数可以直接配置变量名而不需要在两边添加引号;如果想返回某字符串,那么需要给参数两边添加单引号或双引号,

\n

例如 ${xxx|isTrue:'foo':bar},当 xxx 变量为真,那么会返回 字符串'foo',如果不为真,那么返回数据域中 变量bar 的值。

\n
\n
\n
返回数据域中变量

参数中不添加引号,可以直接返回数据域中变量值

\n
\n

isFalse

假值条件过滤器

\n
基本用法
${xxx | isFalse[:falseValue][:trueValue]\n

用法与 isTrue 过滤器 相同,判断逻辑相反

\n

isMatch

模糊匹配条件过滤器

\n
基本用法
${xxx | isMatch[:matchParam][:trueValue][:falseValue]\n
    \n
  • matchParam: 匹配关键字参数
      \n
    • 如果想模糊匹配特定字符串,那么参数需要在两边添加单引号或者双引号;
    • \n
    • 如果想模糊匹配某个变量值,那么参数不需要添加引号。
    • \n
    \n
  • \n
  • trueValue: 如果模糊匹配成功,即返回该值;
  • \n
  • falseValue: 如果模糊匹配失败,则返回该值。
  • \n
\n
\n
返回数据域中变量

参数中不添加引号,可以直接返回数据域中变量值

\n
\n

notMatch

基本用法
${xxx | notMatch[:matchParam][:trueValue][:falseValue]\n

用法与 isMatch 相同,判断逻辑相反。

\n

isEquals

全等匹配过滤器

\n
基本用法
${xxx | isEquals[:equalsValue][:trueValue][:falseValue]\n
    \n
  • equalsValue: 全等匹配关键字参数
      \n
    • 如果想判断等于特定字符串,那么参数需要在两边添加单引号或者双引号;
    • \n
    • 如果想判断等于某个变量值,那么参数不需要添加引号。
    • \n
    \n
  • \n
  • trueValue: 如果模糊匹配成功,即返回该值;
  • \n
  • falseValue: 如果模糊匹配失败,则返回该值。
  • \n
\n
\n
返回数据域中变量

参数中不添加引号,可以直接返回数据域中变量值

\n
\n

notEquals

不全等匹配过滤器

\n
基本用法
${xxx | notEquals[:equalsValue][:trueValue][:falseValue]\n

用法与 isEquals 相同,判断逻辑相反。

\n

filter

过滤数组,操作对象为数组,当目标对象不是数组时将无效。

\n
基本用法
${xxx | filter[:keys][:directive][:arg1]}\n
    \n
  • keys: 参与过滤的字段集合
  • \n
  • directive: 用于过滤数组的指令,包含下面这几种
      \n
    • isTrue 目标值为真通过筛选。
    • \n
    • isFalse 目标值为假时通过筛选。
    • \n
    • match 模糊匹配后面的参数。${xxx|filter:a,b:match:keywords} 表示 xxx 里面的成员,如果字段 a 或者 字段 b 模糊匹配 keywords 变量的值,则通过筛选。
    • \n
    • equals 相对于模糊匹配,这个就相对精确匹配了,用法跟 match 一样。
    • \n
    \n
  • \n
  • arg1: 字符串或变量名

    \n

    比如: ${xxx|filter:readonly:isTrue} 将 xxx 数组中 readonly 为 true 的成员提取出来。\n再来个栗子:${xxx|filter:a,b:match:keywords} 将 xxx 数组中成员变量 a 或者 b 的值与环境中 keywords 的值相匹配的提取出来。如果不需要取变量,也可以写固定值如:${xxx|filter:a,b:match:'123'}

    \n
  • \n
\n

串联使用过滤器

使用单一的过滤器可能无法满足你的所有需求,幸运的是 amis 支持串联使用过滤器,而前一个过滤器的值会作为下一个过滤器的入参,进行下一步处理。语法如下:

\n
${xxx|filter1|filter2|...}\n
先拆分字符串,再获取第 n 个值
\n

上例子中${value|split|first},会经历下面几个步骤:

\n
    \n
  1. 会先执行split过滤器,将字符串a,b,c,拆分成数组["a", "b", "c"]
  2. \n
  3. 然后将该数据传给下一个过滤器first,执行该过滤器,获取数组第一个元素,为"a"
  4. \n
  5. 输出"a"
  6. \n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "模板字符串", - "fragment": "%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2", - "fullPath": "#%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2", - "level": 2 - }, - { - "label": "支持链式取值", - "fragment": "%E6%94%AF%E6%8C%81%E9%93%BE%E5%BC%8F%E5%8F%96%E5%80%BC", - "fullPath": "#%E6%94%AF%E6%8C%81%E9%93%BE%E5%BC%8F%E5%8F%96%E5%80%BC", - "level": 2 - }, - { - "label": "自定义 api 请求体数据格式", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89-api-%E8%AF%B7%E6%B1%82%E4%BD%93%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89-api-%E8%AF%B7%E6%B1%82%E4%BD%93%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "level": 2 - }, - { - "label": "复杂配置", - "fragment": "%E5%A4%8D%E6%9D%82%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%A4%8D%E6%9D%82%E9%85%8D%E7%BD%AE", - "level": 2, - "children": [ - { - "label": "展开所配置的数据", - "fragment": "%E5%B1%95%E5%BC%80%E6%89%80%E9%85%8D%E7%BD%AE%E7%9A%84%E6%95%B0%E6%8D%AE", - "fullPath": "#%E5%B1%95%E5%BC%80%E6%89%80%E9%85%8D%E7%BD%AE%E7%9A%84%E6%95%B0%E6%8D%AE", - "level": 3 - }, - { - "label": "数组提取值", - "fragment": "%E6%95%B0%E7%BB%84%E6%8F%90%E5%8F%96%E5%80%BC", - "fullPath": "#%E6%95%B0%E7%BB%84%E6%8F%90%E5%8F%96%E5%80%BC", - "level": 3 - } - ] - }, - { - "label": "过滤器", - "fragment": "%E8%BF%87%E6%BB%A4%E5%99%A8", - "fullPath": "#%E8%BF%87%E6%BB%A4%E5%99%A8", - "level": 2, - "children": [ - { - "label": "html", - "fragment": "html", - "fullPath": "#html", - "level": 3 - }, - { - "label": "raw", - "fragment": "raw", - "fullPath": "#raw", - "level": 3 - }, - { - "label": "json", - "fragment": "json", - "fullPath": "#json", - "level": 3 - }, - { - "label": "toJson", - "fragment": "tojson", - "fullPath": "#tojson", - "level": 3 - }, - { - "label": "date", - "fragment": "date", - "fullPath": "#date", - "level": 3 - }, - { - "label": "number", - "fragment": "number", - "fullPath": "#number", - "level": 3 - }, - { - "label": "trim", - "fragment": "trim", - "fullPath": "#trim", - "level": 3 - }, - { - "label": "percent", - "fragment": "percent", - "fullPath": "#percent", - "level": 3 - }, - { - "label": "round", - "fragment": "round", - "fullPath": "#round", - "level": 3 - }, - { - "label": "truncate", - "fragment": "truncate", - "fullPath": "#truncate", - "level": 3 - }, - { - "label": "url_encode", - "fragment": "url_encode", - "fullPath": "#url_encode", - "level": 3 - }, - { - "label": "url_decode", - "fragment": "url_decode", - "fullPath": "#url_decode", - "level": 3 - }, - { - "label": "default", - "fragment": "default", - "fullPath": "#default", - "level": 3 - }, - { - "label": "split", - "fragment": "split", - "fullPath": "#split", - "level": 3 - }, - { - "label": "join", - "fragment": "join", - "fullPath": "#join", - "level": 3 - }, - { - "label": "first", - "fragment": "first", - "fullPath": "#first", - "level": 3 - }, - { - "label": "last", - "fragment": "last", - "fullPath": "#last", - "level": 3 - }, - { - "label": "nth", - "fragment": "nth", - "fullPath": "#nth", - "level": 3 - }, - { - "label": "pick", - "fragment": "pick", - "fullPath": "#pick", - "level": 3 - }, - { - "label": "duration", - "fragment": "duration", - "fullPath": "#duration", - "level": 3 - }, - { - "label": "asArray", - "fragment": "asarray", - "fullPath": "#asarray", - "level": 3 - }, - { - "label": "lowerCase", - "fragment": "lowercase", - "fullPath": "#lowercase", - "level": 3 - }, - { - "label": "upperCase", - "fragment": "uppercase", - "fullPath": "#uppercase", - "level": 3 - }, - { - "label": "base64Encode", - "fragment": "base64encode", - "fullPath": "#base64encode", - "level": 3 - }, - { - "label": "base64Decode", - "fragment": "base64decode", - "fullPath": "#base64decode", - "level": 3 - }, - { - "label": "isTrue", - "fragment": "istrue", - "fullPath": "#istrue", - "level": 3 - }, - { - "label": "isFalse", - "fragment": "isfalse", - "fullPath": "#isfalse", - "level": 3 - }, - { - "label": "isMatch", - "fragment": "ismatch", - "fullPath": "#ismatch", - "level": 3 - }, - { - "label": "notMatch", - "fragment": "notmatch", - "fullPath": "#notmatch", - "level": 3 - }, - { - "label": "isEquals", - "fragment": "isequals", - "fullPath": "#isequals", - "level": 3 - }, - { - "label": "notEquals", - "fragment": "notequals", - "fullPath": "#notequals", - "level": 3 - }, - { - "label": "filter", - "fragment": "filter", - "fullPath": "#filter", - "level": 3 - } - ] - }, - { - "label": "串联使用过滤器", - "fragment": "%E4%B8%B2%E8%81%94%E4%BD%BF%E7%94%A8%E8%BF%87%E6%BB%A4%E5%99%A8", - "fullPath": "#%E4%B8%B2%E8%81%94%E4%BD%BF%E7%94%A8%E8%BF%87%E6%BB%A4%E5%99%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/datascope-and-datachain.html b/gh-pages/docs/concepts/datascope-and-datachain.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/datascope-and-datachain.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/datascope-and-datachain_9b7aaf7.js b/gh-pages/docs/concepts/datascope-and-datachain_9b7aaf7.js deleted file mode 100644 index 27c0cf35..00000000 --- a/gh-pages/docs/concepts/datascope-and-datachain_9b7aaf7.js +++ /dev/null @@ -1,83 +0,0 @@ -amis.define('docs/concepts/datascope-and-datachain.md', function(require, exports, module, define) { - - module.exports = { - "title": "数据域与数据链", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "数据域与数据链", - "icon": null, - "order": 10, - "html": "

基本的数据展示

我们再看之前的 Hello World 示例:

\n
{\n  \"type\": \"page\",\n  \"body\": \"Hello World!\"\n}\n
\n

目前我们只是在 Page 组件中渲染一串固定的文本,如果我们想要 通过接口拉取想要的数据,并展示到 Page 组件的内容区 呢?

\n

添加初始化接口

{\n  \"type\": \"page\",\n  \"initApi\": \"https://houtai.baidu.com/api/mock2/page/initData\",\n  \"body\": \"date is ${date}\"\n}\n
\n

接口返回的数据结构如下:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"title\": \"Test Page Component\",\n    \"date\": \"2017-10-13\"\n  }\n}\n
\n

渲染后页面如下:

\n
\n

发生了什么?

我们可以看到,输出结果不变,但是我们这次渲染的是接口返回的数据:

\n
    \n
  1. 首先我们给 Page 组件配置了initApi属性,该属性会在组件初始化时,请求所该属性所配置的接口
  2. \n
  3. 接口请求成功后,Page 会把接口返回的data内数据存到当前的数据域中
  4. \n
  5. Page 在渲染 body 所配置的文本时,会解析文本内容,当解析到模板变量${text}时,amis 会把尝试在当前组件的数据域中获取text变量值,并替换掉${text},最后渲染解析后的文本。
  6. \n
\n
\n

下一节我们会介绍模板body属性自身支持模板语法,amis 中支持模板语法的组件还有很多

\n
\n

数据域

前面我们提到了数据域这个概念,它是 amis 中最重要的概念之一。

\n

还是通过最简单的示例进行讲解:

\n
{\n  \"type\": \"page\",\n  \"body\": \"Hello ${text}\"\n}\n
\n

上面的配置要做的很简单:使用 Page 组件,在内容区内渲染一段模板文字,其中${text}模板变量,它会去到当前组件的数据域中,获取text变量值。

\n

毫无疑问,${text}将会解析为空白文本,最终渲染的文本是 Hello

\n
\n

因为当前 Page 组件的数据域中是没有任何数据的,相比之前的示例,区别在于前面我们为 Page 组件配置了初始化接口,它会将接口返回的数据存入数据域中以供组件使用。

\n

再观察下面这段配置:

\n
\n

再次查看渲染结果,顺利输出了 Hello World!

\n

相信你可能已经猜到,组件的data属性值是数据域的一种形式,实际上当我们没有显式的配置数据域时,可以假想成这样:

\n
\n
\n

amis 中大部分组件都具有数据域。

\n

而前面我们知道 amis 的特性之一是基于组件树,因此自然数据域也会形成类似于树型结构,如何来处理这些数据域之间的联系呢,这就是我们马上要介绍到的 数据链

\n
\n

数据链

相信通过上文,你已经基本掌握了 amis 中数据域的概念,接下来我们会介绍另一个重要概念:数据链

\n

数据链的特性是,当前组件在遇到获取变量的场景(例如模板渲染、展示表单数据、渲染列表等等)时:

\n
    \n
  1. 首先会先尝试在当前组件的数据域中寻找变量,当成功找到变量时,通过数据映射完成渲染,停止寻找过程;
  2. \n
  3. 当在当前数据域中没有找到变量时,则向上寻找,在父组件的数据域中,重复步骤12
  4. \n
  5. 一直寻找,直到顶级节点,也就是page节点,寻找过程结束。
  6. \n
\n
\n

为了方便讲解,我们这一章的例子统一使用的设置组件data属性的方式来初始化数据域,请记住,如果组件支持,你永远可以通过接口来进行数据域的初始化

\n
\n

继续来看这个例子:

\n
\n

上面的配置项形成了如下的组件树和数据链:

\n

组件树:

\n
page\n  ├─ tpl\n  └─ service\n       └─ tpl\n

数据链:

\n
{\n  \"name\": \"zhangsan\",\n  \"age\": 20,\n  \"__sub\": {\n    \"name\": \"lisi\"\n  }\n}\n
\n
\n

__sub 字段只是为了方便理解。

\n
\n

首先,page组件下的tpl组件,在渲染my name is ${name}时,首先会在page的数据域中,尝试寻找name变量,在当前数据域中,name变量为zhangsan,因此寻找变量结束,通过数据映射渲染,输出:my name is zhangsan,渲染结束;

\n

然后,service组件开始渲染,service组件内子组件tpl,它配置的模板字符串是:my name is ${name}, I'm ${age} years old,它会在service的数据域中,尝试寻找nameage变量。

\n

由代码可以看出,service数据域中name变量为lisi,因此停止该变量的寻找,接下来寻找age变量。

\n

很明显在service数据域中寻找age变量会失败,因此向上查找,尝试在page数据域中寻找age变量,找到为20,寻找变量结束,通过数据映射渲染,输出:my name is lisi, I'm 20 years old,渲染结束。

\n
\n

注意: 当前例子中,对数据域中数据的获取使用的是 \\${xxx} 模板语法,但是在不同的组件配置项中,获取数据的语法会有差异,我们会在后续的模板表达式章节中一一介绍。

\n
\n

初始化数据域

通过上面的介绍你可能发现,初始化数据域有两种方式:

\n

1. 配置组件初始化接口

想要将自己的服务中的数据保存到某个组件的数据域中,最好的方式就是为当前组件配置初始化接口:

\n
{\n  \"type\": \"page\",\n  \"initApi\": \"/api/initData\",\n  \"body\": \"Hello ${text}\"\n}\n
\n

接口必须按照下面的格式返回:

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    \"text\": \"World!\"\n    ...其他字段\n  }\n}\n
\n

注意:

\n
    \n
  1. 并不是所有组件都支持配置初始化接口来实现数据域初始化操作,对于那些不支持配置初始化接口的组件来说,一般会使用 Service 组件 来辅助实现数据域初始化;
  2. \n
  3. statusmsgdata 字段为接口返回的必要字段;
  4. \n
  5. data必须返回一个具有key-value结构的对象
  6. \n
\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": { // 正确\n    \"text\": \"World!\"\n  }\n}\n\n// 直接返回字符串或者数组都是无效的\n{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": \"some string\" // 错误,使用 key 包装\n}\n{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": [\"a\", \"b\"] // 错误,使用 key 包装\n}\n
\n
\n

api 除了配置字符串格式以外,还可以配置复杂对象结构,更多详情查看API 文档

\n
\n

2. 显式配置 data 属性值

另一种初始化当前数据域的方式是显式的设置组件的data属性值:

\n
\n

同时配置

在同时配置 初始化接口data属性 时,数据域将会合并data属性值和初始化接口返回的数据

\n

更新数据域

部分组件的某些交互或行为会对当前组件的数据域进行更新:

\n
\n

/api/saveForm接口会保存当前表单提交的数据,并返回后端服务生成的id,并返回到前端,格式如下;

\n
{\n  \"status\": 0,\n  \"msg\": \"保存成功\",\n  \"data\": {\n    \"id\": 1\n  }\n}\n
\n

这时 amis 将会把data数据与当前form组件的数据域进行mergeform组件中的static-tpl组件会根据更新后的数据域,显示id1

\n
\n

具有类似特征的组件还有Formula

\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本的数据展示", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%95%B0%E6%8D%AE%E5%B1%95%E7%A4%BA", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%95%B0%E6%8D%AE%E5%B1%95%E7%A4%BA", - "level": 2 - }, - { - "label": "添加初始化接口", - "fragment": "%E6%B7%BB%E5%8A%A0%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "fullPath": "#%E6%B7%BB%E5%8A%A0%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "level": 2 - }, - { - "label": "发生了什么?", - "fragment": "%E5%8F%91%E7%94%9F%E4%BA%86%E4%BB%80%E4%B9%88-", - "fullPath": "#%E5%8F%91%E7%94%9F%E4%BA%86%E4%BB%80%E4%B9%88-", - "level": 2 - }, - { - "label": "数据域", - "fragment": "%E6%95%B0%E6%8D%AE%E5%9F%9F", - "fullPath": "#%E6%95%B0%E6%8D%AE%E5%9F%9F", - "level": 2 - }, - { - "label": "数据链", - "fragment": "%E6%95%B0%E6%8D%AE%E9%93%BE", - "fullPath": "#%E6%95%B0%E6%8D%AE%E9%93%BE", - "level": 2 - }, - { - "label": "初始化数据域", - "fragment": "%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E6%8D%AE%E5%9F%9F", - "fullPath": "#%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E6%8D%AE%E5%9F%9F", - "level": 2, - "children": [ - { - "label": "1. 配置组件初始化接口", - "fragment": "1-%E9%85%8D%E7%BD%AE%E7%BB%84%E4%BB%B6%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "fullPath": "#1-%E9%85%8D%E7%BD%AE%E7%BB%84%E4%BB%B6%E5%88%9D%E5%A7%8B%E5%8C%96%E6%8E%A5%E5%8F%A3", - "level": 3 - }, - { - "label": "2. 显式配置 data 属性值", - "fragment": "2-%E6%98%BE%E5%BC%8F%E9%85%8D%E7%BD%AE-data-%E5%B1%9E%E6%80%A7%E5%80%BC", - "fullPath": "#2-%E6%98%BE%E5%BC%8F%E9%85%8D%E7%BD%AE-data-%E5%B1%9E%E6%80%A7%E5%80%BC", - "level": 3 - }, - { - "label": "同时配置", - "fragment": "%E5%90%8C%E6%97%B6%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%90%8C%E6%97%B6%E9%85%8D%E7%BD%AE", - "level": 3 - } - ] - }, - { - "label": "更新数据域", - "fragment": "%E6%9B%B4%E6%96%B0%E6%95%B0%E6%8D%AE%E5%9F%9F", - "fullPath": "#%E6%9B%B4%E6%96%B0%E6%95%B0%E6%8D%AE%E5%9F%9F", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/expression.html b/gh-pages/docs/concepts/expression.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/expression.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/expression_40c937a.js b/gh-pages/docs/concepts/expression_40c937a.js deleted file mode 100644 index 63051920..00000000 --- a/gh-pages/docs/concepts/expression_40c937a.js +++ /dev/null @@ -1,27 +0,0 @@ -amis.define('docs/concepts/expression.md', function(require, exports, module, define) { - - module.exports = { - "title": "表达式", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "表达式", - "icon": null, - "order": 13, - "html": "

一般来说,属性名类似于xxxOn的配置项,都可以使用表达式进行配置,表达式具有如下的语法:

\n
{\n  \"type\": \"tpl\",\n  \"tpl\": \"当前作用域中变量 show 是 1 的时候才可以看得到我哦~\",\n  \"visibleOn\": \"data.show === 1\"\n}\n
\n

其中:data.show === 1 就是表达式。

\n

表达式语法

\n

表达式语法实际上是 JavaScript 代码,更多 JavaScript 知识查看 这里

\n
\n

在 amis 的实现过程中,当正则匹配到某个组件存在xxxOn语法的属性名时,会尝试进行下面步骤(以上面配置为例):

\n
    \n
  1. 提取visibleOn配置项配置的 JavaScript 语句data.show === 1,并以当前组件的数据域为这段代码的数据作用域,执行这段 js 代码;
  2. \n
  3. 之后将执行结果赋值给visible并添加到组件属性中
  4. \n
  5. 执行渲染。当前示例中:visible代表着是否显示当前组件;
  6. \n
\n

组件不同的配置项会有不同的效果,请大家在组件文档中多留意。

\n
\n

表达式的执行结果预期应该是boolean类型值,如果不是,amis 会根据 JavaScript 的规则将结果视作boolean类型进行判断

\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "表达式语法", - "fragment": "%E8%A1%A8%E8%BE%BE%E5%BC%8F%E8%AF%AD%E6%B3%95", - "fullPath": "#%E8%A1%A8%E8%BE%BE%E5%BC%8F%E8%AF%AD%E6%B3%95", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/linkage.html b/gh-pages/docs/concepts/linkage.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/linkage.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/linkage_862b62d.js b/gh-pages/docs/concepts/linkage_862b62d.js deleted file mode 100644 index 423767d0..00000000 --- a/gh-pages/docs/concepts/linkage_862b62d.js +++ /dev/null @@ -1,87 +0,0 @@ -amis.define('docs/concepts/linkage.md', function(require, exports, module, define) { - - module.exports = { - "title": "联动", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "联动", - "icon": null, - "order": 14, - "html": "

上一节我们介绍了表达式的概念,而表达式应用最多的场景,是实现页面的联动效果。

\n

基本联动

元素的联动是页面开发中很常见的功能之一,类似于:

\n
    \n
  • 某个条件下显示或隐藏某个组件
  • \n
  • 某个条件下请求接口
  • \n
  • 某个条件下轮训接口停止轮训
  • \n
  • 等等...
  • \n
\n
\n

联动配置项一般都是 表达式

\n
\n

组件配置联动

控制组件的显隐,表单项的禁用状态等,看下面这个例子:

\n
\n

上面实例主要为一个表单,表单内有三个组件:一个radio, 两个text,通过配置联动配置项,实现下面联动效果:

\n
    \n
  1. 只要当radio选中类型1时,才会显示text1
  2. \n
  3. radio选中类型2时,text2将会变为禁用状态
  4. \n
\n
\n

注意:

\n

在表单项联动中,为了方便数据的读取,赋值后或者修改过的表单项,通过隐藏后,并不会在当前数据域中删除掉该字段值,因此默认提交的时候可能仍然会带上已隐藏表单项的值

\n

如果想要在提交时去掉某个隐藏的字段,可以通过 数据映射 配置自定义数据体

\n
\n

接口联动

基本使用

接口联动是另外一种很常见的场景,查看下面这个例子:

\n
\n

上面例子我们实现了这个逻辑:每次选择选项1的时候,会触发选项2source配置的接口重新请求,并返回不同的下拉选项。

\n

是如何做到的?

\n

实际上,所有初始化接口链接上使用数据映射获取参数的形式时,例如下面的query=${query},在当前数据域中,所引用的变量值(即 query)发生变化时,自动重新请求该接口。

\n
{\n  \"initApi\": \"/api/initData?query=${query}\"\n}\n
\n
\n

tip:

\n

触发所引用变量值发生变化的方式有以下几种:

\n
    \n
  1. 通过对表单项的修改,可以更改表单项name属性值所配置变量的值;
  2. \n
  3. 通过组件间联动,将其他组件的值发送到目标组件,进行数据域的更新,从而触发联动效果
  4. \n
\n

接口联动一般只适用于初始化接口,例如:

\n
    \n
  • form组件中的initApi
  • \n
  • select组件中的source选项源接口;
  • \n
  • service组件中的apischemaApi
  • \n
  • crud组件中的api
  • \n
  • 等等...
  • \n
\n
\n

配置请求条件

默认在变量变化时,总是会去请求联动的接口,你也可以配置请求条件,当只有当前数据域中某个值符合特定条件才去请求该接口。

\n
\n

更多用法,见:Api-配置请求条件

\n

主动触发

上面示例有个问题,就是数据一旦变化就会出发重新拉取,而输入框的频繁变化值会导致频繁的拉取?没关系,也可以配置主动拉取如:

\n
\n
    \n
  1. 通过api对象形式,将获取变量值配置到data请求体中。
  2. \n
  3. 配置搜索按钮,并配置该行为是刷新目标组件,并配置目标组件target
  4. \n
  5. 这样我们只有在点击搜索按钮的时候,才会将keyword值发送给select组件,重新拉取选项
  6. \n
\n

其他联动

还有一些组件特有的联动效果,例如 form 的 disabledOn,crud 中的 itemDraggableOn 等等,可以参考相应的组件文档。

\n

组件间联动

联动很可能会出现跨组件的形式,思考下面这种场景:

\n

有一个表单form组件,还有一个列表组件crud,我们想要把form提交的数据,可以用作crud的查询条件,并请求crud的接口,由于formcrud位于同一层级,因此没法使用数据链的方式进行取值。

\n
\n

现在更改配置如下:

\n
\n

我们进行两个调整:

\n
    \n
  1. crud组件设置了name属性为my_crud
  2. \n
  3. form组件配置了target属性为crudnamemy_crud
  4. \n
\n

更改配置后,提交表单时,如果有配置提交接口,会先请求提交,之后 amis 会寻找target所配置的目标组件,把form中所提交的数据,发送给该目标组件中,并将该数据合并到目标组件的数据域中,并触发目标组件的刷新操作,对于 CRUD 组件来说,刷新即重新拉取数据接口。

\n
\n

当然,crud组件内置已经支持此功能,你只需要配置crud中的filter属性,就可以实现上面的效果,更多内容查看 crud -> filter 文档。

\n
\n

我们再来一个例子,这次我们实现 两个 form 之间的联动

\n

发送指定数据

target属性支持通过配置参数来发送指定数据,例如:"target" :"xxx?a=${a}&b=${b}",这样就会把当前数据域中的a变量和b变量发送给目标组件

\n
\n

上例中我们给按钮上配置了"target": "form2?name=${name}&email=${email}",可以把当前数据链中的name变量和email变量发送给form2

\n

配置多个目标

target支持配置多个目标组件 name,用逗号隔开,例如:

\n
{\n  \"type\": \"action\",\n  \"actionType\": \"reload\",\n  \"label\": \"刷新目标组件\",\n  \"target\": \"target1,target2\"\n}\n
\n

上例中点击按钮会刷新target1target2组件。

\n

事实上,组件间联动也可以实现上述任意的 基本联动效果(显隐联动、接口联动等其他联动)。

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本联动", - "fragment": "%E5%9F%BA%E6%9C%AC%E8%81%94%E5%8A%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E8%81%94%E5%8A%A8", - "level": 2, - "children": [ - { - "label": "组件配置联动", - "fragment": "%E7%BB%84%E4%BB%B6%E9%85%8D%E7%BD%AE%E8%81%94%E5%8A%A8", - "fullPath": "#%E7%BB%84%E4%BB%B6%E9%85%8D%E7%BD%AE%E8%81%94%E5%8A%A8", - "level": 3 - }, - { - "label": "接口联动", - "fragment": "%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "fullPath": "#%E6%8E%A5%E5%8F%A3%E8%81%94%E5%8A%A8", - "level": 3, - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 4 - }, - { - "label": "配置请求条件", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%9D%A1%E4%BB%B6", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%9D%A1%E4%BB%B6", - "level": 4 - }, - { - "label": "主动触发", - "fragment": "%E4%B8%BB%E5%8A%A8%E8%A7%A6%E5%8F%91", - "fullPath": "#%E4%B8%BB%E5%8A%A8%E8%A7%A6%E5%8F%91", - "level": 4 - } - ] - }, - { - "label": "其他联动", - "fragment": "%E5%85%B6%E4%BB%96%E8%81%94%E5%8A%A8", - "fullPath": "#%E5%85%B6%E4%BB%96%E8%81%94%E5%8A%A8", - "level": 3 - } - ] - }, - { - "label": "组件间联动", - "fragment": "%E7%BB%84%E4%BB%B6%E9%97%B4%E8%81%94%E5%8A%A8", - "fullPath": "#%E7%BB%84%E4%BB%B6%E9%97%B4%E8%81%94%E5%8A%A8", - "level": 2, - "children": [ - { - "label": "发送指定数据", - "fragment": "%E5%8F%91%E9%80%81%E6%8C%87%E5%AE%9A%E6%95%B0%E6%8D%AE", - "fullPath": "#%E5%8F%91%E9%80%81%E6%8C%87%E5%AE%9A%E6%95%B0%E6%8D%AE", - "level": 3 - }, - { - "label": "配置多个目标", - "fragment": "%E9%85%8D%E7%BD%AE%E5%A4%9A%E4%B8%AA%E7%9B%AE%E6%A0%87", - "fullPath": "#%E9%85%8D%E7%BD%AE%E5%A4%9A%E4%B8%AA%E7%9B%AE%E6%A0%87", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/schema.html b/gh-pages/docs/concepts/schema.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/schema.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/schema_8534813.js b/gh-pages/docs/concepts/schema_8534813.js deleted file mode 100644 index 35b6b06d..00000000 --- a/gh-pages/docs/concepts/schema_8534813.js +++ /dev/null @@ -1,39 +0,0 @@ -amis.define('docs/concepts/schema.md', function(require, exports, module, define) { - - module.exports = { - "title": "配置与组件", - "description": "配置与组件", - "type": 0, - "group": "💡 概念", - "menuName": "配置与组件", - "icon": null, - "order": 9, - "html": "

最简单的 amis 配置

一个最简单的 amis 配置看起来是这样的:

\n
{\n  \"type\": \"page\",\n  \"body\": \"Hello World!\"\n}\n
\n

请观察上面的代码,这是一段普通的 JSON 格式文本,它的含义是:

\n
    \n
  1. type是每一个 amis 节点中,最重要的一个字段,它会告诉 amis 当前节点需要渲染的是Page组件
  2. \n
  3. body字段会被看作是Page组件的属性,将该属性值所配置的内容,渲染到Page组件的内容区中
  4. \n
\n

上面配置通过 amis 的处理,会渲染出一个简单的页面,并在页面中展示文字:Hello World!,就像下面这样:

\n
\n

后续章节中,你会经常看到例如上面这样,支持实时编辑配置预览效果的页面配置预览工具,它可以帮助你更直观的看到具体配置所展示的页面效果。

\n

组件

上面提到,type字段会告诉 amis 当前节点渲染的组件为PagePage 属于 amis 内置组件之一。

\n

组件节点的配置永远都是由 type字段 (用于标识当前是哪个组件)和 若干属性值 构成的。

\n
{\n  "type": "xxx",\n  ...若干属性值\n}\n

组件树

这次我们看一个稍微复杂一点的配置:

\n
{\n  \"type\": \"page\",\n  \"body\": {\n    \"type\": \"tpl\",\n    \"tpl\": \"Hello World!\"\n  }\n}\n
\n

该配置渲染页面如下:

\n
\n

看起来和之前的示例没啥区别,但是发现和之前不同的地方了吗?

\n

这次 Page 组件的 body 属性值,我们配置了一个对象,通过type指明body内容区内会渲染一个叫Tpl的组件,它是一个模板渲染组件,这里我们先只是配置一段固定文字。

\n

它是 Page 的子节点。

\n

再来观察下面这个配置:

\n
\n

我们通过数组的形式,在内容区配置tplform组件。

\n

没错,body 属性支持数组结构,这也就意味着你可以 通过组件树的形式 渲染出足够复杂的页面。

\n

具有body这类属性的组件一般称为容器型组件,就如名字所形容的,这类组件可以作为容器,在他们的子节点配置若干其他类型的组件,amis 中还有很多类似的组件,例如FormService等,后续我们会逐一进行介绍。

\n
\n

注意:

\n

Page是一个特殊的容器组件,它是 amis 页面配置中 必须也是唯一的顶级节点

\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "最简单的 amis 配置", - "fragment": "%E6%9C%80%E7%AE%80%E5%8D%95%E7%9A%84-amis-%E9%85%8D%E7%BD%AE", - "fullPath": "#%E6%9C%80%E7%AE%80%E5%8D%95%E7%9A%84-amis-%E9%85%8D%E7%BD%AE", - "level": 2 - }, - { - "label": "组件", - "fragment": "%E7%BB%84%E4%BB%B6", - "fullPath": "#%E7%BB%84%E4%BB%B6", - "level": 2 - }, - { - "label": "组件树", - "fragment": "%E7%BB%84%E4%BB%B6%E6%A0%91", - "fullPath": "#%E7%BB%84%E4%BB%B6%E6%A0%91", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/style.html b/gh-pages/docs/concepts/style.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/style.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/style_7972b37.js b/gh-pages/docs/concepts/style_7972b37.js deleted file mode 100644 index 77496452..00000000 --- a/gh-pages/docs/concepts/style_7972b37.js +++ /dev/null @@ -1,93 +0,0 @@ -amis.define('docs/concepts/style.md', function(require, exports, module, define) { - - module.exports = { - "title": "样式", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "样式", - "icon": null, - "order": 18, - "html": "

amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,也可以用在自定义组件开发中,掌握这些 class, 几乎可以不用写样式。

\n

基本使用

例如,下面这个例子,我们内容区渲染了两个按钮,但是可以看到,两个按钮紧贴在一起,并不是很美观,于是我们想添加一定的间隔

\n
\n
    \n
  1. 通过查阅按钮文档可知,按钮支持 className 配置项,也就是说可以在按钮上添加 CSS 类名;
  2. \n
  3. 再查阅当前页面下面 外边距部分 可知,我们可以添加m-l类名实现margin-left: 15px;的 CSS 效果
  4. \n
  5. 于是我们在按钮2的配置中添加"className": "m-l",就能实现间距效果了
  6. \n
\n
\n

绝大部分组件都支持各种形式的 CSS 类名自定义,然后搭配该文档中的各种类名可以实现各式各样的样式调整。具体请查阅组件文档;

\n
\n

你可能需要掌握一些基础的 CSS 知识

\n
\n

图标

amis 集成了 fontawesome,所以关于图标部分,请前往 fontawesome 查看。

\n

布局

水平布局可以考虑用 Bootstrap 的 Grids 或者用 hobxcol

\n
\n
Col A
\n
Col B
\n
Col C
\n
\n
<div class=\"hbox b-a\">\n  <div class=\"col wrapper-sm bg-success\">Col A</div>\n  <div class=\"col wrapper-sm bg-info\">Col B</div>\n  <div class=\"col wrapper-sm bg-danger\">Col C</div>\n</div>\n
\n

宽高

.w-1x {\n  width: 1em;\n}\n.w-2x {\n  width: 2em;\n}\n.w-3x {\n  width: 3em;\n}\n.w-xxs {\n  width: 60px;\n}\n.w-xs {\n  width: 90px;\n}\n.w-sm {\n  width: 150px;\n}\n.w {\n  width: 200px;\n}\n.w-md {\n  width: 240px;\n}\n.w-lg {\n  width: 280px;\n}\n.w-xl {\n  width: 320px;\n}\n.w-xxl {\n  width: 360px;\n}\n.w-full {\n  width: 100%;\n}\n.w-auto {\n  width: auto;\n}\n.h-auto {\n  height: auto;\n}\n.h-full {\n  height: 100% !important;\n  max-height: none !important;\n}\n
\n
\n
w-1x
\n
w-2x
\n
w-3x
\n
w-xxs
\n
w-xs
\n
w-sm
\n
w
\n
...
\n
\n
\n
w-md
\n
w-lg
\n
w-xl
\n
...
\n
\n
\n
w-xxl
\n
...
\n
\n
<div class=\"hbox b-a bg-primary\">\n  <div class=\"col wrapper-sm b-r w-1x\">w-1x</div>\n  <div class=\"col wrapper-sm b-r w-2x\">w-2x</div>\n  <div class=\"col wrapper-sm b-r w-3x\">w-3x</div>\n  <div class=\"col wrapper-sm b-r w-xxs\">w-xxs</div>\n  <div class=\"col wrapper-sm b-r w-xs\">w-xs</div>\n  <div class=\"col wrapper-sm b-r w-sm\">w-sm</div>\n  <div class=\"col wrapper-sm b-r w\">w</div>\n  <div class=\"col wrapper-sm  lter\">...</div>\n</div>\n<div class=\"hbox b-a bg-primary m-t\">\n  <div class=\"col wrapper-sm b-r w-md\">w-md</div>\n  <div class=\"col wrapper-sm b-r w-lg\">w-lg</div>\n  <div class=\"col wrapper-sm b-r w-xl\">w-xl</div>\n  <div class=\"col wrapper-sm lter\">...</div>\n</div>\n<div class=\"hbox b-a bg-primary m-t\">\n  <div class=\"col wrapper-sm b-r w-xxl\">w-xxl</div>\n  <div class=\"col wrapper-sm lter\">...</div>\n</div>\n
\n

外边距

.m-xxs {\n  margin: 2px 4px;\n}\n.m-xs {\n  margin: 5px;\n}\n.m-sm {\n  margin: 10px;\n}\n.m {\n  margin: 15px;\n}\n.m-md {\n  margin: 20px;\n}\n.m-lg {\n  margin: 30px;\n}\n.m-xl {\n  margin: 50px;\n}\n.m-n {\n  margin: 0 !important;\n}\n.m-l-none {\n  margin-left: 0 !important;\n}\n.m-l-xs {\n  margin-left: 5px;\n}\n.m-l-sm {\n  margin-left: 10px;\n}\n.m-l {\n  margin-left: 15px;\n}\n.m-l-md {\n  margin-left: 20px;\n}\n.m-l-lg {\n  margin-left: 30px;\n}\n.m-l-xl {\n  margin-left: 40px;\n}\n.m-l-xxl {\n  margin-left: 50px;\n}\n.m-l-n-xxs {\n  margin-left: -1px;\n}\n.m-l-n-xs {\n  margin-left: -5px;\n}\n.m-l-n-sm {\n  margin-left: -10px;\n}\n.m-l-n {\n  margin-left: -15px;\n}\n.m-l-n-md {\n  margin-left: -20px;\n}\n.m-l-n-lg {\n  margin-left: -30px;\n}\n.m-l-n-xl {\n  margin-left: -40px;\n}\n.m-l-n-xxl {\n  margin-left: -50px;\n}\n.m-t-none {\n  margin-top: 0 !important;\n}\n.m-t-xxs {\n  margin-top: 1px;\n}\n.m-t-xs {\n  margin-top: 5px;\n}\n.m-t-sm {\n  margin-top: 10px;\n}\n.m-t {\n  margin-top: 15px;\n}\n.m-t-md {\n  margin-top: 20px;\n}\n.m-t-lg {\n  margin-top: 30px;\n}\n.m-t-xl {\n  margin-top: 40px;\n}\n.m-t-xxl {\n  margin-top: 50px;\n}\n.m-t-n-xxs {\n  margin-top: -1px;\n}\n.m-t-n-xs {\n  margin-top: -5px;\n}\n.m-t-n-sm {\n  margin-top: -10px;\n}\n.m-t-n {\n  margin-top: -15px;\n}\n.m-t-n-md {\n  margin-top: -20px;\n}\n.m-t-n-lg {\n  margin-top: -30px;\n}\n.m-t-n-xl {\n  margin-top: -40px;\n}\n.m-t-n-xxl {\n  margin-top: -50px;\n}\n.m-r-none {\n  margin-right: 0 !important;\n}\n.m-r-xxs {\n  margin-right: 1px;\n}\n.m-r-xs {\n  margin-right: 5px;\n}\n.m-r-sm {\n  margin-right: 10px;\n}\n.m-r {\n  margin-right: 15px;\n}\n.m-r-md {\n  margin-right: 20px;\n}\n.m-r-lg {\n  margin-right: 30px;\n}\n.m-r-xl {\n  margin-right: 40px;\n}\n.m-r-xxl {\n  margin-right: 50px;\n}\n.m-r-n-xxs {\n  margin-right: -1px;\n}\n.m-r-n-xs {\n  margin-right: -5px;\n}\n.m-r-n-sm {\n  margin-right: -10px;\n}\n.m-r-n {\n  margin-right: -15px;\n}\n.m-r-n-md {\n  margin-right: -20px;\n}\n.m-r-n-lg {\n  margin-right: -30px;\n}\n.m-r-n-xl {\n  margin-right: -40px;\n}\n.m-r-n-xxl {\n  margin-right: -50px;\n}\n.m-b-none {\n  margin-bottom: 0 !important;\n}\n.m-b-xxs {\n  margin-bottom: 1px;\n}\n.m-b-xs {\n  margin-bottom: 5px;\n}\n.m-b-sm {\n  margin-bottom: 10px;\n}\n.m-b {\n  margin-bottom: 15px;\n}\n.m-b-md {\n  margin-bottom: 20px;\n}\n.m-b-lg {\n  margin-bottom: 30px;\n}\n.m-b-xl {\n  margin-bottom: 40px;\n}\n.m-b-xxl {\n  margin-bottom: 50px;\n}\n.m-b-n-xxs {\n  margin-bottom: -1px;\n}\n.m-b-n-xs {\n  margin-bottom: -5px;\n}\n.m-b-n-sm {\n  margin-bottom: -10px;\n}\n.m-b-n {\n  margin-bottom: -15px;\n}\n.m-b-n-md {\n  margin-bottom: -20px;\n}\n.m-b-n-lg {\n  margin-bottom: -30px;\n}\n.m-b-n-xl {\n  margin-bottom: -40px;\n}\n.m-b-n-xxl {\n  margin-bottom: -50px;\n}\n
\n

内边距

.wrapper-xs {\n  padding: 5px;\n}\n.wrapper-sm {\n  padding: 10px;\n}\n.wrapper {\n  padding: 15px;\n}\n.wrapper-md {\n  padding: 20px;\n}\n.wrapper-lg {\n  padding: 30px;\n}\n.wrapper-xl {\n  padding: 50px;\n}\n.padder-xs {\n  padding-left: 5px;\n  padding-right: 5px;\n}\n.padder-sm {\n  padding-left: 10px;\n  padding-right: 10px;\n}\n.padder-lg {\n  padding-left: 30px;\n  padding-right: 30px;\n}\n.padder-md {\n  padding-left: 20px;\n  padding-right: 20px;\n}\n.padder {\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.padder-v-xs {\n  padding-top: 5px;\n  padding-bottom: 5px;\n}\n.padder-v-sm {\n  padding-top: 10px;\n  padding-bottom: 10px;\n}\n.padder-v-lg {\n  padding-top: 30px;\n  padding-bottom: 30px;\n}\n.padder-v-md {\n  padding-top: 20px;\n  padding-bottom: 20px;\n}\n.padder-v {\n  padding-top: 15px;\n  padding-bottom: 15px;\n}\n.no-padder {\n  padding: 0 !important;\n}\n.pull-in {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n.pull-out {\n  margin: -10px -15px;\n}\n
\n

边框

.b {\n  border: 1px solid rgba(0, 0, 0, 0.05);\n}\n.b-a {\n  border: 1px solid @border-color;\n}\n.b-t {\n  border-top: 1px solid @border-color;\n}\n.b-r {\n  border-right: 1px solid @border-color;\n}\n.b-b {\n  border-bottom: 1px solid @border-color;\n}\n.b-l {\n  border-left: 1px solid @border-color;\n}\n.b-light {\n  border-color: @brand-light;\n}\n.b-dark {\n  border-color: @brand-dark;\n}\n.b-black {\n  border-color: @brand-dark;\n}\n.b-primary {\n  border-color: @brand-primary;\n}\n.b-success {\n  border-color: @brand-success;\n}\n.b-info {\n  border-color: @brand-info;\n}\n.b-warning {\n  border-color: @brand-warning;\n}\n.b-danger {\n  border-color: @brand-danger;\n}\n.b-white {\n  border-color: #fff;\n}\n.b-dashed {\n  border-style: dashed !important;\n}\n.b-l-light {\n  border-left-color: @brand-light;\n}\n.b-l-dark {\n  border-left-color: @brand-dark;\n}\n.b-l-black {\n  border-left-color: @brand-dark;\n}\n.b-l-primary {\n  border-left-color: @brand-primary;\n}\n.b-l-success {\n  border-left-color: @brand-success;\n}\n.b-l-info {\n  border-left-color: @brand-info;\n}\n.b-l-warning {\n  border-left-color: @brand-warning;\n}\n.b-l-danger {\n  border-left-color: @brand-danger;\n}\n.b-l-white {\n  border-left-color: #fff;\n}\n.b-l-2x {\n  border-left-width: 2px;\n}\n.b-l-3x {\n  border-left-width: 3px;\n}\n.b-l-4x {\n  border-left-width: 4px;\n}\n.b-l-5x {\n  border-left-width: 5px;\n}\n.b-2x {\n  border-width: 2px;\n}\n.b-3x {\n  border-width: 3px;\n}\n.b-4x {\n  border-width: 4px;\n}\n.b-5x {\n  border-width: 5px;\n}\n
\n

圆角

.r {\n  border-radius: @border-radius-base @border-radius-base @border-radius-base\n    @border-radius-base;\n}\n.r-2x {\n  border-radius: @border-radius-base * 2;\n}\n.r-3x {\n  border-radius: @border-radius-base * 3;\n}\n.r-l {\n  border-radius: @border-radius-base 0 0 @border-radius-base;\n}\n.r-r {\n  border-radius: 0 @border-radius-base @border-radius-base 0;\n}\n.r-t {\n  border-radius: @border-radius-base @border-radius-base 0 0;\n}\n.r-b {\n  border-radius: 0 0 @border-radius-base @border-radius-base;\n}\n
\n

字体相关

.font-normal {\n  font-weight: normal;\n}\n.font-thin {\n  font-weight: 300;\n}\n.font-bold {\n  font-weight: 700;\n}\n.text-3x {\n  font-size: 3em;\n}\n.text-2x {\n  font-size: 2em;\n}\n.text-lg {\n  font-size: @font-size-lg;\n}\n.text-md {\n  font-size: @font-size-md;\n}\n.text-base {\n  font-size: @font-size-base;\n}\n.text-sm {\n  font-size: @font-size-sm;\n}\n.text-xs {\n  font-size: @font-size-xs;\n}\n.text-xxs {\n  text-indent: -9999px;\n}\n.text-ellipsis {\n  display: block;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.text-u-c {\n  text-transform: uppercase;\n}\n.text-l-t {\n  text-decoration: line-through;\n}\n.text-u-l {\n  text-decoration: underline;\n}\n.text-left {\n  text-align: left;\n}\n.text-center {\n  text-align: center;\n}\n.text-right {\n  text-align: right;\n}\n
\n

定位

.pos-rlt {\n  position: relative;\n}\n.pos-stc {\n  position: static !important;\n}\n.pos-abt {\n  position: absolute;\n}\n.pos-fix {\n  position: fixed;\n}\n
\n

背景

\n
bg-white
\n
bg-dark
\n
bg-info
\n
bg-success
\n
bg-warning
\n
bg-danger
\n
bg-primary
\n
\n
<div class=\"hbox b-a bg-light\">\n  <div class=\"col wrapper-sm b-r bg-white\">bg-white</div>\n  <div class=\"col wrapper-sm b-r bg-dark\">bg-dark</div>\n  <div class=\"col wrapper-sm b-r bg-info\">bg-info</div>\n  <div class=\"col wrapper-sm b-r bg-success\">bg-success</div>\n  <div class=\"col wrapper-sm b-r bg-warning\">bg-warning</div>\n  <div class=\"col wrapper-sm b-r bg-danger\">bg-danger</div>\n  <div class=\"col wrapper-sm bg-primary\">bg-primary</div>\n</div>\n
\n

其他

.show {\n  visibility: visible;\n}\n.line {\n  width: 100%;\n  height: 2px;\n  margin: 10px 0;\n  font-size: 0;\n  overflow: hidden;\n  background-color: transparent;\n  border-width: 0;\n  border-top: 1px solid @border-color;\n}\n.line-xs {\n  margin: 0;\n}\n.line-lg {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n.line-dashed {\n  border-style: dashed;\n  background: transparent;\n}\n.no-line {\n  border-width: 0;\n}\n.no-border,\n.no-borders {\n  border-color: transparent;\n  border-width: 0;\n}\n.no-radius {\n  border-radius: 0;\n}\n.block {\n  display: block;\n}\n.block.hide {\n  display: none;\n}\n.inline {\n  display: inline-block !important;\n}\n.none {\n  display: none;\n}\n.pull-left {\n  float: left;\n}\n.pull-right {\n  float: right;\n}\n.pull-none {\n  float: none;\n}\n.rounded {\n  border-radius: 500px;\n}\n.clear {\n  display: block;\n  overflow: hidden;\n}\n.no-bg {\n  background-color: transparent;\n  color: inherit;\n}\n.no-select {\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -khtml-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 2 - }, - { - "label": "图标", - "fragment": "%E5%9B%BE%E6%A0%87", - "fullPath": "#%E5%9B%BE%E6%A0%87", - "level": 2 - }, - { - "label": "布局", - "fragment": "%E5%B8%83%E5%B1%80", - "fullPath": "#%E5%B8%83%E5%B1%80", - "level": 2 - }, - { - "label": "宽高", - "fragment": "%E5%AE%BD%E9%AB%98", - "fullPath": "#%E5%AE%BD%E9%AB%98", - "level": 2 - }, - { - "label": "外边距", - "fragment": "%E5%A4%96%E8%BE%B9%E8%B7%9D", - "fullPath": "#%E5%A4%96%E8%BE%B9%E8%B7%9D", - "level": 2 - }, - { - "label": "内边距", - "fragment": "%E5%86%85%E8%BE%B9%E8%B7%9D", - "fullPath": "#%E5%86%85%E8%BE%B9%E8%B7%9D", - "level": 2 - }, - { - "label": "边框", - "fragment": "%E8%BE%B9%E6%A1%86", - "fullPath": "#%E8%BE%B9%E6%A1%86", - "level": 2 - }, - { - "label": "圆角", - "fragment": "%E5%9C%86%E8%A7%92", - "fullPath": "#%E5%9C%86%E8%A7%92", - "level": 2 - }, - { - "label": "字体相关", - "fragment": "%E5%AD%97%E4%BD%93%E7%9B%B8%E5%85%B3", - "fullPath": "#%E5%AD%97%E4%BD%93%E7%9B%B8%E5%85%B3", - "level": 2 - }, - { - "label": "定位", - "fragment": "%E5%AE%9A%E4%BD%8D", - "fullPath": "#%E5%AE%9A%E4%BD%8D", - "level": 2 - }, - { - "label": "背景", - "fragment": "%E8%83%8C%E6%99%AF", - "fullPath": "#%E8%83%8C%E6%99%AF", - "level": 2 - }, - { - "label": "其他", - "fragment": "%E5%85%B6%E4%BB%96", - "fullPath": "#%E5%85%B6%E4%BB%96", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/concepts/template.html b/gh-pages/docs/concepts/template.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/concepts/template.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/concepts/template_6fdf01a.js b/gh-pages/docs/concepts/template_6fdf01a.js deleted file mode 100644 index 2009cc0c..00000000 --- a/gh-pages/docs/concepts/template_6fdf01a.js +++ /dev/null @@ -1,67 +0,0 @@ -amis.define('docs/concepts/template.md', function(require, exports, module, define) { - - module.exports = { - "title": "模板", - "description": null, - "type": 0, - "group": "💡 概念", - "menuName": "模板", - "icon": null, - "order": 11, - "html": "

为了可以更加灵活渲染文本、数据结构,amis 借鉴其他模板引擎,实现了一套模板渲染功能。

\n

模板字符串

普通文本

配置一段普通文本并输出

\n
\n

文本中获取变量

可以支持在普通文本中,使用数据映射语法:${xxx} 获取数据域中变量的值,如下

\n
\n

更多${xxx}语法相关介绍,移步 数据映射

\n

渲染html

使用数据映射语法:${xxx} 获取数据域中变量的值,并渲染 HTML

\n
\n

JavaScript 模板引擎

amis 还支持用 JavaScript 模板引擎进行组织输出,内部采用 lodash template 进行实现。

\n
\n
\n

注意到了吗?

\n

在 JavaScript 模板引擎中,我们获取数据域变量的方式是data.xxx,而不是之前的${xxx},如果你熟悉 JavaScript 的话,这里模板引擎其实是将数据域,当做当前代码的数据作用域进行执行,因此需要使用data.xxx进行取值

\n

要注意使用模板的时候在不同的场景下要使用正确的取值方式。

\n
\n

仔细看示例不难发现,语法跟 ejs 很像,<% 这里面是 js 语句 %>,所以只要会写 js,做页面渲染没有什么问题。另外以下是一些可用 js 方法。

\n
    \n
  • formatDate(value, format='LLL', inputFormat='')格式化时间格式,关于 format 请前往 moment 文档页面。
  • \n
  • formatTimeStamp(value, format='LLL') 格式化时间戳为字符串。
  • \n
  • formatNumber(number) 格式化数字格式,加上千分位。
  • \n
  • countDown(value) 倒计时,显示离指定时间还剩下多少天,只支持时间戳。
  • \n
\n

下面 filters 中的方法也可以使用如: <%= date(data.xxx, 'YYYY-MM-DD') %>

\n

注意事项

1. 模板字符串 和 模板引擎 不可以交叉使用

例如:

\n
{\n    \"type\": \"tpl\",\n    \"tpl\": \"${data.xxx === 'a'}\" //错误!\n}\n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "模板字符串", - "fragment": "%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2", - "fullPath": "#%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2", - "level": 2, - "children": [ - { - "label": "普通文本", - "fragment": "%E6%99%AE%E9%80%9A%E6%96%87%E6%9C%AC", - "fullPath": "#%E6%99%AE%E9%80%9A%E6%96%87%E6%9C%AC", - "level": 3 - }, - { - "label": "文本中获取变量", - "fragment": "%E6%96%87%E6%9C%AC%E4%B8%AD%E8%8E%B7%E5%8F%96%E5%8F%98%E9%87%8F", - "fullPath": "#%E6%96%87%E6%9C%AC%E4%B8%AD%E8%8E%B7%E5%8F%96%E5%8F%98%E9%87%8F", - "level": 3 - }, - { - "label": "渲染html", - "fragment": "%E6%B8%B2%E6%9F%93html", - "fullPath": "#%E6%B8%B2%E6%9F%93html", - "level": 3 - } - ] - }, - { - "label": "JavaScript 模板引擎", - "fragment": "javascript-%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E", - "fullPath": "#javascript-%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E", - "level": 2 - }, - { - "label": "注意事项", - "fragment": "%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9", - "fullPath": "#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9", - "level": 2, - "children": [ - { - "label": "1. 模板字符串 和 模板引擎 不可以交叉使用", - "fragment": "1-%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2-%E5%92%8C-%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E-%E4%B8%8D%E5%8F%AF%E4%BB%A5%E4%BA%A4%E5%8F%89%E4%BD%BF%E7%94%A8", - "fullPath": "#1-%E6%A8%A1%E6%9D%BF%E5%AD%97%E7%AC%A6%E4%B8%B2-%E5%92%8C-%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E-%E4%B8%8D%E5%8F%AF%E4%BB%A5%E4%BA%A4%E5%8F%89%E4%BD%BF%E7%94%A8", - "level": 4 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/index.html b/gh-pages/docs/index.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/index_9751456.js b/gh-pages/docs/index_9751456.js deleted file mode 100644 index a95075da..00000000 --- a/gh-pages/docs/index_9751456.js +++ /dev/null @@ -1,63 +0,0 @@ -amis.define('docs/index.md', function(require, exports, module, define) { - - module.exports = { - "title": "介绍", - "description": "介绍", - "type": 0, - "group": "💡 概念", - "menuName": "介绍", - "icon": null, - "order": 8, - "html": "

什么是 amis

amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可以节省页面开发工作量,极大提升开发前端页面的效率。

\n

为什么要做 amis?🤔

在经历了十几年的发展后,前端开发变得越来越复杂,门槛也越来越高,要使用当下流行的 UI 组件库,你必须懂 npm、webpack、react/vue,必须熟悉 ES 6 语法,最好还了解状态管理(比如 Redux),如果没接触过函数式编程,一开始入门就很困难,而它还有巨大的 生态,相关的库有 2347 个。

\n

然而前端技术的发展不会停滞,等学完这些后可能会发现大家都用 Hooks 了、某个打包工具取代 Webpack 了。。。

\n

而有时候你只是为了做个普通的增删改查界面,用于系统管理,类似下面这种:

\n
\n

这个界面虽然用 Bootstrap 也能快速搭起来,但要想体验好就需要加很多细节功能,比如:

\n
    \n
  • 数据动态加载
  • \n
  • 编辑单行数据
  • \n
  • 批量删除和修改
  • \n
  • 查询某列
  • \n
  • 按某列排序
  • \n
  • 隐藏某列
  • \n
  • 开启整页内容拖拽排序
  • \n
  • 表格有分页(页数还会同步到地址栏,刷新页面试试)
  • \n
  • 如果往下拖动还有首行冻结来方便查看表头等\n全部实现这些需要大量的代码。
  • \n
\n

然而上面也看到了,在 amis 里只需要 150 行 JSON 配置(嘿,其中 40 多行只有一个括号),你不需要了解 React/Vue、Webpack,甚至不需要了解 JavaScript,即便没学过 amis 也能猜到大部分配置的作用,只需要简单配置就能完成所有页面开发

\n

这正是建立 amis 的初衷,我们认为:对于大部分常用页面,应该使用最简单的方法来实现,而不是越来越复杂。

\n

用 JSON 写页面有什么好处 ❓

为了实现用最简单方式来生成大部分页面,amis 的解决方案是基于 JSON 来配置,它的独特好处是:

\n
    \n
  • 不需要懂前端:在百度内部,大部分 amis 用户之前从来没写过前端页面,也不会 JavaScript,就能做出专业且复杂的后台界面,这是所有其他前端 UI 库都无法做到的;
  • \n
  • 不受前端技术更新的影响:百度内部最老的 amis 页面是 4 年多前创建的,至今还在使用,而当年的 Angular/Vue/React 版本现在都废弃了,当年流行的 Gulp 也被 Webpack 取代了,如果这些页面不是用 amis,现在的维护成本会很高,同时还能享受 amis 升级带来的界面改进;
  • \n
  • 可以 完全 使用 可视化页面编辑器 来制作页面:一般前端可视化编辑器只能用来做静态原型,而 amis 可视化编辑器做出的页面是可以直接上线的。
  • \n
\n
\n

JSON 是一种轻量级的数据交换格式,简洁和清晰的层次结构使得它成为理想的数据交换语言。它易于人阅读和编写,同时也易于机器解析和生成,能够有效地提升网络传输效率。

\n

更多关于 JSON 的知识,可以阅读百度百科

\n
\n

amis 的其它亮点 ✨

    \n
  • 提供完整的界面解决方案:其它 UI 框架必须使用 JavaScript 来组装业务逻辑,而 amis 只需 JSON 配置就能完成完整功能开发,包括数据获取、表单提交及验证等功能;
  • \n
  • 内置 100+ 种 UI 组件:包括其它 UI 框架都会不提供的富文本编辑器、代码编辑器等,能满足各种页面组件展现的需求,而且对于特殊的展现形式还可以通过 自定义组件 来扩充;
  • \n
  • 容器支持无限级嵌套:可以通过组合来满足各种布局需求;
  • \n
  • 经历了长时间的实战考验:amis 在百度内部得到了广泛使用,在 4 年多的时间里创建了 3w 多页面,从内容审核到机器管理,从数据分析到模型训练,amis 满足了各种各样的页面需求。
  • \n
\n

amis 不适合做什么?😶

使用 JSON 有优点但也有明显缺点,在以下场合并不适合 amis:

\n
    \n
  • 大量定制 UI,尤其是面向普通客户(toC)的产品页面
      \n
    • JSON 配置使得 amis 更适合做有大量常见 UI 组件的页面,但对于面向普通客户的页面,往往追求个性化的视觉效果,这种情况下用 amis 就不合适,实际上绝大部分前端 UI 组件库也都不适合,只能定制开发。
    • \n
    \n
  • \n
  • 有极为复杂的交互,或者对交互有很特殊的要求
      \n
    • 有些复杂的前端功能,比如可视化编辑器,其中有大量定制的拖拽操作,这种需要依赖原生 DOM 实现的功能无法使用 amis。
    • \n
    • 但对于某些交互固定的领域,比如图连线,amis 后续会有专门的组件来实现。
    • \n
    \n
  • \n
\n

阅读建议 👆

    \n
  • 如果你是第一次接触 amis 的新同学,那么请 务必认真阅读完概念部分,它会让你对 amis 有个整体的认识
  • \n
  • 如果你已经掌握 amis 基本概念,且有一定的开发经验,需要参考 amis 组件相关文档的同学,那么请移步 组件文档
  • \n
\n

让我们马上开始吧!

点击页面底部的下一篇,继续后续部分的阅读。

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "什么是 amis", - "fragment": "%E4%BB%80%E4%B9%88%E6%98%AF-amis", - "fullPath": "#%E4%BB%80%E4%B9%88%E6%98%AF-amis", - "level": 2 - }, - { - "label": "为什么要做 amis?🤔", - "fragment": "%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-", - "fullPath": "#%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-", - "level": 2 - }, - { - "label": "用 JSON 写页面有什么好处 ❓", - "fragment": "%E7%94%A8-json-%E5%86%99%E9%A1%B5%E9%9D%A2%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%A4%84-", - "fullPath": "#%E7%94%A8-json-%E5%86%99%E9%A1%B5%E9%9D%A2%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%A4%84-", - "level": 2 - }, - { - "label": "amis 的其它亮点 ✨", - "fragment": "amis-%E7%9A%84%E5%85%B6%E5%AE%83%E4%BA%AE%E7%82%B9-", - "fullPath": "#amis-%E7%9A%84%E5%85%B6%E5%AE%83%E4%BA%AE%E7%82%B9-", - "level": 2 - }, - { - "label": "amis 不适合做什么?😶", - "fragment": "amis-%E4%B8%8D%E9%80%82%E5%90%88%E5%81%9A%E4%BB%80%E4%B9%88-", - "fullPath": "#amis-%E4%B8%8D%E9%80%82%E5%90%88%E5%81%9A%E4%BB%80%E4%B9%88-", - "level": 2 - }, - { - "label": "阅读建议 👆", - "fragment": "%E9%98%85%E8%AF%BB%E5%BB%BA%E8%AE%AE-", - "fullPath": "#%E9%98%85%E8%AF%BB%E5%BB%BA%E8%AE%AE-", - "level": 2 - }, - { - "label": "让我们马上开始吧!", - "fragment": "%E8%AE%A9%E6%88%91%E4%BB%AC%E9%A9%AC%E4%B8%8A%E5%BC%80%E5%A7%8B%E5%90%A7-", - "fullPath": "#%E8%AE%A9%E6%88%91%E4%BB%AC%E9%A9%AC%E4%B8%8A%E5%BC%80%E5%A7%8B%E5%90%A7-", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/start/custom.html b/gh-pages/docs/start/custom.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/start/custom.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/start/custom_a165cb2.js b/gh-pages/docs/start/custom_a165cb2.js deleted file mode 100644 index 4a0cd454..00000000 --- a/gh-pages/docs/start/custom_a165cb2.js +++ /dev/null @@ -1,79 +0,0 @@ -amis.define('docs/start/custom.md', function(require, exports, module, define) { - - module.exports = { - "title": "自定义", - "html": "

如果默认的组件不能满足需求,可以通过自定义组件来进行扩展,在 amis 中有两种方法:

\n
    \n
  1. 临时扩展,适合无需复用的组件。
  2. \n
  3. 注册自定义类型,适合需要在很多地方复用的组件。
  4. \n
\n
\n

注意,自定义组件只支持 npm 方式,不支持 SDK

\n
\n

临时扩展

amis 的 JSON 配置最终会转成 React 组件来执行,所以如果只是想在某个配置中加入定制功能,可以直接在这个 JSON 配置里写 React 代码,比如下面这个例子:

\n
{\n  \"type\": \"page\",\n  \"title\": \"自定义组件示例\",\n  \"body\": {\n    \"type\": \"form\",\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"label\": \"用户名\",\n        \"name\": \"usename\"\n      },\n      {\n        \"name\": \"mycustom\",\n        \"children\": ({\n          value,\n          onChange\n        }) => (\n          <div>\n            <p>这个是个自定义组件</p>\n            <p>当前值:{value}</p>\n            <a className=\"btn btn-default\" onClick={\n              () => onChange(Math.round(Math.random() * 10000))\n            }>随机修改</a>\n          </div>\n        )\n      }\n    ]\n  }\n}\n
\n

其中的 mycustom 就是一个临时扩展,它的 children 属性是一个函数,它的返回内容和 React 的 Render 方法一样,即 jsx,在这个方法里你可以写任意 JavaScript 来实现自己的定制需求,这个函数有两个参数 valueonChangevalue 就是组件的值,onChange 方法用来改变这个值,比如上面的例子中,点击链接后就会修改 mycustom 为一个随机数,在提交表单的时候就变成了这个随机数。

\n

与之类似的还有个 component 属性,这个属性可以传入 React Component,如果想用 React Hooks,请通过 component 传递,而不是 children

\n

这种扩展方式既简单又灵活,但它是写在配置中的,如果需要在很多地方,可以使用下面的「注册自定义类型」方式:

\n

注册自定义类型

注册自定义类型需要了解 amis 的工作原理。

\n

工作原理

amis 的渲染过程是将 json 转成对应的 React 组件。先通过 json 的 type 找到对应的 Component 然后,然后把其他属性作为 props 传递过去完成渲染。

\n

拿一个表单页面来说,如果用 React 组件开发一般长这样。

\n
<Page title=\"页面标题\" subTitle=\"副标题\">\n  <Form\n    title=\"用户登录\"\n    controls={[\n      {\n        type: 'text',\n        name: 'username',\n        label: '用户名'\n      }\n    ]}\n  />\n</Page>\n
\n

把以上配置方式换成 amis JSON, 则是:

\n
{\n  \"type\": \"page\",\n  \"title\": \"页面标题\",\n  \"subTitle\": \"副标题\",\n  \"body\": {\n    \"type\": \"form\",\n    \"title\": \"用户登录\",\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"name\": \"username\",\n        \"label\": \"用户名\"\n      }\n    ]\n  }\n}\n
\n

那么,amis 是如何将 JSON 转成组件的呢?直接根据节点的 type 去跟组件一一对应?这样会重名,比如在表格里面展示的类型 text 跟表单里面的 text 是完全不一样的,一个负责展示,一个却负责输入。所以说一个节点要被什么组件渲染,还需要携带上下文(context)信息。

\n

如何携带上下文(context)信息?amis 中是用节点的路径(path)来作为上下文信息。从上面的例子来看,一共有三个节点,path 信息分别是。

\n
    \n
  • page 页面节点
  • \n
  • page/body/form 表单节点
  • \n
  • page/body/form/controls/0/text 文本框节点。
  • \n
\n

根据 path 的信息就能很容易注册组件跟节点对应了。

\n

Page 组件的示例代码

\n
@Renderer({\n  test: /^page$/\n  // ... 其他信息隐藏了\n})\nexport class PageRenderer extends React.Component {\n  // ... 其他信息隐藏了\n  render() {\n    const {\n      title,\n      body,\n      render // 用来渲染孩子节点,如果当前是叶子节点则可以忽略。\n    } = this.props;\n    return (\n      <div className=\"page\">\n        <h1>{title}</h1>\n        <div className=\"body-container\">\n          {render('body', body) /*渲染孩子节点*/}\n        </div>\n      </div>\n    );\n  }\n}\n
\n

Form 组件的示例代码

\n
@Renderer({\n  test: /(^|\\/)form$/\n  // ... 其他信息隐藏了\n})\nexport class FormRenderer extends React.Component {\n  // ... 其他信息隐藏了\n  render() {\n    const {\n      title,\n      controls,\n      render // 用来渲染孩子节点,如果当前是叶子节点则可以忽略。\n    } = this.props;\n    return (\n      <form className=\"form\">\n        {controls.map((control, index) => (\n          <div className=\"form-item\" key={index}>\n            {render(`${index}/control`, control)}\n          </div>\n        ))}\n      </form>\n    );\n  }\n}\n
\n

Text 组件的示例代码

\n
@Renderer({\n    test: /(^|\\/)form(?:\\/\\d+)?\\/control(?\\/\\d+)?\\/text$/\n    // ... 其他信息隐藏了\n})\nexport class FormItemTextRenderer extends React.Component {\n    // ... 其他信息隐藏了\n    render() {\n        const {\n            label,\n            name,\n            onChange\n        } = this.props;\n        return (\n            <div className=\"form-group\">\n                <label>{label}<label>\n                <input type=\"text\" onChange={(e) => onChange(e.currentTarget.value)} />\n            </div>\n        );\n    }\n}\n
\n

那么渲染过程就是根据节点 path 信息,跟组件池中的组件 test (检测) 信息做匹配,如果命中,则把当前节点转给对应组件渲染,节点中其他属性将作为目标组件的 props。需要注意的是,如果是容器组件,比如以上例子中的 page 组件,从 props 中拿到的 body 是一个子节点,由于节点类型是不固定,由使用者决定,所以不能直接完成渲染,所以交给属性中下发的 render 方法去完成渲染,{render('body', body)},他的工作就是拿子节点的 path 信息去组件池里面找到对应的渲染器,然后交给对应组件去完成渲染。

\n

编写自定义组件

了解了基本原理后,来看个简单的例子:

\n
import * as React from 'react';\nimport {Renderer} from 'amis';\n\n@Renderer({\n  test: /(^|\\/)my\\-renderer$/\n})\nclass CustomRenderer extends React.Component {\n  render() {\n    const {tip} = this.props;\n    return <div>这是自定义组件:{tip}</div>;\n  }\n}\n
\n

有了以上这段代码后,就可以这样使用了。

\n
{\n  \"type\": \"page\",\n  \"title\": \"自定义组件示例\",\n  \"body\": {\n    \"type\": \"my-renderer\",\n    \"tip\": \"简单示例\"\n  }\n}\n
\n

看了前面amis 工作原理应该不难理解,这里注册一个 React 组件,当节点的 path 信息是 my-renderer 结尾时,交给当前组件来完成渲染。

\n

如果这个组件还能通过 children 属性添加子节点,则需要使用下面这种写法:

\n
import * as React from 'react';\nimport {Renderer} from 'amis';\n\n@Renderer({\n  test: /(^|\\/)my\\-renderer2$/\n})\nclass CustomRenderer extends React.Component {\n  render() {\n    const {tip, body, render} = this.props;\n    return (\n      <div>\n        <p>这是自定义组件:{tip}</p>\n        {body ? (\n          <div className=\"container\">\n            {render('body', body, {\n              // 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个\n            })}\n          </div>\n        ) : null}\n      </div>\n    );\n  }\n}\n
\n

有了以上这段代码后,就可以这样使用了。

\n
{\n  \"type\": \"page\",\n  \"title\": \"自定义组件示例\",\n  \"body\": {\n    \"type\": \"my-renderer2\",\n    \"tip\": \"简单示例\",\n    \"body\": {\n      \"type\": \"form\",\n      \"controls\": [\n        {\n          \"type\": \"text\",\n          \"label\": \"用户名\",\n          \"name\": \"usename\"\n        }\n      ]\n    }\n  }\n}\n
\n

跟第一个列子不同的地方是,这里多了个 render 方法,这个方法就是专门用来渲染子节点的。来看下参数说明:

\n
    \n
  • region 区域名称,你有可能有多个区域可以作为容器,请不要重复。
  • \n
  • node 子节点。
  • \n
  • props 可选,可以通过此对象跟子节点通信等。
  • \n
\n

表单项的扩展

以上是普通渲染器的注册方式,如果是表单项,为了更简单的扩充,请使用 FormItem 注解,而不是 Renderer。 原因是如果用 FormItem 是不用关心:label 怎么摆,表单验证器怎么实现,如何适配表单的 3 中展现方式(水平、上下和内联模式),而只用关心:有了值后如何回显,响应用户交互设置新值。

\n
import * as React from 'react';\nimport {FormItem} from 'amis';\n\n@FormItem({\n  type: 'custom'\n})\nclass MyFormItem extends React.Component {\n  render() {\n    const {value, onChange} = this.props;\n\n    return (\n      <div>\n        <p>这个是个自定义组件</p>\n        <p>当前值:{value}</p>\n        <a\n          className=\"btn btn-default\"\n          onClick={() => onChange(Math.round(Math.random() * 10000))}\n        >\n          随机修改\n        </a>\n      </div>\n    );\n  }\n}\n
\n

有了以上这段代码后,就可以这样使用了。

\n
{\n  \"type\": \"page\",\n  \"title\": \"自定义组件示例\",\n  \"body\": {\n    \"type\": \"form\",\n    \"controls\": [\n      {\n        \"type\": \"text\",\n        \"label\": \"用户名\",\n        \"name\": \"usename\"\n      },\n\n      {\n        \"type\": \"custom\",\n        \"label\": \"随机值\",\n        \"name\": \"random\"\n      }\n    ]\n  }\n}\n
\n
\n

注意: 使用 FormItem 默认是严格模式,即只有必要的属性变化才会重新渲染,有可能满足不了你的需求,如果忽略性能问题,可以传入 strictMode: false 来关闭。

\n
\n

表单项开发主要关心两件事。

\n
    \n
  1. 呈现当前值。如以上例子,通过 this.props.value 判定如果勾选了则显示已勾选,否则显示请勾选
  2. \n
  3. 接收用户交互,通过 this.props.onChange 修改表单项值。如以上例子,当用户点击按钮时,切换当前选中的值。
  4. \n
\n

至于其他功能如:label/description 的展示、表单验证功能、表单布局(常规、左右或者内联)等等,只要是通过 FormItem 注册进去的都无需自己实现。

\n

需要注意,获取或者修改的是什么值跟配置中 type 并列的 name 属性有关,也就是说直接关联某个变量,自定义中直接通过 props 下发了某个指定变量的值和修改的方法。如果你想获取其他数据,或者设置其他数据可以看下以下说明:

\n
    \n
  • 获取其他数据 可以通过 this.props.data 查看,作用域中所有的数据都在这了。
  • \n
  • 设置其他数据 可以通过 this.props.onBulkChange, 比如: this.props.onBulkChange({a: 1, b: 2}) 等于同时设置了两个值。当做数据填充的时候,这个方法很有用。
  • \n
\n

其它高级定制

下面是一些不太常用的 amis 扩展方式及技巧。

\n

自定义验证器

如果 amis 自带的验证能满足需求了,则不需要关心。组件可以有自己的验证逻辑。

\n
import * as React from 'react';\nimport {FormItem} from 'amis';\nimport * as cx from 'classnames';\n\n@FormItem({\n  type: 'custom-checkbox'\n})\nexport default class CustomCheckbox extends React.Component {\n  validate() {\n    // 通过 this.props.value 可以知道当前值。\n\n    return isValid ? '' : '不合法,说明不合法原因。';\n  }\n  // ... 其他省略了\n}\n
\n

上面的栗子只是简单说明,另外可以做异步验证,validate 方法可以返回一个 promise。

\n

OptionsControl

如果你的表单组件性质和 amis 的 Select、Checkboxes、List 差不多,用户配置配置 source 可通过 API 拉取选项,你可以用 OptionsControl 取代 FormItem 这个注解。

\n

用法是一样,功能方面主要多了以下功能。

\n
    \n
  • 可以配置 options,options 支持配置 visibleOn hiddenOn 等表达式
  • \n
  • 可以配置 source 换成动态拉取 options 的功能,source 中有变量依赖会自动重新拉取。
  • \n
  • 下发了这些 props,可以更方便选项。
      \n
    • options 不管是用户配置的静态 options 还是配置 source 拉取的,下发到组件已经是最终的选项了。
    • \n
    • selectedOptions 数组类型,当前用户选中的选项。
    • \n
    • loading 当前选项是否在加载
    • \n
    • onToggle 切换一个选项的值
    • \n
    • onToggleAll 切换所有选项的值,类似于全选。
    • \n
    \n
  • \n
\n

组件间通信

关于组件间通信,amis 中有个机制就是,把需要被引用的组件设置一个 name 值,然后其他组件就可以通过这个 name 与其通信,比如这个栗子。其实内部是依赖于内部的一个 Scoped Context。你的组件希望可以被别的组件引用,你需要把自己注册进去,默认自定义的非表单类组件并没有把自己注册进去,可以参考以下代码做添加。

\n
import * as React from 'react';\nimport {Renderer, ScopedContext} from 'amis';\n@Renderer({\n  test: /(?:^|\\/)my\\-renderer$/\n})\nexport class CustomRenderer extends React.Component {\n  static contextType = ScopedContext;\n\n  componentWillMount() {\n    const scoped = this.context;\n    scoped.registerComponent(this);\n  }\n\n  componentWillUnmount() {\n    const scoped = this.context;\n    scoped.unRegisterComponent(this);\n  }\n\n  // 其他部分省略了。\n}\n
\n

把自己注册进去了,其他组件就能引用到了。同时,如果你想找别的组件,也同样是通过 scoped 这个 context,如: scoped.getComponentByName("xxxName") 这样就能拿到目标组件的实例了(前提是目标组件已经配置了 name 为 xxxName)。

\n

其他功能方法

自定义的渲染器 props 会下发一个非常有用的 env 对象。这个 env 有以下功能方法。

\n
    \n
  • env.fetcher 可以用来做 ajax 请求如: this.props.env.fetcher('xxxAPi', this.props.data).then((result) => console.log(result))
  • \n
  • env.confirm 确认框,返回一个 promise 等待用户确认如: this.props.env.confirm('你确定要这么做?').then((confirmed) => console.log(confirmed))
  • \n
  • env.alert 用 Modal 实现的弹框,个人觉得更美观。
  • \n
  • env.notify toast 某个消息 如: this.props.env.notify("error", "出错了")
  • \n
  • env.jumpTo 页面跳转。
  • \n
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "临时扩展", - "fragment": "%E4%B8%B4%E6%97%B6%E6%89%A9%E5%B1%95", - "fullPath": "#%E4%B8%B4%E6%97%B6%E6%89%A9%E5%B1%95", - "level": 2 - }, - { - "label": "注册自定义类型", - "fragment": "%E6%B3%A8%E5%86%8C%E8%87%AA%E5%AE%9A%E4%B9%89%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E6%B3%A8%E5%86%8C%E8%87%AA%E5%AE%9A%E4%B9%89%E7%B1%BB%E5%9E%8B", - "level": 2, - "children": [ - { - "label": "工作原理", - "fragment": "%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86", - "fullPath": "#%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86", - "level": 3 - }, - { - "label": "编写自定义组件", - "fragment": "%E7%BC%96%E5%86%99%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6", - "fullPath": "#%E7%BC%96%E5%86%99%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6", - "level": 3 - }, - { - "label": "表单项的扩展", - "fragment": "%E8%A1%A8%E5%8D%95%E9%A1%B9%E7%9A%84%E6%89%A9%E5%B1%95", - "fullPath": "#%E8%A1%A8%E5%8D%95%E9%A1%B9%E7%9A%84%E6%89%A9%E5%B1%95", - "level": 3 - }, - { - "label": "其它高级定制", - "fragment": "%E5%85%B6%E5%AE%83%E9%AB%98%E7%BA%A7%E5%AE%9A%E5%88%B6", - "fullPath": "#%E5%85%B6%E5%AE%83%E9%AB%98%E7%BA%A7%E5%AE%9A%E5%88%B6", - "level": 3, - "children": [ - { - "label": "自定义验证器", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89%E9%AA%8C%E8%AF%81%E5%99%A8", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89%E9%AA%8C%E8%AF%81%E5%99%A8", - "level": 4 - }, - { - "label": "OptionsControl", - "fragment": "optionscontrol", - "fullPath": "#optionscontrol", - "level": 4 - }, - { - "label": "组件间通信", - "fragment": "%E7%BB%84%E4%BB%B6%E9%97%B4%E9%80%9A%E4%BF%A1", - "fullPath": "#%E7%BB%84%E4%BB%B6%E9%97%B4%E9%80%9A%E4%BF%A1", - "level": 4 - }, - { - "label": "其他功能方法", - "fragment": "%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD%E6%96%B9%E6%B3%95", - "fullPath": "#%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD%E6%96%B9%E6%B3%95", - "level": 4 - } - ] - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/start/getting-started.html b/gh-pages/docs/start/getting-started.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/start/getting-started.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/start/getting-started_6d89720.js b/gh-pages/docs/start/getting-started_6d89720.js deleted file mode 100644 index 5a52d38a..00000000 --- a/gh-pages/docs/start/getting-started_6d89720.js +++ /dev/null @@ -1,82 +0,0 @@ -amis.define('docs/start/getting-started.md', function(require, exports, module, define) { - - module.exports = { - "title": "快速开始", - "description": null, - "html": "

amis 有两种使用方法:

\n\n

npm 适合用在 React 项目中,可以完整使用 amis 的所有功能,方便扩展。

\n

SDK 适合对前端或 React 不了解的开发者,它不依赖 npm 及 webpack,直接引入代码就能使用,但需要注意这种方式难以支持 自定义组件,只能使用 amis 内置的组件。

\n

npm

安装

npm i amis\n

主题样式

目前支持三种主题:default(默认主题)cxd(云舍)dark(暗黑)

\n
    \n
  1. 引入样式文件:
  2. \n
\n

html 中引入:

\n
\n\n\n
<link href=\"./node_modules/amis/lib/themes/default.css\" />\n<!-- 或 <link href=\"./node_modules/amis/lib/themes/cxd.css\" /> -->\n<!-- 或 <link href=\"./node_modules/amis/lib/themes/dark.css\" /> -->\n
\n

js 中引入:

\n
import './node_modules/amis/lib/themes/default.css';\n// 或 import './node_modules/amis/lib/themes/cxd.css';\n// 或 import './node_modules/amis/lib/themes/dark.css';\n
\n
\n

上面只是示例,请根据自己的项目结构调整引用路径

\n
\n
    \n
  1. 渲染器使用配置主题
  2. \n
\n
renderAmis(\n  {\n    type: 'page',\n    title: '简单页面',\n    body: '内容'\n  },\n  {},\n  {\n    // env...\n    theme: 'default' // cxd 或 dark\n  }\n);\n
\n

使用指南

可以在 React Component 这么使用(TypeScript)。

\n
    \n
  1. 安装部分示例需要的插件库
  2. \n
\n
npm i axios copy-to-clipboard\n
\n

为了方便示例,上面选用了我们常用几个插件库,你完全可以选择自己喜欢的插件并重新实现

\n
\n
    \n
  1. 代码实现
  2. \n
\n
import * as React from 'react';\nimport axios from 'axios';\nimport copy from 'copy-to-clipboard';\n\nimport {render as renderAmis} from 'amis';\nimport {alert, confirm} from 'amis/lib/components/Alert';\nimport {toast} from 'amis/lib/components/Toast';\n\nclass MyComponent extends React.Component<any, any> {\n  render() {\n    return (\n      <div>\n        <p>通过 amis 渲染页面</p>\n        {renderAmis(\n          {\n            // 这里是 amis 的 Json 配置。\n            type: 'page',\n            title: '简单页面',\n            body: '内容'\n          },\n          {\n            // props...\n          },\n          {\n            // env\n            // 这些是 amis 需要的一些接口实现\n            // 可以参考后面的参数介绍。\n\n            jumpTo: (\n              location: string /*目标地址*/,\n              action: any /* action对象*/\n            ) => {\n              // 用来实现页面跳转, actionType:link、url 都会进来。\n              // 因为不清楚所在环境中是否使用了 spa 模式,所以自己实现这个方法吧。\n            },\n\n            updateLocation: (\n              location: string /*目标地址*/,\n              replace: boolean /*是replace,还是push?*/\n            ) => {\n              // 地址替换,跟 jumpTo 类似\n            },\n\n            fetcher: ({\n              url, // 接口地址\n              method, // 请求方法 get、post、put、delete\n              data, // 请求数据\n              responseType,\n              config, // 其他配置\n              headers // 请求头\n            }: any) => {\n              config = config || {};\n              config.withCredentials = true;\n              responseType && (config.responseType = responseType);\n\n              if (config.cancelExecutor) {\n                config.cancelToken = new (axios as any).CancelToken(\n                  config.cancelExecutor\n                );\n              }\n\n              config.headers = headers || {};\n\n              if (method !== 'post' && method !== 'put' && method !== 'patch') {\n                if (data) {\n                  config.params = data;\n                }\n\n                return (axios as any)[method](url, config);\n              } else if (data && data instanceof FormData) {\n                config.headers = config.headers || {};\n                config.headers['Content-Type'] = 'multipart/form-data';\n              } else if (\n                data &&\n                typeof data !== 'string' &&\n                !(data instanceof Blob) &&\n                !(data instanceof ArrayBuffer)\n              ) {\n                data = JSON.stringify(data);\n                config.headers = config.headers || {};\n                config.headers['Content-Type'] = 'application/json';\n              }\n\n              return (axios as any)[method](url, data, config);\n            },\n            isCancel: (value: any) => (axios as any).isCancel(value),\n            notify: (\n              type: 'error' | 'success' /**/,\n              msg: string /*提示内容*/\n            ) => {\n              toast[type]\n                ? toast[type](msg, type === 'error' ? '系统错误' : '系统消息')\n                : console.warn('[Notify]', type, msg);\n            },\n            alert,\n            confirm,\n            copy: content => {\n              copy(content);\n              toast.success('内容已复制到粘贴板');\n            }\n          }\n        )}\n      </div>\n    );\n  }\n}\n
\n

render 函数介绍

(schema, props, env) => JSX.Element;\n
\n

schema

即页面配置,请前往 配置与组件 了解

\n

props

一般都用不上,如果你想传递一些数据给渲染器内部使用,可以传递 data 数据进去。如:

\n
() =>\n  renderAmis(schema, {\n    data: {\n      username: 'amis'\n    }\n  });\n
\n

这样,内部所有组件都能拿到 username 这个变量的值。当然,这里的 key 并不一定必须是 data , 你也可以是其它 key,但必须配合 schema 中的 detectField 属性一起使用。 如:

\n
() =>\n  renderAmis(\n    {\n      //其它配置\n      detectField: 'somekey'\n    },\n    {\n      somekey: {\n        username: 'amis'\n      }\n    }\n  );\n
\n

env

环境变量,可以理解为这个渲染器工具的配置项,需要使用 amis 用户实现部分接口。他有下面若干参数:

\n
fetcher(必须实现)

接口请求器,实现该函数才可以实现 ajax 发送,函数签名如下:

\n
(config: {\n  url; // 接口地址\n  method; // 请求方法 get、post、put、delete\n  data; // 请求数据\n  responseType;\n  config; // 其他配置\n  headers; // 请求头\n}) => Promise<fetcherResult>;\n
\n
\n

你可以使用任何你喜欢的 ajax 请求库来实现这个接口

\n
\n
notify
(type: string, msg: string) => void\n
\n

用来实现消息提示。

\n
alert
(msg: string) => void\n
\n

用来实现警告提示。

\n
confirm
(msg: string) => boolean | Promise<boolean>\n
\n

用来实现确认框。返回 boolean 值

\n
jumpTo
(to: string, action?: Action, ctx?: object) => void\n
\n

用来实现页面跳转,因为不清楚所在环境中是否使用了 spa 模式,所以用户自己实现吧。

\n
updateLocation
(location: any, replace?: boolean) => void\n
\n

地址替换,跟 jumpTo 类似。

\n
theme: string

目前支持是三种主题:defaultcxddark

\n
isCurrentUrl
(link: string) => boolean;\n
\n

判断目标地址是否为当前页面。

\n
copy
(contents: string, options?: {shutup: boolean})\n
\n

用来实现内容复制。

\n
session

默认为 'global',决定 store 是否为全局共用的,如果想单占一个 store,请设置不同的值。

\n
getModalContainer
() => HTMLElement;\n
\n

用来决定弹框容器。

\n
loadRenderer
(schema: any, path: string) => Promise<Function>\n
\n

可以通过它懒加载自定义组件,比如: https://github.com/baidu/amis/blob/master/__tests__/factory.test.tsx#L64-L91。

\n
affixOffsetTop: number

固顶间距,当你的有其他固顶元素时,需要设置一定的偏移量,否则会重叠。

\n
affixOffsetBottom: number

固底间距,当你的有其他固底元素时,需要设置一定的偏移量,否则会重叠。

\n
richTextToken: string

内置 rich-text 为 frolaEditor,想要使用,请自行购买,或者自己实现 rich-text 渲染器。

\n

SDK

JSSDK 的代码从以下地址获取:

\n\n

以上的 SDK 地址是一个页面跳转,会跳转到一个 CDN 地址,而且每次跳转都是最新的版本,随着 amis 的升级这个地址会一直变动。npm 包里面也包含 sdk 文件,要固定某个版本可以先 amis 安装到本地,然后去 sdk 目录拷贝文件。然后类似如下的方式使用:

\n
<!DOCTYPE html>\n<html lang=\"zh\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <title>AMIS Demo</title>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <meta\n      name=\"viewport\"\n      content=\"width=device-width, initial-scale=1, maximum-scale=1\"\n    />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <link rel=\"stylesheet\" href=\"amis/sdk.css\" />\n    <style>\n      html,\n      body,\n      .app-wrapper {\n        position: relative;\n        width: 100%;\n        height: 100%;\n        margin: 0;\n        padding: 0;\n      }\n    </style>\n  </head>\n  <body>\n    <div id=\"root\" class=\"app-wrapper\"></div>\n    <script src=\"amis/sdk.js\"></script>\n    <script type=\"text/javascript\">\n      (function () {\n        let amis = amisRequire('amis/embed');\n        let amisScoped = amis.embed('#root', {\n          type: 'page',\n          title: 'AMIS Demo',\n          body: 'hello world'\n        });\n      })();\n    </script>\n  </body>\n</html>\n
\n

控制 amis 的行为

amis.embed 函数还支持以下配置项来控制 amis 的行为,比如在 fetcher 的时候加入自己的处理逻辑,这些函数参数的说明在前面也有介绍。

\n
let amisScoped = amis.embed(\n  '#root',\n  {\n    type: 'page',\n    title: 'AMIS Demo',\n    body: 'This is a simple amis page.'\n  },\n  {\n    // props 一般不用传。\n  },\n  {\n    fetcher: (url, method, data, config) => {\n      // 可以不传,用来实现 ajax 请求\n    },\n\n    jumpTo: location => {\n      // 可以不传,用来实现页面跳转\n    },\n\n    updateLocation: (location, replace) => {\n      // 可以不传,用来实现地址栏更新\n    },\n\n    isCurrentUrl: url => {\n      // 可以不传,用来判断是否目标地址当前地址。\n    },\n\n    copy: content => {\n      // 可以不传,用来实现复制到剪切板\n    },\n\n    notify: (type, msg) => {\n      // 可以不传,用来实现通知\n    },\n\n    alert: content => {\n      // 可以不传,用来实现提示\n    },\n\n    confirm: content => {\n      // 可以不传,用来实现确认框。\n    }\n  }\n);\n
\n

同时返回的 amisScoped 对象可以获取到 amis 渲染的内部信息,它有如下方法:

\n

getComponentByName(name) 用于获取渲染出来的组件,比如下面的示例

\n
{\n  \"type\": \"page\",\n  \"name\": \"page1\",\n  \"title\": \"表单页面\",\n  \"body\": {\n    \"type\": \"form\",\n    \"name\": \"form1\",\n    \"controls\": [\n      {\n        \"label\": \"Name\",\n        \"type\": \"text\",\n        \"name\": \"name1\"\n      }\n    ]\n  }\n}\n
\n

可以通过 amisScoped.getComponentByName('page1.form1').getValues() 来获取到所有表单的值,需要注意 page 和 form 都需要有 name 属性。

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "npm", - "fragment": "npm", - "fullPath": "#npm", - "level": 2, - "children": [ - { - "label": "安装", - "fragment": "%E5%AE%89%E8%A3%85", - "fullPath": "#%E5%AE%89%E8%A3%85", - "level": 3 - }, - { - "label": "主题样式", - "fragment": "%E4%B8%BB%E9%A2%98%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E4%B8%BB%E9%A2%98%E6%A0%B7%E5%BC%8F", - "level": 3 - }, - { - "label": "使用指南", - "fragment": "%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97", - "fullPath": "#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97", - "level": 3 - }, - { - "label": "render 函数介绍", - "fragment": "render-%E5%87%BD%E6%95%B0%E4%BB%8B%E7%BB%8D", - "fullPath": "#render-%E5%87%BD%E6%95%B0%E4%BB%8B%E7%BB%8D", - "level": 3, - "children": [ - { - "label": "schema", - "fragment": "schema", - "fullPath": "#schema", - "level": 4 - }, - { - "label": "props", - "fragment": "props", - "fullPath": "#props", - "level": 4 - }, - { - "label": "env", - "fragment": "env", - "fullPath": "#env", - "level": 4 - } - ] - } - ] - }, - { - "label": "SDK", - "fragment": "sdk", - "fullPath": "#sdk", - "level": 2, - "children": [ - { - "label": "控制 amis 的行为", - "fragment": "%E6%8E%A7%E5%88%B6-amis-%E7%9A%84%E8%A1%8C%E4%B8%BA", - "fullPath": "#%E6%8E%A7%E5%88%B6-amis-%E7%9A%84%E8%A1%8C%E4%B8%BA", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/types/api.html b/gh-pages/docs/types/api.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/types/api.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/types/api_1399dbe.js b/gh-pages/docs/types/api_1399dbe.js deleted file mode 100644 index 37ba4a73..00000000 --- a/gh-pages/docs/types/api_1399dbe.js +++ /dev/null @@ -1,153 +0,0 @@ -amis.define('docs/types/api.md', function(require, exports, module, define) { - - module.exports = { - "title": "API", - "description": null, - "type": 0, - "group": "🔧 类型", - "menuName": "API", - "icon": null, - "order": 20, - "html": "

API 类型用于配置请求接口的格式,涉及请求方式、请求地址、请求数据体等等相关配置

\n

简单配置

如果你只需要配置简单的 ajax 接口,可以使用简单字符串格式,如下:

\n
[<method>:]<url>\n
    \n
  • method:get、post、put、delete,默认为 get
  • \n
  • url:接口地址,即模板字符串
  • \n
\n

示例:

\n
{\n  \"api\": \"get:/api/initData\", // get 请求\n  \"api\": \"post:/api/initData\", // post 请求\n  \"api\": \"put:/api/initData\", // put 请求\n  \"api\": \"delete:/api/initData\" // delete 请求\n}\n
\n

接口返回格式(重要)

所有配置在 amis 组件中的接口,都要符合下面的返回格式

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    ...其他字段\n  }\n}\n
\n
    \n
  • status: 返回 0,表示当前接口正确返回,否则按错误请求处理;
  • \n
  • msg: 返回接口处理信息,主要用于表单提交或请求失败时的 toast 显示;
  • \n
  • data: 必须返回一个具有 key-value 结构的对象。
  • \n
\n

statusmsgdata 字段为接口返回的必要字段;

\n

正确的格式

{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": {\n    // 正确\n    \"text\": \"World!\"\n  }\n}\n
\n

错误的格式

直接返回字符串或者数组都是不推荐的

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": \"some string\" // 错误,使用 key 包装\n}\n
\n

不推荐的格式

部分组件为了可以兼容,支持下面这种直接返回数组的用法,但并不推荐这种方式。

\n
{\n  \"status\": 0,\n  \"msg\": \"\",\n  \"data\": [\"a\", \"b\"] // 不推荐,使用 key 包装\n}\n
\n

复杂配置

API 还支持配置对象类型

\n

基本用法

{\n    \"api\": {\n        \"method\": \"get\",\n        \"url\": \"xxxx\",\n        \"data\": {\n            xxx\n        },\n        ... // 其他配置\n    }\n}\n
\n

配置请求方式

可以配置method指定接口的请求方式,支持:getpostputdelete

\n
\n

method值留空时:

\n
    \n
  • 在初始化接口中,默认为get请求
  • \n
  • form提交接口,默认为post请求
  • \n
\n
\n

配置请求地址

可以配置url指定接口请求地址,支持模板字符串

\n

配置请求数据

可以配置data,配置自定义接口请求数据体。

\n
\n

支持数据映射

\n
\n

method配置为get时,data中的值默认会添加到请求路径中

\n
\n

配置请求数据格式

可以配置dataType,来指定请求的数据体格式,默认为json

\n
\n

下面例子中 api 没有配置data属性,因为form会默认将所有表单项的值进行提交。

\n
\n

application/json

默认是application/json,不需要额外配置

\n
\n

application/x-www-form-urlencoded

配置"dataType": "form",可配置发送体格式为application/x-www-form-urlencoded

\n
\n

multipart/form-data

配置"dataType": "form-data",可配置发送体格式为multipart/form-data

\n
\n

当表单项中文件类型数据,则自动使用multipart/form-data数据体

\n
\n
\n

asBlob配置项会指定当前 File 控件不再自己上传了,而是直接把文件数据作为表单项的值,文件内容会在 Form 表单提交的接口里面一起带上。

\n
\n

配置自定义请求头

可以配置headers对象,添加自定义请求头

\n
\n

配置请求条件

可以配置表达式sendOn来实现:当符合某个条件的情况下,接口才触发请求

\n
\n

查看 选项 2source属性,他是 API 类型值,支持配置sendOn 表达式,实现根据条件请求接口。

\n

配置接口缓存

当你在某种情况下,需要非常频繁的请求同一个接口,例如列表中,每一行中都有一个 Service 进行数据拉取操作,

\n
\n

如上,如果你打开浏览器网络面板,会发现/api/mock2/page/initData接口将重复请求多次,次数为你当前列表的数据条数。

\n

这往往并不理想,你可以设置cache来设置缓存时间,单位是毫秒,在设置的缓存时间内,同样的请求将不会重复发起,而是会获取缓存好的请求响应数据。

\n
\n

这下我们再打开网络面板,发现只有一条请求了

\n

配置请求适配器

amis 的 API 配置,如果无法配置出你想要的请求结构,那么可以配置requestAdaptor发送适配器

\n

发送适配器 是指在接口请求前,对请求进行一些自定义处理,例如修改发送数据体、添加请求头、等等,基本用法是,获取暴露的api参数,并且对该参数进行一些修改,并return出去:

\n
暴露的参数

发送适配器暴露以下参数以供用户进行操作:

\n
    \n
  • api:当前请求的 api 对象,一般包含下面几个属性:
      \n
    • url:当前接口 Api 地址
    • \n
    • method:当前请求的方式
    • \n
    • data:请求的数据体
    • \n
    • headers:请求的头部信息
    • \n
    \n
  • \n
\n
字符串形式

如果在 JSON 文件中配置的话,requestAdaptor只支持字符串形式。

\n

字符串形式实际上可以认为是外层包裹了一层函数,你需要补充内部的函数实现,并将修改好的 api 对象 return 出去:

\n
function (api) {\n  // 你的适配器代码\n}\n
\n

用法示例:

\n
\n

上例中的适配器实际上是如下代码的字符串形式:

\n
// 进行一些操作\n\n// 一定要将调整后的 api 对象 return 出去\nreturn {\n  ...api,\n  data: {\n    ...api.data, // 获取暴露的 api 中的 data 变量\n    foo: 'bar' // 新添加数据\n  }\n};\n
\n
函数形式

如果你的使用环境为 js 文件,则可以直接传入函数,如下:

\n
const schema = {\n  type: 'form',\n  api: {\n    method: 'post',\n    url: 'https://houtai.baidu.com/api/mock2/form/saveForm',\n    requestAdaptor: function (api) {\n      return {\n        ...api,\n        data: {\n          ...api.data, // 获取暴露的 api 中的 data 变量\n          foo: 'bar' // 新添加数据\n        }\n      };\n    }\n  },\n  controls: [\n    {\n      type: 'text',\n      name: 'name',\n      label: '姓名:'\n    },\n    {\n      name: 'text',\n      type: 'email',\n      label: '邮箱:'\n    }\n  ]\n};\n
\n

上面例子中,我们获取暴露的api对象中的data变量,并且为其添加了一个新的字段foo,并且一起返回出去就可以了,这样我们的请求数据体中就会加上我们这个新的字段。

\n

你也可以使用debugger自行进行调试。

\n

配置接收适配器

同样的,如果后端返回的响应结构不符合 amis 的接口格式要求,而后端不方便调整时,可以配置adaptor实现接收适配器

\n

接收适配器 是指在接口请求后,对响应进行一些自定义处理,例如修改响应的数据结构、修改响应的数据等等。

\n

例如:接口正确返回的格式中,会返回"code": 200,而 amis 中,接口返回格式需要"status": 0,这时候就需要接收适配器进行调整结构。

\n
暴露的参数

接收适配器器暴露以下参数以供用户进行操作:

\n
    \n
  • payload:当前请求的响应 payload,即 response.data
  • \n
  • response:当前请求的原始响应
  • \n
\n
字符串形式

如果在 JSON 文件中配置的话,adaptor只支持字符串形式。

\n

字符串形式实际上可以认为是外层包裹了一层函数,你需要补充内部的函数实现,并将修改好的 payload 对象 return 出去:

\n
function (payload, responsee) {\n  // 你的适配器代码\n}\n
\n

用法示例:

\n
{\n  \"type\": \"form\",\n  \"api\": {\n    \"method\": \"post\",\n    \"url\": \"https://houtai.baidu.com/api/mock2/form/saveForm\",\n    \"adaptor\": \"return {\\n    ...payload,\\n    status: payload.code === 200 ? 0 : payload.code\\n}\"\n  },\n  \"controls\": [\n    {\n      \"type\": \"text\",\n      \"name\": \"name\",\n      \"label\": \"姓名:\"\n    },\n    {\n      \"name\": \"file\",\n      \"type\": \"file\",\n      \"label\": \"附件:\",\n      \"asBlob\": true\n    }\n  ]\n}\n
\n

上例中的适配器实际上是如下代码的字符串形式:

\n
// 进行一些操作\n\n// 一定要将调整后的 payload 对象 return 出去\nreturn {\n  ...payload,\n  status: payload.code === 200 ? 0 : payload.code\n};\n
\n
函数形式

如果你的使用环境为 js 文件,则可以直接传入函数,如下:

\n
const schema = {\n  type: 'form',\n  api: {\n    method: 'post',\n    url: 'https://houtai.baidu.com/api/mock2/form/saveForm',\n    adaptor: function (payload, response) {\n      return {\n        ...payload,\n        status: payload.code === 200 ? 0 : payload.code\n      };\n    }\n  },\n  controls: [\n    {\n      type: 'text',\n      name: 'name',\n      label: '姓名:'\n    },\n    {\n      name: 'email',\n      type: 'email',\n      label: '邮箱:'\n    }\n  ]\n};\n
\n

replaceData

返回的数据是否替换掉当前的数据,默认为 false(即追加),设置为true就是完全替换当前数据。

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
字段名说明类型备注
method请求方式字符串支持:get、post、put、delete
url请求地址模板字符串-
data请求数据对象或字符串支持数据映射
dataType数据体格式字符串默认为 json 可以配置成 form 或者 form-data。当 data 中包含文件时,自动会采用 form-data(multipart/form-data) 格式。当配置为 form 时为 application/x-www-form-urlencoded 格式。
qsOptions--对象或字符串当 dataType 为 form 或者 form-data 的时候有用。具体参数请参考这里,默认设置为: { arrayFormat: 'indices', encodeValuesOnly: true }
headers请求头对象-
sendOn请求条件表达式-
cache接口缓存时间整型数字-
requestAdaptor发送适配器字符串,支持字符串串格式,或者直接就是函数如:
adaptor接收适配器字符串如果接口返回不符合要求,可以通过配置一个适配器来处理成 amis 需要的。同样支持 Function 或者 字符串函数体格式
replaceData替换当前数据布尔返回的数据是否替换掉当前的数据,默认为 false,即:追加,设置成 true 就是完全替换。
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "简单配置", - "fragment": "%E7%AE%80%E5%8D%95%E9%85%8D%E7%BD%AE", - "fullPath": "#%E7%AE%80%E5%8D%95%E9%85%8D%E7%BD%AE", - "level": 2 - }, - { - "label": "接口返回格式(重要)", - "fragment": "%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E6%A0%BC%E5%BC%8F-%E9%87%8D%E8%A6%81-", - "fullPath": "#%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E6%A0%BC%E5%BC%8F-%E9%87%8D%E8%A6%81-", - "level": 2, - "children": [ - { - "label": "正确的格式", - "fragment": "%E6%AD%A3%E7%A1%AE%E7%9A%84%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E6%AD%A3%E7%A1%AE%E7%9A%84%E6%A0%BC%E5%BC%8F", - "level": 3 - }, - { - "label": "错误的格式", - "fragment": "%E9%94%99%E8%AF%AF%E7%9A%84%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E9%94%99%E8%AF%AF%E7%9A%84%E6%A0%BC%E5%BC%8F", - "level": 3 - }, - { - "label": "不推荐的格式", - "fragment": "%E4%B8%8D%E6%8E%A8%E8%8D%90%E7%9A%84%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E4%B8%8D%E6%8E%A8%E8%8D%90%E7%9A%84%E6%A0%BC%E5%BC%8F", - "level": 3 - } - ] - }, - { - "label": "复杂配置", - "fragment": "%E5%A4%8D%E6%9D%82%E9%85%8D%E7%BD%AE", - "fullPath": "#%E5%A4%8D%E6%9D%82%E9%85%8D%E7%BD%AE", - "level": 2, - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 3 - }, - { - "label": "配置请求方式", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%96%B9%E5%BC%8F", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%96%B9%E5%BC%8F", - "level": 3 - }, - { - "label": "配置请求地址", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E5%9C%B0%E5%9D%80", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E5%9C%B0%E5%9D%80", - "level": 3 - }, - { - "label": "配置请求数据", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE", - "level": 3 - }, - { - "label": "配置请求数据格式", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F", - "level": 3, - "children": [ - { - "label": "application/json", - "fragment": "application-json", - "fullPath": "#application-json", - "level": 4 - }, - { - "label": "application/x-www-form-urlencoded", - "fragment": "application-x-www-form-urlencoded", - "fullPath": "#application-x-www-form-urlencoded", - "level": 4 - }, - { - "label": "multipart/form-data", - "fragment": "multipart-form-data", - "fullPath": "#multipart-form-data", - "level": 4 - } - ] - }, - { - "label": "配置自定义请求头", - "fragment": "%E9%85%8D%E7%BD%AE%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%B7%E6%B1%82%E5%A4%B4", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%B7%E6%B1%82%E5%A4%B4", - "level": 3 - }, - { - "label": "配置请求条件", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%9D%A1%E4%BB%B6", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E6%9D%A1%E4%BB%B6", - "level": 3 - }, - { - "label": "配置接口缓存", - "fragment": "%E9%85%8D%E7%BD%AE%E6%8E%A5%E5%8F%A3%E7%BC%93%E5%AD%98", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%8E%A5%E5%8F%A3%E7%BC%93%E5%AD%98", - "level": 3 - }, - { - "label": "配置请求适配器", - "fragment": "%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E9%80%82%E9%85%8D%E5%99%A8", - "fullPath": "#%E9%85%8D%E7%BD%AE%E8%AF%B7%E6%B1%82%E9%80%82%E9%85%8D%E5%99%A8", - "level": 3 - }, - { - "label": "配置接收适配器", - "fragment": "%E9%85%8D%E7%BD%AE%E6%8E%A5%E6%94%B6%E9%80%82%E9%85%8D%E5%99%A8", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%8E%A5%E6%94%B6%E9%80%82%E9%85%8D%E5%99%A8", - "level": 3 - }, - { - "label": "replaceData", - "fragment": "replacedata", - "fullPath": "#replacedata", - "level": 3 - }, - { - "label": "属性表", - "fragment": "%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 3 - } - ] - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/types/schemanode.html b/gh-pages/docs/types/schemanode.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/docs/types/schemanode.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/docs/types/schemanode_d42b346.js b/gh-pages/docs/types/schemanode_d42b346.js deleted file mode 100644 index fe7937a2..00000000 --- a/gh-pages/docs/types/schemanode_d42b346.js +++ /dev/null @@ -1,47 +0,0 @@ -amis.define('docs/types/schemanode.md', function(require, exports, module, define) { - - module.exports = { - "title": "SchemaNode", - "description": null, - "type": 0, - "group": "🔧 类型", - "menuName": "SchemaNode 配置节点", - "icon": null, - "order": 19, - "html": "

SchemaNode 是指每一个 amis 配置节点的类型,支持模板Schema(配置)以及SchemaArray(配置数组)三种类型

\n

模板

{\n  \"type\": \"page\",\n  \"data\": {\n    \"text\": \"World\"\n  },\n  \"body\": \"Hello ${text}!\" // 输出 Hello World!\n}\n
\n

上例中的body属性所配置的属性值"Hello ${text}!"就是一个模板

\n

更多使用说明见 模板文档

\n

Schema 配置

Schema,即组件的 JSON 配置

\n

它至少需要一个type字段,用以标识当前Schema的类型。

\n
{\n  \"type\": \"page\",\n  \"data\": {\n    \"text\": \"World\"\n  },\n  \"body\": {\n    \"type\": \"tpl\",\n    \"tpl\": \"Hello ${text}!\" // 输出 Hello World!\n  }\n}\n
\n

type, data, body这三个字段组成的JSON对象,便是一个Schema,它由type字段作为标识,指明当前 SchemaPage组件节点

\n

而通过查看 Page 组件属性表 可知,body属性类型是SchemaNode,即可以在body中,嵌套配置其他组件。我们在这里,用typetpl JSON 对象,配置了 Tpl 组件,渲染了一段模板字符串。

\n
\n

amis 可以通过该方法,在Schema中嵌套配置其他SchemaNode,从而搭建非常复杂的页面应用。

\n
\n

配置显隐

所有的Schema类型都可以通过配置visiblehiddenvisibleOnhiddenOn来控制组件的显隐,下面是两种方式

\n
静态配置

通过配置"hidden": true或者"visible": false来隐藏组件

\n
\n

下面那个表单被隐藏了。

\n
通过条件配置显隐

你也通过 表达式 配置hiddenOn,来实现在某个条件下禁用当前组件.

\n
\n

为了方便说明,我们在 form 中演示了条件显隐,实际上,只要当前数据域中数据有变化,都可以实现组件显隐

\n
\n

visiblehiddenvisibleOnhiddenOn除了判断逻辑相反以外,没有任何区别

\n
\n

SchemaArray 配置数组

明白了何为Schema之后,你就会很轻松理解SchemaArray,它其实就是支持通过数组配置Schema,从而在某一节点层级下,配置多个组件

\n
{\n  \"type\": \"page\",\n  \"data\": {\n      \"name\": \"amis\"\n      \"age\": 1\n  },\n  \"body\": [\n      {\n        \"type\":\"tpl\",\n        \"tpl\": \"my name is ${name}\" // 输出 Hello World!\n      },\n      {\n        \"type\":\"tpl\",\n        \"tpl\": \"I am ${age} years old!\" // 输出 Hello World!\n      }\n  ]\n}\n
\n

非常容易看出来,我们给body属性,配置了数组结构的Schema,从而实现在body下,渲染两个tpl,来输入两段文字的效果

\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "模板", - "fragment": "%E6%A8%A1%E6%9D%BF", - "fullPath": "#%E6%A8%A1%E6%9D%BF", - "level": 2 - }, - { - "label": "Schema 配置", - "fragment": "schema-%E9%85%8D%E7%BD%AE", - "fullPath": "#schema-%E9%85%8D%E7%BD%AE", - "level": 2, - "children": [ - { - "label": "配置显隐", - "fragment": "%E9%85%8D%E7%BD%AE%E6%98%BE%E9%9A%90", - "fullPath": "#%E9%85%8D%E7%BD%AE%E6%98%BE%E9%9A%90", - "level": 3 - } - ] - }, - { - "label": "SchemaArray 配置数组", - "fragment": "schemaarray-%E9%85%8D%E7%BD%AE%E6%95%B0%E7%BB%84", - "fullPath": "#schemaarray-%E9%85%8D%E7%BD%AE%E6%95%B0%E7%BB%84", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/examples/audio.html b/gh-pages/examples/audio.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/audio.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/carousel.html b/gh-pages/examples/carousel.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/carousel.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/chart.html b/gh-pages/examples/chart.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/chart.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/aside.html b/gh-pages/examples/crud/aside.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/aside.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/columns.html b/gh-pages/examples/crud/columns.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/columns.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/fixed.html b/gh-pages/examples/crud/fixed.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/fixed.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/footable.html b/gh-pages/examples/crud/footable.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/footable.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/grid.html b/gh-pages/examples/crud/grid.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/grid.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/header-group.html b/gh-pages/examples/crud/header-group.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/header-group.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/header-hide.html b/gh-pages/examples/crud/header-hide.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/header-hide.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/item-actions.html b/gh-pages/examples/crud/item-actions.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/item-actions.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/jump-next.html b/gh-pages/examples/crud/jump-next.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/jump-next.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/keyboards.html b/gh-pages/examples/crud/keyboards.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/keyboards.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/list.html b/gh-pages/examples/crud/list.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/list.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/load-more.html b/gh-pages/examples/crud/load-more.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/load-more.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/load-once.html b/gh-pages/examples/crud/load-once.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/load-once.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/merge-cell.html b/gh-pages/examples/crud/merge-cell.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/merge-cell.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/nested.html b/gh-pages/examples/crud/nested.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/nested.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/crud/table.html b/gh-pages/examples/crud/table.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/crud/table.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/dialog/drawer.html b/gh-pages/examples/dialog/drawer.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/dialog/drawer.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/dialog/simple.html b/gh-pages/examples/dialog/simple.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/dialog/simple.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/combo.html b/gh-pages/examples/form/combo.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/combo.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/condition-builder.html b/gh-pages/examples/form/condition-builder.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/condition-builder.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/custom.html b/gh-pages/examples/form/custom.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/custom.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/definitions.html b/gh-pages/examples/form/definitions.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/definitions.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/fields-tabs.html b/gh-pages/examples/form/fields-tabs.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/fields-tabs.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/fieldset.html b/gh-pages/examples/form/fieldset.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/fieldset.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/formula.html b/gh-pages/examples/form/formula.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/formula.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/full.html b/gh-pages/examples/form/full.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/full.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/hint.html b/gh-pages/examples/form/hint.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/hint.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/ide.html b/gh-pages/examples/form/ide.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/ide.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/mode.html b/gh-pages/examples/form/mode.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/mode.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/picker.html b/gh-pages/examples/form/picker.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/picker.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/reaction.html b/gh-pages/examples/form/reaction.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/reaction.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/remote.html b/gh-pages/examples/form/remote.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/remote.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/rich-text.html b/gh-pages/examples/form/rich-text.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/rich-text.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/static.html b/gh-pages/examples/form/static.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/static.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/sub-form.html b/gh-pages/examples/form/sub-form.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/sub-form.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/table.html b/gh-pages/examples/form/table.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/table.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/tabs.html b/gh-pages/examples/form/tabs.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/tabs.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/transfer.html b/gh-pages/examples/form/transfer.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/transfer.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/form/validation.html b/gh-pages/examples/form/validation.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/form/validation.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/horizontal.html b/gh-pages/examples/horizontal.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/horizontal.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/iframe.html b/gh-pages/examples/iframe.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/iframe.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/crud.html b/gh-pages/examples/linkpage/crud.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/crud.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/form.html b/gh-pages/examples/linkpage/form.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/form.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/form2.html b/gh-pages/examples/linkpage/form2.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/form2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/options-local.html b/gh-pages/examples/linkpage/options-local.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/options-local.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/options.html b/gh-pages/examples/linkpage/options.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/options.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/linkpage/page.html b/gh-pages/examples/linkpage/page.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/linkpage/page.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/pages/error.html b/gh-pages/examples/pages/error.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/pages/error.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/pages/form.html b/gh-pages/examples/pages/form.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/pages/form.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/pages/simple.html b/gh-pages/examples/pages/simple.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/pages/simple.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/sdk.html b/gh-pages/examples/sdk.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/sdk.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/services/data.html b/gh-pages/examples/services/data.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/services/data.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/services/form.html b/gh-pages/examples/services/form.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/services/form.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/services/schema.html b/gh-pages/examples/services/schema.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/services/schema.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/tabs/form.html b/gh-pages/examples/tabs/form.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/tabs/form.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/tabs/normal.html b/gh-pages/examples/tabs/normal.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/tabs/normal.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/tabs/tab1.html b/gh-pages/examples/tabs/tab1.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/tabs/tab1.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/tabs/tab2.html b/gh-pages/examples/tabs/tab2.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/tabs/tab2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/tabs/tab3.html b/gh-pages/examples/tabs/tab3.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/tabs/tab3.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/task.html b/gh-pages/examples/task.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/task.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/video.html b/gh-pages/examples/video.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/video.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/examples/wizard.html b/gh-pages/examples/wizard.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/examples/wizard.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/index.html b/gh-pages/index.html deleted file mode 100644 index 49c7dc41..00000000 --- a/gh-pages/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - amis - 低代码前端框架 - - - - - - - - - - - - - - -
- - - - - - - - diff --git a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_448c34a.woff2 b/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_448c34a.woff2 deleted file mode 100644 index 64539b54..00000000 Binary files a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_448c34a.woff2 and /dev/null differ diff --git a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_8988968.svg b/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_8988968.svg deleted file mode 100644 index 94fb5490..00000000 --- a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_8988968.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_e18bbf6.ttf b/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_e18bbf6.ttf deleted file mode 100644 index 1413fc60..00000000 Binary files a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_e18bbf6.ttf and /dev/null differ diff --git a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_f4769f9.eot b/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_f4769f9.eot deleted file mode 100644 index b93a4953..00000000 Binary files a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_f4769f9.eot and /dev/null differ diff --git a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_fa27723.woff b/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_fa27723.woff deleted file mode 100644 index 9e612858..00000000 Binary files a/gh-pages/n/bootstrap/dist/fonts/glyphicons-halflings-regular_fa27723.woff and /dev/null differ diff --git a/gh-pages/n/flv.js/dist/flv_d7b7bb2.js b/gh-pages/n/flv.js/dist/flv_d7b7bb2.js deleted file mode 100644 index 1ee21129..00000000 --- a/gh-pages/n/flv.js/dist/flv_d7b7bb2.js +++ /dev/null @@ -1,6 +0,0 @@ -amis.define("node_modules/flv.js/dist/flv",function(e,t,n,i){!function(e){if("object"==typeof t&&"undefined"!=typeof n)n.exports=e();else if("function"==typeof i&&i.amd)i([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.flvjs=e()}}(function(){var t;return function n(t,i,r){function s(o,u){if(!i[o]){if(!t[o]){var l="function"==typeof e&&e;if(!u&&l)return l(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var h=i[o]={exports:{}};t[o][0].call(h.exports,function(e){var n=t[o][1][e];return s(n?n:e)},h,h.exports,n,t,i,r)}return i[o].exports}for(var a="function"==typeof e&&e,o=0;oe;e+=2){var t=$[e],n=$[e+1];t(n),$[e]=void 0,$[e+1]=void 0}H=0}function c(){try{var e=Function("return this")().require("vertx");return K=e.runOnLoop||e.runOnContext,u()}catch(t){return h()}}function _(e,t){var n=this,i=new this.constructor(p);void 0===i[tt]&&M(i);var r=n._state;if(r){var s=arguments[r-1];W(function(){return I(r,i,s,n._result)})}else T(n,i,e,t);return i}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(p);return L(n,e),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(t){return st.error=t,st}}function E(e,t,n,i){try{e.call(t,n,i)}catch(r){return r}}function b(e,t,n){W(function(e){var i=!1,r=E(n,t,function(n){i||(i=!0,t!==n?L(e,n):A(e,n))},function(t){i||(i=!0,w(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,w(e,r))},e)}function S(e,t){t._state===it?A(e,t._result):t._state===rt?w(e,t._result):T(t,void 0,function(t){return L(e,t)},function(t){return w(e,t)})}function k(e,t,i){t.constructor===e.constructor&&i===_&&t.constructor.resolve===m?S(e,t):i===st?(w(e,st.error),st.error=null):void 0===i?A(e,t):n(i)?b(e,t,i):A(e,t)}function L(e,n){e===n?w(e,v()):t(n)?k(e,n,y(n)):A(e,n)}function R(e){e._onerror&&e._onerror(e._result),O(e)}function A(e,t){e._state===nt&&(e._result=t,e._state=it,0!==e._subscribers.length&&W(O,e))}function w(e,t){e._state===nt&&(e._state=rt,e._result=t,W(R,e))}function T(e,t,n,i){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+it]=n,r[s+rt]=i,0===s&&e._state&&W(O,e)}function O(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,s=e._result,a=0;as;s++)t.resolve(e[s]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function U(e){var t=this,n=new t(p);return w(n,e),n}function N(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function G(){var e=void 0;if("undefined"!=typeof s)e=s;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;if(n){var i=null;try{i=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===i&&!n.cast)return}e.Promise=ut}var V=void 0;V=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var z=V,H=0,K=void 0,q=void 0,W=function(e,t){$[H]=e,$[H+1]=t,H+=2,2===H&&(q?q(f):et())},X="undefined"!=typeof window?window:void 0,Y=X||{},Z=Y.MutationObserver||Y.WebKitMutationObserver,Q="undefined"==typeof self&&!1&&"[object process]"==={}.toString.call(r),J="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),et=void 0;et=Q?o():Z?l():J?d():void 0===X&&"function"==typeof e?c():h();var tt=Math.random().toString(36).substring(2),nt=void 0,it=1,rt=2,st={error:null},at=0,ot=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(p),this.promise[tt]||M(this.promise),z(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&A(this.promise,this._result))):w(this.promise,B())}return e.prototype._enumerate=function(e){for(var t=0;this._state===nt&&te||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,r,o,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(s(n))for(o=Array.prototype.slice.call(arguments,1),l=n.slice(),r=l.length,u=0;r>u;u++)l[u].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,a,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(o=a;o-->0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(e){if(d===setTimeout)return setTimeout(e,0);if((d===n||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){m&&c&&(m=!1,c.length?_=c.concat(_):p=-1,_.length&&o())}function o(){if(!m){var e=r(a);m=!0;for(var t=_.length;t;){for(c=_,_=[];++p1)for(var n=1;nl;l++){var h=u[l],f=r[h].exports;if(f===e||f&&f.default===e){o=h;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var c={},l=0,d=u.length;d>l;l++){var h=u[l];c[h]=h}i[o]=["function(require,module,exports){"+e+"(self); }",c]}var _=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[o]=o,i[_]=["function(require,module,exports){var f = require("+s(o)+");(f.default ? f.default : f)(self);}",m];var p={};a(_);var v="("+n+")({"+Object.keys(p).map(function(e){return s(e)+":["+i[e][0]+","+s(i[e][1])+"]"}).join(",")+"},{},["+s(_)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return y;var E=g.createObjectURL(y),b=new Worker(E);return b.objectURL=E,b}},{}],5:[function(e,t,n){"use strict";function i(){return Object.assign({},r)}Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=i;var r=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0}},{}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=s;){if(r=s+Math.floor((a-s)/2),r===i||t>=e[r]&&t0&&e[0].originalDts=s;){if(r=s+Math.floor((a-s)/2),r===i||e>=t[r].dts&&e=r;){if(i=r+Math.floor((s-r)/2),i===n||e>t[i].lastSample.originalDts&&e=t[i].lastSample.originalDts&&(i===t.length-1||i0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()}},{}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&(i+=";codecs="+n.codec);var r=!1;if(l.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])l.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else{r=!0;try{var s=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);s.addEventListener("error",this.e.onSourceBufferError),s.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(a){return l.default.e(this.TAG,a.message),void this._emitter.emit(c.default.ERROR,{code:a.code,msg:a.message})}}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),h.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(){for(var e in this._sourceBuffers)if(this._sourceBuffers[e]){var t=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{t.abort()}catch(n){l.default.e(this.TAG,n.message)}this._idrList.clear();var i=this._pendingSegments[e];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,s=0;s=a&&o+3>e){if(e-a>=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:a,end:u})}}else e>o&&(r=!0,this._pendingRemoveRanges[t].push({start:a,end:o}))}r&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(l.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3,s=Math.abs(i-r);s>.1&&(l.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(a){this._pendingSegments[t].unshift(n),22===a.code?(this._isBufferFull||this._emitter.emit(c.default.BUFFER_FULL),this._isBufferFull=!0):(l.default.e(this.TAG,a.message),this._emitter.emit(c.default.ERROR,{code:a.code,msg:a.message}))}}}},{key:"_onSourceOpen",value:function(){if(l.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(c.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){l.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){l.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(c.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){l.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();n.default=p},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};n.default=i},{}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}); -var s=function(){function e(e,t){for(var n=0;n0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=m.default.probe(e)).match){this._demuxer=new m.default(i,this._config),this._remuxer||(this._remuxer=new v.default(this._config));var s=this._mediaDataSource;void 0==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,l.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(k.default.DEMUX_ERROR,y.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,c.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,c.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(k.default.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(k.default.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e,n=t+1;n0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(k.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(k.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(k.default.STATISTICS_INFO,e)}}]),e}());n.default=L},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};n.default=i},{}],14:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var r=e("../utils/logger.js"),s=(i(r),e("../utils/logging-control.js")),a=i(s),o=e("../utils/polyfill.js"),u=i(o),l=e("./transmuxing-controller.js"),d=i(l),h=e("./transmuxing-events.js"),f=i(h),c=function(e){function t(t,n){var i={msg:f.default.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function n(t,n){var i={msg:f.default.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function i(){var t={msg:f.default.LOADING_COMPLETE};e.postMessage(t)}function r(){var t={msg:f.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function s(t){var n={msg:f.default.MEDIA_INFO,data:t};e.postMessage(n)}function o(t){var n={msg:f.default.METADATA_ARRIVED,data:t};e.postMessage(n)}function l(t){var n={msg:f.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function h(t){var n={msg:f.default.STATISTICS_INFO,data:t};e.postMessage(n)}function c(t,n){e.postMessage({msg:f.default.IO_ERROR,data:{type:t,info:n}})}function _(t,n){e.postMessage({msg:f.default.DEMUX_ERROR,data:{type:t,info:n}})}function m(t){e.postMessage({msg:f.default.RECOMMEND_SEEKPOINT,data:t})}function p(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}var v=null,g=p.bind(this);u.default.install(),e.addEventListener("message",function(u){switch(u.data.cmd){case"init":v=new d.default(u.data.param[0],u.data.param[1]),v.on(f.default.IO_ERROR,c.bind(this)),v.on(f.default.DEMUX_ERROR,_.bind(this)),v.on(f.default.INIT_SEGMENT,t.bind(this)),v.on(f.default.MEDIA_SEGMENT,n.bind(this)),v.on(f.default.LOADING_COMPLETE,i.bind(this)),v.on(f.default.RECOVERED_EARLY_EOF,r.bind(this)),v.on(f.default.MEDIA_INFO,s.bind(this)),v.on(f.default.METADATA_ARRIVED,o.bind(this)),v.on(f.default.SCRIPTDATA_ARRIVED,l.bind(this)),v.on(f.default.STATISTICS_INFO,h.bind(this)),v.on(f.default.RECOMMEND_SEEKPOINT,m.bind(this));break;case"destroy":v&&(v.destroy(),v=null),e.postMessage({msg:"destroyed"});break;case"start":v.start();break;case"stop":v.stop();break;case"seek":v.seek(u.data.param);break;case"pause":v.pause();break;case"resume":v.resume();break;case"logging_config":var p=u.data.param;a.default.applyConfig(p),p.enableCallback===!0?a.default.addLogListener(g):a.default.removeLogListener(g)}})};n.default=c},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ni)throw new d.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,n,i),s=e.parseValue(t,n+r.size,i-r.size),a=s.objectEnd;return{data:{name:r.data,value:s.data},size:r.size+s.size,objectEnd:a}}},{key:"parseVariable",value:function(t,n,i){return e.parseObject(t,n,i)}},{key:"parseString",value:function(e,t,n){if(2>n)throw new d.IllegalStateException("Data not enough when parse String");var i=new DataView(e,t,n),r=i.getUint16(0,!h),s=void 0;return s=r>0?l.default(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(4>n)throw new d.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n),r=i.getUint32(0,!h),s=void 0;return s=r>0?l.default(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}},{key:"parseDate",value:function(e,t,n){if(10>n)throw new d.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!h),s=i.getInt16(8,!h);return r+=60*s*1e3,{data:new Date(r),size:10}}},{key:"parseValue",value:function(t,n,i){if(1>i)throw new d.IllegalStateException("Data not enough when parse Value");var r=new DataView(t,n,i),s=1,a=r.getUint8(0),u=void 0,l=!1;try{switch(a){case 0:u=r.getFloat64(1,!h),s+=8;break;case 1:var f=r.getUint8(1);u=f?!0:!1,s+=1;break;case 2:var c=e.parseString(t,n+1,i-1);u=c.data,s+=c.size;break;case 3:u={};var _=0;for(9===(16777215&r.getUint32(i-4,!h))&&(_=3);i-4>s;){var m=e.parseObject(t,n+s,i-s-_);if(m.objectEnd)break;u[m.data.name]=m.data.value,s+=m.size}if(i-3>=s){var p=16777215&r.getUint32(s-1,!h);9===p&&(s+=3)}break;case 8:u={},s+=4;var v=0;for(9===(16777215&r.getUint32(i-4,!h))&&(v=3);i-8>s;){var g=e.parseVariable(t,n+s,i-s-v);if(g.objectEnd)break;u[g.data.name]=g.data.value,s+=g.size}if(i-3>=s){var y=16777215&r.getUint32(s-1,!h);9===y&&(s+=3)}break;case 9:u=void 0,s=1,l=!0;break;case 10:u=[];var E=r.getUint32(1,!h);s+=4;for(var b=0;E>b;b++){var S=e.parseValue(t,n+s,i-s);u.push(S.data),s+=S.size}break;case 11:var k=e.parseDate(t,n+1,i-1);u=k.data,s+=k.size;break;case 12:var L=e.parseString(t,n+1,i-1);u=L.data,s+=L.size;break;default:s=i,o.default.w("AMF","Unsupported AMF value type "+a)}}catch(R){o.default.e("AMF",R.toString())}return{data:u,size:s,objectEnd:l}}}]),e}();n.default=f},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};n.default=i},{}],17:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=e)throw new s.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new s.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var r=Math.min(i,this._current_word_bits_left),a=this._current_word>>>32-r;return this._current_word<<=r,this._current_word_bits_left-=r,n=n<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();n.default=a},{"../utils/exception.js":40}],18:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}Object.defineProperty(n,"__esModule",{value:!0});var a="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},o=function(){function e(e,t){for(var n=0;n13))return 0;var s=e.probe(t);i=s.dataOffset}if(this._firstParse){this._firstParse=!1,n+i!==this._dataOffset&&l.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");var a=new DataView(t,i),o=a.getUint32(0,!r);0!==o&&l.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;it.byteLength)break;var d=u.getUint8(0),h=16777215&u.getUint32(0,!r);if(i+11+h+4>t.byteLength)break;if(8===d||9===d||18===d){var f=u.getUint8(4),c=u.getUint8(5),_=u.getUint8(6),m=u.getUint8(7),p=_|c<<8|f<<16|m<<24,v=16777215&u.getUint32(7,!r);0!==v&&l.default.w(this.TAG,"Meet tag which has StreamID != 0!");var y=i+11;switch(d){case 8:this._parseAudioData(t,y,h,p);break;case 9:this._parseVideoData(t,y,h,p,n+i);break;case 18:this._parseScriptData(t,y,h)}var E=u.getUint32(11+h,!r);E!==11+h&&l.default.w(this.TAG,"Invalid PrevTagSize "+E),i+=11+h+4}else l.default.w(this.TAG,"Unsupported tag type "+d+", skipped"),i+=11+h+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var i=h.default.parseScriptData(e,t,n);if(i.hasOwnProperty("onMetaData")){if(null==i.onMetaData||"object"!==a(i.onMetaData))return void l.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&l.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=i;var r=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},r)),"boolean"==typeof r.hasAudio&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=r.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof r.hasVideo&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=r.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof r.audiodatarate&&(this._mediaInfo.audioDataRate=r.audiodatarate),"number"==typeof r.videodatarate&&(this._mediaInfo.videoDataRate=r.videodatarate),"number"==typeof r.width&&(this._mediaInfo.width=r.width),"number"==typeof r.height&&(this._mediaInfo.height=r.height),"number"==typeof r.duration){if(!this._durationOverrided){var s=Math.floor(r.duration*this._timescale);this._duration=s,this._mediaInfo.duration=s}}else this._mediaInfo.duration=0;if("number"==typeof r.framerate){var o=Math.floor(1e3*r.framerate);if(o>0){var u=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===a(r.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var d=r.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),r.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=r,l.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(i).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},i))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i=n)return void l.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(this._hasAudioFlagOverrided!==!0||this._hasAudio!==!1){var r=(this._littleEndian,new DataView(e,t,n)),s=r.getUint8(0),a=s>>>4;if(2!==a&&10!==a)return void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);var o=0,u=(12&s)>>>2;if(!(u>=0&&4>=u))return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);o=this._flvSoundRateTable[u];var d=1&s,h=this._audioMetadata,f=this._audioTrack;if(h||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),h=this._audioMetadata={},h.type="audio",h.id=f.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=o,h.channelCount=0===d?1:2),10===a){var c=this._parseAACAudioData(e,t+1,n-1);if(void 0==c)return;if(0===c.packetType){h.config&&l.default.w(this.TAG,"Found another AudioSpecificConfig!");var _=c.data;h.audioSampleRate=_.samplingRate,h.channelCount=_.channelCount,h.codec=_.codec,h.originalCodec=_.originalCodec,h.config=_.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",h); -var p=this._mediaInfo;p.audioCodec=h.originalCodec,p.audioSampleRate=h.audioSampleRate,p.audioChannelCount=h.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===c.packetType){var v=this._timestampBase+i,g={unit:c.data,length:c.data.byteLength,dts:v,pts:v};f.samples.push(g),f.length+=c.data.length}else l.default.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===a){if(!h.codec){var y=this._parseMP3AudioData(e,t+1,n-1,!0);if(void 0==y)return;h.audioSampleRate=y.samplingRate,h.channelCount=y.channelCount,h.codec=y.codec,h.originalCodec=y.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);var E=this._mediaInfo;E.audioCodec=h.codec,E.audioSampleRate=h.audioSampleRate,E.audioChannelCount=h.channelCount,E.audioDataRate=y.bitRate,E.hasVideo?null!=E.videoCodec&&(E.mimeType='video/x-flv; codecs="'+E.videoCodec+","+E.audioCodec+'"'):E.mimeType='video/x-flv; codecs="'+E.audioCodec+'"',E.isComplete()&&this._onMediaInfo(E)}var b=this._parseMP3AudioData(e,t+1,n-1,!1);if(void 0==b)return;var S=this._timestampBase+i,k={unit:b,length:b.byteLength,dts:S,pts:S};f.samples.push(k),f.length+=b.length}}}},{key:"_parseAACAudioData",value:function(e,t,n){if(1>=n)return void l.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],i.data=0===r[0]?this._parseAACAudioSpecificConfig(e,t+1,n-1):r.subarray(1),i}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i=new Uint8Array(e,t,n),r=null,s=0,a=0,o=null,u=0,l=null;if(s=a=i[0]>>>3,u=(7&i[0])<<1|i[1]>>>7,0>u||u>=this._mpegSamplingRates.length)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");var d=this._mpegSamplingRates[u],h=(120&i[1])>>>3;if(0>h||h>=8)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===s&&(l=(7&i[1])<<1|i[2]>>>7,o=(124&i[2])>>>2);var f=self.navigator.userAgent.toLowerCase();return-1!==f.indexOf("firefox")?u>=6?(s=5,r=new Array(4),l=u-3):(s=2,r=new Array(2),l=u):-1!==f.indexOf("android")?(s=2,r=new Array(2),l=u):(s=5,l=u,r=new Array(4),u>=6?l=u-3:1===h&&(s=2,r=new Array(2),l=u)),r[0]=s<<3,r[0]|=(15&u)>>>1,r[1]=(15&u)<<7,r[1]|=(15&h)<<3,5===s&&(r[1]|=(15&l)>>>1,r[2]=(1&l)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:d,channelCount:h,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+a}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(4>n)return void l.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");var r=(this._littleEndian,new Uint8Array(e,t,n)),s=null;if(i){if(255!==r[0])return;var a=r[1]>>>3&3,o=(6&r[1])>>1,u=(240&r[2])>>>4,d=(12&r[2])>>>2,h=r[3]>>>6&3,f=3!==h?2:1,c=0,_=0,m=34,p="mp3";switch(a){case 0:c=this._mpegAudioV25SampleRateTable[d];break;case 2:c=this._mpegAudioV20SampleRateTable[d];break;case 3:c=this._mpegAudioV10SampleRateTable[d]}switch(o){case 1:m=34,u=n)return void l.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(this._hasVideoFlagOverrided!==!0||this._hasVideo!==!1){var s=new Uint8Array(e,t,n)[0],a=(240&s)>>>4,o=15&s;return 7!==o?void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o):void this._parseAVCVideoPacket(e,t+1,n-1,i,r,a)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,s){if(4>n)return void l.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");var a=this._littleEndian,o=new DataView(e,t,n),u=o.getUint8(0),d=16777215&o.getUint32(0,!a),h=d<<8>>8;if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===u)this._parseAVCVideoData(e,t+4,n-4,i,r,s,h);else if(2!==u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(7>n)return void l.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");var i=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,a=new DataView(e,t,n);i?"undefined"!=typeof i.avcc&&l.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),i=this._videoMetadata={},i.type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);{var o=a.getUint8(0),u=a.getUint8(1);a.getUint8(2),a.getUint8(3)}if(1!==o||0===u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=(3&a.getUint8(4))+1,3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(m.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var d=31&a.getUint8(5);if(0===d)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");d>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);for(var h=6,f=0;d>f;f++){var _=a.getUint16(h,!s);if(h+=2,0!==_){var p=new Uint8Array(e,t+h,_);h+=_;var v=c.default.parseSPS(p);if(0===f){i.codecWidth=v.codec_size.width,i.codecHeight=v.codec_size.height,i.presentWidth=v.present_size.width,i.presentHeight=v.present_size.height,i.profile=v.profile_string,i.level=v.level_string,i.bitDepth=v.bit_depth,i.chromaFormat=v.chroma_format,i.sarRatio=v.sar_ratio,i.frameRate=v.frame_rate,(v.frame_rate.fixed===!1||0===v.frame_rate.fps_num||0===v.frame_rate.fps_den)&&(i.frameRate=this._referenceFrameRate);var g=i.frameRate.fps_den,y=i.frameRate.fps_num;i.refSampleDuration=i.timescale*(g/y);for(var E=p.subarray(1,4),b="avc1.",S=0;3>S;S++){var k=E[S].toString(16);k.length<2&&(k="0"+k),b+=k}i.codec=b;var L=this._mediaInfo;L.width=i.codecWidth,L.height=i.codecHeight,L.fps=i.frameRate.fps,L.profile=i.profile,L.level=i.level,L.refFrames=v.ref_frames,L.chromaFormat=v.chroma_format_string,L.sarNum=i.sarRatio.width,L.sarDen=i.sarRatio.height,L.videoCodec=b,L.hasAudio?null!=L.audioCodec&&(L.mimeType='video/x-flv; codecs="'+L.videoCodec+","+L.audioCodec+'"'):L.mimeType='video/x-flv; codecs="'+L.videoCodec+'"',L.isComplete()&&this._onMediaInfo(L)}}}var R=a.getUint8(h);if(0===R)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");R>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+R),h++;for(var A=0;R>A;A++){var w=a.getUint16(h,!s);h+=2,0!==w&&(h+=w)}i.avcc=new Uint8Array(n),i.avcc.set(new Uint8Array(e,t,n),0),l.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",i)}},{key:"_parseAVCVideoData",value:function(e,t,n,i,r,s,a){for(var o=this._littleEndian,u=new DataView(e,t,n),d=[],h=0,f=0,c=this._naluLengthSize,_=this._timestampBase+i,m=1===s;n>f;){if(f+4>=n){l.default.w(this.TAG,"Malformed Nalu near timestamp "+_+", offset = "+f+", dataSize = "+n);break}var p=u.getUint32(f,!o);if(3===c&&(p>>>=8),p>n-c)return void l.default.w(this.TAG,"Malformed Nalus near timestamp "+_+", NaluSize > DataSize!");var v=31&u.getUint8(f+c);5===v&&(m=!0);var g=new Uint8Array(e,t+f,c+p),y={type:v,data:g};d.push(y),h+=g.byteLength,f+=c+p}if(d.length){var E=this._videoTrack,b={units:d,length:h,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(b.fileposition=r),E.samples.push(b),E.length+=h}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i=(4&t[4])>>>2!==0,r=0!==(1&t[4]),a=s(t,5);return 9>a?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:r}}}]),e}();n.default=y},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ns;s++)s>=2&&3===t[s]&&0===t[s-1]&&0===t[s-2]||(i[r]=t[s],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new o.default(n);i.readByte();var r=i.readByte();i.readByte();var s=i.readByte();i.readUEG();var a=e.getProfileString(r),u=e.getLevelString(s),l=1,d=420,h=[0,420,422,444],f=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(l=i.readUEG(),3===l&&i.readBits(1),3>=l&&(d=h[l]),f=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var c=3!==l?8:12,_=0;c>_;_++)i.readBool()&&(6>_?e._skipScalingList(i,16):e._skipScalingList(i,64));i.readUEG();var m=i.readUEG();if(0===m)i.readUEG();else if(1===m){i.readBits(1),i.readSEG(),i.readSEG();for(var p=i.readUEG(),v=0;p>v;v++)i.readSEG()}var g=i.readUEG();i.readBits(1);var y=i.readUEG(),E=i.readUEG(),b=i.readBits(1);0===b&&i.readBits(1),i.readBits(1);var S=0,k=0,L=0,R=0,A=i.readBool();A&&(S=i.readUEG(),k=i.readUEG(),L=i.readUEG(),R=i.readUEG());var w=1,T=1,O=0,C=!0,I=0,D=0,x=i.readBool();if(x){if(i.readBool()){var M=i.readByte(),B=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],j=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];M>0&&16>M?(w=B[M-1],T=j[M-1]):255===M&&(w=i.readByte()<<8|i.readByte(),T=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var P=i.readBits(32),U=i.readBits(32);C=i.readBool(),I=U,D=2*P,O=I/D}}var N=1;(1!==w||1!==T)&&(N=w/T);var F=0,G=0;if(0===l)F=1,G=2-b;else{var V=3===l?1:2,z=1===l?2:1;F=V,G=z*(2-b)}var H=16*(y+1),K=16*(2-b)*(E+1);H-=(S+k)*F,K-=(L+R)*G;var q=Math.ceil(H*N);return i.destroy(),i=null,{profile_string:a,level_string:u,bit_depth:f,ref_frames:g,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:C,fps:O,fps_den:D,fps_num:I},sar_ratio:{width:w,height:T},codec_size:{width:H,height:K},present_size:{width:q,height:K}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0,s=0;t>s;s++)0!==i&&(r=e.readSEG(),i=(n+r+256)%256),n=0===i?n:i}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();n.default=u},{"./exp-golomb.js":17}],20:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){var n=e;if(null==n||"object"!==("undefined"==typeof n?"undefined":o(n)))throw new S.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new S.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new _.default(n,t);default:return new p.default(n,t)}}function s(){return h.default.supportMSEH264Playback()}function a(){return h.default.getFeatureList()}Object.defineProperty(n,"__esModule",{value:!0});var o="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},u=e("./utils/polyfill.js"),l=i(u),d=e("./core/features.js"),h=i(d),f=e("./io/loader.js"),c=e("./player/flv-player.js"),_=i(c),m=e("./player/native-player.js"),p=i(m),v=e("./player/player-events.js"),g=i(v),y=e("./player/player-errors.js"),E=e("./utils/logging-control.js"),b=i(E),S=e("./utils/exception.js");l.default.install();var k={};k.createPlayer=r,k.isSupported=s,k.getFeatureList=a,k.BaseLoader=f.BaseLoader,k.LoaderStatus=f.LoaderStatus,k.LoaderErrors=f.LoaderErrors,k.Events=g.default,k.ErrorTypes=y.ErrorTypes,k.ErrorDetails=y.ErrorDetails,k.FlvPlayer=_.default,k.NativePlayer=p.default,k.LoggingControl=b.default,Object.defineProperty(k,"version",{enumerable:!0,get:function(){return"1.5.0"}}),n.default=k},{"./core/features.js":6,"./io/loader.js":24,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(e,t){"use strict";t.exports=e("./flv.js").default},{"./flv.js":20}],22:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}Object.defineProperty(n,"__esModule",{value:!0});var o="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},u=function p(e,t,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:p(r,t,n)}if("value"in i)return i.value;var s=i.get;return void 0===s?void 0:s.call(n)},l=function(){function e(e,t){for(var n=0;n=15048,t=f.default.msedge?e:!0;return self.fetch&&self.ReadableStream&&t}catch(n){return!1}}}]),l(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var r=this._seekHandler.getConfig(i,t),s=new self.Headers;if("object"===o(r.headers)){var a=r.headers;for(var u in a)a.hasOwnProperty(u)&&s.append(u,a[u])}var l={method:"GET",headers:s,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===o(this._config.headers))for(var d in this._config.headers)s.append(d,this._config.headers[d]);e.cors===!1&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=c.LoaderStatus.kConnecting,self.fetch(r.url,l).then(function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=c.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==r.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=c.LoaderStatus.kError,!n._onError)throw new _.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(c.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(n._status=c.LoaderStatus.kError,!n._onError)throw e;n._onError(c.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,n.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new l.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return s(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new b.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new k.default(t,n)}else{if("custom"!==e.seekType)throw new L.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new L.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=y.default;else if(f.default.isSupported())this._loaderClass=f.default;else if(_.default.isSupported())this._loaderClass=_.default;else{if(!v.default.isSupported())throw new L.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=v.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new L.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;e>t+1048576;)t*=2;if(t+=1048576,t!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed),r=new Uint8Array(n,0,t);r.set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,s=n;if(e=r;){if(i=r+Math.floor((s-r)/2),i===n||e>=t[i]&&ee?e:e>=512&&1024>=e?Math.floor(1.5*e):2*e,t>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize0){var a=this._stashBuffer.slice(0,this._stashUsed),o=this._dispatchChunks(a,this._stashByteStart);if(o0){var u=new Uint8Array(a,o);s.set(u,0),this._stashUsed=u.byteLength,this._stashByteStart+=o}}else this._stashUsed=0,this._stashByteStart+=o;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),s=new Uint8Array(this._stashBuffer,0,this._bufferSize)),s.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var l=this._dispatchChunks(e,t);if(lthis._bufferSize&&(this._expandBuffer(d),s=new Uint8Array(this._stashBuffer,0,this._bufferSize)),s.set(new Uint8Array(e,l),0),this._stashUsed+=d,this._stashByteStart=t+l}}}else if(0===this._stashUsed){var h=this._dispatchChunks(e,t);if(hthis._bufferSize&&this._expandBuffer(f);var c=new Uint8Array(this._stashBuffer,0,this._bufferSize);c.set(new Uint8Array(e,h),0),this._stashUsed+=f,this._stashByteStart=t+h}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var _=new Uint8Array(this._stashBuffer,0,this._bufferSize);_.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var m=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(m0){var p=new Uint8Array(this._stashBuffer,m);_.set(p,0)}this._stashUsed-=m,this._stashByteStart+=m}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n0){var r=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,n);r.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=n}return 0}o.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(o.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case d.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0)for(var s=n.split("&"),a=0;a0;o[0]!==this._startName&&o[0]!==this._endName&&(u&&(r+="&"),r+=s[a])}return 0===r.length?t:t+"?"+r}}]),e}();n.default=s},{}],26:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();n.default=s},{}],28:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}Object.defineProperty(n,"__esModule",{value:!0});var o=function c(e,t,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:c(r,t,n)}if("value"in i)return i.value;var s=i.get;return void 0===s?void 0:s.call(n)},u=function(){function e(e,t){for(var n=0;n299)){if(this._status=f.LoaderStatus.kError,!this._onError)throw new c.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(f.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=f.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==f.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(){return this._requestAbort===!0?void(this._requestAbort=!1):void(this._status!==f.LoaderStatus.kError&&(this._status=f.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)))}},{key:"_onXhrError",value:function(e){this._status=f.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded=200&&t.status<=299){if(this._status=f.LoaderStatus.kBuffering,void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=f.LoaderStatus.kError,!this._onError)throw new c.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(f.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=f.LoaderStatus.kBuffering;var s=t.response;this._reader.readAsArrayBuffer(s)}}},{key:"_xhrOnError",value:function(e){this._status=f.LoaderStatus.kError;var t=f.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new c.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target,n=t.result;if(null==n)return void this._doReconnectIfNeeded();var i=n.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=n.byteLength;var r=this._totalRange.from+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),n.byteLength>=this._bufferLimit&&(h.default.v(this.TAG,"MSStream buffer exceeded max size near "+(r+i.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?n=this._currentRedirectedURL:void 0!=e.redirectedURL&&(n=e.redirectedURL));var i=this._seekHandler.getConfig(n,t);this._currentRequestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===o(i.headers)){var s=i.headers;for(var a in s)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a])}if("object"===o(this._config.headers)){var u=this._config.headers;for(var l in u)u.hasOwnProperty(l)&&r.setRequestHeader(l,u[l])}r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=_.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=_.LoaderStatus.kBuffering}else{if(this._status=_.LoaderStatus.kError,!this._onError)throw new m.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(_.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==_.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(this._contentLength=-1===this._range.to?this._totalLength-this._range.from:this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,s=n;if(e=r;){if(i=r+Math.floor((s-r)/2),i===n||e>=t[i]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var s=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new p.default(this._mediaDataSource,this._config),this._transmuxer.on(g.default.INIT_SEGMENT,function(t,n){e._msectl.appendInitSegment(n)}),this._transmuxer.on(g.default.MEDIA_SEGMENT,function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(d.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(g.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter.emit(_.default.LOADING_COMPLETE)}),this._transmuxer.on(g.default.RECOVERED_EARLY_EOF,function(){e._emitter.emit(_.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(g.default.IO_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.NETWORK_ERROR,t,n)}),this._transmuxer.on(g.default.DEMUX_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})}),this._transmuxer.on(g.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter.emit(_.default.MEDIA_INFO,Object.assign({},t))}),this._transmuxer.on(g.default.METADATA_ARRIVED,function(t){e._emitter.emit(_.default.METADATA_ARRIVED,t)}),this._transmuxer.on(g.default.SCRIPTDATA_ARRIVED,function(t){e._emitter.emit(_.default.SCRIPTDATA_ARRIVED,t)}),this._transmuxer.on(g.default.STATISTICS_INFO,function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(_.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))}),this._transmuxer.on(g.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0,r=0;r=s&&a>t){n=s,i=a;break}}i>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(d.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){d.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i=r&&s>e){e>=s-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(d.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n=i&&r>e)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,i=0;if(1>e&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(1>r&&r>e||f.default.safari)&&(n=!0,i=f.default.safari?.1:r)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=i;else if(t){if(this._alwaysSeekKeyframe){var s=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=s?s.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTimee&&t.length>0){var n=t.start(0);if(1>n&&n>e||f.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=f.default.safari?.1:n)}if(this._isTimepointBuffered(e)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*e));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}return void(null!=this._progressChecker&&this._checkProgressAndResume())}this._seekpointRecord={seekPoint:e,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),e}();n.default=A},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s="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},a=function(){function e(e,t){for(var n=0;n0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(d.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(d.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();n.default=c},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;{var r=e("../io/loader.js"),s=e("../demux/demux-errors.js"),a=i(s);n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:r.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:a.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:a.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:a.default.CODEC_UNSUPPORTED}}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};n.default=i},{}],36:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ns;s++)t+=i[s].byteLength;n=new Uint8Array(t),n[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var a=8,o=0;r>o;o++)n.set(i[o],a),a+=i[o].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),i=e.moov(t),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(n,0),r.set(i,n.byteLength),r}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),i=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,n,i,r)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,s=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,s>>>8&255,255&s,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){var t=e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF));return t}},{key:"stbl",value:function(t){var n=e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO));return n}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,s,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.sdtp(t),o=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,s,o,a)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),s=0;i>s;s++){var a=n[s].flags;r[s+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return e.box(e.types.sdtp,r)}},{key:"trun",value:function(t,n){var i=t.samples||[],r=i.length,s=12+16*r,a=new Uint8Array(s);n+=8+s,a.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var o=0;r>o;o++){var u=i[o].duration,l=i[o].size,d=i[o].flags,h=i[o].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,a)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();s.init(),n.default=s},{}],38:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&(y=i.pop(),g-=y.length),null!=this._audioStashedLastSample){var E=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(E),g+=E.length}null!=y&&(this._audioStashedLastSample=y);var b=i[0].dts-this._dtsBase;if(this._audioNextDts)r=b-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(b);if(null!=S){var k=b-(S.originalDts+S.duration);3>=k&&(k=0);var L=S.dts+S.duration+k;r=b-L}else r=0}if(m){var R=b-r,A=this._videoSegmentInfoList.getLastSegmentBefore(b);if(null!=A&&A.beginDts=1?C[C.length-1].duration:Math.floor(u);var N=!1,F=null;if(j>1.5*u&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!c.default.safari){N=!0;var G=Math.abs(j-u),V=Math.ceil(G/u),z=B+u;o.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+("dts: "+(B+j)+" ms, expected: "+(B+Math.round(u))+" ms, ")+("delta: "+Math.round(G)+" ms, generate: "+V+" frames"));var H=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==H&&(o.default.w(this.TAG,"Unable to generate silent frame for "+(this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame")),H=x),F=[];for(var K=0;V>K;K++){var q=Math.round(z);if(F.length>0){var W=F[F.length-1];W.duration=q-W.dts}var X={dts:q,pts:q,cts:0,unit:H,size:H.byteLength,duration:0,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};F.push(X),g+=X.size,z+=u}var Y=F[F.length-1];Y.duration=B+j-Y.dts,j=Math.round(u)}C.push({dts:B,pts:B,cts:0,unit:D.unit,size:D.unit.byteLength,duration:j,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),N&&C.push.apply(C,F)}d?v=new Uint8Array(g):(v=new Uint8Array(g),v[0]=g>>>24&255,v[1]=g>>>16&255,v[2]=g>>>8&255,v[3]=255&g,v.set(l.default.types.mdat,4));for(var Z=0;Z1&&(c=i.pop(),f-=c.length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,i.unshift(m),f+=m.length}null!=c&&(this._videoStashedLastSample=c);var p=i[0].dts-this._dtsBase;if(this._videoNextDts)r=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{var v=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=v){var g=p-(v.originalDts+v.duration);3>=g&&(g=0);var y=v.dts+v.duration+g;r=p-y}else r=0}for(var E=new _.MediaSegmentInfo,b=[],S=0;S=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(R){var D=new _.SampleInfo(A,T,O,k.dts,!0);D.fileposition=k.fileposition,E.appendSyncPoint(D)}b.push({dts:A,pts:T,cts:w,units:k.units,size:k.length,isKeyframe:R,duration:O,originalDts:L,flags:{isLeading:0,dependsOn:R?2:1,isDependedOn:R?1:0,hasRedundancy:0,isNonSync:R?0:1}})}h=new Uint8Array(f),h[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255,h[3]=255&f,h.set(l.default.types.mdat,4);for(var x=0;x=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},s={};if(i.browser){s[i.browser]=!0;var a=i.majorVersion.split(".");s.version={major:parseInt(i.majorVersion,10),string:i.version},a.length>1&&(s.version.minor=parseInt(a[1],10)),a.length>2&&(s.version.build=parseInt(a[2],10))}if(i.platform&&(s[i.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),s.rv||s.iemobile){s.rv&&delete s.rv;var o="msie";i.browser=o,s[o]=!0}if(s.edge){delete s.edge;var u="msedge";i.browser=u,s[u]=!0}if(s.opr){var l="opera";i.browser=l,s[l]=!0}if(s.safari&&s.android){var d="android";i.browser=d,s[d]=!0}s.name=i.browser,s.platform=i.platform;for(var h in r)r.hasOwnProperty(h)&&delete r[h];Object.assign(r,s)}Object.defineProperty(n,"__esModule",{value:!0});var r={};i(),n.default=r},{}],40:[function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});{var a=function(){function e(e,t){for(var n=0;n "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){(!t||e.FORCE_GLOBAL_TAG)&&(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){(!t||e.FORCE_GLOBAL_TAG)&&(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){(!t||e.FORCE_GLOBAL_TAG)&&(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){(!t||e.FORCE_GLOBAL_TAG)&&(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();u.GLOBAL_TAG="flv.js",u.FORCE_GLOBAL_TAG=!1,u.ENABLE_ERROR=!0,u.ENABLE_INFO=!0,u.ENABLE_WARN=!0,u.ENABLE_DEBUG=!0,u.ENABLE_VERBOSE=!0,u.ENABLE_CALLBACK=!1,u.emitter=new o.default,n.default=u},{events:2}],42:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){l.default.emitter.addListener("log",t),l.default.emitter.listenerCount("log")>0&&(l.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){l.default.emitter.removeListener("log",t),0===l.default.emitter.listenerCount("log")&&(l.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return l.default.FORCE_GLOBAL_TAG},set:function(t){l.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return l.default.GLOBAL_TAG},set:function(t){l.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return l.default.ENABLE_VERBOSE&&l.default.ENABLE_DEBUG&&l.default.ENABLE_INFO&&l.default.ENABLE_WARN&&l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_VERBOSE=t,l.default.ENABLE_DEBUG=t,l.default.ENABLE_INFO=t,l.default.ENABLE_WARN=t,l.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return l.default.ENABLE_DEBUG},set:function(t){l.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return l.default.ENABLE_VERBOSE},set:function(t){l.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return l.default.ENABLE_INFO},set:function(t){l.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return l.default.ENABLE_WARN},set:function(t){l.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();d.emitter=new o.default,n.default=d},{"./logger.js":41,events:2}],43:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nr;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(i(n,r,1)){var a=(31&n[r])<<6|63&n[r+1];if(a>=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!==(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var u=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(u>65536&&1114112>u){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},{}]},{},[21])(21)})}); \ No newline at end of file diff --git a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_674f50d.eot b/gh-pages/n/font-awesome/fonts/fontawesome-webfont_674f50d.eot deleted file mode 100644 index e9f60ca9..00000000 Binary files a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_674f50d.eot and /dev/null differ diff --git a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_912ec66.svg b/gh-pages/n/font-awesome/fonts/fontawesome-webfont_912ec66.svg deleted file mode 100644 index 855c845e..00000000 --- a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_912ec66.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_af7ae50.woff2 b/gh-pages/n/font-awesome/fonts/fontawesome-webfont_af7ae50.woff2 deleted file mode 100644 index 4d13fc60..00000000 Binary files a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_af7ae50.woff2 and /dev/null differ diff --git a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_b06871f.ttf b/gh-pages/n/font-awesome/fonts/fontawesome-webfont_b06871f.ttf deleted file mode 100644 index 35acda2f..00000000 Binary files a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_b06871f.ttf and /dev/null differ diff --git a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_fee66e7.woff b/gh-pages/n/font-awesome/fonts/fontawesome-webfont_fee66e7.woff deleted file mode 100644 index 400014a4..00000000 Binary files a/gh-pages/n/font-awesome/fonts/fontawesome-webfont_fee66e7.woff and /dev/null differ diff --git a/gh-pages/n/hls.js/dist/hls_a1c9175.js b/gh-pages/n/hls.js/dist/hls_a1c9175.js deleted file mode 100644 index c1441890..00000000 --- a/gh-pages/n/hls.js/dist/hls_a1c9175.js +++ /dev/null @@ -1,9 +0,0 @@ -amis.define("node_modules/hls.js/dist/hls",function(e,t,r,i){"undefined"!=typeof window&&function(e,a){"object"==typeof t&&"object"==typeof r?r.exports=a():"function"==typeof i&&i.amd?i([],a):"object"==typeof t?t.Hls=a():e.Hls=a()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)t.d(i,a,function(t){return e[t]}.bind(null,a));return i},t.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s="./src/hls.js")}({"./node_modules/eventemitter3/index.js":function(e){"use strict";function t(){}function r(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,i,a,n){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,a||e,n),l=o?o+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,r){0===--e._eventsCount?e._events=new t:delete e._events[r]}function n(){this._events=new t,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,o="~";Object.create&&(t.prototype=Object.create(null),(new t).__proto__||(o=!1)),n.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)s.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e){var t=o?o+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,n=new Array(a);a>i;i++)n[i]=r[i].fn;return n},n.prototype.listenerCount=function(e){var t=o?o+e:e,r=this._events[t];return r?r.fn?1:r.length:0},n.prototype.emit=function(e,t,r,i,a,n){var s=o?o+e:e;if(!this._events[s])return!1;var l,u,d=this._events[s],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,i),!0;case 5:return d.fn.call(d.context,t,r,i,a),!0;case 6:return d.fn.call(d.context,t,r,i,a,n),!0}for(u=1,l=new Array(c-1);c>u;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var f,h=d.length;for(u=0;h>u;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),c){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,r);break;case 4:d[u].fn.call(d[u].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(c-1);c>f;f++)l[f-1]=arguments[f];d[u].fn.apply(d[u].context,l)}}return!0},n.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},n.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},n.prototype.removeListener=function(e,t,r,i){var n=o?o+e:e;if(!this._events[n])return this;if(!t)return a(this,n),this;var s=this._events[n];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,n);else{for(var l=0,u=[],d=s.length;d>l;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[n]=1===u.length?u[0]:u:a(this,n)}return this},n.prototype.removeAllListeners=function(e){var r;return e?(r=o?o+e:e,this._events[r]&&a(this,r)):(this._events=new t,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=o,n.EventEmitter=n,e.exports=n},"./node_modules/node-libs-browser/node_modules/events/events.js":function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,i,s,o,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(i=this._events[e],n(i))return!1;if(r(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),i.apply(this,o)}else if(a(i))for(o=Array.prototype.slice.call(arguments,1),u=i.slice(),s=u.length,l=0;s>l;l++)u[l].apply(this,o);return!0},t.prototype.addListener=function(e,i){var s;if(!r(i))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(i.listener)?i.listener:i),this._events[e]?a(this._events[e])?this._events[e].push(i):this._events[e]=[this._events[e],i]:this._events[e]=i,a(this._events[e])&&!this._events[e].warned&&(s=n(this._maxListeners)?t.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function i(){this.removeListener(e,i),a||(a=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var a=!1;return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,n,s,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(i)){for(o=s;o-->0;)if(i[o]===t||i[o].listener&&i[o].listener===t){n=o;break}if(0>n)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],r(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},"./node_modules/url-toolkit/src/url-toolkit.js":function(e){!function(){var t=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,n={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),t=t.trim(),!t){if(!i.alwaysNormalize)return e;var a=n.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");return a.path=n.normalizePath(a.path),n.buildURLFromParts(a)}var s=n.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=n.normalizePath(s.path),n.buildURLFromParts(s)):t;var o=n.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(u.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var d=o.path,c=d.substring(0,d.lastIndexOf("/")+1)+s.path;u.path=n.normalizePath(c)}else u.path=o.path,s.params||(u.params=o.params,s.query||(u.query=o.query));return null===u.path&&(u.path=i.alwaysNormalize?n.normalizePath(s.path):s.path),n.buildURLFromParts(u)},parseURL:function(e){var r=t.exec(e);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=n}(this)},"./node_modules/webworkify-webpack/index.js":function(e,t,r){function i(e){function t(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t.oe=function(e){throw console.error(e),e};var i=t(t.s=ENTRY_MODULE);return i.default||i}function a(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(e){return!isNaN(1*e)}function s(e,t,i){var s={};s[i]=[];var o=t.toString(),l=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return s;for(var c,f=l[1],h=new RegExp("(\\\\n|\\W)"+a(f)+d,"g");c=h.exec(o);)"dll-reference"!==c[3]&&s[i].push(c[3]);for(h=new RegExp("\\("+a(f)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+d,"g");c=h.exec(o);)e[c[2]]||(s[i].push(c[1]),e[c[2]]=r(c[1]).m),s[c[2]]=s[c[2]]||[],s[c[2]].push(c[4]);for(var p=Object.keys(s),g=0;g0},!1)}function l(e,t){for(var r={main:[t]},i={main:[]},a={main:{}};o(r);)for(var n=Object.keys(r),l=0;l500*r.duration/c){var f=e.levels,h=Math.max(1,o.bw?o.bw/8:1e3*o.loaded/u),p=f[r.level],g=p.realBitrate?Math.max(p.realBitrate,p.bitrate):p.bitrate,v=o.total?o.total:Math.max(o.loaded,Math.round(r.duration*g/8)),m=t.currentTime,y=(v-o.loaded)/h,E=(s.BufferHelper.bufferInfo(t,m,e.config.maxBufferHole).end-m)/c;if(E<2*r.duration/c&&y>E){var _=void 0,T=void 0;for(T=r.level-1;T>n;T--){var S=f[T].realBitrate?Math.max(f[T].realBitrate,f[T].bitrate):f[T].bitrate;if(_=r.duration*S/(6.4*h),E>_)break}y>_&&(l.logger.warn("loading too slow, abort fragment loading and switch to level "+T+":fragLoadedDelay["+T+"]=0)return p;l.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var g=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay,v=i.abrBandWidthFactor,m=i.abrBandWidthUpFactor;if(0===h){var y=this.bitrateTestDelay;if(y){var E=u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay;g=E-y,l.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),v=m=1}}return p=this._findBestLevel(o,u,f,a,t,h+g,v,m,r),Math.max(p,0)},enumerable:!0,configurable:!0}),r.prototype._findBestLevel=function(e,t,r,i,a,n,s,o,u){for(var d=a;d>=i;d--){var c=u[d];if(c){var f=c.details,h=f?f.totalduration/f.fragments.length:t,p=f?f.live:!1,g=void 0;g=e>=d?s*r:o*r;var v=u[d].realBitrate?Math.max(u[d].realBitrate,u[d].bitrate):u[d].bitrate,m=v*h/g;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+d+"/"+Math.round(g)+"/"+v+"/"+h+"/"+n+"/"+m),g>v&&(!m||p&&!this.bitrateTestDelay||n>m))return d}}return-1},r}(n.default);t.default=c}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/audio-stream-controller.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/utils/binary-search.js"),n=r("./src/utils/buffer-helper.js"),s=r("./src/demux/demuxer.js"),o=r("./src/events.js"),l=r("./src/controller/level-helper.js"),u=r("./src/utils/time-ranges.js"),d=r("./src/errors.js"),c=r("./src/utils/logger.js"),f=r("./src/utils/discontinuities.js"),h=r("./src/controller/fragment-tracker.js"),p=r("./src/loader/fragment.js"),g=r("./src/controller/base-stream-controller.js"),v=window.performance,m=100,y=function(t){function r(e,r){var i=t.call(this,e,o.default.MEDIA_ATTACHED,o.default.MEDIA_DETACHING,o.default.AUDIO_TRACKS_UPDATED,o.default.AUDIO_TRACK_SWITCHING,o.default.AUDIO_TRACK_LOADED,o.default.KEY_LOADED,o.default.FRAG_LOADED,o.default.FRAG_PARSING_INIT_SEGMENT,o.default.FRAG_PARSING_DATA,o.default.FRAG_PARSED,o.default.ERROR,o.default.BUFFER_RESET,o.default.BUFFER_CREATED,o.default.BUFFER_APPENDED,o.default.BUFFER_FLUSHED,o.default.INIT_PTS_FOUND)||this;return i.fragmentTracker=r,i.config=e.config,i.audioCodecSwap=!1,i._state=g.State.STOPPED,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i}return i(r,t),r.prototype.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},r.prototype.onHandlerDestroyed=function(){this.state=g.State.STOPPED,this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},r.prototype.onInitPtsFound=function(e){var t=e.id,r=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[r]=i,this.videoTrackCC=r,c.logger.log("InitPTS for cc: "+r+" found from video track: "+i),this.state===g.State.WAITING_INIT_PTS&&this.tick())},r.prototype.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(m),this.fragLoadError=0,t>0&&-1===e?(c.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=g.State.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=g.State.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=g.State.STOPPED},r.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=g.State.STOPPED},Object.defineProperty(r.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("audio stream:"+t+"->"+e)}},enumerable:!0,configurable:!0}),r.prototype.doTick=function(){var t,r,i,s=this.hls,l=s.config;switch(this.state){case g.State.ERROR:case g.State.PAUSED:case g.State.BUFFER_FLUSHING:break;case g.State.STARTING:this.state=g.State.WAITING_TRACK,this.loadedmetadata=!1;break;case g.State.IDLE:var u=this.tracks;if(!u)break;if(!this.media&&(this.startFragRequested||!l.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(t=this.nextLoadPosition,void 0===t)break;var d=this.mediaBuffer?this.mediaBuffer:this.media,p=this.videoBuffer?this.videoBuffer:this.media,m=n.BufferHelper.bufferInfo(d,t,l.maxBufferHole),y=n.BufferHelper.bufferInfo(p,t,l.maxBufferHole),E=m.len,_=m.end,T=this.fragPrevious,S=Math.min(l.maxBufferLength,l.maxMaxBufferLength),b=Math.max(S,y.len),A=this.audioSwitch,R=this.trackId;if((b>E||A)&&Rt){if(!(m.end>w||m.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=w+.05}if(i.initSegment&&!i.initSegment.data)I=i.initSegment;else if(w>=_){if(I=D[0],null!==this.videoTrackCC&&I.cc!==this.videoTrackCC&&(I=f.findFragWithCC(D,this.videoTrackCC)),i.live&&I.loadIdx&&I.loadIdx===this.fragLoadIdx){var k=m.nextStart?m.nextStart:w;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(k+.05)),void(this.media.currentTime=k+.05)}}else{var P=void 0,C=l.maxFragLookUpTolerance,x=T?D[T.sn-D[0].sn+1]:void 0,F=function(e){var t=Math.min(C,e.duration);return e.start+e.duration-t<=_?1:e.start-t>_&&e.start?-1:0};O>_?(_>O-C&&(C=0),P=x&&!F(x)?x:a.default.search(D,F)):P=D[L-1],P&&(I=P,w=P.start,T&&I.level===T.level&&I.sn===T.sn&&(I.sn=N||j)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break;case g.State.WAITING_INIT_PTS:var U=this.videoTrackCC;if(void 0===this.initPTS[U])break;var B=this.waitingFragment;if(B){var G=B.frag.cc;U!==G?(r=this.tracks[this.trackId],r.details&&r.details.live&&(c.logger.warn("Waiting fragment CC ("+G+") does not match video track CC ("+U+")"),this.waitingFragment=null,this.state=g.State.IDLE)):(this.state=g.State.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=g.State.IDLE;break;case g.State.STOPPED:case g.State.FRAG_LOADING:case g.State.PARSING:case g.State.PARSED:case g.State.ENDED:}},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onAudioTracksUpdated=function(e){c.logger.log("audio tracks updated"),this.tracks=e.audioTracks},r.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=g.State.PAUSED,this.waitingFragment=null,t?this.setInterval(m):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=g.State.IDLE),this.tick()},r.prototype.onAudioTrackLoaded=function(t){var r=t.details,i=t.id,a=this.tracks[i],n=r.totalduration,s=0;if(c.logger.log("track "+i+" loaded ["+r.startSN+","+r.endSN+"],duration:"+n),r.live){var o=a.details;o&&r.fragments.length>0?(l.mergeDetails(o,r),s=r.fragments[0].start,c.logger.log(r.PTSKnown?"live audio playlist sliding:"+s.toFixed(3):"live audio playlist - outdated PTS, unknown sliding")):(r.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding"))}else r.PTSKnown=!1;if(a.details=r,!this.startFragRequested){if(-1===this.startPosition){var u=r.startTimeOffset;e.isFinite(u)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===g.State.WAITING_TRACK&&(this.state=g.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag;if(this.state===g.State.FRAG_LOADING&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,l=t.level,u=t.sn,d=t.cc,f=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",h=this.stats=e.stats;if("initSegment"===u)this.state=g.State.IDLE,h.tparsed=h.tbuffered=v.now(),a.initSegment.data=e.payload,this.hls.trigger(o.default.FRAG_BUFFERED,{stats:h,frag:t,id:"audio"}),this.tick();else{this.state=g.State.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new s.default(this.hls,"audio"));var p=this.initPTS[d],m=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==p){this.pendingBuffering=!0,c.logger.log("Demuxing "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+l);var y=!1;this.demuxer.push(e.payload,m,f,null,t,n,y,p)}else c.logger.log("unknown video PTS for continuity counter "+d+", waiting for video PTS before demuxing audio frag "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+l),this.waitingFragment=e,this.state=g.State.WAITING_INIT_PTS}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING){var i=e.tracks,a=void 0;if(i.video&&delete i.video,a=i.audio){a.levelCodec=a.codec,a.id=e.id,this.hls.trigger(o.default.BUFFER_CODECS,i),c.logger.log("audio track:audio,container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var n=a.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.default.BUFFER_APPENDING,s))}this.tick()}}},r.prototype.onFragParsingData=function(t){var r=this,i=this.fragCurrent,a=t.frag;if(i&&"audio"===t.id&&"audio"===t.type&&a.sn===i.sn&&a.level===i.level&&this.state===g.State.PARSING){var n=this.trackId,s=this.tracks[n],u=this.hls;e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),i.addElementaryStream(p.default.ElementaryStreamTypes.AUDIO),c.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),l.updateFragPTSDTS(s.details,i,t.startPTS,t.endPTS);var f=this.audioSwitch,h=this.media,v=!1;if(f&&h)if(h.readyState){var m=h.currentTime; -c.logger.log("switching audio track : currentTime:"+m),m>=t.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state=g.State.BUFFER_FLUSHING,u.trigger(o.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),v=!0,this.audioSwitch=!1,u.trigger(o.default.AUDIO_TRACK_SWITCHED,{id:n}))}else this.audioSwitch=!1,u.trigger(o.default.AUDIO_TRACK_SWITCHED,{id:n});var y=this.pendingData;if(!y)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void u.trigger(o.default.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&y.push({type:t.type,data:e,parent:"audio",content:"data"})}),!v&&y.length&&(y.forEach(function(e){r.state===g.State.PARSING&&(r.pendingBuffering=!0,r.hls.trigger(o.default.BUFFER_APPENDING,e))}),this.pendingData=[],this.appended=!0)),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===g.State.PARSING&&(this.stats.tparsed=v.now(),this.state=g.State.PARSED,this._checkAppendedParsed())},r.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},r.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},r.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;(t===g.State.PARSING||t===g.State.PARSED)&&(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==g.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=v.now(),r.trigger(o.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;c.logger.log("audio buffered : "+u.default.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(o.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=g.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag;if(!r||"audio"===r.type)switch(t.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:var i=t.frag;if(i&&"audio"!==i.type)break;if(!t.fatal){var a=this.fragLoadError;a?a++:a=1;var s=this.config;if(a<=s.fragLoadingMaxRetry){this.fragLoadError=a;var l=Math.min(Math.pow(2,a-1)*s.fragLoadingRetryDelay,s.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+l+" ms"),this.retryDate=v.now()+l,this.state=g.State.FRAG_LOADING_WAITING_RETRY}else c.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=g.State.ERROR}break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(this.state=t.fatal?g.State.ERROR:g.State.IDLE,c.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var u=this.mediaBuffer,f=this.media.currentTime,h=u&&n.BufferHelper.isBuffered(u,f)&&n.BufferHelper.isBuffered(u,f+.5);if(h){var s=this.config;s.maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+s.maxMaxBufferLength+"s")),this.state=g.State.IDLE}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=g.State.BUFFER_FLUSHING,this.hls.trigger(o.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"})}}},r.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach(function(t){e.hls.trigger(o.default.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=g.State.PARSED):(this.state=g.State.IDLE,this.fragPrevious=null,this.tick())},r}(g.default);t.default=y}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/audio-track-controller.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/task-loop.js"),s=r("./src/utils/logger.js"),o=r("./src/errors.js"),l=function(e){function t(t){var r=e.call(this,t,a.default.MANIFEST_LOADING,a.default.MANIFEST_PARSED,a.default.AUDIO_TRACK_LOADED,a.default.AUDIO_TRACK_SWITCHED,a.default.LEVEL_LOADED,a.default.ERROR)||this;return r._trackId=-1,r._selectDefaultTrack=!0,r.tracks=[],r.trackIdBlacklist=Object.create(null),r.audioGroupId=null,r}return i(t,e),t.prototype.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},t.prototype.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(a.default.AUDIO_TRACKS_UPDATED,{audioTracks:t})},t.prototype.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)return void s.logger.warn("Invalid audio track id:",e.id);if(s.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()},t.prototype.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},t.prototype.onLevelLoaded=function(e){var t=this.hls.levels[e.level];if(t.audioGroupIds){var r=t.audioGroupIds[t.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},t.prototype.onError=function(e){e.type===o.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},Object.defineProperty(t.prototype,"audioTracks",{get:function(){return this.tracks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1},enumerable:!0,configurable:!0}),t.prototype._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)return void s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");if(0>e||e>=this.tracks.length)return void s.logger.warn("Invalid id passed to audio-track controller");var t=this.tracks[e];s.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var r=t.url,i=t.type,n=t.id;this.hls.trigger(a.default.AUDIO_TRACK_SWITCHING,{id:n,type:i,url:r}),this._loadTrackDetailsIfNeeded(t)},t.prototype.doTick=function(){this._updateTrack(this._trackId)},t.prototype._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var r=this.tracks[this._trackId],i=null;if(r&&(i=r.name),this._selectDefaultTrack){var n=t.filter(function(e){return e.default});n.length?t=n:s.logger.warn("No default audio tracks defined")}var l=!1,u=function(){t.forEach(function(t){l||e.audioGroupId&&t.groupId!==e.audioGroupId||i&&i!==t.name||(e._setAudioTrack(t.id),l=!0)})};u(),l||(i=null,u()),l||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},t.prototype._needsTrackLoading=function(e){var t=e.details,r=e.url;return!t||t.live?!!r:!1},t.prototype._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,r=e.id;s.logger.log("loading audio-track playlist for id: "+r),this.hls.trigger(a.default.AUDIO_TRACK_LOADING,{url:t,id:r})}},t.prototype._updateTrack=function(e){if(!(0>e||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,s.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},t.prototype._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],r=t.name,i=t.language,a=t.groupId;s.logger.warn("Loading failed on audio track id: "+e+", group-id: "+a+', name/language: "'+r+'" / "'+i+'"');for(var n=e,o=0;ou||u>p?(c.loader&&(o.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=t.State.IDLE):o.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else l===t.State.ENDED&&(0===d.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=t.State.IDLE);a&&(this.lastCurrentTime=u),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=u),this.tick()},a.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a}(a.default);t.default=l}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/buffer-controller.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=r("./src/utils/logger.js"),o=r("./src/errors.js"),l=r("./src/utils/mediasource-helper.js"),u=l.getMediaSource(),d=function(t){function r(e){var r=t.call(this,e,a.default.MEDIA_ATTACHING,a.default.MEDIA_DETACHING,a.default.MANIFEST_PARSED,a.default.BUFFER_RESET,a.default.BUFFER_APPENDING,a.default.BUFFER_CODECS,a.default.BUFFER_EOS,a.default.BUFFER_FLUSHING,a.default.LEVEL_PTS_UPDATED,a.default.LEVEL_UPDATED)||this;return r._msDuration=null,r._levelDuration=null,r._levelTargetDuration=10,r._live=null,r._objectUrl=null,r.bufferCodecEventsExpected=0,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return i(r,t),r.prototype.destroy=function(){n.default.prototype.destroy.call(this)},r.prototype.onLevelPtsUpdated=function(e){var t=e.type,r=this.tracks.audio;if("audio"===t&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio,a=Math.abs(i.timestampOffset-e.start);if(a>.1){var n=i.updating;try{i.abort()}catch(o){s.logger.warn("can not abort audio buffer: "+o)}n?this.audioTimestampOffset=e.start:(s.logger.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}},r.prototype.onManifestParsed=function(e){this.bufferCodecEventsExpected=e.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.prototype.onMediaAttaching=function(e){var t=this.media=e.media;if(t){var r=this.mediaSource=new u;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),t.src=window.URL.createObjectURL(r),this._objectUrl=t.src}},r.prototype.onMediaDetaching=function(){s.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(t){s.logger.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(a.default.MEDIA_DETACHED)},r.prototype.onMediaSourceOpen=function(){s.logger.log("media source opened"),this.hls.trigger(a.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},r.prototype.checkPendingTracks=function(){var e=this,t=e.bufferCodecEventsExpected,r=e.pendingTracks,i=Object.keys(r).length;(i&&!t||2===i)&&(this.createSourceBuffers(r),this.pendingTracks={},this.doAppending())},r.prototype.onMediaSourceClose=function(){s.logger.log("media source closed")},r.prototype.onMediaSourceEnded=function(){s.logger.log("media source ended")},r.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,r=this.segments.reduce(function(e,r){return r.parent===t?e+1:e},0),i={},n=this.sourceBuffer;for(var o in n)i[o]=n[o].buffered;this.hls.trigger(a.default.BUFFER_APPENDED,{parent:t,pending:r,timeRanges:i}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration(),0===r&&this.flushLiveBackBuffer()},r.prototype.onSBUpdateError=function(e){s.logger.error("sourceBuffer error:",e),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},r.prototype.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(i){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},r.prototype.onBufferCodecs=function(e){var t=this;if(!Object.keys(this.sourceBuffer).length){Object.keys(e).forEach(function(r){t.pendingTracks[r]=e[r]});var r=this.mediaSource;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),r&&"open"===r.readyState&&this.checkPendingTracks()}},r.prototype.createSourceBuffers=function(e){var t=this.sourceBuffer,r=this.mediaSource;for(var i in e)if(!t[i]){var n=e[i],l=n.levelCodec||n.codec,u=n.container+";codecs="+l;s.logger.log("creating sourceBuffer("+u+")");try{var d=t[i]=r.addSourceBuffer(u);d.addEventListener("updateend",this.onsbue),d.addEventListener("error",this.onsbe),this.tracks[i]={codec:l,container:n.container},n.buffer=d}catch(c){s.logger.error("error while trying to add sourceBuffer:"+c.message),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:c,mimeType:u})}}this.hls.trigger(a.default.BUFFER_CREATED,{tracks:e})},r.prototype.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},r.prototype.onBufferAppendFail=function(e){s.logger.error("sourceBuffer error:",e.event),this.hls.trigger(a.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},r.prototype.onBufferEos=function(e){var t=this.sourceBuffer,r=e.type;for(var i in t)r&&i!==r||t[i].ended||(t[i].ended=!0,s.logger.log(i+" sourceBuffer now EOS"));this.checkEos()},r.prototype.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(!t||"open"!==t.readyState)return void(this._needsEos=!1);for(var r in e){var i=e[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(a){s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},r.prototype.onBufferFlushing=function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()},r.prototype.flushLiveBackBuffer=function(){if(this._live){var e=this.hls.config.liveBackBufferLength;if(isFinite(e)&&!(0>e))for(var t=this.media.currentTime,r=this.sourceBuffer,i=Object.keys(r),a=t-Math.max(e,this._levelTargetDuration),n=i.length-1;n>=0;n--){var s=i[n],o=r[s].buffered;o.length>0&&a>o.start(0)&&this.removeBufferRange(s,r[s],0,a)}}},r.prototype.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},r.prototype.updateMediaElementDuration=function(){var t,r=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var i in this.sourceBuffer)if(this.sourceBuffer[i].updating===!0)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),this._live===!0&&r.liveDurationInfinity===!0?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!e.isFinite(t))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},r.prototype.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var i in r)t+=r[i].buffered.length}catch(n){s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(a.default.BUFFER_FLUSHED)}},r.prototype.doAppending=function(){var e=this,t=e.hls,r=e.segments,i=e.sourceBuffer;if(Object.keys(i).length){if(this.media.error)return this.segments=[],void s.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var n=r.shift();try{var l=n.type,u=i[l];u?u.updating?r.unshift(n):(u.ended=!1,this.parent=n.parent,u.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(d){s.logger.error("error while trying to append buffer:"+d.message),r.unshift(n);var c={type:o.ErrorTypes.MEDIA_ERROR,parent:n.parent};22!==d.code?(this.appendError?this.appendError++:this.appendError=1,c.details=o.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(s.logger.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],c.fatal=!0,t.trigger(a.default.ERROR,c)):(c.fatal=!1,t.trigger(a.default.ERROR,c))):(this.segments=[],c.details=o.ErrorDetails.BUFFER_FULL_ERROR,c.fatal=!1,t.trigger(a.default.ERROR,c))}}}},r.prototype.flushBuffer=function(e,t,r){var i,a=this.sourceBuffer;if(Object.keys(a).length){if(s.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter.5)return s.logger.log("sb remove "+e+" ["+l+","+u+"], of ["+n+","+o+"], pos:"+this.media.currentTime),t.remove(l,u),!0}}catch(d){s.logger.warn("removeBufferRange failed",d)}return!1},r}(n.default);t.default=d}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/cap-level-controller.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=function(t){function r(r){var i=t.call(this,r,a.default.FPS_DROP_LEVEL_CAPPING,a.default.MEDIA_ATTACHING,a.default.MANIFEST_PARSED,a.default.BUFFER_CODECS,a.default.MEDIA_DETACHING)||this;return i.autoLevelCapping=e.POSITIVE_INFINITY,i.firstLevel=null,i.levels=[],i.media=null,i.restrictedLevels=[],i.timer=null,i}return i(r,t),r.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this._stopCapping())},r.prototype.onFpsDropLevelCapping=function(e){r.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},r.prototype.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},r.prototype.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this._startCapping()},r.prototype.onBufferCodecs=function(e){var t=this.hls;t.config.capLevelToPlayerSize&&e.video&&this._startCapping()},r.prototype.onLevelsUpdated=function(e){this.levels=e.levels},r.prototype.onMediaDetaching=function(){this._stopCapping()},r.prototype.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},r.prototype.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,a){return r.isLevelAllowed(a,t.restrictedLevels)&&e>=a});return r.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},r.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=e.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},r.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=e.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},Object.defineProperty(r.prototype,"mediaWidth",{get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=r.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"mediaHeight",{get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=r.contentScaleFactor),e},enumerable:!0,configurable:!0}),Object.defineProperty(r,"contentScaleFactor",{get:function(){var e=1;try{e=window.devicePixelRatio}catch(t){}return e},enumerable:!0,configurable:!0}),r.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},r.getMaxLevelByMediaSize=function(e,t,r){if(!e||e&&!e.length)return-1;for(var i=function(e,t){return t?e.width!==t.width||e.height!==t.height:!0},a=e.length-1,n=0;n=t||s.height>=r)&&i(s,e[n+1])){a=n;break}}return a},r}(n.default);t.default=s}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/eme-controller.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/event-handler.js"),n=r("./src/events.js"),s=r("./src/errors.js"),o=r("./src/utils/logger.js"),l=window.XMLHttpRequest,u=3,d={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready"},c=function(e,t){var r={videoCapabilities:[]};return t.forEach(function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})}),[r]},f=function(e,t,r){switch(e){case d.WIDEVINE:return c(t,r);default:throw Error("Unknown key-system: "+e)}},h=function(e){function t(t){var r=e.call(this,t,n.default.MEDIA_ATTACHED,n.default.MANIFEST_PARSED)||this;return r._widevineLicenseUrl=t.config.widevineLicenseUrl,r._licenseXhrSetup=t.config.licenseXhrSetup,r._emeEnabled=t.config.emeEnabled,r._requestMediaKeySystemAccess=t.config.requestMediaKeySystemAccessFunc,r._mediaKeysList=[],r._media=null,r._hasSetMediaKeys=!1,r._isMediaEncrypted=!1,r._requestLicenseFailureCount=0,r}return i(t,e),t.prototype.getLicenseServerUrl=function(e){var t;switch(e){case d.WIDEVINE:t=this._widevineLicenseUrl;break;default:t=null}return t||(o.logger.error('No license server URL configured for key-system "'+e+'"'),this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),t},t.prototype._attemptKeySystemAccess=function(e,t,r){var i=this,a=f(e,t,r);return a?(o.logger.log("Requesting encrypted media key-system access"),void this.requestMediaKeySystemAccess(e,a).then(function(t){i._onMediaKeySystemAccessObtained(e,t)}).catch(function(t){o.logger.error('Failed to obtain key-system "'+e+'" access:',t)})):void o.logger.warn("Can not create config for key-system (maybe because platform is not supported):",e)},Object.defineProperty(t.prototype,"requestMediaKeySystemAccess",{get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess},enumerable:!0,configurable:!0}),t.prototype._onMediaKeySystemAccessObtained=function(e,t){var r=this;o.logger.log('Access for key-system "'+e+'" obtained');var i={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(i),t.createMediaKeys().then(function(t){i.mediaKeys=t,o.logger.log('Media-keys created for key-system "'+e+'"'),r._onMediaKeysCreated()}).catch(function(e){o.logger.error("Failed to create media-keys:",e)})},t.prototype._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))})},t.prototype._onNewMediaKeySession=function(e){var t=this;o.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",function(r){t._onKeySessionMessage(e,r.message)},!1)},t.prototype._onKeySessionMessage=function(e,t){o.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(t){o.logger.log("Received license data, updating key-session"),e.update(t)})},t.prototype._onMediaEncrypted=function(e,t){o.logger.log('Media is encrypted using "'+e+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=e,this._mediaEncryptionInitData=t,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},t.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});o.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},t.prototype._generateRequestWithPreferredKeySession=function(){var e=this,t=this._mediaKeysList[0];if(!t)return o.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(t.mediaKeysSessionInitialized)return void o.logger.warn("Key-Session already initialized but requested again");var r=t.mediaKeysSession;r||(o.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0}));var i=this._mediaEncryptionInitDataType,a=this._mediaEncryptionInitData;o.logger.log('Generating key-session request for "'+i+'" init data type'),t.mediaKeysSessionInitialized=!0,r.generateRequest(i,a).then(function(){o.logger.debug("Key-session generation succeeded")}).catch(function(t){o.logger.error("Error generating key-session request:",t),e.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},t.prototype._createLicenseXhr=function(e,t,r){var i=new l,a=this._licenseXhrSetup;try{if(a)try{a(i,e)}catch(u){i.open("POST",e,!0),a(i,e)}i.readyState||i.open("POST",e,!0)}catch(u){return o.logger.error("Error setting up key-system license XHR",u),void this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,e,t,r),i},t.prototype._onLicenseRequestReadyStageChange=function(e,t,r,i){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,o.logger.log("License request succeeded"),i(e.response); -else{if(o.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount<=u){var a=u-this._requestLicenseFailureCount+1;return o.logger.warn("Retrying license request, "+a+" attempts left"),void this._requestLicense(r,i)}this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},t.prototype._generateLicenseRequestChallenge=function(e,t){var r;return e.mediaKeySystemDomain===d.PLAYREADY?o.logger.error("PlayReady is not supported (yet)"):e.mediaKeySystemDomain===d.WIDEVINE?r=t:o.logger.error("Unsupported key-system:",e.mediaKeySystemDomain),r},t.prototype._requestLicense=function(e,t){o.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(n.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});var i=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(i,e,t);o.logger.log("Sending license request to URL: "+i),a.send(this._generateLicenseRequestChallenge(r,e))},t.prototype.onMediaAttached=function(e){var t=this;if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",function(e){t._onMediaEncrypted(e.initDataType,e.initData)})}},t.prototype.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map(function(e){return e.audioCodec}),r=e.levels.map(function(e){return e.videoCodec});this._attemptKeySystemAccess(d.WIDEVINE,t,r)}},t}(a.default);t.default=h},"./src/controller/fps-controller.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=r("./src/utils/logger.js"),o=window.performance,l=function(e){function t(t){return e.call(this,t,a.default.MEDIA_ATTACHING)||this}return i(t,e),t.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},t.prototype.onMediaAttaching=function(e){var t=this.hls.config;if(t.capLevelOnFPSDrop){var r=this.video=e.media instanceof window.HTMLVideoElement?e.media:null;"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod)}},t.prototype.checkFPS=function(e,t,r){var i=o.now();if(t){if(this.lastTime){var n=i-this.lastTime,l=r-this.lastDroppedFrames,u=t-this.lastDecodedFrames,d=1e3*l/n,c=this.hls;if(c.trigger(a.default.FPS_DROP,{currentDropped:l,currentDecoded:u,totalDroppedFrames:r}),d>0&&l>c.config.fpsDroppedMonitoringThreshold*u){var f=c.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=f)&&(f-=1,c.trigger(a.default.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:c.currentLevel}),c.autoLevelCapping=f,c.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=t}},t.prototype.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},t}(n.default);t.default=l},"./src/controller/fragment-finders.js":function(e,t,r){"use strict";(function(e){function i(t,r,i){if(!Array.isArray(t)||!t.length||!e.isFinite(r))return null;if(r=t[t.length-1].endProgramDateTime)return null;i=i||0;for(var a=0;ae&&r.start?-1:0}function s(e,t,r){var i=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.endProgramDateTime-i>e}Object.defineProperty(t,"__esModule",{value:!0});var o=r("./src/utils/binary-search.js");t.findFragmentByPDT=i,t.findFragmentByPTS=a,t.fragmentWithinToleranceTest=n,t.pdtWithinToleranceTest=s}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/fragment-tracker.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/event-handler.js"),n=r("./src/events.js");t.FragmentState={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};var s=function(r){function s(e){var t=r.call(this,e,n.default.BUFFER_APPENDED,n.default.FRAG_BUFFERED,n.default.FRAG_LOADED)||this;return t.bufferPadding=.2,t.fragments=Object.create(null),t.timeRanges=Object.create(null),t.config=e.config,t}return i(s,r),s.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,a.default.prototype.destroy.call(this),r.prototype.destroy.call(this)},s.prototype.getBufferedFrag=function(e,t){var r=this.fragments,i=Object.keys(r).filter(function(i){var a=r[i];if(a.body.type!==t)return!1;if(!a.buffered)return!1;var n=a.body;return n.startPTS<=e&&e<=n.endPTS});if(0===i.length)return null;var a=i.pop();return r[a].body},s.prototype.detectEvictedFragments=function(e,t){var r,i,a=this;Object.keys(this.fragments).forEach(function(n){var s=a.fragments[n];if(s.buffered===!0){var o=s.range[e];if(o){r=o.time;for(var l=0;l=i&&a>=t){n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))});break}if(a>e&&t>i)n.push({startPTS:Math.max(e,r.start(o)),endPTS:Math.min(t,r.end(o))}),s=!0;else if(i>=t)break}return{time:n,partial:s}},s.prototype.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},s.prototype.getPartialFragment=function(e){var t,r,i,a=this,n=null,s=0;return Object.keys(this.fragments).forEach(function(o){var l=a.fragments[o];a.isPartial(l)&&(r=l.body.startPTS-a.bufferPadding,i=l.body.endPTS+a.bufferPadding,e>=r&&i>=e&&(t=Math.min(e-r,i-e),t>=s&&(n=l.body,s=t)))}),n},s.prototype.getState=function(e){var r=this.getFragmentKey(e),i=this.fragments[r],a=t.FragmentState.NOT_LOADED;return void 0!==i&&(a=i.buffered?this.isPartial(i)===!0?t.FragmentState.PARTIAL:t.FragmentState.OK:t.FragmentState.APPENDING),a},s.prototype.isPartial=function(e){return e.buffered===!0&&(void 0!==e.range.video&&e.range.video.partial===!0||void 0!==e.range.audio&&e.range.audio.partial===!0)},s.prototype.isTimeBuffered=function(e,t,r){for(var i,a,n=0;n=i&&a>=t)return!0;if(i>=t)return!1}return!1},s.prototype.onFragLoaded=function(t){var r=t.frag;e.isFinite(r.sn)&&!r.bitrateTest&&(this.fragments[this.getFragmentKey(r)]={body:r,range:Object.create(null),buffered:!1})},s.prototype.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach(function(e){var r=t.timeRanges[e];t.detectEvictedFragments(e,r)})},s.prototype.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},s.prototype.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},s.prototype.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},s.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},s}(a.default);t.FragmentTracker=s}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/gap-controller.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/utils/buffer-helper.js"),a=r("./src/errors.js"),n=r("./src/events.js"),s=r("./src/utils/logger.js"),o=1e3,l=.5,u=function(){function e(e,t,r,i){this.config=e,this.media=t,this.fragmentTracker=r,this.hls=i,this.stallReported=!1}return e.prototype.poll=function(e){var t=this,r=t.config,a=t.media,n=a.currentTime,l=window.performance.now();if(n!==e)return this.stallReported&&(s.logger.warn("playback not stuck anymore @"+n+", after "+Math.round(l-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,void(this.nudgeRetry=0);if(!(a.ended||!a.buffered.length||a.readyState>2||a.seeking&&i.BufferHelper.isBuffered(a,n))){var u=l-this.stalled,d=i.BufferHelper.bufferInfo(a,n,r.maxBufferHole);if(!this.stalled)return void(this.stalled=l);u>=o&&this._reportStall(d.len),this._tryFixBufferStall(d,u)}},e.prototype._tryFixBufferStall=function(e,t){var r=this,i=r.config,a=r.fragmentTracker,n=r.media,s=n.currentTime,o=a.getPartialFragment(s);o&&this._trySkipBufferHole(o),e.len>l&&t>1e3*i.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(e){var t=this,r=t.hls,i=t.media,o=t.stallReported;o||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer"),r.trigger(n.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},e.prototype._trySkipBufferHole=function(e){for(var t=this,r=t.hls,i=t.media,o=i.currentTime,l=0,u=0;u=l&&d>o)return i.currentTime=Math.max(d,i.currentTime+.1),s.logger.warn("skipping hole, adjusting currentTime from "+o+" to "+i.currentTime),this.stalled=null,void r.trigger(n.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+o+" to "+i.currentTime,frag:e});l=i.buffered.end(u)}},e.prototype._tryNudgeBuffer=function(){var e=this,t=e.config,r=e.hls,i=e.media,o=i.currentTime,l=(this.nudgeRetry||0)+1;if(this.nudgeRetry=l,l0){t=r[0].bitrate,r.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=r;for(var p=0;p=0&&e1&&c.loadError0){var t=this.currentLevelIndex,r=e.urlId,i=e.url[r];o.logger.log("Attempt loading level index "+t+" with URL-id "+r),this.hls.trigger(n.default.LEVEL_LOADING,{url:i,level:t,id:r})}}},Object.defineProperty(t.prototype,"nextLoadLevel",{get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)},enumerable:!0,configurable:!0}),t}(s.default);t.default=f},"./src/controller/level-helper.js":function(e,t,r){"use strict";(function(e){function i(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}}function a(t,r,i){var a=t[r],n=t[i],s=n.startPTS;e.isFinite(s)?i>r?(a.duration=s-a.start,a.duration<0&&o.logger.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!")):(n.duration=a.start-s,n.duration<0&&o.logger.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):n.start=i>r?a.start+a.duration:Math.max(a.start-n.duration,0)}function n(t,r,i,n,s,o){var l=i;if(e.isFinite(r.startPTS)){var u=Math.abs(r.startPTS-i);r.deltaPTS=e.isFinite(r.deltaPTS)?Math.max(u,r.deltaPTS):u,l=Math.max(i,r.startPTS),i=Math.min(i,r.startPTS),n=Math.max(n,r.endPTS),s=Math.min(s,r.startDTS),o=Math.max(o,r.endDTS)}var d=i-r.start;r.start=r.startPTS=i,r.maxStartPTS=l,r.endPTS=n,r.startDTS=s,r.endDTS=o,r.duration=n-i;var c=r.sn;if(!t||ct.endSN)return 0;var f,h,p;for(f=c-t.startSN,h=t.fragments,h[f]=r,p=f;p>0;p--)a(h,p,p-1);for(p=f;ps)return void(r.PTSKnown=!1);for(var f=a;s>=f;f++){var h=u[l+f],p=d[f];p&&h&&(c=h.cc-p.cc,e.isFinite(h.startPTS)&&(p.start=p.startPTS=h.startPTS,p.endPTS=h.endPTS,p.duration=h.duration,p.backtracked=h.backtracked,p.dropped=h.dropped,i=p))}if(c)for(o.logger.log("discontinuity sliding from playlist, take drift into account"),f=0;f=0&&l0&&-1===e&&(p.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=y.State.STOPPED},r.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=y.State.STOPPED,this.forceStartLoad=!1},r.prototype.doTick=function(){switch(this.state){case y.State.BUFFER_FLUSHING:this.fragLoadError=0;break;case y.State.IDLE:this._doTickIdle();break;case y.State.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=y.State.IDLE);break;case y.State.FRAG_LOADING_WAITING_RETRY:var t=window.performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(p.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break;case y.State.ERROR:case y.State.STOPPED:case y.State.FRAG_LOADING:case y.State.PARSING:case y.State.PARSED:case y.State.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},r.prototype._doTickIdle=function(){var e=this.hls,t=e.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&t.startFragPrefetch)){var i;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=e.nextLoadLevel,s=this.levels[a];if(s){var l,u=s.bitrate;l=u?Math.max(8*t.maxBufferSize/u,t.maxBufferLength):t.maxBufferLength,l=Math.min(l,t.maxMaxBufferLength);var d=n.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,t.maxBufferHole),c=d.len;if(!(c>=l)){p.logger.trace("buffer length of "+c.toFixed(3)+" is below max of "+l.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=a;var f=s.details;if(!f||f.live&&this.levelLastLoaded!==a)return void(this.state=y.State.WAITING_LEVEL);if(this._streamEnded(d,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(o.default.BUFFER_EOS,h),void(this.state=y.State.ENDED)}this._fetchPayloadOrEos(i,d,f)}}}},r.prototype._fetchPayloadOrEos=function(e,t,r){var i=this.fragPrevious,a=this.level,n=r.fragments,s=n.length;if(0!==s){var o,l=n[0].start,u=n[s-1].start+n[s-1].duration,d=t.end;if(r.initSegment&&!r.initSegment.data)o=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(c>s)return void p.logger.warn("Can not start playback of a level, reason: not enough fragments "+s+" < "+c);if(o=this._ensureFragmentAtLivePoint(r,d,l,u,i,n,s),null===o)return}else l>d&&(o=n[0]);o||(o=this._findFragment(l,i,s,n,d,u,r)),o&&(o.encrypted?(p.logger.log("Loading key for "+o.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+a),this._loadKey(o)):(p.logger.log("Loading "+o.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+a+", currentTime:"+e.toFixed(3)+",bufferEnd:"+d.toFixed(3)),this._loadFragment(o)))}},r.prototype._ensureFragmentAtLivePoint=function(e,t,r,i,n,s,o){var l,u=this.hls.config,d=this.media,c=void 0!==u.liveMaxLatencyDuration?u.liveMaxLatencyDuration:u.liveMaxLatencyDurationCount*e.targetduration;if(tf&&(d.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>i&&d&&d.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(n)if(e.hasProgramDateTime)p.logger.log("live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),l=v.findFragmentByPDT(s,n.endProgramDateTime,u.maxFragLookUpTolerance);else{var h=n.sn+1;if(h>=e.startSN&&h<=e.endSN){var g=s[h-e.startSN];n.cc===g.cc&&(l=g,p.logger.log("live playlist, switching playlist, load frag with next SN: "+l.sn))}l||(l=a.default.search(s,function(e){return n.cc-e.cc}),l&&p.logger.log("live playlist, switching playlist, load frag with same CC: "+l.sn))}l||(l=s[Math.min(o-1,Math.round(o/2))],p.logger.log("live playlist, switching playlist, unknown, load middle frag : "+l.sn))}return l},r.prototype._findFragment=function(e,t,r,i,a,n,s){var o,l=this.hls.config;if(n>a){var u=a>n-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance;o=v.findFragmentByPTS(t,i,a,u)}else o=i[r-1];if(o){var d=o.sn-s.startSN,c=t&&o.level===t.level,f=i[d-1],h=i[d+1];if(t&&o.sn===t.sn)if(c&&!o.backtracked)if(o.snl.maxBufferHole&&t.dropped&&d?(o=f,p.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(o=h,p.logger.log("SN just loaded, load next one: "+o.sn,o))}else o=null;else o.backtracked&&(h&&h.backtracked?(p.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+h.sn),o=h):(p.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,f?(o=f,o.backtracked=!0):d&&(o=null)))}return o},r.prototype._loadKey=function(e){this.state=y.State.KEY_LOADING,this.hls.trigger(o.default.KEY_LOADING,{frag:e})},r.prototype._loadFragment=function(t){var r=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,e.isFinite(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||r===l.FragmentState.NOT_LOADED||r===l.FragmentState.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(o.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new s.default(this.hls,"main")),this.state=y.State.FRAG_LOADING):r===l.FragmentState.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},Object.defineProperty(r.prototype,"state",{get:function(){return this._state},set:function(e){if(this.state!==e){var t=this.state;this._state=e,p.logger.log("main stream:"+t+"->"+e),this.hls.trigger(o.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},enumerable:!0,configurable:!0}),r.prototype.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,d.default.LevelType.MAIN)},Object.defineProperty(r.prototype,"currentLevel",{get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"nextBufferedFrag",{get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null},enumerable:!0,configurable:!0}),r.prototype.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null -},Object.defineProperty(r.prototype,"nextLevel",{get:function(){var e=this.nextBufferedFrag;return e?e.level:-1},enumerable:!0,configurable:!0}),r.prototype._checkFragmentChanged=function(){var e,t,r=this.media;if(r&&r.readyState&&r.seeking===!1&&(t=r.currentTime,t>this.lastCurrentTime&&(this.lastCurrentTime=t),n.BufferHelper.isBuffered(r,t)?e=this.getBufferedFrag(t):n.BufferHelper.isBuffered(r,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(o.default.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(o.default.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},r.prototype.immediateLevelSwitch=function(){if(p.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,r=void 0;t?(r=t.paused,t.pause()):r=!0,this.previouslyPaused=r}var i=this.fragCurrent;i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)},r.prototype.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,n.BufferHelper.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},r.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var r=void 0,i=void 0,a=void 0;if(i=this.getBufferedFrag(t.currentTime),i&&i.startPTS>1&&this.flushMainBuffer(0,i.startPTS-1),t.paused)r=0;else{var n=this.hls.nextLoadLevel,s=this.levels[n],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*s.bitrate/(1e3*o)+1:0}if(a=this.getBufferedFrag(t.currentTime+r),a&&(a=this.followingBufferedFrag(a))){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(a.maxStartPTS,e.POSITIVE_INFINITY)}}},r.prototype.flushMainBuffer=function(e,t){this.state=y.State.BUFFER_FLUSHING;var r={startOffset:e,endOffset:t};this.altAudio&&(r.type="video"),this.hls.trigger(o.default.BUFFER_FLUSHING,r)},r.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition),this.gapController=new m.default(r,t,this.fragmentTracker,this.hls)},r.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(p.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.backtracked=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},r.prototype.onMediaSeeked=function(){var t=this.media,r=t?t.currentTime:void 0;e.isFinite(r)&&p.logger.log("media seeked to "+r.toFixed(3)),this.tick()},r.prototype.onManifestLoading=function(){p.logger.log("trigger BUFFER_RESET"),this.hls.trigger(o.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},r.prototype.onManifestParsed=function(e){var t,r=!1,i=!1;e.levels.forEach(function(e){t=e.audioCodec,t&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(i=!0))}),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&p.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},r.prototype.onLevelLoaded=function(t){var r=t.details,i=t.level,a=this.levels[this.levelLastLoaded],n=this.levels[i],s=r.totalduration,l=0;if(p.logger.log("level "+i+" loaded ["+r.startSN+","+r.endSN+"],duration:"+s),r.live){var u=n.details;u&&r.fragments.length>0?(c.mergeDetails(u,r),l=r.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(l,u),r.PTSKnown&&e.isFinite(l)?p.logger.log("live playlist sliding:"+l.toFixed(3)):(p.logger.log("live playlist - outdated PTS, unknown sliding"),g.alignStream(this.fragPrevious,a,r))):(p.logger.log("live playlist - first load, unknown sliding"),r.PTSKnown=!1,g.alignStream(this.fragPrevious,a,r))}else r.PTSKnown=!1;if(n.details=r,this.levelLastLoaded=i,this.hls.trigger(o.default.LEVEL_UPDATED,{details:r,level:i}),this.startFragRequested===!1){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=r.startTimeOffset;e.isFinite(d)?(0>d&&(p.logger.log("negative start time offset "+d+", count from end of last fragment"),d=l+s+d),p.logger.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d):r.live?(this.startPosition=this.computeLivePosition(l,r),p.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE),this.tick()},r.prototype.onKeyLoaded=function(){this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE,this.tick())},r.prototype.onFragLoaded=function(e){var t=this,r=t.fragCurrent,i=t.hls,a=t.levels,n=t.media,l=e.frag;if(this.state===y.State.FRAG_LOADING&&r&&"main"===l.type&&l.level===r.level&&l.sn===r.sn){var u=e.stats,d=a[r.level],c=d.details;if(this.bitrateTest=!1,this.stats=u,p.logger.log("Loaded "+r.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+r.level),l.bitrateTest&&i.nextLoadLevel)this.state=y.State.IDLE,this.startFragRequested=!1,u.tparsed=u.tbuffered=window.performance.now(),i.trigger(o.default.FRAG_BUFFERED,{stats:u,frag:r,id:"main"}),this.tick();else if("initSegment"===l.sn)this.state=y.State.IDLE,u.tparsed=u.tbuffered=window.performance.now(),c.initSegment.data=e.payload,i.trigger(o.default.FRAG_BUFFERED,{stats:u,frag:r,id:"main"}),this.tick();else{p.logger.log("Parsing "+r.sn+" of ["+c.startSN+" ,"+c.endSN+"],level "+r.level+", cc "+r.cc),this.state=y.State.PARSING,this.pendingBuffering=!0,this.appended=!1,l.bitrateTest&&(l.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:l}));var f=!(n&&n.seeking||!c.PTSKnown&&c.live),h=c.initSegment?c.initSegment.data:[],g=this._getAudioCodec(d),v=this.demuxer=this.demuxer||new s.default(this.hls,"main");v.push(e.payload,h,g,d.videoCodec,r,c.totalduration,f)}}this.fragLoadError=0},r.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,r=e.frag;if(t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===y.State.PARSING){var i=e.tracks,a=void 0,n=void 0;if(i.audio&&this.altAudio&&delete i.audio,n=i.audio){var s=this.levels[this.level].audioCodec,l=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(p.logger.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==n.metadata.channelCount&&-1===l.indexOf("firefox")&&(s="mp4a.40.5"),-1!==l.indexOf("android")&&"audio/mpeg"!==n.container&&(s="mp4a.40.2",p.logger.log("Android: force audio codec to "+s)),n.levelCodec=s,n.id=e.id}n=i.video,n&&(n.levelCodec=this.levels[this.level].videoCodec,n.id=e.id),this.hls.trigger(o.default.BUFFER_CODECS,i);for(a in i){n=i[a],p.logger.log("main track:"+a+",container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var u=n.initSegment;u&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.default.BUFFER_APPENDING,{type:a,data:u,parent:"main",content:"initSegment"}))}this.tick()}},r.prototype.onFragParsingData=function(t){var r=this,i=this.fragCurrent,a=t.frag;if(i&&"main"===t.id&&a.sn===i.sn&&a.level===i.level&&("audio"!==t.type||!this.altAudio)&&this.state===y.State.PARSING){var n=this.levels[this.level],s=i;if(e.isFinite(t.endPTS)||(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),t.hasAudio===!0&&s.addElementaryStream(u.default.ElementaryStreamTypes.AUDIO),t.hasVideo===!0&&s.addElementaryStream(u.default.ElementaryStreamTypes.VIDEO),p.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(s.dropped=t.dropped,s.dropped)if(s.backtracked)p.logger.warn("Already backtracked on this fragment, appending with the gap",s.sn);else{var l=n.details;if(!l||s.sn!==l.startSN)return p.logger.warn("missing video frame(s), backtracking fragment",s.sn),this.fragmentTracker.removeFragment(s),s.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=y.State.IDLE,this.fragPrevious=s,void this.tick();p.logger.warn("missing video frame(s) on first frag, appending with gap",s.sn)}else s.backtracked=!1;var d=c.updateFragPTSDTS(n.details,s,t.startPTS,t.endPTS,t.startDTS,t.endDTS),f=this.hls;f.trigger(o.default.LEVEL_PTS_UPDATED,{details:n.details,level:this.level,drift:d,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(e){e&&e.length&&r.state===y.State.PARSING&&(r.appended=!0,r.pendingBuffering=!0,f.trigger(o.default.BUFFER_APPENDING,{type:t.type,data:e,parent:"main",content:"data"}))}),this.tick()}},r.prototype.onFragParsed=function(e){var t=this.fragCurrent,r=e.frag;t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===y.State.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=y.State.PARSED,this._checkAppendedParsed())},r.prototype.onAudioTrackSwitching=function(t){var r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){p.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a.loader&&(p.logger.log("switching to main audio track, cancel main fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=y.State.IDLE}var n=this.hls;n.trigger(o.default.BUFFER_FLUSHING,{startOffset:0,endOffset:e.POSITIVE_INFINITY,type:"audio"}),n.trigger(o.default.AUDIO_TRACK_SWITCHED,{id:i}),this.altAudio=!1}},r.prototype.onAudioTrackSwitched=function(e){var t=e.id,r=!!this.hls.audioTracks[t].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(p.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},r.prototype.onBufferCreated=function(e){var t,r,i=e.tracks,a=!1;for(var n in i){var s=i[n];"main"===s.id?(r=n,t=s,"video"===n&&(this.videoBuffer=i[n].buffer)):a=!0}a&&t?(p.logger.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},r.prototype.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;(t===y.State.PARSING||t===y.State.PARSED)&&(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},r.prototype._checkAppendedParsed=function(){if(!(this.state!==y.State.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;p.logger.log("main buffered : "+f.default.toString(t.buffered)),this.fragPrevious=e;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(o.default.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.state=y.State.IDLE}this.tick()}},r.prototype.onError=function(t){var r=t.frag||this.fragCurrent;if(!r||"main"===r.type){var i=!!this.media&&n.BufferHelper.isBuffered(this.media,this.media.currentTime)&&n.BufferHelper.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var a=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);p.logger.warn("mediaController: frag loading failed, retry in "+a+" ms"),this.retryDate=window.performance.now()+a,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=y.State.FRAG_LOADING_WAITING_RETRY}else p.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=y.State.ERROR;break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(t.fatal?(this.state=y.State.ERROR,p.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==y.State.WAITING_LEVEL||(this.state=y.State.IDLE));break;case h.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==y.State.PARSING&&this.state!==y.State.PARSED||(i?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=y.State.IDLE):(p.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,e.POSITIVE_INFINITY)))}}},r.prototype._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e?(t.maxMaxBufferLength/=2,p.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0):!1},r.prototype._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=this.mediaBuffer?this.mediaBuffer:e,r=t.buffered;!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,r)}},r.prototype.onFragLoadEmergencyAborted=function(){this.state=y.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},r.prototype.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(u.default.ElementaryStreamTypes.VIDEO,e.buffered),this.state=y.State.IDLE,this.fragPrevious=null},r.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},r.prototype.computeLivePosition=function(e,t){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-r)},r.prototype._seekToStartPos=function(){var e=this.media,t=e.currentTime,r=e.seeking?t:this.startPosition;t!==r&&(p.logger.log("target start position not buffered, seek to buffered.start(0) "+r+" from current time "+t+" "),e.currentTime=r)},r.prototype._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(p.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},Object.defineProperty(r.prototype,"liveSyncPosition",{get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e},enumerable:!0,configurable:!0}),r}(y.default);t.default=_}).call(this,r("./src/polyfills/number.js").Number)},"./src/controller/subtitle-stream-controller.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/utils/logger.js"),s=r("./src/crypt/decrypter.js"),o=r("./src/task-loop.js"),l=r("./src/utils/buffer-helper.js"),u=r("./src/controller/fragment-finders.js"),d=r("./src/controller/fragment-tracker.js"),c=window.performance;t.SubtitleStreamControllerState={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"};var f=t.SubtitleStreamControllerState,h=500,p=function(e){function t(t,r){var i=e.call(this,t,a.default.MEDIA_ATTACHED,a.default.MEDIA_DETACHING,a.default.ERROR,a.default.KEY_LOADED,a.default.FRAG_LOADED,a.default.SUBTITLE_TRACKS_UPDATED,a.default.SUBTITLE_TRACK_SWITCH,a.default.SUBTITLE_TRACK_LOADED,a.default.SUBTITLE_FRAG_PROCESSED)||this;return i.fragmentTracker=r,i.config=t.config,i.state=f.STOPPED,i.tracks=[],i.tracksBuffered=[],i.currentTrackId=-1,i.decrypter=new s.default(t,t.config),i}return i(t,e),t.prototype.onHandlerDestroyed=function(){this.fragmentTracker=null,this.state=f.STOPPED,e.prototype.onHandlerDestroyed.call(this)},t.prototype.onSubtitleFragProcessed=function(e){if(this.state=f.IDLE,e.success){var t=this.tracksBuffered[this.currentTrackId],r=e.frag;if(this.fragPrevious=r,t){for(var i,a=0;a=t[a].start&&r.start<=t[a].end){i=t[a];break}i?i.end=r.start+r.duration:t.push({start:r.start,end:r.start+r.duration})}}},t.prototype.onMediaAttached=function(e){this.media=e.media,this.state=f.IDLE},t.prototype.onMediaDetaching=function(){this.media=null,this.state=f.STOPPED},t.prototype.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=f.IDLE)},t.prototype.onSubtitleTracksUpdated=function(e){var t=this;n.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach(function(e){t.tracksBuffered[e.id]=[]})},t.prototype.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,!this.tracks||-1===this.currentTrackId)return void this.clearInterval();var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(h)},t.prototype.onSubtitleTrackLoaded=function(e){var t=e.id,r=e.details;return this.tracks?(this.tracks[t]&&(n.logger.log("Updating subtitle track details"),this.tracks[t].details=r),void this.setInterval(h)):void n.logger.warn("Can not update subtitle details, no tracks found")},t.prototype.onKeyLoaded=function(){this.state===f.KEY_LOADING&&(this.state=f.IDLE)},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,r=e.frag.decryptdata,i=e.frag,n=this.hls;if(this.state===f.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&r&&r.key&&"AES-128"===r.method){var s=c.now();this.decrypter.decrypt(e.payload,r.key.buffer,r.iv.buffer,function(e){var t=c.now();n.trigger(a.default.FRAG_DECRYPTED,{frag:i,payload:e,stats:{tstart:s,tdecrypt:t}})})}},t.prototype.doTick=function(){if(!this.media)return void(this.state=f.IDLE);switch(this.state){case f.IDLE:var e=this.tracks,t=this.currentTrackId;if(!e||!e[t]||!e[t].details)break;var r=e[t].details,i=this.config,s=i.maxBufferHole,o=Math.min(i.maxBufferLength,i.maxMaxBufferLength),c=i.maxFragLookUpTolerance,h=l.BufferHelper.bufferedInfo(this._getBuffered(),this.media.currentTime,s),p=h.end,g=h.len,v=r.fragments,m=v.length,y=v[m-1].start+v[m-1].duration,E=void 0;o>g&&y>p?E=u.findFragmentByPTS(this.fragPrevious,v,p,c):r.hasProgramDateTime&&this.fragPrevious&&(E=u.findFragmentByPDT(v,this.fragPrevious.endProgramDateTime,c)),E&&E.encrypted?(n.logger.log("Loading key for "+E.sn),this.state=f.KEY_LOADING,this.hls.trigger(a.default.KEY_LOADING,{frag:E})):E&&this.fragmentTracker.getState(E)===d.FragmentState.NOT_LOADED&&(E.trackId=t,this.fragCurrent=E,this.state=f.FRAG_LOADING,this.hls.trigger(a.default.FRAG_LOADING,{frag:E}))}},t.prototype._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},t}(o.default);t.SubtitleStreamController=p},"./src/controller/subtitle-track-controller.js":function(e,t,r){"use strict";function i(e){for(var t=[],r=0;re||e>=i.length)&&(this._stopTimer(),this.trackId=e,o.logger.log("switching to subtitle track "+e),r.trigger(n.default.SUBTITLE_TRACK_SWITCH,{id:e}),-1!==e)){var a=i[e],s=a.details;(!s||s.live)&&(o.logger.log("(re)loading playlist for subtitle track "+e),r.trigger(n.default.SUBTITLE_TRACK_LOADING,{url:a.url,id:e}))}},t.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},t.prototype._toggleTrackModes=function(e){var t=this,r=t.media,a=t.subtitleDisplay,n=t.trackId;if(r){var s=i(r.textTracks);if(-1===e)[].slice.call(s).forEach(function(e){e.mode="disabled"});else{var o=s[n];o&&(o.mode="disabled")}var l=s[e];l&&(l.mode=a?"showing":"hidden")}},t}(s.default);t.default=l},"./src/controller/timeline-controller.js":function(e,t,r){"use strict";(function(e){function i(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function a(e,t,r,i){return Math.min(t,i)-Math.max(e,r)}var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r("./src/events.js"),o=r("./src/event-handler.js"),l=r("./src/utils/cea-608-parser.js"),u=r("./src/utils/output-filter.js"),d=r("./src/utils/webvtt-parser.js"),c=r("./src/utils/logger.js"),f=r("./src/utils/texttrack-utils.js"),h=function(t){function r(e){var r=t.call(this,e,s.default.MEDIA_ATTACHING,s.default.MEDIA_DETACHING,s.default.FRAG_PARSING_USERDATA,s.default.FRAG_DECRYPTED,s.default.MANIFEST_LOADING,s.default.MANIFEST_LOADED,s.default.FRAG_LOADED,s.default.LEVEL_SWITCHING,s.default.INIT_PTS_FOUND)||this;if(r.hls=e,r.config=e.config,r.enabled=!0,r.Cues=e.config.cueHandler,r.textTracks=[],r.tracks=[],r.unparsedVttFrags=[],r.initPTS=[],r.cueRanges=[],r.captionsTracks={},r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode}},r.config.enableCEA708Captions){var i=new u.default(r,"textTrack1"),a=new u.default(r,"textTrack2");r.cea608Parser=new l.default(0,i,a)}return r}return n(r,t),r.prototype.addCues=function(e,t,r,i){for(var n=this.cueRanges,s=!1,o=n.length;o--;){var l=n[o],u=a(l[0],l[1],t,r);if(u>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],r),s=!0,u/(r-t)>.5))return}s||n.push([t,r]),this.Cues.newCue(this.captionsTracks[e],t,r,i)},r.prototype.onInitPtsFound=function(e){var t=this;if("main"===e.id&&(this.initPTS[e.frag.cc]=e.initPTS),this.unparsedVttFrags.length){var r=this.unparsedVttFrags;this.unparsedVttFrags=[],r.forEach(function(e){t.onFragLoaded(e)})}},r.prototype.getExistingTrack=function(e){var t=this.media;if(t)for(var r=0;ru;u++)t=e[o++],r=127&e[o++],i=127&e[o++],a=0!==(4&t),n=3&t,(0!==r||0!==i)&&a&&0===n&&(l.push(r),l.push(i));return l},r}(o.default);t.default=h}).call(this,r("./src/polyfills/number.js").Number)},"./src/crypt/aes-crypto.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}();t.default=r},"./src/crypt/aes-decryptor.js":function(e,t){"use strict";function r(e){var t=e.byteLength,r=t&&new DataView(e).getUint8(t-1);return r?e.slice(0,t-r):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePadding=r;var i=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return e.prototype.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;4>i;i++)r[i]=t.getUint32(4*i);return r},e.prototype.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],u=o[1],d=o[2],c=o[3],f=new Uint32Array(256),h=0,p=0,g=0;for(g=0;256>g;g++)f[g]=128>g?g<<1:g<<1^283;for(g=0;256>g;g++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,e[h]=v,t[v]=h;var m=f[h],y=f[m],E=f[y],_=257*f[v]^16843008*v;i[h]=_<<24|_>>>8,a[h]=_<<16|_>>>16,n[h]=_<<8|_>>>24,s[h]=_,_=16843009*E^65537*y^257*m^16843008*h,l[v]=_<<24|_>>>8,u[v]=_<<16|_>>>16,d[v]=_<<8|_>>>24,c[v]=_,h?(h=m^f[f[f[E^m]]],p^=f[f[p]]):h=p=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;ir;r++)if(i.probe(e,r))return a.logger.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,r,s,o){for(var l=this._audioTrack,u=n.default.getID3Data(t,0)||[],d=n.default.getTimeStamp(u),c=e.isFinite(d)?90*d:9e4*r,f=0,h=c,p=t.length,g=u.length,v=[{pts:h,dts:h,data:u}];p-1>g;)if(i.isHeader(t,g)&&p>g+5){i.initTrackConfig(l,this.observer,t,g,l.manifestCodec);var m=i.appendFrame(l,t,g,c,f);if(!m){a.logger.log("Unable to parse AAC frame");break}g+=m.length,h=m.sample.pts,f++}else n.default.isHeader(t,g)?(u=n.default.getID3Data(t,g),v.push({pts:h,dts:h,data:u}),g+=u.length):g++;this.remuxer.remux(l,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},r,s,o)},t.prototype.destroy=function(){},t}();t.default=s}).call(this,r("./src/polyfills/number.js").Number)},"./src/demux/adts.js":function(e,t,r){"use strict";function i(e,t,r,i){var a,n,s,o,l,u=navigator.userAgent.toLowerCase(),d=i,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return a=((192&t[r+2])>>>6)+1,n=(60&t[r+2])>>>2,n>c.length-1?void e.trigger(g.default.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n}):(o=(1&t[r+2])<<2,o|=(192&t[r+3])>>>6,h.logger.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+n+"["+c[n]+"Hz],channelConfig:"+o),/firefox/i.test(u)?n>=6?(a=5,l=new Array(4),s=n-3):(a=2,l=new Array(2),s=n):-1!==u.indexOf("android")?(a=2,l=new Array(2),s=n):(a=5,l=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&n>=6?s=n-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(n>=6&&1===o||/vivaldi/i.test(u))||!i&&1===o)&&(a=2,l=new Array(2)),s=n)),l[0]=a<<3,l[0]|=(14&n)>>1,l[1]|=(1&n)<<7,l[1]|=o<<3,5===a&&(l[1]|=(14&s)>>1,l[2]=(1&s)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[n],channelCount:o,codec:"mp4a.40."+a,manifestCodec:d})}function a(e,t){return 255===e[t]&&240===(246&e[t+1])}function n(e,t){return 1&e[t+1]?7:9}function s(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function o(e,t){return t+10&&d>=t+o+l?(u=r+i*a,{headerLength:o,frameLength:l,stamp:u}):void 0}function f(e,t,r,i,a){var n=d(e.samplerate),s=c(t,r,i,a,n);if(s){var o=s.stamp,l=s.headerLength,u=s.frameLength,f={unit:t.subarray(r+l,r+l+u),pts:o,dts:o};return e.samples.push(f),e.len+=u,{sample:f,length:u+l}}return void 0}Object.defineProperty(t,"__esModule",{value:!0});var h=r("./src/utils/logger.js"),p=r("./src/errors.js"),g=r("./src/events.js");t.getAudioConfig=i,t.isHeaderPattern=a,t.getHeaderLength=n,t.getFullFrameLength=s,t.isHeader=o,t.probe=l,t.initTrackConfig=u,t.getFrameDuration=d,t.parseFrameHeader=c,t.appendFrame=f},"./src/demux/demuxer-inline.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=r("./src/events.js"),n=r("./src/errors.js"),s=r("./src/crypt/decrypter.js"),o=r("./src/demux/aacdemuxer.js"),l=r("./src/demux/mp4demuxer.js"),u=r("./src/demux/tsdemuxer.js"),d=r("./src/demux/mp3demuxer.js"),c=r("./src/remux/mp4-remuxer.js"),f=r("./src/remux/passthrough-remuxer.js"),h=r("./src/utils/get-self-scope.js"),p=r("./src/utils/logger.js"),g=h.getSelfScope();try{i=g.performance.now.bind(g.performance)}catch(v){p.logger.debug("Unable to use Performance API on this environment"),i=g.Date.now}var m=function(){function e(e,t,r,i){this.observer=e,this.typeSupported=t,this.config=r,this.vendor=i}return e.prototype.destroy=function(){var e=this.demuxer;e&&e.destroy()},e.prototype.push=function(e,t,r,n,o,l,u,d,c,f,h,p){var g=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var v=this.decrypter;null==v&&(v=this.decrypter=new s.default(this.observer,this.config));var m=i();v.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var s=i();g.observer.trigger(a.default.FRAG_DECRYPTED,{stats:{tstart:m,tdecrypt:s}}),g.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),n,o,l,u,d,c,f,h,p)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),n,o,l,u,d,c,f,h,p)},e.prototype.pushDecrypted=function(e,t,r,i,s,h,p,g,v,m,y,E){var _=this.demuxer;if(!_||(p||g)&&!this.probe(e)){for(var T=this.observer,S=this.typeSupported,b=this.config,A=[{demux:u.default,remux:c.default},{demux:l.default,remux:f.default},{demux:o.default,remux:c.default},{demux:d.default,remux:c.default}],R=0,D=A.length;D>R;R++){var L=A[R],w=L.demux.probe;if(w(e)){var O=this.remuxer=new L.remux(T,b,S,this.vendor);_=new L.demux(T,O,b,S),this.probe=w;break}}if(!_)return void T.trigger(a.default.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=_}var I=this.remuxer;(p||g)&&(_.resetInitSegment(r,i,s,m),I.resetInitSegment()),p&&(_.resetTimeStamp(E),I.resetTimeStamp(E)),"function"==typeof _.setDecryptData&&_.setDecryptData(t),_.append(e,h,v,y)},e}();t.default=m},"./src/demux/demuxer-worker.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/demux/demuxer-inline.js"),a=r("./src/events.js"),n=r("./src/utils/logger.js"),s=r("./node_modules/node-libs-browser/node_modules/events/events.js"),o=function(e){var t=new s.EventEmitter;t.trigger=function(e){for(var r=[],i=1;ie?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},e.prototype.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&i.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),t=e-t,t>0&&this.bitsAvailable?r<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},e.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},e.prototype.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},e.prototype.readBoolean=function(){return 1===this.readBits(1)},e.prototype.readUByte=function(){return this.readBits(8)},e.prototype.readUShort=function(){return this.readBits(16)},e.prototype.readUInt=function(){return this.readBits(32)},e.prototype.skipScalingList=function(e){var t,r,i=8,a=8;for(t=0;e>t;t++)0!==a&&(r=this.readEG(),a=(i+r+256)%256),i=0===a?i:a},e.prototype.readSPS=function(){var e,t,r,i,a,n,s,o,l,u=0,d=0,c=0,f=0,h=this.readUByte.bind(this),p=this.readBits.bind(this),g=this.readUEG.bind(this),v=this.readBoolean.bind(this),m=this.skipBits.bind(this),y=this.skipEG.bind(this),E=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);if(h(),e=h(),t=p(5),m(3),r=h(),E(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var T=g();if(3===T&&m(1),E(),E(),m(1),v())for(o=3!==T?8:12,l=0;o>l;l++)v()&&_(6>l?16:64)}E();var S=g();if(0===S)g();else if(1===S)for(m(1),y(),y(),i=g(),l=0;i>l;l++)y();E(),m(1),a=g(),n=g(),s=p(1),0===s&&m(1),m(1),v()&&(u=g(),d=g(),c=g(),f=g());var b=[1,1];if(v()&&v()){var A=h();switch(A){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[h()<<8|h(),h()<<8|h()]}}return{width:Math.ceil(16*(a+1)-2*u-2*d),height:(2-s)*(n+1)*16-(s?2:4)*(c+f),pixelRatio:b}},e.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=a},"./src/demux/id3.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128?!0:!1},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128?!0:!1},e.getID3Data=function(t,r){for(var i=r,a=0;e.isHeader(t,r);){a+=10;var n=e._readSize(t,r+6);a+=n,e.isFooter(t,r+10)&&(a+=10),r+=a}return a>0?t.subarray(i,i+a):void 0},e._readSize=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]},e.getTimeStamp=function(t){for(var r=e.getID3Frames(t),i=0;ir+8;){var s=e._getFrameData(t.subarray(r)),o=e._decodeFrame(s);o&&i.push(o),r+=s.size+10}e.isFooter(t,r)&&(r+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}return void 0},e._decodePrivFrame=function(t){if(t.size<2)return void 0;var r=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(r.length+1));return{key:t.type,info:r,data:i.buffer}},e._decodeTextFrame=function(t){if(t.size<2)return void 0;if("TXXX"===t.type){var r=1,i=e._utf8ArrayToStr(t.data.subarray(r));r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:n}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return void 0;var r=1,i=e._utf8ArrayToStr(t.data.subarray(r));r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data);return{key:t.type,data:n}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);for(var r,i,a,n=e.length,s="",o=0;n>o;){if(r=e[o++],0===r&&t)return s;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(r);break;case 12:case 13:i=e[o++],s+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=e[o++],a=e[o++],s+=String.fromCharCode((15&r)<<12|(63&i)<<6|(63&a)<<0)}}return s},e}(),i=r._utf8ArrayToStr;t.utf8ArrayToStr=i,t.default=r},"./src/demux/mp3demuxer.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/demux/id3.js"),a=r("./src/utils/logger.js"),n=r("./src/demux/mpegaudio.js"),s=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}return e.prototype.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},e.prototype.resetTimeStamp=function(){},e.probe=function(e){var t,r,s=i.default.getID3Data(e,0);if(s&&void 0!==i.default.getTimeStamp(s))for(t=s.length,r=Math.min(e.length-1,t+100);r>t;t++)if(n.default.probe(e,t))return a.logger.log("MPEG Audio sync word found !"),!0;return!1},e.prototype.append=function(e,t,r,a){for(var s=i.default.getID3Data(e,0),o=i.default.getTimeStamp(s),l=o?90*o:9e4*t,u=s.length,d=e.length,c=0,f=0,h=this._audioTrack,p=[{pts:l,dts:l,data:s}];d>u;)if(n.default.isHeader(e,u)){var g=n.default.appendFrame(h,e,u,l,c);if(!g)break;u+=g.length,f=g.sample.pts,c++}else i.default.isHeader(e,u)?(s=i.default.getID3Data(e,u),p.push({pts:f,dts:f,data:s}),u+=s.length):u++;this.remuxer.remux(h,{samples:[]},{samples:p,inputTimeScale:9e4},{samples:[]},t,r,a)},e.prototype.destroy=function(){},e}();t.default=s},"./src/demux/mp4demuxer.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/utils/logger.js"),a=r("./src/events.js"),n=Math.pow(2,32)-1,s=function(){function e(e,t){this.observer=e,this.remuxer=t}return e.prototype.resetTimeStamp=function(e){this.initPTS=e},e.prototype.resetInitSegment=function(t,r,i,n){if(t&&t.byteLength){var s=this.initData=e.parseInitSegment(t);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var o={};s.audio&&s.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:n?t:null}:(s.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:n?t:null}),s.video&&(o.video={container:"video/mp4",codec:i,initSegment:n?t:null})),this.observer.trigger(a.default.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<8|e[t+1];return 0>r?65536+r:r},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return 0>r?4294967296+r:r},e.writeUint32=function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},e.findBox=function(t,r){var i,a,n,s,o,l,u,d=[];if(t.data?(l=t.start,s=t.end,t=t.data):(l=0,s=t.byteLength),!r.length)return null;for(i=l;s>i;)a=e.readUint32(t,i),n=e.bin2str(t.subarray(i+4,i+8)),u=a>1?i+a:s,n===r[0]&&(1===r.length?d.push({data:t,start:i+8,end:u}):(o=e.findBox({data:t,start:i+8,end:u},r.slice(1)),o.length&&(d=d.concat(o)))),i=u;return d},e.parseSegmentIndex=function(t){var r,i=e.findBox(t,["moov"])[0],a=i?i.end:null,n=0,s=e.findBox(t,["sidx"]);if(!s||!s[0])return null;r=[],s=s[0];var o=s.data[0];n=0===o?8:16;var l=e.readUint32(s,n);n+=4;var u=0,d=0;n+=0===o?8:16,n+=2;var c=s.end+d,f=e.readUint16(s,n);n+=2;for(var h=0;f>h;h++){var p=n,g=e.readUint32(s,p);p+=4;var v=2147483647&g,m=(2147483648&g)>>>31;if(1===m)return void console.warn("SIDX has hierarchical references (not supported)");var y=e.readUint32(s,p);p+=4,r.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/l,start:c,end:c+v-1}}),c+=v,p+=4,n=p}return{earliestPresentationTime:u,timescale:l,version:o,referencesCount:f,references:r,moovEndOffset:a}},e.parseInitSegment=function(t){var r=[],a=e.findBox(t,["moov","trak"]);return a.forEach(function(t){var a=e.findBox(t,["tkhd"])[0];if(a){var n=a.data[a.start],s=0===n?12:20,o=e.readUint32(a,s),l=e.findBox(t,["mdia","mdhd"])[0];if(l){n=l.data[l.start],s=0===n?12:20;var u=e.readUint32(l,s),d=e.findBox(t,["mdia","hdlr"])[0];if(d){var c=e.bin2str(d.data.subarray(d.start+8,d.start+12)),f={soun:"audio",vide:"video"}[c];if(f){var h=e.findBox(t,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var p=e.bin2str(h.data.subarray(h.start+12,h.start+16));i.logger.log("MP4Demuxer:"+f+":"+p+" found")}r[o]={timescale:u,type:f},r[f]={timescale:u,id:o}}}}}}),r},e.getStartDTS=function(t,r){var i,a,n;return i=e.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return e.findBox(r,["tfhd"]).map(function(i){var a,n,s;return a=e.readUint32(i,4),n=t[a].timescale||9e4,s=e.findBox(r,["tfdt"]).map(function(t){var r,i;return r=t.data[t.start],i=e.readUint32(t,4),1===r&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i})[0],s/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},e.offsetStartDTS=function(t,r,i){e.findBox(r,["moof","traf"]).map(function(r){return e.findBox(r,["tfhd"]).map(function(a){var s=e.readUint32(a,4),o=t[s].timescale||9e4;e.findBox(r,["tfdt"]).map(function(t){var r=t.data[t.start],a=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,a-i*o);else{a*=Math.pow(2,32),a+=e.readUint32(t,8),a-=i*o,a=Math.max(a,0);var s=Math.floor(a/(n+1)),l=Math.floor(a%(n+1));e.writeUint32(t,4,s),e.writeUint32(t,8,l)}})})})},e.prototype.append=function(t,r,i,n){var s=this.initData;s||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),s=this.initData);var o,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(s,t);this.initPTS=l=u-r,this.observer.trigger(a.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(s,t,l),o=e.getStartDTS(s,t),this.remuxer.remux(s.audio,s.video,null,null,o,i,n,t)},e.prototype.destroy=function(){},e}();t.default=s},"./src/demux/mpegaudio.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,r,i,a){if(r+24>t.length)return void 0;var n=this.parseHeader(t,r);if(n&&r+n.frameLength<=t.length){var s=9e4*n.samplesPerFrame/n.sampleRate,o=i+a*s,l={unit:t.subarray(r,r+n.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=n.channelCount,e.samplerate=n.sampleRate,e.samples.push(l),e.len+=n.frameLength,{sample:l,length:n.frameLength}}return void 0},parseHeader:function(e,t){var i=e[t+1]>>3&3,a=e[t+1]>>1&3,n=e[t+2]>>4&15,s=e[t+2]>>2&3,o=e[t+2]>>1&1;if(1!==i&&0!==n&&15!==n&&3!==s){var l=3===i?3-a:3===a?3:4,u=1e3*r.BitratesMap[14*l+n-1],d=3===i?0:2===i?1:2,c=r.SamplingRateMap[3*d+s],f=e[t+3]>>6===3?1:2,h=r.SamplesCoefficients[i][a],p=r.BytesInSlot[a],g=8*h*p,v=parseInt(h*u/c+o,10)*p;return{sampleRate:c,channelCount:f,frameLength:v,samplesPerFrame:g}}return void 0},isHeaderPattern:function(e,t){return 255===e[t]&&224===(224&e[t+1])&&0!==(6&e[t+1])},isHeader:function(e,t){return t+1=e.length)return void r();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,i),!i)return}}},e.prototype.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),i=0,a=32;a<=e.length-16;a+=160,i+=16)r.set(e.subarray(a,a+16),i);return r},e.prototype.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(t.subarray(r,r+16),i);return e},e.prototype.decryptAvcSample=function(e,t,r,i,a,n){var s=this.discardEPB(a.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,function(o){a.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(e,t,r+1,i)})},e.prototype.decryptAvcSamples=function(e,t,r,i){for(;;t++,r=0){if(t>=e.length)return void i();for(var a=e[t].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,i,n,s),!s)return}}}},e}();t.default=a},"./src/demux/tsdemuxer.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/demux/adts.js"),a=r("./src/demux/mpegaudio.js"),n=r("./src/events.js"),s=r("./src/demux/exp-golomb.js"),o=r("./src/demux/sample-aes.js"),l=r("./src/utils/logger.js"),u=r("./src/errors.js"),d={video:1,audio:2,id3:3,text:4},c=function(){function e(e,t,r,i){this.observer=e,this.config=r,this.typeSupported=i,this.remuxer=t,this.sampleAes=null}return e.prototype.setDecryptData=function(e){this.sampleAes=null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?new o.default(this.observer,this.config,e,this.discardEPB):null},e.probe=function(t){var r=e._syncOffset(t);return 0>r?!1:(r&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),r=0;t>r;){if(71===e[r]&&71===e[r+188]&&71===e[r+376])return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:d[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===e?0:void 0,isAAC:"audio"===e?!0:void 0,duration:"audio"===e?t:void 0}},e.prototype.resetInitSegment=function(t,r,i,a){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",a),this._audioTrack=e.createTrack("audio",a),this._id3Track=e.createTrack("id3",a),this._txtTrack=e.createTrack("text",a),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=r,this.videoCodec=i,this._duration=a},e.prototype.resetTimeStamp=function(){},e.prototype.append=function(t,r,i,a){var s,o,d,c,f,h,p=t.length,g=!1;this.contiguous=i;var v=this.pmtParsed,m=this._avcTrack,y=this._audioTrack,E=this._id3Track,_=m.pid,T=y.pid,S=E.pid,b=this._pmtId,A=m.pesData,R=y.pesData,D=E.pesData,L=this._parsePAT,w=this._parsePMT,O=this._parsePES,I=this._parseAVCPES.bind(this),k=this._parseAACPES.bind(this),P=this._parseMPEGPES.bind(this),C=this._parseID3PES.bind(this),x=e._syncOffset(t);for(p-=(p+x)%188,s=x;p>s;s+=188)if(71===t[s]){if(o=!!(64&t[s+1]),d=((31&t[s+1])<<8)+t[s+2],c=(48&t[s+3])>>4,c>1){if(f=s+5+t[s+4],f===s+188)continue}else f=s+4;switch(d){case _:o&&(A&&(h=O(A))&&void 0!==h.pts&&I(h,!1),A={data:[],size:0}),A&&(A.data.push(t.subarray(f,s+188)),A.size+=s+188-f);break;case T:o&&(R&&(h=O(R))&&void 0!==h.pts&&(y.isAAC?k(h):P(h)),R={data:[],size:0}),R&&(R.data.push(t.subarray(f,s+188)),R.size+=s+188-f);break;case S:o&&(D&&(h=O(D))&&void 0!==h.pts&&C(h),D={data:[],size:0}),D&&(D.data.push(t.subarray(f,s+188)),D.size+=s+188-f);break;case 0:o&&(f+=t[f]+1),b=this._pmtId=L(t,f);break;case b:o&&(f+=t[f]+1);var F=w(t,f,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,null!=this.sampleAes);_=F.avc,_>0&&(m.pid=_),T=F.audio,T>0&&(y.pid=T,y.isAAC=F.isAAC),S=F.id3,S>0&&(E.pid=S),g&&!v&&(l.logger.log("reparse from beginning"),g=!1,s=x-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:g=!0}}else this.observer.trigger(n.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A&&(h=O(A))&&void 0!==h.pts?(I(h,!0),m.pesData=null):m.pesData=A,R&&(h=O(R))&&void 0!==h.pts?(y.isAAC?k(h):P(h),y.pesData=null):(R&&R.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=R),D&&(h=O(D))&&void 0!==h.pts?(C(h),E.pesData=null):E.pesData=D,null==this.sampleAes?this.remuxer.remux(y,m,E,this._txtTrack,r,i,a):this.decryptAndRemux(y,m,E,this._txtTrack,r,i,a) -},e.prototype.decryptAndRemux=function(e,t,r,i,a,n,s){if(e.samples&&e.isAAC){var o=this;this.sampleAes.decryptAacSamples(e.samples,0,function(){o.decryptAndRemuxAvc(e,t,r,i,a,n,s)})}else this.decryptAndRemuxAvc(e,t,r,i,a,n,s)},e.prototype.decryptAndRemuxAvc=function(e,t,r,i,a,n,s){if(t.samples){var o=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,function(){o.remuxer.remux(e,t,r,i,a,n,s)})}else this.remuxer.remux(e,t,r,i,a,n,s)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,r,i){var a,n,s,o,u={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=(15&e[t+1])<<8|e[t+2],n=t+3+a-4,s=(15&e[t+10])<<8|e[t+11],t+=12+s;n>t;){switch(o=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){l.logger.log("unkown stream type:"+e[t]);break}case 15:-1===u.audio&&(u.audio=o);break;case 21:-1===u.id3&&(u.id3=o);break;case 219:if(!i){l.logger.log("unkown stream type:"+e[t]);break}case 27:-1===u.avc&&(u.avc=o);break;case 3:case 4:r?-1===u.audio&&(u.audio=o,u.isAAC=!1):l.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:l.logger.warn("HEVC stream type found, not supported for now");break;default:l.logger.log("unkown stream type:"+e[t])}t+=((15&e[t+3])<<8|e[t+4])+5}return u},e.prototype._parsePES=function(e){var t,r,i,a,n,s,o,u,d,c=0,f=e.data;if(!e||0===e.size)return null;for(;f[0].length<19&&f.length>1;){var h=new Uint8Array(f[0].length+f[1].length);h.set(f[0]),h.set(f[1],f[0].length),f[0]=h,f.splice(1,1)}if(t=f[0],i=(t[0]<<16)+(t[1]<<8)+t[2],1===i){if(a=(t[4]<<8)+t[5],a&&a>e.size-6)return null;r=t[7],192&r&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,o>4294967295&&(o-=8589934592),64&r?(u=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,u>4294967295&&(u-=8589934592),o-u>54e5&&(l.logger.warn(Math.round((o-u)/9e4)+"s delta between PTS and DTS, align them"),o=u)):u=o),n=t[8],d=n+9,e.size-=d,s=new Uint8Array(e.size);for(var p=0,g=f.length;g>p;p++){t=f[p];var v=t.byteLength;if(d){if(d>v){d-=v;continue}t=t.subarray(d),v-=d,d=0}s.set(t,c),c+=v}return a&&(a-=n+3),{data:s,pts:o,dts:u,len:a}}return null},e.prototype.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var r=t.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||e.key===!0||t.sps&&(i||this.contiguous)?(e.id=i,r.push(e)):t.dropped++}e.debug.length&&l.logger.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var r,i,a,n=this,o=this._avcTrack,l=this._parseAVCNALu(e.data),u=!1,d=this.avcSample,c=!1,f=this.pushAccesUnit.bind(this),h=function(e,t,r,i){return{key:e,pts:t,dts:r,units:[],debug:i}};e.data=null,d&&l.length&&!o.audFound&&(f(d,o),d=this.avcSample=h(!1,e.pts,e.dts,"")),l.forEach(function(t){switch(t.type){case 1:i=!0,d||(d=n.avcSample=h(!0,e.pts,e.dts,"")),u&&(d.debug+="NDR "),d.frame=!0;var l=t.data;if(c&&l.length>4){var p=new s.default(l).readSliceType();(2===p||4===p||7===p||9===p)&&(d.key=!0)}break;case 5:i=!0,d||(d=n.avcSample=h(!0,e.pts,e.dts,"")),u&&(d.debug+="IDR "),d.key=!0,d.frame=!0;break;case 6:i=!0,u&&d&&(d.debug+="SEI "),r=new s.default(n.discardEPB(t.data)),r.readUByte();for(var g=0,v=0,m=!1,y=0;!m&&r.bytesAvailable>1;){g=0;do y=r.readUByte(),g+=y;while(255===y);v=0;do y=r.readUByte(),v+=y;while(255===y);if(4===g&&0!==r.bytesAvailable){m=!0;var E=r.readUByte();if(181===E){var _=r.readUShort();if(49===_){var T=r.readUInt();if(1195456820===T){var S=r.readUByte();if(3===S){var b=r.readUByte(),A=r.readUByte(),R=31&b,D=[b,A];for(a=0;R>a;a++)D.push(r.readUByte()),D.push(r.readUByte()),D.push(r.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:e.pts,bytes:D})}}}}}else if(va;a++)r.readUByte()}break;case 7:if(i=!0,c=!0,u&&d&&(d.debug+="SPS "),!o.sps){r=new s.default(t.data);var L=r.readSPS();o.width=L.width,o.height=L.height,o.pixelRatio=L.pixelRatio,o.sps=[t.data],o.duration=n._duration;var w=t.data.subarray(1,4),O="avc1.";for(a=0;3>a;a++){var I=w[a].toString(16);I.length<2&&(I="0"+I),O+=I}o.codec=O}break;case 8:i=!0,u&&d&&(d.debug+="PPS "),o.pps||(o.pps=[t.data]);break;case 9:i=!1,o.audFound=!0,d&&f(d,o),d=n.avcSample=h(!1,e.pts,e.dts,u?"AUD ":"");break;case 12:i=!1;break;default:i=!1,d&&(d.debug+="unknown NAL "+t.type+" ")}if(d&&i){var k=d.units;k.push(t)}}),t&&d&&(f(d,o),this.avcSample=null)},e.prototype._insertSampleInOrder=function(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var i=r-1;i>=0;i--)if(t.ptss;)if(t=e[s++],u)if(1!==u)if(t)if(1===t){if(f>=0)i={data:e.subarray(f,s-u-1),type:n},c.push(i);else{var h=this._getLastNalUnit();if(h&&(d&&4-d>=s&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-d)),r=s-u-1,r>0)){var p=new Uint8Array(h.data.byteLength+r);p.set(h.data,0),p.set(e.subarray(0,r),h.data.byteLength),h.data=p}}o>s?(a=31&e[s],f=s,n=a,u=0):u=-1}else u=0;else u=3;else u=t?0:2;else u=t?0:1;if(f>=0&&u>=0&&(i={data:e.subarray(f,o),type:n,state:u},c.push(i)),0===c.length){var h=this._getLastNalUnit();if(h){var p=new Uint8Array(h.data.byteLength+e.byteLength);p.set(h.data,0),p.set(e,h.data.byteLength),h.data=p}}return l.naluState=u,c},e.prototype.discardEPB=function(e){for(var t,r,i=e.byteLength,a=[],n=1;i-2>n;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(a.push(n+2),n+=2):n++;if(0===a.length)return e;t=i-a.length,r=new Uint8Array(t);var s=0;for(n=0;t>n;s++,n++)s===a[0]&&(s++,a.shift()),r[n]=e[s];return r},e.prototype._parseAACPES=function(e){var t,r,a,s,o,d=this._audioTrack,c=e.data,f=e.pts,h=0,p=this.aacOverFlow,g=this.aacLastPTS;if(p){var v=new Uint8Array(p.byteLength+c.byteLength);v.set(p,0),v.set(c,p.byteLength),c=v}for(a=h,o=c.length;o-1>a&&!i.isHeader(c,a);a++);if(a){var m=void 0,y=void 0;if(o-1>a?(m="AAC PES did not start with ADTS header,offset:"+a,y=!1):(m="no ADTS header found in AAC PES",y=!0),l.logger.warn("parsing error:"+m),this.observer.trigger(n.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:y,reason:m}),y)return}if(i.initTrackConfig(d,this.observer,c,a,this.audioCodec),r=0,t=i.getFrameDuration(d.samplerate),p&&g){var E=g+t;Math.abs(E-f)>1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((E-f)/90)),f=E)}for(;o>a;)if(i.isHeader(c,a)&&o>a+5){var _=i.appendFrame(d,c,a,f,r);if(!_)break;a+=_.length,s=_.sample.pts,r++}else a++;p=o>a?c.subarray(a,o):null,this.aacOverFlow=p,this.aacLastPTS=s},e.prototype._parseMPEGPES=function(e){for(var t=e.data,r=t.length,i=0,n=0,s=e.pts;r>n;)if(a.default.isHeader(t,n)){var o=a.default.appendFrame(this._audioTrack,t,n,s,i);if(!o)break;n+=o.length,i++}else n++},e.prototype._parseID3PES=function(e){this._id3Track.samples.push(e)},e}();t.default=c},"./src/errors.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},t.ErrorDetails={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},"./src/event-handler.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/utils/logger.js"),a=r("./src/errors.js"),n=r("./src/events.js"),s={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},o=function(){function e(e){for(var t=[],r=1;ra;a++){var n=t[a].realBitrate?Math.max(t[a].realBitrate,t[a].bitrate):t[a].bitrate;if(n>r)return a}return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxAutoLevel",{get:function(){var e,t=this,r=t.levels,i=t.autoLevelCapping;return e=-1===i&&r&&r.length?r.length-1:i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextAutoLevel",{get:function(){var e=this;return Math.min(Math.max(e.abrController.nextAutoLevel,e.minAutoLevel),e.maxAutoLevel)},set:function(e){var t=this;t.abrController.nextAutoLevel=Math.max(t.minAutoLevel,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTracks",{get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"audioTrack",{get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"liveSyncPosition",{get:function(){return this.streamController.liveSyncPosition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTracks",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleTrack",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subtitleDisplay",{get:function(){var e=this.subtitleTrackController;return e?e.subtitleDisplay:!1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)},enumerable:!0,configurable:!0}),t}(m.Observer);t.default=y},"./src/is-supported.js":function(e,t,r){"use strict";function i(){var e=a.getMediaSource(),t=window.SourceBuffer||window.WebKitSourceBuffer,r=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!r&&!!i}Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/utils/mediasource-helper.js");t.isSupported=i},"./src/loader/fragment-loader.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=r("./src/errors.js"),o=r("./src/utils/logger.js"),l=function(t){function r(e){var r=t.call(this,e,a.default.FRAG_LOADING)||this;return r.loaders={},r}return i(r,t),r.prototype.destroy=function(){var e=this.loaders;for(var r in e){var i=e[r];i&&i.destroy()}this.loaders={},t.prototype.destroy.call(this)},r.prototype.onFragLoading=function(t){var r=t.frag,i=r.type,a=this.loaders,n=this.hls.config,s=n.fLoader,l=n.loader;r.loaded=0;var u=a[i];u&&(o.logger.warn("abort previous fragment loader for type: "+i),u.abort()),u=a[i]=r.loader=n.fLoader?new s(n):new l(n);var d,c,f;d={url:r.url,frag:r,responseType:"arraybuffer",progressData:!1};var h=r.byteRangeStartOffset,p=r.byteRangeEndOffset;e.isFinite(h)&&e.isFinite(p)&&(d.rangeStart=h,d.rangeEnd=p),c={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:n.fragLoadingMaxRetryTimeout},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},u.load(d,c,f)},r.prototype.loadsuccess=function(e,t,r,i){void 0===i&&(i=null);var n=e.data,s=r.frag;s.loader=void 0,this.loaders[s.type]=void 0,this.hls.trigger(a.default.FRAG_LOADED,{payload:n,frag:s,stats:t,networkDetails:i})},r.prototype.loaderror=function(e,t,r){void 0===r&&(r=null);var i=t.frag,n=i.loader;n&&n.abort(),this.loaders[i.type]=void 0,this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:r})},r.prototype.loadtimeout=function(e,t,r){void 0===r&&(r=null);var i=t.frag,n=i.loader;n&&n.abort(),this.loaders[i.type]=void 0,this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:r})},r.prototype.loadprogress=function(e,t,r,i){void 0===i&&(i=null);var n=t.frag;n.loaded=e.loaded,this.hls.trigger(a.default.FRAG_LOAD_PROGRESS,{frag:n,stats:e,networkDetails:i})},r}(n.default);t.default=l}).call(this,r("./src/polyfills/number.js").Number)},"./src/loader/fragment.js":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i=r("./node_modules/url-toolkit/src/url-toolkit.js"),a=r("./src/loader/level-key.js"),n=function(){function t(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this.programDateTime=null,this.rawProgramDateTime=null,this._elementaryStreams=(e={},e[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return Object.defineProperty(t,"ElementaryStreamTypes",{get:function(){return{AUDIO:"audio",VIDEO:"video"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return!this._url&&this.relurl&&(this._url=i.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRange",{get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var e=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var r=this.lastByteRangeEndOffset;e[0]=r||0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0],this._byteRange=e}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeStartOffset",{get:function(){return this.byteRange[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"byteRangeEndOffset",{get:function(){return this.byteRange[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"decryptdata",{get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endProgramDateTime",{get:function(){if(!e.isFinite(this.programDateTime))return null;var t=e.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encrypted",{get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)},enumerable:!0,configurable:!0}),t.prototype.addElementaryStream=function(e){this._elementaryStreams[e]=!0},t.prototype.hasElementaryStream=function(e){return this._elementaryStreams[e]===!0},t.prototype.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;16>r;r++)t[r]=e>>8*(15-r)&255;return t},t.prototype.fragmentDecryptdataFromLevelkey=function(e,t){var r=e;return e&&e.method&&e.uri&&!e.iv&&(r=new a.default,r.method=e.method,r.baseuri=e.baseuri,r.reluri=e.reluri,r.iv=this.createInitializationVector(t)),r},t}();t.default=n}).call(this,r("./src/polyfills/number.js").Number)},"./src/loader/key-loader.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=r("./src/errors.js"),o=r("./src/utils/logger.js"),l=function(e){function t(t){var r=e.call(this,t,a.default.KEY_LOADING)||this;return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return i(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},n.default.prototype.destroy.call(this)},t.prototype.onKeyLoading=function(e){var t=e.frag,r=t.type,i=this.loaders[r],n=t.decryptdata,s=n.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;i&&(o.logger.warn("abort previous key loader for type:"+r),i.abort()),t.loader=this.loaders[r]=new l.loader(l),this.decrypturl=s,this.decryptkey=null;var u=void 0,d=void 0,c=void 0;u={url:s,frag:t,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(u,d,c)}else this.decryptkey&&(n.key=this.decryptkey,this.hls.trigger(a.default.KEY_LOADED,{frag:t}))},t.prototype.loadsuccess=function(e,t,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(a.default.KEY_LOADED,{frag:i})},t.prototype.loaderror=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},t.prototype.loadtimeout=function(e,t){var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[t.type]=void 0,this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}(n.default);t.default=l},"./src/loader/level-key.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./node_modules/url-toolkit/src/url-toolkit.js"),a=function(){function e(){this.method=null,this.key=null,this.iv=null,this._uri=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return!this._uri&&this.reluri&&(this._uri=i.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri},enumerable:!0,configurable:!0}),e}();t.default=a},"./src/loader/level.js":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function t(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}return Object.defineProperty(t.prototype,"hasProgramDateTime",{get:function(){return!(!this.fragments[0]||!e.isFinite(this.fragments[0].programDateTime))},enumerable:!0,configurable:!0}),t}();t.default=r}).call(this,r("./src/polyfills/number.js").Number)},"./src/loader/m3u8-parser.js":function(e,t,r){"use strict";(function(e){function i(e,t){for(var r=e[t],i=t-1;i>=0;i--){var a=e[i];a.programDateTime=r.programDateTime-1e3*a.duration,r=a}}function a(t,r){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):r&&r.programDateTime&&(t.programDateTime=r.endProgramDateTime),e.isFinite(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}Object.defineProperty(t,"__esModule",{value:!0});var n=r("./node_modules/url-toolkit/src/url-toolkit.js"),s=r("./src/loader/fragment.js"),o=r("./src/loader/level.js"),l=r("./src/loader/level-key.js"),u=r("./src/utils/attr-list.js"),d=r("./src/utils/logger.js"),c=r("./src/utils/codecs.js"),f=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,h=/#EXT-X-MEDIA:(.*)/g,p=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),g=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,v=/\.(mp4|m4s|m4v|m4a)$/i,m=function(){function t(){}return t.findGroup=function(e,t){if(!e)return null;for(var r=null,i=0;i2?(t=r.shift()+".",t+=parseInt(r.shift()).toString(16),t+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):t=e,t},t.resolve=function(e,t){return n.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){function i(e,t){["video","audio"].forEach(function(r){var i=e.filter(function(e){return c.isCodecType(e,r)});if(i.length){var a=i.filter(function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)});t[r+"Codec"]=a.length>0?a[0]:i[0],e=e.filter(function(e){return-1===i.indexOf(e) -})}}),t.unknownCodecs=e}var a,n=[];for(f.lastIndex=0;null!=(a=f.exec(e));){var s={},o=s.attrs=new u.default(a[1]);s.url=t.resolve(a[2],r);var l=o.decimalResolution("RESOLUTION");l&&(s.width=l.width,s.height=l.height),s.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),s.name=o.NAME,i([].concat((o.CODECS||"").split(/[ ,]+/)),s),s.videoCodec&&-1!==s.videoCodec.indexOf("avc1")&&(s.videoCodec=t.convertAVC1ToAVCOTI(s.videoCodec)),n.push(s)}return n},t.parseMasterPlaylistMedia=function(e,r,i,a){void 0===a&&(a=[]);var n,s=[],o=0;for(h.lastIndex=0;null!==(n=h.exec(e));){var l={},d=new u.default(n[1]);if(d.TYPE===i){if(l.groupId=d["GROUP-ID"],l.name=d.NAME,l.type=i,l.default="YES"===d.DEFAULT,l.autoselect="YES"===d.AUTOSELECT,l.forced="YES"===d.FORCED,d.URI&&(l.url=t.resolve(d.URI,r)),l.lang=d.LANGUAGE,l.name||(l.name=l.lang),a.length){var c=t.findGroup(a,l.groupId);l.audioCodec=c?c.codec:a[0].codec}l.id=o++,s.push(l)}}return s},t.parseLevelPlaylist=function(t,r,n,c,f){var h,m,y=0,E=0,_=new o.default(r),T=new l.default,S=0,b=null,A=new s.default,R=null;for(p.lastIndex=0;null!==(h=p.exec(t));){var D=h[1];if(D){A.duration=parseFloat(D);var L=(" "+h[2]).slice(1);A.title=L||null,A.tagList.push(L?["INF",D,L]:["INF",D])}else if(h[3]){if(e.isFinite(A.duration)){var w=y++;A.type=c,A.start=E,A.levelkey=T,A.sn=w,A.level=n,A.cc=S,A.urlId=f,A.baseurl=r,A.relurl=(" "+h[3]).slice(1),a(A,b),_.fragments.push(A),b=A,E+=A.duration,A=new s.default}}else if(h[4]){if(A.rawByteRange=(" "+h[4]).slice(1),b){var O=b.byteRangeEndOffset;O&&(A.lastByteRangeEndOffset=O)}}else if(h[5])A.rawProgramDateTime=(" "+h[5]).slice(1),A.tagList.push(["PROGRAM-DATE-TIME",A.rawProgramDateTime]),null===R&&(R=_.fragments.length);else{for(h=h[0].match(g),m=1;m=0&&(T.method=x,T.baseuri=r,T.reluri=F,T.key=null,T.iv=M));break;case"START":var N=I,j=new u.default(N),U=j.decimalFloatingPoint("TIME-OFFSET");e.isFinite(U)&&(_.startTimeOffset=U);break;case"MAP":var B=new u.default(I);A.relurl=B.URI,A.rawByteRange=B.BYTERANGE,A.baseurl=r,A.level=n,A.type=c,A.sn="initSegment",_.initSegment=A,A=new s.default,A.rawProgramDateTime=_.initSegment.rawProgramDateTime;break;default:d.logger.warn("line parsed but not handled: "+h)}}}return A=b,A&&!A.relurl&&(_.fragments.pop(),E-=A.duration),_.totalduration=E,_.averagetargetduration=E/_.fragments.length,_.endSN=y-1,_.startCC=_.fragments[0]?_.fragments[0].cc:0,_.endCC=S,!_.initSegment&&_.fragments.length&&_.fragments.every(function(e){return v.test(e.relurl)})&&(d.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),A=new s.default,A.relurl=_.fragments[0].relurl,A.baseurl=r,A.level=n,A.type=c,A.sn="initSegment",_.initSegment=A,_.needSidxRanges=!0),R&&i(_.fragments,R),_},t}();t.default=m}).call(this,r("./src/polyfills/number.js").Number)},"./src/loader/playlist-loader.js":function(e,t,r){"use strict";(function(e){var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/events.js"),n=r("./src/event-handler.js"),s=r("./src/errors.js"),o=r("./src/utils/logger.js"),l=r("./src/demux/mp4demuxer.js"),u=r("./src/loader/m3u8-parser.js"),d=window.performance,c={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},f={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},h=function(t){function r(e){var r=t.call(this,e,a.default.MANIFEST_LOADING,a.default.LEVEL_LOADING,a.default.AUDIO_TRACK_LOADING,a.default.SUBTITLE_TRACK_LOADING)||this;return r.loaders={},r}return i(r,t),Object.defineProperty(r,"ContextType",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(r,"LevelType",{get:function(){return f},enumerable:!0,configurable:!0}),r.canHaveQualityLevels=function(e){return e!==c.AUDIO_TRACK&&e!==c.SUBTITLE_TRACK},r.mapContextToLevelType=function(e){var t=e.type;switch(t){case c.AUDIO_TRACK:return f.AUDIO;case c.SUBTITLE_TRACK:return f.SUBTITLE;default:return f.MAIN}},r.getResponseUrl=function(e,t){var r=e.url;return(void 0===r||0===r.indexOf("data:"))&&(r=t.url),r},r.prototype.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,i=t.loader,a=r||i,n=new a(t);return e.loader=n,this.loaders[e.type]=n,n},r.prototype.getInternalLoader=function(e){return this.loaders[e.type]},r.prototype.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},r.prototype.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},r.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},r.prototype.onManifestLoading=function(e){this.load(e.url,{type:c.MANIFEST,level:0,id:null})},r.prototype.onLevelLoading=function(e){this.load(e.url,{type:c.LEVEL,level:e.level,id:e.id})},r.prototype.onAudioTrackLoading=function(e){this.load(e.url,{type:c.AUDIO_TRACK,level:null,id:e.id})},r.prototype.onSubtitleTrackLoading=function(e){this.load(e.url,{type:c.SUBTITLE_TRACK,level:null,id:e.id})},r.prototype.load=function(e,t){var r=this.hls.config;o.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var i=this.getInternalLoader(t);if(i){var a=i.context;if(a&&a.url===e)return o.logger.trace("playlist request ongoing"),!1;o.logger.warn("aborting previous loader for type: "+t.type),i.abort()}var n,s,l,u;switch(t.type){case c.MANIFEST:n=r.manifestLoadingMaxRetry,s=r.manifestLoadingTimeOut,l=r.manifestLoadingRetryDelay,u=r.manifestLoadingMaxRetryTimeout;break;case c.LEVEL:n=0,s=r.levelLoadingTimeOut;break;default:n=r.levelLoadingMaxRetry,s=r.levelLoadingTimeOut,l=r.levelLoadingRetryDelay,u=r.levelLoadingMaxRetryTimeout}i=this.createInternalLoader(t),t.url=e,t.responseType=t.responseType||"";var d={timeout:s,maxRetry:n,retryDelay:l,maxRetryDelay:u},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return o.logger.debug("Calling internal loader delegate for URL: "+e),i.load(t,d,f),!0},r.prototype.loadsuccess=function(e,t,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this._handleSidxRequest(e,r),void this._handlePlaylistLoaded(e,t,r,i);this.resetInternalLoader(r.type);var a=e.data;return t.tload=d.now(),0!==a.indexOf("#EXTM3U")?void this._handleManifestParsingError(e,r,"no EXTM3U delimiter",i):void(a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,r,i):this._handleMasterPlaylist(e,t,r,i))},r.prototype.loaderror=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!1,e)},r.prototype.loadtimeout=function(e,t,r){void 0===r&&(r=null),this._handleNetworkError(t,r,!0)},r.prototype._handleMasterPlaylist=function(e,t,i,n){var s=this.hls,l=e.data,d=r.getResponseUrl(e,i),c=u.default.parseMasterPlaylist(l,d);if(!c.length)return void this._handleManifestParsingError(e,i,"no level found in manifest",n);var f=c.map(function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}}),h=u.default.parseMasterPlaylistMedia(l,d,"AUDIO",f),p=u.default.parseMasterPlaylistMedia(l,d,"SUBTITLES");if(h.length){var g=!1;h.forEach(function(e){e.url||(g=!0)}),g===!1&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(o.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),h.unshift({type:"main",name:"main"}))}s.trigger(a.default.MANIFEST_LOADED,{levels:c,audioTracks:h,subtitles:p,url:d,stats:t,networkDetails:n})},r.prototype._handleTrackOrLevelPlaylist=function(t,i,n,s){var o=this.hls,l=n.id,f=n.level,h=n.type,p=r.getResponseUrl(t,n),g=e.isFinite(l)?l:0,v=e.isFinite(f)?f:g,m=r.mapContextToLevelType(n),y=u.default.parseLevelPlaylist(t.data,p,v,m,g);if(y.tload=i.tload,h===c.MANIFEST){var E={url:p,details:y};o.trigger(a.default.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:p,stats:i,networkDetails:s})}if(i.tparsed=d.now(),y.needSidxRanges){var _=y.initSegment.url;return void this.load(_,{isSidxRequest:!0,type:h,level:f,levelDetails:y,id:l,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}n.levelDetails=y,this._handlePlaylistLoaded(t,i,n,s)},r.prototype._handleSidxRequest=function(e,t){var r=l.default.parseSegmentIndex(new Uint8Array(e.data));if(r){var i=r.references,a=t.levelDetails;i.forEach(function(e,t){var r=e.info,i=a.fragments[t];0===i.byteRange.length&&(i.rawByteRange=String(1+r.end-r.start)+"@"+String(r.start))}),a.initSegment.rawByteRange=String(r.moovEndOffset)+"@0"}},r.prototype._handleManifestParsingError=function(e,t,r,i){this.hls.trigger(a.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:r,networkDetails:i})},r.prototype._handleNetworkError=function(e,t,r,i){void 0===r&&(r=!1),void 0===i&&(i=null),o.logger.info("A network error occured while loading a "+e.type+"-type playlist");var n,l,u=this.getInternalLoader(e);switch(e.type){case c.MANIFEST:n=r?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.LEVEL:n=r?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.AUDIO_TRACK:n=r?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;default:l=!1}u&&(u.abort(),this.resetInternalLoader(e.type));var d={type:s.ErrorTypes.NETWORK_ERROR,details:n,fatal:l,url:u.url,loader:u,context:e,networkDetails:t};i&&(d.response=i),this.hls.trigger(a.default.ERROR,d)},r.prototype._handlePlaylistLoaded=function(e,t,i,n){var s=i.type,o=i.level,l=i.id,u=i.levelDetails;if(!u.targetduration)return void this._handleManifestParsingError(e,i,"invalid target duration",n);var d=r.canHaveQualityLevels(i.type);if(d)this.hls.trigger(a.default.LEVEL_LOADED,{details:u,level:o||0,id:l||0,stats:t,networkDetails:n});else switch(s){case c.AUDIO_TRACK:this.hls.trigger(a.default.AUDIO_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n});break;case c.SUBTITLE_TRACK:this.hls.trigger(a.default.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:t,networkDetails:n})}},r}(n.default);t.default=h}).call(this,r("./src/polyfills/number.js").Number)},"./src/observer.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./node_modules/eventemitter3/index.js"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.trigger=function(e){for(var t=[],r=1;r>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),a=0,i=8;n>a;a++)t.set(r[a],i),i+=r[a].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,i){i*=t;var a=Math.floor(i/(r+1)),n=Math.floor(i%(r+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,a>>24,a>>16&255,a>>8&255,255&a,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))},e.moov=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,i){i*=t;var a=Math.floor(i/(r+1)),n=Math.floor(i%(r+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,a>>24,a>>16&255,a>>8&255,255&a,n>>24,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,s)},e.sdtp=function(t){var r,i,a=t.samples||[],n=new Uint8Array(4+a.length);for(i=0;i>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|t.sps.length].concat(n).concat([t.pps.length]).concat(s))),l=t.width,u=t.height,d=t.pixelRatio[0],c=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var r=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var r=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var i=t.id,a=t.duration*t.timescale,n=t.width,s=t.height,o=Math.floor(a/(r+1)),l=Math.floor(a%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,255&n,0,0,s>>8&255,255&s,0,0]))},e.traf=function(t,i){var a=e.sdtp(t),n=t.id,s=Math.floor(i/(r+1)),o=Math.floor(i%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,a.length+16+20+8+16+8+8),a)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var i,a,n,s,o,l,u=t.samples||[],d=u.length,c=12+16*d,f=new Uint8Array(c);for(r+=8+c,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;d>i;i++)a=u[i],n=a.duration,s=a.size,o=a.flags,l=a.cts,f.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var r,i=e.moov(t);return r=new Uint8Array(e.FTYP.byteLength+i.byteLength),r.set(e.FTYP),r.set(i,e.FTYP.byteLength),r},e}();t.default=i},"./src/remux/mp4-remuxer.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/remux/aac-helper.js"),a=r("./src/remux/mp4-generator.js"),n=r("./src/events.js"),s=r("./src/errors.js"),o=r("./src/utils/logger.js"),l=1e4,u=function(){function e(e,t,r,i){this.observer=e,this.config=t,this.typeSupported=r;var a=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&a&&!a.match("CriOS"),this.ISGenerated=!1}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},e.prototype.resetInitSegment=function(){this.ISGenerated=!1},e.prototype.remux=function(e,t,r,i,a,s,l){if(this.ISGenerated||this.generateIS(e,t,a),this.ISGenerated){var u=e.samples.length,d=t.samples.length,c=a,f=a;if(u&&d){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;c+=Math.max(0,h),f+=Math.max(0,-h)}if(u){e.timescale||(o.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,a));var p=this.remuxAudio(e,c,s,l);if(d){var g=void 0;p&&(g=p.endPTS-p.startPTS),t.timescale||(o.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,a)),this.remuxVideo(t,f,s,g,l)}}else if(d){var v=this.remuxVideo(t,f,s,0,l);v&&e.codec&&this.remuxEmptyAudio(e,c,s,v)}}r.samples.length&&this.remuxID3(r,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(n.default.FRAG_PARSED)},e.prototype.generateIS=function(e,t,r){var i,l,u=this.observer,d=e.samples,c=t.samples,f=this.typeSupported,h="audio/mp4",p={},g={tracks:p},v=void 0===this._initPTS;if(v&&(i=l=1/0),e.config&&d.length&&(e.timescale=e.samplerate,o.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(f.mpeg?(h="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),p.audio={container:h,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array:a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},v&&(i=l=d[0].pts-e.inputTimeScale*r)),t.sps&&t.pps&&c.length){var m=t.inputTimeScale;t.timescale=m,p.video={container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},v&&(i=Math.min(i,c[0].pts-m*r),l=Math.min(l,c[0].dts-m*r),this.observer.trigger(n.default.INIT_PTS_FOUND,{initPTS:i}))}Object.keys(p).length?(u.trigger(n.default.FRAG_PARSING_INIT_SEGMENT,g),this.ISGenerated=!0,v&&(this._initPTS=i,this._initDTS=l)):u.trigger(n.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,r,i,l){var u,d,c,f,h,p,g,v=8,m=e.timescale,y=e.samples,E=[],_=y.length,T=this._PTSNormalize,S=this._initPTS,b=this.nextAvcDts,A=this.isSafari;if(0!==_){A&&(r|=y.length&&b&&(l&&Math.abs(t-b/m)<.1||Math.abs(y[0].pts-b-S)R){o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(R/90)+" ms to overcome this issue");for(var D=0;D1?o.logger.log("AVC:"+w+" ms hole between fragments detected,filling it"):-1>w&&o.logger.log("AVC:"+-w+" ms overlapping between fragments detected"),h=b,y[0].dts=h,f=Math.max(f-w,b),y[0].pts=f,o.logger.log("Video/PTS/DTS adjusted: "+Math.round(f/90)+"/"+Math.round(h/90)+",delta:"+w+" ms")),L=y[y.length-1],g=Math.max(L.dts,0),p=Math.max(L.pts,0,g),A&&(u=Math.round((g-h)/(y.length-1)));for(var O=0,I=0,D=0;_>D;D++){for(var k=y[D],P=k.units,C=P.length,x=0,F=0;C>F;F++)x+=P[F].data.length;I+=x,O+=C,k.length=x,k.dts=A?h+D*u:Math.max(k.dts,h),k.pts=Math.max(k.pts,k.dts)}var M=I+4*O+8;try{d=new Uint8Array(M)}catch(N){return void this.observer.trigger(n.default.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:M,reason:"fail allocating video mdat "+M})}var j=new DataView(d.buffer);j.setUint32(0,M),d.set(a.default.types.mdat,4);for(var D=0;_>D;D++){for(var U=y[D],B=U.units,G=0,K=void 0,F=0,C=B.length;C>F;F++){var H=B[F],V=H.data,W=H.data.byteLength;j.setUint32(v,W),v+=4,d.set(V,v),v+=W,G+=4+W}if(A)K=Math.max(0,u*Math.round((U.pts-U.dts)/u));else{if(_-1>D)u=y[D+1].dts-U.dts;else{var Y=this.config,q=U.dts-y[D>0?D-1:D].dts;if(Y.stretchShortVideoTrack){var X=Y.maxBufferHole,z=Math.floor(X*m),Q=(i?f+i*m:this.nextAudioPts)-U.pts;Q>z?(u=Q-q,0>u&&(u=q),o.logger.log("It is approximately "+Q/90+" ms to the next segment; using duration "+u/90+" ms for the last video frame.")):u=q}else u=q}K=Math.round(U.pts-U.dts)}E.push({size:G,duration:u,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:U.key?2:1,isNonSync:U.key?0:1}})}this.nextAvcDts=g+u;var $=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,E.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var J=E[0].flags;J.dependsOn=2,J.isNonSync=0}e.samples=E,c=a.default.moof(e.sequenceNumber++,h,e),e.samples=[];var Z={data1:c,data2:d,startPTS:f/m,endPTS:(p+u)/m,startDTS:h/m,endDTS:this.nextAvcDts/m,type:"video",hasAudio:!1,hasVideo:!0,nb:E.length,dropped:$};return this.observer.trigger(n.default.FRAG_PARSING_DATA,Z),Z}},e.prototype.remuxAudio=function(e,t,r,u){var d,c,f,h,p,g,v,m=e.inputTimeScale,y=e.timescale,E=m/y,_=e.isAAC?1024:1152,T=_*E,S=this._PTSNormalize,b=this._initPTS,A=!e.isAAC&&this.typeSupported.mpeg,R=e.samples,D=[],L=this.nextAudioPts;if(r|=R.length&&L&&(u&&Math.abs(t-L/m)<.1||Math.abs(R[0].pts-L-b)<20*T),R.forEach(function(e){e.pts=e.dts=S(e.pts-b,t*m)}),R=R.filter(function(e){return e.pts>=0}),0!==R.length){if(r||(L=u?t*m:R[0].pts),e.isAAC)for(var w=this.config.maxAudioFramesDrift,O=0,I=L;O=k)o.logger.warn("Dropping 1 audio frame @ "+(I/m).toFixed(3)+"s due to "+Math.round(x)+" ms overlap."),R.splice(O,1),e.len-=P.unit.length;else if(k>=w*T&&l>x&&I){var F=Math.round(k/T);o.logger.warn("Injecting "+F+" audio frame @ "+(I/m).toFixed(3)+"s due to "+Math.round(1e3*k/m)+" ms gap.");for(var M=0;F>M;M++){var N=Math.max(I,0);f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),f||(o.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),f=P.unit.subarray()),R.splice(O,0,{unit:f,pts:N,dts:N}),e.len+=f.length,I+=T,O++}P.pts=P.dts=I,I+=T,O++}else Math.abs(k)>.1*T,P.pts=P.dts=I,I+=T,O++}for(var M=0,j=R.length;j>M;M++){var U=R[M],B=U.unit,C=U.pts;if(void 0!==v)c.duration=Math.round((C-v)/E);else{var G=Math.round(1e3*(C-L)/m),K=0;if(r&&e.isAAC&&G){if(G>0&&l>G)K=Math.round((C-L)/T),o.logger.log(G+" ms hole between AAC samples detected,filling it"),K>0&&(f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),f||(f=B.subarray()),e.len+=K*f.length);else if(-12>G){o.logger.log("drop overlapping AAC sample, expected/parsed/delta:"+(L/m).toFixed(3)+"s/"+(C/m).toFixed(3)+"s/"+-G+"ms"),e.len-=B.byteLength;continue}C=L}if(g=C,!(e.len>0))return;var H=A?e.len:e.len+8;d=A?0:8;try{h=new Uint8Array(H)}catch(V){return void this.observer.trigger(n.default.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:H,reason:"fail allocating audio mdat "+H})}if(!A){var W=new DataView(h.buffer);W.setUint32(0,H),h.set(a.default.types.mdat,4)}for(var O=0;K>O;O++)f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount),f||(o.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),f=B.subarray()),h.set(f,d),d+=f.byteLength,c={size:f.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},D.push(c)}h.set(B,d);var Y=B.byteLength;d+=Y,c={size:Y,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},D.push(c),v=C}var q=0,X=D.length;if(X>=2&&(q=D[X-2].duration,c.duration=q),X){this.nextAudioPts=L=v+E*q,e.len=0,e.samples=D,p=A?new Uint8Array:a.default.moof(e.sequenceNumber++,g/E,e),e.samples=[];var z=g/m,Q=L/m,$={data1:p,data2:h,startPTS:z,endPTS:Q,startDTS:z,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:X};return this.observer.trigger(n.default.FRAG_PARSING_DATA,$),$}return null}},e.prototype.remuxEmptyAudio=function(e,t,r,a){var n=e.inputTimeScale,s=e.samplerate?e.samplerate:n,l=n/s,u=this.nextAudioPts,d=(void 0!==u?u:a.startDTS*n)+this._initDTS,c=a.endDTS*n+this._initDTS,f=1024,h=l*f,p=Math.ceil((c-d)/h),g=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(o.logger.warn("remux empty Audio"),!g)return void o.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var v=[],m=0;p>m;m++){var y=d+m*h;v.push({unit:g,pts:y,dts:y}),e.len+=g.length}e.samples=v,this.remuxAudio(e,t,r)},e.prototype.remuxID3=function(e){var t,r=e.samples.length,i=e.inputTimeScale,a=this._initPTS,s=this._initDTS;if(r){for(var o=0;r>o;o++)t=e.samples[o],t.pts=(t.pts-a)/i,t.dts=(t.dts-s)/i;this.observer.trigger(n.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},e.prototype.remuxText=function(e){e.samples.sort(function(e,t){return e.pts-t.pts});var t,r=e.samples.length,i=e.inputTimeScale,a=this._initPTS;if(r){for(var s=0;r>s;s++)t=e.samples[s],t.pts=(t.pts-a)/i;this.observer.trigger(n.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},e.prototype._PTSNormalize=function(e,t){var r;if(void 0===t)return e;for(r=e>t?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e},e}();t.default=u},"./src/remux/passthrough-remuxer.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/events.js"),a=function(){function e(e){this.observer=e}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(){},e.prototype.resetInitSegment=function(){},e.prototype.remux=function(e,t,r,a,n,s,o,l){var u=this.observer,d="";e&&(d+="audio"),t&&(d+="video"),u.trigger(i.default.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:d,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(i.default.FRAG_PARSED)},e}();t.default=a},"./src/task-loop.js":function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/event-handler.js"),n=function(e){function t(t){for(var r=[],i=1;i1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},t.prototype.doTick=function(){},t -}(a.default);t.default=n},"./src/utils/attr-list.js":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,a=function(){function t(e){"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var r=parseInt(this[t],10);return r>e.MAX_SAFE_INTEGER?1/0:r},t.prototype.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;ie.MAX_SAFE_INTEGER?1/0:r},t.prototype.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.prototype.enumeratedString=function(e){return this[e]},t.prototype.decimalResolution=function(e){var t=r.exec(this[e]);return null===t?void 0:{width:parseInt(t[1],10),height:parseInt(t[2],10)}},t.parseAttrList=function(e){var t,r={};for(i.lastIndex=0;null!==(t=i.exec(e));){var a=t[2],n='"';0===a.indexOf(n)&&a.lastIndexOf(n)===a.length-1&&(a=a.slice(1,-1)),r[t[1]]=a}return r},t}();t.default=a}).call(this,r("./src/polyfills/number.js").Number)},"./src/utils/binary-search.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={search:function(e,t){for(var r=0,i=e.length-1,a=null,n=null;i>=r;){a=(r+i)/2|0,n=e[a];var s=t(n);if(s>0)r=a+1;else{if(!(0>s))return n;i=a-1}}return null}};t.default=r},"./src/utils/buffer-helper.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var r=e.buffered,i=0;i=r.start(i)&&t<=r.end(i))return!0}catch(a){}return!1},e.bufferInfo=function(e,t,r){try{if(e){var i=e.buffered,a=[],n=void 0;for(n=0;nd&&(l[u-1].end=e[o].end):l.push(e[o])}else l.push(e[o])}for(o=0,i=0,a=n=t;o=c&&f>t)a=c,n=f,i=n-t;else if(c>t+r){s=c;break}}return{len:i,start:a,end:n,nextStart:s}},e}();t.BufferHelper=r},"./src/utils/cea-608-parser.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},i=function(e){var t=e;return r.hasOwnProperty(e)&&(t=r[e]),String.fromCharCode(t)},a=15,n=100,s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},l={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e){var t=this.verboseFilter[e];this.verboseLevel>=t}},f=function(e){for(var t=[],r=0;re;e++)this.chars.push(new p);this.pos=0,this.currPenState=new h}return e.prototype.equals=function(e){for(var t=!0,r=0;n>r;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;n>t;t++)this.chars[t].copy(e.chars[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;n>t;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},e.prototype.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>n&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=n)},e.prototype.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;t+1>r;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},e.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.prototype.insertChar=function(e){e>=144&&this.backSpace();var t=i(e);return this.pos>=n?void c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))},e.prototype.clearFromPos=function(e){var t;for(t=e;n>t;t++)this.chars[t].reset()},e.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.prototype.getTextString=function(){for(var e=[],t=!0,r=0;n>r;r++){var i=this.chars[r].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},e.prototype.setPenStyles=function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)},e}(),v=function(){function e(){this.rows=[];for(var e=0;a>e;e++)this.rows.push(new g);this.currRow=a-1,this.nrRollUpRows=null,this.reset()}return e.prototype.reset=function(){for(var e=0;a>e;e++)this.rows[e].clear();this.currRow=a-1},e.prototype.equals=function(e){for(var t=!0,r=0;a>r;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;a>t;t++)this.rows[t].copy(e.rows[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;a>t;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},e.prototype.backSpace=function(){var e=this.rows[this.currRow];e.backSpace()},e.prototype.clearToEndOfRow=function(){var e=this.rows[this.currRow];e.clearToEndOfRow()},e.prototype.insertChar=function(e){var t=this.rows[this.currRow];t.insertChar(e)},e.prototype.setPen=function(e){var t=this.rows[this.currRow];t.setPenStyles(e)},e.prototype.moveCursor=function(e){var t=this.rows[this.currRow];t.moveCursor(e)},e.prototype.setCursor=function(e){c.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)},e.prototype.setPAC=function(e){c.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&tr;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){var s=n.rows[i].cueStartTime;if(s&&sn;n++){var s=this.rows[n].getTextString();s&&(i=n+1,t.push(e?"Row "+i+": '"+s+"'":s.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},e.prototype.getTextAndFormat=function(){return this.rows},e}(),m=function(){function e(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v,this.nonDisplayedMemory=new v,this.lastOutputScreen=new v,this.currRollUpRow=this.displayedMemory.rows[a-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return e.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[a-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},e.prototype.getHandler=function(){return this.outputFilter},e.prototype.setHandler=function(e){this.outputFilter=e},e.prototype.setPAC=function(e){this.writeScreen.setPAC(e)},e.prototype.setBkgData=function(e){this.writeScreen.setBkgData(e)},e.prototype.setMode=function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},e.prototype.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[r]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},e.prototype.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=c.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e===!0&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},e.prototype.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),y=function(){function e(e,t,r){this.field=e||1,this.outputs=[t,r],this.channels=[new m(1,t),new m(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,"char":0,cmd:0,other:0}}return e.prototype.getHandler=function(e){return this.channels[e].getHandler()},e.prototype.setHandler=function(e,t){this.channels[e].setHandler(t)},e.prototype.addData=function(e,t){var r,i,a,n=!1;this.lastTime=e,c.setTime(e);for(var s=0;s ("+f([i,a])+")"),r=this.parseCmd(i,a),r||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var o=this.channels[this.currChNr-1];o.insertChars(n)}else c.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]])))}else this.dataCounters.padding+=2},e.prototype.parseCmd=function(e,t){var r=null,i=(20===e||28===e)&&t>=32&&47>=t,a=(23===e||31===e)&&t>=33&&35>=t;if(!i&&!a)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+f([e,t])+") is dropped"),!0;r=20===e||23===e?1:2;var n=this.channels[r-1];return 20===e||28===e?32===t?n.ccRCL():33===t?n.ccBS():34===t?n.ccAOF():35===t?n.ccAON():36===t?n.ccDER():37===t?n.ccRU(2):38===t?n.ccRU(3):39===t?n.ccRU(4):40===t?n.ccFON():41===t?n.ccRDC():42===t?n.ccTR():43===t?n.ccRTD():44===t?n.ccEDM():45===t?n.ccCR():46===t?n.ccENM():47===t&&n.ccEOC():n.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},e.prototype.parseMidrow=function(e,t){var r=null;if((17===e||25===e)&&t>=32&&47>=t){if(r=17===e?1:2,r!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var i=this.channels[r-1];return i.ccMIDROW(t),c.log("DEBUG","MIDROW ("+f([e,t])+")"),!0}return!1},e.prototype.parsePAC=function(e,t){var r=null,i=null,a=(e>=17&&23>=e||e>=25&&31>=e)&&t>=64&&127>=t,n=(16===e||24===e)&&t>=64&&95>=t;if(!a&&!n)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=23>=e?1:2,i=t>=64&&95>=t?1===r?s[e]:l[e]:1===r?o[e]:u[e];var d=this.interpretPAC(i,t),c=this.channels[r-1];return c.setPAC(d),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},e.prototype.interpretPAC=function(e,t){var r=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,i.underline=1===(1&r),13>=r?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:15>=r?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},e.prototype.parseChars=function(e,t){var r=null,a=null,n=null;if(e>=25?(r=2,n=e-8):(r=1,n=e),n>=17&&19>=n){var s=t;s=17===n?t+80:18===n?t+112:t+144,c.log("INFO","Special char '"+i(s)+"' in channel "+r),a=[s]}else e>=32&&127>=e&&(a=0===t?[e]:[e,t]);if(a){var o=f(a);c.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return a},e.prototype.parseBackgroundAttributes=function(e,t){var r,i,a,n,s=(16===e||24===e)&&t>=32&&47>=t,o=(23===e||31===e)&&t>=45&&47>=t;return s||o?(r={},16===e||24===e?(i=Math.floor((t-32)/2),r.background=d[i],t%2===1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0)),a=24>e?1:2,n=this.channels[a-1],n.setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0):!1},e.prototype.reset=function(){for(var e=0;e=16?l--:l++,s.line=navigator.userAgent.match(/Firefox\//)?c+1:c>7?c-2:c+1,s.align="left",s.position=Math.max(0,Math.min(100,100*(l/32)+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(s)}}Object.defineProperty(t,"__esModule",{value:!0});var a=r("./src/utils/vttparser.js");t.newCue=i},"./src/utils/discontinuities.js":function(e,t,r){"use strict";(function(e){function i(e,t){for(var r=null,i=0;it?-1:0})}function n(e,t,r){var i=!1;return t&&t.details&&r&&(r.endCC>r.startCC||e&&e.cc=this.minWeight_},e.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.prototype.destroy=function(){},e}();t.default=a},"./src/utils/ewma.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return e.prototype.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},e.prototype.getTotalWeight=function(){return this.totalWeight_},e.prototype.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/get-self-scope.js":function(e,t){"use strict";function r(){return"undefined"==typeof window?self:window}Object.defineProperty(t,"__esModule",{value:!0}),t.getSelfScope=r},"./src/utils/logger.js":function(e,t,r){"use strict";function i(){}function a(e,t){return t="["+e+"] > "+t}function n(e){var t=d.console[e];return t?function(){for(var r=[],i=0;ie)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e}();t.default=r},"./src/utils/texttrack-utils.js":function(e,t){"use strict";function r(e,t){var r=null;try{r=new window.Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)}function i(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.sendAddTrackEvent=r,t.clearCurrentCues=i},"./src/utils/time-ranges.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={toString:function(e){for(var t="",r=e.length,i=0;r>i;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};t.default=r},"./src/utils/vttcue.js":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(e){if("string"!=typeof e)return!1;var t=n[e.toLowerCase()];return t?e.toLowerCase():!1}function t(e){if("string"!=typeof e)return!1;var t=s[e.toLowerCase()];return t?e.toLowerCase():!1}function r(e){for(var t=1;te||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},u,{get:function(){return T},set:function(e){var r=t(e);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");T=r,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},u,{get:function(){return S},set:function(e){if(0>e||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},u,{get:function(){return b},set:function(e){var r=t(e);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");b=r,this.hasBeenReset=!0}})),o.displayState=void 0,l?o:void 0}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var a="auto",n={"":!0,lr:!0,rl:!0},s={start:!0,middle:!0,end:!0,left:!0,right:!0};return i.prototype.getCueAsHTML=function(){var e=window.WebVTT;return e.convertCueToDOMTree(window,this.text)},i}()},"./src/utils/vttparser.js":function(e,t,r){"use strict";function i(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new d,this.regionList=[]}function a(e){function t(e,t,r,i){return 3600*(0|e)+60*(0|t)+(0|r)+(0|i)/1e3}var r=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}function n(){this.values=Object.create(null)}function s(e,t,r,i){var a=i?e.split(i):[e];for(var n in a)if("string"==typeof a[n]){var s=a[n].split(r);if(2===s.length){var o=s[0],l=s[1];t(o,l)}}}function o(e,t,r){function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+u);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function o(e,t){var i=new n;s(e,function(e,t){switch(e){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===t){i.set(e,r[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),s=n[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",f,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",f,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",f,"end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===c.line&&(a=-1),t.line=a,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",f);var o=i.get("position","auto");"auto"===o&&50===c.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}function l(){e=e.replace(/^\s+/,"")}var u=e;if(l(),t.startTime=i(),l(),"-->"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);e=e.substr(3),l(),t.endTime=i(),l(),o(e,t)}function l(e){return e.replace(//gi,"\n")}Object.defineProperty(t,"__esModule",{value:!0});var u=r("./src/utils/vttcue.js"),d=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};n.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,r){for(var i=0;i=0&&100>=t)?(this.set(e,t),!0):!1}};var c=new u.default(0,0,0),f="middle"===c.align?"middle":"center";t.fixLineBreaks=l,i.prototype={parse:function(e){function t(){var e=i.buffer,t=0;for(e=l(e);t")){i.cue.id=a;continue}case"CUE":try{o(a,i.cue,i.regionList)}catch(c){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var f=-1!==a.indexOf("-->");if(!a||f&&(d=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=a;continue;case"BADCUE":a||(i.state="ID");continue}}}catch(c){"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return e.onflush&&e.onflush(),this}},t.default=i},"./src/utils/webvtt-parser.js":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/utils/vttparser.js"),a=r("./src/demux/id3.js"),n=function(e,t,r){return e.substr(r||0,t.length)===t},s=function(t){var r=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),a=parseInt(t.substr(-9,2)),n=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return e.isFinite(r)&&e.isFinite(i)&&e.isFinite(a)&&e.isFinite(n)?(r+=1e3*i,r+=6e4*a,r+=36e5*n):-1},o=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()},l=function(e,t,r){var i=e[t],a=e[i.prevCC];if(!a||!a.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)e.ccOffset+=i.start-a.start,i.new=!1,i=a,a=e[i.prevCC];e.presentationOffset=r},u={parse:function(e,t,r,u,d,c){var f,h=/\r\n|\n\r|\n|\r/g,p=a.utf8ArrayToStr(new Uint8Array(e)).trim().replace(h,"\n").split("\n"),g="00:00.000",v=0,m=0,y=0,E=[],_=!0,T=new i.default;T.oncue=function(e){var t=r[u],i=r.ccOffset;t&&t.new&&(void 0!==m?i=r.ccOffset=t.start:l(r,u,y)),y&&(i=y-r.presentationOffset),e.startTime+=i-m,e.endTime+=i-m,e.id=o(e.startTime.toString())+o(e.endTime.toString())+o(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&E.push(e)},T.onparsingerror=function(e){f=e},T.onflush=function(){return f&&c?void c(f):void d(E)},p.forEach(function(e){if(_){if(n(e,"X-TIMESTAMP-MAP=")){_=!1,e.substr(16).split(",").forEach(function(e){n(e,"LOCAL:")?g=e.substr(6):n(e,"MPEGTS:")&&(v=parseInt(e.substr(7)))});try{t+(9e4*r[u].start||0)<0&&(t+=8589934592),v-=t,m=s(g)/1e3,y=v/9e4,-1===m&&(f=new Error("Malformed X-TIMESTAMP-MAP: "+e))}catch(i){f=new Error("Malformed X-TIMESTAMP-MAP: "+e)}return}""===e&&(_=!1)}T.parse(e+"\n")}),T.flush()}};t.default=u}).call(this,r("./src/polyfills/number.js").Number)},"./src/utils/xhr-loader.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("./src/utils/logger.js"),a=window.performance,n=window.XMLHttpRequest,s=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return e.prototype.destroy=function(){this.abort(),this.loader=null},e.prototype.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.prototype.load=function(e,t,r){this.context=e,this.config=t,this.callbacks=r,this.stats={trequest:a.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},e.prototype.loadInternal=function(){var e,t=this.context;e=this.loader=new n;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(e,t.url)}catch(a){e.open("GET",t.url,!0),i(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(a){return void this.callbacks.onError({code:e.status,text:a.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},e.prototype.readystatechange=function(e){var t=e.currentTarget,r=t.readyState,n=this.stats,s=this.context,o=this.config;if(!n.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===n.tfirst&&(n.tfirst=Math.max(a.now(),n.trequest)),4===r){var l=t.status;if(l>=200&&300>l){n.tload=Math.max(n.tfirst,a.now());var u=void 0,d=void 0;"arraybuffer"===s.responseType?(u=t.response,d=u.byteLength):(u=t.responseText,d=u.length),n.loaded=n.total=d;var c={url:t.responseURL,data:u};this.callbacks.onSuccess(c,n,s,t)}else n.retry>=o.maxRetry||l>=400&&499>l?(i.logger.error(l+" while loading "+s.url),this.callbacks.onError({code:l,text:t.statusText},s,t)):(i.logger.warn(l+" while loading "+s.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),n.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)},e.prototype.loadtimeout=function(){i.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.prototype.loadprogress=function(e){var t=e.currentTarget,r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,t)},e}();t.default=s}})["default"]})}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/base/worker/workerMain_3c46a35.js b/gh-pages/n/monaco-editor/min/vs/base/worker/workerMain_3c46a35.js deleted file mode 100644 index 8426bc8e..00000000 --- a/gh-pages/n/monaco-editor/min/vs/base/worker/workerMain_3c46a35.js +++ /dev/null @@ -1,144 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.17.0(63d87164d0bc8c6206d9339c195289c93665028e) - * Released under the MIT license - * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt - *-----------------------------------------------------------*/ -(function(){ -var e=["require","exports","vs/editor/common/core/position","vs/base/common/platform","vs/editor/common/core/uint","vs/base/common/errors","vs/editor/common/core/range","vs/base/common/types","vs/base/common/diff/diff","vs/base/common/event","vs/base/common/lifecycle","vs/base/common/iterator","vs/base/common/uri","vs/base/common/strings","vs/base/common/keyCodes","vs/base/common/diff/diffChange","vs/base/common/linkedList","vs/base/common/functional","vs/base/common/cancellation","vs/editor/common/core/selection","vs/editor/common/core/token","vs/base/common/arrays","vs/editor/common/core/characterClassifier","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneEnums","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/editor/common/standalone/promise-polyfill/polyfill","vs/base/common/worker/simpleWorker"],t=function(t){ -for(var n=[],r=0,i=t.length;r=0)||"undefined"!=typeof process&&"win32"===process.platform},t}();e.Environment=t}(o||(o={}));!function(e){var t=function(){return function(e,t,n){this.type=e,this.detail=t,this.timestamp=n}}();e.LoaderEvent=t;var n=function(){function n(e){this._events=[new t(1,"",e)]}return n.prototype.record=function(n,r){this._events.push(new t(n,r,e.Utilities.getHighPerformanceTimestamp()))},n.prototype.getEvents=function(){return this._events},n}();e.LoaderEventRecorder=n;var r=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e}();r.INSTANCE=new r,e.NullLoaderEventRecorder=r}(o||(o={}));!function(e){var t=function(){function t(){} -return t.fileUriToFilePath=function(e,t){if(t=decodeURI(t).replace(/%23/g,"#"),e){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var n=void 0;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},t.isEmpty=function(e){var n=!0;return t.forEachProperty(e,function(){n=!1}),n},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var n=Array.isArray(e)?[]:{};return t.forEachProperty(e,function(e,r){n[e]=r&&"object"==typeof r?t.recursiveClone(r):r}),n},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID+++"==="}, -t.isAnonymousModule=function(e){return t.startsWith(e,"===anonymous")},t.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=e.global.performance&&"function"==typeof e.global.performance.now),this.HAS_PERFORMANCE_NOW?e.global.performance.now():Date.now()},t}();t.NEXT_ANONYMOUS_ID=1,t.PERFORMANCE_NOW_PROBED=!1,t.HAS_PERFORMANCE_NOW=!1,e.Utilities=t}(o||(o={}));!function(e){var t=function(){function t(){}return t.validateConfigurationOptions=function(t){function n(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0} -return"string"!=typeof(t=t||{}).baseUrl&&(t.baseUrl=""),"boolean"!=typeof t.isBuild&&(t.isBuild=!1),"object"!=typeof t.paths&&(t.paths={}),"object"!=typeof t.config&&(t.config={}),void 0===t.catchError&&(t.catchError=!1),"string"!=typeof t.urlArgs&&(t.urlArgs=""),"function"!=typeof t.onError&&(t.onError=n),"object"==typeof t.ignoreDuplicateModules&&Array.isArray(t.ignoreDuplicateModules)||(t.ignoreDuplicateModules=[]),t.baseUrl.length>0&&(e.Utilities.endsWith(t.baseUrl,"/")||(t.baseUrl+="/")),"string"!=typeof t.cspNonce&&(t.cspNonce=""),Array.isArray(t.nodeModules)||(t.nodeModules=[]),"object"==typeof t.nodeCachedData&&("string"!=typeof t.nodeCachedData.seed&&(t.nodeCachedData.seed="seed"),("number"!=typeof t.nodeCachedData.writeDelay||t.nodeCachedData.writeDelay<0)&&(t.nodeCachedData.writeDelay=7e3),"function"!=typeof t.nodeCachedData.onData&&(t.nodeCachedData.onData=function(e){ -e&&"cachedDataRejected"===e.errorCode?console.warn("Rejected cached data from file: "+e.path):e&&e.errorCode?(console.error("Problems handling cached data file: "+e.path),console.error(e.detail)):e&&console.error(e)}),t.nodeCachedData.path&&"string"==typeof t.nodeCachedData.path||(t.nodeCachedData.onData("INVALID cached data configuration, 'path' MUST be set"),t.nodeCachedData=void 0)),t},t.mergeConfigurationOptions=function(n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.Utilities.recursiveClone(r||{});return e.Utilities.forEachProperty(n,function(t,n){"ignoreDuplicateModules"===t&&void 0!==i.ignoreDuplicateModules?i.ignoreDuplicateModules=i.ignoreDuplicateModules.concat(n):"paths"===t&&void 0!==i.paths?e.Utilities.forEachProperty(n,function(e,t){return i.paths[e]=t}):"config"===t&&void 0!==i.config?e.Utilities.forEachProperty(n,function(e,t){return i.config[e]=t}):i[t]=e.Utilities.recursiveClone(n)}),t.validateConfigurationOptions(i)},t}();e.ConfigurationOptionsUtil=t;var n=function(){ -function n(e,n){if(this._env=e,this.options=t.mergeConfigurationOptions(n),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),""===this.options.baseUrl){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){var r=this.options.nodeRequire.main.filename,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}if(this.options.nodeMain&&this._env.isNode){var r=this.options.nodeMain,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}}}return n.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e=0){ -var r=t.resolveModule(e.substr(0,n)),s=t.resolveModule(e.substr(n+1)),u=this._moduleIdProvider.getModuleId(r+"!"+s),a=this._moduleIdProvider.getModuleId(r);return new o(u,a,s)}return new i(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},s.prototype._normalizeDependencies=function(e,t){for(var n=[],r=0,i=0,o=e.length;i0;){var a=u.shift(),l=this._modules2[a] -;l&&(s=l.onDependencyError(n)||s);var c=this._inverseDependencies2[a];if(c)for(var i=0,o=c.length;i0;){var u=s.shift().dependencies;if(u)for(var i=0,o=u.length;i=r.length)t._onLoadError(e,n);else{var s=r[i],u=t.getRecorder();if(t._config.isBuild()&&"empty:"===s)return t._buildInfoPath[e]=s,t.defineModule(t._moduleIdProvider.getStrModuleId(e),[],null,null,null),void t._onLoad(e);u.record(10,s),t._scriptLoader.load(t,s,function(){t._config.isBuild()&&(t._buildInfoPath[e]=s),u.record(11,s),t._onLoad(e)},function(e){u.record(12,s),o(e)})}};o(null)}},s.prototype._loadPluginDependency=function(e,n){var r=this;if(!this._modules2[n.id]&&!this._knownModules2[n.id]){this._knownModules2[n.id]=!0;var i=function(e){r.defineModule(r._moduleIdProvider.getStrModuleId(n.id),[],e,null,null)};i.error=function(e){ -r._config.onError(r._createLoadError(n.id,e))},e.load(n.pluginParam,this._createRequire(t.ROOT),i,this._config.getOptionsLiteral())}},s.prototype._resolve=function(e){for(var t=this,n=e.dependencies,r=0,s=n.length;r \n")),e.unresolvedDependenciesCount--}else if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(e.id),u instanceof o){var c=this._modules2[u.pluginId];if(c&&c.isComplete()){this._loadPluginDependency(c.exports,u);continue} -var d=this._inversePluginDependencies2.get(u.pluginId);d||(d=[],this._inversePluginDependencies2.set(u.pluginId,d)),d.push(u),this._loadModule(u.pluginId)}else this._loadModule(u.id)}else e.unresolvedDependenciesCount--;else e.unresolvedDependenciesCount--;else e.exportsPassedIn=!0,e.unresolvedDependenciesCount--}0===e.unresolvedDependenciesCount&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,n=this.getRecorder();if(!e.isComplete()){for(var r=e.dependencies,o=[],s=0,u=r.length;sr?e[a]=o[u++]:u>i?e[a]=o[s++]:t(o[u],o[s])<0?e[a]=o[u++]:e[a]=o[s++]}(e,t,n,s,i,o)}}function i(e,t){for(var n=0;n0))return o;i=o-1}}return-(r+1)},t.findFirstInSorted=function(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n0},t.distinct=function(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)})},t.distinctES6=function(e){var t=new Set;return e.filter(function(e){return!t.has(e)&&(t.add(e),!0)})},t.firstIndex=i,t.first=function(e,t,n){void 0===n&&(n=void 0);var r=i(e,t);return r<0?n:e[r]},t.flatten=function(e){ -var t;return(t=[]).concat.apply(t,e)},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(i=n;it;i--)r.push(i);return r},t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)},t.pushToStart=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))},t.asArray=function(e){return Array.isArray(e)?e:[e]}}),i(e[15],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),i(e[8],t([0,1,15]),function(e,t,n){"use strict";function r(e){return{getLength:function(){ -return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.stringDiff=function(e,t,n){return new u(r(e),r(t)).ComputeDiff(n)};var i=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=i;var o=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;o0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e), -this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t) -},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,r,i){var o=this.ComputeDiffRecursive(e,t,n,r,[!1]);return i?this.PrettifyChanges(o):o},e.prototype.ComputeDiffRecursive=function(e,t,r,o,s){for(s[0]=!1;e<=t&&r<=o&&this.ElementsAreEqual(e,r);)e++,r++;for(;t>=e&&o>=r&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||r>o){var u=void 0;return r<=o?(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new n.DiffChange(e,0,r,o-r+1)]):e<=t?(i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[new n.DiffChange(e,t-e+1,r,0)]):(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u} -var a=[0],l=[0],c=this.ComputeRecursionPoint(e,t,r,o,a,l,s),d=a[0],f=l[0];if(null!==c)return c;if(!s[0]){var h=this.ComputeDiffRecursive(e,d,r,f,s),p=[];return p=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,f+1,o-(f+1)+1)]:this.ComputeDiffRecursive(d+1,t,f+1,o,s),this.ConcatenateChanges(h,p)}return[new n.DiffChange(e,t-e+1,r,o-r+1)]},e.prototype.WALKTRACE=function(e,t,r,i,o,u,a,l,c,d,f,h,p,m,g,_,v,y){var C,b=null,E=null,L=new s,N=t,S=r,M=p[0]-_[0]-i,A=Number.MIN_VALUE,P=this.m_forwardHistory.length-1;do{(C=M+e)===N||C=0&&(e=(c=this.m_forwardHistory[P])[0],N=1,S=c.length-1)}while(--P>=-1);if(b=L.getReverseChanges(),y[0]){var w=p[0]+1,I=_[0]+1;if(null!==b&&b.length>0){var D=b[b.length-1];w=Math.max(w,D.getOriginalEnd()),I=Math.max(I,D.getModifiedEnd())}E=[new n.DiffChange(w,h-w+1,I,g-I+1)]}else{L=new s,N=u,S=a,M=p[0]-_[0]-l, -A=Number.MAX_VALUE,P=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(C=M+o)===N||C=d[C+1]?(m=(f=d[C+1]-1)-M-l,f>A&&L.MarkNextChange(),A=f+1,L.AddOriginalElement(f+1,m+1),M=C+1-o):(m=(f=d[C-1])-M-l,f>A&&L.MarkNextChange(),A=f,L.AddModifiedElement(f+1,m+1),M=C-1-o),P>=0&&(o=(d=this.m_reverseHistory[P])[0],N=1,S=d.length-1)}while(--P>=-1);E=L.getChanges()}return this.ConcatenateChanges(b,E)},e.prototype.ComputeRecursionPoint=function(e,t,r,i,s,u,a){var l,c=0,d=0,f=0,h=0,p=0,m=0;e--,r--,s[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(i-r),_=g+1,v=new Array(_),y=new Array(_),C=i-r,b=t-e,E=e-r,L=t-i,N=(b-C)%2==0;v[C]=e,y[b]=t,a[0]=!1;var S,M;for(l=1;l<=g/2+1;l++){var A=0,P=0;for(f=this.ClipDiagonalBound(C-l,l,C,_),h=this.ClipDiagonalBound(C+l,l,C,_),S=f;S<=h;S+=2){for(d=(c=S===f||SA+P&&(A=c,P=d),!N&&Math.abs(S-b)<=l-1&&c>=y[S])return s[0]=c,u[0]=d, -M<=y[S]&&l<=1448?this.WALKTRACE(C,f,h,E,b,p,m,L,v,y,c,t,s,d,i,u,N,a):null}var w=(A-e+(P-r)-l)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(A,this.OriginalSequence,w))return a[0]=!0,s[0]=A,u[0]=P,w>0&&l<=1448?this.WALKTRACE(C,f,h,E,b,p,m,L,v,y,c,t,s,d,i,u,N,a):(e++,r++,[new n.DiffChange(e,t-e+1,r,i-r+1)]);for(p=this.ClipDiagonalBound(b-l,l,b,_),m=this.ClipDiagonalBound(b+l,l,b,_),S=p;S<=m;S+=2){for(d=(c=S===p||S=y[S+1]?y[S+1]-1:y[S-1])-(S-b)-L,M=c;c>e&&d>r&&this.ElementsAreEqual(c,d);)c--,d--;if(y[S]=c,N&&Math.abs(S-C)<=l&&c<=v[S])return s[0]=c,u[0]=d,M>=v[S]&&l<=1448?this.WALKTRACE(C,f,h,E,b,p,m,L,v,y,c,t,s,d,i,u,N,a):null}if(l<=1447){var I=new Array(h-f+2);I[0]=C-f+1,o.Copy(v,f,I,1,h-f+1),this.m_forwardHistory.push(I),(I=new Array(m-p+2))[0]=b-p+1,o.Copy(y,p,I,1,m-p+1),this.m_reverseHistory.push(I)}}return this.WALKTRACE(C,f,h,E,b,p,m,L,v,y,c,t,s,d,i,u,N,a)},e.prototype.PrettifyChanges=function(e){for(u=0;u0,o=t.modifiedLength>0;t.originalStart+t.originalLength=0;u--){var t=e[u],n=0,r=0;if(u>0){var a=e[u-1];a.originalLength>0&&(n=a.originalStart+a.originalLength),a.modifiedLength>0&&(r=a.modifiedStart+a.modifiedLength)}for(var i=t.originalLength>0,o=t.modifiedLength>0,l=0,c=this._boundaryScore(t.originalStart,t.originalLength,t.modifiedStart,t.modifiedLength),d=1;;d++){var f=t.originalStart-d,h=t.modifiedStart-d;if(fc&&(c=p,l=d)}t.originalStart-=l,t.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t -;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){r=new Array(e.length+t.length-1);return o.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],o.Copy(t,1,r,e.length,t.length-1),r}var r=new Array(e.length+t.length);return o.Copy(e,0,r,0,e.length),o.Copy(t,0,r,e.length,t.length),r},e.prototype.ChangesOverlap=function(e,t,r){if(i.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),i.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,s=e.originalLength,u=e.modifiedStart,a=e.modifiedLength -;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),r[0]=new n.DiffChange(o,s,u,a),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e=r?t.FIN:{done:!1,value:e[n++]}}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,n){return{next:function(){var r=e.next();return r.done?t.FIN:{done:!1,value:n(r.value)}}}},e.filter=function(e,n){return{next:function(){for(;;){var r=e.next();if(r.done)return t.FIN;if(n(r.value))return{done:!1,value:r.value}}}}},e.forEach=n,e.collect=function(e){var t=[];return n(e,function(e){return t.push(e) -}),t}}(n=t.Iterator||(t.Iterator={})),t.getSequenceIterator=function(e){return Array.isArray(e)?n.fromArray(e):e};var r=function(){function e(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===r&&(r=t-1),this.items=e,this.start=t,this.end=n,this.index=r}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}();t.ArrayIterator=r;var i=function(e){function t(t,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=t.length),void 0===i&&(i=n-1),e.call(this,t,n,r,i)||this}return s(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(r) -;t.ArrayNavigator=i;var o=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}();t.MappedIterator=o}),i(e[14],t([0,1,5]),function(e,t,n){"use strict";function r(e,t){var n=!!(2048&e),r=!!(256&e);return new a(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),o=new i,s=new i,u=new i;!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),o.define(e,t),s.define(e,n),u.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"), -e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"), -e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}();!function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return u.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||u.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return new l(0!==i?[r(n,t),r(i,t)]:[r(n,t)])},t.createSimpleKeybinding=r -;var a=function(){function e(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}return e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.toChord=function(){return new l([this])},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=a;var l=function(){function e(e){if(0===e.length)throw n.illegalArgument("parts");this.parts=e}return e.prototype.equals=function(e){if(null===e)return!1;if(this.parts.length!==e.parts.length)return!1;for(var t=0;t1)&&l.fire(e),a=0},n)})},onLastListenerRemove:function(){o.dispose()}});return l.event},e.stopwatch=function(e){var r=(new Date).getTime();return n(t(e),function(e){return(new Date).getTime()-r})},e.latch=a,e.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]);var r=n.slice(),i=e(function(e){r?r.push(e):s.fire(e)}),o=function(){ -r&&r.forEach(function(e){return s.fire(e)}),r=null},s=new c({onFirstListenerAdd:function(){i||(i=e(function(e){return s.fire(e)}))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i&&i.dispose(),i=null}});return s.event};var d=function(){function e(e){this.event=e}return e.prototype.map=function(t){return new e(n(this.event,t))},e.prototype.forEach=function(t){return new e(r(this.event,t))},e.prototype.filter=function(t){return new e(o(this.event,t))},e.prototype.reduce=function(t,n){return new e(s(this.event,t,n))},e.prototype.latch=function(){return new e(a(this.event))},e.prototype.on=function(e,t,n){return this.event(e,t,n)},e.prototype.once=function(e,n,r){return t(this.event)(e,n,r)},e}();e.chain=function(e){return new d(e)},e.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t0?new l(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new o.LinkedList);var s=t._listeners.isEmpty();s&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var u=t._listeners.push(r?[n,r]:n);s&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r);var a;t._leakageMon&&(a=t._leakageMon.check(t._listeners.size));var l;return l={dispose:function(){if(a&&a(),l.dispose=e._noop,!t._disposed&&(u(), -t._options&&t._options.onLastListenerRemove)){t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)}}},Array.isArray(i)&&i.push(l),l}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new o.LinkedList);for(var t=this._listeners.iterator(),r=t.next();!r.done;r=t.next())this._deliveryQueue.push([r.value,e]);for(;this._deliveryQueue.size>0;){var i=this._deliveryQueue.shift(),s=i[0],u=i[1];try{"function"==typeof s?s.call(void 0,u):s[0].call(s[1],u)}catch(r){n.onUnexpectedError(r)}}}},e.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},e._noop=function(){},e}();t.Emitter=c;var d=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaused=0,n._eventQueue=new o.LinkedList,n._mergeFn=t&&t.merge,n}return s(t,e),t.prototype.pause=function(){this._isPaused++}, -t.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var t=this._eventQueue.toArray();this._eventQueue.clear(),e.prototype.fire.call(this,this._mergeFn(t))}else for(;!this._isPaused&&0!==this._eventQueue.size;)e.prototype.fire.call(this,this._eventQueue.shift())},t.prototype.fire=function(t){this._listeners&&(0!==this._isPaused?this._eventQueue.push(t):e.prototype.fire.call(this,t))},t}(c);t.PauseableEmitter=d;var f=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new c({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return i.toDisposable(r.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n) -;t.events.splice(e,1)}))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=f;var h=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach(function(e){return e()}),n},e}();t.EventBufferer=h;var p=function(){function e(){var e=this;this.listening=!1, -this.inputEvent=u.None,this.inputEventListener=i.Disposable.None,this.emitter=new c({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},e}();t.Relay=p}),i(e[18],t([0,1,9]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.isCancellationToken=function(t){ -return t===e.None||t===e.Cancelled||t instanceof o||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1,this._emitter=null}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(), -this._emitter=null)},e}(),s=function(){function e(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=r.None},e}();t.CancellationTokenSource=s}),i(e[3],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,i=!1,o=!1,s=!1,u="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||u){if("object"==typeof process){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform, -"en","en";var a=process.env.VSCODE_NLS_CONFIG;if(a)try{var l=JSON.parse(a),c=l.availableLanguages["*"];l.locale,c||"en",l._translationsConfigFile}catch(e){}o=!0}}else{var d=navigator.userAgent;n=d.indexOf("Windows")>=0,r=d.indexOf("Macintosh")>=0,i=d.indexOf("Linux")>=0,s=!0,navigator.language}t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isNative=o,t.isWeb=s;var f="object"==typeof self?self:"object"==typeof global?global:{};t.globals=f;var h=null;t.setImmediate=function(e){return null===h&&(h=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),h(e)},t.OS=r?2:n?1:3}),i(e[13],t([0,1]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function r(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function i(e,t){if(!e||!t)return e -;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(-1===(o=e.lastIndexOf(t,i-1))||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function o(e){return e>=97&&e<=122}function s(e){return e>=65&&e<=90}function u(e){return o(e)||s(e)}function a(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),i(r(e,t),t)},t.ltrim=r,t.rtrim=i,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),r.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="" -;return r.global&&(i+="g"),r.matchCase||(i+="i"),r.multiline&&(i+="m"),r.unicode&&(i+="u"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=function(e,t){return et?1:0},t.isLowerAsciiLetter=o,t.isUpperAsciiLetter=s,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&a(e,t)}, -t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&a(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0&&65279===e.charCodeAt(0))},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=_[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function i(e){var t -;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function o(e,t){var n=t?function(e){for(var t=void 0,n=0;n=3&&47===u.charCodeAt(0)&&58===u.charCodeAt(2)){ -(f=u.charCodeAt(1))>=65&&f<=90&&(u="/"+String.fromCharCode(f+32)+":"+u.substr(3))}else if(u.length>=2&&58===u.charCodeAt(1)){var f=u.charCodeAt(0);f>=65&&f<=90&&(u=String.fromCharCode(f+32)+":"+u.substr(2))}i+=n(u,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:r(l,!1)),i}Object.defineProperty(t,"__esModule",{value:!0});var u,a=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,d=!0,f="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,n,r,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=function(e,t){return t||d?e||f:(e||(console.trace("BAD uri lacks scheme, falling back to file-scheme."),e="file"),e)}(e,o),this.authority=t||f,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||f),this.query=r||f,this.fragment=i||f,function(e,t){if(!e.scheme){ -if(t||d)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}')}if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){ -return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return i(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),void 0===i?i=this.query:null===i&&(i=f),void 0===o?o=this.fragment:null===o&&(o=f),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new g(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=p.exec(e);return n?new g(n[2]||f,decodeURIComponent(n[4]||f),decodeURIComponent(n[5]||f),decodeURIComponent(n[7]||f),decodeURIComponent(n[9]||f),t):new g(f,f,f,f,f)},e.file=function(e){ -var t=f;if(n.isWindows&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var r=e.indexOf(h,2);-1===r?(t=e.substring(2),e=h):(t=e.substring(2,r),e=e.substring(r)||h)}return new g("file",t,e,f,f)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),o(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.URI=m;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=i(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?o(this,!0):(this._formatted||(this._formatted=o(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1} -;return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(m),_=(u={},u[58]="%3A",u[47]="%2F",u[63]="%3F",u[35]="%23",u[91]="%5B",u[93]="%5D",u[64]="%40",u[33]="%21",u[36]="%24",u[38]="%26",u[39]="%27",u[40]="%28",u[41]="%29",u[42]="%2A",u[43]="%2B",u[44]="%2C",u[59]="%3B",u[61]="%3D",u[32]="%20",u)}),i(e[33],t([0,1,5,10,3,7]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u="$initialize",a=!1;t.logOnceWebWorkerWarning=function(e){i.isWeb&&(a||(a=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var l=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0, -this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=this,r=String(++this._lastSentReq);return new Promise(function(i,o){n._pendingReplies[r]={resolve:i,reject:o},n._send({vsWorker:n._workerId,req:r,method:e,args:t})})},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){return}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var r=e;if(!this._pendingReplies[r.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[r.seq];if(delete this._pendingReplies[r.seq],r.err){var o=r.err;return r.err.$isError&&((o=new Error).name=r.err.name,o.message=r.err.message,o.stack=r.err.stack),void i.reject(o)}i.resolve(r.res)}else{var s=e,u=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:u,res:e,err:void 0})},function(e){ -e.detail instanceof Error&&(e.detail=n.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:u,res:void 0,err:n.transformErrorForSerialization(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),c=function(e){function t(t,n){var r=e.call(this)||this,i=null;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",function(e){r._protocol.handleMessage(e)},function(e){i&&i(e)})),r._protocol=new l({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return Promise.resolve(null)}}),r._protocol.setWorkerId(r._worker.getId());var o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config),r._onModuleLoaded=r._protocol.sendMessage(u,[r._worker.getId(),n,o]),r._lazyProxy=new Promise(function(e,t){i=t,r._onModuleLoaded.then(function(t){for(var n={},r=0,i=t;rn||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}, -e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(r,i,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,s=t.endColumn,u=n.startLineNumber,a=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(o=l,s=c):o===l&&(s=Math.min(s,c)),r>o?null:r===o&&i>s?null:new e(r,i,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)}, -e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){ -return!(e.endLineNumbere.startLineNumber},e}();t.Range=r}),i(e[19],t([0,1,2,6]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=r,o.positionColumn=i,o}return s(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}, -t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new n.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){for(var r=new Uint8Array(e*t),i=0,o=e*t;i255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,r=new Uint32Array(t),i=0;i=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=r;var i=function(){function e(){this._actual=new r(0)}return e.prototype.add=function(e){this._actual.set(e,1)}, -e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=i}),i(e[23],t([0,1,8,13]),function(e,t,n,r){"use strict";function i(e,t,r,i){return new n.LcsDiff(e,t,r).ComputeDiff(i)}Object.defineProperty(t,"__esModule",{value:!0});var o=5e3,s=3,u=function(){function e(t){for(var n=[],r=[],i=0,o=t.length;i1&&_>1;){if((E=p.charCodeAt(g-2))!==(L=m.charCodeAt(_-2)))break;g--,_--}(g>1||_>1)&&this._pushTrimWhitespaceCharChange(o,s+1,1,g,a+1,1,_) -;for(var v=u._getLastNonBlankColumn(p,1),y=u._getLastNonBlankColumn(m,1),C=p.length+1,b=m.length+1;v/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n="(-?\\d*\\.\\d\\w*)|([^",r=0,i=t.USUAL_WORD_SEPARATORS;r=0||(n+="\\"+o)}return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),n=new RegExp(e.source,r)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,n,r){t.lastIndex=0;var i=t.exec(n);if(!i)return null -;var o=i[0].indexOf(" ")>=0?function(e,t,n,r){var i=e-1-r;t.lastIndex=0;for(var o;o=t.exec(n);){var s=o.index||0;if(s>i)return null;if(t.lastIndex>=i)return{word:o[0],startColumn:r+1+s,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r):function(e,t,n,r){var i=e-1-r,o=n.lastIndexOf(" ",i-1)+1;t.lastIndex=o;for(var s;s=t.exec(n);){var u=s.index||0;if(u<=i&&t.lastIndex>=i)return{word:s[0],startColumn:r+1+u,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r);return t.lastIndex=0,o}}),i(e[25],t([0,1,22,4]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){for(var t=0,n=0,i=0,o=e.length;it&&(t=a),u>n&&(n=u),l>n&&(n=l)}t++,n++;for(var c=new r.Uint8Matrix(n,t,0),i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}();t.StateMachine=i;var o=null,s=null,u=function(){ -function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>r);if(r>0){var u=t.charCodeAt(r-1),a=t.charCodeAt(o);(40===u&&41===a||91===u&&93===a||123===u&&125===a)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t,r){void 0===r&&(null===o&&(o=new i([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),r=o);for(var u=function(){if(null===s){for(s=new n.CharacterClassifier(0),e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),a=[],l=1,c=t.getLineCount();l<=c;l++){ -for(var d=t.getLineContent(l),f=d.length,h=0,p=0,m=0,g=1,_=!1,v=!1,y=!1;h=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),/*! -Copyright (c) 2014 Taylor Hakes -Copyright (c) 2014 Forbes Lindesay - */ -function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof i&&i.amd?i("vs/editor/common/standalone/promise-polyfill/polyfill",t):t()}(0,function(){"use strict";function e(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}function t(){}function n(e){if(!(this instanceof n))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function r(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,n._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void o(t.promise,e)}i(t.promise,r)}else(1===e._state?i:o)(t.promise,e._value)})):e._deferreds.push(t)}function i(e,t){try{ -if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof n)return e._state=3,e._value=t,void s(e);if("function"==typeof r)return void u(function(e,t){return function(){e.apply(t,arguments)}}(r,t),e)}e._state=1,e._value=t,s(e)}catch(t){o(e,t)}}function o(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&n._immediateFn(function(){e._handled||n._unhandledRejectionFn(e._value)});for(var t=0,i=e._deferreds.length;t=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=r.length)return!1;var o=r.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(r.length-t),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}, -e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,i=0,o=0,s=0;t<=n;)if(i=t+(n-t)/2|0,o=this.prefixSum[i],s=o-this.values[i],e=o))break;t=i+1}return new r(i,e-s)},e}();t.PrefixSumComputer=i;var o=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new i(e),this._bustCache()} -return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=r._lines.length?i.FIN:(n=r._lines[o],u=r._wordenize(n,e),s=0,o+=1,a())};return{next:a}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],r=[],i=0,o=this._wordenize(n,t);ithis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e},t}(d.MirrorTextModel),v=function(){function t(e){this._foreignModuleFactory=e,this._foreignModule=null}return t.prototype.computeDiff=function(e,t,n){var r=this._getModel(e),i=this._getModel(t);if(!r||!i)return Promise.resolve(null) -;var o=r.getLinesContent(),s=i.getLinesContent(),u=new c.DiffComputer(o,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0}).computeDiff(),a=!(u.length>0)&&this._modelsAreIdentical(r,i);return Promise.resolve({identical:a,changes:u})},t.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0},t.prototype.computeMoreMinimalEdits=function(e,i){var o=this._getModel(e);if(!o)return Promise.resolve(i);for(var s=[],u=void 0,a=0,c=i=n.mergeSort(i,function(e,t){if(e.range&&t.range)return l.Range.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)});at._diffLimit)s.push({range:f,text:h -});else for(var g=r.stringDiff(m,h,!1),_=o.offsetAt(l.Range.lift(f).getStartPosition()),v=0,y=g;v0;)self.onmessage(r.shift())},0)})}(e.data)):r.push(e)}}()}).call(this); -//# sourceMappingURL=https://bce.bdstatic.com/fex/amis-gh-pagesnull.map \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/apex/apex_d4ae4dd.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/apex/apex_d4ae4dd.js deleted file mode 100644 index 266b5665..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/apex/apex_d4ae4dd.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/apex/apex",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};var s=[];["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"].forEach(function(e){var t;s.push(e),s.push(e.toUpperCase()),s.push((t=e).charAt(0).toUpperCase()+t.substr(1))}),t.language={defaultToken:"",tokenPostfix:".apex",keywords:s,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/azcli/azcli_1b0ef3f.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/azcli/azcli_1b0ef3f.js deleted file mode 100644 index ef883a6a..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/azcli/azcli_1b0ef3f.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/azcli/azcli",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#"}},t.language={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/bat/bat_9d67e6c.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/bat/bat_9d67e6c.js deleted file mode 100644 index d7a2021b..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/bat/bat_9d67e6c.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/bat/bat",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/coffee/coffee_ed86fc7.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/coffee/coffee_ed86fc7.js deleted file mode 100644 index 89e771e7..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/coffee/coffee_ed86fc7.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/coffee/coffee",["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/csharp/csharp_6d526d9.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/csharp/csharp_6d526d9.js deleted file mode 100644 index a1618775..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/csharp/csharp_6d526d9.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/csharp/csharp",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t.language={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/css/css_9b5d23e.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/css/css_9b5d23e.js deleted file mode 100644 index 2f37b42d..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/css/css_9b5d23e.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/css/css",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile_ae15175.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile_ae15175.js deleted file mode 100644 index 6fe5fe9f..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile_ae15175.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/dockerfile/dockerfile",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s.language={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/fsharp/fsharp_899ae6c.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/fsharp/fsharp_899ae6c.js deleted file mode 100644 index abed695d..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/fsharp/fsharp_899ae6c.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/fsharp/fsharp",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},n.language={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/go/go_c9012ae.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/go/go_c9012ae.js deleted file mode 100644 index e7efb7a2..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/go/go_c9012ae.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/go/go",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/handlebars/handlebars_3b4ba3a.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/handlebars/handlebars_3b4ba3a.js deleted file mode 100644 index 46389494..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/handlebars/handlebars_3b4ba3a.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/handlebars/handlebars",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}]},t.language={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/html/html_cae751f.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/html/html_cae751f.js deleted file mode 100644 index 0c2cba6b..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/html/html_cae751f.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/html/html",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/ini/ini_d156643.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/ini/ini_d156643.js deleted file mode 100644 index 1fb19d50..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/ini/ini_d156643.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/ini/ini",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/java/java_d1eb191.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/java/java_d1eb191.js deleted file mode 100644 index 610d5764..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/java/java_d1eb191.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/java/java",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},t.language={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/javascript/javascript_b58352d.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/javascript/javascript_b58352d.js deleted file mode 100644 index 22c47e1e..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/javascript/javascript_b58352d.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/typescript/typescript",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco;t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:n.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:n.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:n.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:n.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},t.language={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)/,"number.hex"],[/0[oO]?(@octaldigits)/,"number.octal"],[/0[bB](@binarydigits)/,"number.binary"],[/(@digits)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}),define("vs/basic-languages/javascript/javascript",["require","exports","../typescript/typescript"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});"undefined"==typeof monaco?self.monaco:monaco;t.conf=n.conf,t.language={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:n.language.operators,symbols:n.language.symbols,escapes:n.language.escapes,digits:n.language.digits,octaldigits:n.language.octaldigits,binarydigits:n.language.binarydigits,hexdigits:n.language.hexdigits,regexpctl:n.language.regexpctl,regexpesc:n.language.regexpesc,tokenizer:n.language.tokenizer}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/less/less_a309479.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/less/less_a309479.js deleted file mode 100644 index d51dfa16..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/less/less_a309479.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/less/less",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/lua/lua_c8b58eb.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/lua/lua_c8b58eb.js deleted file mode 100644 index ec2441b3..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/lua/lua_c8b58eb.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/lua/lua",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"variable.source",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/postiats/postiats_20abb55.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/postiats/postiats_20abb55.js deleted file mode 100644 index 9768c497..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/postiats/postiats_20abb55.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/postiats/postiats",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},t.language={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/powershell/powershell_d8ffc04.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/powershell/powershell_d8ffc04.js deleted file mode 100644 index 59a761e6..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/powershell/powershell_d8ffc04.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/powershell/powershell",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},n.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/pug/pug_a30d087.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/pug/pug_a30d087.js deleted file mode 100644 index 4fd045ec..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/pug/pug_a30d087.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/pug/pug",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},t.language={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/redis/redis_26463cb.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/redis/redis_26463cb.js deleted file mode 100644 index 6de6f52c..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/redis/redis_26463cb.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/redis/redis",["require","exports"],function(E,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},e.language={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/redshift/redshift_13e3c26.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/redshift/redshift_13e3c26.js deleted file mode 100644 index 962c472e..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/redshift/redshift_13e3c26.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/redshift/redshift",["require","exports"],function(e,_){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.conf={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},_.language={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/ruby/ruby_3457027.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/ruby/ruby_3457027.js deleted file mode 100644 index 935c021c..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/ruby/ruby_3457027.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/ruby/ruby",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp("^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|/).*\\4)*(#.*)?$"),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},t.language={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/rust/rust_13de2a3.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/rust/rust_13de2a3.js deleted file mode 100644 index a8f8d380..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/rust/rust_13de2a3.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/rust/rust",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},t.language={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","box","break","const","continue","crate","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'\S'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/sb/sb_902b8f0.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/sb/sb_902b8f0.js deleted file mode 100644 index f5945e95..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/sb/sb_902b8f0.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sb/sb",["require","exports"],function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},o.language={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/scheme/scheme_3e818b9.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/scheme/scheme_3e818b9.js deleted file mode 100644 index fcd1293e..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/scheme/scheme_3e818b9.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/scheme/scheme",["require","exports"],function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},o.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/scss/scss_709c082.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/scss/scss_709c082.js deleted file mode 100644 index bb812ee7..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/scss/scss_709c082.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/scss/scss",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".scss",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/shell/shell_c765862.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/shell/shell_c765862.js deleted file mode 100644 index 195185f3..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/shell/shell_c765862.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/shell/shell",["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},r.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],symbols:/[=>"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},e.language={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/sql/sql_0164782.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/sql/sql_0164782.js deleted file mode 100644 index 3c1624d9..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/sql/sql_0164782.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sql/sql",["require","exports"],function(E,T){"use strict";Object.defineProperty(T,"__esModule",{value:!0}),T.conf={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},T.language={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/st/st_7af06b2.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/st/st_7af06b2.js deleted file mode 100644 index d739f480..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/st/st_7af06b2.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/st/st",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},n.language={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","configuration","end_configuration","tcp","end_tcp","recource","end_recource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","world","dworld","array","pointer","lworld"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","сtu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/\@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/typescript/typescript_b47f441.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/typescript/typescript_b47f441.js deleted file mode 100644 index 3ff56bde..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/typescript/typescript_b47f441.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/typescript/typescript",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco;t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:n.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:n.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:n.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:n.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},t.language={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)/,"number.hex"],[/0[oO]?(@octaldigits)/,"number.octal"],[/0[bB](@binarydigits)/,"number.binary"],[/(@digits)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}); \ No newline at end of file diff --git a/gh-pages/n/monaco-editor/min/vs/basic-languages/vb/vb_ee7309d.js b/gh-pages/n/monaco-editor/min/vs/basic-languages/vb/vb_ee7309d.js deleted file mode 100644 index 53b561d1..00000000 --- a/gh-pages/n/monaco-editor/min/vs/basic-languages/vb/vb_ee7309d.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 1.7.0(06ba3ff7e80720fda9a83bce89dbe13ed389b69e) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/vb/vb",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},n.language={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,v.html=d(v.html,"i").replace("comment",v._comment).replace("tag",v._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v.paragraph=d(v.paragraph).replace("hr",v.hr).replace("heading",v.heading).replace("lheading",v.lheading).replace("tag",v._tag).getRegex(), -v.blockquote=d(v.blockquote).replace("paragraph",v.paragraph).getRegex(),v.normal=p({},v),v.gfm=p({},v.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),v.gfm.paragraph=d(v.paragraph).replace("(?!","(?!"+v.gfm.fences.source.replace("\\1","\\2")+"|"+v.list.source.replace("\\1","\\3")+"|").getRegex(),v.tables=p({},v.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),v.pedantic=p({},v.normal,{html:d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",v._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), -def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),t.rules=v,t.lex=function(e,i){return new t(i).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t){e=e.replace(/^ +$/gm,"");for(var i,n,o,r,s,a,l,u,d,c,h,p,m,_,y,b;e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:g(o,"\n")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2]?o[2].trim():o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if((o=this.rules.nptable.exec(e))&&(a={type:"table",header:f(o[1].replace(/^ *| *\| *$/g,"")), -align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(o[0].length),h=0;h ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),l={type:"list_start",ordered:_=(r=o[2]).length>1,start:_?+r:"",loose:!1},this.tokens.push(l),u=[],i=!1,m=(o=o[0].match(this.rules.item)).length,h=0;h1?1===s.length:s.length>1||this.options.smartLists&&s!==r)&&(e=o.slice(h+1).join("\n")+e,h=m-1)),n=i||/\n\n(?!\s*$)/.test(a),h!==m-1&&(i="\n"===a.charAt(a.length-1),n||(n=i)),n&&(l.loose=!0),b=void 0,(y=/^\[[ xX]\] /.test(a))&&(b=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),d={type:"list_item_start",task:y,checked:b,loose:n},u.push(d),this.tokens.push(d),this.token(a,!1),this.tokens.push({type:"list_item_end"});if(l.loose)for(m=u.length,h=0;h?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:h,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, -code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:h,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",_.em=d(_.em).replace(/punctuation/g,_._punctuation).getRegex(),_._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,_._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,_.autolink=d(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex(),_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,_.tag=d(_.tag).replace("comment",v._comment).replace("attribute",_._attribute).getRegex(),_._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,_._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/, -_.link=d(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex(),_.reflink=d(_.reflink).replace("label",_._label).getRegex(),_.normal=p({},_),_.pedantic=p({},_.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()}),_.gfm=p({},_.normal,{escape:d(_.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/, -text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length), -u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):l(s[0]):s[0];else if(s=this.rules.link.exec(e)){var d=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=0,n=0;n-1){var c=s[0].length-(s[2].length-d)-(s[3]||"").length;s[2]=s[2].substring(0,d),s[0]=s[0].substring(0,c).trim(),s[3]=""}e=e.substring(s[0].length),this.inLink=!0,o=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o))?(o=t[1],r=t[3]):r="":r=s[3]?s[3].slice(1,-1):"",o=o.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(s,{href:i.escapes(o),title:i.escapes(r)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){u+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,u+=this.outputLink(s,t),this.inLink=!1 -}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),u+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),u+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),u+=this.renderer.codespan(l(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),u+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),u+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),o="@"===s[2]?"mailto:"+(n=l(this.mangle(s[1]))):n=l(s[1]),u+=this.renderer.link(o,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?u+=this.renderer.text(s[0]):u+=this.renderer.text(l(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])o="mailto:"+(n=l(s[0]));else{do{a=s[0], -s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=l(s[0]),o="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),u+=this.renderer.link(o,null,n)}return u},i.escapes=function(e){return e?e.replace(i.rules._escapes,"$1"):e},i.prototype.outputLink=function(e,t){var i=t.href,n=t.title?l(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(i,n,this.output(e[1])):this.renderer.image(i,n,l(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,i="",n=e.length,o=0;o.5&&(t="x"+t.toString(16)),i+="&#"+t+";";return i},n.prototype.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)} -return n?'
'+(i?e:l(e,!0))+"
\n":"
"+(i?e:l(e,!0))+"
"},n.prototype.blockquote=function(e){return"
\n"+e+"
\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},n.prototype.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.checkbox=function(e){return" "},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},n.prototype.tablerow=function(e){ -return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,i){if(null===(e=c(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"},n.prototype.image=function(e,t,i){if(null===(e=c(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">"},n.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e}, -o.prototype.link=o.prototype.image=function(e,t,i){return""+i},o.prototype.br=function(){return""},r.parse=function(e,t){return new r(t).parse(e)},r.prototype.parse=function(e){this.inline=new i(e.links,this.options),this.inlineText=new i(e.links,p({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,u(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,i,n,o="",r="" -;for(i="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var i=t;do{this.seen[i]++,t=i+"-"+this.seen[i]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},l.escapeTest=/[&<>"']/,l.escapeReplace=/[&<>"']/g,l.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},l.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,l.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var y={},b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;h.exec=h,m.options=m.setOptions=function(e){return p(m.defaults,e),m},m.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-", -mangle:!0,pedantic:!1,renderer:new n,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},m.defaults=m.getDefaults(),m.Parser=r,m.parser=r.parse,m.Renderer=n,m.TextRenderer=o,m.Lexer=t,m.lexer=t.lex,m.InlineLexer=i,m.inlineLexer=i.output,m.Slugger=a,m.parse=m,s=m}).call(this),define("vs/base/common/marked/marked",function(){return s}),define(t[53],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote"}(t.Schemas||(t.Schemas={}))}),define(t[139],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)}}),define(t[17],i([0,1]),function(e,t){"use strict" -;Object.defineProperty(t,"__esModule",{value:!0});var i=!1,n=!1,o=!1,r=!1,s=!1,a="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||a){if("object"==typeof process){i="win32"===process.platform,n="darwin"===process.platform,o="linux"===process.platform,"en","en";var l=process.env.VSCODE_NLS_CONFIG;if(l)try{var u=JSON.parse(l),d=u.availableLanguages["*"];u.locale,d||"en",u._translationsConfigFile}catch(e){}r=!0}}else{var c=navigator.userAgent;i=c.indexOf("Windows")>=0,n=c.indexOf("Macintosh")>=0,o=c.indexOf("Linux")>=0,s=!0,navigator.language}t.isWindows=i,t.isMacintosh=n,t.isLinux=o,t.isNative=r,t.isWeb=s;var h="object"==typeof self?self:"object"==typeof global?global:{};t.globals=h;var p=null;t.setImmediate=function(e){ -return null===p&&(p=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),p(e)},t.OS=n?2:i?1:3}),define(t[52],i([0,1,30,36,17]),function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new Array(230),s=new Array(112);!function(){function e(e,t){r[e]=t,s[t]=e}for(var t=0;t=0;){if(r=s+o,(0===s||32===i.charCodeAt(s-1))&&32===i.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===i.charCodeAt(s-1)&&r===n)return this._lastStart=s-1, -void(this._lastEnd=r);if(0===s&&r===n)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,i=[],n=1;n0;){i.sort(L.sort);i.shift().execute()}o=!1};t.scheduleAtNextAnimationFrame=function(t,i){void 0===i&&(i=0);var o=new L(t,i);return e.push(o),n||(n=!0,f(r)),o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,n){if(o){var r=new L(e,n);return i.push(r),r}return t.scheduleAtNextAnimationFrame(e,n)}}();var x=16,D=function(e,t){return t},I=function(e){function t(t,i,n,o,r){void 0===o&&(o=D),void 0===r&&(r=x);var s=e.call(this)||this,l=null,u=0,d=s._register(new a.TimeoutTimer),c=function(){u=(new Date).getTime(),n(l),l=null};return s._register(p(t,i,function(e){l=o(l,e);var t=(new Date).getTime()-u;t>=r?(d.cancel(),c()):d.setIfNotSet(c,r-t)})),s}return o(t,e),t}(d.Disposable) -;t.addDisposableThrottledListener=function(e,t,i,n,o){return new I(e,t,i,n,o)},t.getComputedStyle=g;var N=function(){function e(){}return e.convertToPixels=function(e,t){return parseFloat(t)||0},e.getDimension=function(t,i,n){var o=g(t),r="0";return o&&(r=o.getPropertyValue?o.getPropertyValue(i):o.getAttribute(n)),e.convertToPixels(t,r)},e.getBorderLeftWidth=function(t){return e.getDimension(t,"border-left-width","borderLeftWidth")},e.getBorderRightWidth=function(t){return e.getDimension(t,"border-right-width","borderRightWidth")},e.getBorderTopWidth=function(t){return e.getDimension(t,"border-top-width","borderTopWidth")},e.getBorderBottomWidth=function(t){return e.getDimension(t,"border-bottom-width","borderBottomWidth")},e.getPaddingLeft=function(t){return e.getDimension(t,"padding-left","paddingLeft")},e.getPaddingRight=function(t){return e.getDimension(t,"padding-right","paddingRight")},e.getPaddingTop=function(t){return e.getDimension(t,"padding-top","paddingTop")},e.getPaddingBottom=function(t){ -return e.getDimension(t,"padding-bottom","paddingBottom")},e.getMarginLeft=function(t){return e.getDimension(t,"margin-left","marginLeft")},e.getMarginTop=function(t){return e.getDimension(t,"margin-top","marginTop")},e.getMarginRight=function(t){return e.getDimension(t,"margin-right","marginRight")},e.getMarginBottom=function(t){return e.getDimension(t,"margin-bottom","marginBottom")},e}(),M=function(){return function(e,t){this.width=e,this.height=t}}();t.Dimension=M,t.getTopLeftOffset=function(e){for(var t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;var o=g(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=N.getBorderLeftWidth(e),i+=N.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}},t.getDomNodePagePosition=function(e){var i=e.getBoundingClientRect();return{left:i.left+t.StandardWindow.scrollX,top:i.top+t.StandardWindow.scrollY,width:i.width,height:i.height} -},t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getTotalWidth=function(e){var t=N.getMarginLeft(e)+N.getMarginRight(e);return e.offsetWidth+t},t.getContentWidth=function(e){var t=N.getBorderLeftWidth(e)+N.getBorderRightWidth(e),i=N.getPaddingLeft(e)+N.getPaddingRight(e);return e.offsetWidth-t-i},t.getContentHeight=function(e){var t=N.getBorderTopWidth(e)+N.getBorderBottomWidth(e),i=N.getPaddingTop(e)+N.getPaddingBottom(e);return e.offsetHeight-t-i},t.getTotalHeight=function(e){var t=N.getMarginTop(e)+N.getMarginBottom(e);return e.offsetHeight+t},t.isAncestor=m, -t.findParentWithClass=function(e,i,n){for(;e;){if(t.hasClass(e,i))return e;if(n)if("string"==typeof n){if(t.hasClass(e,n))return null}else if(e===n)return null;e=e.parentNode}return null},t.createStyleSheet=v;var k=null;t.createCSSRule=function(e,t,i){void 0===i&&(i=_()),i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)},t.removeCSSRulesContainingSelector=function(e,t){if(void 0===t&&(t=_()),t){for(var i=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),n=[],o=0;o=0;o--)t.sheet.deleteRule(n[o])}},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu", -WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:i.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:i.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:i.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){for(var t=[],i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){ -for(var i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode};var T=function(){function e(e){var i=this;this._onDidFocus=new u.Emitter,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new u.Emitter,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var o=m(document.activeElement,e),r=!1;n.domEvent(e,t.EventType.FOCUS,!0)(function(){r=!1,o||(o=!0,i._onDidFocus.fire())},null,this.disposables),n.domEvent(e,t.EventType.BLUR,!0)(function(){o&&(r=!0,window.setTimeout(function(){r&&(r=!1,o=!1,i._onDidBlur.fire())},0))},null,this.disposables)}return e.prototype.dispose=function(){this.disposables=d.dispose(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();t.trackFocus=function(e){return new T(e)},t.append=function(e){for(var t=[],i=1;i0},t.prototype.startMonitoring=function(e,t,o){var s=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=o;for(var a=n.IframeUtils.getSameOriginWindowChain(),l=0,u=a;l=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};define(t[78],i([0,1,19,2,7,152]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart", -e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(l=t.EventType||(t.EventType={}));var u=function(e){function t(){var t=e.call(this)||this;return t.activeTouches={},t.handle=null,t.targets=[],t._register(r.addDisposableListener(document,"touchstart",function(e){return t.onTouchStart(e)})),t._register(r.addDisposableListener(document,"touchend",function(e){return t.onTouchEnd(e)})),t._register(r.addDisposableListener(document,"touchmove",function(e){return t.onTouchMove(e)})),t}return o(t,e),t.addTarget=function(e){t.isTouchDevice()&&(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.targets.push(e))},t.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},t.prototype.dispose=function(){this.handle&&(this.handle.dispose(),this.handle=null),e.prototype.dispose.call(this)},t.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var i=0,n=e.targetTouches.length;i=t.HOLD_DELAY&&Math.abs(d.initialPageX-i.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-i.tail(d.rollingPageY))<30){var h=s.newGestureEvent(l.Contextmenu,d.initialTarget);h.pageX=i.tail(d.rollingPageX),h.pageY=i.tail(d.rollingPageY),s.dispatchEvent(h)}else if(1===o){var p=i.tail(d.rollingPageX),f=i.tail(d.rollingPageY),g=i.tail(d.rollingTimestamps)-d.rollingTimestamps[0],m=p-d.rollingPageX[0],v=f-d.rollingPageY[0],_=s.targets.filter(function(e){return d.initialTarget instanceof Node&&e.contains(d.initialTarget)});s.inertia(_,n,Math.abs(m)/g,m>0?1:-1,p,Math.abs(v)/g,v>0?1:-1,f)}s.dispatchEvent(s.newGestureEvent(l.End,d.initialTarget)),delete s.activeTouches[u.identifier]},s=this,a=0,u=e.changedTouches.length;a0&&(g=!1,p=o*n*h),a>0&&(g=!1,f=u*a*h);var m=c.newGestureEvent(l.Change);m.translationX=p,m.translationY=f,e.forEach(function(e){return e.dispatchEvent(m)}),g||c.inertia(e,r,n,o,s+p,a,u,d+f)})},t.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(), -s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",r)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.SCROLL_FRICTION=-.005,t.HOLD_DELAY=700,a([s.memoize],t,"isTouchDevice",null),t}(n.Disposable);t.Gesture=u}),define(t[560],i([0,1,7]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.renderers=e,this.cache=new Map}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var n=i.$(".monaco-list-row");t={domNode:n,templateId:e,templateData:this.getRenderer(e).renderTemplate(n)}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,n=e.templateId;t&&(i.removeClass(t,"scrolling"),function(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(e){}}(t));this.getTemplateCache(n).push(e)}, -e.prototype.getTemplateCache=function(e){var t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t},e.prototype.garbageCollect=function(){var e=this;this.renderers&&(this.cache.forEach(function(t,i){for(var n=0,o=t;n140)i._setDesiredScrollPositionNow(s.getScrollPosition());else{var a=i._sliderMousePosition(e)-n;i._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))}},function(){i.slider.toggleClassName("active",!1),i._host.onDragEnd(),t()}),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.Widget);t.AbstractScrollbar=d}),define(t[552],i([0,1,43,168,133,196]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,o){var a=e.call(this,{lazyRender:n.lazyRender,host:o,scrollbarState:new s.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal", -scrollable:t})||this;if(n.horizontalHasArrows){var l=(n.arrowSize-r.ARROW_IMG_SIZE)/2,u=(n.horizontalScrollbarSize-r.ARROW_IMG_SIZE)/2;a._createArrow({className:"left-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return a._host.onMouseWheel(new i.StandardWheelEvent(null,1,0))}}),a._createArrow({className:"right-arrow",top:u,left:void 0,bottom:void 0,right:l,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return a._host.onMouseWheel(new i.StandardWheelEvent(null,-1,0))}})}return a._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),a}return o(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){ -return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(n.AbstractScrollbar);t.HorizontalScrollbar=a}),define(t[545],i([0,1,43,168,133,196]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,o){var a=e.call(this,{lazyRender:n.lazyRender,host:o,scrollbarState:new s.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){ -var l=(n.arrowSize-r.ARROW_IMG_SIZE)/2,u=(n.verticalScrollbarSize-r.ARROW_IMG_SIZE)/2;a._createArrow({className:"up-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return a._host.onMouseWheel(new i.StandardWheelEvent(null,0,1))}}),a._createArrow({className:"down-arrow",top:void 0,left:u,bottom:l,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return a._host.onMouseWheel(new i.StandardWheelEvent(null,0,-1))}})}return a._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),a}return o(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender, -this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(n.AbstractScrollbar);t.VerticalScrollbar=a}),define(t[540],i([0,1,17]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof process?{cwd:function(){return"/"},env:Object.create(null),get platform(){return i.isWindows?"win32":i.isMacintosh?"darwin":"linux"},nextTick:function(e){return i.setImmediate(e)}}:process;t.cwd=n.cwd,t.env=n.env,t.platform=n.platform}),define(t[74],i([0,1,540]),function(e,t,i){"use strict";function n(e,t){if("string"!=typeof e)throw new v(t,"string",e)}function r(e){return e===g||e===m}function s(e){return e===g} -function a(e){return e>=d&&e<=h||e>=c&&e<=p}function l(e,t,i,n){for(var o,r="",s=0,a=-1,l=0,u=0;u<=e.length;++u){if(u2){var d=r.lastIndexOf(i);-1===d?(r="",s=0):s=(r=r.slice(0,d)).length-1-r.lastIndexOf(i),a=u,l=0;continue}if(2===r.length||1===r.length){r="",s=0,a=u,l=0;continue}}t&&(r.length>0?r+=i+"..":r="..",s=2)}else r.length>0?r+=i+e.slice(a+1,u):r=e.slice(a+1,u),s=u-a-1;a=u,l=0}else o===f&&-1!==l?++l:l=-1}return r}function u(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+e+n:n}Object.defineProperty(t,"__esModule",{value:!0});var d=65,c=97,h=90,p=122,f=46,g=47,m=92,v=function(e){function t(t,i,n){var o;"string"==typeof i&&0===i.indexOf("not ")?(o="must not be",i=i.replace(/^not /,"")):o="must be" -;var r='The "'+t+'" '+(-1!==t.indexOf(".")?"property":"argument")+" "+o+" of type "+i;return r+=". Received type "+typeof n,e.call(this,r)||this}return o(t,e),t}(Error);t.win32={resolve:function(){for(var e=[],t=0;t=-1;d--){var c=void 0;if(d>=0?c=e[d]:o?void 0!==(c=i.env["="+o]||i.cwd())&&c.slice(0,3).toLowerCase()===o.toLowerCase()+"\\"||(c=o+"\\"):c=i.cwd(),n(c,"path"),0!==c.length){var h=c.length,p=0,f="",g=!1,m=c.charCodeAt(0);if(h>1)if(r(m))if(g=!0,r(c.charCodeAt(1))){for(var v=2,_=v;v2&&r(c.charCodeAt(2))&&(g=!0,p=3));else r(m)&&(p=1,g=!0) -;if(!(f.length>0&&o.length>0&&f.toLowerCase()!==o.toLowerCase())&&(0===o.length&&f.length>0&&(o=f),u||(s=c.slice(p)+"\\"+s,u=g),o.length>0&&u))break}}return s=l(s,!u,"\\",r),o+(u?"\\":"")+s||"."},normalize:function(e){n(e,"path");var t=e.length;if(0===t)return".";var i,o=0,s=!1,u=e.charCodeAt(0);if(t>1)if(r(u))if(s=!0,r(e.charCodeAt(1))){for(var d=2,c=d;d2&&r(e.charCodeAt(2))&&(s=!0,o=3));else if(r(u))return"\\";var p;return 0!==(p=o0&&r(e.charCodeAt(t-1))&&(p+="\\"),void 0===i?s?p.length>0?"\\"+p:"\\":p.length>0?p:"":s?p.length>0?i+"\\"+p:i+"\\":p.length>0?i+p:i},isAbsolute:function(e){n(e,"path");var t=e.length;if(0===t)return!1 -;var i=e.charCodeAt(0);return!!r(i)||!!(a(i)&&t>2&&58===e.charCodeAt(1)&&r(e.charCodeAt(2)))},join:function(){for(var e=[],i=0;i0&&(void 0===o?o=s=l:o+="\\"+l)}if(void 0===o)return".";var u=!0,d=0;if("string"==typeof s&&r(s.charCodeAt(0))){++d;var c=s.length;c>1&&r(s.charCodeAt(1))&&(++d,c>2&&(r(s.charCodeAt(2))?++d:u=!1))}if(u){for(;d=2&&(o="\\"+o.slice(d))}return t.win32.normalize(o)},relative:function(e,i){if(n(e,"from"),n(i,"to"),e===i)return"";var o=t.win32.resolve(e),r=t.win32.resolve(i);if(o===r)return"";if(e=o.toLowerCase(),i=r.toLowerCase(),e===i)return"";for(var s=0;ss&&e.charCodeAt(a-1)===m;--a);for(var l=a-s,u=0;uu&&i.charCodeAt(d-1)===m;--d);for(var c=d-u,h=lh){ -if(i.charCodeAt(u+f)===m)return r.slice(u+f+1);if(2===f)return r.slice(u+f)}l>h&&(e.charCodeAt(s+f)===m?p=f:2===f&&(p=3));break}var g=e.charCodeAt(s+f);if(g!==i.charCodeAt(u+f))break;g===m&&(p=f)}if(f!==h&&-1===p)return r;var v="";for(-1===p&&(p=0),f=s+p+1;f<=a;++f)f!==a&&e.charCodeAt(f)!==m||(0===v.length?v+="..":v+="\\..");return v.length>0?v+r.slice(u+p,d):(u+=p,r.charCodeAt(u)===m&&++u,r.slice(u,d))},toNamespacedPath:function(e){if("string"!=typeof e)return e;if(0===e.length)return"";var i=t.win32.resolve(e);if(i.length>=3)if(i.charCodeAt(0)===m){if(i.charCodeAt(1)===m){var n=i.charCodeAt(2);if(63!==n&&n!==f)return"\\\\?\\UNC\\"+i.slice(2)}}else if(a(i.charCodeAt(0))&&58===i.charCodeAt(1)&&i.charCodeAt(2)===m)return"\\\\?\\"+i;return e},dirname:function(e){n(e,"path");var t=e.length;if(0===t)return".";var i=-1,o=-1,s=!0,l=0,u=e.charCodeAt(0);if(t>1)if(r(u)){if(i=l=1,r(e.charCodeAt(1))){for(var d=2,c=d;d2&&r(e.charCodeAt(2))&&(i=l=3));else if(r(u))return e;for(var h=t-1;h>=l;--h)if(r(e.charCodeAt(h))){if(!s){o=h;break}}else s=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename:function(e,t){void 0!==t&&n(t,"ext"),n(e,"path");var i,o=0,s=-1,l=!0;if(e.length>=2){a(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(o=2)}if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var u=t.length-1,d=-1;for(i=e.length-1;i>=o;--i){var c=e.charCodeAt(i);if(r(c)){if(!l){o=i+1;break}}else-1===d&&(l=!1,d=i+1),u>=0&&(c===t.charCodeAt(u)?-1==--u&&(s=i):(u=-1,s=d))}return o===s?s=d:-1===s&&(s=e.length),e.slice(o,s)}for(i=e.length-1;i>=o;--i)if(r(e.charCodeAt(i))){if(!l){o=i+1;break}}else-1===s&&(l=!1,s=i+1);return-1===s?"":e.slice(o,s)},extname:function(e){n(e,"path");var t=0,i=-1,o=0,s=-1,l=!0,u=0;e.length>=2&&58===e.charCodeAt(1)&&a(e.charCodeAt(0))&&(t=o=2) -;for(var d=e.length-1;d>=t;--d){var c=e.charCodeAt(d);if(r(c)){if(!l){o=d+1;break}}else-1===s&&(l=!1,s=d+1),c===f?-1===i?i=d:1!==u&&(u=1):-1!==i&&(u=-1)}return-1===i||-1===s||0===u||1===u&&i===s-1&&i===o+1?"":e.slice(i,s)},format:function(e){if(null===e||"object"!=typeof e)throw new v("pathObject","Object",e);return u("\\",e)},parse:function(e){n(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i=e.length,o=0,s=e.charCodeAt(0);if(i>1){if(r(s)){if(o=1,r(e.charCodeAt(1))){for(var l=2,u=l;l2))return t.root=t.dir=e,t;if(r(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;o=3}}}else if(r(s))return t.root=t.dir=e,t;o>0&&(t.root=e.slice(0,o));for(var d=-1,c=o,h=-1,p=!0,g=e.length-1,m=0;g>=o;--g)if(s=e.charCodeAt(g),r(s)){if(!p){c=g+1;break}}else-1===h&&(p=!1,h=g+1), -s===f?-1===d?d=g:1!==m&&(m=1):-1!==d&&(m=-1);return-1===d||-1===h||0===m||1===m&&d===h-1&&d===c+1?-1!==h&&(t.base=t.name=e.slice(c,h)):(t.name=e.slice(c,d),t.base=e.slice(c,h),t.ext=e.slice(d,h)),t.dir=c>0&&c!==o?e.slice(0,c-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve:function(){for(var e=[],t=0;t=-1&&!r;a--){var u=void 0;n(u=a>=0?e[a]:i.cwd(),"path"),0!==u.length&&(o=u+"/"+o,r=u.charCodeAt(0)===g)}return o=l(o,!r,"/",s),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(n(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===g,i=e.charCodeAt(e.length-1)===g;return 0!==(e=l(e,!t,"/",s)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e,"path"),e.length>0&&e.charCodeAt(0)===g},join:function(){for(var e=[],i=0;i0&&(void 0===o?o=s:o+="/"+s)}return void 0===o?".":t.posix.normalize(o)},relative:function(e,i){if(n(e,"from"),n(i,"to"),e===i)return"";if(e=t.posix.resolve(e),i=t.posix.resolve(i),e===i)return"";for(var o=1;ou){if(i.charCodeAt(a+c)===g)return i.slice(a+c+1);if(0===c)return i.slice(a+c)}else s>u&&(e.charCodeAt(o+c)===g?d=c:0===c&&(d=0));break}var h=e.charCodeAt(o+c);if(h!==i.charCodeAt(a+c))break;h===g&&(d=c)}var p="";for(c=o+d+1;c<=r;++c)c!==r&&e.charCodeAt(c)!==g||(0===p.length?p+="..":p+="/..");return p.length>0?p+i.slice(a+d):(a+=d,i.charCodeAt(a)===g&&++a,i.slice(a))},toNamespacedPath:function(e){return e},dirname:function(e){if(n(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===g,i=-1,o=!0,r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===g){if(!o){i=r;break}}else o=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)}, -basename:function(e,t){void 0!==t&&n(t,"ext"),n(e,"path");var i,o=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(u===g){if(!s){o=i+1;break}}else-1===l&&(s=!1,l=i+1),a>=0&&(u===t.charCodeAt(a)?-1==--a&&(r=i):(a=-1,r=l))}return o===r?r=l:-1===r&&(r=e.length),e.slice(o,r)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===g){if(!s){o=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(o,r)},extname:function(e){n(e,"path");for(var t=-1,i=0,o=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(l!==g)-1===o&&(r=!1,o=a+1),l===f?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){i=a+1;break}}return-1===t||-1===o||0===s||1===s&&t===o-1&&t===i+1?"":e.slice(t,o)},format:function(e){if(null===e||"object"!=typeof e)throw new v("pathObject","Object",e);return u("/",e)},parse:function(e){n(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t -;var i,o=e.charCodeAt(0)===g;o?(t.root="/",i=1):i=0;for(var r=-1,s=0,a=-1,l=!0,u=e.length-1,d=0;u>=i;--u){var c=e.charCodeAt(u);if(c!==g)-1===a&&(l=!1,a=u+1),c===f?-1===r?r=u:1!==d&&(d=1):-1!==r&&(d=-1);else if(!l){s=u+1;break}}return-1===r||-1===a||0===d||1===d&&r===a-1&&r===s+1?-1!==a&&(t.base=t.name=0===s&&o?e.slice(1,a):e.slice(s,a)):(0===s&&o?(t.name=e.slice(1,r),t.base=e.slice(1,a)):(t.name=e.slice(s,r),t.base=e.slice(s,a)),t.ext=e.slice(r,a)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,t.posix.posix=t.win32.posix=t.posix,t.normalize="win32"===i.platform?t.win32.normalize:t.posix.normalize,t.join="win32"===i.platform?t.win32.join:t.posix.join,t.relative="win32"===i.platform?t.win32.relative:t.posix.relative,t.dirname="win32"===i.platform?t.win32.dirname:t.posix.dirname,t.basename="win32"===i.platform?t.win32.basename:t.posix.basename,t.extname="win32"===i.platform?t.win32.extname:t.posix.extname, -t.sep="win32"===i.platform?t.win32.sep:t.posix.sep}),define(t[129],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){var n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}}(t.Range||(t.Range={}))}),define(t[539],i([0,1,129]),function(e,t,i){"use strict";function n(e,t){for(var n=[],o=0,r=t;o=s.range.end)){if(e.endt&&(i=t-e),i<0&&(i=0),n<0&&(n=0), -r+n>o&&(r=o-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){ -var t=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,n=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:i,scrollLeftChanged:n,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}();t.ScrollState=s;var a=function(e){function t(t,n){var o=e.call(this)||this;return o._onScroll=o._register(new i.Emitter),o.onScroll=o._onScroll.event,o._smoothScrollDuration=t,o._scheduleAtNextAnimationFrame=n,o._state=new s(0,0,0,0,0,0),o._smoothScrolling=null,o}return o(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){ -return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};n=this._state.withScrollPosition(e) -;if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{var n=this._state.withScrollPosition(e);this._smoothScrolling=u.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())})},t.prototype._performSmoothScrolling=function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),i=this._state.withScrollPosition(t);if(this._setState(i),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})}}, -t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(n.Disposable);t.Scrollable=a;var l=function(){return function(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}();t.SmoothScrollingUpdate=l;var u=function(){function e(e,t,i,n){this.from=e,this.to=t,this.duration=n,this._startTime=i,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)},e.prototype._initAnimation=function(e,t,i){if(Math.abs(e-t)>2.5*i){var n=void 0,o=void 0;return e=97&&e<=122}function s(e){return e>=65&&e<=90}function a(e){return r(e)||s(e)}function l(e,t,i){if(void 0===i&&(i=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var n=0;n=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,i){void 0===i&&(i="0");for(var n=""+e,o=[n],r=n.length;r=t.length?e:t[n]})},t.escape=function(e){return e.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=i,t.trim=function(e,t){return void 0===t&&(t=" "),o(n(e,t),t)},t.ltrim=n,t.rtrim=o,t.convertSimple2RegExpPattern=function(e){ -return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,i)===i:0===i&&e===t},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=i(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var o="";return n.global&&(o+="g"),n.matchCase||(o+="i"),n.multiline&&(o+="m"),n.unicode&&(o+="u"),new RegExp(e,o)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)},t.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(var t=0,i=e.length;t=0;i--){var n=e.charCodeAt(i);if(32!==n&&9!==n)return i}return-1},t.compare=function(e,t){return et?1:0},t.isLowerAsciiLetter=r,t.isUpperAsciiLetter=s,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&l(e,t)},t.startsWithIgnoreCase=function(e,t){var i=t.length;return!(t.length>e.length)&&l(e,t,i)},t.commonPrefixLength=function(e,t){var i,n=Math.min(e.length,t.length);for(i=0;i0&&65279===e.charCodeAt(0))},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var i="",n=0;ne.length)return!1;if(o){if(!i.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;var s=t.length;return t.charAt(t.length-1)===r&&s--,e.charAt(s)===r}return t.charAt(t.length-1)!==r&&(t+=r),0===e.indexOf(t)},t.isWindowsDriveLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122}}), -define(t[65],i([0,1,46,5]),function(e,t,i,n){"use strict";function o(){for(var e=[],t=0;t0&&!h(e.charCodeAt(i-1)))return i}return e.length}function g(e,t,i,n){ -if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;var o=null,r=n+1;for(o=g(e,t,i+1,n+1);!o&&(r=f(t,r))60)return null;var i=function(e){for(var t=0,i=0,n=0,o=0,r=0,s=0;s.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(i))return null;t=t.toLowerCase()}var n=null,o=0 -;for(e=e.toLowerCase();o=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function b(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function C(e,t,i){return t[e]!==i[e]}function S(e,t,i,n,o,r,s){var a=e.length>N?N:e.length,l=n.length>N?N:n.length;if(!(i>=a||r>=l||a>l)&&function(e,t,i,n,o,r){for(;t1?1:c),p=M[i-1][r]+-1,f=M[i][r-1]+-1;f>=p?f>h?(M[i][r]=f,T[i][r]=4):f===h?(M[i][r]=f,T[i][r]=6):(M[i][r]=h,T[i][r]=2):p>h?(M[i][r]=p,T[i][r]=1):p===h?(M[i][r]=p,T[i][r]=3):(M[i][r]=h,T[i][r]=2)}if(R&&(console.log(_(M,e,a,n,l)),console.log(_(T,e,a,n,l)),console.log(_(k,e,a,n,l))),O=0,A=-100,F=u,W=s,w(a,l,a===l?1:0,0,!1),0!==O)return[A,P,d]}}function w(e,t,i,n,o){if(!(O>=10||i<-25)){for(var r=0;e>F&&t>0;){var s=k[e][t],a=T[e][t];if(4===a)t-=1,o?i-=5:0!==n&&(i-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&w(e,t-1,0!==n?i-1:i,n,o),i+=s,e-=1,t-=1,o=!0,n+=Math.pow(2,t),1===s){if(r+=1,e===F&&!W)return}else i+=1+r*(s-1),r=0}}O+=1,(i-=t>=3?9:3*t)>A&&(A=i,P=n)}}function E(e,t,i,n,o,r,s){return function(e,t,i,n,o,r,s,a){var l=S(e,t,i,n,o,r,a);if(l&&!s)return l;if(e.length>=3)for(var u=Math.min(7,e.length-1),d=i+1;d=e.length)return;var i=e[t],n=e[t+1];if(i===n)return;return e.slice(0,t)+n+i+e.slice(t+2)}(e,d);if(c){var h=S(c,c.toLowerCase(),i,n,o,r,a);h&&(h[0]-=3,(!l||h[0]>l[0])&&(l=h))}}return l}(e,t,i,n,o,r,!0,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.or=o,t.matchesPrefix=function(e,t,i){return!i||i.length0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0),t.matchesContiguousSubString=r,t.matchesSubString=s,t.isUpper=u;var L=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(function(e){return L.add(e.charCodeAt(0))}),t.matchesCamelCase=m;var x=o(t.matchesPrefix,m,r),D=o(t.matchesPrefix,m,s),I=new i.LRUCache(1e4);t.matchesFuzzy=function(e,t,i){if(void 0===i&&(i=!1),"string"!=typeof e||"string"!=typeof t)return null;var o=I.get(e);o||(o=new RegExp(n.convertSimple2RegExpPattern(e),"i"),I.set(e,o));var r=o.exec(t);return r?[{start:r.index,end:r.index+r[0].length}]:i?D(e,t):x(e,t)}, -t.anyScore=function(e,t,i,n,o,r){var s=S(e,t,0,n,o,0,!0);if(s)return s;for(var a=0,l=0,u=r,d=0;d=0&&(l+=1,a+=Math.pow(2,c),u=c+1)}return[l,a,r]},t.createMatches=function(e){if(void 0===e)return[];for(var t=e[1].toString(2),i=[],n=e[2];n0;i--){var r=e.charCodeAt(i-1);if(47===r||92===r)break}t=e.substr(i)}var s=o.indexOf(t);return-1!==s?n[s]:null};a.basenames=o,a.patterns=n,a.allBasenames=o;var l=e.filter(function(e){return!e.basenames});return l.push(a),l}Object.defineProperty(t,"__esModule",{value:!0});var _="**",y="/",b="[/\\\\]",C="[^/\\\\]",S=/\//g;t.splitGlobAware=u -;var w=/^\*\*\/\*\.[\w\.-]+$/,E=/^\*\*\/([\w\.-]+)\/?$/,L=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,x=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,D=/^\*\*((\/[\w\.-]+)+)\/?$/,I=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,N=new s.LRUCache(1e4),M=function(){return!1},k=function(){return null};t.match=function(e,t,i){return!(!e||"string"!=typeof t)&&g(e)(t,void 0,i)},t.parse=g,t.isRelativePattern=m}),define(t[533],i([0,1,74,5,225]),function(e,t,i,n,o){"use strict";function r(e,t){void 0===t&&(t=!1);var n=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(i.posix.sep)>=0}}(e);l.push(n), -n.userConfigured?d.push(n):u.push(n),t&&!n.userConfigured&&l.forEach(function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<"+n.extension+">> to now point to mime <<"+n.mime+">>"),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<"+n.filename+">> to now point to mime <<"+n.mime+">>"),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<"+n.filepattern+">> to now point to mime <<"+n.mime+">>"),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<"+n.firstline+">> to now point to mime <<"+n.mime+">>"))})}function s(e,o){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var r=i.basename(e),s=a(e,r,d);if(s)return[s,t.MIME_TEXT];var c=a(e,r,u);if(c)return[c,t.MIME_TEXT];if(o){var h=function(e){n.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0,i=l;t0)return o.mime}} -return null}(o);if(h)return[h,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function a(e,t,i){for(var r=null,s=null,a=null,l=i.length-1;l>=0;l--){var u=i[l];if(t===u.filenameLowercase){r=u;break}if(u.filepattern&&(!s||u.filepattern.length>s.filepattern.length)){var d=u.filepatternOnPath?e:t;o.match(u.filepatternLowercase,d)&&(s=u)}u.extension&&(!a||u.extension.length>a.extension.length)&&n.endsWith(t,u.extensionLowercase)&&(a=u)}return r?r.mime:s?s.mime:a?a.mime:null}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_UNKNOWN="application/unknown";var l=[],u=[],d=[];t.registerTextMime=r,t.guessMimeTypes=s}),define(t[20],i([0,1]),function(e,t){"use strict";function i(e){return typeof e===l.string||e instanceof String}function n(e){return!(typeof e!==l.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===l.undefined}function r(e){return o(e)||null===e}function s(e){return typeof e===l.function}function a(e,t){if(i(t)){ -if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(s(t)){try{if(e instanceof t)return}catch(e){}if(!r(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var l={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=function(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==l.number||e.constructor!==Array)},t.isString=i,t.isObject=n,t.isNumber=function(e){return(typeof e===l.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=r;var u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!n(e))return!1;for(var t in e)if(u.call(e,t))return!1;return!0},t.isFunction=s,t.validateConstraints=function(e,t){ -for(var i=Math.min(e.length,t.length),n=0;n0;){var i=t.shift();Object.freeze(i);for(var n in i)if(a.call(i,n)){var o=i[n];"object"!=typeof o||Object.isFrozen(o)||t.push(o)}}return e};var a=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){ -return o(e,t,new Set)},t.mixin=r,t.assign=function(e){for(var t=[],i=1;i";var a=this.text.substring(t,s.start);e+=this.supportOcticons?n.renderOcticons(a):o.escape(a),e+="",t=s.end}e+='';l=this.text.substring(s.start,s.end);e+=this.supportOcticons?n.renderOcticons(l):o.escape(l),e+="",t=s.end}}if(t";var l=this.text.substring(t);e+=this.supportOcticons?n.renderOcticons(l):o.escape(l),e+=""}this.domNode.innerHTML=e,this.domNode.title=this.title,this.didEverRender=!0},e.escapeNewLines=function(e,t){var i=0,n=0;return e.replace(/\r\n|\r|\n/g,function(e,o){n="\r\n"===e?-1:0,o+=i;for(var r=0,s=t;r=o&&(a.start+=n),a.end>=o&&(a.end+=n))}return i+=n,"⏎"})},e}();t.HighlightedLabel=r}),define(t[25],i([0,1,17]),function(e,t,i){"use strict";function n(e,t){for(var i=void 0,n=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));var s=v[r];void 0!==s?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=s):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function r(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){var i=t?function(e){for(var t=void 0,i=0;i=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){(h=a.charCodeAt(1))>=65&&h<=90&&(a="/"+String.fromCharCode(h+32)+":"+a.substr(3))}else if(a.length>=2&&58===a.charCodeAt(1)){var h=a.charCodeAt(0);h>=65&&h<=90&&(a=String.fromCharCode(h+32)+":"+a.substr(2))}o+=i(a,!0)}return l&&(o+="?",o+=i(l,!1)),u&&(o+="#",o+=t?u:n(u,!1)),o}Object.defineProperty(t,"__esModule",{value:!0});var a,l=/^\w[\w\d+.-]*$/,u=/^\//,d=/^\/\//,c=!0,h="",p="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(e,t,i,n,o,r){void 0===r&&(r=!1),"object"==typeof e?(this.scheme=e.scheme||h,this.authority=e.authority||h,this.path=e.path||h,this.query=e.query||h, -this.fragment=e.fragment||h):(this.scheme=function(e,t){return t||c?e||h:(e||(console.trace("BAD uri lacks scheme, falling back to file-scheme."),e="file"),e)}(e,r),this.authority=t||h,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,i||h),this.query=n||h,this.fragment=o||h,function(e,t){if(!e.scheme){if(t||c)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}')}if(e.scheme&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character') -}else if(d.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,r))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return r(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,i=e.authority,n=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=h),void 0===i?i=this.authority:null===i&&(i=h),void 0===n?n=this.path:null===n&&(n=h),void 0===o?o=this.query:null===o&&(o=h),void 0===r?r=this.fragment:null===r&&(r=h),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&r===this.fragment?this:new m(t,i,n,o,r)},e.parse=function(e,t){ -void 0===t&&(t=!1);var i=f.exec(e);return i?new m(i[2]||h,decodeURIComponent(i[4]||h),decodeURIComponent(i[5]||h),decodeURIComponent(i[7]||h),decodeURIComponent(i[9]||h),t):new m(h,h,h,h,h)},e.file=function(e){var t=h;if(i.isWindows&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var n=e.indexOf(p,2);-1===n?(t=e.substring(2),e=p):(t=e.substring(2,n),e=e.substring(n)||p)}return new m("file",t,e,h,h)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),s(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var i=new m(t);return i._fsPath=t.fsPath,i._formatted=t.external,i}return t},e}();t.URI=g;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return o(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=r(this)),this._fsPath},enumerable:!0,configurable:!0}), -t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(g),v=(a={},a[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a)}),define(t[183],i([0,1,25]),function(e,t,i){"use strict";function n(e,t){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return i.URI.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var o in e)Object.hasOwnProperty.call(e,o)&&(e[o]=n(e[o],t+1))}return e} -Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e){var t=JSON.parse(e);return t=n(t,0)},t.revive=n}),define(t[119],i([0,1,7,142,5,87,583,10,25,183,31]),function(e,t,i,n,o,r,s,a,l,u,d){"use strict";function c(e){var t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}function h(e,t){void 0===t&&(t={});var i=c(t);return f(i,function(e){var t={type:1,children:[]},i=0,n=t,o=[],r=new m(e);for(;!r.eos();){var s=r.next(),a="\\"===s&&0!==g(r.peek());if(a&&(s=r.next()),!a&&function(e){return 0!==g(e)}(s)&&s===r.peek()){r.advance(),2===n.type&&(n=o.pop());var l=g(s);if(n.type===l||5===n.type&&6===l)n=o.pop();else{var u={type:l,children:[]};5===l&&(u.index=i,i++),n.children.push(u),o.push(n),n=u}}else if("\n"===s)2===n.type&&(n=o.pop()),n.children.push({type:7});else if(2!==n.type){var d={type:2,content:s};n.children.push(d),o.push(n),n=d}else n.content+=s}2===n.type&&(n=o.pop());o.length;return t}(e),t.actionHandler),i}function p(e,t){void 0===t&&(t={}) -;var h,p=c(t),f=function(t){var i=e.uris&&e.uris[t];if(!i)return t;var n=l.URI.revive(i);return n.query&&(n=n.with({query:function(t){var i;try{i=u.parse(decodeURIComponent(t))}catch(e){}return i?(i=d.cloneAndChange(i,function(t){return e.uris&&e.uris[t]?l.URI.revive(e.uris[t]):void 0}),encodeURIComponent(JSON.stringify(i))):t}(n.query)})),i&&(t=n.toString(!0)),t},g=new Promise(function(e){return h=e}),m=new s.Renderer;m.image=function(e,t,i){var n=[];if(e=f(e)){var o=e.split("|").map(function(e){return e.trim()});e=o[0];var r=o[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),l=s?s[1]:"",u=a?a[1]:"",d=isFinite(parseInt(u)),c=isFinite(parseInt(l));d&&n.push('width="'+u+'"'),c&&n.push('height="'+l+'"')}}var h=[];return e&&h.push('src="'+e+'"'),i&&h.push('alt="'+i+'"'),t&&h.push('title="'+t+'"'),n.length&&(h=h.concat(n)),""},m.link=function(t,i,n){return t===n&&(n=r.removeMarkdownEscapes(n)),t=f(t),i=r.removeMarkdownEscapes(i), -!(t=r.removeMarkdownEscapes(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?n:'/g,">").replace(/"/g,""").replace(/'/g,"'"))+'" title="'+(i||t)+'">'+n+""},m.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(m.code=function(e,i){var r=t.codeBlockRenderer(i,e),s=n.defaultGenerator.nextId(),a=Promise.all([r,g]).then(function(e){var t=e[0],i=p.querySelector('div[data-code="'+s+'"]');i&&(i.innerHTML=t)}).catch(function(e){});return t.codeBlockRenderCallback&&a.then(t.codeBlockRenderCallback),'
    '+o.escape(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(i.addStandardDisposableListener(p,"click",function(e){var i=e.target;if("A"===i.tagName||(i=i.parentElement)&&"A"===i.tagName)try{var n=i.dataset.href;n&&t.actionHandler.callback(n,e)}catch(e){a.onUnexpectedError(e) -}finally{e.preventDefault()}}));var v={sanitize:!0,renderer:m};return p.innerHTML=s.parse(e.value,v),h(),p}function f(e,t,n){var o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(5===t.type&&n){var r=document.createElement("a");r.href="#",n.disposeables.push(i.addStandardDisposableListener(r,"click",function(e){n.callback(String(t.index),e)})),o=r}else 7===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach(function(e){f(o,e,n)})}function g(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.renderText=function(e,t){void 0===t&&(t={});var i=c(t);return i.textContent=e,i},t.renderFormattedText=h,t.renderMarkdown=p;var m=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){ -return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}()}),define(t[54],i([0,1,223,74,25,5,53,17]),function(e,t,i,n,o,r,s,a){"use strict";function l(e){return!e||e.scheme!==s.Schemas.file||!a.isLinux}function u(e,t){return e===t||r.equalsIgnoreCase(e,t)}function d(e){return n.posix.basename(e.path)}function c(e){var t,n=e.path;return t=e.authority&&n.length>1&&e.scheme===s.Schemas.file?"//"+e.authority+n:a.isWindows&&47===n.charCodeAt(0)&&i.isWindowsDriveLetter(n.charCodeAt(1))&&58===n.charCodeAt(2)?n.substr(1):n,a.isWindows&&(t=t.replace(/\//g,"\\")),t}Object.defineProperty(t,"__esModule",{value:!0}),t.hasToIgnoreCase=l,t.basenameOrAuthority=function(e){return d(e)||e.authority},t.isEqualAuthority=u,t.isEqual=function(e,t,i){if(void 0===i&&(i=l(e)),e===t)return!0;if(!e||!t)return!1;if(e.scheme!==t.scheme||!u(e.authority,t.authority))return!1 -;var n=e.path||"/",o=t.path||"/";return n===o||i&&r.equalsIgnoreCase(n||"/",o||"/")},t.basename=d,t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===s.Schemas.file)return o.URI.file(n.dirname(c(e)));var t=n.posix.dirname(e.path);return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error('dirname("'+e.toString+")) resulted in a relative path"),t="/"),e.with({path:t})},t.joinPath=function(e){for(var t,i=[],r=1;r1,p=void 0;if(p=a.isEqual(c.uri,e)?"":a.relativePath(c.uri,e),h){var f=c&&c.name?c.name:a.basename(c.uri);p=p?f+" • "+p:f}return p}}if(e.scheme!==r.Schemas.file&&e.scheme!==r.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(l(e.fsPath))return n.normalize(u(e.fsPath));var g=n.normalize(e.fsPath);return!s.isWindows&&t&&(g=d(g,t.userHome)),g},t.getBaseLabel=function(e){if(e){"string"==typeof e&&(e=i.URI.file(e));var t=a.basename(e)||(e.scheme===r.Schemas.file?e.fsPath:e.path);return l(t)?u(t):t}},t.normalizeDriveLetter=u;var c=Object.create(null);t.tildify=d}),define(t[200],i([0,1,10,2,17,20]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="$initialize",l=!1;t.logOnceWebWorkerWarning=function(e){r.isWeb&&(l||(l=!0, -console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var u=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var i=this,n=String(++this._lastSentReq);return new Promise(function(o,r){i._pendingReplies[n]={resolve:o,reject:r},i._send({vsWorker:i._workerId,req:n,method:e,args:t})})},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){return}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var o=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){ -var r=n.err;return n.err.$isError&&((r=new Error).name=n.err.name,r.message=n.err.message,r.stack=n.err.stack),void o.reject(r)}o.resolve(n.res)}else{var s=e,a=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=i.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:a,res:void 0,err:i.transformErrorForSerialization(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),d=function(e){function t(t,i){var n=e.call(this)||this,o=null;n._worker=n._register(t.create("vs/base/common/worker/simpleWorker",function(e){n._protocol.handleMessage(e)},function(e){o&&o(e)})),n._protocol=new u({sendMessage:function(e){n._worker.postMessage(e)},handleMessage:function(e,t){return Promise.resolve(null)}}),n._protocol.setWorkerId(n._worker.getId());var r=null -;void 0!==self.require&&"function"==typeof self.require.getConfig?r=self.require.getConfig():void 0!==self.requirejs&&(r=self.requirejs.s.contexts._.config),n._onModuleLoaded=n._protocol.sendMessage(a,[n._worker.getId(),i,r]),n._lazyProxy=new Promise(function(e,t){o=t,n._onModuleLoaded.then(function(t){for(var i={},n=0,o=t;n0)},e.prototype.getChildren=function(e,t){var i=this.modelProvider.getModel();return Promise.resolve(i===t?i.entries:[])},e.prototype.getParent=function(e,t){ -return Promise.resolve(null)},e}();t.DataSource=n;var o=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var i=this.modelProvider.getModel();return i.accessibilityProvider?i.accessibilityProvider.getAriaLabel(t):null},e.prototype.getPosInSet=function(e,t){var i=this.modelProvider.getModel(),n=0;if(i.filter)for(var o=0,r=i.entries;o=0;t--){var i=this._arr[t];if(e.toChord().equals(i.keybinding))return i.callback} -return null},e}();t.KeybindingDispatcher=s;var a=function(){function e(e){var t=this;void 0===e&&(e={clickBehavior:0,keyboardSupport:!0,openMode:0}),this.options=e,this.downKeyBindingDispatcher=new s,this.upKeyBindingDispatcher=new s,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,function(e,i){return t.onUp(e,i)}),this.downKeyBindingDispatcher.set(18,function(e,i){return t.onDown(e,i)}),this.downKeyBindingDispatcher.set(15,function(e,i){return t.onLeft(e,i)}),this.downKeyBindingDispatcher.set(17,function(e,i){return t.onRight(e,i)}),i.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,function(e,i){return t.onLeft(e,i)}),this.downKeyBindingDispatcher.set(300,function(e,i){return t.onDown(e,i)}),this.downKeyBindingDispatcher.set(302,function(e,i){return t.onUp(e,i)})),this.downKeyBindingDispatcher.set(11,function(e,i){return t.onPageUp(e,i)}),this.downKeyBindingDispatcher.set(12,function(e,i){return t.onPageDown(e,i)}), -this.downKeyBindingDispatcher.set(14,function(e,i){return t.onHome(e,i)}),this.downKeyBindingDispatcher.set(13,function(e,i){return t.onEnd(e,i)}),this.downKeyBindingDispatcher.set(10,function(e,i){return t.onSpace(e,i)}),this.downKeyBindingDispatcher.set(9,function(e,i){return t.onEscape(e,i)}),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,i,n){if(void 0===n&&(n="mouse"),0===this.options.clickBehavior&&(i.leftButton||i.middleButton)){if(i.target){if(i.target.tagName&&"input"===i.target.tagName.toLowerCase())return!1;if(o.findParentWithClass(i.target,"scrollbar","monaco-tree"))return!1;if(o.findParentWithClass(i.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,i,n)}return!1},e.prototype.onClick=function(e,t,n){return i.isMacintosh&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(), -!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&((0!==this.options.clickBehavior||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n))},e.prototype.onLeftClick=function(e,t,i,o){void 0===o&&(o="mouse");var r=i,s={origin:o,originalEvent:i,didClickOnTwistie:this.isClickOnTwistie(r)};if(e.getInput()===t)e.clearFocus(s),e.clearSelection(s);else{i&&r.browserEvent&&"mousedown"===r.browserEvent.type&&1===r.browserEvent.detail||i.preventDefault(),i.stopPropagation(),e.domFocus(),e.setSelection([t],s),e.setFocus(t,s),this.shouldToggleExpansion(t,r,o)&&(e.isExpanded(t)?e.collapse(t).then(void 0,n.onUnexpectedError):e.expand(t).then(void 0,n.onUnexpectedError))}return!0},e.prototype.shouldToggleExpansion=function(e,t,i){var n="mouse"===i&&2===t.detail;return this.openOnSingleClick||n||this.isClickOnTwistie(t)},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return 0===this.options.openMode},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){ -var t=e.target;if(!o.hasClass(t,"content"))return!1;var i=window.getComputedStyle(t,":before");if("none"===i.backgroundImage||"none"===i.display)return!1;var n=parseInt(i.width)+parseInt(i.paddingRight);return e.browserEvent.offsetX<=n},e.prototype.onContextMenu=function(e,t,i){return(!i.target||!i.target.tagName||"input"!==i.target.tagName.toLowerCase())&&(i&&(i.preventDefault(),i.stopPropagation()),!1)},e.prototype.onTap=function(e,t,i){var n=i.initialTarget;return(!n||!n.tagName||"input"!==n.tagName.toLowerCase())&&this.onLeftClick(e,t,i,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,i){var n=e.dispatch(i.toKeybinding());return!(!n||!n(t,i))&&(i.preventDefault(),i.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusPrevious(1,i), -e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusPreviousPage(i),e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusNext(1,i),e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusNextPage(i),e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusFirst(i),e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(i):(e.focusLast(i), -e.reveal(e.getFocus()).then(void 0,n.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var i={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(i);else{var o=e.getFocus();e.collapse(o).then(function(t){if(o&&!t)return e.focusParent(i),e.reveal(e.getFocus())}).then(void 0,n.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var i={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(i);else{var o=e.getFocus();e.expand(o).then(function(t){if(o&&!t)return e.focusFirstChild(i),e.reveal(e.getFocus())}).then(void 0,n.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var i={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.setSelection([n],i),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.toggleExpansion(i),!0},e.prototype.onEscape=function(e,t){var i={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(i), -!0):e.getSelection().length?(e.clearSelection(i),!0):!!e.getFocus()&&(e.clearFocus(i),!0)},e}();t.DefaultController=a;var l=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,i){},e.prototype.onDragOver=function(e,t,i,n){return null},e.prototype.drop=function(e,t,i,n){},e}();t.DefaultDragAndDrop=l;var u=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=u;var d=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=d;var c=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",i=[];e.listFocusBackground&&i.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"), -e.listFocusForeground&&i.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&i.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&i.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&i.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"), -e.listFocusAndSelectionForeground&&i.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&i.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&i.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&i.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&i.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"), -e.listDropBackground&&i.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"), -e.listFocusOutline&&i.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t") -;var n=i.join("\n");n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n)},e}();t.DefaultTreestyler=c}),define(t[517],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=i;var n=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=n;var o=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.types&&(this.types=[],Array.prototype.push.apply(this.types,e.types)),e.files&&(this.files=[],Array.prototype.push.apply(this.files,e.files),this.files=this.files.filter(function(e){return e.size||e.type}))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=o}), -define(t[513],i([0,1,157,10,2,4]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this._onDispose=new s.Emitter,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=void 0)},e}();t.LockData=a;var l=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var i=this,n=this.getLock(e);if(n)return new Promise(function(o,r){s.Event.once(n.onDispose)(function(){return i.run(e,t).then(o,r)})});var o;return new Promise(function(n,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=i.locks[e.id]=new a(e);return o=t().then(function(t){return delete i.locks[e.id],s.dispose(),t}).then(n,r)})},e.prototype.getLock=function(e){ -var t;for(t in this.locks){var i=this.locks[t];if(e.intersects(i.item))return i}return null},e}();t.Lock=l;var u=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new s.EventMultiplexer,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new s.EventMultiplexer,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new s.EventMultiplexer,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new s.EventMultiplexer,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new s.EventMultiplexer,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new s.EventMultiplexer,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new s.EventMultiplexer,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new s.EventMultiplexer,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new s.EventMultiplexer, -this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new s.EventMultiplexer,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new s.EventMultiplexer,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){i.ok(!this.isRegistered(e.id),"item already registered: "+e.id);var t=r.combinedDisposable([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){ -i.ok(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}();t.ItemRegistry=u;var d=function(){function e(e,t,i,n,o){this._onDidCreate=new s.Emitter,this._onDidReveal=new s.Emitter,this.onDidReveal=this._onDidReveal.event,this._onExpand=new s.Emitter,this.onExpand=this._onExpand.event,this._onDidExpand=new s.Emitter, -this.onDidExpand=this._onDidExpand.event,this._onCollapse=new s.Emitter,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new s.Emitter,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new s.Emitter,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new s.Emitter,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new s.Emitter,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new s.Emitter,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new s.Emitter,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new s.Emitter,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=i,this.lock=n,this.element=o,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={}, -this.depth=0,this.expanded=!(!this.context.dataSource.shouldAutoexpand||!this.context.dataSource.shouldAutoexpand(this.context.tree,o)),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;if(this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this))return Promise.resolve(!1);return this.lock.run(this,function(){if(e.isExpanded()||!e.doesHaveChildren)return Promise.resolve(!1);var t={item:e} -;return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):Promise.resolve(null)).then(function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0})}).then(function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then(function(){return!0}):t)})},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var i=Promise.resolve(null);return this.forEachChild(function(e){i=i.then(function(){return e.collapse(!0)})}),i.then(function(){return t.collapse(!1)})}return!this.isExpanded()||this.lock.isLocked(this)?Promise.resolve(!1):this.lock.run(this,function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),Promise.resolve(!0)})},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e], -this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,i,o){var r=this;if(void 0===i&&(i=!1),void 0===o&&(o=!1),!o&&!this.isExpanded()){var s=function(e){e.needsChildrenRefresh=!0,e.forEachChild(s)};return s(this),Promise.resolve(this)}this.needsChildrenRefresh=!1;var a=function(){var o={item:r,isNested:i};r._onRefreshChildren.fire(o);return(r.doesHaveChildren?r.context.dataSource.getChildren(r.context.tree,r.element):Promise.resolve([])).then(function(i){if(r.isDisposed()||r.registry.isDisposed())return Promise.resolve(null);if(!Array.isArray(i))return Promise.reject(new Error("Please return an array of children."));i=i?i.slice(0):[],i=r.sort(i);for(var n={};null!==r.firstChild;)n[r.firstChild.id]=r.firstChild,r.removeChild(r.firstChild) -;for(var o=0,s=i.length;o=0;o--)this.onInsertItem(u[o]);for(o=this.heightMap.length-1;o>=n;o--)this.onRefreshItem(this.heightMap[o]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,i=null,n=null,o=0,r=0;i=e.next();){if(o=this.indexes[i],!(t=this.heightMap[o]))return void console.error("view item doesnt exist");r-=t.height,delete this.indexes[i],this.onRemoveItem(t),null===n&&(n=o)}if(0!==r&&null!==n)for(this.heightMap.splice(n,o-n+1),o=n;o=i.top+i.height))return t;if(n===t)break;n=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=[],this.indexes={}},e}() -;t.HeightMap=n}),define(t[504],i([0,1,17,200]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function t(t,n,o,r,s){this.id=n;var a=function(t,n){if(i.globals.MonacoEnvironment){if("function"==typeof i.globals.MonacoEnvironment.getWorker)return i.globals.MonacoEnvironment.getWorker(t,n);if("function"==typeof i.globals.MonacoEnvironment.getWorkerUrl)return new Worker(i.globals.MonacoEnvironment.getWorkerUrl(t,n))}if("function"==typeof e){var o=e.toUrl("./"+t);if(/^(http:)|(https:)|(file:)/.test(o)){var r=String(window.location),s=r.substr(0,r.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,s.length)!==s){var a="/*"+n+"*/self.MonacoEnvironment={baseUrl: '"+o.substr(0,o.length-"vs/base/worker/workerMain.js".length)+"'};importScripts('"+o+"');/*"+n+"*/",l="data:text/javascript;charset=utf-8,"+encodeURIComponent(a);return new Worker(l)}}return new Worker(o+"#"+n)} -throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",o);!function(e){return"function"==typeof e.then}(a)?this.worker=Promise.resolve(a):this.worker=a,this.postMessage(t),this.worker.then(function(e){e.onmessage=function(e){r(e.data)},e.onmessageerror=s,"function"==typeof e.addEventListener&&e.addEventListener("error",s)})}return t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e){this.worker&&this.worker.then(function(t){return t.postMessage(e)})},t.prototype.dispose=function(){this.worker&&this.worker.then(function(e){return e.terminate()}),this.worker=null},t}(),r=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,i,r){var s=this,a=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new o(t,a,this._label||"anonymous"+a,i,function(e){n.logOnceWebWorkerWarning(e),s._webWorkerFailedBeforeError=e,r(e)}) -},e.LAST_WORKER_ID=0,e}();t.DefaultWorkerFactory=r}),define(t[501],i([9]),{}),define(t[498],i([9]),{}),define(t[496],i([9]),{}),define(t[492],i([0,1,7,44,28,4,31,496]),function(e,t,i,n,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={inputActiveOptionBorder:r.Color.fromHex("#007ACC")},u=function(e){function t(t){var i=e.call(this)||this;return i._onChange=i._register(new s.Emitter),i._onKeyDown=i._register(new s.Emitter),i._opts=a.deepClone(t),a.mixin(i._opts,l,!1),i._checked=i._opts.isChecked,i.domNode=document.createElement("div"),i.domNode.title=i._opts.title,i.domNode.className="monaco-custom-checkbox "+(i._opts.actionClassName||"")+" "+(i._checked?"checked":"unchecked"),i.domNode.tabIndex=0,i.domNode.setAttribute("role","checkbox"),i.domNode.setAttribute("aria-checked",String(i._checked)),i.domNode.setAttribute("aria-label",i._opts.title),i.applyStyles(),i.onclick(i.domNode,function(e){i.checked=!i._checked,i._onChange.fire(!1),e.preventDefault()}), -i.onkeydown(i.domNode,function(e){if(10===e.keyCode||3===e.keyCode)return i.checked=!i._checked,i._onChange.fire(!0),void e.preventDefault();i._onKeyDown.fire(e)}),i}return o(t,e),Object.defineProperty(t.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onKeyDown",{get:function(){return this._onKeyDown.event},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),this.applyStyles()},t.prototype.applyStyles=function(){ -this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){i.removeTabIndexAndUpdateFocus(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(n.Widget);t.Checkbox=u}),define(t[490],i([9]),{}),define(t[489],i([0,1,7,2,129,490]),function(e,t,i,n,r){"use strict";function s(e,t,i){var n=i.offset+i.size;return 0===i.position?t<=e-n?n:t<=i.offset?i.offset-t:Math.max(e-t,0):t<=i.offset?i.offset-t:t<=e-n?n:0}Object.defineProperty(t,"__esModule",{value:!0}),t.layout=s;var a=function(e){function t(t){var o=e.call(this)||this;return o.view=i.$(".context-view"),i.hide(o.view),o.setContainer(t),o._register(n.toDisposable(function(){return o.setContainer(null)})),o}return o(t,e),t.prototype.setContainer=function(e){var o=this -;if(this.container&&(n.dispose(this.toDisposeOnSetContainer),this.container.removeChild(this.view),this.container=null),e){this.container=e,this.container.appendChild(this.view);var r=[];t.BUBBLE_UP_EVENTS.forEach(function(e){r.push(i.addStandardDisposableListener(o.container,e,function(e){o.onDOMEvent(e,document.activeElement,!1)}))}),t.BUBBLE_DOWN_EVENTS.forEach(function(e){r.push(i.addStandardDisposableListener(o.container,e,function(e){o.onDOMEvent(e,document.activeElement,!0)},!0))}),this.toDisposeOnSetContainer=n.combinedDisposable(r)}},t.prototype.show=function(e){this.isVisible()&&this.hide(),i.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",i.show(this.view),this.toDisposeOnClean=e.render(this.view),this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()},t.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}, -t.prototype.doLayout=function(){if(this.isVisible()){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var o=t;e={top:o.y,left:o.x,width:o.width||1,height:o.height||2}}var a,l=i.getTotalWidth(this.view),u=i.getTotalHeight(this.view),d=this.delegate.anchorPosition||0,c=this.delegate.anchorAlignment||0,h={offset:e.top-window.pageYOffset,size:e.height,position:0===d?0:1};a=0===c?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};var p=s(window.innerHeight,u,h)+window.pageYOffset;r.Range.intersects({start:p,end:p+u},{start:h.offset,end:h.offset+h.size})&&(a.size=e.width);var f=s(window.innerWidth,l,a);i.removeClasses(this.view,"top","bottom","left","right"),i.addClass(this.view,0===d?"bottom":"top"),i.addClass(this.view,0===c?"left":"right");var g=i.getDomNodePagePosition(this.container);this.view.style.top=p-g.top+"px",this.view.style.left=f-g.left+"px",this.view.style.width="initial"}}, -t.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),i.hide(this.view)},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.container)&&this.hide())},t.prototype.dispose=function(){this.hide(),e.prototype.dispose.call(this)},t.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],t.BUBBLE_DOWN_EVENTS=["click"],t}(n.Disposable);t.ContextView=a}),define(t[485],i([9]),{}),define(t[482],i([0,1,7,5,28,31,485]),function(e,t,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={badgeBackground:o.Color.fromHex("#4D4D4D"),badgeForeground:o.Color.fromHex("#FFFFFF")},a=function(){function e(e,t){this.options=t||Object.create(null),r.mixin(this.options,s,!1), -this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=i.append(e,i.$(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=n.format(this.countFormat,this.count),this.element.title=n.format(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,i=this.badgeBorder?this.badgeBorder.toString():null -;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":null,this.element.style.borderStyle=i?"solid":null,this.element.style.borderColor=i}},e}();t.CountBadge=a}),define(t[473],i([9]),{}),define(t[472],i([9]),{}),define(t[469],i([9]),{}),define(t[155],i([0,1,7,178,2,469]),function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){ -this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),a=function(e){function t(t,o){var r=e.call(this)||this;return r.domNode=r._register(new s(i.append(t,i.$(".monaco-icon-label")))),r.labelDescriptionContainer=r._register(new s(i.append(r.domNode.element,i.$(".monaco-icon-label-description-container")))),o&&o.supportHighlights?r.labelNode=new n.HighlightedLabel(i.append(r.labelDescriptionContainer.element,i.$("a.label-name")),!o.donotSupportOcticons):r.labelNode=r._register(new s(i.append(r.labelDescriptionContainer.element,i.$("a.label-name")))),o&&o.supportDescriptionHighlights?r.descriptionNodeFactory=function(){ -return new n.HighlightedLabel(i.append(r.labelDescriptionContainer.element,i.$("span.label-description")),!o.donotSupportOcticons)}:r.descriptionNodeFactory=function(){return r._register(new s(i.append(r.labelDescriptionContainer.element,i.$("span.label-description"))))},r}return o(t,e),t.prototype.setLabel=function(e,t,i){var o=["monaco-icon-label"];i&&(i.extraClasses&&o.push.apply(o,i.extraClasses),i.italic&&o.push("italic")),this.domNode.className=o.join(" "),this.domNode.title=i&&i.title?i.title:"",this.labelNode instanceof n.HighlightedLabel?this.labelNode.set(e||"",i?i.matches:void 0,i&&i.title?i.title:void 0,i&&i.labelEscapeNewLines):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof n.HighlightedLabel?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0), -i&&i.descriptionTitle?this.descriptionNode.element.title=i.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=i&&i.descriptionTitle?i.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(r.Disposable);t.IconLabel=a}),define(t[468],i([9]),{}),define(t[463],i([9]),{}),define(t[462],i([9]),{}),define(t[461],i([9]),{}),define(t[460],i([9]),{}),define(t[459],i([0,1,2,28,31,7,15,460]),function(e,t,i,n,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={progressBarBackground:n.Color.fromHex("#0E70C0")},u=function(e){function t(t,i){var n=e.call(this)||this;return n.options=i||Object.create(null),r.mixin(n.options,l,!1),n.workedVal=0,n.progressBarBackground=n.options.progressBarBackground,n._register(n.showDelayedScheduler=new a.RunOnceScheduler(function(){return s.show(n.element)},0)),n.create(t),n}return o(t,e),t.prototype.create=function(e){this.element=document.createElement("div"), -s.addClass(this.element,"monaco-progress-container"),e.appendChild(this.element),this.bit=document.createElement("div"),s.addClass(this.bit,"progress-bit"),this.element.appendChild(this.bit),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",s.removeClasses(this.element,"active","infinite","discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return s.addClass(this.element,"done"),s.hasClass(this.element,"infinite")?(this.bit.style.opacity="0",e?setTimeout(function(){return t.off()},200):this.off()):(this.bit.style.width="inherit",e?setTimeout(function(){return t.off()},200):this.off()),this},t.prototype.hide=function(){s.hide(this.element),this.showDelayedScheduler.cancel()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){ -var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(i.Disposable);t.ProgressBar=u}),define(t[458],i([9]),{}),define(t[96],i([0,1,2,30,17,20,78,43,4,7,62,458]),function(e,t,i,n,r,s,a,l,u,d,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=!1,p=function(e){function t(t,i,o){void 0===o&&(o={});var s=e.call(this)||this;return s._state=3,s._onDidEnablementChange=s._register(new u.Emitter),s.onDidEnablementChange=s._onDidEnablementChange.event,s._onDidStart=s._register(new u.Emitter),s.onDidStart=s._onDidStart.event,s._onDidChange=s._register(new u.Emitter),s.onDidChange=s._onDidChange.event,s._onDidReset=s._register(new u.Emitter),s.onDidReset=s._onDidReset.event,s._onDidEnd=s._register(new u.Emitter),s.onDidEnd=s._onDidEnd.event,s.linkedSash=void 0,s.orthogonalStartSashDisposables=[],s.orthogonalEndSashDisposables=[],s.el=d.append(t,d.$(".monaco-sash")),r.isMacintosh&&d.addClass(s.el,"mac"), -s._register(c.domEvent(s.el,"mousedown")(s.onMouseDown,s)),s._register(c.domEvent(s.el,"dblclick")(s.onMouseDoubleClick,s)),a.Gesture.addTarget(s.el),s._register(c.domEvent(s.el,a.EventType.Start)(s.onTouchStart,s)),n.isIPad&&d.addClass(s.el,"touch"),s.setOrientation(o.orientation||0),s.hidden=!1,s.layoutProvider=i,s.orthogonalStartSash=o.orthogonalStartSash,s.orthogonalEndSash=o.orthogonalEndSash,d.toggleClass(s.el,"debug",h),s}return o(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(d.toggleClass(this.el,"disabled",0===e),d.toggleClass(this.el,"minimum",1===e),d.toggleClass(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables=i.dispose(this.orthogonalStartSashDisposables), -e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables=i.dispose(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),t.prototype.setOrientation=function(e){this.orientation=e,1===this.orientation?(d.addClass(this.el,"horizontal"),d.removeClass(this.el,"vertical")):(d.removeClass(this.el,"horizontal"),d.addClass(this.el,"vertical")),this.layoutProvider&&this.layout()},t.prototype.onMouseDown=function(e){ -var t=this;d.EventHelper.stop(e,!1);var n=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var o=void 0;0===this.orientation?e.offsetY<=4?o=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(o=this.orthogonalEndSash):e.offsetX<=4?o=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(o=this.orthogonalEndSash),o&&(n=!0,e.__orthogonalSashEvent=!0,o.onMouseDown(e))}if(this.state){for(var s=0,a=d.getElementsByTagName("iframe");s0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}();t.MouseWheelClassifier=m;var v=function(e){function t(t,i,o){var r=e.call(this)||this;r._onScroll=r._register(new d.Emitter),r.onScroll=r._onScroll.event,t.style.overflow="hidden",r._options=f(i),r._scrollable=o,r._register(r._scrollable.onScroll(function(e){r._onDidScroll(e),r._onScroll.fire(e)}));var l={onMouseWheel:function(e){return r._onMouseWheel(e)},onDragStart:function(){return r._onDragStart()},onDragEnd:function(){return r._onDragEnd()}};return r._verticalScrollbar=r._register(new a.VerticalScrollbar(r._scrollable,r._options,l)),r._horizontalScrollbar=r._register(new s.HorizontalScrollbar(r._scrollable,r._options,l)),r._domNode=document.createElement("div"),r._domNode.className="monaco-scrollable-element "+r._options.className, -r._domNode.setAttribute("role","presentation"),r._domNode.style.position="relative",r._domNode.style.overflow="hidden",r._domNode.appendChild(t),r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode),r._domNode.appendChild(r._verticalScrollbar.domNode.domNode),r._options.useShadows&&(r._leftShadowDomNode=n.createFastDomNode(document.createElement("div")),r._leftShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._leftShadowDomNode.domNode),r._topShadowDomNode=n.createFastDomNode(document.createElement("div")),r._topShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._topShadowDomNode.domNode),r._topLeftShadowDomNode=n.createFastDomNode(document.createElement("div")),r._topLeftShadowDomNode.setClassName("shadow top-left-corner"),r._domNode.appendChild(r._topLeftShadowDomNode.domNode)),r._listenOnDomNode=r._options.listenOnDomNode||r._domNode,r._mouseWheelToDispose=[],r._setListeningToMouseWheel(r._options.handleMouseWheel),r.onmouseover(r._listenOnDomNode,function(e){ -return r._onMouseOver(e)}),r.onnonbubblingmouseout(r._listenOnDomNode,function(e){return r._onMouseOut(e)}),r._hideTimeout=r._register(new u.TimeoutTimer),r._isDragging=!1,r._mouseIsOver=!1,r._shouldRender=!0,r._revealOnScroll=!0,r}return o(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=c.dispose(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,h.isMacintosh&&(this._options.className+=" mac"), -this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=f(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._options.fastScrollSensitivity=t.fastScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=c.dispose(this._mouseWheelToDispose),e)){var n=function(e){t._onMouseWheel(new r.StandardWheelEvent(e))};this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,"mousewheel",n))}},t.prototype._onMouseWheel=function(e){var t,i=m.INSTANCE;if(i.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(n=(t=[o,n])[0],o=t[1]) -;var r=!h.isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);var s=this._scrollable.getFutureScrollPosition(),a={};if(n){var l=s.scrollTop-50*n;this._verticalScrollbar.writeScrollPosition(a,l)}if(o){var u=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,u)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop){this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender, -this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(i?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(i?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0, -this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide()},500)},t}(l.Widget);t.AbstractScrollableElement=v;var _=function(e){function t(t,n){var o=this;(n=n||{}).mouseWheelSmoothScroll=!1;var r=new p.Scrollable(0,function(e){return i.scheduleAtNextAnimationFrame(e)});return(o=e.call(this,t,n,r)||this)._register(r),o}return o(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(v);t.ScrollableElement=_;var y=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return o(t,e),t}(v) -;t.SmoothScrollableElement=y;var b=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._element=t,n.onScroll(function(e){e.scrollTopChanged&&(n._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(n._element.scrollLeft=e.scrollLeft)}),n.scanDomNode(),n}return o(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(_);t.DomScrollableElement=b}),define(t[117],i([0,1,31,2,78,7,4,62,51,539,560,17,30,152,129,19,126,15]),function(e,t,i,n,o,r,s,l,u,d,c,h,p,f,g,m,v,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:function(e){return[e]},getDragURI:function(){return null},onDragStart:function(){},onDragOver:function(){return!1}, -drop:function(){}},horizontalScrolling:!1},b=function(){function e(e){this.elements=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=b;var C=function(){function e(e){this.elements=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=C;var S=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){var t;if(e.types&&(t=this.types).splice.apply(t,[0,this.types.length].concat(e.types)),e.files){this.files.splice(0,this.files.length);for(var i=0;i=this.items.length?(this.rangeMap=new d.RangeMap,this.rangeMap.splice(0,0,m),this.items=m,c=[]):(this.rangeMap.splice(e,t,m), -c=(o=this.items).splice.apply(o,[e,t].concat(m)));for(var v=i.length-t,_=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),y=d.shift(p,v),b=g.Range.intersect(_,y),u=b.start;u=-1&&ei&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}},e.prototype.teardownDragAndDropScrollTopAnimation=function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}, -e.prototype.getItemIndexFromEventTarget=function(e){for(var t=e;t instanceof HTMLElement&&t!==this.rowsContainer;){var i=t.getAttribute("data-index");if(i){var n=Number(i);if(!isNaN(n))return n}t=t.parentElement}},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype._rerender=function(e,t){var i,n,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(i=o.start,n=0):o.end-o.start>1&&(i=o.start+1,n=this.elementTop(i)-e);for(var r=0;;){for(var s=this.getRenderRange(e,t),a=!1,l=s.start;l=s;r--)this.insertItemInDOM(this.itemAtIndex(r)) -;for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,d=[],c=!1;if(!u){c=(d=new a.LcsDiff({getLength:function(){return o.length},getElementAtIndex:function(e){return o[e]}},{getLength:function(){return r.length},getElementAtIndex:function(e){return r[e].id}},null).ComputeDiff(!1)).some(function(e){if(e.modifiedLength>0)for(var i=e.modifiedStart,n=e.modifiedStart+e.modifiedLength;i0&&this.onRemoveItems(new p.ArrayIterator(o,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var m=r[g.modifiedStart-1]||i;m=m.getDepth()>0?m:null,this.onInsertItems(new p.ArrayIterator(r,g.modifiedStart,g.modifiedStart+g.modifiedLength),m?m.id:null)}}else(u||d.length)&&(this.onRemoveItems(new p.ArrayIterator(o)),this.onInsertItems(new p.ArrayIterator(r),i.getDepth()>0?i.id:null));(u||d.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])}, -t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter(function(e){return t.items.hasOwnProperty(e.id)})),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,i=this.items[t.id];if(i){i.expanded=!0;var n=this.onInsertItems(t.getNavigator(),t.id)||0,o=this.scrollTop;i.top+i.height<=this.scrollTop&&(o+=n),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,i=this.items[t.id];i&&(i.expanded=!1,this.onRemoveItems(new p.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,i=e.relativeTop,n=this.items[t.id];if(n)if(null!==i){i=(i=i<0?0:i)>1?1:i;var o=n.height-this.viewHeight;this.scrollTop=o*i+n.top}else{var r=n.top+n.height,s=this.scrollTop+this.viewHeight;n.top=s&&(this.scrollTop=r-this.viewHeight)}}, -t.prototype.onItemAddTrait=function(e){var t=e.item,i=e.trait,n=this.items[t.id];n&&n.addClass(i),"highlighted"===i&&(s.addClass(this.domNode,i),n&&(this.highlightedItemWasDraggable=!!n.draggable,n.draggable&&(n.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,i=e.trait,n=this.items[t.id];n&&n.removeClass(i),"highlighted"===i&&(s.removeClass(this.domNode,i),this.highlightedItemWasDraggable&&(n.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();s.toggleClass(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",u.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(i){t.onDragStart(e,i)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t, -this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new d.StandardMouseEvent(e),i=this.getItemAround(t.target);i&&(n.isIE&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,i.model.getElement(),t))}},t.prototype.onMouseMiddleClick=function(e){if(this.context.controller.onMouseMiddleClick){var t=new d.StandardMouseEvent(e),i=this.getItemAround(t.target);i&&this.context.controller.onMouseMiddleClick(this.context.tree,i.model.getElement(),t)}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){ -var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&i.isNative&&i.isMacintosh)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseDown(this.context.tree,n.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e);if(!(t.ctrlKey&&i.isNative&&i.isMacintosh)){var n=this.getItemAround(t.target);n&&this.context.controller.onMouseUp(this.context.tree,n.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,i;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var n=new c.StandardKeyboardEvent(e),o=void 0;if(i=this.model.getFocus()){ -var r=this.context.dataSource.getId(this.context.tree,i),a=this.items[r];o=s.getDomNodePagePosition(a.element)}else i=this.model.getInput(),o=s.getDomNodePagePosition(this.inputItem.element);t=new m.KeyboardContextMenuEvent(o.left+o.width,o.top,n)}else{var l=new d.StandardMouseEvent(e),u=this.getItemAround(l.target);if(!u)return;i=u.model.getElement(),t=new m.MouseContextMenuEvent(l)}this.context.controller.onContextMenu(this.context.tree,i,t)},t.prototype.onKeyDown=function(e){var t=new c.StandardKeyboardEvent(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||(this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),this.context.controller.onKeyDown(this.context.tree,t))},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new c.StandardKeyboardEvent(e))}, -t.prototype.onDragStart=function(e,t){if(!this.model.getHighlight()){var i,n=e.model.getElement(),o=this.model.getSelection();if(i=o.indexOf(n)>-1?o:[n],t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setData(_.DataTransfers.RESOURCES,JSON.stringify([e.uri])),t.dataTransfer.setDragImage){var r=void 0;r=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var s=document.createElement("div");s.className="monaco-tree-drag-image",s.textContent=r,document.body.appendChild(s),t.dataTransfer.setDragImage(s,-10,-10),setTimeout(function(){return document.body.removeChild(s)},0)}this.currentDragAndDropData=new h.ElementsDragAndDropData(i),_.StaticDND.CurrentDragAndDropData=new h.ExternalElementsDragAndDropData(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new d.DragMouseEvent(t))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=s.getTopLeftOffset(this.wrapper).top -;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(null!==e.dragAndDropMouseY){var i=e.dragAndDropMouseY-t,n=0,o=e.viewHeight-35;i<35?n=Math.max(-14,.2*(i-35)):i>o&&(n=Math.min(14,.2*(i-o))),e.scrollTop+=n}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var t=this;e.preventDefault();var i=new d.DragMouseEvent(e),n=this.getItemAround(i.target) -;if(!n||0===i.posx&&0===i.posy&&i.browserEvent.type===s.EventType.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData)if(_.StaticDND.CurrentDragAndDropData)this.currentDragAndDropData=_.StaticDND.CurrentDragAndDropData;else{if(!i.dataTransfer.types)return!1;this.currentDragAndDropData=new h.DesktopDragAndDropData}this.currentDragAndDropData.update(i.browserEvent.dataTransfer);var o,a,l=n.model;do{if(o=l?l.getElement():this.model.getInput(),!(a=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,o,i))||1!==a.bubble)break;l=l&&l.parent}while(l);if(!l)return this.currentDropElement=null,!1;var u=a&&a.accept -;u?(this.currentDropElement=l.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=0===a.effect?"copy":"move"):this.currentDropElement=null;var c=l.id===this.inputItem.id?this.inputItem:this.items[l.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==c||!function(e,t){return!e&&!t||!(!e||!t)&&e.accept===t.accept&&e.bubble===t.bubble&&e.effect===t.effect}(this.currentDropElementReaction,a))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.currentDropTarget=c,this.currentDropElementReaction=a,u)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),0===a.bubble)for(var p=l.getNavigator(),f=void 0;f=p.next();)(n=this.items[f.id])&&(n.dropTarget=!0,this.currentDropTargets.push(n));if(a.autoExpand){var g=b.timeout(500);this.currentDropDisposable=r.toDisposable(function(){ -return g.cancel()}),g.then(function(){return t.context.tree.expand(t.currentDropElement)}).then(function(){return t.shouldInvalidateDropReaction=!0})}}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new d.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t.browserEvent.dataTransfer),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[]),this.currentDropDisposable.dispose(),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,_.StaticDND.CurrentDragAndDropData=void 0,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||s.addClass(this.domNode,"focused"),this._onDOMFocus.fire()}, -t.prototype.onBlur=function(){this.context.options.alwaysFocused||s.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,i=this.itemAfter(e);i&&i.element&&(t=i.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop}, -t.prototype.getItemAround=function(e){var i=this.inputItem,n=e;do{if(n[t.BINDING]&&(i=n[t.BINDING]),n===this.wrapper||n===this.domNode)return i;if(n===this.scrollableElement.getDomNode()||n===document.body)return}while(n=n.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=r.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.viewListeners=r.dispose(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.items&&Object.keys(this.items).forEach(function(e){return t.items[e].removeFromDOM()}),this.context.cache&&this.context.cache.dispose(),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t}(g.HeightMap);t.TreeView=E}),define(t[447],i([9]),{}),define(t[446],i([0,1,2,4,20,7,139,19,96,28,62,447]),function(e,t,i,n,r,s,a,l,u,d,c){ -"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h,p={separatorBorder:d.Color.transparent};!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(h||(h={}));!function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}}}(t.Sizing||(t.Sizing={}));var f=function(e){function t(t,i){void 0===i&&(i={});var o=e.call(this)||this;return o.size=0,o.contentSize=0,o.proportions=void 0,o.viewItems=[],o.sashItems=[],o.state=h.Idle,o._onDidSashChange=o._register(new n.Emitter),o.onDidSashChange=o._onDidSashChange.event,o._onDidSashReset=o._register(new n.Emitter),o.orientation=r.isUndefined(i.orientation)?0:i.orientation,o.inverseAltBehavior=!!i.inverseAltBehavior,o.proportionalLayout=!!r.isUndefined(i.proportionalLayout)||!!i.proportionalLayout,o.el=document.createElement("div"),s.addClass(o.el,"monaco-split-view2"),s.addClass(o.el,0===o.orientation?"vertical":"horizontal"),t.appendChild(o.el),o.sashContainer=s.append(o.el,s.$(".sash-container")), -o.viewContainer=s.append(o.el,s.$(".split-view-container")),o.style(i.styles||p),o}return o(t,e),Object.defineProperty(t.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){for(var t=0,i=this.sashItems;t1){var v=0===this.orientation?1:0,_=0===this.orientation?{getHorizontalSashTop:function(e){return r.getSashPosition(e)}}:{getVerticalSashLeft:function(e){return r.getSashPosition(e)}},y=new u.Sash(this.sashContainer,_,{orientation:v, -orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),b=0===this.orientation?function(e){return{sash:y,start:e.startY,current:e.currentY,alt:e.altKey}}:function(e){return{sash:y,start:e.startX,current:e.currentX,alt:e.altKey}},C=n.Event.map(y.onDidStart,b)(this.onSashStart,this),S=n.Event.map(y.onDidChange,b)(this.onSashChange,this),w=n.Event.map(y.onDidEnd,function(){return l.firstIndex(r.sashItems,function(e){return e.sash===y})})(this.onSashEnd,this),E=y.onDidReset(function(){return r._onDidSashReset.fire(l.firstIndex(r.sashItems,function(e){return e.sash===y}))}),L=i.combinedDisposable([C,S,w,E,y]),x={sash:y,disposable:L};this.sashItems.splice(o-1,0,x)}a.appendChild(e.element);var D;"number"!=typeof t&&"split"===t.type&&(D=t.index),this.relayout(o,D),this.state=h.Idle,"number"!=typeof t&&"distribute"===t.type&&this.distributeViewSizes()},t.prototype.relayout=function(e,t){var i=this.viewItems.reduce(function(e,t){return e+t.size -},0),n="number"==typeof e?[e]:void 0,o="number"==typeof t?[t]:void 0;this.resize(this.viewItems.length-1,this.size-i,void 0,n,o),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()},t.prototype.layout=function(e){var t=this,i=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(var n=0;n0&&(this.proportions=this.viewItems.map(function(t){return t.size/e.contentSize}))},t.prototype.onSashStart=function(e){ -var t=this,n=e.sash,o=e.start,r=e.alt,s=l.firstIndex(this.sashItems,function(e){return e.sash===n}),a=i.combinedDisposable([c.domEvent(document.body,"keydown")(function(e){return u(t.sashDragState.current,e.altKey)}),c.domEvent(document.body,"keyup")(function(){return u(t.sashDragState.current,!1)})]),u=function(e,i){var n=t.viewItems.map(function(e){return e.size}),o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;if(t.inverseAltBehavior&&(i=!i),i){if(s===t.sashItems.length-1){o=((l=t.viewItems[s]).view.minimumSize-l.size)/2,r=(l.view.maximumSize-l.size)/2}else{var l=t.viewItems[s+1];o=(l.size-l.view.maximumSize)/2,r=(l.size-l.view.minimumSize)/2}}t.sashDragState={start:e,current:e,index:s,sizes:n,minDelta:o,maxDelta:r,alt:i,disposable:a}};u(o,r)},t.prototype.onSashChange=function(e){var t=e.current,i=this.sashDragState,n=i.index,o=i.start,r=i.sizes,s=i.alt,a=i.minDelta,l=i.maxDelta;this.sashDragState.current=t;var u=t-o,d=this.resize(n,u,r,void 0,void 0,a,l);if(s){ -var c=n===this.sashItems.length-1,h=this.viewItems.map(function(e){return e.size}),p=c?n:n+1,f=this.viewItems[p],g=f.size-f.view.maximumSize,m=f.size-f.view.minimumSize,v=c?n-1:n+1;this.resize(v,-d,h,void 0,void 0,g,m)}this.distributeEmptySpace(),this.layoutViews()},t.prototype.onSashEnd=function(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions()},t.prototype.onViewChange=function(e,t){var i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=a.clamp(t,e.view.minimumSize,e.view.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout(i,void 0)))},t.prototype.resizeView=function(e,t){var i=this;if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,!(e<0||e>=this.viewItems.length)){var n=this.viewItems[e];t=Math.round(t);var o=(t=a.clamp(t,n.view.minimumSize,n.view.maximumSize))-n.size -;if(0!==o&&e0){var c=l.range(e-1,-1),p=c.reduce(function(e,t){return e+(i.viewItems[t].size-i.viewItems[t].view.minimumSize)},0),f=c.reduce(function(e,t){return e+(i.viewItems[t].view.maximumSize-i.viewItems[t].size)},0),g=a.clamp(-o,-p,f);this.resize(e-1,g)}this.distributeEmptySpace(),this.layoutViews(),this.saveProportions(),this.state=h.Idle}},t.prototype.distributeViewSizes=function(){for(var e=Math.floor(this.size/this.viewItems.length),t=0;t=this.viewItems.length?-1:this.viewItems[e].size},t.prototype.resize=function(e,t,i,n,o,r,s){var u=this;if(void 0===i&&(i=this.viewItems.map(function(e){return e.size -})),void 0===r&&(r=Number.NEGATIVE_INFINITY),void 0===s&&(s=Number.POSITIVE_INFINITY),e<0||e>=this.viewItems.length)return 0;var d=l.range(e,-1),c=l.range(e+1,this.viewItems.length);if(o)for(var h=0,p=o;h=0;i--){var n=this.viewItems[i],o=a.clamp(n.size+t,n.view.minimumSize,n.view.maximumSize);t-=o-n.size,n.size=o}},t.prototype.layoutViews=function(){this.contentSize=this.viewItems.reduce(function(e,t){return e+t.size},0),this.viewItems.forEach(function(e){return e.layout()}),this.sashItems.forEach(function(e){return e.sash.layout()});var e=!1,t=this.viewItems.map(function(t){return e=t.size-t.view.minimumSize>0||e});e=!1;var i=this.viewItems.map(function(t){return e=t.view.maximumSize-t.size>0||e}),n=this.viewItems.slice().reverse();e=!1;var o=n.map(function(t){return e=t.size-t.view.minimumSize>0||e}).reverse();e=!1;var r=n.map(function(t){ -return e=t.view.maximumSize-t.size>0||e}).reverse();this.sashItems.forEach(function(e,n){var s=!(t[n]&&r[n+1]),a=!(i[n]&&o[n+1]);e.sash.state=s&&a?0:s&&!a?1:!s&&a?2:3})},t.prototype.getSashPosition=function(e){for(var t=0,i=0;i0){i=o[0].getStartPosition();var r=t.getTopForPosition(i.lineNumber,i.column);n=t.getScrollTop()-r}}return new e(i,n)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}();t.StableEditorScrollState=u}), -define(t[113],i([0,1,7,72,43,2]),function(e,t,i,n,r,s){"use strict";function a(e){var t=i.getDomNodePagePosition(e);return new d(t.left,t.top,t.width,t.height)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new u(this.x-i.StandardWindow.scrollX,this.y-i.StandardWindow.scrollY)},e}();t.PageCoordinates=l;var u=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new l(this.clientX+i.StandardWindow.scrollX,this.clientY+i.StandardWindow.scrollY)},e}();t.ClientCoordinates=u;var d=function(){return function(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}();t.EditorPagePosition=d,t.createEditorPagePosition=a;var c=function(e){function t(t,i){var n=e.call(this,t)||this;return n.pos=new l(n.posx,n.posy),n.editorPos=a(i),n}return o(t,e),t}(r.StandardMouseEvent);t.EditorMouseEvent=c;var h=function(){function e(e){this._editorViewDomNode=e} -return e.prototype._create=function(e){return new c(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var n=this;return i.addDisposableListener(e,"contextmenu",function(e){t(n._create(e))})},e.prototype.onMouseUp=function(e,t){var n=this;return i.addDisposableListener(e,"mouseup",function(e){t(n._create(e))})},e.prototype.onMouseDown=function(e,t){var n=this;return i.addDisposableListener(e,"mousedown",function(e){t(n._create(e))})},e.prototype.onMouseLeave=function(e,t){var n=this;return i.addDisposableNonBubblingMouseOutListener(e,function(e){t(n._create(e))})},e.prototype.onMouseMoveThrottled=function(e,t,n,o){var r=this;return i.addDisposableThrottledListener(e,"mousemove",t,function(e,t){return n(e,r._create(t))},o)},e}();t.EditorMouseEventFactory=h;var p=function(e){function t(t){var i=e.call(this)||this;return i._editorViewDomNode=t,i._globalMouseMoveMonitor=i._register(new n.GlobalMouseMoveMonitor),i._keydownListener=null,i}return o(t,e),t.prototype.startMonitoring=function(e,t,n){ -var o=this;this._keydownListener=i.addStandardDisposableListener(document,"keydown",function(e){e.toKeybinding().isModifierKey()||o._globalMouseMoveMonitor.stopMonitoring(!0)},!0);this._globalMouseMoveMonitor.startMonitoring(function(t,i){return e(t,new c(i,o._editorViewDomNode))},t,function(){o._keydownListener.dispose(),n()})},t}(s.Disposable);t.GlobalEditorMouseMoveMonitor=p}),define(t[308],i([0,1,4,2]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){var t=e.call(this)||this;return t._onCodeEditorAdd=t._register(new i.Emitter),t.onCodeEditorAdd=t._onCodeEditorAdd.event,t._onCodeEditorRemove=t._register(new i.Emitter),t._onDiffEditorAdd=t._register(new i.Emitter),t._onDiffEditorRemove=t._register(new i.Emitter),t._codeEditors=Object.create(null),t._diffEditors=Object.create(null),t}return o(t,e),t.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},t.prototype.removeCodeEditor=function(e){ -delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},t.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map(function(t){return e._codeEditors[t]})},t.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},t.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},t.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map(function(t){return e._diffEditors[t]})},t.prototype.getFocusedCodeEditor=function(){for(var e=null,t=0,i=this.listCodeEditors();ti||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i, -this.endColumn=n)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,i){var n,o,r,s -;return i.startLineNumbert.endLineNumber?(r=i.endLineNumber,s=i.endColumn):i.endLineNumber===t.endLineNumber?(r=i.endLineNumber,s=Math.max(i.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(n,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,i){var n=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=i.startLineNumber,l=i.startColumn,u=i.endLineNumber,d=i.endColumn;return nu?(r=u,s=d):r===u&&(s=Math.min(s,d)),n>r?null:n===r&&o>s?null:new e(n,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){ -return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new i.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new i.Position(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,i){return new e(this.startLineNumber,this.startColumn,t,i)},e.prototype.setStartPosition=function(t,i){return new e(t,i,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,i){return void 0===i&&(i=t),new e(t.lineNumber,t.column,i.lineNumber,i.column)},e.lift=function(t){ -return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}();t.Range=n}),define(t[165],i([0,1,5,12,3]),function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null) -},e.prototype.writeToTextArea=function(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){var t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var i=this.value.substring(this.selectionStart,e);if(-1===i.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,i,1);var n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,i){for(var n=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,o){if(!e)return{text:"", -replaceCharCnt:0};var r=e.value,s=e.selectionStart,a=e.selectionEnd,l=t.value,u=t.selectionStart,d=t.selectionEnd;o&&r.length>0&&s===a&&u===d&&!i.startsWith(l,r)&&i.endsWith(l,r)&&(s=0,a=0);var c=r.substring(a),h=l.substring(d),p=i.commonSuffixLength(c,h);l=l.substring(0,l.length-p);var f=(r=r.substring(0,r.length-p)).substring(0,s),g=l.substring(0,u),m=i.commonPrefixLength(f,g);if(l=l.substring(m),r=r.substring(m),u-=m,s-=m,d-=m,a-=m,n&&u===d&&r.length>0){var v=null;if(u===l.length?i.startsWith(l,r)&&(v=l.substring(r.length)):i.endsWith(l,r)&&(v=l.substring(0,l.length-r.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||i.containsEmoji(v)))return{text:v,replaceCharCnt:0}}if(u===d){if(r===l&&0===s&&a===r.length&&u===l.length&&-1===l.indexOf("\n")&&i.containsFullWidthCharacter(l))return{text:"",replaceCharCnt:0};return{text:l,replaceCharCnt:f.length-m}}return{text:l,replaceCharCnt:a-s}},e.EMPTY=new e("",0,0,null,null),e}();t.TextAreaState=r;var s=function(){function e(){}return e._getPageOfLine=function(t){ -return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var i=t*e._LINES_PER_PAGE,n=i+1,r=i+e._LINES_PER_PAGE;return new o.Range(n,1,r+1,1)},e.fromEditorSelection=function(t,i,s,a){var l,u=e._getPageOfLine(s.startLineNumber),d=e._getRangeForPage(u),c=e._getPageOfLine(s.endLineNumber),h=e._getRangeForPage(c),p=d.intersectRanges(new o.Range(1,1,s.startLineNumber,s.startColumn)),f=i.getValueInRange(p,1),g=i.getLineCount(),m=i.getLineMaxColumn(g),v=h.intersectRanges(new o.Range(s.endLineNumber,s.endColumn,g,m)),_=i.getValueInRange(v,1);if(u===c||u+1===c)l=i.getValueInRange(s,1);else{var y=d.intersectRanges(s),b=h.intersectRanges(s);l=i.getValueInRange(y,1)+String.fromCharCode(8230)+i.getValueInRange(b,1)}if(a){f.length>500&&(f=f.substring(f.length-500,f.length)),_.length>500&&(_=_.substring(0,500)),l.length>1e3&&(l=l.substring(0,500)+String.fromCharCode(8230)+l.substring(l.length-500,l.length))} -return new r(f+l+_,f.length,f.length+l.length,new n.Position(s.startLineNumber,s.startColumn),new n.Position(s.endLineNumber,s.endColumn))},e._LINES_PER_PAGE=10,e}();t.PagedScreenReaderStrategy=s}),define(t[166],i([0,1,157,4,2,31,3]),function(e,t,i,n,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},l=function(){function e(e,t){var i=this;void 0===t&&(t={}),this._onDidUpdate=new n.Emitter,this._editor=e,this._options=r.mixin(t,a,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._disposables.push(this._editor.onDidDispose(function(){return i.dispose()})),this._disposables.push(this._editor.onDidUpdateDiff(function(){return i._onDiffUpdated()})),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function(e){i.ignoreSelectionChange||(i.nextIdx=-1)})), -this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function(e){i.revealFirst=!0})),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach(function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){t.ranges.push({rhs:!0,range:new s.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):t.ranges.push({rhs:!0,range:new s.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}), -this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){var t=!1,i=this._editor.getPosition();if(i){for(var n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var o=n.range.getStartPosition();this._editor.setPosition(o),this._editor.revealPositionInCenter(o,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)}, -e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){o.dispose(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=[],this.disposed=!0},e}();t.DiffNavigator=l}),define(t[55],i([0,1,3]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.insert=function(e,t){return{range:new i.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=n}),define(t[307],i([0,1,5,55,3]),function(e,t,i,n,o){"use strict";function r(e,t){t.sort(function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber});for(var r=t.length-2;r>=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);for(var s=[],a=0,l=0,u=t.length,d=1,c=e.getLineCount();d<=c;d++){ -var h=e.getLineContent(d),p=h.length+1,f=0;if(!(l255?255:0|e},e.Empty=new e(0,0,0,0),e}();t.RGBA8=i}),define(t[22],i([0,1,12,3]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,i,n,o){var r=e.call(this,t,i,n,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=i,r.positionLineNumber=n,r.positionColumn=o,r}return o(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){ -return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,i){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,i):new t(e,i,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new i.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,i){return 0===this.getDirection()?new t(e,i,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,i)},t.fromPositions=function(e,i){return void 0===i&&(i=e),new t(e.lineNumber,e.column,i.lineNumber,i.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var i=0,n=e.length;i=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var i=0;i=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){ -if(0===this.getCount())return null;var i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;for(var r=0,s=0,a=i;a<=n;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=i&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}for(var r=[],s=0;si))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(i,s.toLineNumber),u=a;u<=l;u++){var d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),n=!0}}return n},e}();t.RenderedLinesCollection=o;var r=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new o(function(){return t._host.createVisibleLine()})}return e.prototype._createDomNode=function(){var e=i.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"), -e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var i=0,n=t.length;it){(s=t)<=(a=Math.min(i,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,s,a,n,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,l),o.linesLength-=l)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){var s=Math.max(0,i-o.rendLineNumberStart+1),a=o.linesLength-1,l=a-s+1;l>0&&(this._removeLinesAfter(o,l),o.linesLength-=l)}return this._finishRendering(o,!1,n),o},e.prototype._renderUntouchedLines=function(e,t,i,n,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=i;a++){var l=r+a;s[a].layoutLine(l,n[l-o])}},e.prototype._insertLinesBefore=function(e,t,i,n,o){ -for(var r=[],s=0,a=t;a<=i;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var i=0;i=0;s--){var a=e.lines[s];n[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,i){var n=document.createElement("div");n.innerHTML=t;for(var o=0;o4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,i){for(var n=new Uint8Array(e*t),o=0,r=e*t;o255?255:0|e},t.toUint32=i,t.toUint32Array=function(e){for(var t=e.length,n=new Uint32Array(t),o=0;o=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=n;var o=function(){function e(){this._actual=new n(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=o}),define(t[83],i([0,1,76]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){for(var i=e.call(this,0)||this,n=0,o=t.length;n1&&v>1;){if((S=f.charCodeAt(m-2))!==(w=g.charCodeAt(v-2)))break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,m,l+1,1,v);for(var _=a._getLastNonBlankColumn(f,1),y=a._getLastNonBlankColumn(g,1),b=f.length+1,C=g.length+1;_=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){ -for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return i.onUnexpectedError(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){ -return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return i.onUnexpectedError(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}();t.EditStack=s}),define(t[288],i([0,1]),function(e,t){"use strict";function i(e,t,i,n,o){o.spacesDiff=0,o.looksLikeAlignment=!1;var r;for(r=0;r0&&a>0||d>0&&c>0)){var p=Math.abs(a-c),f=Math.abs(s-d);if(0===p)return o.spacesDiff=f,void(f>0&&0<=d-1&&d-10?s++:_>1&&a++,i(l,u,f,v,c),!c.looksLikeAlignment)){var w=c.spacesDiff;w<=8&&d[w]++,l=f,u=v}}var E=o;s!==a&&(E=sx&&(x=t,L=e)}),4===L&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(L=2),{insertSpaces:E,tabSize:L}}}),define(t[284],i([0,1]),function(e,t){"use strict";function i(e){return(1&e.metadata)>>>0}function n(e,t){e.metadata=254&e.metadata|t<<0}function o(e){return(2&e.metadata)>>>1==1}function r(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function s(e){return(4&e.metadata)>>>2==1}function a(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function l(e,t){ -e.metadata=247&e.metadata|(t?1:0)<<3}function u(e,t){e.metadata=207&e.metadata|t<<4}function d(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function c(e,t,i,n){return ei)&&(1!==n&&(2===n||t))}function h(e,t,i,n,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=i-t,u=n,d=Math.min(l,u),h=e.start,p=!1,f=e.end,g=!1;t<=h&&f<=i&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,p=!0,e.end=t,g=!0);m=o?1:l>0?2:0;if(!p&&c(h,s,t,m)&&(p=!0),!g&&c(f,a,t,m)&&(g=!0),d>0&&!o){m=l>u?2:0;!p&&c(h,s,t+d,m)&&(p=!0),!g&&c(f,a,t+d,m)&&(g=!0)}var m=o?1:0;!p&&c(h,s,i,m)&&(e.start=t+u,p=!0),!g&&c(f,a,i,m)&&(e.end=t+u,g=!0);var v=u-l;p||(e.start=Math.max(0,h+v)),g||(e.end=Math.max(0,f+v)),e.start>e.end&&(e.end=e.start)}function p(e,o){if(e.root===t.SENTINEL)return o.parent=t.SENTINEL,o.left=t.SENTINEL,o.right=t.SENTINEL,n(o,0),e.root=o,e.root;!function(e,i){var o=0,r=e.root,s=i.start,a=i.end;for(;;){if(C(s,a,r.start+o,r.end+o)<0){if(r.left===t.SENTINEL){i.start-=o,i.end-=o,i.maxEnd-=o, -r.left=i;break}r=r.left}else{if(r.right===t.SENTINEL){i.start-=o+r.delta,i.end-=o+r.delta,i.maxEnd-=o+r.delta,r.right=i;break}o+=r.delta,r=r.right}}i.parent=r,i.left=t.SENTINEL,i.right=t.SENTINEL,n(i,1)}(e,o),b(o.parent);for(var r=o;r!==e.root&&1===i(r.parent);)if(r.parent===r.parent.parent.left){1===i(s=r.parent.parent.right)?(n(r.parent,0),n(s,0),n(r.parent.parent,1),r=r.parent.parent):(r===r.parent.right&&m(e,r=r.parent),n(r.parent,0),n(r.parent.parent,1),v(e,r.parent.parent))}else{var s=r.parent.parent.left;1===i(s)?(n(r.parent,0),n(s,0),n(r.parent.parent,1),r=r.parent.parent):(r===r.parent.left&&v(e,r=r.parent),n(r.parent,0),n(r.parent.parent,1),m(e,r.parent.parent))}return n(e.root,0),o}function f(e,o){var r,s;if(o.left===t.SENTINEL?(s=o,(r=o.right).delta+=o.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=o.delta,r.end+=o.delta):o.right===t.SENTINEL?(r=o.left,s=o):((r=(s=function(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}(o.right)).right).start+=s.delta, -r.end+=s.delta,r.delta+=s.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),s.start+=o.delta,s.end+=o.delta,s.delta=o.delta,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0)),s===e.root)return e.root=r,n(r,0),o.detach(),g(),y(r),void(e.root.parent=t.SENTINEL);var a=1===i(s);if(s===s.parent.left?s.parent.left=r:s.parent.right=r,s===o?r.parent=s.parent:(s.parent===o?r.parent=s:r.parent=s.parent,s.left=o.left,s.right=o.right,s.parent=o.parent,n(s,i(o)),o===e.root?e.root=s:o===o.parent.left?o.parent.left=s:o.parent.right=s,s.left!==t.SENTINEL&&(s.left.parent=s),s.right!==t.SENTINEL&&(s.right.parent=s)),o.detach(),a)return b(r.parent),s!==o&&(b(s),b(s.parent)),void g();b(r),b(r.parent),s!==o&&(b(s),b(s.parent));for(var l;r!==e.root&&0===i(r);)r===r.parent.left?(1===i(l=r.parent.right)&&(n(l,0),n(r.parent,1),m(e,r.parent),l=r.parent.right),0===i(l.left)&&0===i(l.right)?(n(l,1),r=r.parent):(0===i(l.right)&&(n(l.left,0),n(l,1),v(e,l),l=r.parent.right), -n(l,i(r.parent)),n(r.parent,0),n(l.right,0),m(e,r.parent),r=e.root)):(1===i(l=r.parent.left)&&(n(l,0),n(r.parent,1),v(e,r.parent),l=r.parent.left),0===i(l.left)&&0===i(l.right)?(n(l,1),r=r.parent):(0===i(l.left)&&(n(l.right,0),n(l,1),m(e,l),l=r.parent.left),n(l,i(r.parent)),n(r.parent,0),n(l.left,0),v(e,r.parent),r=e.root));n(r,0),g()}function g(){t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.delta=0,t.SENTINEL.start=0,t.SENTINEL.end=0}function m(e,i){var n=i.right;n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=i.delta,n.end+=i.delta,i.right=n.left,n.left!==t.SENTINEL&&(n.left.parent=i),n.parent=i.parent,i.parent===t.SENTINEL?e.root=n:i===i.parent.left?i.parent.left=n:i.parent.right=n,n.left=i,i.parent=n,y(i),y(n)}function v(e,i){var n=i.left;i.delta-=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start-=n.delta,i.end-=n.delta,i.left=n.right,n.right!==t.SENTINEL&&(n.right.parent=i),n.parent=i.parent, -i.parent===t.SENTINEL?e.root=n:i===i.parent.right?i.parent.right=n:i.parent.left=n,n.right=i,i.parent=n,y(i),y(n)}function _(e){var i=e.end;if(e.left!==t.SENTINEL){var n=e.left.maxEnd;n>i&&(i=n)}if(e.right!==t.SENTINEL){var o=e.right.maxEnd+e.delta;o>i&&(i=o)}return i}function y(e){e.maxEnd=_(e)}function b(e){for(;e!==t.SENTINEL;){var i=_(e);if(e.maxEnd===i)return;e.maxEnd=i,e=e.parent}}function C(e,t,i,n){return e===i?t-n:e-i}Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeColor=i,t.getNodeIsInOverviewRuler=function(e){return(8&e.metadata)>>>3==1};var S=function(){function e(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,n(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,a(this,!1),u(this,1),l(this,!1),d(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,r(this,!1)}return e.prototype.reset=function(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e, -this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;a(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),u(this,this.options.stickiness),l(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),d(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();t.IntervalNode=S,t.SENTINEL=new S(null,0,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,n(t.SENTINEL,0);var w=function(){function e(){this.root=t.SENTINEL,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,i,n,a,l){return this.root===t.SENTINEL?[]:function(e,i,n,a,l,u){ -for(var d=e.root,c=0,h=0,p=0,f=[],g=0;d!==t.SENTINEL;)if(o(d))r(d.left,!1),r(d.right,!1),d===d.parent.right&&(c-=d.parent.delta),d=d.parent;else{if(!o(d.left)){if(c+d.maxEndn)r(d,!0);else{if((p=c+d.end)>=i){d.setCachedOffsets(h,p,u);var m=!0;a&&d.ownerId&&d.ownerId!==a&&(m=!1),l&&s(d)&&(m=!1),m&&(f[g++]=d)}r(d,!0),d.right===t.SENTINEL||o(d.right)||(c+=d.delta,d=d.right)}}return r(e.root,!1),f}(this,e,i,n,a,l)},e.prototype.search=function(e,i,n){return this.root===t.SENTINEL?[]:function(e,i,n,a){for(var l=e.root,u=0,d=0,c=0,h=[],p=0;l!==t.SENTINEL;)if(o(l))r(l.left,!1),r(l.right,!1),l===l.parent.right&&(u-=l.parent.delta),l=l.parent;else if(l.left===t.SENTINEL||o(l.left)){d=u+l.start,c=u+l.end,l.setCachedOffsets(d,c,a);var f=!0;i&&l.ownerId&&l.ownerId!==i&&(f=!1),n&&s(l)&&(f=!1),f&&(h[p++]=l),r(l,!0),l.right===t.SENTINEL||o(l.right)||(u+=l.delta,l=l.right)}else l=l.left;return r(e.root,!1),h}(this,e,i,n)}, -e.prototype.collectNodesFromOwner=function(e){return function(e,i){for(var n=e.root,s=[],a=0;n!==t.SENTINEL;)o(n)?(r(n.left,!1),r(n.right,!1),n=n.parent):n.left===t.SENTINEL||o(n.left)?(n.ownerId===i&&(s[a++]=n),r(n,!0),n.right===t.SENTINEL||o(n.right)||(n=n.right)):n=n.left;return r(e.root,!1),s}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){for(var i=e.root,n=[],s=0;i!==t.SENTINEL;)o(i)?(r(i.left,!1),r(i.right,!1),i=i.parent):i.left===t.SENTINEL||o(i.left)?i.right===t.SENTINEL||o(i.right)?(n[s++]=i,r(i,!0)):i=i.right:i=i.left;return r(e.root,!1),n}(this)},e.prototype.insert=function(e){p(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){f(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var i=e,n=0;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;var o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,i,n,s){for(var a=function(e,i,n){ -for(var s=e.root,a=0,l=0,u=0,d=[],c=0;s!==t.SENTINEL;)if(o(s))r(s.left,!1),r(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!o(s.left)){if(a+s.maxEndn?r(s,!0):((u=a+s.end)>=i&&(s.setCachedOffsets(l,u,0),d[c++]=s),r(s,!0),s.right===t.SENTINEL||o(s.right)||(a+=s.delta,s=s.right))}return r(e.root,!1),d}(this,e,e+i),l=0,u=a.length;ln?(a.start+=u,a.end+=u,a.delta+=u,(a.delta<-1073741824||a.delta>1073741824)&&(e.requestNormalizeDelta=!0),r(a,!0)):(r(a,!0),a.right===t.SENTINEL||o(a.right)||(l+=a.delta,a=a.right))}r(e.root,!1)}(this,e,e+i,n),this._normalizeDeltaIfNecessary() -;for(var l=0,u=a.length;l=i)break;var n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function l(e,t,i){if(!i)return new s.FindMatch(e,null) -;for(var n=[],o=0,r=t.length;o0){var s=t.charCodeAt(n);if(0!==e.get(s))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;var r=t.charCodeAt(n+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(n+o-1);if(0!==e.get(s))return!0}return!1}(e,t,i,n,o)}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}return e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var e;e=this.isRegex?a(this.searchString):this.searchString.indexOf("\n")>=0;var t=null;try{t=i.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0})}catch(e){return null}if(!t)return null;var o=!this.isRegex&&!e -;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new c(t,this.wordSeparators?n.getMapForWordSeparators(this.wordSeparators):null,o?this.searchString:null)},e}();t.SearchParams=d,t.isMultilineRegexSource=a;var c=function(){return function(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}();t.SearchData=c,t.createFindMatch=l;var h=function(){function e(e){for(var t=[],i=0,n=0,o=e.length;n>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1},e}(),p=function(){function e(){}return e.findMatches=function(e,t,i,n,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new f(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}, -e._getMultilineMatchRange=function(e,t,i,n,o,s){var a,l=0;a=n?t+o+(l=n.findLineFeedCountBeforeOffset(o)):t+o;var u;if(n){var d=n.findLineFeedCountBeforeOffset(o+s.length)-l;u=a+s.length+d}else u=a+s.length;var c=e.getPositionAt(a),h=e.getPositionAt(u);return new r.Range(c.lineNumber,c.column,h.lineNumber,h.column)},e._doFindMatchesMultiline=function(e,t,i,n,o){var r,s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),u="\r\n"===e.getEOL()?new h(a):null,d=[],c=0;for(i.reset(0);r=i.next(a);)if(d[c++]=l(this._getMultilineMatchRange(e,s,a,u,r.index,r[0]),r,n),c>=o)return d;return d},e._doFindMatchesLineByLine=function(e,t,i,n,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}var l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,s,r,n,o) -;for(var u=t.startLineNumber+1;u=c))return o;return o}var _,y=new f(e.wordSeparators,e.regex);y.reset(0);do{if((_=y.next(t))&&(a[o++]=l(new r.Range(i,_.index+1+n,i,_.index+1+_[0].length+n),_,d),o>=c))return o}while(_);return o},e.findNextMatch=function(e,t,i,n){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)},e._doFindNextMatchMultiline=function(e,t,i,n){ -var s=new o.Position(t.lineNumber,1),a=e.getOffsetAt(s),u=e.getLineCount(),d=e.getValueInRange(new r.Range(s.lineNumber,s.column,u,e.getLineMaxColumn(u)),1),c="\r\n"===e.getEOL()?new h(d):null;i.reset(t.column-1);var p=i.next(d);return p?l(this._getMultilineMatchRange(e,a,d,c,p.index,p[0]),p,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.Position(1,1),i,n):null},e._doFindNextMatchLineByLine=function(e,t,i,n){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(var l=1;l<=o;l++){var u=(r+l-1)%o,d=e.getLineContent(u+1),c=this._findFirstMatchInLine(i,d,u+1,1,n);if(c)return c}return null},e._findFirstMatchInLine=function(e,t,i,n,o){e.reset(n-1);var s=e.next(t);return s?l(new r.Range(i,s.index+1,i,s.index+1+s[0].length),s,o):null},e.findPreviousMatch=function(e,t,i,n){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex) -;return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)},e._doFindPreviousMatchMultiline=function(e,t,i,n){var s=this._doFindMatchesMultiline(e,new r.Range(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.Position(a,e.getLineMaxColumn(a)),i,n):null},e._doFindPreviousMatchLineByLine=function(e,t,i,n){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(var l=1;l<=o;l++){var u=(o+r-l-1)%o,d=e.getLineContent(u+1),c=this._findLastMatchInLine(i,d,u+1,n);if(c)return c}return null},e._findLastMatchInLine=function(e,t,i,n){var o,s=null;for(e.reset(0);o=e.next(t);)s=l(new r.Range(i,o.index+1,i,o.index+1+o[0].length),o,n);return s},e}();t.TextModelSearch=p,t.isValidMatch=u;var f=function(){function e(e,t){this._wordSeparators=e, -this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i)return null;if(!(t=this._searchRegex.exec(e)))return null;var n=t.index,o=t[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||u(this._wordSeparators,e,i,n,o))return t}while(t);return null},e}();t.Searcher=f}),define(t[191],i([0,1,12,3,45,280,137]),function(e,t,i,n,o,r,s){"use strict";function a(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}function l(e,t){void 0===t&&(t=!0);for(var i=[0],n=1,o=0,r=e.length;o126)&&(s=!1)}var h=new u(a(e),n,o,r,s);return e.length=0,h};var d=function(){return function(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}();t.Piece=d;var c=function(){return function(e,t){this.buffer=e,this.lineStarts=t}}();t.StringBuffer=c;var h=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i} -return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,i=this._cache,n=0;n=e)&&(i[n]=null,t=!0)}if(t){for(var r=[],s=0,a=i;s0){e[o].lineStarts||(e[o].lineStarts=l(e[o].buffer));var a=new d(o+1,{line:0,column:0},{ -line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),n=this.rbInsertRight(n,a)}this._searchCache=new h(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var i=this,n=t.AverageBufferSize,o=n-Math.floor(n/3),r=2*o,s="",a=0,u=[];if(this.iterate(this.root,function(t){var n=i.getNodeContent(t),d=n.length;if(a<=o||a+d0){var d=s.replace(/\r\n|\r|\n/g,e);u.push(new c(d,l(d)))}this.create(u,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var i=0,n=this.root;n!==r.SENTINEL;)if(n.left!==r.SENTINEL&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left -;return i+=this.getAccumulatedValue(n,e-n.lf_left-2)+t-1}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,o=e;t!==r.SENTINEL;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var s=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+s.index,0===s.index){l=o-(a=this.getOffsetAt(n+1,1));return new i.Position(n+1,l+1)}return new i.Position(n+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===r.SENTINEL){var a=this.getOffsetAt(n+1,1),l=o-e-a;return new i.Position(n+1,l+1)}t=t.right}return new i.Position(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n) -;return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}var s=e.node,a=this._buffers[s.piece.bufferIndex].buffer,l=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start),u=a.substring(l+e.remainder,l+s.piece.length);for(s=s.next();s!==r.SENTINEL;){var d=this._buffers[s.piece.bufferIndex].buffer,c=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(s===t.node){u+=d.substring(c,c+t.remainder);break}u+=d.substr(c,s.piece.length),s=s.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){ -return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var i=this.nodeAt2(e,t+1);if(i.remainder===i.node.piece.length){var n=i.node.next();if(!n)return 0;var o=this._buffers[n.piece.bufferIndex],r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o.buffer.charCodeAt(r)}var o=this._buffers[i.node.piece.bufferIndex],s=(r=this.offsetInBuffer(i.node.piece.bufferIndex,i.node.piece.start))+i.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}, -e.prototype.findMatchesInNode=function(e,t,i,o,r,a,l,u,d,c,h){var p,f=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,r),v=this.offsetInBuffer(e.piece.bufferIndex,a);t.reset(m);var _={line:0,column:0};do{if(p=t.next(f.buffer)){if(p.index>=v)return c;this.positionInBuffer(e,p.index-g,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,r,_),b=_.line===r.line?_.column-r.column+o:_.column+1,C=b+p[0].length;if(h[c++]=s.createFindMatch(new n.Range(i+y,b,i+y,C),p,u),p.index+p[0].length>=v)return c;if(c>=d)return c}}while(p);return c},e.prototype.findMatchesLineByLine=function(e,t,i,n){var o=[],r=0,a=new s.Searcher(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===l)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var d=this.positionInBuffer(l.node,l.remainder),c=this.positionInBuffer(u.node,u.remainder) -;if(l.node===u.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,c,t,i,n,r,o),o;for(var h=e.startLineNumber,p=l.node;p!==u.node;){var f=this.getLineFeedCnt(p.piece.bufferIndex,d,p.piece.end);if(f>=1){var g=this._buffers[p.piece.bufferIndex].lineStarts,m=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start),v=g[d.line+f],_=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(p,a,h,_,d,this.positionInBuffer(p,v-m),t,i,n,r,o))>=n)return o;h+=f}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){C=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,a,C,e.endLineNumber,y,r,o,i,n),o}if((r=this._findMatchesInLine(t,a,this.getLineContent(h).substr(y),h,y,r,o,i,n))>=n)return o;h++,p=(l=this.nodeAt2(h,1)).node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){var b=h===e.startLineNumber?e.startColumn-1:0,C=this.getLineContent(h).substring(b,e.endColumn-1) -;return r=this._findMatchesInLine(t,a,C,e.endLineNumber,b,r,o,i,n),o}var S=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,a,h,S,d,c,t,i,n,r,o),o},e.prototype._findMatchesInLine=function(e,t,i,r,a,l,u,d,c){var h=e.wordSeparators;if(!d&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=i.length,m=-f;-1!==(m=i.indexOf(p,m+f));)if((!h||s.isValidMatch(h,i,g,m,f))&&(u[l++]=new o.FindMatch(new n.Range(r,m+1+a,r,m+1+f+a),null),l>=c))return l;return l}var v;t.reset(0);do{if((v=t.next(i))&&(u[l++]=s.createFindMatch(new n.Range(r,v.index+1+a,r,v.index+1+v[0].length+a),v,d),l>=c))return l}while(v);return l},e.prototype.insert=function(e,i,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==r.SENTINEL){var o=this.nodeAt(e),s=o.node,a=o.remainder,l=o.nodeStartOffset,u=s.piece,c=u.bufferIndex,h=this.positionInBuffer(s,a) -;if(0===s.piece.bufferIndex&&u.end.line===this._lastChangeBufferPos.line&&u.end.column===this._lastChangeBufferPos.column&&l+u.length===e&&i.lengthe){var p=[],f=new d(u.bufferIndex,h,u.end,this.getLineFeedCnt(u.bufferIndex,h,u.end),this.offsetInBuffer(c,u.end)-this.offsetInBuffer(c,h));if(this.shouldCheckCRLF()&&this.endWithCR(i)){if(10===this.nodeCharCodeAt(s,a)){var g={line:f.start.line+1,column:0};f=new d(f.bufferIndex,g,f.end,this.getLineFeedCnt(f.bufferIndex,g,f.end),f.length-1),i+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(i)){if(13===this.nodeCharCodeAt(s,a-1)){var m=this.positionInBuffer(s,a-1);this.deleteNodeTail(s,m),i="\r"+i,0===s.piece.length&&p.push(s)}else this.deleteNodeTail(s,h)}else this.deleteNodeTail(s,h);var v=this.createNewPieces(i);f.length>0&&this.rbInsertRight(s,f) -;for(var _=s,y=0;y=0;u--)l=this.rbInsertLeft(l,a[u]);this.validateCRLFWithPrevNode(l),this.deleteNodes(i)},e.prototype.insertContentToNodeRight=function(e,t){ -this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n,r=1;r=d))break;a=u+1}return i?(i.line=u,i.column=s-c,null):{line:u,column:s-c}},e.prototype.getLineFeedCnt=function(e,t,i){if(0===i.column)return i.line-t.line;var n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;var o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?i.line-t.line+1:i.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){ -for(var t=0;tt.AverageBufferSize){for(var i=[];e.length>t.AverageBufferSize;){var n=e.charCodeAt(t.AverageBufferSize-1),o=void 0;13===n||n>=55296&&n<=56319?(o=e.substring(0,t.AverageBufferSize-1),e=e.substring(t.AverageBufferSize-1)):(o=e.substring(0,t.AverageBufferSize),e=e.substring(t.AverageBufferSize));var r=l(o);i.push(new d(this._buffers.length,{line:0,column:0},{line:r.length-1,column:o.length-r[r.length-1]},r.length-1,o.length)),this._buffers.push(new c(o,r))}var s=l(e);return i.push(new d(this._buffers.length,{line:0,column:0},{line:s.length-1,column:e.length-s[s.length-1]},s.length-1,e.length)),this._buffers.push(new c(e,s)),i}var a=this._buffers[0].buffer.length,u=l(e,!1),h=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line, -column:this._lastChangeBufferPos.column+1},h=this._lastChangeBufferPos;for(p=0;p=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){var s=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return u+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:u,nodeStartLineNumber:d-(e-1-i.lf_left)}),a.substring(l+s,l+c-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){var s=this.getAccumulatedValue(i,e-i.lf_left-2),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=a.substring(l+s,l+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,u+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==r.SENTINEL;){a=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){var c=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=a.substring(l,l+c-t)} -l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=a.substr(l,i.piece.length),i=i.next()}return n},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,i=0;e!==r.SENTINEL;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:n.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column},e.prototype.deleteNodeTail=function(e,t){ -var i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,a=this.offsetInBuffer(i.bufferIndex,s),l=this.getLineFeedCnt(i.bufferIndex,i.start,s),u=l-n,c=a-o,h=i.length+c;e.piece=new d(i.bufferIndex,i.start,s,l,h),r.updateTreeMetadata(this,e,c,u)},e.prototype.deleteNodeHead=function(e,t){var i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,a=this.getLineFeedCnt(i.bufferIndex,s,i.end),l=a-n,u=o-this.offsetInBuffer(i.bufferIndex,s),c=i.length+u;e.piece=new d(i.bufferIndex,s,i.end,a,c),r.updateTreeMetadata(this,e,u,l)},e.prototype.shrinkNode=function(e,t,i){var n=e.piece,o=n.start,s=n.end,a=n.length,l=n.lineFeedCnt,u=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,u),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new d(n.bufferIndex,n.start,u,c,h),r.updateTreeMetadata(this,e,h-a,c-l) -;var p=new d(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),f=this.rbInsertRight(e,p);this.validateCRLFWithPrevNode(f)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=l(t,!1),s=0;se)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var i=this.root,n=0;i!==r.SENTINEL;)if(i.left!==r.SENTINEL&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(i,e-i.lf_left-2))+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n} -;t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==r.SENTINEL;){if(i.piece.lineFeedCnt>0){var s=this.getAccumulatedValue(i,0),a=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:a}}if(i.piece.length>=t-1){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}t-=i.piece.length,i=i.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===r.SENTINEL||0===e.piece.lineFeedCnt)return!1 -;var t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;return!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==r.SENTINEL&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var s=e.piece.length-1,a=e.piece.lineFeedCnt-1 -;e.piece=new d(e.piece.bufferIndex,e.piece.start,i,a,s),r.updateTreeMetadata(this,e,-1,-1),0===e.piece.length&&n.push(e);var l={line:t.piece.start.line+1,column:0},u=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new d(t.piece.bufferIndex,l,t.piece.end,c,u),r.updateTreeMetadata(this,t,-1,-1),0===t.piece.length&&n.push(t);var h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(var p=0;p0){m.sort(function(e,t){return t.lineNumber-e.lineNumber}),S=[];for(var u=0,w=m.length;u0&&m[u-1].lineNumber===E)){var L=m[u].oldContent,x=this.getLineContent(E) -;0!==x.length&&x!==L&&-1===i.firstNonWhitespaceIndex(x)&&S.push(E)}}}return new o.ApplyEditsResult(b,C,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,i=e[0].range,o=e[e.length-1].range,r=new n.Range(i.startLineNumber,i.startColumn,o.endLineNumber,o.endColumn),s=i.startLineNumber,a=i.startColumn,l=[],u=0,d=e.length;u0){var h=l.lines.length,p=l.lines[0],f=l.lines[h-1];c=1===h?new n.Range(u,d,u,d+p.length):new n.Range(u,d,u+h-1,f.length+1)}else c=new n.Range(u,d,u,d);i=c.endLineNumber,o=c.endColumn,t.push(c),r=l}return t},e._sortOpsAscending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i},e._sortOpsDescending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i},e}();t.PieceTreeTextBuffer=s}),define(t[273],i([0,1,5,191,275]),function(e,t,i,n,o){"use strict" -;Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i,n,o,r,s,a){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var r=0,s=i.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=n.createLineStarts(this._tmpLineStarts,e);this.chunks.push(new n.StringBuffer(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=i.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new r(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e) -},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=n.createLineStartsFast(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();t.PieceTreeTextBufferBuilder=s}),define(t[107],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var i="(-?\\d*\\.\\d\\w*)|([^",n=0,o=t.USUAL_WORD_SEPARATORS;n=0||(i+="\\"+r)}return i+="\\s]+)",new RegExp(i,"g")}(),t.ensureValidWordDefinition=function(e){var i=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)i=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),i=new RegExp(e.source,n)}return i.lastIndex=0,i},t.getWordAtText=function(e,t,i,n){t.lastIndex=0 -;var o=t.exec(i);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(e,t,i,n){var o=e-1-n;t.lastIndex=0;for(var r;r=t.exec(i);){var s=r.index||0;if(s>o)return null;if(t.lastIndex>=o)return{word:r[0],startColumn:n+1+s,endColumn:n+1+t.lastIndex}}return null}(e,t,i,n):function(e,t,i,n){var o=e-1-n,r=i.lastIndexOf(" ",o-1)+1;t.lastIndex=r;for(var s;s=t.exec(i);){var a=s.index||0;if(a<=o&&t.lastIndex>=o)return{word:s[0],startColumn:n+1+a,endColumn:n+1+t.lastIndex}}return null}(e,t,i,n);return t.lastIndex=0,r}}),define(t[272],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e}();t.FrankensteinMode=i}),define(t[81],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent" -}(t.IndentAction||(t.IndentAction={}));var i=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,i=e.notIn.length;ts&&(s=u)}return s}if("string"==typeof e)return r?"*"===e?5:e===o?10:0:0;if(e){var d=e.language,c=e.pattern,h=e.scheme,p=e.hasAccessToAllModels;if(!r&&!p)return 0;s=0;if(h)if(h===t.scheme)s=10;else{if("*"!==h)return 0;s=5}if(d)if(d===o)s=10;else{if("*"!==d)return 0;s=Math.max(s,5)}if(c){if(c!==t.fsPath&&!i.match(c,t.fsPath))return 0;s=10}return s}return 0} -Object.defineProperty(t,"__esModule",{value:!0}),t.score=n}),define(t[268],i([0,1,76,104]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){for(var t=0,i=0,o=0,r=e.length;ot&&(t=l),a>i&&(i=a),u>i&&(i=u)}t++,i++;for(var d=new n.Uint8Matrix(i,t,0),o=0,r=e.length;o=this._maxCharCode?0:this._states.get(e,t)},e}();t.StateMachine=o;var r=null,s=null,a=function(){function e(){}return e._createLink=function(e,t,i,n,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>n);if(n>0){var a=t.charCodeAt(n-1),l=t.charCodeAt(r);(40===a&&41===l||91===a&&93===l||123===a&&125===l)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}},e.computeLinks=function(t,n){ -void 0===n&&(null===r&&(r=new o([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),n=r);for(var a=function(){if(null===s){for(s=new i.CharacterClassifier(0),e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),l=[],u=1,d=t.getLineCount();u<=d;u++){for(var c=t.getLineContent(u),h=c.length,p=0,f=0,g=0,m=1,v=!1,_=!1,y=!1;p0&&e.getLanguageId(a-1)===r;)a--;return new i(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))};var i=function(){function e(e,t,i,n,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}, -e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=i,t.ignoreBracketsInToken=function(e){return 0!=(7&e)}}),define(t[266],i([0,1,81]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t){t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map(function(e){return new i.StandardAutoClosingPairConditional(e)}):t.brackets?this._autoClosingPairs=t.brackets.map(function(e){return new i.StandardAutoClosingPairConditional({open:e[0],close:e[1]})}):this._autoClosingPairs=[],this._autoCloseBefore="string"==typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED, -this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore},e.prototype.shouldAutoClosePair=function(e,t,i){if(0===t.getTokenCount())return!0;for(var n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n),r=0,s=this._autoClosingPairs;r=0?((n+=i?1:-1)<0?n=e.length-1:n%=e.length,e[n]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=i}),define(t[258],i([0,1,10,5,81]),function(e,t,i,n,o){"use strict" -;Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t){var i=this;(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach(function(t){var n=e._createOpenBracketRegExp(t[0]),o=e._createCloseBracketRegExp(t[1]);n&&o&&i._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:o})}),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,i){for(var n=0,r=this._regExpRules.length;n0&&i.length>0)for(var n=0,r=this._brackets.length;n0)for(var n=0,r=this._brackets.length;n=0;i--)t+=e.charAt(i);return t}(e=i)),t}}(),f=function(){function e(){}return e._findPrevBracketInText=function(e,t,i,o){var r=i.match(e);if(!r)return null;var s=i.length-(r.index||0),a=r[0].length,l=o+s;return new n.Range(t,l-a+1,t,l+1)},e.findPrevBracketInToken=function(e,t,i,n,o){var r=p(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)},e.findNextBracketInText=function(e,t,i,o){var r=i.match(e);if(!r)return null;var s=r.index||0,a=r[0].length;if(0===a)return null;var l=o+s;return new n.Range(t,l+1,t,l+1+a)},e.findNextBracketInToken=function(e,t,i,n,o){var r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)},e}();t.BracketsUtils=f}),define(t[257],i([0,1,81,144,146]),function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){ -n=n||{},this._richEditBrackets=e,this._complexAutoClosePairs=t.filter(function(e){return e.open.length>1&&!!e.close}).map(function(e){return new i.StandardAutoClosingPairConditional(e)}),n.docComment&&this._complexAutoClosePairs.push(new i.StandardAutoClosingPairConditional({open:n.docComment.open,close:n.docComment.close||""}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,i=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}}return null},e}();t.BracketElectricCharacterSupport=r}), -define(t[39],i([0,1,10,4,2,5,3,107,81,144,266,257,264,258,146]),function(e,t,i,n,o,r,s,a,l,u,d,c,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(t,i,n){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null;var o=null;i&&(o=i._conf),this._conf=e._mergeConf(o,n),this.onEnter=e._handleOnEnter(this._conf),this.comments=e._handleComments(this._conf),this.characterPair=new d.CharacterPairSupport(this._conf),this.wordDefinition=this._conf.wordPattern||a.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules&&(this.indentRulesSupport=new h.IndentRulesSupport(this._conf.indentationRules)),this.foldingRules=this._conf.folding||{}}return Object.defineProperty(e.prototype,"brackets",{get:function(){return!this._brackets&&this._conf.brackets&&(this._brackets=new f.RichEditBrackets(this._languageIdentifier,this._conf.brackets)),this._brackets},enumerable:!0,configurable:!0}), -Object.defineProperty(e.prototype,"electricCharacter",{get:function(){if(!this._electricCharacter){var e=[];this._conf.autoClosingPairs?e=this._conf.autoClosingPairs:this._conf.brackets&&(e=this._conf.brackets.map(function(e){return{open:e[0],close:e[1]}})),this._electricCharacter=new c.BracketElectricCharacterSupport(this.brackets,e,this._conf.__electricCharacterSupport)}return this._electricCharacter},enumerable:!0,configurable:!0}),e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,autoCloseBefore:e?t.autoCloseBefore||e.autoCloseBefore:t.autoCloseBefore, -folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},i=!0;return e.brackets&&(i=!1,t.brackets=e.brackets),e.indentationRules&&(i=!1),e.onEnterRules&&(i=!1,t.regExpRules=e.onEnterRules),i?null:new p.OnEnterSupport(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){var n=t.blockComment,o=n[0],r=n[1];i.blockCommentStartToken=o,i.blockCommentEndToken=r}return i},e}();t.RichEditSupport=g;var m=function(){return function(){}}();t.LanguageConfigurationChangeEvent=m;var v=function(){function e(){this._entries=new Map,this._onDidChange=new n.Emitter,this.onDidChange=this._onDidChange.event}return e.prototype.register=function(e,t){var i=this,n=this._getRichEditSupport(e.id),r=new g(e,n,t);return this._entries.set(e.id,r),this._onDidChange.fire({languageIdentifier:e}), -o.toDisposable(function(){i._entries.get(e.id)===r&&(i._entries.set(e.id,n),i._onDidChange.fire({languageIdentifier:e}))})},e.prototype._getRichEditSupport=function(e){return this._entries.get(e)},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,i){var n=u.createScopedLineTokens(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]}, -e.prototype.getAutoCloseBeforeSet=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():d.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,i){var n=u.createScopedLineTokens(t,i-1),o=this._getCharacterPairSupport(n.languageId);return!!o&&o.shouldAutoClosePair(e,n,i-n.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?a.ensureValidWordDefinition(t.wordDefinition||null):a.ensureValidWordDefinition(null)},e.prototype.getFoldingRules=function(e){var t=this._getRichEditSupport(e);return t?t.foldingRules:{}},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e);return t?t.indentRulesSupport||null:null},e.prototype.getPrecedingValidLine=function(e,t,i){var n=e.getLanguageIdAtPosition(t,0);if(t>1){var o=void 0,r=-1 -;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return r;var s=e.getLineContent(o);if(!i.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,i){void 0===i&&(i=!0);var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!n)return null;if(t<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(e,t,n);if(o<0)return null;if(o<1)return{indentation:"",action:null};var s=e.getLineContent(o);if(n.shouldIncrease(s)||n.shouldIndentNextLine(s))return{indentation:r.getLeadingWhitespace(s),action:l.IndentAction.Indent,line:o};if(n.shouldDecrease(s))return{indentation:r.getLeadingWhitespace(s),action:null,line:o};if(1===o)return{indentation:r.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};var a=o-1,u=n.getIndentMetadata(e.getLineContent(a));if(!(3&u)&&4&u){for(var d=0,c=a-1;c>0;c--)if(!n.shouldIndentNextLine(e.getLineContent(c))){d=c;break}return{indentation:r.getLeadingWhitespace(e.getLineContent(d+1)), -action:null,line:d+1}}if(i)return{indentation:r.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};for(c=o;c>0;c--){var h=e.getLineContent(c);if(n.shouldIncrease(h))return{indentation:r.getLeadingWhitespace(h),action:l.IndentAction.Indent,line:c};if(n.shouldIndentNextLine(h)){for(var d=0,p=c-1;p>0;p--)if(!n.shouldIndentNextLine(e.getLineContent(c))){d=p;break}return{indentation:r.getLeadingWhitespace(e.getLineContent(d+1)),action:null,line:d+1}}if(n.shouldDecrease(h))return{indentation:r.getLeadingWhitespace(h),action:null,line:c}}return{indentation:r.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,o){var s=this.getIndentRulesSupport(t);if(!s)return null;var a=this.getInheritIndentForLine(e,n),u=e.getLineContent(n);if(a){var d=a.line;if(void 0!==d){var c=this._getOnEnterSupport(t),h=null;try{c&&(h=c.onEnter("",e.getLineContent(d),""))}catch(e){i.onUnexpectedError(e)}if(h){var p=r.getLeadingWhitespace(e.getLineContent(d)) -;return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===l.IndentAction.Indent||h.indentAction===l.IndentAction.IndentOutdent?p=o.shiftIndent(p):h.indentAction===l.IndentAction.Outdent&&(p=o.unshiftIndent(p)),s.shouldDecrease(u)&&(p=o.unshiftIndent(p)),h.appendText&&(p+=h.appendText),r.getLeadingWhitespace(p)}}return s.shouldDecrease(u)?a.action===l.IndentAction.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===l.IndentAction.Indent?o.shiftIndent(a.indentation):a.indentation}return null},e.prototype.getIndentForEnter=function(e,t,i,n){e.forceTokenization(t.startLineNumber);var o,s,a=e.getLineTokens(t.startLineNumber),d=u.createScopedLineTokens(a,t.startColumn-1),c=d.getLineContent(),h=!1;if(d.firstCharOffset>0&&a.getLanguageId(0)!==d.languageId?(h=!0,o=c.substr(0,t.startColumn-1-d.firstCharOffset)):o=a.getLineContent().substring(0,t.startColumn-1),t.isEmpty())s=c.substr(t.startColumn-1-d.firstCharOffset);else{ -s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-d.firstCharOffset)}var p=this.getIndentRulesSupport(d.languageId);if(!p)return null;var f=o,g=r.getLeadingWhitespace(o);if(!n&&!h){var m=this.getInheritIndentForLine(e,t.startLineNumber);p.shouldDecrease(o)&&m&&(g=m.indentation,m.action!==l.IndentAction.Indent&&(g=i.unshiftIndent(g))),f=g+r.ltrim(r.ltrim(o," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,i){return e.getLanguageIdAtPosition(t,i)},getLineContent:function(i){return i===t.startLineNumber?f:e.getLineContent(i)}},_=r.getLeadingWhitespace(a.getLineContent()),y=this.getInheritIndentForLine(v,t.startLineNumber+1);if(!y){var b=h?_:g;return{beforeEnter:b,afterEnter:b}}var C=h?_:y.indentation;return y.action===l.IndentAction.Indent&&(C=i.shiftIndent(C)),p.shouldDecrease(s)&&(C=i.unshiftIndent(C)),{beforeEnter:h?_:g,afterEnter:C}}, -e.prototype.getIndentActionForType=function(e,t,i,n){var o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this.getIndentRulesSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-o.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset)}if(!r.shouldDecrease(u+s)&&r.shouldDecrease(u+i+s)){var d=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!d)return null;var c=d.indentation;return d.action!==l.IndentAction.Indent&&(c=n.unshiftIndent(c)),c}return null},e.prototype.getIndentMetadata=function(e,t){var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,i){ -var n=this.getEnterAction(e,new s.Range(t,i,t,i));return n?n.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-o.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset)}var d=t.startLineNumber,c="";if(d>1&&0===o.firstCharOffset){var h=this.getScopedLineTokens(e,d-1);h.languageId===o.languageId&&(c=h.getLineContent())}var p=null;try{p=r.onEnter(c,u,s)}catch(e){i.onUnexpectedError(e)}return p?(p.appendText||(p.indentAction===l.IndentAction.Indent||p.indentAction===l.IndentAction.IndentOutdent?p.appendText="\t":p.appendText=""),p.removeText&&(n=n.substring(0,n.length-p.removeText)),{enterAction:p,indentation:n}):null}, -e.prototype.getIndentationAtPosition=function(e,t,i){var n=e.getLineContent(t),o=r.getLeadingWhitespace(n);return o.length>i-1&&(o=o.substring(0,i-1)),o},e.prototype.getScopedLineTokens=function(e,t,i){e.forceTokenization(t);var n=e.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return u.createScopedLineTokens(n,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}();t.LanguageConfigurationRegistryImpl=v,t.LanguageConfigurationRegistry=new v}),define(t[256],i([0,1,28]),function(e,t,i){"use strict";function n(e){if(!e||!Array.isArray(e))return[];for(var t=[],i=0,n=0,o=e.length;n=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(i=r.fontStyle),null!==r.foreground&&(n=r.foreground),null!==r.background&&(o=r.background)}for(var a=new u,l=0,c=t;lt?1:0}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t,i,n,o){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}();t.ParsedTokenThemeRule=a,t.parseTokenTheme=n -;var l=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,u=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;var t=e.match(l);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();var n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=i.Color.fromHex("#"+e),n)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=u;var d=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTokenTheme=function(e,t){return this.createFromParsedTokenTheme(n(e),t)},e.createFromParsedTokenTheme=function(e,t){return o(e,t)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype._match=function(e){return this._root.match(e)},e.prototype.match=function(e,t){var i=this._cache.get(t);if(void 0===i){var n=this._match(t),o=r(t);i=(n.metadata|o<<8)>>>0,this._cache.set(t,i)} -return(i|e<<0)>>>0},e}();t.TokenTheme=d;var c=/\b(comment|string|regex|regexp)\b/;t.toStandardTokenType=r,t.strcmp=s;var h=function(){function e(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}();t.ThemeTrieElementRule=h;var p=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));var o=this._children.get(t);return void 0!==o?o.match(i):this._mainRule},e.prototype.insert=function(t,i,n,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t, -s=""):(r=t.substring(0,a),s=t.substring(a+1));var l=this._children.get(r);void 0===l&&(l=new e(this._mainRule.clone()),this._children.set(r,l)),l.insert(s,i,n,o)}else this._mainRule.acceptOverwrite(i,n,o)},e}();t.ThemeTrieElement=p,t.generateTokensCSSForColorMap=function(e){for(var t=[],i=1,n=e.length;i2?this._colorMap[2]:null},e}();t.TokenizationRegistryImpl=s}),/*! -Copyright (c) 2014 Taylor Hakes -Copyright (c) 2014 Forbes Lindesay - */ -function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define("vs/editor/common/standalone/promise-polyfill/polyfill",t):t()}(0,function(){"use strict";function e(e){var t=this.constructor;return this.then(function(i){return t.resolve(e()).then(function(){return i})},function(i){return t.resolve(e()).then(function(){return t.reject(i)})})}function t(){}function i(e){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],a(e,this)}function n(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._immediateFn(function(){var i=1===e._state?t.onFulfilled:t.onRejected;if(null!==i){var n;try{n=i(e._value)}catch(e){return void r(t.promise,e)}o(t.promise,n)}else(1===e._state?o:r)(t.promise,e._value)})):e._deferreds.push(t)}function o(e,t){try{ -if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void a(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(t){r(e,t)}}function r(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,o=e._deferreds.length;tn&&(p=n-f);var g=u.color,m=this._color2Id[g];m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var v=new i(p-f,p+f,m);u.setColorZone(v),s.push(v)}return this._colorZonesInvalid=!1,s.sort(i.compare),s},e}();t.OverviewZoneManager=o}),define(t[88],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height} -return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}();t.RestrictedRenderingContext=i;var n=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o._viewLines=n,o}return o(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){return this._viewLines.visibleRangeForPosition(e)},t}(i);t.RenderingContext=n;var r=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}();t.LineVisibleRanges=r;var s=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}();t.HorizontalRange=s}),define(t[245],i([0,1,88]),function(e,t,i){"use strict" -;Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),o=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,i,n,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(i,n),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new i.HorizontalRange(e[0].left,e[0].width)];e.sort(n.compare);for(var t=[],o=0,r=e[0].left,s=e[0].width,a=1,l=e.length;a=d?s=Math.max(s,d+c-r):(t[o++]=new i.HorizontalRange(r,s),r=d,s=c)}return t[o++]=new i.HorizontalRange(r,s),t},e._createHorizontalRangesFromClientRects=function(e,t){ -if(!e||0===e.length)return null;for(var i=[],o=0,r=e.length;oa)return null;(t=Math.min(a,Math.max(0,t)))!==(n=Math.min(a,Math.max(0,n)))&&n>0&&0===o&&(n--,o=Number.MAX_VALUE);var l=e.children[t].firstChild,u=e.children[n].firstChild;if(l&&u||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!u&&0===o&&n>0&&(u=e.children[n-1].firstChild,o=1073741824)),!l||!u)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(u.textContent.length,Math.max(0,o));var d=this._readClientRects(l,i,u,o,s);return this._createHorizontalRangesFromClientRects(d,r)},e}();t.RangeUtil=o}),define(t[242],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,n){this.configuration=e,this.theme=t,this.model=i,this.viewLayout=i.viewLayout,this.privateViewEventBus=n} -return e.prototype.addEventHandler=function(e){this.privateViewEventBus.addEventHandler(e)},e.prototype.removeEventHandler=function(e){this.privateViewEventBus.removeEventHandler(e)},e}();t.ViewContext=i}),define(t[238],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,i=this._eventHandlers.length;t0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,o=t.length;ni)&&(!d.isEmpty()||0!==u.type&&3!==u.type)){var c=d.startLineNumber===i?d.startColumn:n,h=d.endLineNumber===i?d.endColumn:o;r[s++]=new e(c,h,u.inlineClassName,u.type)}}return r},e.compare=function(e,t){ -return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.LineDecoration=n;var o=function(){return function(e,t,i){this.startOffset=e,this.endOffset=t,this.className=i}}();t.DecorationSegment=o;var r=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,i){for(;this.count>0&&this.stopOffsets[0]0&&t=e){ -this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t);break}this.count++},e}(),s=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],o=new r,s=0,a=0,l=t.length;a1){p=e.charCodeAt(d-2);i.isHighSurrogate(p)&&d--}if(c>1){var p=e.charCodeAt(c-2);i.isHighSurrogate(p)&&c--}var f=d-1,g=c-2;s=o.consumeLowerThan(f,s,n),0===o.count&&(s=f),o.insert(g,h)}return o.consumeLowerThan(1073741824,s,n),n},e}();t.LineDecorationsNormalizer=s}),define(t[108],i([0,1,5,124,154]),function(e,t,i,n,o){"use strict";function r(e,t){if(0===e.lineContent.length){var n=0,r=" ";if(e.lineDecorations.length>0){for(var a=[],d=0,h=e.lineDecorations.length;d')}return t.appendASCIIString(r), -new u(new l(0,0),!1,n)}return function(e,t){var n=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,d=e.isOverflowing,c=e.parts,h=e.tabSize,p=e.containsRTL,f=e.spaceWidth,g=e.renderWhitespace,m=e.renderControlCharacters,v=new l(a+1,c.length),_=0,y=0,b=0,C=0,S=0;t.appendASCIIString("");for(var w=0,E=c.length;w=0;if(b=0,t.appendASCIIString('0&&(!o||R>1?t.write1(8594):t.write1(65515),R--);R>0;)t.write1(160),R--}else t.write1(183);b++}C=N}else{N=0 -;for(p&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);_0;)t.write1(160),N++,R--;break;case 32:t.write1(160),N++;break;case 60:t.appendASCIIString("<"),N++;break;case 62:t.appendASCIIString(">"),N++;break;case 38:t.appendASCIIString("&"),N++;break;case 0:t.appendASCIIString("�"),N++;break;case 65279:case 8232:t.write1(65533),N++;break;default:i.isFullWidthCharacter(T)&&y++,m&&T<32?(t.write1(9216+T),N++):(t.write1(T),N++)}b++}C=N}t.appendASCIIString("")}v.setPartData(a,c.length-1,b,S),d&&t.appendASCIIString("");return t.appendASCIIString(""),new u(v,p,r)}(function(e){var t,n,r=e.useMonospaceOptimizations,a=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new s(t,""));for(var r=0,a=e.getCount();r=i){n[o++]=new s(i,u);break}n[o++]=new s(l,u)}}return n}(e.lineTokens,e.fauxIndentLength,n);2!==e.renderWhitespace&&1!==e.renderWhitespace||(l=function(e,t,n,o,r,a,l,u){var d,c=[],h=0,p=0,f=o[p].type,g=o[p].endIndex,m=o.length,v=i.firstNonWhitespaceIndex(e);-1===v?(v=t,d=t):d=i.lastNonWhitespaceIndex(e);for(var _=0,y=0;yd)S=!0;else if(9===C)S=!0;else if(32===C)if(u)if(b)S=!0;else{var w=y+1=a)&&(c[h++]=new s(y,"vs-whitespace"),_%=a):(y===g||S&&y>r)&&(c[h++]=new s(y,f),_%=a),9===C?_=a:i.isFullWidthCharacter(C)?_+=2:_++,b=S,y===g&&++p0?e.charCodeAt(t-1):0,x=t>1?e.charCodeAt(t-2):0;32===L&&32!==x&&9!==x||(E=!0)}else E=!0;return c[h++]=new s(t,E?"vs-whitespace":f),c -}(a,n,e.continuesWithWrappedLine,l,e.fauxIndentLength,e.tabSize,r,1===e.renderWhitespace));var u=0;if(e.lineDecorations.length>0){for(var d=0,h=e.lineDecorations.length;dc&&(c=v.startOffset,u[d++]=new s(c,m)),!(v.endOffset+1<=g)){c=g,u[d++]=new s(c,m+" "+v.className);break}c=v.endOffset+1,u[d++]=new s(c,m+" "+v.className),l++}g>c&&(c=g,u[d++]=new s(c,m))}var _=i[i.length-1].endIndex;if(l=50&&(o[r++]=new s(d+1,u),c=d+1,d=-1);c!==p&&(o[r++]=new s(p,u))}else o[r++]=f;n=p}else for(var a=0,l=t.length;a50){for(var u=f.type,m=Math.ceil(g/50),h=1;h>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,i,n){var o=(t<<16|i<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=n+i},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,i,n){if(0===this.length)return 0;for(var o=(t<<16|n<<0)>>>0,r=0,s=this.length-1;r+1>>1,l=this._data[a];if(l===o)return a;l>o?s=a:r=a}if(r===s)return r;var u=this._data[r],d=this._data[s];if(u===o)return r;if(d===o)return s;var c=e.getPartIndex(u);return n-e.getCharIndex(u)<=(c!==e.getPartIndex(d)?i:e.getCharIndex(d))-n?r:s},e}();t.CharacterMapping=l;var u=function(){return function(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}();t.RenderLineOutput=u,t.renderViewLine=r;var d=function(){ -return function(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}();t.RenderLineOutput2=d,t.renderViewLine2=function(e){var t=n.createStringBuilder(1e4),i=r(e,t);return new d(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)};var c=function(){return function(e,t,i,n,o,r,s,a,l,u,d,c){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.tabSize=a,this.containsRTL=l,this.spaceWidth=u,this.renderWhitespace=d,this.renderControlCharacters=c}}()}),define(t[233],i([0,1,3]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,o){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=n,this._model=o, -this.visibleRange=new i.Range(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}return e.prototype.getViewLineRenderingData=function(e){return this._model.getViewLineRenderingData(this.visibleRange,e)},e.prototype.getDecorationsInViewport=function(){return this._model.getDecorationsInViewport(this.visibleRange)},e}();t.ViewportData=n}),define(t[231],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._heights=[],this._minWidths=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,this._whitespaceId2Index={},this._lastWhitespaceId=0,this._minWidth=-1}return e.findInsertionIndex=function(e,t,i,n){for(var o=0,r=e.length;o>>1;t===e[s]?n=t&&(this._whitespaceId2Index[u]=d+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,i){e|=0,t|=0,i|=0;var n=!1;return n=this.changeWhitespaceHeight(e,i)||n,n=this.changeWhitespaceAfterLineNumber(e,t)||n},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var i=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var n=this._whitespaceId2Index[i] -;if(this._heights[n]!==t)return this._heights[n]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,i){i|=0;var n=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var o=this._whitespaceId2Index[n];if(this._afterLineNumbers[o]!==i){var r=this._ordinals[o],s=this._heights[o],a=this._minWidths[o];this.removeWhitespace(t);var l=e.findInsertionIndex(this._afterLineNumbers,i,this._ordinals,r);return this._insertWhitespaceAtIndex(t,l,i,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var i=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(i),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1), -this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),i=0,n=t.length;i=e&&(this._whitespaceId2Index[o]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var i=0,n=this._afterLineNumbers.length;it&&(this._afterLineNumbers[i]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var i=0,n=this._afterLineNumbers.length;i=t.length||t[o+1]>=e)return o;i=o+1|0}else n=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,i=this._lineHeight,n=1,o=t;n=s+i)n=r+1;else{if(e>=s)return r;o=r}}return n>t?t:n},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var i,n,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this._whitespaces.getCount();-1===l?(l=u,n=a+1,i=0):(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),i=0|this._whitespaces.getHeightForWhitespaceIndex(l));var d=s,c=d,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),c-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){var v=d;(v<=f&&ff)&&(g=m)}for(d+=o,p[m-r]=c,c+=o;n===m;)c+=i,d+=i,++l>=u?n=a+1:(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),i=0|this._whitespaces.getHeightForWhitespaceIndex(l));if(d>=t){a=m;break}}-1===g&&(g=a);var _=0|this.getVerticalOffsetForLineNumber(a),y=r,b=a;return yt&&b--,{ -bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:b}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t,i=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);t=i>=1?this._lineHeight*i:0;var n;return n=e>0?this._whitespaces.getAccumulatedHeight(e-1):0,t+n},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,i,n,o=0,r=this._whitespaces.getCount()-1;if(r<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(r)+this._whitespaces.getHeightForWhitespaceIndex(r))return-1;for(;o=i+n)o=t+1;else{if(e>=i)return t;r=t}return o},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null -;var i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;var n=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this._whitespaces.getCount()-1;if(i<0)return[];for(var o=[],r=i;r<=n;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}();t.LinesLayout=n}),define(t[158],i([0,1,104]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){ -this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=n;var o=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=i.toUint32(e);var n=this.values,o=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=i.toUint32(e),t=i.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=i.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i] -;return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,i=this.values.length-1,o=0,r=0,s=0;t<=i;)if(o=t+(i-t)/2|0,r=this.prefixSum[o],s=r-this.values[o],e=r))break;t=o+1}return new n(o,e-s)},e}();t.PrefixSumComputer=o;var r=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new o(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)}, -e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=n._lines.length?r.FIN:(i=n._lines[o],a=n._wordenize(i,e),s=0,o+=1,l())};return{next:l}},t.prototype.getLineWords=function(e,t){for(var i=this._lines[e-1],n=[],o=0,r=this._wordenize(i,t);othis._lines.length)t=this._lines.length, -i=this._lines[t-1].length+1,n=!0;else{var o=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>o&&(i=o,n=!0)}return n?{lineNumber:t,column:i}:e},t}(c.MirrorTextModel),_=function(){function t(e){this._foreignModuleFactory=e,this._foreignModule=null}return t.prototype.computeDiff=function(e,t,i){var n=this._getModel(e),o=this._getModel(t);if(!n||!o)return Promise.resolve(null);var r=n.getLinesContent(),s=o.getLinesContent(),a=new d.DiffComputer(r,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0}).computeDiff(),l=!(a.length>0)&&this._modelsAreIdentical(n,o);return Promise.resolve({identical:l,changes:a})},t.prototype._modelsAreIdentical=function(e,t){var i=e.getLineCount();if(i!==t.getLineCount())return!1;for(var n=1;n<=i;n++){if(e.getLineContent(n)!==t.getLineContent(n))return!1}return!0},t.prototype.computeMoreMinimalEdits=function(e,o){var r=this._getModel(e);if(!r)return Promise.resolve(o);for(var s=[],a=void 0,l=0,d=o=i.mergeSort(o,function(e,t){ -if(e.range&&t.range)return u.Range.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)});lt._diffLimit)s.push({range:h,text:p});else for(var m=n.stringDiff(g,p,!1),v=r.offsetAt(u.Range.lift(h).getStartPosition()),_=0,y=m;_=n,d=a,c=o.viewportHeight-a>=n,h=e.left,p=t.left;return h+i>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-i), -p+i>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-i),hthis._contentWidth)return null;var l=e.top-o,u=t.top+this._lineHeight,d=s+this._contentLeft,c=a+this._contentLeft,h=i.getDomNodePagePosition(this._viewDomNode.domNode),p=h.top+l-i.StandardWindow.scrollY,f=h.top+u-i.StandardWindow.scrollY,g=h.left+d-i.StandardWindow.scrollX,m=h.left+c-i.StandardWindow.scrollX,v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,_=p>=22,y=f+o<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;if(g+n+20>v){g-=b=g-(v-n-20),d-=b}if(m+n+20>v){m-=b=m-(v-n-20),c-=b}if(g<0){g-=b=g,d-=b}if(m<0){var b=m;m-=b,c-=b}return this._fixedOverflowWidgets&&(l=p,u=f,d=g,c=m),{fitsAbove:_,aboveTop:l,aboveLeft:d, -fitsBelow:y,belowTop:u,belowLeft:c}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new a(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewPosition)return[null,null];var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return[null,null];var i=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop,n=new a(i,t.left),o=this._viewPosition.lineNumber,r=t.left;if(this._viewRange){var s=e.linesVisibleRangesForRange(this._viewRange,!1);if(s&&s.length>0)for(var l=s.length-1;l>=0;l--){var u=s[l];if(u.lineNumber>=o){u.lineNumber>o&&(o=u.lineNumber,r=1073741824);for(var d=0,c=u.ranges.length;de.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)}, -e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}()}),define(t[230],i([0,1,71,3,88,436]),function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var i=e.call(this)||this;return i._context=t,i._lineHeight=i._context.configuration.editor.lineHeight,i._typicalHalfwidthCharacterWidth=i._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i._renderResult=null,i._context.addEventHandler(i),i}return o(t,e),t.prototype.dispose=function(){ -this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=0,s=t.length;rt.options.zIndex)return 1 -;var i=e.options.className,o=t.options.className;return io?1:n.Range.compareRangesUsingStarts(e.range,t.range)});for(var l=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,d=[],c=l;c<=u;c++){d[c-l]=""}this._renderWholeLineDecorations(e,i,d),this._renderNormalDecorations(e,i,d),this._renderResult=d},t.prototype._renderWholeLineDecorations=function(e,t,i){for(var n=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',d=Math.max(l.range.startLineNumber,o),c=Math.min(l.range.endLineNumber,r),h=d;h<=c;h++){i[h-o]+=u}}},t.prototype._renderNormalDecorations=function(e,t,i){for(var o=String(this._lineHeight),r=e.visibleRange.startLineNumber,s=null,a=!1,l=null,u=0,d=t.length;u';a[h]+=v}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]},t -}(i.DynamicViewOverlay);t.DecorationsOverlay=s}),define(t[156],i([0,1,71,434]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}();t.DecorationToRender=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._render=function(e,t,i){for(var n=[],o=e;o<=t;o++){n[o-e]=[]}if(0===i.length)return n;i.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=i;a++){var l=a-t,u=n[l];0===u.length?s[l]="":s[l]='
    =this._renderResult.length?"":this._renderResult[i]},t}(r);t.GlyphMarginOverlay=s}),define(t[232],i([0,1,156,428]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var i=e.call(this)||this;return i._context=t,i._decorationsLeft=i._context.configuration.editor.layoutInfo.decorationsLeft,i._decorationsWidth=i._context.configuration.editor.layoutInfo.decorationsWidth,i._renderResult=null,i._context.addEventHandler(i),i}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0}, -t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],o=0,r=0,s=t.length;r
    ',r=[],s=t;s<=i;s++){for(var a=s-t,l=n[a],u="",d=0,c=l.length;d';o[s]=l}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(i.DedupOverlay);t.MarginViewLineDecorationsOverlay=n}),define(t[235],i([0,1,26,33,420]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this,t)||this;return o._widgets={},o._verticalScrollbarWidth=o._context.configuration.editor.layoutInfo.verticalScrollbarWidth, -o._minimapWidth=o._context.configuration.editor.layoutInfo.minimapWidth,o._horizontalScrollbarHeight=o._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,o._editorHeight=o._context.configuration.editor.layoutInfo.height,o._editorWidth=o._context.configuration.editor.layoutInfo.width,o._domNode=i.createFastDomNode(document.createElement("div")),n.PartFingerprints.write(o._domNode,4),o._domNode.setClassName("overlayWidgets"),o}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height, -this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=i.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var i=this._widgets[t].domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){var i=t.domNode.clientHeight;t.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight), -t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),i=0,n=t.length;i0&&this._renderOneLane(o,i,n,e),!0}, -t.prototype._renderOneLane=function(e,t,i,n){for(var o=0,r=0,s=0,a=0,l=t;a=c?s=Math.max(s,h):(e.fillRect(0,r,n,s-r),r=c,s=h)}e.fillRect(0,r,n,s-r)},t}(r.ViewEventHandler);t.OverviewRuler=s}),define(t[237],i([0,1,26,10,33,12]),function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._lineHeight=n._context.configuration.editor.lineHeight,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode=i.createFastDomNode(document.createElement("div")),n.domNode.setClassName("view-zones"),n.domNode.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.marginDomNode=i.createFastDomNode(document.createElement("div")), -n.marginDomNode.setClassName("margin-view-zones"),n.marginDomNode.setPosition("absolute"),n.marginDomNode.setAttribute("role","presentation"),n.marginDomNode.setAttribute("aria-hidden","true"),n._zones={},n}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=!1,t=Object.keys(this._zones),i=0,n=t.length;i=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){ -var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){ -var i=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,t,n)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,i,n){return this._linesLayout.insertWhitespace(e,t,i,n)},t.prototype.changeWhitespace=function(e,t,i){return this._linesLayout.changeWhitespace(e,t,i)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)}, -t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){ -return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var i=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})},t}(i.Disposable);t.ViewLayout=a}),define(t[240],i([0,1,12,3,69]),function(e,t,i,n,o){"use strict" -;Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){ -var t=e.id,r=this._decorationsCache[t];if(!r){var s=e.range,a=e.options,l=void 0;if(a.isWholeLine){var u=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.startLineNumber,1)),d=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)));l=new n.Range(u.lineNumber,u.column,d.lineNumber,d.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(s);r=new o.ViewModelDecoration(l,a),this._decorationsCache[t]=r}return r},e.prototype.getDecorationsViewportData=function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){ -for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),i=e.startLineNumber,r=e.endLineNumber,s=[],a=0,l=[],u=i;u<=r;u++)l[u-i]=[];for(var d=0,c=t.length;d0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var i=0;ie.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,i,n,r,s){var a=t.startLineNumber,l=t.startColumn,u=t.endLineNumber,d=t.endColumn,c=r.getLineContent(a),h=r.getLineContent(u),p=c.lastIndexOf(i,l-1+i.length),f=h.indexOf(n,d-1-n.length);if(-1!==p&&-1!==f)if(a===u){c.substring(p+i.length,f).indexOf(n)>=0&&(p=-1,f=-1)}else{var g=c.substring(p+i.length),m=h.substring(0,f);(g.indexOf(n)>=0||m.indexOf(n)>=0)&&(p=-1,f=-1)}var v;-1!==p&&-1!==f?(p+i.length0&&32===h.charCodeAt(f-1)&&(n=" "+n,f-=1),v=e._createRemoveBlockCommentOperations(new o.Range(a,p+i.length+1,u,f+1),i,n)):(v=e._createAddBlockCommentOperations(t,i,n),this._usedEndToken=1===v.length?n:null) -;for(var _=0,y=v;_a?r-1:r}},e}();t.LineCommentCommand=u}),define(t[247],i([0,1,22,3]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i}return e.prototype.getEditOperations=function(e,t){var o=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new n.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),o), -!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new i.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new i.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumbert&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,o.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,o.matchesCount=!0,r=!0),void 0!==i&&(n.Range.equalsRange(this._currentMatch,i)||(this._currentMatch=i,o.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(o)},e.prototype.change=function(e,t,i){void 0===i&&(i=!0);var o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1, -currentMatch:!1},r=!1,s=this.isRegex,a=this.wholeWord,l=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(n.Range.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0, -this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),r&&this._onFindReplaceStateChange.fire(o)},e}();t.FindReplaceState=r}),define(t[249],i([0,1,3]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i}return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var n=[],o=0;o0;){if(e=n)break;if(36===(u=e.charCodeAt(i))){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(48===u||38===u){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1);continue}if(49<=u&&u<=57){var a=u-48;if(i+1=n)break;var u -;switch(u=e.charCodeAt(i)){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic("\n",i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic("\t",i+1)}}}return t.finalize()}}),define(t[149],i([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_FOLDING_REGIONS=65535,t.MAX_LINE_NUMBER=16777215;var i=function(){function e(e,i,n){if(e.length!==i.length||e.length>t.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=i,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var i=[],n=function(t,n){var o=i[i.length-1];return e.getStartLineNumber(o)<=t&&e.getEndLineNumber(o)>=n},o=0,r=this._startIndexes.length;ot.MAX_LINE_NUMBER||a>t.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+t.MAX_LINE_NUMBER);for(;i.length>0&&!n(s,a);)i.pop();var l=i.length>0?i[i.length-1]:-1;i.push(o),this._startIndexes[o]=s+((255&l)<<24),this._endIndexes[o]=a+((65280&l)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return this._startIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return i===t.MAX_FOLDING_REGIONS?-1:i},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}();t.FoldingRegion=n}),define(t[252],i([0,1,4,149]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){ -this._updateEventEmitter=new i.Emitter,this._textModel=e,this._decorationProvider=t,this._regions=new n.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var i={};this._decorationProvider.changeDecorations(function(n){for(var o=0,r=e;o=c))break;o(a,d===c),a++}}l=s()}for(;a0)return e},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],i=0,n=e;i=0;){var r=this._regions.toRegion(n) -;t&&!t(r,o)||i.push(r),o++,n=r.parentIndex}return i},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){var i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length)for(var r=[],s=n,a=this._regions.length;s0&&!l.containedBy(r[r.length-1]);)r.pop();r.push(l),t(l,r.length)&&i.push(l)}else for(var s=n,a=this._regions.length;s0)for(var r=0,s=n;r1)&&(u=e.getRegionsInside(l,function(e,n){return e.isCollapsed!==t&&n=0;s--)if(i!==o.isCollapsed(s)){var a=o.getStartLineNumber(s);t.test(n.getLineContent(a))&&r.push(o.toRegion(s))}e.toggleCollapseState(r)},t.setCollapseStateForType=function(e,t,i){for(var n=e.regions,o=[],r=n.length-1;r>=0;r--)i!==n.isCollapsed(r)&&t===n.getType(r)&&o.push(n.toRegion(r));e.toggleCollapseState(o)}}),define(t[253],i([0,1,4,3,19]),function(e,t,i,n,o){ -"use strict";function r(e,t){var i=o.findFirstInSorted(e,function(e){return t=0&&e[i].endLineNumber>=t?e[i]:null}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){var t=this;this._updateEventEmitter=new i.Emitter,this._foldingModel=e,this._foldingModelListener=e.onDidChange(function(e){return t.updateHiddenRanges()}),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],i=0,o=0,r=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;i0},e.prototype.isHidden=function(e){return null!==r(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){ -for(var t=this,i=!1,n=this._foldingModel.textModel,o=null,s=function(e){return o&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,o)||(o=r(t._hiddenRanges,e)),o?o.startLineNumber-1:null},a=0,l=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();t.HiddenRangeModel=s}),define(t[208],i([0,1,10,149]),function(e,t,i,n){"use strict";function o(e,t){for(var i=e.sort(function(e,t){var i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i}),n=new l(t),o=void 0,r=[],s=0,a=i;so.start)if(u.end<=o.end)r.push(o),o=u,n.add(u.start,u.end,u.kind&&u.kind.value,r.length);else{ -if(u.start>o.end){do{o=r.pop()}while(o&&u.start>o.end);o&&r.push(o),o=u}n.add(u.start,u.end,u.kind&&u.kind.value,r.length)}}else o=u,n.add(u.start,u.end,u.kind&&u.kind.value,r.length)}return n.toIndentRanges()}Object.defineProperty(t,"__esModule",{value:!0});var r=5e3,s={};t.ID_SYNTAX_PROVIDER="syntax";var a=function(){function e(e,i,n){void 0===n&&(n=r),this.editorModel=e,this.providers=i,this.limit=n,this.id=t.ID_SYNTAX_PROVIDER}return e.prototype.compute=function(e){var t=this;return function(e,t,n){var o=null,r=e.map(function(e,r){return Promise.resolve(e.provideFoldingRanges(t,s,n)).then(function(e){if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);for(var i=t.getLineCount(),s=0,a=e;s0&&l.end>l.start&&l.end<=i&&o.push({start:l.start,end:l.end,rank:r,kind:l.kind})}}},i.onUnexpectedExternalError)});return Promise.all(r).then(function(e){return o})}(this.providers,this.editorModel,e).then(function(e){if(e){return o(e,t.limit)}return null})}, -e.prototype.dispose=function(){},e}();t.SyntaxRangeProvider=a;var l=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,i,o){if(!(e>n.MAX_LINE_NUMBER||t>n.MAX_LINE_NUMBER)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=o,this._types[r]=i,this._length++,o<30&&(this._nestingLevelCounts[o]=(this._nestingLevelCounts[o]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),i=0;ithis._foldingRangesLimit){r=i;break}o+=s}} -for(var e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit),a=[],i=0,l=0;i=o)return null;for(var r=[],s=n;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),!0===i&&(a=a.reverse()),{startLineNumber:n,endLineNumber:o,before:r,after:a}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var r=function(e,t,r){var s=o(e,t,r);return s?i.EditOperation.replace(new n.Range(s.startLineNumber,1,s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null}(e,this.selection,this.descending) -;r&&t.addEditOperation(r.range,r.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,i){if(null===e)return!1;var n=o(e,t,i);if(!n)return!1;for(var r=0,s=n.before.length;r=e._maxRounds){t();break}if(!r){t();break}var u=n.findNextBracket(r);if(!u){t();break}if(Date.now()-l>e._maxDuration){setTimeout(function(){return e._bracketsRightYield(t,i+1,n,r,s)});break}var d=u.close;if(u.isOpen){c=a.has(d)?a.get(d):0;a.set(d,c+1)}else{var c=a.has(d)?a.get(d):0;if(c-=1,a.set(d,Math.max(0,c)),c<0){var h=s.get(d);h||(h=new o.LinkedList,s.set(d,h)),h.push(u.range)}}r=u.range.getEndPosition()}},e._bracketsLeftYield=function(t,i,o,r,s,a){for(var l=new Map,u=Date.now();;){if(i>=e._maxRounds&&0===s.size){t();break}if(!r){t();break}var d=o.findPrevBracket(r);if(!d){t();break}if(Date.now()-u>e._maxDuration){setTimeout(function(){return e._bracketsLeftYield(t,i+1,o,r,s,a)});break}var c=d.close;if(d.isOpen){m=l.has(c)?l.get(c):0;if(m-=1,l.set(c,Math.max(0,m)),m<0){var h=s.get(c);if(h){var p=h.shift() -;0===h.size&&s.delete(c);var f=n.Range.fromPositions(d.range.getEndPosition(),p.getStartPosition()),g=n.Range.fromPositions(d.range.getStartPosition(),p.getEndPosition());a.push({range:f,kind:"statement.brackets"}),a.push({range:g,kind:"statement.brackets.full"}),e._addBracketLeading(o,g,a)}}}else{var m=l.has(c)?l.get(c):0;l.set(c,m+1)}r=d.range.getStartPosition()}},e._addBracketLeading=function(e,t,o){if(t.startLineNumber!==t.endLineNumber){var r=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(r);0!==s&&s!==t.startColumn&&(o.push({range:n.Range.fromPositions(new i.Position(r,s),t.getEndPosition()),kind:"statement.brackets.leading"}),o.push({range:n.Range.fromPositions(new i.Position(r,1),t.getEndPosition()),kind:"statement.brackets.leading.full"}));var a=r-1;if(a>0){var l=e.getLineFirstNonWhitespaceColumn(a);l===t.startColumn&&l!==e.getLineLastNonWhitespaceColumn(a)&&(o.push({range:n.Range.fromPositions(new i.Position(a,l),t.getEndPosition()),kind:"statement.brackets.leading"}),o.push({ -range:n.Range.fromPositions(new i.Position(a,1),t.getEndPosition()),kind:"statement.brackets.leading.full"}))}}},e._maxDuration=30,e._maxRounds=2,e}();t.BracketSelectionRangeProvider=r}),define(t[265],i([0,1,3,5]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.provideSelectionRanges=function(e,t){for(var i=[],n=0,o=t;n=0;u--){if(95===(h=s.charCodeAt(u))||45===h)break;if(n.isLowerAsciiLetter(h)&&n.isUpperAsciiLetter(c))break;c=h}for(u+=1;d0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new i.Range(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber)),kind:"statement.line"})},e}();t.WordSelectionRangeProvider=o}),define(t[145],i([0,1]),function(e,t){"use strict";function i(e,t){for(var i=e.slice();i.length>0;){var n=i.shift();if(!t(n))break;i.unshift.apply(i,n.children)}}Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){ -this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,i=this.pos,n=0,o=this.value.charCodeAt(i);if("number"==typeof(t=e._table[o]))return this.pos+=1,{type:t,pos:i,len:1};if(e.isDigitCharacter(o)){t=8;do{n+=1,o=this.value.charCodeAt(i+n)}while(e.isDigitCharacter(o));return this.pos+=n,{type:t,pos:i,len:n}}if(e.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(i+ ++n)}while(e.isVariableCharacter(o)||e.isDigitCharacter(o));return this.pos+=n,{type:t,pos:i,len:n}}t=10;do{n+=1,o=this.value.charCodeAt(i+n)}while(!isNaN(o)&&void 0===e._table[o]&&!e.isDigitCharacter(o)&&!e.isVariableCharacter(o));return this.pos+=n,{type:t,pos:i,len:n}},e._table=(n={},n[36]=0,n[58]=1,n[44]=2,n[123]=3,n[125]=4,n[92]=5,n[47]=6,n[124]=7,n[43]=11,n[45]=12,n[63]=13,n),e}();t.Scanner=r;var s=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){ -return e instanceof a&&this._children[this._children.length-1]instanceof a?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var i=e.parent,n=i.children.indexOf(e),o=i.children.slice(0);o.splice.apply(o,[n,1].concat(t)),i._children=o,function e(t,i){for(var n=0,o=t;nt.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof d?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(function(e){return e.clone()}),e},t}(l);t.Placeholder=u;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this -;return t.options=[],t}return o(t,e),t.prototype.appendChild=function(e){return e instanceof a&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(s);t.Choice=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.resolve=function(e){var t=this,i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(function(e){return e instanceof h&&Boolean(e.elseValue)})&&(n=this._replace([])),n},t.prototype._replace=function(e){for(var t="",i=0,n=this._children;i0?o.set(e.index,e.children):r.push(e)),!0});for(var a=0,l=r;a0&&t),!o.has(0)&&i&&n.appendChild(new u(0)),n},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var i=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),i}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var i=this._scanner.value.substring(t.pos,this._token.pos) -;return this._token=this._scanner.next(),i},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new a(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new u(Number(t)):new p(t)),!0):this._backTo(i)},e.prototype._parseComplexPlaceholder=function(e){var t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);var n=new u(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new a("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{ -if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(var o=new d;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(o),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,i=[];;){if(2===this._token.type||7===this._token.type)break;var n=void 0;if(!(n=(n=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:this._accept(void 0,!0)))return this._backTo(t),!1;i.push(n)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new a(i.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);var n=new p(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i), -!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new a("${"+t+":")),n.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new c,i="",n="";;){if(this._accept(6))break;o=void 0;if(o=this._accept(5,!0))i+=o=this._accept(6,!0)||o;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;;){if(this._accept(6))break;var o=void 0;if(o=this._accept(5,!0))o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new a(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;;){if(this._accept(4))break;if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var i=!1;this._accept(3)&&(i=!0);var n=this._accept(8,!0);if(!n)return this._backTo(t),!1 -;if(!i)return e.appendChild(new h(Number(n))),!0;if(this._accept(4))return e.appendChild(new h(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var o=this._accept(9,!0);return o&&this._accept(4)?(e.appendChild(new h(Number(n),o)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new h(Number(n),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new h(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){var r=this._until(1);if(r){if(s=this._until(4))return e.appendChild(new h(Number(n),void 0,r,s)),!0}}else{var s=this._until(4);if(s)return e.appendChild(new h(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new a(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}();t.SnippetParser=g}),define(t[267],i([0,1,19,3,201]),function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0 -});var s=function(){function e(){}return e.create=function(t,s){if(!s.getConfiguration().contribInfo.suggest.localityBonus)return Promise.resolve(e.None);if(!s.hasModel())return Promise.resolve(e.None);var a=s.getModel(),l=s.getPosition();return t.canComputeWordRanges(a.uri)?(new r.BracketSelectionRangeProvider).provideSelectionRanges(a,[l]).then(function(r){return r&&0!==r.length&&0!==r[0].length?t.computeWordRanges(a.uri,r[0][0].range).then(function(t){return new(function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return o(a,e),a.prototype.distance=function(e,o){if(!t||!l.equals(s.getPosition()))return 0;if(17===o.kind)return 2<<20;var a=o.label,u=t[a];if(i.isFalsyOrEmpty(u))return 2<<20;for(var d=i.binarySearch(u,n.Range.fromPositions(e),n.Range.compareRangesUsingStarts),c=d>=0?u[d]:u[Math.max(0,~d-1)],h=r.length,p=0,f=r[0];p'"_]/g,"-")},t.log=function(e,t){console.log(e.languageId+": "+t)},t.createError=function(e,t){return new Error(e.languageId+": "+t)},t.substituteMatches=function(e,t,i,n,s){var a=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,function(t,l,u,d,c,h,p,f,g){return o(u)?o(d)?!o(c)&&c0;){var n=e.tokenizer[i];if(n)return n;var o=i.lastIndexOf(".");i=o<0?null:i.substr(0,o)}return null},t.stateExists=function(e,t){for(var i=t;i&&i.length>0;){if(e.stateNames[i])return!0;var n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return!1}}),define(t[269],i([0,1,198]),function(e,t,i){"use strict";function n(e,t){return"boolean"==typeof e?e:t}function o(e,t){return"string"==typeof e?e:t}function r(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var i=function(e){for(var t={},i=0,n=e;i=0&&n<5;)n++,t=t.replace(/@(\w+)/g,function(n,o){var r="";if("string"==typeof e[o])r=e[o];else{ -if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?i.createError(e,"language definition does not contain attribute '"+o+"', used at: "+t):i.createError(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return i.empty(r)?"":"(?:"+r+")"});return new RegExp(t,e.ignoreCase?"i":"")}function a(e,t,n,o){var a=-1,l=n,u=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);u&&(u[3]&&(a=parseInt(u[3]),u[2]&&(a+=100)),l=u[4]);var d="~",c=l;l&&0!==l.length?/^\w*$/.test(c)?d="==":(u=l.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(d=u[1],c=u[2]):(d="!=",c="");var h;if("~"!==d&&"!~"!==d||!/^(\w|\|)*$/.test(c))if("@"===d||"!@"===d){var p=e[c];if(!p)throw i.createError(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var i in t)if(t.hasOwnProperty(i)&&!e(t[i]))return!1;return!0}(function(e){return"string"==typeof e},p))throw i.createError(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);var f=r(p,e.ignoreCase) -;h=function(e){return"@"===d?f(e):!f(e)}}else if("~"===d||"!~"===d)if(c.indexOf("$")<0){var g=s(e,"^"+c+"$");h=function(e){return"~"===d?g.test(e):!g.test(e)}}else h=function(t,n,o,r){return s(e,"^"+i.substituteMatches(e,c,n,o,r)+"$").test(t)};else if(c.indexOf("$")<0){var m=i.fixCase(e,c);h=function(e){return"=="===d?e===m:e!==m}}else{var v=i.fixCase(e,c);h=function(t,n,o,r,s){var a=i.substituteMatches(e,v,n,o,r);return"=="===d?t===a:t!==a}}else{var _=r(c.split("|"),e.ignoreCase);h=function(e){return"~"===d?_(e):!_(e)}}return-1===a?{name:n,value:o,test:function(e,t,i,n){return h(e,e,t,i,n)}}:{name:n,value:o,test:function(e,t,i,n){var o=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;var o=i.split(".");if(o.unshift(i),n=0&&(o.tokenSubst=!0),"string"==typeof n.bracket)if("@open"===n.bracket)o.bracket=1;else{if("@close"!==n.bracket)throw i.createError(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);o.bracket=-1}if(n.next){if("string"!=typeof n.next)throw i.createError(e,"the next state must be a string value in rule: "+t);var r=n.next;if(!/^(@pop|@push|@popall)$/.test(r)&&("@"===r[0]&&(r=r.substr(1)),r.indexOf("$")<0&&!i.stateExists(e,i.substituteMatches(e,r,"",[],""))))throw i.createError(e,"the next state '"+n.next+"' is not defined in rule: "+t);o.next=r}return"number"==typeof n.goBack&&(o.goBack=n.goBack),"string"==typeof n.switchTo&&(o.switchTo=n.switchTo),"string"==typeof n.log&&(o.log=n.log),"string"==typeof n.nextEmbedded&&(o.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),o}if(Array.isArray(n)){var s=[];for(var u in n)n.hasOwnProperty(u)&&(s[u]=l(e,t,n[u]));return{group:s}}if(n.cases){var d=[];for(var c in n.cases)if(n.cases.hasOwnProperty(c)){ -var h=l(e,t,n.cases[c]);"@default"===c||"@"===c||""===c?d.push({test:void 0,value:h,name:c}):"@eos"===c?d.push({test:function(e,t,i,n){return n},value:h,name:c}):d.push(a(e,t,c,h))}var p=e.defaultToken;return{test:function(e,t,i,n){for(var o in d)if(d.hasOwnProperty(o)){var r=d[o];if(!r.test||r.test(e,t,i,n))return r.value}return p}}}throw i.createError(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;if("string"==typeof t)n=t;else{if(!(t instanceof RegExp))throw i.createError(e,"rules must start with a match string or regular expression: "+this.name);n=t.source}this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n, -this.regex=s(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=l(e,this.name,t)},e}();t.compile=function(e,t){function r(e,o,l){for(var d in l)if(l.hasOwnProperty(d)){var c=l[d],h=c.include;if(h){if("string"!=typeof h)throw i.createError(s,"an 'include' attribute must be a string at: "+e);if("@"===h[0]&&(h=h.substr(1)),!t.tokenizer[h])throw i.createError(s,"include target '"+h+"' is not defined at: "+e);r(e+"."+h,o,t.tokenizer[h])}else{var p=new u(e);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(p.setRegex(a,c[0]),c.length>=3)if("string"==typeof c[1])p.setAction(a,{token:c[1],next:c[2]});else{if("object"!=typeof c[1])throw i.createError(s,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);var f=c[1];f.next=c[2],p.setAction(a,f)}else p.setAction(a,c[1]);else{if(!c.regex)throw i.createError(s,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e) -;c.name&&"string"==typeof c.name&&(p.name=c.name),c.matchOnlyAtStart&&(p.matchOnlyAtLineStart=n(c.matchOnlyAtLineStart,!1)),p.setRegex(a,c.regex),p.setAction(a,c.action)}o.push(p)}}}if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");var s={};s.languageId=e,s.noThrow=!1,s.maxStack=100,s.start="string"==typeof t.start?t.start:null,s.ignoreCase=n(t.ignoreCase,!1),s.tokenPostfix=o(t.tokenPostfix,"."+s.languageId),s.defaultToken=o(t.defaultToken,"source"),s.usesEmbedded=!1;var a=t;if(a.languageId=e,a.ignoreCase=s.ignoreCase,a.noThrow=s.noThrow,a.usesEmbedded=s.usesEmbedded,a.stateNames=t.tokenizer,a.defaultToken=s.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw i.createError(s,"a language definition must define the 'tokenizer' attribute as an object");s.tokenizer=[];for(var l in t.tokenizer)if(t.tokenizer.hasOwnProperty(l)){s.start||(s.start=l);var d=t.tokenizer[l];s.tokenizer[l]=new Array,r("tokenizer."+l,s.tokenizer[l],d)}if(s.usesEmbedded=a.usesEmbedded, -t.brackets){if(!Array.isArray(t.brackets))throw i.createError(s,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var c=[];for(var h in t.brackets)if(t.brackets.hasOwnProperty(h)){var p=t.brackets[h];if(p&&Array.isArray(p)&&3===p.length&&(p={token:p[2],open:p[0],close:p[1]}),p.open===p.close)throw i.createError(s,"open and close brackets in a 'brackets' attribute must be different: "+p.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof p.open||"string"!=typeof p.token||"string"!=typeof p.close)throw i.createError(s,"every element in the 'brackets' array must be a '{open,close,token}' object or array");c.push({token:p.token+s.tokenPostfix,open:i.fixCase(s,p.open),close:i.fixCase(s,p.close)})}return s.brackets=c,s.noThrow=!0,s}}), -define(t[270],i([6,8]),function(e,t){return e.create("vs/base/browser/ui/actionbar/actionbar",t)}),define(t[79],i([0,1,17,270,2,49,7,20,78,52,4,19,501]),function(e,t,i,n,r,s,a,l,u,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,i,n){var o=e.call(this)||this;return o.options=n,o._context=t||o,o._action=i,i instanceof s.Action&&o._register(i.onDidChange(function(e){o.element&&o.handleActionChangeEvent(e)})),o}return o(t,e),t.prototype.handleActionChangeEvent=function(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()},Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled}, -t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this;this.element=e,u.Gesture.addTarget(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this._register(a.addDisposableListener(this.element,u.EventType.Tap,function(e){return t.onClick(e)})),this._register(a.addDisposableListener(this.element,a.EventType.MOUSE_DOWN,function(e){n||a.EventHelper.stop(e,!0),t._action.enabled&&0===e.button&&t.element&&a.addClass(t.element,"active")})),this._register(a.addDisposableListener(this.element,a.EventType.CLICK,function(e){a.EventHelper.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):i.setImmediate(function(){return t.onClick(e)})})),this._register(a.addDisposableListener(this.element,a.EventType.DBLCLICK,function(e){a.EventHelper.stop(e,!0)})),[a.EventType.MOUSE_UP,a.EventType.MOUSE_OUT].forEach(function(e){t._register(a.addDisposableListener(t.element,e,function(e){a.EventHelper.stop(e),a.removeClass(t.element,"active")}))})}, -t.prototype.onClick=function(e){a.EventHelper.stop(e,!0);var t;l.isUndefinedOrNull(this._context)?t=e:(t=this._context,l.isObject(t)&&(t.event=e)),this._actionRunner.run(this._action,t)},t.prototype.focus=function(){this.element&&(this.element.focus(),a.addClass(this.element,"focused"))},t.prototype.blur=function(){this.element&&(this.element.blur(),a.removeClass(this.element,"focused"))},t.prototype.updateEnabled=function(){},t.prototype.updateLabel=function(){},t.prototype.updateTooltip=function(){},t.prototype.updateClass=function(){},t.prototype.updateChecked=function(){},t.prototype.dispose=function(){this.element&&(a.removeNode(this.element),this.element=void 0),e.prototype.dispose.call(this)},t}(r.Disposable);t.BaseActionItem=p;var f=function(e){function t(i){var n=e.call(this,t.ID,i,i?"separator text":"separator")||this;return n.checked=!1,n.radio=!1,n.enabled=!1,n}return o(t,e),t.ID="vs.actions.separator",t}(s.Action);t.Separator=f;var g=function(e){function t(t,i,n){void 0===n&&(n={}) -;var o=e.call(this,t,i,n)||this;return o.options=n,o.options.icon=void 0!==n.icon&&n.icon,o.options.label=void 0===n.label||n.label,o.cssClass="",o}return o(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.element&&(this.label=a.append(this.element,a.$("a.action-label"))),this._action.id===f.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button"),this.options.label&&this.options.keybinding&&this.element&&(a.append(this.element,a.$("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.label.focus()},t.prototype.updateLabel=function(){this.options.label&&(this.label.textContent=this.getAction().label)},t.prototype.updateTooltip=function(){var e=null -;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=n.localize(0,null,e,this.options.keybinding))),e&&(this.label.title=e)},t.prototype.updateClass=function(){this.cssClass&&a.removeClasses(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,a.addClass(this.label,"icon"),this.cssClass&&a.addClasses(this.label,this.cssClass),this.updateEnabled()):a.removeClass(this.label,"icon")},t.prototype.updateEnabled=function(){this.getAction().enabled?(this.label.removeAttribute("aria-disabled"),this.element&&a.removeClass(this.element,"disabled"),a.removeClass(this.label,"disabled"),this.label.tabIndex=0):(this.label.setAttribute("aria-disabled","true"),this.element&&a.addClass(this.element,"disabled"),a.addClass(this.label,"disabled"),a.removeTabIndexAndUpdateFocus(this.label))},t.prototype.updateChecked=function(){ -this.getAction().checked?a.addClass(this.label,"checked"):a.removeClass(this.label,"checked")},t}(p);t.ActionItem=g;var m={orientation:0,context:null,triggerKeys:{keys:[3,10],keyDown:!1}},v=function(e){function t(t,i){void 0===i&&(i=m);var n=e.call(this)||this;n._onDidBlur=n._register(new c.Emitter),n._onDidCancel=n._register(new c.Emitter),n._onDidRun=n._register(new c.Emitter),n._onDidBeforeRun=n._register(new c.Emitter),n.options=i,n._context=i.context,n.options.triggerKeys||(n.options.triggerKeys=m.triggerKeys),n.options.actionRunner?n._actionRunner=n.options.actionRunner:(n._actionRunner=new s.ActionRunner,n._register(n._actionRunner)),n._register(n._actionRunner.onDidRun(function(e){return n._onDidRun.fire(e)})),n._register(n._actionRunner.onDidBeforeRun(function(e){return n._onDidBeforeRun.fire(e)})),n.items=[],n.focusedItem=void 0,n.domNode=document.createElement("div"),n.domNode.className="monaco-action-bar",!1!==i.animated&&a.addClass(n.domNode,"animated");var o,r;switch(n.options.orientation){ -case 0:o=15,r=17;break;case 1:o=17,r=15,n.domNode.className+=" reverse";break;case 2:o=16,r=18,n.domNode.className+=" vertical";break;case 3:o=18,r=16,n.domNode.className+=" vertical reverse"}return n._register(a.addDisposableListener(n.domNode,a.EventType.KEY_DOWN,function(e){var t=new d.StandardKeyboardEvent(e),i=!0;t.equals(o)?n.focusPrevious():t.equals(r)?n.focusNext():t.equals(9)?n.cancel():n.isTriggerKeyEvent(t)?n.options.triggerKeys&&n.options.triggerKeys.keyDown&&n.doTrigger(t):i=!1,i&&(t.preventDefault(),t.stopPropagation())})),n._register(a.addDisposableListener(n.domNode,a.EventType.KEY_UP,function(e){var t=new d.StandardKeyboardEvent(e);n.isTriggerKeyEvent(t)?(n.options.triggerKeys&&!n.options.triggerKeys.keyDown&&n.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&n.updateFocusedItem()})),n.focusTracker=n._register(a.trackFocus(n.domNode)),n._register(n.focusTracker.onDidBlur(function(){ -document.activeElement!==n.domNode&&a.isAncestor(document.activeElement,n.domNode)||(n._onDidBlur.fire(),n.focusedItem=void 0)})),n._register(n.focusTracker.onDidFocus(function(){return n.updateFocusedItem()})),n.actionsList=document.createElement("ul"),n.actionsList.className="actions-container",n.actionsList.setAttribute("role","toolbar"),n.options.ariaLabel&&n.actionsList.setAttribute("aria-label",n.options.ariaLabel),n.domNode.appendChild(n.actionsList),t.appendChild(n.domNode),n}return o(t,e),Object.defineProperty(t.prototype,"onDidBlur",{get:function(){return this._onDidBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}), -t.prototype.isTriggerKeyEvent=function(e){var t=!1;return this.options.triggerKeys&&this.options.triggerKeys.keys.forEach(function(i){t=t||e.equals(i)}),t},t.prototype.updateFocusedItem=function(){for(var e=0;e=i.actionsList.children.length?(i.actionsList.appendChild(n),i.items.push(r)):(i.actionsList.insertBefore(n,i.actionsList.children[o]),i.items.splice(o,0,r),o++)})},t.prototype.clear=function(){this.items=r.dispose(this.items),a.clearNode(this.actionsList)},t.prototype.isEmpty=function(){return 0===this.items.length},t.prototype.focus=function(e){var t=!1,i=void 0;void 0===e?t=!0:"number"==typeof e?i=e:"boolean"==typeof e&&(t=e),t&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):(void 0!==i&&(this.focusedItem=i),this.updateFocus())},t.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled()) -;this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},t.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.actionsList.focus();for(var t=0;t=0){var i=-1;e.equals(17)?i=(t+1)%d.length:e.equals(15)&&(i=0===t?d.length-1:t-1),e.equals(9)?d[t].blur():i>=0&&d[i].focus(),n.EventHelper.stop(e,!0)}}});var c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none", -c.appendChild(this.caseSensitive.domNode),c.appendChild(this.wholeWords.domNode),c.appendChild(this.regex.domNode),this.domNode.appendChild(c)},t.prototype.validate=function(){this.inputBox&&this.inputBox.validate()},t.prototype.clearMessage=function(){this.inputBox&&this.inputBox.hideMessage()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(s.Widget);t.FindInput=d}),define(t[282],i([6,8]),function(e,t){return e.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",t)}),define(t[283],i([6,8]),function(e,t){return e.create("vs/base/browser/ui/list/listWidget",t)}),define(t[135],i([0,1,283,2,20,19,152,7,17,78,52,4,62,581,117,28,31,574,139,65,462]),function(e,t,i,n,s,l,u,d,c,h,p,f,g,m,v,_,y,b,C,S){"use strict";function w(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function E(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=80&&e.keyCode<=90)}function L(e){ -return c.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function x(e){return e.browserEvent.shiftKey}function D(e){return e instanceof MouseEvent&&2===e.button}function I(e,t){for(var i=[],n=0,o=0;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]=0){o=this.renderedElements[n];this.trait.unrender(i),o.index=t}else{var o={index:t,templateData:i};this.renderedElements.push(o)}this.trait.renderIndex(t,i)}, -e.prototype.splice=function(e,t,i){for(var n=[],o=0,r=this.renderedElements;o=e+t&&n.push({index:s.index+i-t,templateData:s.templateData})}this.renderedElements=n},e.prototype.renderIndexes=function(e){for(var t=0,i=this.renderedElements;t-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){var t=l.firstIndex(this.renderedElements,function(t){return t.templateData===e});t<0||this.renderedElements.splice(t,1)},e}(),k=function(){function e(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new f.Emitter}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new M(this)},enumerable:!0,configurable:!0}), -e.prototype.splice=function(e,t,i){var n=i.length-t,o=e+t,r=this.sortedIndexes.filter(function(t){return t=o}).map(function(e){return e+n}));this.renderer.splice(e,t,i.length),this._set(r,r)},e.prototype.renderIndex=function(e,t){d.toggleClass(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){d.removeClass(e,this._trait)},e.prototype.set=function(e,t){return this._set(e,e.slice().sort(K),t)},e.prototype._set=function(e,t,i){var n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;var r=I(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return l.binarySearch(this.sortedIndexes,e,K)>=0},e.prototype.dispose=function(){this._onChange=n.dispose(this._onChange)},a([u.memoize],e.prototype,"renderer",null),e}(),T=function(e){ -function t(){return e.call(this,"focused")||this}return o(t,e),t.prototype.renderIndex=function(t,i){e.prototype.renderIndex.call(this,t,i),this.contains(t)?i.setAttribute("aria-selected","true"):i.removeAttribute("aria-selected")},t}(k),R=function(){function e(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}return e.prototype.splice=function(e,t,i){var n=this;if(!this.identityProvider)return this.trait.splice(e,t,i.map(function(){return!1}));var o=this.trait.get().map(function(e){return n.identityProvider.getId(n.view.element(e)).toString()}),r=i.map(function(e){return o.indexOf(n.identityProvider.getId(e).toString())>-1});this.trait.splice(e,t,r)},e}(),O=function(){function e(e,t,i){this.list=e,this.view=t;var n=!(!1===i.multipleSelectionSupport);this.disposables=[],this.openController=i.openController||W;var o=f.Event.chain(g.domEvent(t.domNode,"keydown")).filter(function(e){return!w(e.target)}).map(function(e){return new p.StandardKeyboardEvent(e)});o.filter(function(e){return 3===e.keyCode -}).on(this.onEnter,this,this.disposables),o.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.disposables),o.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.disposables),o.filter(function(e){return 11===e.keyCode}).on(this.onPageUpArrow,this,this.disposables),o.filter(function(e){return 12===e.keyCode}).on(this.onPageDownArrow,this,this.disposables),o.filter(function(e){return 9===e.keyCode}).on(this.onEscape,this,this.disposables),n&&o.filter(function(e){return(c.isMacintosh?e.metaKey:e.ctrlKey)&&31===e.keyCode}).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]), -this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(l.range(this.list.length),e.browserEvent),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e}();!function(e){e[e.Idle=0]="Idle", -e[e.Typing=1]="Typing"}(N||(N={})),t.mightProducePrintableCharacter=E;var P=function(){function e(e,t,i){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.enabled=!1,this.state=N.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.enabledDisposables=[],this.disposables=[],this.updateOptions(e.options)}return e.prototype.updateOptions=function(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)},e.prototype.enable=function(){var e=this;if(!this.enabled){var t=f.Event.chain(g.domEvent(this.view.domNode,"keydown")).filter(function(e){return!w(e.target)}).filter(function(){return e.automaticKeyboardNavigation||e.triggered}).map(function(e){return new p.StandardKeyboardEvent(e)}).filter(this.keyboardNavigationLabelProvider.mightProducePrintableCharacter?function(t){ -return e.keyboardNavigationLabelProvider.mightProducePrintableCharacter(t)}:function(e){return E(e)}).forEach(function(e){e.stopPropagation(),e.preventDefault()}).map(function(e){return e.browserEvent.key}).event,i=f.Event.debounce(t,function(){return null},800);f.Event.reduce(f.Event.any(t,i),function(e,t){return null===t?null:(e||"")+t})(this.onInput,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}},e.prototype.disable=function(){this.enabled&&(this.enabledDisposables=n.dispose(this.enabledDisposables),this.enabled=!1,this.triggered=!1)},e.prototype.onInput=function(e){if(!e)return this.state=N.Idle,void(this.triggered=!1);var t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===N.Idle?1:0;this.state=N.Typing;for(var o=0;o=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]-1?t:[e]},e.prototype.getDragURI=function(e){return this.dnd.getDragURI(e)},e.prototype.getDragLabel=function(e){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e)},e.prototype.onDragStart=function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)},e.prototype.onDragOver=function(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)},e.prototype.drop=function(e,t,i,n){this.dnd.drop(e,t,i,n)},e}(),G=function(){function e(e,t,n,o){void 0===o&&(o=z),this._options=o, -this.eventBufferer=new f.EventBufferer,this._onDidOpen=new f.Emitter,this.onDidOpen=this._onDidOpen.event,this._onPin=new f.Emitter,this.didJustPressContextMenuKey=!1,this._onDidDispose=new f.Emitter,this.focus=new T,this.selection=new k("selected"),y.mixin(o,B,!1);var s=[this.focus.renderer,this.selection.renderer];o.accessibilityProvider&&s.push(new j(o.accessibilityProvider)),n=n.map(function(e){return new U(e.templateId,s.concat([e]))});var a=r({},o,{dnd:o.dnd&&new q(this,o.dnd)});if(this.view=new v.ListView(e,t,n,a),"string"!=typeof o.ariaRole?this.view.domNode.setAttribute("role",m.ListAriaRootRole.TREE):this.view.domNode.setAttribute("role",o.ariaRole),this.styleElement=d.createStyleSheet(this.view.domNode),this.styleController=o.styleController||new H(this.styleElement,this.view.domId),this.spliceable=new b.CombinedSpliceable([new R(this.focus,this.view,o.identityProvider),new R(this.selection,this.view,o.identityProvider),this.view]), -this.disposables=[this.focus,this.selection,this.view,this._onDidDispose],this.onDidFocus=f.Event.map(g.domEvent(this.view.domNode,"focus",!0),function(){return null}),this.onDidBlur=f.Event.map(g.domEvent(this.view.domNode,"blur",!0),function(){return null}),this.disposables.push(new A(this,this.view)),"boolean"!=typeof o.keyboardSupport||o.keyboardSupport){var l=new O(this,this.view,o);this.disposables.push(l)}o.keyboardNavigationLabelProvider&&(this.typeLabelController=new P(this,this.view,o.keyboardNavigationLabelProvider),this.disposables.push(this.typeLabelController)),this.disposables.push(this.createMouseController(o)),this.onFocusChange(this._onFocusChange,this,this.disposables),this.onSelectionChange(this._onSelectionChange,this,this.disposables),o.ariaLabel&&this.view.domNode.setAttribute("aria-label",i.localize(0,null,o.ariaLabel)),this.style(o)}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this -;return f.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return f.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){return this.view.onMouseClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){return this.view.onMouseDblClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMiddleClick",{get:function(){return this.view.onMouseMiddleClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){return this.view.onMouseDown},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){return this.view.onTouchStart},enumerable:!0,configurable:!0}), -Object.defineProperty(e.prototype,"onTap",{get:function(){return this.view.onTap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=f.Event.chain(g.domEvent(this.view.domNode,"keydown")).map(function(e){return new p.StandardKeyboardEvent(e)}).filter(function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode}).filter(function(e){return e.preventDefault(),e.stopPropagation(),!1}).event,i=f.Event.chain(g.domEvent(this.view.domNode,"keyup")).filter(function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t}).filter(function(){return e.getFocus().length>0&&!!e.view.domElement(e.getFocus()[0])}).map(function(t){var i=e.getFocus()[0];return{index:i,element:e.view.element(i),anchor:e.view.domElement(i),browserEvent:t}}).event,n=f.Event.chain(this.view.onContextMenu).filter(function(){return!e.didJustPressContextMenuKey}).map(function(e){var t=e.element,i=e.index,n=e.browserEvent;return{element:t, -index:i,anchor:{x:n.clientX+1,y:n.clientY},browserEvent:n}}).event;return f.Event.any(t,i,n)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyDown",{get:function(){return g.domEvent(this.view.domNode,"keydown")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidDispose",{get:function(){return this._onDidDispose.event},enumerable:!0,configurable:!0}),e.prototype.createMouseController=function(e){return new V(this)},e.prototype.updateOptions=function(e){void 0===e&&(e={}),this._options=r({},this._options,e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options)},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,i){var n=this;if(void 0===i&&(i=[]),e<0||e>this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===i.length||this.eventBufferer.bufferEvents(function(){ -return n.spliceable.splice(e,t,i)})},e.prototype.rerender=function(){this.view.rerender()},e.prototype.element=function(e){return this.view.element(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.contentHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.view.domNode.focus()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.setSelection=function(e,t){for(var i=0,n=e;i=this.length)throw new Error("Invalid index "+o)}this.selection.set(e,t)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.getSelectedElements=function(){var e=this;return this.getSelection().map(function(t){ -return e.view.element(t)})},e.prototype.setFocus=function(e,t){for(var i=0,n=e;i=this.length)throw new Error("Invalid index "+o)}this.focus.set(e,t)},e.prototype.focusNext=function(e,t,i,n){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}},e.prototype.focusPrevious=function(e,t,i,n){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}},e.prototype.focusNextPage=function(e,t){var i=this,n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=0===n?0:n-1;var o=this.view.element(n),r=this.getFocusedElements()[0];if(r!==o){var s=this.findPreviousIndex(n,!1,t);s>-1&&r!==this.view.element(s)?this.setFocus([s],e):this.setFocus([n],e)}else{var a=this.view.getScrollTop();this.view.setScrollTop(a+this.view.renderHeight-this.view.elementHeight(n)), -this.view.getScrollTop()!==a&&setTimeout(function(){return i.focusNextPage(e,t)},0)}},e.prototype.focusPreviousPage=function(e,t){var i,n=this,o=this.view.getScrollTop();i=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var r=this.view.element(i),s=this.getFocusedElements()[0];if(s!==r){var a=this.findNextIndex(i,!1,t);a>-1&&s!==this.view.element(a)?this.setFocus([a],e):this.setFocus([i],e)}else{var l=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==l&&setTimeout(function(){return n.focusPreviousPage(e,t)},0)}},e.prototype.focusLast=function(e,t){if(0!==this.length){var i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}},e.prototype.focusFirst=function(e,t){if(0!==this.length){var i=this.findNextIndex(0,!1,t);i>-1&&this.setFocus([i],e)}},e.prototype.findNextIndex=function(e,t,i){void 0===t&&(t=!1);for(var n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}, -e.prototype.findPreviousIndex=function(e,t,i){void 0===t&&(t=!1);for(var n=0;n=this.length)throw new Error("Invalid index "+e);var i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(s.isNumber(t)){var r=o-this.view.renderHeight;this.view.setScrollTop(r*C.clamp(t,0,1)+n)}else{var a=n+o,l=i+this.view.renderHeight;n=l&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getRelativeTop=function(e){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null -;var o=n-this.view.renderHeight;return Math.abs((t-i)/o)},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var i=this,n=0,o=e;n=this.length)throw new Error("Invalid index "+r)}this._onDidOpen.fire({indexes:e,elements:e.map(function(e){return i.view.element(e)}),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,i=e;t=this.length)throw new Error("Invalid index "+n)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,i=e.indexes,n=e.browserEvent;return{indexes:i,elements:i.map(function(e){return t.view.element(e)}),browserEvent:n}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.view.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"), -d.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();d.toggleClass(this.view.domNode,"selection-none",0===e.length),d.toggleClass(this.view.domNode,"selection-single",1===e.length),d.toggleClass(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=n.dispose(this.disposables),this._onDidOpen.dispose(),this._onPin.dispose(),this._onDidDispose.dispose()},a([u.memoize],e.prototype,"onFocusChange",null),a([u.memoize],e.prototype,"onSelectionChange",null),a([u.memoize],e.prototype,"onContextMenu",null),e}();t.List=G}),define(t[285],i([6,8]),function(e,t){return e.create("vs/base/browser/ui/menu/menu",t)}),define(t[286],i([0,1,285,5,49,79,7,52,15,2,51,4,17,461]),function(e,t,i,n,r,s,a,l,u,d,c,h,p){"use strict";function f(e){var i=t.MENU_MNEMONIC_REGEX,n=i.exec(e);if(!n)return e;var o="&"===n[0].charAt(0);return e.replace(i,o?"$2":"").trim()} -Object.defineProperty(t,"__esModule",{value:!0}),t.MENU_MNEMONIC_REGEX=function(){try{return new RegExp("\\(&([^\\s&])\\)|(?1){var n=i.shift();n&&(o.focusItemByElement(n.container),i.push(n)),o.mnemonics.set(t,i)}}})),p.isLinux&&o._register(a.addDisposableListener(r,a.EventType.KEY_DOWN,function(e){var t=new l.StandardKeyboardEvent(e);t.equals(14)||t.equals(11)?(o.focusedItem=o.items.length-1,o.focusNext(),a.EventHelper.stop(e,!0)):(t.equals(13)||t.equals(12))&&(o.focusedItem=0,o.focusPrevious(),a.EventHelper.stop(e,!0))})),o._register(a.addDisposableListener(o.domNode,a.EventType.MOUSE_OUT,function(e){var t=e.relatedTarget;a.isAncestor(t,o.domNode)||(o.focusedItem=void 0,o.scrollTopHold=o.menuElement.scrollTop,o.updateFocus(),e.stopPropagation())})), -o._register(a.addDisposableListener(o.domNode,a.EventType.MOUSE_UP,function(e){a.EventHelper.stop(e,!0)})),o._register(a.addDisposableListener(o.actionsList,a.EventType.MOUSE_OVER,function(e){var t=e.target;if(t&&a.isAncestor(t,o.actionsList)&&t!==o.actionsList){for(;t.parentElement!==o.actionsList&&null!==t.parentElement;)t=t.parentElement;if(a.hasClass(t,"action-item")){var i=o.focusedItem;o.scrollTopHold=o.menuElement.scrollTop,o.setFocusedItem(t),i!==o.focusedItem&&o.updateFocus()}}}));var s={parent:o};o.mnemonics=new Map,o.push(i,{icon:!0,label:!0,isMenu:!0}),o.scrollableElement=o._register(new c.DomScrollableElement(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));return o.scrollableElement.getDomNode().style.position=null,r.style.maxHeight=Math.max(10,window.innerHeight-t.getBoundingClientRect().top-30)+"px",o.scrollableElement.onScroll(function(){o._onScroll.fire()},o,o.menuDisposables), -o._register(a.addDisposableListener(o.menuElement,a.EventType.SCROLL,function(e){void 0!==o.scrollTopHold&&(o.menuElement.scrollTop=o.scrollTopHold,o.scrollTopHold=void 0),o.scrollableElement.scanDomNode()})),t.appendChild(o.scrollableElement.getDomNode()),o.scrollableElement.scanDomNode(),o.items.filter(function(e){return!(e instanceof y)}).forEach(function(e,t,i){e.updatePositionInSet(t+1,i.length)}),o}return o(t,e),t.prototype.style=function(e){var t=this.getContainer(),i=e.foregroundColor?""+e.foregroundColor:null,n=e.backgroundColor?""+e.backgroundColor:null,o=e.borderColor?"2px solid "+e.borderColor:null,r=e.shadowColor?"0 2px 4px "+e.shadowColor:null;t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=r,this.items&&this.items.forEach(function(t){(t instanceof v||t instanceof y)&&t.style(e)})},t.prototype.getContainer=function(){return this.scrollableElement.getDomNode()},Object.defineProperty(t.prototype,"onScroll",{get:function(){ -return this._onScroll.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollOffset",{get:function(){return this.menuElement.scrollTop},enumerable:!0,configurable:!0}),t.prototype.focusItemByElement=function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()},t.prototype.setFocusedItem=function(e){for(var t=0;t